Hi! My name is Navan Chauhan. I dabble in the mysterious dark arts of programming and in-silico drug discovery. I am proficient in Python and can work my way with Swift. I only use vanilla JS.
+
+
Contact Me
+
+
The best way to reach out to me is by e-mail. navanchauhan[at]gmail.com Or, if I have made peace with my ISP and corrected the rDNS settings, then: hey[at]navan.dev
I finally completed my first quick and dirty vaporwave remix of "I Want It That Way" by the Backstreet Boys
+
+
V A P O R W A V E
+
+
Vaporwave is all about A E S T H E T I C S. Vaporwave is a type of music genre that emerged as a parody of Chillwave, shared more as a meme rather than a proper musical genre. Of course this changed as the genre become mature
+
+
How to Vaporwave
+
+
The first track which is considered to be actual Vaporwave is Ramona Xavier's Macintosh Plus, this set the the guidelines for making Vaporwave
+
+
+
Take a 1980s RnB song
+
Slow it down
+
Add Bass and Treble
+
Add again
+
Add Reverb ( make sure its wet )
+
+
+
There you have your very own Vaporwave track.
+
+
( Now, there are some tracks being produced which are not remixes and are original )
+
+
My Remix
+
+
+
+
Where is the Programming?
+
+
The fact that there are steps on producing Vaporwave, this gave me the idea that Vaporwave can actually be made using programming, stay tuned for when I publish the program which I am working on ( Generating A E S T H E T I C artwork and remixes)
+]]>
+
+
+
+
+ https://web.navan.dev/posts/hello-world.html
+
+
+ Hello World
+
+
+ My first post.
+
+ https://web.navan.dev/posts/hello-world.html
+ Tue, 16 Apr 2019 17:39:00 -0000
+ Hello World
+
+
Why a Hello World post?
+
+
Just re-did the entire website using Publish (Publish by John Sundell). So, a new hello world post :)
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2010-01-24-experiments.html
+
+
+ Experiments
+
+
+ Just a markdown file for all experiments related to the website
+
+ https://web.navan.dev/posts/2010-01-24-experiments.html
+ Sun, 24 Jan 2010 23:43:00 -0000
+ Experiments
+
+
+
+
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab.html
+
+
+ Setting up Kaggle to use with Google Colab
+
+
+ Tutorial on setting up kaggle, to use with Google Colab
+
+ https://web.navan.dev/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab.html
+ Wed, 15 Jan 2020 23:36:00 -0000
+ Setting up Kaggle to use with Google Colab
+
+
In order to be able to access Kaggle Datasets, you will need to have an account on Kaggle (which is Free)
+
+
Grabbing Our Tokens
+
+
Go to Kaggle
+
+
+
+
Click on your User Profile and Click on My Account
+
+
+
+
Scroll Down until you see Create New API Token
+
+
+
+
This will download your token as a JSON file
+
+
+
+
Copy the File to the root folder of your Google Drive
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2019-12-08-Image-Classifier-Tensorflow.html
+
+
+ Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
+
+
+ Tutorial on creating an image classifier model using TensorFlow which detects malaria
+
+ https://web.navan.dev/posts/2019-12-08-Image-Classifier-Tensorflow.html
+ Sun, 08 Dec 2019 14:16:00 -0000
+ Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
+
+
Done during Google Code-In. Org: Tensorflow.
+
+
Imports
+
+
%tensorflow_version2.x#This is for telling Colab that you want to use TF 2.0, ignore if running on local machine
+
+fromPILimportImage# We use the PIL Library to resize images
+importnumpyasnp
+importos
+importcv2
+importtensorflowastf
+fromtensorflow.kerasimportdatasets,layers,models
+importpandasaspd
+importmatplotlib.pyplotasplt
+fromkeras.modelsimportSequential
+fromkeras.layersimportConv2D,MaxPooling2D,Dense,Flatten,Dropout
+
We use the Adam optimiser as it is an adaptive learning rate optimisation algorithm that's been designed specifically for training deep neural networks, which means it changes its learning rate automatically to get the best results
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-05-31-compiling-open-babel-on-ios.html
+
+
+ Compiling Open Babel on iOS
+
+
+ Compiling Open Babel on iOS
+
+ https://web.navan.dev/posts/2020-05-31-compiling-open-babel-on-ios.html
+ Sun, 31 May 2020 23:30:00 -0000
+ Compiling Open Babel on iOS
+
+
Due to the fact that my summer vacations started today,
+I had the brilliant idea of trying to run open babel on my iPad.
+To give a little background, I had tried to compile AutoDock Vina using a cross-compiler but I had miserably failed.
+
+
I am running the Checkr1n jailbreak on my iPad and the Unc0ver jailbreak on my phone.
+
+
But Why?
+
+
Well, just because I can. This is literally the only reason I tried compiling it and also partially because in the long run I want to compile AutoDock Vina so I can do Molecular Docking on the go.
+
+
Let's Go!
+
+
How hard can it be to compile open babel right? It is just a simple software with clear and concise build instructions. I just need to use cmake to build and the make to install.
+
+
It is 11 AM in the morning. I install clang, cmake and make from the Sam Bingner's repository, fired up ssh, downloaded the source code and ran the build command.`clang
+
+
Fail No. 1
+
+
I couldn't even get cmake to run, I did a little digging around StackOverflow and founf that I needed the iOS SDK, sure no problem. I waited for Xcode to update and transferred the SDKs to my iPad
Them I told cmake that this is the location for my SDK 😠. Successful! Now I just needed to use make.
+
+
Fail No. 2
+
+
It was giving the error that thread-local-storage was not supported on this device.
+
+
[ 0%] Building CXX object src/CMakeFiles/openbabel.dir/alias.cpp.o
+[ 1%] Building CXX object src/CMakeFiles/openbabel.dir/atom.cpp.o
+In file included from /var/root/obabel/ob-src/src/atom.cpp:28:
+In file included from /var/root/obabel/ob-src/include/openbabel/ring.h:29:
+/var/root/obabel/ob-src/include/openbabel/typer.h:70:1: error: thread-local storage is not supported for the current target
+THREAD_LOCAL OB_EXTERN OBAtomTyper atomtyper;
+^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+In file included from /var/root/obabel/ob-src/src/atom.cpp:28:
+In file included from /var/root/obabel/ob-src/include/openbabel/ring.h:29:
+/var/root/obabel/ob-src/include/openbabel/typer.h:84:1: error: thread-local storage is not supported for the current target
+THREAD_LOCAL OB_EXTERN OBAromaticTyper aromtyper;
+^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+/var/root/obabel/ob-src/src/atom.cpp:107:10: error: thread-local storage is not supported for the current target
+ extern THREAD_LOCAL OBAromaticTyper aromtyper;
+ ^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+/var/root/obabel/ob-src/src/atom.cpp:108:10: error: thread-local storage is not supported for the current target
+ extern THREAD_LOCAL OBAtomTyper atomtyper;
+ ^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+/var/root/obabel/ob-src/src/atom.cpp:109:10: error: thread-local storage is not supported for the current target
+ extern THREAD_LOCAL OBPhModel phmodel;
+ ^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+5 errors generated.
+make[2]: *** [src/CMakeFiles/openbabel.dir/build.make:76: src/CMakeFiles/openbabel.dir/atom.cpp.o] Error 1
+make[1]: *** [CMakeFiles/Makefile2:1085: src/CMakeFiles/openbabel.dir/all] Error 2
+make: *** [Makefile:129: all] Error 2
+
+
+
Strange but it is alright, there is nothing that hasn't been answered on the internet.
+
+
I did a little digging around and could not find a solution 😔
+
+
As a temporary fix, I disabled multithreading by going and commenting the lines in the source code.
+
+
+
+
Packaging as a deb
+
+
This was pretty straight forward, I tried installing it on my iPad and it was working pretty smoothly.
+
+
Moment of Truth
+
+
So I airdropped the .deb to my phone and tried installing it, the installation was successful but when I tried obabel it just aborted.
+
+
+
+
Turns out because I had created an install target of a separate folder while compiling, the binaries were referencing a non-existing dylib rather than those in the /usr/lib folder. As a quick workaround I transferred the deb folder to my laptop and used otool and install_name tool: install_name_tool -change /var/root/obabel/ob-build/lib/libopenbabel.7.dylib /usr/lib/libopenbabel.7.dylib for all the executables and then signed them using jtool
+
+
I then installed it and everything went smoothly, I even ran obabel and it executed perfectly, showing the version number 3.1.0 ✌️ Ahh, smooth victory.
+
+
Nope. When I tried converting from SMILES to pdbqt, it gave an error saying plugin not found. This was weird.
+
+
+
+
So I just copied the entire build folder from my iPad to my phone and tried running it. Oops, Apple Sandbox Error, Oh no!
+
+
I spent 2 hours around this problem, only to see the documentation and realise I hadn't setup the environment variable 🤦♂️
This was the tragedy of trying to compile something without knowing enough about compiling. It is 11:30 as of writing this. Something as trivial as this should not have taken me so long. Am I going to try to compile AutoDock Vina next? 🤔 Maybe.
+
+
Also, if you want to try Open Babel on you jailbroken iDevice, install the package from my repository ( You, need to run the above mentioned final fix :p ). This was tested on iOS 13.5, I cannot tell if it will work on others or not.
+
+
Hopefully, I add some more screenshots to this post.
+
+
Edit 1: Added Screenshots, had to replicate the errors.
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
+
+
+ Introduction to AR.js and Natural Feature Tracking
+
+
+ An introduction to AR.js and NFT
+
+ https://web.navan.dev/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
+ Sat, 01 Aug 2020 15:43:00 -0000
+ Introduction to AR.js and Natural Feature Tracking
+
+
AR.js
+
+
AR.js is a lightweight library for Augmented Reality on the Web, coming with features like Image Tracking, Location based AR and Marker tracking. It is the easiest option for cross-browser augmented reality.
+
+
The same code works for iOS, Android, Desktops and even VR Browsers!
+
+
It was initially created by Jerome Etienne and is now maintained by Nicolo Carpignoli and the AR-js Organisation
+
+
NFT
+
+
Usually for augmented reality you need specialised markers, like this Hiro marker (notice the thick non-aesthetic borders 🤢)
+
+
+
+
This is called marker based tracking where the code knows what to look for. NFT or Natural Feature Tracing converts normal images into markers by extracting 'features' from it, this way you can use any image of your liking!
+
+
I'll be using my GitHub profile picture
+
+
+
+
Creating the Marker!
+
+
First we need to create the marker files required by AR.js for NFT. For this we use Carnaux's repository 'NFT-Marker-Creator'.
Now we have the required files in the output folder
+
+
$ ls output
+
+me.fset me.fset3 me.iset
+
+
+
Creating the HTML Page
+
+
Create a new file called index.html in your project folder. This is the basic template we are going to use. Replace me with the root filename of your image, for example NeverGonnaGiveYouUp.png will become NeverGonnaGiveYouUp. Make sure you have copied all three files from the output folder in the previous step to the root of your project folder.
In this we are creating a AFrame scene and we are telling it that we want to use NFT Tracking. The amazing part about using AFrame is that we are able to use all AFrame objects!
Bonus Idea: Integrate it with GitHub's new profile Readme Feature!
+
+
1) Host the code using GitHub Pages
+
+
2) Create a new repository ( the name should be your GitHub username )
+
+
3) Add QR Code to the page and tell the users to scan your profile picture
+
+
??) Profit 💸
+
+
Here is a screenshot of me scanning a rounded version of my profile picture ( It still works! Even though the image is cropped and I haven't changed any line of code )
+
+
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-03-03-Playing-With-Android-TV.html
+
+
+ Tinkering with an Android TV
+
+
+ Tinkering with an Android TV
+
+ https://web.navan.dev/posts/2020-03-03-Playing-With-Android-TV.html
+ Tue, 03 Mar 2020 18:37:00 -0000
+ Tinkering with an Android TV
+
+
So I have an Android TV, this posts covers everything I have tried on it
The other option is to go to your router's server page and get connected devices
+
+
Developer-Settings
+
+
+
Go To Settings
+
About
+
Continously click on the "Build" option until it says "You are a Developer"
+
+
+
Enable-ADB
+
+
+
Go to Settings
+
Go to Developer Options
+
Scroll untill you find ADB Debugging and enable that option
+
+
+
Connect-ADB
+
+
+
Open Terminal (Make sure you have ADB installed)
+
Enter the following command adb connect <IP_ADDRESS>
+
To test the connection run adb logcat
+
+
+
Manipulating Apps / Packages
+
+
Listing Packages
+
+
+
adb shell
+
pm list packages
+
+
+
Installing Packages
+
+
+
adb install -r package.apk
+
+
+
Uninstalling Packages
+
+
+
adb uninstall com.company.yourpackagename
+
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
+
+
+ Polynomial Regression Using TensorFlow
+
+
+ Polynomial regression using TensorFlow
+
+ https://web.navan.dev/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
+ Mon, 16 Dec 2019 14:16:00 -0000
+ Polynomial Regression Using TensorFlow
+
+
In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.
+
+
In this, we will be performing polynomial regression using 5 types of equations -
+
+
+
Linear
+
Quadratic
+
Cubic
+
Quartic
+
Quintic
+
+
+
Regression
+
+
What is Regression?
+
+
Regression is a statistical measurement that is used to try to determine the relationship between a
+dependent variable (often denoted by Y), and series of varying variables (called independent variables, often denoted by X ).
+
+
What is Polynomial Regression
+
+
This is a form of Regression Analysis where the relationship between Y and X is denoted as the nth degree/power of X.
+Polynomial regression even fits a non-linear relationship (e.g when the points don't form a straight line).
n=len(abscissa)# no of observations
+plt.scatter(abscissa,ordinate)
+plt.ylabel('Salary')
+plt.xlabel('Position')
+plt.title("Salary vs Position")
+plt.show()
+
For each type of equation first we make the model predict the values of the coefficient(s) and constant, once we get these values we use it to predict the Y
+values using the X values. We then plot it to compare the actual data and predicted line.
You just learnt Polynomial Regression using TensorFlow!
+
+
Notes
+
+
Overfitting
+
+
+
+
Overfitting refers to a model that models the training data too well.
+ Overfitting happens when a model learns the detail and noise in the training data to the extent that it negatively impacts the performance of the model on new data. This means that the noise or random fluctuations in the training data is picked up and learned as concepts by the model. The problem is that these concepts do not apply to new data and negatively impact the models ability to generalise.
+
+
+
+
+
Source: Machine Learning Mastery
+
+
+
Basically if you train your machine learning model on a small dataset for a really large number of epochs, the model will learn all the deformities/noise in the data and will actually think that it is a normal part. Therefore when it will see some new data, it will discard that new data as noise and will impact the accuracy of the model in a negative manner
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2019-12-04-Google-Teachable-Machines.html
+
+
+ Image Classifier With Teachable Machines
+
+
+ Tutorial on creating a custom image classifier quickly with Google Teachable Machines
+
+ https://web.navan.dev/posts/2019-12-04-Google-Teachable-Machines.html
+ Wed, 04 Dec 2019 18:23:00 -0000
+ Image Classifier With Teachable Machines
+
+
Made for Google Code-In
+
+
Task Description
+
+
Using Glitch and the Teachable Machines, build a Book Detector with Tensorflow.js. When a book is recognized, the code would randomly suggest a book/tell a famous quote from a book. Here is an example Project to get you started: https://glitch.com/~voltaic-acorn
+
+
Details
+
+
1) Collecting Data
+
+
Teachable Machine allows you to create your dataset just by using your webcam! I created a database consisting of three classes ( Three Books ) and approximately grabbed 100 pictures for each book/class
+
+
+
+
2) Training
+
+
Training on teachable machines is as simple as clicking the train button. I did not even have to modify any configurations.
+
+
+
+
3) Finding Labels
+
+
Because I originally entered the entire name of the book and it's author's name as the label, the class name got truncated (Note to self, use shorter class names :p ). I then modified the code to print the modified label names in an alert box.
+
+
+
+
+
+
4) Adding a suggestions function
+
+
I first added a text field on the main page and then modified the JavaScript file to suggest a similar book whenever the model predicted with an accuracy >= 98%
+
+
+
+
+
+
5) Running!
+
+
Here it is running!
+
+
+
+
+
+
Remix this project:-
+
+
https://luminous-opinion.glitch.me
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
+
+
+ Creating your own custom theme for Snowboard or Anemone
+
+
+ Tutorial on creating your own custom theme for Snowboard or Anemone
+
+ https://web.navan.dev/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
+ Sun, 05 May 2019 12:34:00 -0000
+ Creating your own custom theme for Snowboard or Anemone
+
+
Contents
+
+
+
Getting Started
+
Theme Configuration
+
Creating Icons
+
Exporting Icons
+
Icon Masks
+
Packaging
+
Building the DEB
+
+
+
Getting Started
+
+
Note: Without the proper folder structure, your theme may not show up!
+
+
+
Create a new folder called themeName.theme (Replace themeName with your desired theme name)
+
Within themeName.theme folder, create another folder called IconBundles (You cannot change this name)
+
+
+
Theme Configuration
+
+
+
Now, inside the themeName.theme folder, create a file called Info.plist and paste the following
Replace PackageName with the name of the Package and replace ThemeName with the Theme Name
+
+
+
Now, you might ask what is the difference between PackageName and ThemeName?
+
+
Well, if for example you want to publish two variants of your icons, one dark and one white but you do not want the user to seperately install them.
+Then, you would name the package MyTheme and include two themes Blackie and White thus creating two entries. More about this in the end
+
+
Creating Icons
+
+
+
Open up the Image Editor of your choice and create a new file having a resolution of 512x512
+
+
+
Note: Due to IconBundles, we just need to create the icons in one size and they get resized automatically :ghost:
+
+
Want to create rounded icons?
+Create them squared only, we will learn how to apply masks!
+
+
Exporting Icons
+
+
Note: All icons must be saved as *.png (Tip: This means you can even create partially transparent icons!)
+
+
+
All Icons must be saved in themeName.theme>IconBundles as bundleID-large.png
In your Info.plist file add the following value between <dict> and
+
+
<key>IB-MaskIcons</key>
+ <true/>
+
+
+
+
Custom Icon Masks
+
+
+
NOTE: This is an optional step, if you do not want Icon Masks, skip this step
+
+
+
Inside your themeName.theme folder, create another folder called 'Bundles'
+
+
Inside Bundles create another folder called com.apple.mobileicons.framework
+
+
+
+
Designing Masks
+
+
Masking does not support IconBundles, therefore you need to save the masks for each of the following
+
+
+
+
+
File
+
Resolution
+
+
+
+
+
AppIconMask@2x~ipad.png
+
152x512
+
+
+
AppIconMask@2x~iphone.png
+
120x120
+
+
+
AppIconMask@3x~ipad.png
+
180x180
+
+
+
AppIconMask@3x~iphone.png
+
180x180
+
+
+
AppIconMask~ipad.png
+
76x76
+
+
+
DocumentBadgeMask-20@2x.png
+
40x40
+
+
+
DocumentBadgeMask-145@2x.png
+
145x145
+
+
+
GameAppIconMask@2x.png
+
84x84
+
+
+
NotificationAppIconMask@2x.png
+
40x40
+
+
+
NotificationAppIconMask@3x.png
+
60x60
+
+
+
SpotlightAppIconMask@2x.png
+
80x80
+
+
+
SpotlightAppIconMask@3x.png
+
120x120
+
+
+
TableIconMask@2x.png
+
58x58
+
+
+
TableIconOutline@2x.png
+
58x58
+
+
+
+
+
+
While creating the mask, make sure that the background is not a solid colour and is transparent
+
Whichever area you want to make visible, it should be coloured in black
+
+
+
Example (Credits: Pinpal):
+
+
+
+
would result in
+
+
+
+
Packaging
+
+
+
Create a new folder outside themeName.theme with the name you want to be shown on Cydia, e.g themeNameForCydia
+
Create another folder called DEBIAN in themeNameForCydia (It needs to be uppercase)
+
In DEBIAN create an extension-less file called control and edit it using your favourite text editor
+
+
+
Paste the following in it, replacing yourname, themename, Theme Name, A theme with beautiful icons! and Your Name with your details:
+
+
Package: com.yourname.themename
+Name: Theme Name
+Version: 1.0
+Architecture: iphoneos-arm
+Description: A theme with beautiful icons!
+Author: Your Name
+Maintainer: Your Name
+Section: Themes
+
+
+
+
Important Notes:
+
+
+
The package field MUST be lower case!
+
The version field MUST be changed every-time you update your theme!
+
The control file MUST have an extra blank line at the bottom!
+
+
Now, Create another folder called Library in themeNameForCydia
+
In Library create another folder called Themes
+
Finally, copy themeName.theme to the Themes folder (Copy the entire folder, not just the contents)
+
+
+
Building the DEB
+
+
For building the deb you need a *nix system, otherwise you can build it using your iPhones
+
+
Pre-Requisite for MacOS users
+
+
1) Install Homenbrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" (Run this in the terminal)
+2) Install dpkg, by running brew install dpkg
+
+
There is a terrible thing called .DS_Store which if not removed, will cause a problem during either build or installation
+
+
+
To remove this we first need to open the folder in the terminal
+
Launch the Terminal and then drag-and-drop the 'themeNameForCydia' folder on the Terminal icon in the dock
+
Now, run find . -name "*.DS_Store" -type f -delete
+
+
+
Pre-Requisite for Windows Users
+
+
+
SSH into your iPhone and drag and drop the themeNameForCyia folder on the terminal
+
+
+
Common Instructions
+
+
+
You should be at the root of the folder in the terminal, i.e Inside themeNameForCydia
+
running ls should show the following output
+
+
+
DEBIAN Library
+
+
+
+
Now, in the terminal enter the following cd .. && dpkg -b themeNameForCydia
+
+
+
Now you will have the themeNameForCydia.deb in the same directory
+
+
You can share this with your friends :+1:
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
+
+
+ Fixing X11 Error on macOS Catalina for AmberTools 18/19
+
+
+ Fixing Could not find the X11 libraries; you may need to edit config.h, AmberTools macOS Catalina
+
+ https://web.navan.dev/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
+ Mon, 13 Apr 2020 11:41:00 -0000
+ Fixing X11 Error on macOS Catalina for AmberTools 18/19
+
+
I was trying to install AmberTools on my macOS Catalina Installation. Running ./configure -macAccelerate clang gave me an error that it could not find X11 libraries, even though locate libXt showed that my installation was correct.
+
+
Error:
+
+
Could not find the X11 libraries; you may need to edit config.h
+ to set the XHOME and XLIBS variables.
+Error: The X11 libraries are not in the usual location !
+ To search for them try the command: locate libXt
+ On new Fedora OS's install the libXt-devel libXext-devel
+ libX11-devel libICE-devel libSM-devel packages.
+ On old Fedora OS's install the xorg-x11-devel package.
+ On RedHat OS's install the XFree86-devel package.
+ On Ubuntu OS's install the xorg-dev and xserver-xorg packages.
+
+ ...more info for various linuxes at ambermd.org/ubuntu.html
+
+ To build Amber without XLEaP, re-run configure with '-noX11:
+ ./configure -noX11 --with-python /usr/local/bin/python3 -macAccelerate clang
+Configure failed due to the errors above!
+
+
+
I searched on Google for a solution. Sadly, there was not even a single thread which had a solution about this error.
+
+
The Fix
+
+
Simply reinstalling XQuartz using homebrew fixed the error brew cask reinstall xquartz
+
+
If you do not have XQuartz installed, you need to run brew cask install xquartz
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2019-12-10-TensorFlow-Model-Prediction.html
+
+
+ Making Predictions using Image Classifier (TensorFlow)
+
+
+ Making predictions for image classification models built using TensorFlow
+
+ https://web.navan.dev/posts/2019-12-10-TensorFlow-Model-Prediction.html
+ Tue, 10 Dec 2019 11:10:00 -0000
+ Making Predictions using Image Classifier (TensorFlow)
+
+
This was tested on TF 2.x and works as of 2019-12-10
+
+
If you want to understand how to make your own custom image classifier, please refer to my previous post.
+
+
If you followed my last post, then you created a model which took an image of dimensions 50x50 as an input.
+
+
First we import the following if we have not imported these before
+
+
importcv2
+importos
+
+
+
Then we read the file using OpenCV.
+
+
image=cv2.imread(imagePath)
+
+
+
The cv2. imread() function returns a NumPy array representing the image. Therefore, we need to convert it before we can use it.
+
+
image_from_array=Image.fromarray(image,'RGB')
+
+
+
Then we resize the image
+
+
size_image=image_from_array.resize((50,50))
+
+
+
After this we create a batch consisting of only one image
+
+
p=np.expand_dims(size_image,0)
+
+
+
We then convert this uint8 datatype to a float32 datatype
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-07-01-Install-rdkit-colab.html
+
+
+ Installing RDKit on Google Colab
+
+
+ Install RDKit on Google Colab with one code snippet.
+
+ https://web.navan.dev/posts/2020-07-01-Install-rdkit-colab.html
+ Wed, 01 Jul 2020 14:23:00 -0000
+ Installing RDKit on Google Colab
+
+
RDKit is one of the most integral part of any Cheminfomatic specialist's toolkit but it is notoriously difficult to install unless you already have conda installed. I originally found this in a GitHub Gist but I have not been able to find that gist again :/
+
+
Just copy and paste this in a Colab cell and it will install it 👍
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html
+
+
+ Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+
+
+ Short code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS.
+
+ https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html
+ Tue, 17 Nov 2020 15:04:00 -0000
+ Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+
+
I have a Raspberry-Pi running a Flask app through Gunicorn (Ubuntu 20.04 LTS). I am exposing it to the internet using DuckDNS.
After you accept that you are okay with you IP address being logged, it will prompt you with updating your dns record. You need to create a new TXT record in the DNS settings for your domain.
+
+
For DuckDNS users it is as simple as entering this URL in their browser:
Where mydomain is your DuckDNS domain, duckdnstoken is your DuckDNS Token ( Found on the dashboard when you login) and certbotdnstxt is the TXT record value given by the prompt.
+
+
You can check if the TXT records have been updated by using the dig command:
DuckDNS almost instantly propagates the changes but for other domain hosts, it could take a while.
+
+
Once you can ensure that the TXT record changes has been successfully applied and is visible through the dig command, press enter on the Certbot prompt and your certificate should be generated.
+
+
Renewing
+
+
As we manually generated the certificate certbot renew will fail, to renew the certificate you need to simply re-generate the certificate using the above steps.
To use the certificate with it, simply copy the cert.pem and privkey.pem to your working directory ( change the appropriate permissions ) and include them in the command
Caveats with copying the certificate: If you renew the certificate you will have to re-copy the files
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html
+
+
+ Building a Fake News Detector with Turicreate
+
+
+ In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app
+
+ https://web.navan.dev/posts/2019-12-22-Fake-News-Detector.html
+ Sun, 22 Dec 2019 11:10:00 -0000
+ Building a Fake News Detector with Turicreate
+
+
In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app
+
+
Note: These commands are written as if you are running a jupyter notebook.
+
+
Building the Machine Learning Model
+
+
Data Gathering
+
+
To build a classifier, you need a lot of data. George McIntire (GH: @joolsa) has created a wonderful dataset containing the headline, body and whether it is fake or real.
+Whenever you are looking for a dataset, always try searching on Kaggle and GitHub before you start building your own
+
+
Dependencies
+
+
I used a Google Colab instance for training my model. If you also plan on using Google Colab then I recommend choosing a GPU Instance (It is Free)
+This allows you to train the model on the GPU. Turicreate is built on top of Apache's MXNet Framework, for us to use GPU we need to install
+a CUDA compatible MXNet package.
est_predictions=model.predict(test)
+accuracy=tc.evaluation.accuracy(test['label'],test_predictions)
+print(f'Topic classifier model has a testing accuracy of {accuracy*100}% ',flush=True)
+
We have just created our own Fake News Detection Model which has an accuracy of 92%!
+
+
example_text={"title":["Middling ‘Rise Of Skywalker’ Review Leaves Fan On Fence About Whether To Threaten To Kill Critic"],"text":["Expressing ambivalence toward the relatively balanced appraisal of the film, Star Wars fan Miles Ariely admitted Thursday that an online publication’s middling review of The Rise Of Skywalker had left him on the fence about whether he would still threaten to kill the critic who wrote it. “I’m really of two minds about this, because on the one hand, he said the new movie fails to live up to the original trilogy, which makes me at least want to throw a brick through his window with a note telling him to watch his back,” said Ariely, confirming he had already drafted an eight-page-long death threat to Stan Corimer of the website Screen-On Time, but had not yet decided whether to post it to the reviewer’s Facebook page. “On the other hand, though, he commended J.J. Abrams’ skillful pacing and faithfulness to George Lucas’ vision, which makes me wonder if I should just call the whole thing off. Now, I really don’t feel like camping outside his house for hours. Maybe I could go with a response that’s somewhere in between, like, threatening to kill his dog but not everyone in his whole family? I don’t know. This is a tough one.” At press time, sources reported that Ariely had resolved to wear his Ewok costume while he murdered the critic in his sleep."]}
+example_prediction=model.classify(tc.SFrame(example_text))
+print(example_prediction,flush=True)
+
First we create a single view app (make sure you check the use SwiftUI button)
+
+
Then we copy our .mlmodel file to our project (Just drag and drop the file in the XCode Files Sidebar)
+
+
Our ML Model does not take a string directly as an input, rather it takes bag of words as an input.
+DescriptionThe bag-of-words model is a simplifying representation used in NLP, in this text is represented as a bag of words, without any regard for grammar or order, but noting multiplicity
Finally, we implement a simple function which reads the two text fields, creates their bag of words representation and displays an alert with the appropriate result
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-12-1-HTML-JS-RSS-Feed.html
+
+
+ RSS Feed written in HTML + JavaScript
+
+
+ Short code-snippet for an RSS feed, written in HTML and JavaScript
+
+ https://web.navan.dev/posts/2020-12-1-HTML-JS-RSS-Feed.html
+ Tue, 01 Dec 2020 20:52:00 -0000
+ RSS Feed written in HTML + JavaScript
+
+
If you want to directly open the HTML file in your browser after saving, don't forget to set CORS_PROXY=""
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html
+
+
+ How to setup Bluetooth on a Raspberry Pi
+
+
+ Connecting to Bluetooth Devices using terminal, tested on Raspberry Pi Zero W
+
+ https://web.navan.dev/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html
+ Sun, 19 Jan 2020 15:27:00 -0000
+ How to setup Bluetooth on a Raspberry Pi
+
+
This was tested on a Raspberry Pi Zero W
+
+
Enter in the Bluetooth Mode
+
+
pi@raspberrypi:~ $ bluetoothctl
+
+
[bluetooth]# agent on
+
+
[bluetooth]# default-agent
+
+
[bluetooth]# scan on
+
+
To Pair
+
+
While being in bluetooth mode
+
+
[bluetooth]# pair XX:XX:XX:XX:XX:XX
+
+
To Exit out of bluetoothctl anytime, just type exit
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-01-14-Converting-between-PIL-NumPy.html
+
+
+ Converting between image and NumPy array
+
+
+ Short code snippet for converting between PIL image and NumPy arrays.
+
+ https://web.navan.dev/posts/2020-01-14-Converting-between-PIL-NumPy.html
+ Tue, 14 Jan 2020 00:10:00 -0000
+ Converting between image and NumPy array
+
+
importnumpy
+importPIL
+
+# Convert PIL Image to NumPy array
+img=PIL.Image.open("foo.jpg")
+arr=numpy.array(img)
+
+# Convert array to Image
+img=PIL.Image.fromarray(arr)
+
makedepend is a Unix tool used to generate dependencies of C source files. Most modern programs do not use this anymore, but then again AutoDock Vina's source code hasn't been changed since 2011. The first hurdle came when I saw that there was no makedepend command, neither was there any package on any development repository for iOS. So, I tracked down the original source code for makedepend (https://github.com/DerellLicht/makedepend). According to the repository this is actually the source code for the makedepend utility that came with some XWindows distribution back around Y2K. I am pretty sure there is a problem with my current compiler configuration because I had to manually edit the Makefile to provide the path to the iOS SDKs using the -isysroot flag.
+
+
Editing the Makefile
+
+
Original Makefile ( I used the provided mac Makefile base )
Of course since Boost 1.41 many things have been added and deprecated, that is why I had to edit the source code to make it work with version 1.68
+
+
Error 1 - No Matching Constructor
+
+
../../../src/main/main.cpp:50:9: error: no matching constructor for initialization of 'path' (aka 'boost::filesystem::path')
+return path(str, boost::filesystem::native);
+
+
+
This was an easy fix, I just commented this and added a return statement to return the path
+
+
return path(str)
+
+
+
Error 2 - No Member Named 'nativefilestring'
+
+
../../../src/main/main.cpp:665:57: error: no member named 'native_file_string' in 'boost::filesystem::path'
+ std::cerr << "\n\nError: could not open \"" << e.name.native_file_string() << "\" for " << (e.in ? "reading" : "writing") << ".\n";
+ ~~~~~~ ^
+../../../src/main/main.cpp:677:80: error: no member named 'native_file_string' in 'boost::filesystem::path'
+ std::cerr << "\n\nParse error on line " << e.line << " in file \"" << e.file.native_file_string() << "\": " << e.reason << '\n';
+ ~~~~~~ ^
+2 errors generated.
+
+
+
Turns out native_file_string was deprecated in Boost 1.57 and replaced with just string
+
+
Error 3 - Library Not Found
+
+
This one still boggles me because there was no reason for it to not work, as a workaround I downloaded the DEB, extracted it and used that path for compiling.
+
+
Error 4 - No Member Named 'nativefilestring' Again.
+
+
But, this time in another file and I quickly fixed it
+
+
Moment of Truth
+
+
Obviously it was working on my iPad, but would it work on another device? I transferred the compiled binary and
+
+
+
+
The package is available on my repository and only depends on boost. ( Both, Vina and Vina-Split are part of the package)
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
+
+
+ Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
+
+
+ Tutorial on creating a custom Image Classifier using Turicreate and a dataset from Kaggle
+
+ https://web.navan.dev/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
+ Thu, 16 Jan 2020 10:36:00 -0000
+ Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
+
+
For setting up Kaggle with Google Colab, please refer to my previous post
importturicreateastc
+
+# Load the data
+data=tc.SFrame('fire-smoke.sframe')
+
+# Make a train-test split
+train_data,test_data=data.random_split(0.8)
+
+# Create the model
+model=tc.image_classifier.create(train_data,target='label')
+
+# Save predictions to an SArray
+predictions=model.predict(test_data)
+
+# Evaluate the model and print the results
+metrics=model.evaluate(test_data)
+print(metrics['accuracy'])
+
+# Save the model for later use in Turi Create
+model.save('fire-smoke.model')
+
+# Export for use in Core ML
+model.export_coreml('fire-smoke.mlmodel')
+
We just got an accuracy of 94% on Training Data and 97% on Validation Data!
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
+
+
+ Trying Different Camera Setups
+
+
+ Comparison of different cameras setups for using as a webcam and tutorials for the same.
+
+ https://web.navan.dev/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
+ Sun, 11 Oct 2020 16:12:00 -0000
+ Trying Different Camera Setups
+
+
+
Animated Overlays
+
Using a modern camera as your webcam
+
Using your phone's camera as your webcam
+
Using a USB Camera
+
+
+
Comparison
+
+
Here are the results before you begin reading.
+
+
+
+
+
+
+
+
+
+
Prerequisites
+
+
I am running macOS and iOS but I will try to link the same steps for Windows as well. If you are running Arch, I assume you already know what you are doing and are using this post as an inspiration and not a how-to guide.
Windows users can install the latest version of the plugin from OBS-Forums
+
+
0. Animated Overlays
+
+
I have always liked PewDiePie's animated border he uses in his videos
+
+
+
+
The border was apparently made by a YouTuber Sleepy Tanooki. He posted a link to a Google Drive folder containing the video file. (I will be using the video overlay for the example)
+
+
It is pretty simple to use overlays in OBS:
+
+
First, Create a new scene by clicking on the plus button on the bottom right corner.
+
+
+
+
Now, in the Sources section click on the add button -> Video Capture Device -> Create New -> Choose your webcam from the Device section.
+
+
You may, resize if you want
+
+
After this, again click on the add button, but this time choose the Media Source option
+
+
+
+
and, locate and choose the downloaded overlay.
+
+
1. Using a Modern Camera (Without using a Capture Card)
+
+
I have a Sony mirrorless camera. Using Sony's Imaging Edge Desktop, you can use your laptop as a remote viewfinder and capture or record media.
+
+
After installing Image Edge Desktop or your Camera's equivalent, open the Remote application.
+
+
+
+
Once you are able to see the output of the camera on the application, switch to OBS. Create a new scene, and this time choose Window Capture in the Sources menu. After you have chosen the appropriate window, you may transform/crop the output using the properties/filters options.
+
+
2.1 Using your iPhone using Quicktime
+
+
Connect your iPhone via a USB cable, then Open Quicktime -> File -> New Movie Recording
+
+
In the Sources choose your device (No need to press record). You may open the camera app now.
+
+
+
+
Now, in OBS create a new scene, and in the sources choose the Window Capture option. You will need to rotate the source:
+
+
+
+
2.2 Using your iPhone using an application like Camo
+
+
Install the Camo app on your phone through the app store -> connect to Mac using USB cable, install the companion app and you are done.
+
+
I tried both my current iPhone and an old iPhone 5S
+
+
3. A USB Webcam
+
+
The simplest solution, is to use a USB webcam. I used an old Logitech C310 that was collecting dust. I was surprised to find that Logitech is still selling it after years and proudly advertising it! (5MP)
+
+
It did not sit well on my laptop, so I placed it on my definitely-not-Joby Gorrila Pod i had bought on Amazon for ~₹500
+
+
+
+
+
+
+
+
+]]>
+
+
+
+
+ https://web.navan.dev/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL.html
+
+
+ Workflow for Lightning Fast Molecular Docking Part One
+
+
+ This is my workflow for lightning fast molecular docking.
+
+ https://web.navan.dev/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL.html
+ Mon, 01 Jun 2020 13:10:00 -0000
+ Workflow for Lightning Fast Molecular Docking Part One
+
+
To run this command you simple copy the SMILES structure of the ligand you want an it automatically takes it from your clipboard, generates the 3D structure in the AutoDock PDBQT format using Open Babel and then docks it with your receptor using AutoDock Vina, all with just one command.
pbpaste and pbcopy are macOS commands for pasting and copying from and to the clipboard. Linux users may install the xclip and xsel packages from their respective package managers and then insert these aliases into their bash_profile, zshrc e.t.c
+
+
alias pbcopy='xclip -selection clipboard'
+alias pbpaste='xclip -selection clipboard -o'
+
+
+
$(pbpaste)
+
+
+
This is used in bash to evaluate the results of a command. In this scenario we are using it to get the contents of the clipboard.
+
+
The rest of the command is a normal Open Babel command to generate a 3D structure in PDBQT format and then save it as test.pdbqt
+
+
&&
+
+
+
This tells the terminal to only run the next part if the previous command runs successfully without any errors.
This is just the docking command for AutoDock Vina. In the next part I will tell how to use PyMOL and a plugin to directly generate the coordinates in Vina format --center_x -9.7 --center_y 11.4 --center_z 68.9 --size_x 19.3 --size_y 29.9 --size_z 21.3 without needing to type them manually.
+]]>
+
+
+
+
+ https://web.navan.dev/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Response.html
+
+
+ Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
+
+
+ This paper is about Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response.
+
+ https://web.navan.dev/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Response.html
+ Tue, 14 May 2019 02:42:00 -0000
+ Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
+
+
+
Based on the project showcased at Toyota Hackathon, IITD - 17/18th December 2018
+
+
+
Edit: It seems like I haven't mentioned Adrian Rosebrock of PyImageSearch anywhere. I apologize for this mistake.
Chauhan, N. (2019). "Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response." <i>International Research Journal of Engineering and Technology (IRJET), 6(5)</i>.
+
+
+
BibTeX
+
+
@article{chauhan_2019, title={Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response}, volume={6}, url={https://www.irjet.net/archives/V6/i5/IRJET-V6I5318.pdf}, number={5}, journal={International Research Journal of Engineering and Technology (IRJET)}, author={Chauhan, Navan}, year={2019}}
+
+]]>
+
+
+
+
+ https://web.navan.dev/publications/2020-03-14-generating-vaporwave.html
+
+
+ Is it possible to programmatically generate Vaporwave?
+
+
+ This paper is about programmaticaly generating Vaporwave.
+
+ https://web.navan.dev/publications/2020-03-14-generating-vaporwave.html
+ Sat, 14 Mar 2020 22:23:00 -0000
+ Is it possible to programmatically generate Vaporwave?
+
+
Chauhan, N. (2020, March 15). Is it possible to programmatically generate Vaporwave?. https://doi.org/10.35543/osf.io/9um2r
+
+
+
MLA
+
+
Chauhan, Navan. “Is It Possible to Programmatically Generate Vaporwave?.” IndiaRxiv, 15 Mar. 2020. Web.
+
+
+
Chicago
+
+
Chauhan, Navan. 2020. “Is It Possible to Programmatically Generate Vaporwave?.” IndiaRxiv. March 15. doi:10.35543/osf.io/9um2r.
+
+
+
Bibtex
+
+
@misc{chauhan_2020,
+ title={Is it possible to programmatically generate Vaporwave?},
+ url={indiarxiv.org/9um2r},
+ DOI={10.35543/osf.io/9um2r},
+ publisher={IndiaRxiv},
+ author={Chauhan, Navan},
+ year={2020},
+ month={Mar}
+}
+
+]]>
+
+
+
+
+ https://web.navan.dev/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html
+
+
+ Possible Drug Candidates for COVID-19
+
+
+ COVID-19, has been officially labeled as a pandemic by the World Health Organisation. This paper presents cloperastine and vigabatrin as two possible drug candidates for combatting the disease along with the process by which they were discovered.
+
+ https://web.navan.dev/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html
+ Tue, 17 Mar 2020 17:40:00 -0000
+ Possible Drug Candidates for COVID-19
+
+
COVID-19, has been officially labeled as a pandemic by the World Health Organisation. This paper presents cloperastine and vigabatrin as two possible drug candidates for combatting the disease along with the process by which they were discovered.
In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app
Replace PackageName with the name of the Package and replace ThemeName with the Theme Name
+
+
+
Now, you might ask what is the difference between PackageName and ThemeName?
+
+
Well, if for example you want to publish two variants of your icons, one dark and one white but you do not want the user to seperately install them.
+Then, you would name the package MyTheme and include two themes Blackie and White thus creating two entries. More about this in the end
+
+
Creating Icons
+
+
+
Open up the Image Editor of your choice and create a new file having a resolution of 512x512
+
+
+
Note: Due to IconBundles, we just need to create the icons in one size and they get resized automatically :ghost:
+
+
Want to create rounded icons?
+Create them squared only, we will learn how to apply masks!
+
+
Exporting Icons
+
+
Note: All icons must be saved as *.png (Tip: This means you can even create partially transparent icons!)
+
+
+
All Icons must be saved in themeName.theme>IconBundles as bundleID-large.png
In your Info.plist file add the following value between <dict> and
+
+
<key>IB-MaskIcons</key>
+ <true/>
+
+
+
+
Custom Icon Masks
+
+
+
NOTE: This is an optional step, if you do not want Icon Masks, skip this step
+
+
+
Inside your themeName.theme folder, create another folder called 'Bundles'
+
+
Inside Bundles create another folder called com.apple.mobileicons.framework
+
+
+
+
Designing Masks
+
+
Masking does not support IconBundles, therefore you need to save the masks for each of the following
+
+
+
+
+
File
+
Resolution
+
+
+
+
+
AppIconMask@2x~ipad.png
+
152x512
+
+
+
AppIconMask@2x~iphone.png
+
120x120
+
+
+
AppIconMask@3x~ipad.png
+
180x180
+
+
+
AppIconMask@3x~iphone.png
+
180x180
+
+
+
AppIconMask~ipad.png
+
76x76
+
+
+
DocumentBadgeMask-20@2x.png
+
40x40
+
+
+
DocumentBadgeMask-145@2x.png
+
145x145
+
+
+
GameAppIconMask@2x.png
+
84x84
+
+
+
NotificationAppIconMask@2x.png
+
40x40
+
+
+
NotificationAppIconMask@3x.png
+
60x60
+
+
+
SpotlightAppIconMask@2x.png
+
80x80
+
+
+
SpotlightAppIconMask@3x.png
+
120x120
+
+
+
TableIconMask@2x.png
+
58x58
+
+
+
TableIconOutline@2x.png
+
58x58
+
+
+
+
+
+
While creating the mask, make sure that the background is not a solid colour and is transparent
+
Whichever area you want to make visible, it should be coloured in black
+
+
+
Example (Credits: Pinpal):
+
+
+
+
would result in
+
+
+
+
Packaging
+
+
+
Create a new folder outside themeName.theme with the name you want to be shown on Cydia, e.g themeNameForCydia
+
Create another folder called DEBIAN in themeNameForCydia (It needs to be uppercase)
+
In DEBIAN create an extension-less file called control and edit it using your favourite text editor
+
+
+
Paste the following in it, replacing yourname, themename, Theme Name, A theme with beautiful icons! and Your Name with your details:
+
+
Package: com.yourname.themename
+Name: Theme Name
+Version: 1.0
+Architecture: iphoneos-arm
+Description: A theme with beautiful icons!
+Author: Your Name
+Maintainer: Your Name
+Section: Themes
+
+
+
+
Important Notes:
+
+
+
The package field MUST be lower case!
+
The version field MUST be changed every-time you update your theme!
+
The control file MUST have an extra blank line at the bottom!
+
+
Now, Create another folder called Library in themeNameForCydia
+
In Library create another folder called Themes
+
Finally, copy themeName.theme to the Themes folder (Copy the entire folder, not just the contents)
+
+
+
Building the DEB
+
+
For building the deb you need a *nix system, otherwise you can build it using your iPhones
+
+
Pre-Requisite for MacOS users
+
+
1) Install Homenbrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" (Run this in the terminal)
+2) Install dpkg, by running brew install dpkg
+
+
There is a terrible thing called .DS_Store which if not removed, will cause a problem during either build or installation
+
+
+
To remove this we first need to open the folder in the terminal
+
Launch the Terminal and then drag-and-drop the 'themeNameForCydia' folder on the Terminal icon in the dock
+
Now, run find . -name "*.DS_Store" -type f -delete
+
+
+
Pre-Requisite for Windows Users
+
+
+
SSH into your iPhone and drag and drop the themeNameForCyia folder on the terminal
+
+
+
Common Instructions
+
+
+
You should be at the root of the folder in the terminal, i.e Inside themeNameForCydia
+
running ls should show the following output
+
+
+
DEBIAN Library
+
+
+
+
Now, in the terminal enter the following cd .. && dpkg -b themeNameForCydia
+
+
+
Now you will have the themeNameForCydia.deb in the same directory
+
+
You can share this with your friends :+1:
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2019-12-04-Google-Teachable-Machines.html b/docs/posts/2019-12-04-Google-Teachable-Machines.html
new file mode 100644
index 0000000..d13fd6f
--- /dev/null
+++ b/docs/posts/2019-12-04-Google-Teachable-Machines.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Image Classifier With Teachable Machines
+
+
Made for Google Code-In
+
+
Task Description
+
+
Using Glitch and the Teachable Machines, build a Book Detector with Tensorflow.js. When a book is recognized, the code would randomly suggest a book/tell a famous quote from a book. Here is an example Project to get you started: https://glitch.com/~voltaic-acorn
+
+
Details
+
+
1) Collecting Data
+
+
Teachable Machine allows you to create your dataset just by using your webcam! I created a database consisting of three classes ( Three Books ) and approximately grabbed 100 pictures for each book/class
+
+
+
+
2) Training
+
+
Training on teachable machines is as simple as clicking the train button. I did not even have to modify any configurations.
+
+
+
+
3) Finding Labels
+
+
Because I originally entered the entire name of the book and it's author's name as the label, the class name got truncated (Note to self, use shorter class names :p ). I then modified the code to print the modified label names in an alert box.
+
+
+
+
+
+
4) Adding a suggestions function
+
+
I first added a text field on the main page and then modified the JavaScript file to suggest a similar book whenever the model predicted with an accuracy >= 98%
+
+
+
+
+
+
5) Running!
+
+
Here it is running!
+
+
+
+
+
+
Remix this project:-
+
+
https://luminous-opinion.glitch.me
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
new file mode 100644
index 0000000..e3e898c
--- /dev/null
+++ b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
+
+
Done during Google Code-In. Org: Tensorflow.
+
+
Imports
+
+
%tensorflow_version2.x#This is for telling Colab that you want to use TF 2.0, ignore if running on local machine
+
+fromPILimportImage# We use the PIL Library to resize images
+importnumpyasnp
+importos
+importcv2
+importtensorflowastf
+fromtensorflow.kerasimportdatasets,layers,models
+importpandasaspd
+importmatplotlib.pyplotasplt
+fromkeras.modelsimportSequential
+fromkeras.layersimportConv2D,MaxPooling2D,Dense,Flatten,Dropout
+
We use the Adam optimiser as it is an adaptive learning rate optimisation algorithm that's been designed specifically for training deep neural networks, which means it changes its learning rate automatically to get the best results
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2019-12-16-TensorFlow-Polynomial-Regression.html b/docs/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
new file mode 100644
index 0000000..7a0d95e
--- /dev/null
+++ b/docs/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
@@ -0,0 +1,510 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Polynomial Regression Using TensorFlow
+
+
In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.
+
+
In this, we will be performing polynomial regression using 5 types of equations -
+
+
+
Linear
+
Quadratic
+
Cubic
+
Quartic
+
Quintic
+
+
+
Regression
+
+
What is Regression?
+
+
Regression is a statistical measurement that is used to try to determine the relationship between a
+dependent variable (often denoted by Y), and series of varying variables (called independent variables, often denoted by X ).
+
+
What is Polynomial Regression
+
+
This is a form of Regression Analysis where the relationship between Y and X is denoted as the nth degree/power of X.
+Polynomial regression even fits a non-linear relationship (e.g when the points don't form a straight line).
n=len(abscissa)# no of observations
+plt.scatter(abscissa,ordinate)
+plt.ylabel('Salary')
+plt.xlabel('Position')
+plt.title("Salary vs Position")
+plt.show()
+
For each type of equation first we make the model predict the values of the coefficient(s) and constant, once we get these values we use it to predict the Y
+values using the X values. We then plot it to compare the actual data and predicted line.
You just learnt Polynomial Regression using TensorFlow!
+
+
Notes
+
+
Overfitting
+
+
+
+
Overfitting refers to a model that models the training data too well.
+ Overfitting happens when a model learns the detail and noise in the training data to the extent that it negatively impacts the performance of the model on new data. This means that the noise or random fluctuations in the training data is picked up and learned as concepts by the model. The problem is that these concepts do not apply to new data and negatively impact the models ability to generalise.
+
+
+
+
+
Source: Machine Learning Mastery
+
+
+
Basically if you train your machine learning model on a small dataset for a really large number of epochs, the model will learn all the deformities/noise in the data and will actually think that it is a normal part. Therefore when it will see some new data, it will discard that new data as noise and will impact the accuracy of the model in a negative manner
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html
new file mode 100644
index 0000000..ed86ba4
--- /dev/null
+++ b/docs/posts/2019-12-22-Fake-News-Detector.html
@@ -0,0 +1,262 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Building a Fake News Detector with Turicreate
+
+
In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app
+
+
Note: These commands are written as if you are running a jupyter notebook.
+
+
Building the Machine Learning Model
+
+
Data Gathering
+
+
To build a classifier, you need a lot of data. George McIntire (GH: @joolsa) has created a wonderful dataset containing the headline, body and whether it is fake or real.
+Whenever you are looking for a dataset, always try searching on Kaggle and GitHub before you start building your own
+
+
Dependencies
+
+
I used a Google Colab instance for training my model. If you also plan on using Google Colab then I recommend choosing a GPU Instance (It is Free)
+This allows you to train the model on the GPU. Turicreate is built on top of Apache's MXNet Framework, for us to use GPU we need to install
+a CUDA compatible MXNet package.
est_predictions=model.predict(test)
+accuracy=tc.evaluation.accuracy(test['label'],test_predictions)
+print(f'Topic classifier model has a testing accuracy of {accuracy*100}% ',flush=True)
+
We have just created our own Fake News Detection Model which has an accuracy of 92%!
+
+
example_text={"title":["Middling ‘Rise Of Skywalker’ Review Leaves Fan On Fence About Whether To Threaten To Kill Critic"],"text":["Expressing ambivalence toward the relatively balanced appraisal of the film, Star Wars fan Miles Ariely admitted Thursday that an online publication’s middling review of The Rise Of Skywalker had left him on the fence about whether he would still threaten to kill the critic who wrote it. “I’m really of two minds about this, because on the one hand, he said the new movie fails to live up to the original trilogy, which makes me at least want to throw a brick through his window with a note telling him to watch his back,” said Ariely, confirming he had already drafted an eight-page-long death threat to Stan Corimer of the website Screen-On Time, but had not yet decided whether to post it to the reviewer’s Facebook page. “On the other hand, though, he commended J.J. Abrams’ skillful pacing and faithfulness to George Lucas’ vision, which makes me wonder if I should just call the whole thing off. Now, I really don’t feel like camping outside his house for hours. Maybe I could go with a response that’s somewhere in between, like, threatening to kill his dog but not everyone in his whole family? I don’t know. This is a tough one.” At press time, sources reported that Ariely had resolved to wear his Ewok costume while he murdered the critic in his sleep."]}
+example_prediction=model.classify(tc.SFrame(example_text))
+print(example_prediction,flush=True)
+
First we create a single view app (make sure you check the use SwiftUI button)
+
+
Then we copy our .mlmodel file to our project (Just drag and drop the file in the XCode Files Sidebar)
+
+
Our ML Model does not take a string directly as an input, rather it takes bag of words as an input.
+DescriptionThe bag-of-words model is a simplifying representation used in NLP, in this text is represented as a bag of words, without any regard for grammar or order, but noting multiplicity
Finally, we implement a simple function which reads the two text fields, creates their bag of words representation and displays an alert with the appropriate result
importturicreateastc
+
+# Load the data
+data=tc.SFrame('fire-smoke.sframe')
+
+# Make a train-test split
+train_data,test_data=data.random_split(0.8)
+
+# Create the model
+model=tc.image_classifier.create(train_data,target='label')
+
+# Save predictions to an SArray
+predictions=model.predict(test_data)
+
+# Evaluate the model and print the results
+metrics=model.evaluate(test_data)
+print(metrics['accuracy'])
+
+# Save the model for later use in Turi Create
+model.save('fire-smoke.model')
+
+# Export for use in Core ML
+model.export_coreml('fire-smoke.mlmodel')
+
The other option is to go to your router's server page and get connected devices
+
+
Developer-Settings
+
+
+
Go To Settings
+
About
+
Continously click on the "Build" option until it says "You are a Developer"
+
+
+
Enable-ADB
+
+
+
Go to Settings
+
Go to Developer Options
+
Scroll untill you find ADB Debugging and enable that option
+
+
+
Connect-ADB
+
+
+
Open Terminal (Make sure you have ADB installed)
+
Enter the following command adb connect <IP_ADDRESS>
+
To test the connection run adb logcat
+
+
+
Manipulating Apps / Packages
+
+
Listing Packages
+
+
+
adb shell
+
pm list packages
+
+
+
Installing Packages
+
+
+
adb install -r package.apk
+
+
+
Uninstalling Packages
+
+
+
adb uninstall com.company.yourpackagename
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-03-08-Making-Vaporwave-Track.html b/docs/posts/2020-03-08-Making-Vaporwave-Track.html
new file mode 100644
index 0000000..fe385f5
--- /dev/null
+++ b/docs/posts/2020-03-08-Making-Vaporwave-Track.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Making My First Vaporwave Track (Remix)
+
+
I finally completed my first quick and dirty vaporwave remix of "I Want It That Way" by the Backstreet Boys
+
+
V A P O R W A V E
+
+
Vaporwave is all about A E S T H E T I C S. Vaporwave is a type of music genre that emerged as a parody of Chillwave, shared more as a meme rather than a proper musical genre. Of course this changed as the genre become mature
+
+
How to Vaporwave
+
+
The first track which is considered to be actual Vaporwave is Ramona Xavier's Macintosh Plus, this set the the guidelines for making Vaporwave
+
+
+
Take a 1980s RnB song
+
Slow it down
+
Add Bass and Treble
+
Add again
+
Add Reverb ( make sure its wet )
+
+
+
There you have your very own Vaporwave track.
+
+
( Now, there are some tracks being produced which are not remixes and are original )
+
+
My Remix
+
+
+
+
Where is the Programming?
+
+
The fact that there are steps on producing Vaporwave, this gave me the idea that Vaporwave can actually be made using programming, stay tuned for when I publish the program which I am working on ( Generating A E S T H E T I C artwork and remixes)
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html b/docs/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
new file mode 100644
index 0000000..9d37882
--- /dev/null
+++ b/docs/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
@@ -0,0 +1,61 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Fixing X11 Error on macOS Catalina for AmberTools 18/19
+
+
I was trying to install AmberTools on my macOS Catalina Installation. Running ./configure -macAccelerate clang gave me an error that it could not find X11 libraries, even though locate libXt showed that my installation was correct.
+
+
Error:
+
+
Could not find the X11 libraries; you may need to edit config.h
+ to set the XHOME and XLIBS variables.
+Error: The X11 libraries are not in the usual location !
+ To search for them try the command: locate libXt
+ On new Fedora OS's install the libXt-devel libXext-devel
+ libX11-devel libICE-devel libSM-devel packages.
+ On old Fedora OS's install the xorg-x11-devel package.
+ On RedHat OS's install the XFree86-devel package.
+ On Ubuntu OS's install the xorg-dev and xserver-xorg packages.
+
+ ...more info for various linuxes at ambermd.org/ubuntu.html
+
+ To build Amber without XLEaP, re-run configure with '-noX11:
+ ./configure -noX11 --with-python /usr/local/bin/python3 -macAccelerate clang
+Configure failed due to the errors above!
+
+
+
I searched on Google for a solution. Sadly, there was not even a single thread which had a solution about this error.
+
+
The Fix
+
+
Simply reinstalling XQuartz using homebrew fixed the error brew cask reinstall xquartz
+
+
If you do not have XQuartz installed, you need to run brew cask install xquartz
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-05-31-compiling-open-babel-on-ios.html b/docs/posts/2020-05-31-compiling-open-babel-on-ios.html
new file mode 100644
index 0000000..bccab0e
--- /dev/null
+++ b/docs/posts/2020-05-31-compiling-open-babel-on-ios.html
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Compiling Open Babel on iOS
+
+
Due to the fact that my summer vacations started today,
+I had the brilliant idea of trying to run open babel on my iPad.
+To give a little background, I had tried to compile AutoDock Vina using a cross-compiler but I had miserably failed.
+
+
I am running the Checkr1n jailbreak on my iPad and the Unc0ver jailbreak on my phone.
+
+
But Why?
+
+
Well, just because I can. This is literally the only reason I tried compiling it and also partially because in the long run I want to compile AutoDock Vina so I can do Molecular Docking on the go.
+
+
Let's Go!
+
+
How hard can it be to compile open babel right? It is just a simple software with clear and concise build instructions. I just need to use cmake to build and the make to install.
+
+
It is 11 AM in the morning. I install clang, cmake and make from the Sam Bingner's repository, fired up ssh, downloaded the source code and ran the build command.`clang
+
+
Fail No. 1
+
+
I couldn't even get cmake to run, I did a little digging around StackOverflow and founf that I needed the iOS SDK, sure no problem. I waited for Xcode to update and transferred the SDKs to my iPad
Them I told cmake that this is the location for my SDK 😠. Successful! Now I just needed to use make.
+
+
Fail No. 2
+
+
It was giving the error that thread-local-storage was not supported on this device.
+
+
[ 0%] Building CXX object src/CMakeFiles/openbabel.dir/alias.cpp.o
+[ 1%] Building CXX object src/CMakeFiles/openbabel.dir/atom.cpp.o
+In file included from /var/root/obabel/ob-src/src/atom.cpp:28:
+In file included from /var/root/obabel/ob-src/include/openbabel/ring.h:29:
+/var/root/obabel/ob-src/include/openbabel/typer.h:70:1: error: thread-local storage is not supported for the current target
+THREAD_LOCAL OB_EXTERN OBAtomTyper atomtyper;
+^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+In file included from /var/root/obabel/ob-src/src/atom.cpp:28:
+In file included from /var/root/obabel/ob-src/include/openbabel/ring.h:29:
+/var/root/obabel/ob-src/include/openbabel/typer.h:84:1: error: thread-local storage is not supported for the current target
+THREAD_LOCAL OB_EXTERN OBAromaticTyper aromtyper;
+^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+/var/root/obabel/ob-src/src/atom.cpp:107:10: error: thread-local storage is not supported for the current target
+ extern THREAD_LOCAL OBAromaticTyper aromtyper;
+ ^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+/var/root/obabel/ob-src/src/atom.cpp:108:10: error: thread-local storage is not supported for the current target
+ extern THREAD_LOCAL OBAtomTyper atomtyper;
+ ^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+/var/root/obabel/ob-src/src/atom.cpp:109:10: error: thread-local storage is not supported for the current target
+ extern THREAD_LOCAL OBPhModel phmodel;
+ ^
+/var/root/obabel/ob-src/include/openbabel/mol.h:35:24: note: expanded from macro 'THREAD_LOCAL'
+# define THREAD_LOCAL thread_local
+ ^
+5 errors generated.
+make[2]: *** [src/CMakeFiles/openbabel.dir/build.make:76: src/CMakeFiles/openbabel.dir/atom.cpp.o] Error 1
+make[1]: *** [CMakeFiles/Makefile2:1085: src/CMakeFiles/openbabel.dir/all] Error 2
+make: *** [Makefile:129: all] Error 2
+
+
+
Strange but it is alright, there is nothing that hasn't been answered on the internet.
+
+
I did a little digging around and could not find a solution 😔
+
+
As a temporary fix, I disabled multithreading by going and commenting the lines in the source code.
+
+
+
+
Packaging as a deb
+
+
This was pretty straight forward, I tried installing it on my iPad and it was working pretty smoothly.
+
+
Moment of Truth
+
+
So I airdropped the .deb to my phone and tried installing it, the installation was successful but when I tried obabel it just aborted.
+
+
+
+
Turns out because I had created an install target of a separate folder while compiling, the binaries were referencing a non-existing dylib rather than those in the /usr/lib folder. As a quick workaround I transferred the deb folder to my laptop and used otool and install_name tool: install_name_tool -change /var/root/obabel/ob-build/lib/libopenbabel.7.dylib /usr/lib/libopenbabel.7.dylib for all the executables and then signed them using jtool
+
+
I then installed it and everything went smoothly, I even ran obabel and it executed perfectly, showing the version number 3.1.0 ✌️ Ahh, smooth victory.
+
+
Nope. When I tried converting from SMILES to pdbqt, it gave an error saying plugin not found. This was weird.
+
+
+
+
So I just copied the entire build folder from my iPad to my phone and tried running it. Oops, Apple Sandbox Error, Oh no!
+
+
I spent 2 hours around this problem, only to see the documentation and realise I hadn't setup the environment variable 🤦♂️
This was the tragedy of trying to compile something without knowing enough about compiling. It is 11:30 as of writing this. Something as trivial as this should not have taken me so long. Am I going to try to compile AutoDock Vina next? 🤔 Maybe.
+
+
Also, if you want to try Open Babel on you jailbroken iDevice, install the package from my repository ( You, need to run the above mentioned final fix :p ). This was tested on iOS 13.5, I cannot tell if it will work on others or not.
+
+
Hopefully, I add some more screenshots to this post.
+
+
Edit 1: Added Screenshots, had to replicate the errors.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL.html b/docs/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL.html
new file mode 100644
index 0000000..c388e29
--- /dev/null
+++ b/docs/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Workflow for Lightning Fast Molecular Docking Part One
To run this command you simple copy the SMILES structure of the ligand you want an it automatically takes it from your clipboard, generates the 3D structure in the AutoDock PDBQT format using Open Babel and then docks it with your receptor using AutoDock Vina, all with just one command.
pbpaste and pbcopy are macOS commands for pasting and copying from and to the clipboard. Linux users may install the xclip and xsel packages from their respective package managers and then insert these aliases into their bash_profile, zshrc e.t.c
+
+
alias pbcopy='xclip -selection clipboard'
+alias pbpaste='xclip -selection clipboard -o'
+
+
+
$(pbpaste)
+
+
+
This is used in bash to evaluate the results of a command. In this scenario we are using it to get the contents of the clipboard.
+
+
The rest of the command is a normal Open Babel command to generate a 3D structure in PDBQT format and then save it as test.pdbqt
+
+
&&
+
+
+
This tells the terminal to only run the next part if the previous command runs successfully without any errors.
This is just the docking command for AutoDock Vina. In the next part I will tell how to use PyMOL and a plugin to directly generate the coordinates in Vina format --center_x -9.7 --center_y 11.4 --center_z 68.9 --size_x 19.3 --size_y 29.9 --size_z 21.3 without needing to type them manually.
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html b/docs/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html
new file mode 100644
index 0000000..9820e75
--- /dev/null
+++ b/docs/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Compiling AutoDock Vina on iOS
+
+
Why? Because I can.
+
+
Installing makedepend
+
+
makedepend is a Unix tool used to generate dependencies of C source files. Most modern programs do not use this anymore, but then again AutoDock Vina's source code hasn't been changed since 2011. The first hurdle came when I saw that there was no makedepend command, neither was there any package on any development repository for iOS. So, I tracked down the original source code for makedepend (https://github.com/DerellLicht/makedepend). According to the repository this is actually the source code for the makedepend utility that came with some XWindows distribution back around Y2K. I am pretty sure there is a problem with my current compiler configuration because I had to manually edit the Makefile to provide the path to the iOS SDKs using the -isysroot flag.
+
+
Editing the Makefile
+
+
Original Makefile ( I used the provided mac Makefile base )
Of course since Boost 1.41 many things have been added and deprecated, that is why I had to edit the source code to make it work with version 1.68
+
+
Error 1 - No Matching Constructor
+
+
../../../src/main/main.cpp:50:9: error: no matching constructor for initialization of 'path' (aka 'boost::filesystem::path')
+return path(str, boost::filesystem::native);
+
+
+
This was an easy fix, I just commented this and added a return statement to return the path
+
+
return path(str)
+
+
+
Error 2 - No Member Named 'nativefilestring'
+
+
../../../src/main/main.cpp:665:57: error: no member named 'native_file_string' in 'boost::filesystem::path'
+ std::cerr << "\n\nError: could not open \"" << e.name.native_file_string() << "\" for " << (e.in ? "reading" : "writing") << ".\n";
+ ~~~~~~ ^
+../../../src/main/main.cpp:677:80: error: no member named 'native_file_string' in 'boost::filesystem::path'
+ std::cerr << "\n\nParse error on line " << e.line << " in file \"" << e.file.native_file_string() << "\": " << e.reason << '\n';
+ ~~~~~~ ^
+2 errors generated.
+
+
+
Turns out native_file_string was deprecated in Boost 1.57 and replaced with just string
+
+
Error 3 - Library Not Found
+
+
This one still boggles me because there was no reason for it to not work, as a workaround I downloaded the DEB, extracted it and used that path for compiling.
+
+
Error 4 - No Member Named 'nativefilestring' Again.
+
+
But, this time in another file and I quickly fixed it
+
+
Moment of Truth
+
+
Obviously it was working on my iPad, but would it work on another device? I transferred the compiled binary and
+
+
+
+
The package is available on my repository and only depends on boost. ( Both, Vina and Vina-Split are part of the package)
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-07-01-Install-rdkit-colab.html b/docs/posts/2020-07-01-Install-rdkit-colab.html
new file mode 100644
index 0000000..b60d405
--- /dev/null
+++ b/docs/posts/2020-07-01-Install-rdkit-colab.html
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Installing RDKit on Google Colab
+
+
RDKit is one of the most integral part of any Cheminfomatic specialist's toolkit but it is notoriously difficult to install unless you already have conda installed. I originally found this in a GitHub Gist but I have not been able to find that gist again :/
+
+
Just copy and paste this in a Colab cell and it will install it 👍
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html b/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
new file mode 100644
index 0000000..524e371
--- /dev/null
+++ b/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
@@ -0,0 +1,307 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Introduction to AR.js and Natural Feature Tracking
+
+
AR.js
+
+
AR.js is a lightweight library for Augmented Reality on the Web, coming with features like Image Tracking, Location based AR and Marker tracking. It is the easiest option for cross-browser augmented reality.
+
+
The same code works for iOS, Android, Desktops and even VR Browsers!
+
+
It was initially created by Jerome Etienne and is now maintained by Nicolo Carpignoli and the AR-js Organisation
+
+
NFT
+
+
Usually for augmented reality you need specialised markers, like this Hiro marker (notice the thick non-aesthetic borders 🤢)
+
+
+
+
This is called marker based tracking where the code knows what to look for. NFT or Natural Feature Tracing converts normal images into markers by extracting 'features' from it, this way you can use any image of your liking!
+
+
I'll be using my GitHub profile picture
+
+
+
+
Creating the Marker!
+
+
First we need to create the marker files required by AR.js for NFT. For this we use Carnaux's repository 'NFT-Marker-Creator'.
Now we have the required files in the output folder
+
+
$ ls output
+
+me.fset me.fset3 me.iset
+
+
+
Creating the HTML Page
+
+
Create a new file called index.html in your project folder. This is the basic template we are going to use. Replace me with the root filename of your image, for example NeverGonnaGiveYouUp.png will become NeverGonnaGiveYouUp. Make sure you have copied all three files from the output folder in the previous step to the root of your project folder.
In this we are creating a AFrame scene and we are telling it that we want to use NFT Tracking. The amazing part about using AFrame is that we are able to use all AFrame objects!
Bonus Idea: Integrate it with GitHub's new profile Readme Feature!
+
+
1) Host the code using GitHub Pages
+
+
2) Create a new repository ( the name should be your GitHub username )
+
+
3) Add QR Code to the page and tell the users to scan your profile picture
+
+
??) Profit 💸
+
+
Here is a screenshot of me scanning a rounded version of my profile picture ( It still works! Even though the image is cropped and I haven't changed any line of code )
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html b/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
new file mode 100644
index 0000000..5d59cd6
--- /dev/null
+++ b/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
@@ -0,0 +1,138 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Trying Different Camera Setups
+
+
+
Animated Overlays
+
Using a modern camera as your webcam
+
Using your phone's camera as your webcam
+
Using a USB Camera
+
+
+
Comparison
+
+
Here are the results before you begin reading.
+
+
+
+
+
+
+
+
+
+
Prerequisites
+
+
I am running macOS and iOS but I will try to link the same steps for Windows as well. If you are running Arch, I assume you already know what you are doing and are using this post as an inspiration and not a how-to guide.
Windows users can install the latest version of the plugin from OBS-Forums
+
+
0. Animated Overlays
+
+
I have always liked PewDiePie's animated border he uses in his videos
+
+
+
+
The border was apparently made by a YouTuber Sleepy Tanooki. He posted a link to a Google Drive folder containing the video file. (I will be using the video overlay for the example)
+
+
It is pretty simple to use overlays in OBS:
+
+
First, Create a new scene by clicking on the plus button on the bottom right corner.
+
+
+
+
Now, in the Sources section click on the add button -> Video Capture Device -> Create New -> Choose your webcam from the Device section.
+
+
You may, resize if you want
+
+
After this, again click on the add button, but this time choose the Media Source option
+
+
+
+
and, locate and choose the downloaded overlay.
+
+
1. Using a Modern Camera (Without using a Capture Card)
+
+
I have a Sony mirrorless camera. Using Sony's Imaging Edge Desktop, you can use your laptop as a remote viewfinder and capture or record media.
+
+
After installing Image Edge Desktop or your Camera's equivalent, open the Remote application.
+
+
+
+
Once you are able to see the output of the camera on the application, switch to OBS. Create a new scene, and this time choose Window Capture in the Sources menu. After you have chosen the appropriate window, you may transform/crop the output using the properties/filters options.
+
+
2.1 Using your iPhone using Quicktime
+
+
Connect your iPhone via a USB cable, then Open Quicktime -> File -> New Movie Recording
+
+
In the Sources choose your device (No need to press record). You may open the camera app now.
+
+
+
+
Now, in OBS create a new scene, and in the sources choose the Window Capture option. You will need to rotate the source:
+
+
+
+
2.2 Using your iPhone using an application like Camo
+
+
Install the Camo app on your phone through the app store -> connect to Mac using USB cable, install the companion app and you are done.
+
+
I tried both my current iPhone and an old iPhone 5S
+
+
3. A USB Webcam
+
+
The simplest solution, is to use a USB webcam. I used an old Logitech C310 that was collecting dust. I was surprised to find that Logitech is still selling it after years and proudly advertising it! (5MP)
+
+
It did not sit well on my laptop, so I placed it on my definitely-not-Joby Gorrila Pod i had bought on Amazon for ~₹500
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
new file mode 100644
index 0000000..ef6f2e1
--- /dev/null
+++ b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+
+
I have a Raspberry-Pi running a Flask app through Gunicorn (Ubuntu 20.04 LTS). I am exposing it to the internet using DuckDNS.
After you accept that you are okay with you IP address being logged, it will prompt you with updating your dns record. You need to create a new TXT record in the DNS settings for your domain.
+
+
For DuckDNS users it is as simple as entering this URL in their browser:
Where mydomain is your DuckDNS domain, duckdnstoken is your DuckDNS Token ( Found on the dashboard when you login) and certbotdnstxt is the TXT record value given by the prompt.
+
+
You can check if the TXT records have been updated by using the dig command:
DuckDNS almost instantly propagates the changes but for other domain hosts, it could take a while.
+
+
Once you can ensure that the TXT record changes has been successfully applied and is visible through the dig command, press enter on the Certbot prompt and your certificate should be generated.
+
+
Renewing
+
+
As we manually generated the certificate certbot renew will fail, to renew the certificate you need to simply re-generate the certificate using the above steps.
To use the certificate with it, simply copy the cert.pem and privkey.pem to your working directory ( change the appropriate permissions ) and include them in the command
In this tutorial we will build a fake news detecting app from scratch, using Turicreate for the machine learning model and SwiftUI for building the app
Chauhan, N. (2019). "Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response." <i>International Research Journal of Engineering and Technology (IRJET), 6(5)</i>.
+
+
+
BibTeX
+
+
@article{chauhan_2019, title={Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response}, volume={6}, url={https://www.irjet.net/archives/V6/i5/IRJET-V6I5318.pdf}, number={5}, journal={International Research Journal of Engineering and Technology (IRJET)}, author={Chauhan, Navan}, year={2019}}
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/publications/2020-03-14-generating-vaporwave.html b/docs/publications/2020-03-14-generating-vaporwave.html
new file mode 100644
index 0000000..70e06db
--- /dev/null
+++ b/docs/publications/2020-03-14-generating-vaporwave.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+ Hey - Post
+
+
+
+
+
+
+
Is it possible to programmatically generate Vaporwave?
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/publications/index.html b/docs/publications/index.html
new file mode 100644
index 0000000..6d981dc
--- /dev/null
+++ b/docs/publications/index.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+ Hey - Section
+
+
+
+
+
+
+
+
Publications
+
+
Hopefully these grow with time, I already have tons of drafts ready. As I am currently studying in school, this allows me to experiment in Physics, Chemistry and Computer Science. I have started using LaTeX now ;)
COVID-19, has been officially labeled as a pandemic by the World Health Organisation. This paper presents cloperastine and vigabatrin as two possible drug candidates for combatting the disease along with the process by which they were discovered.
This paper is about Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response.
+
Published On: 2019-05-14 02:42
+
Tags:
+
+ publication,
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/pwabuilder-sw-register.js b/docs/pwabuilder-sw-register.js
new file mode 100644
index 0000000..8850330
--- /dev/null
+++ b/docs/pwabuilder-sw-register.js
@@ -0,0 +1,19 @@
+// This is the service worker with the Cache-first network
+
+// Add this below content to your HTML page, or add the js file to your page at the very top to register service worker
+
+// Check compatibility for the browser we're running this in
+if ("serviceWorker" in navigator) {
+ if (navigator.serviceWorker.controller) {
+ console.log("[PWA Builder] active service worker found, no need to register");
+ } else {
+ // Register the service worker
+ navigator.serviceWorker
+ .register("/pwabuilder-sw.js", {
+ scope: "./"
+ })
+ .then(function (reg) {
+ console.log("[PWA Builder] Service worker has been registered for scope: " + reg.scope);
+ });
+ }
+}
diff --git a/docs/pwabuilder-sw.js b/docs/pwabuilder-sw.js
new file mode 100644
index 0000000..0684da5
--- /dev/null
+++ b/docs/pwabuilder-sw.js
@@ -0,0 +1,83 @@
+// This is the service worker with the Cache-first network
+
+const CACHE = "pwabuilder-precache";
+const precacheFiles = [
+ /* Add an array of files to precache for your app */
+];
+
+self.addEventListener("install", function (event) {
+ console.log("[PWA Builder] Install Event processing");
+
+ console.log("[PWA Builder] Skip waiting on install");
+ self.skipWaiting();
+
+ event.waitUntil(
+ caches.open(CACHE).then(function (cache) {
+ console.log("[PWA Builder] Caching pages during install");
+ return cache.addAll(precacheFiles);
+ })
+ );
+});
+
+// Allow sw to control of current page
+self.addEventListener("activate", function (event) {
+ console.log("[PWA Builder] Claiming clients for current page");
+ event.waitUntil(self.clients.claim());
+});
+
+// If any fetch fails, it will look for the request in the cache and serve it from there first
+self.addEventListener("fetch", function (event) {
+ if (event.request.method !== "GET") return;
+
+ event.respondWith(
+ fromCache(event.request).then(
+ function (response) {
+ // The response was found in the cache so we responde with it and update the entry
+
+ // This is where we call the server to get the newest version of the
+ // file to use the next time we show view
+ event.waitUntil(
+ fetch(event.request).then(function (response) {
+ return updateCache(event.request, response);
+ })
+ );
+
+ return response;
+ },
+ function () {
+ // The response was not found in the cache so we look for it on the server
+ return fetch(event.request)
+ .then(function (response) {
+ // If request was success, add or update it in the cache
+ event.waitUntil(updateCache(event.request, response.clone()));
+
+ return response;
+ })
+ .catch(function (error) {
+ console.log("[PWA Builder] Network request failed and no cache." + error);
+ });
+ }
+ )
+ );
+});
+
+function fromCache(request) {
+ // Check to see if you have it in the cache
+ // Return response
+ // If not in the cache, then return
+ return caches.open(CACHE).then(function (cache) {
+ return cache.match(request).then(function (matching) {
+ if (!matching || matching.status === 404) {
+ return Promise.reject("no-match");
+ }
+
+ return matching;
+ });
+ });
+}
+
+function updateCache(request, response) {
+ return caches.open(CACHE).then(function (cache) {
+ return cache.put(request, response);
+ });
+}
--
cgit v1.2.3