tag:blogger.com,1999:blog-47007342143947166952024-02-18T23:00:02.571-05:00Computer Tips [https://com.puter.tips/]Learn. Create. Share.Computer Tipshttp://www.blogger.com/profile/02976260939681262022noreply@blogger.comBlogger197125tag:blogger.com,1999:blog-4700734214394716695.post-38421593876336251482023-12-24T20:43:00.000-05:002023-12-24T20:43:09.586-05:00(My)SQL Injection Attack [Tutorial]Imagine you're baking a delicious batch of cookies, following your grandma's secret recipe. But then, a mischievous squirrel sneaks in and replaces a pinch of cinnamon with a dash of…mystery powder! That's kind of like an SQL injection (SQLi) attack. Hackers, like mischievous squirrels, exploit website vulnerabilities by sneaking malicious code into user input fields.This "mystery powder" can Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-87583713880958328752023-12-24T19:20:00.002-05:002023-12-24T19:36:58.911-05:00[How To] Unfollow Non-followers on InstagramThis tutorial walks you through the fastest and safest way to find and unfollow Instagram users who don't follow you back without logging in to third-party services, downloading browser extensions, or installing apps or software. Following the 15 steps mentioned in this article, you will end up with the accounts you follow but who don't follow you back. You need to go to each profile Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-48602091268714760212023-09-04T17:22:00.004-04:002023-12-08T13:34:59.631-05:00Simplify Rational Numbers in Python<!DOCTYPE html>
to_Rational
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-17396323465833878262023-08-12T16:33:00.004-04:002023-08-12T16:33:39.143-04:00[How To] Install SEAL-Python In macOSRun the following commands from the Terminal in the given order:1. brew install cmake autoconf automake libtool shtool gflags2. xcode-select --install3. git clone https://github.com/Huelse/SEAL-Python.git4. cd SEAL-Python5. pip3 install numpy pybind116. git submodule update --init --recursive7. cd SEAL8. cmake -S . -B build -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-47200559637912144762023-08-12T16:25:00.003-04:002023-08-12T16:25:57.743-04:00[Solved] Fix "ld: library not found for -lc++" errors in macOSLinker Error:Run Build Command(s):/usr/local/Cellar/cmake/3.26.3/bin/cmake -E env VERBOSE=1 /usr/local/bin/gmake -f Makefile cmTC_2eb92/fast && /usr/local/bin/gmake -f CMakeFiles/cmTC_2eb92.dir/build.make CMakeFiles/cmTC_2eb92.dir/build gmake[1]: Entering directory '/Users/devharsh/Downloads/SEAL-Python/SEAL/build/CMakeFiles/CMakeScratch/TryCompile-p29bdr' Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-14426294920360628942023-08-12T16:20:00.001-04:002023-08-12T16:20:42.915-04:00[How To] Create A Python PackageStep 1 - Create src and tests folders and add __init__.py.(Optionally, you can add docs and scripts directories and other files like CHANGES.txt and MANiFEST.in).Step 2 - Add modules with functionalities.Step 3 - Create pyproject.toml and setup.cfg (or setup.py).Step 4 - Create README.md and LICENSE.txt.Step 5 - Run the following commands:pip install --upgrade pip setuptools wheel tqdm twine Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-80997699947116886552022-11-29T17:59:00.006-05:002022-11-29T17:59:57.332-05:00error: package javax.xml.bind does not existTry these fixes if you run into issues with javax.xml.bind, which was deprecated and later removed from Java.----------------------------------------------------------------------
Solution 1 => Switch to Java 8
Please install the latest JDK 8 from oracle for your OS - https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html. If you have the latest Java (version 11/14) Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-26408683635851450972022-11-27T21:26:00.000-05:002022-11-27T21:26:10.929-05:00[Fix] Free up disk space in macOSThis hack worked for me when I was running low on disk space on my MacBook Pro, stopping me from upgrading to the latest version of Xcode and macOS. Run these quick and easy commands from the macOS terminal to clean system data over 100 GB.rm -rf Library/Logsrm -rf Library/Cachesrm -rf System/Library/Cachesrm -rf ~/Library/Logsrm -rf ~/Library/CachesDevharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-77356994979621163652022-11-27T21:14:00.002-05:002022-11-27T21:14:11.285-05:00List Supported CPU Instructions Set [Solved]You may find these terminal commands useful if you are looking for ways to list all supported instructions set by the CPU on a macOS machine. For instance, you can check for Intel® Streaming SIMD Extensions 4 (Intel® SSE4) or Intel® Software Guard Extensions (Intel® SGX) features for your device.% sysctl -n "machdep.cpu.brand_string"Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz% sysctl -a | grep Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-13907983618969386512022-11-27T20:58:00.003-05:002022-11-27T20:58:47.211-05:00Delete files from Git repo and historyFollow these steps to delete single or multiple files from your Git repository and prune it from history. You should also add the file(s) to .gitignore (Step 5) to avoid committing the same files to your repo again in the future.git clone <repo-path>git rm file1 file2git filter-repo --force --invert-paths --path file1git filter-repo --force --invert-paths --path Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-14145743722015394422022-11-27T20:46:00.003-05:002022-11-27T20:49:52.856-05:00[How To] Install HElib on macOSHElib is an open-source (Apache License v2.0) software library that implements homomorphic encryption (HE). Currently, available schemes are the implementations of the Brakerski-Gentry-Vaikuntanathan (BGV) scheme and the Approximate Number scheme of Cheon-Kim-Kim-Song (CKKS), along with many optimizations to make homomorphic evaluation runs faster, focusing mostly on effective use of the Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-24942661173099936912022-11-24T15:18:00.000-05:002022-11-24T15:18:01.651-05:00[How To] Run Jupyter Lab from a Remote serverStep 1: Launch Jupyter Lab from the Remote server with the command$ jupyter-lab --no-browser --ip="0.0.0.0"[I 2022-11-24 15:03:36.648 ServerApp] jupyterlab | extension was successfully linked.[I 2022-11-24 15:03:36.711 ServerApp] nbclassic | extension was successfully linked.[I 2022-11-24 15:03:37.783 ServerApp] notebook_shim | extension was successfully linked.[I 2022-11-24 15:03:37.910 Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-3817859078242351912022-11-24T14:49:00.003-05:002022-11-24T14:51:23.286-05:00[How To] Install SEAL Python on a Raspberry PiFollow this tutorial to install Microsoft SEAL 4.X for Python on a Raspberry Pi 3 device. You can follow the same commands to install it on any other Linux machine. I have copied the output for each command for your reference.$ uname -aLinux raspberrypi 5.15.76-v7+ #1597 SMP Fri Nov 4 12:13:17 GMT 2022 armv7l GNU/Linux$ sudo apt update -y && sudo apt upgrade -y && sudo apt Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-19072995891018356652022-08-15T14:28:00.000-04:002022-08-15T14:28:06.454-04:00Top 7 Free Cyber Security NewslettersThe following is the list of the 7 free, most popular cyber security newsletters:The Hacker NewsSecurityWeekCSOSANS NewslettersWeLiveSecurity by ESETCybersecurity VenturesNaked SecurityDevharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-26422616288086461542022-08-09T19:30:00.003-04:002022-08-09T19:30:56.839-04:00[Solved] Error: No such keg: /usr/local/Cellar/gccIf you are facing issues with Homebrew while installing or updating the GCC package (or any other module), follow this guide.The error occurred for me recently during my periodic homebrew updates on my MacBook Pro.devharsh@Devharshs-MacBook-Pro ~ % brew update && brew upgrade && brew cleanup Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-54883534902921656712022-08-09T15:46:00.003-04:002022-08-09T15:46:55.509-04:00[How To] Upgrade to Python 3.9 in Google ColabGoogle Colaboratory, or “Colab” for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary python code through the browser and is especially well suited to machine learning, data analysis, and education. More technically, Colab is a hosted Jupyter notebook service that requires no setup to use while providing access free of charge to computing resources, Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-71914409705421016872022-07-17T12:28:00.002-04:002022-08-17T19:40:45.920-04:00[How To] Install Pyfhel in macOS Tested on Intel-based (x86_64) MacBook, not tested on M1/M2 (ARM)Apple Clang does not support -fopenmp and -libseal, use GCC or CLANG% git clone --recursive https://github.com/ibarrond/Pyfhel2.a) create requirements.txt file "setuptools<=60.9",
"wheel",
"cython>=3.0.0a9",
"numpy>=1.20",
"cmake>=3.15",
"toml>=0.10"
2.b) % pip3 install Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-39190967473039710022022-07-13T12:56:00.001-04:002022-07-19T21:47:53.487-04:00[Solved] Jupyter notebook raises Module Not Found ErrorI recently ran into issues on my MacBook with Jupyter notebooks, where it could not find any packages and was throwing "ModuleNotFoundError: No module named ****" for several libraries. I already had these packages installed but somehow Jupyter python kernel could not find it. I tried to install these packages in the notebook cells with the command !pip install **** but this did not help either. Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-43354414737022905082022-07-13T11:08:00.002-04:002022-07-13T11:08:32.399-04:00[Solved] ld: library not found for -lntlNTL: A Library for doing Number TheoryNTL is a high-performance, portable C++ library providing data structures and algorithms for manipulating signed, arbitrary length integers and for vectors, matrices, and polynomials over the integers and over finite fields.You might face a linking error with NTL in macOS using the Apple Clang compiler:% make &Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-6910176899050844382022-07-13T10:55:00.002-04:002022-11-24T14:58:21.003-05:00[How To] Run MinimaxComp_degrees in macOSMinimaxComp_degreesThis algorithm finds optimized degrees for comparison/max/ReLU algorithms using minimax composite polynomial on the RNS-CKKS scheme, which was proposed in https://ieeexplore.ieee.org/document/9517029 and https://eprint.iacr.org/2021/1215.How to run on macOS using the Apple Clang compiler:1. % brew install NTL2. % export LIBRARY_PATH=/usr/local/lib3. % git clone https:Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-83763268785370227002022-07-08T17:17:00.003-04:002022-07-08T17:19:16.884-04:00[How To] Install CRC RevEng on macOSCRC RevEngCRC RevEng is a portable, arbitrary-precision CRC calculator and algorithm finder. It calculates CRCs using any 111 preset algorithms or a user-specified algorithm to any width. It calculates reversed CRCs to give the bit pattern that produces a desired forward CRC. CRC RevEng also reverse-engineers any CRC algorithm from good, correctly formatted message-CRC pairs and optional known Computer Tipshttp://www.blogger.com/profile/02976260939681262022noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-80466769848328718432022-07-08T17:03:00.003-04:002022-07-08T17:03:58.517-04:00Top 13 Free Email NewslettersThe following is the list of the 13 free most popular newsletters:1440Below the FoldBenedict’s NewsletterBrain PickingsMorning BrewNextDraftNPR’s Life KitNYTimes Morning BriefingThe ElevatorThe GISTThe HustleThe Lefsetz LetterThe Moz Top TenDevharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-80426542551303592972022-07-02T15:32:00.001-04:002022-07-02T15:32:54.255-04:00[Solved] frame.append method is deprecated and will be removed from pandasCode:all_results = all_results.append(current_result)Error:/var/folders/wh/tdg0ff9s1wl59234d5l27_gc0000gn/T/ipykernel_98654/2691205834.py:15: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.
all_results = all_results.append(current_result)Fix:all_results = pd.concat([all_results, current_result])Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-74524156947355867172022-07-02T14:10:00.000-04:002022-07-02T14:10:00.669-04:00[Solved] seaborn: decrease the size of the markersCode:ax = sns.swarmplot(y="time_taken", x="dtype", data=all_results, color=".25")Error:/usr/local/Cellar/jupyterlab/3.3.2/libexec/lib/python3.9/site-packages/seaborn/categorical.py:1296: UserWarning: 35.9% of the points cannot be placed; you may want to decrease the size of the markers or use stripplot.
warnings.warn(msg, UserWarning)Fix:ax = sns.swarmplot(y="time_taken", x="dtype", data=Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0tag:blogger.com,1999:blog-4700734214394716695.post-71462471320504846152022-06-30T14:34:00.005-04:002022-07-19T20:02:43.843-04:00[How To] Run HELR (Homomorphic Encryption Logistic Regression) in macOSHELR is a software project for performing a logistic regression training on encrypted data (Secure Logistic Regression based on Homomorphic Encryption: Design and Evaluation (https://medinform.jmir.org/2018/2/e19/)).Step 1: brew install GMPStep 2: brew install NTLStep 3: git clone https://github.com/K-miran/HELR.gitStep 4: cd HELRStep 5: make newmake cleanrm *.o libHELR.a || echo Devharsh Trivedihttp://www.blogger.com/profile/00726190537196991236noreply@blogger.com0