From 6402dbe26fd228604681dd60c345ba31d514ec90 Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Sat, 17 Feb 2024 19:52:08 -0700
Subject: add 3d designs section and first 3d design post
---
.../2024-02-17-Can-Holder-Mountain-Bike.md | 38 +++++++++++++++++++++
Content/3D-Designs/index.md | 3 ++
.../2024-02-17-Can-Holder-Mountain-Bike.png | Bin 0 -> 24564 bytes
3 files changed, 41 insertions(+)
create mode 100644 Content/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.md
create mode 100644 Content/3D-Designs/index.md
create mode 100644 Resources/images/opengraph/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.png
diff --git a/Content/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.md b/Content/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.md
new file mode 100644
index 0000000..49378ca
--- /dev/null
+++ b/Content/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.md
@@ -0,0 +1,38 @@
+---
+date: 2024-02-17 18:42
+description: Carry your favourite soda (or beer) can with you while you ride
+tags: Mountain Biking, OpenSCAD
+---
+
+# Bike Soda Can Holder
+
+Ever wanted a nice craft soda, or a natty light during your ride? Mounts to the standard bottle cage holes on your bike.
+
+Printed on an Anycubic Kobra 2 (0.20mm resolution w/ 0.40mm nozzle at 40% Infill)
+
+Download Link: [Github](https://github.com/navanchauhan/3D-Designs/tree/master/MTBCanHolder)
+
+
+
+
The OpenSCAD code can be modified to support tall boys and stovepipe cans. Email me if you need help generating more variations
+
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
I refuse to learn how to use a normal CAD software like SolidWorks. I use OpenSCAD. All of the code and exported models are stored in my GitHub Repository: navanchauhan/3D-Designs.
+```
+
+![Video Under a Transparent Image](/assets/underlying/video-under-element.jpg)
+
+Turns out, you can disable pointer events!
+
+In Tailwind, it is as simple as adding `pointer-events-none` to the bezel screen.
+
+In CSS, this can be done by:
+
+```css
+.className {
+ pointer-events: none
+}
+```
+
diff --git a/Resources/assets/underlying/video-under-element.jpg b/Resources/assets/underlying/video-under-element.jpg
new file mode 100644
index 0000000..96afed2
Binary files /dev/null and b/Resources/assets/underlying/video-under-element.jpg differ
diff --git a/Resources/images/opengraph/posts/2024-02-26-control-element-under-another-element-html-css.png b/Resources/images/opengraph/posts/2024-02-26-control-element-under-another-element-html-css.png
new file mode 100644
index 0000000..2817224
Binary files /dev/null and b/Resources/images/opengraph/posts/2024-02-26-control-element-under-another-element-html-css.png differ
diff --git a/docs/assets/underlying/video-under-element.jpg b/docs/assets/underlying/video-under-element.jpg
new file mode 100644
index 0000000..96afed2
Binary files /dev/null and b/docs/assets/underlying/video-under-element.jpg differ
diff --git a/docs/feed.rss b/docs/feed.rss
index 5cafe59..244ab87 100644
--- a/docs/feed.rss
+++ b/docs/feed.rss
@@ -4,8 +4,8 @@
Navan's ArchiveRare Tips, Tricks and Posts
https://web.navan.dev/en
- Sat, 17 Feb 2024 19:51:03 -0000
- Sat, 17 Feb 2024 19:51:03 -0000
+ Mon, 26 Feb 2024 12:07:42 -0000
+ Mon, 26 Feb 2024 12:07:42 -0000250
@@ -3547,6 +3547,50 @@ Otherwise, it calls the custom action.
]]>
+
+
+ https://web.navan.dev/posts/2024-02-26-control-element-under-another-element-html-css.html
+
+
+ Interacting with underlying element in HTML
+
+
+ With CSS you can disable any interactions with an element and directly control the underlying element
+
+ https://web.navan.dev/posts/2024-02-26-control-element-under-another-element-html-css.html
+ Mon, 26 Feb 2024 11:57:00 -0000
+ Interacting with underlying element in HTML
+
+
I know that the title is a bit weird. I was trying to interact with a video under an iPhone Bezel Screen frame.
In Tailwind, it is as simple as adding pointer-events-none to the bezel screen.
+
+
In CSS, this can be done by:
+
+
+
.className{
+pointer-events:none
+}
+
+
+
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/index.html b/docs/posts/index.html
index 566d3de..4194100 100644
--- a/docs/posts/index.html
+++ b/docs/posts/index.html
@@ -52,6 +52,19 @@
Short code-snippet for an RSS feed, written in HTML and JavaScript
--
cgit v1.2.3
From 507d51b356de707b5b8d3e1832fbf3684415f07c Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Wed, 28 Feb 2024 11:51:41 -0700
Subject: add example to post
---
...ntrol-element-under-another-element-html-css.md | 42 +++++++++++++++++++
docs/feed.rss | 47 +++++++++++++++++++++-
...rol-element-under-another-element-html-css.html | 43 ++++++++++++++++++++
3 files changed, 130 insertions(+), 2 deletions(-)
diff --git a/Content/posts/2024-02-26-control-element-under-another-element-html-css.md b/Content/posts/2024-02-26-control-element-under-another-element-html-css.md
index 1c253fe..cbdfe6a 100644
--- a/Content/posts/2024-02-26-control-element-under-another-element-html-css.md
+++ b/Content/posts/2024-02-26-control-element-under-another-element-html-css.md
@@ -33,3 +33,45 @@ In CSS, this can be done by:
}
```
+Let us try this in a simple example.
+
+## Example
+
+Here, we create a button and overlay a transparent box
+
+```html
+
+A box with 200px height and 200px width
+
+
+```
+
+
+
+
+A box with 200px height and 300px width
+
+
+
+
+As you can see, you cannot click the button because the red box comes in the way. We can fix this by adding `pointer-events: none` to the box.
+
+```html
+
+A box with 200px height and 300px width
+
+
+
+```
+
+
+
+
+A box with 200px height and 300px width
+
+
+
+
+
+
+
diff --git a/docs/feed.rss b/docs/feed.rss
index 244ab87..4f92bc6 100644
--- a/docs/feed.rss
+++ b/docs/feed.rss
@@ -4,8 +4,8 @@
Navan's ArchiveRare Tips, Tricks and Posts
https://web.navan.dev/en
- Mon, 26 Feb 2024 12:07:42 -0000
- Mon, 26 Feb 2024 12:07:42 -0000
+ Wed, 28 Feb 2024 11:50:15 -0000
+ Wed, 28 Feb 2024 11:50:15 -0000250
@@ -3588,6 +3588,49 @@ Otherwise, it calls the custom action.
}
+
+
Let us try this in a simple example.
+
+
Example
+
+
Here, we create a button and overlay a transparent box
+
+
+
<divstyle="height: 200px; width: 300px; background-color: rgba(255, 0, 0, 0.4); z-index: 2; position: absolute;">
+A box with 200px height and 200px width
+</div>
+<buttonstyle="z-index: 1; margin-top: 20px; margin-bottom: 200px;"onclick="alert('You were able to click this button')">Try clicking me</button>
+
+
+
+
+
+
+A box with 200px height and 300px width
+
+
+
+
+
+
As you can see, you cannot click the button because the red box comes in the way. We can fix this by adding pointer-events: none to the box.
+
+
+
<divstyle="height: 200px; width: 300px; background-color: rgba(0, 255, 0, 0.4); z-index: 2; position: absolute; pointer-events: none;">
+A box with 200px height and 300px width
+</div>
+<buttonstyle="z-index: 1; margin-top: 20px; margin-bottom: 200px"onclick="alert('You were able to click this button')">Try clicking me</button>
+</div>
+
Here, we create a button and overlay a transparent box
+
+
+
<divstyle="height: 200px; width: 300px; background-color: rgba(255, 0, 0, 0.4); z-index: 2; position: absolute;">
+A box with 200px height and 200px width
+</div>
+<buttonstyle="z-index: 1; margin-top: 20px; margin-bottom: 200px;"onclick="alert('You were able to click this button')">Try clicking me</button>
+
+
+
+
+
+
+A box with 200px height and 300px width
+
+
+
+
+
+
As you can see, you cannot click the button because the red box comes in the way. We can fix this by adding pointer-events: none to the box.
+
+
+
<divstyle="height: 200px; width: 300px; background-color: rgba(0, 255, 0, 0.4); z-index: 2; position: absolute; pointer-events: none;">
+A box with 200px height and 300px width
+</div>
+<buttonstyle="z-index: 1; margin-top: 20px; margin-bottom: 200px"onclick="alert('You were able to click this button')">Try clicking me</button>
+</div>
+
+
+
+
+
+
+A box with 200px height and 300px width
+
+
+
+
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
--
cgit v1.2.3
From ea7a6ce794dbda1a7eded1d5e663897d46d21fa2 Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Fri, 15 Mar 2024 15:00:41 -0600
Subject: add post about compiling for dos
---
.../posts/2024-03-04-opencvjs-video-processing.md | 12 +
...2024-03-15-setting-up-macos-for-8088-dos-dev.md | 267 +++++++++++++++++
Resources/assets/posts/dosbox/hello-world.png | Bin 0 -> 233460 bytes
.../posts/2024-03-04-opencvjs-video-processing.png | Bin 0 -> 27820 bytes
...024-03-15-setting-up-macos-for-8088-dos-dev.png | Bin 0 -> 32566 bytes
docs/assets/posts/dosbox/hello-world.png | Bin 0 -> 233460 bytes
docs/feed.rss | 290 +++++++++++++++++-
.../posts/2024-03-04-opencvjs-video-processing.png | Bin 0 -> 27820 bytes
...024-03-15-setting-up-macos-for-8088-dos-dev.png | Bin 0 -> 32566 bytes
docs/index.html | 34 +--
...24-03-15-setting-up-macos-for-8088-dos-dev.html | 330 +++++++++++++++++++++
docs/posts/index.html | 15 +
docs/tags/DOS.html | 73 +++++
docs/tags/JS.html | 73 +++++
docs/tags/OpenCV.html | 73 +++++
docs/tags/macOS.html | 15 +
docs/tags/x86.html | 73 +++++
17 files changed, 1234 insertions(+), 21 deletions(-)
create mode 100644 Content/posts/2024-03-04-opencvjs-video-processing.md
create mode 100644 Content/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.md
create mode 100644 Resources/assets/posts/dosbox/hello-world.png
create mode 100644 Resources/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png
create mode 100644 Resources/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png
create mode 100644 docs/assets/posts/dosbox/hello-world.png
create mode 100644 docs/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png
create mode 100644 docs/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png
create mode 100644 docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
create mode 100644 docs/tags/DOS.html
create mode 100644 docs/tags/JS.html
create mode 100644 docs/tags/OpenCV.html
create mode 100644 docs/tags/x86.html
diff --git a/Content/posts/2024-03-04-opencvjs-video-processing.md b/Content/posts/2024-03-04-opencvjs-video-processing.md
new file mode 100644
index 0000000..cf87fb1
--- /dev/null
+++ b/Content/posts/2024-03-04-opencvjs-video-processing.md
@@ -0,0 +1,12 @@
+---
+date: 2024-03-04 12:01
+description: Real time video processing with OpenCV.js in the browser
+tags: HTML, JS, OpenCV
+draft: true
+---
+
+# Video Processing W/ OpenCV.js
+
+Note: A really weird bug you might run into when you are trying to mess around
+and reloading the page on iOS is that OpenCV just stops loading. This is a bug in
+WebKit.:
diff --git a/Content/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.md b/Content/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.md
new file mode 100644
index 0000000..15161f5
--- /dev/null
+++ b/Content/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.md
@@ -0,0 +1,267 @@
+---
+date: 2024-03-15 13:16
+description: This goes through compiling Open Watcom 2 and creating simple hello-world exampls
+tags: DOS, x86, macOS
+draft: false
+---
+
+# Cross-Compiling Hello World for DOS on macOS
+
+Technically this should work for any platform that OpenWatcom 2 supports compiling binaries for. Some instructions are based on [a post at retrocoding.net](https://retrocoding.net/openwatcom-gateway-to-ancient-world-of-x86),
+ and [John Tsiombikas's post](http://nuclear.mutantstargoat.com/articles/retrocoding/dos01-setup/#hello-world-program)
+
+## Prerequisites
+
+You should already have XCode / Command Line Tools, and Homebrew installed. To compile Open Watcom for DOS you will need DOSBox (I use DOSBox-X).
+
+```bash
+brew install --cask dosbox-x
+```
+
+## Compiling Open Watcom v2
+
+*If this process is super annoying, I might make a custom homebrew tap to build and install Open Watcom*
+
+```bash
+git clone https://github.com/open-watcom/open-watcom-v2
+cp open-watcom-v2/setvars.sh custom_setvars.sh
+```
+
+Now, edit this `setvars.sh` file. My file looks like this:
+
+```bash
+#!/bin/zsh
+export OWROOT="/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2"
+export OWTOOLS=CLANG
+export OWDOCBUILD=0
+export OWGUINOBUILD=0
+export OWDISTRBUILD=0
+export OWDOSBOX="/Applications/dosbox-x.app/Contents/MacOS/dosbox-x"
+export OWOBJDIR=binbuildV01
+. "$OWROOT/cmnvars.sh"
+echo "OWROOT=$OWROOT"
+cd "$OWROOT"
+```
+
+Note, your `OWRTOOT` is definitely going to be in a different location.
+
+```bash
+source ./custom_setvars.sh
+./build.sh
+./build.sh rel
+```
+
+This will build, and then copy everything to the `rel` directory inside `open-watcom-v2` directory. Since I ran this on an Apple Silicon Mac,
+ all the binaries for me are in the `armo64` directory. You can now move everything inside the rel folder to another location, or create a simple
+ script to init all variables whenever you want.
+
+I like having a script called `exportVarsForDOS.sh`
+
+```bash
+#!/bin/zsh
+
+export WATCOM=/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2/rel
+export PATH=$PATH:$WATCOM/armo64
+export EDDAT=$WATCOM/eddat
+
+# For DOS 8088/8086 development
+export INCLUDE=$WATCOM/h
+export LIB=$WATCOM/lib286 # You don't really need this
+```
+
+Then, when you need to load up these variables, you can simply run `source exportVarsForDOS.sh` or `. exportVarsForDOS.sh`
+
+## Hello World
+
+### Buliding without any Makefiles
+
+Create a new file called `example1.c`
+
+```c
+#include
+
+int main() {
+ printf("Hello World!");
+ return 0;
+}
+```
+
+First we compile the code:
+
+```bash
+$ wcc example1.c
+Open Watcom C x86 16-bit Optimizing Compiler
+Version 2.0 beta Mar 15 2024 13:11:55
+Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
+Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
+Source code is available under the Sybase Open Watcom Public License.
+See https://github.com/open-watcom/open-watcom-v2#readme for details.
+example1.c: 7 lines, included 818, 0 warnings, 0 errors
+Code size: 19
+```
+
+Then, link to make an executable:
+
+```bash
+$ wlink name example1.exe system dos file example1.o
+Open Watcom Linker Version 2.0 beta Mar 15 2024 13:10:09
+Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
+Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
+Source code is available under the Sybase Open Watcom Public License.
+See https://github.com/open-watcom/open-watcom-v2#readme for details.
+loading object files
+searching libraries
+creating a DOS executable
+```
+
+If you want to test this executable, jump to the section titled `Testing with DOSBox-X` below.
+
+### Simple Makefile
+
+```makefile
+obj = main.o hello.o
+bin = tizts.com
+
+CC = wcc
+CFLAGS = -0
+LD = wlink
+
+$(bin): $(obj)
+ $(LD) name $@ system dos file main.o file hello.o
+
+.c.o:
+ $(CC) $(CFLAGS) $<
+
+clean:
+ rm $(obj) $(bin)
+```
+
+Where, `main.c`
+```c
+void hello(void);
+
+int main(void)
+{
+ hello();
+ return 0;
+}
+```
+
+and `hello.c`
+
+```c
+/* hello.c */
+#include
+
+void hello(void)
+{
+ printf("Hello!");
+}
+```
+
+To compile into `tizts.com` simply run `wmake`
+
+```bash
+$ wmake
+➜ simple-cpp wmake
+Open Watcom Make Version 2.0 beta Mar 15 2024 13:10:16
+Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
+Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
+Source code is available under the Sybase Open Watcom Public License.
+See https://github.com/open-watcom/open-watcom-v2#readme for details.
+ wcc -0 main.c
+Open Watcom C x86 16-bit Optimizing Compiler
+Version 2.0 beta Mar 15 2024 13:11:55
+Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
+Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
+Source code is available under the Sybase Open Watcom Public License.
+See https://github.com/open-watcom/open-watcom-v2#readme for details.
+main.c(8): Warning! W138: No newline at end of file
+main.c: 8 lines, included 53, 1 warnings, 0 errors
+Code size: 12
+ wcc -0 hello.c
+Open Watcom C x86 16-bit Optimizing Compiler
+Version 2.0 beta Mar 15 2024 13:11:55
+Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
+Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
+Source code is available under the Sybase Open Watcom Public License.
+See https://github.com/open-watcom/open-watcom-v2#readme for details.
+hello.c: 8 lines, included 818, 0 warnings, 0 errors
+Code size: 17
+ wlink name tizts.com system dos file main.o file hello.o
+Open Watcom Linker Version 2.0 beta Mar 15 2024 13:10:09
+Copyright (c) 2002-2024 The Open Watcom Contributors. All Rights Reserved.
+Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
+Source code is available under the Sybase Open Watcom Public License.
+See https://github.com/open-watcom/open-watcom-v2#readme for details.
+loading object files
+searching libraries
+creating a DOS executable
+```
+
+### Using CMake
+
+Create a file called `CMakeLists.txt`
+
+```CMake
+project(hello)
+
+set(SOURCES abc.c)
+
+add_executable(hello ${SOURCES})
+```
+
+Where, `abc.c` is:
+
+```c
+#include
+
+int main() {
+ printf("Does this work?");
+ return 0;
+}
+```
+
+```bash
+mkdir build
+cd build
+```
+
+And build using CMake
+
+```
+cmake -DCMAKE_SYSTEM_NAME=DOS -DCMAKE_SYSTEM_PROCESSOR=I86 -DCMAKE_C_FLAGS="-0 -bt=dos -d0 -oaxt" -G "Watcom WMake" ../..
+```
+
+There you have it. Three different ways to compile a C program on a macOS device in 2024 that can run on an IBM PC 5150 (which was released in 1981!)
+
+## Testing with DOSBox-X
+
+```bash
+cp example1.exe ~/Downloads
+/Applications/dosbox-x.app/Contents/MacOS/dosbox-x
+```
+
+In DOSBox-X we now mount the `~/Downloads` folder as our `C:` drive
+
+```
+mount C ~/Downloads
+```
+
+Switch to the C drive
+
+```
+C:
+```
+
+Run the program:
+
+```
+example1
+```
+
+![Running our program in DOSBox-X](/assets/posts/dosbox/hello-world.png)
+
+*My DOSBox setup might look slightly different than yours...*
+
+
diff --git a/Resources/assets/posts/dosbox/hello-world.png b/Resources/assets/posts/dosbox/hello-world.png
new file mode 100644
index 0000000..4e2482e
Binary files /dev/null and b/Resources/assets/posts/dosbox/hello-world.png differ
diff --git a/Resources/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png b/Resources/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png
new file mode 100644
index 0000000..e77d3d7
Binary files /dev/null and b/Resources/images/opengraph/posts/2024-03-04-opencvjs-video-processing.png differ
diff --git a/Resources/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png b/Resources/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png
new file mode 100644
index 0000000..8cba6d8
Binary files /dev/null and b/Resources/images/opengraph/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.png differ
diff --git a/docs/assets/posts/dosbox/hello-world.png b/docs/assets/posts/dosbox/hello-world.png
new file mode 100644
index 0000000..4e2482e
Binary files /dev/null and b/docs/assets/posts/dosbox/hello-world.png differ
diff --git a/docs/feed.rss b/docs/feed.rss
index 4f92bc6..d242684 100644
--- a/docs/feed.rss
+++ b/docs/feed.rss
@@ -4,8 +4,8 @@
Navan's ArchiveRare Tips, Tricks and Posts
https://web.navan.dev/en
- Wed, 28 Feb 2024 11:50:15 -0000
- Wed, 28 Feb 2024 11:50:15 -0000
+ Fri, 15 Mar 2024 15:00:25 -0000
+ Fri, 15 Mar 2024 15:00:25 -0000250
@@ -196,6 +196,292 @@ I actually added the code to this post after running the program.
]]>
+
+
+ https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
+
+
+ Cross-Compiling Hello World for DOS on macOS
+
+
+ This goes through compiling Open Watcom 2 and creating simple hello-world exampls
+
+ https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
+ Fri, 15 Mar 2024 13:16:00 -0000
+ Cross-Compiling Hello World for DOS on macOS
+
+
This will build, and then copy everything to the rel directory inside open-watcom-v2 directory. Since I ran this on an Apple Silicon Mac,
+ all the binaries for me are in the armo64 directory. You can now move everything inside the rel folder to another location, or create a simple
+ script to init all variables whenever you want.
+
+
I like having a script called exportVarsForDOS.sh
+
+
+
#!/bin/zsh
+
+exportWATCOM=/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2/rel
+exportPATH=$PATH:$WATCOM/armo64
+exportEDDAT=$WATCOM/eddat
+
+# For DOS 8088/8086 development
+exportINCLUDE=$WATCOM/h
+exportLIB=$WATCOM/lib286# You don't really need this
+
+
+
+
Then, when you need to load up these variables, you can simply run source exportVarsForDOS.sh or . exportVarsForDOS.sh
This will build, and then copy everything to the rel directory inside open-watcom-v2 directory. Since I ran this on an Apple Silicon Mac,
+ all the binaries for me are in the armo64 directory. You can now move everything inside the rel folder to another location, or create a simple
+ script to init all variables whenever you want.
+
+
I like having a script called exportVarsForDOS.sh
+
+
+
#!/bin/zsh
+
+exportWATCOM=/Users/navanchauhan/Developer/8088Stuff/open-watcom-v2/rel
+exportPATH=$PATH:$WATCOM/armo64
+exportEDDAT=$WATCOM/eddat
+
+# For DOS 8088/8086 development
+exportINCLUDE=$WATCOM/h
+exportLIB=$WATCOM/lib286# You don't really need this
+
+
+
+
Then, when you need to load up these variables, you can simply run source exportVarsForDOS.sh or . exportVarsForDOS.sh
In DOSBox-X we now mount the ~/Downloads folder as our C: drive
+
+
mount C ~/Downloads
+
+
+
Switch to the C drive
+
+
C:
+
+
+
Run the program:
+
+
example1
+
+
+
+
+
My DOSBox setup might look slightly different than yours...
+
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/index.html b/docs/posts/index.html
index 4194100..2d9d613 100644
--- a/docs/posts/index.html
+++ b/docs/posts/index.html
@@ -52,6 +52,21 @@
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.2.3
From b484b8a672a907af87e73fe7006497a6ca86c259 Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Thu, 21 Mar 2024 13:54:53 -0600
Subject: add polynomial regression for tf 2.0
---
...-03-21-Polynomial-Regression-in-TensorFlow-2.md | 241 ++++++++++++++++
...03-21-Polynomial-Regression-in-TensorFlow-2.png | Bin 0 -> 27498 bytes
docs/feed.rss | 271 +++++++++++++++++-
...03-21-Polynomial-Regression-in-TensorFlow-2.png | Bin 0 -> 27498 bytes
docs/index.html | 28 +-
...3-21-Polynomial-Regression-in-TensorFlow-2.html | 311 +++++++++++++++++++++
docs/posts/index.html | 15 +
docs/tags/Colab.html | 15 +
docs/tags/Tensorflow.html | 15 +
9 files changed, 881 insertions(+), 15 deletions(-)
create mode 100644 Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md
create mode 100644 Resources/images/opengraph/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.png
create mode 100644 docs/images/opengraph/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.png
create mode 100644 docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
diff --git a/Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md b/Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md
new file mode 100644
index 0000000..4341f09
--- /dev/null
+++ b/Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md
@@ -0,0 +1,241 @@
+---
+date: 2024-03-21 12:46
+description: Predicting n-th degree polynomials using TensorFlow 2.x
+tags: Tutorial, Tensorflow, Colab
+---
+
+# Polynomial Regression Using TensorFlow 2.x
+
+I have a similar post titled [Polynomial Regression Using Tensorflow](/posts/2019-12-16-TensorFlow-Polynomial-Regression.html) that used `tensorflow.compat.v1` (Which still works as of TF 2.16). But, I thought it would be nicer to redo it with newer TF versions.
+
+I will be skipping all the introductions about polynomial regression and jumping straight to the code. Personally, I prefer using `scikit-learn` for this task.
+
+## Position vs Salary Dataset
+
+Again, we will be using https://drive.google.com/file/d/1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9/view (Salary vs Position Dataset)
+
+If you are in a Python Notebook environment like Kaggle or Google Colaboratory, you can simply run:
+```Termcap
+!wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9' -O data.csv
+```
+
+## Code
+
+If you just want to copy-paste the code, scroll to the bottom for the entire snippet. Here I will try and walk through setting up code for a 3rd-degree (cubic) polynomial
+
+### Imports
+
+```python
+import pandas as pd
+import tensorflow as tf
+import matplotlib.pyplot as plt
+import numpy as np
+```
+
+### Reading the Dataset
+
+```python
+df = pd.read_csv("data.csv")
+```
+
+### Variables and Constants
+
+Here, we initialize the X and Y values as constants, since they are not going to change. The coefficients are defined as variables.
+
+```python
+X = tf.constant(df["Level"], dtype=tf.float32)
+Y = tf.constant(df["Salary"], dtype=tf.float32)
+
+coefficients = [tf.Variable(np.random.randn() * 0.01, dtype=tf.float32) for _ in range(4)]
+```
+
+Here, `X` and `Y` are the values from our dataset. We initialize the coefficients for the equations as small random values.
+
+These coefficients are evaluated by Tensorflow's `tf.math.poyval` function which returns the n-th order polynomial based on how many coefficients are passed. Since our list of coefficients contains 4 different variables, it will be evaluated as:
+
+```
+y = (x**3)*coefficients[3] + (x**2)*coefficients[2] + (x**1)*coefficients[1] (x**0)*coefficients[0]
+```
+
+Which is equivalent to the general cubic equation:
+
+
+
+$$
+y = ax^3 + bx^2 + cx + d
+$$
+
+### Optimizer Selection & Training
+
+```python
+optimizer = tf.keras.optimizers.Adam(learning_rate=0.3)
+num_epochs = 10_000
+
+for epoch in range(num_epochs):
+ with tf.GradientTape() as tape:
+ y_pred = tf.math.polyval(coefficients, X)
+ loss = tf.reduce_mean(tf.square(y - y_pred))
+ grads = tape.gradient(loss, coefficients)
+ optimizer.apply_gradients(zip(grads, coefficients))
+ if (epoch+1) % 1000 == 0:
+ print(f"Epoch: {epoch+1}, Loss: {loss.numpy()}"
+```
+
+In TensorFlow 1, we would have been using `tf.Session` instead.
+
+Here we are using `GradientTape()` instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
+
+Our loss function is Mean Squared Error (MSE)
+
+$$
+= \frac{1}{n}\sum_{i=1}^{n} (Y_i - \^{Y_i})
+$$
+
+Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
+
+### Plotting Final Coefficients
+
+```python
+final_coefficients = [c.numpy() for c in coefficients]
+print("Final Coefficients:", final_coefficients)
+
+plt.plot(df["Level"], df["Salary"], label="Original Data")
+plt.plot(df["Level"],[tf.math.polyval(final_coefficients, tf.constant(x, dtype=tf.float32)).numpy() for x in df["Level"]])
+plt.ylabel('Salary')
+plt.xlabel('Position')
+plt.title("Salary vs Position")
+plt.show()
+```
+
+
+## Code Snippet for a Polynomial of Degree N
+
+### Using Gradient Tape
+
+This should work regardless of the Keras backend version (2 or 3)
+
+```python
+import tensorflow as tf
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+
+df = pd.read_csv("data.csv")
+
+############################
+## Change Parameters Here ##
+############################
+x_column = "Level" #
+y_column = "Salary" #
+degree = 2 #
+learning_rate = 0.3 #
+num_epochs = 25_000 #
+############################
+
+X = tf.constant(df[x_column], dtype=tf.float32)
+Y = tf.constant(df[y_column], dtype=tf.float32)
+
+coefficients = [tf.Variable(np.random.randn() * 0.01, dtype=tf.float32) for _ in range(degree + 1)]
+
+optimizer = tf.keras.optimizers.Adam(learning_rate=learning_rate)
+
+for epoch in range(num_epochs):
+ with tf.GradientTape() as tape:
+ y_pred = tf.math.polyval(coefficients, X)
+ loss = tf.reduce_mean(tf.square(Y - y_pred))
+ grads = tape.gradient(loss, coefficients)
+ optimizer.apply_gradients(zip(grads, coefficients))
+ if (epoch+1) % 1000 == 0:
+ print(f"Epoch: {epoch+1}, Loss: {loss.numpy()}")
+
+final_coefficients = [c.numpy() for c in coefficients]
+print("Final Coefficients:", final_coefficients)
+
+print("Final Equation:", end=" ")
+for i in range(degree+1):
+ print(f"{final_coefficients[i]} * x^{degree-i}", end=" + " if i < degree else "\n")
+
+plt.plot(X, Y, label="Original Data")
+plt.plot(X,[tf.math.polyval(final_coefficients, tf.constant(x, dtype=tf.float32)).numpy() for x in df[x_column]]), label="Our Poynomial"
+plt.ylabel(y_column)
+plt.xlabel(x_column)
+plt.title(f"{x_column} vs {y_column}")
+plt.legend()
+plt.show()
+```
+
+### Without Gradient Tape
+
+This relies on the Optimizer's `minimize` function and uses the `var_list` parameter to update the variables.
+
+This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch to the legacy backend.
+
+```python
+import tensorflow as tf
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+
+df = pd.read_csv("data.csv")
+
+############################
+## Change Parameters Here ##
+############################
+x_column = "Level" #
+y_column = "Salary" #
+degree = 2 #
+learning_rate = 0.3 #
+num_epochs = 25_000 #
+############################
+
+X = tf.constant(df[x_column], dtype=tf.float32)
+Y = tf.constant(df[y_column], dtype=tf.float32)
+
+coefficients = [tf.Variable(np.random.randn() * 0.01, dtype=tf.float32) for _ in range(degree + 1)]
+
+optimizer = tf.keras.optimizers.Adam(learning_rate=learning_rate)
+
+def loss_function():
+ pred_y = tf.math.polyval(coefficients, X)
+ return tf.reduce_mean(tf.square(pred_y - Y))
+
+for epoch in range(num_epochs):
+ optimizer.minimize(loss_function, var_list=coefficients)
+ if (epoch+1) % 1000 == 0:
+ current_loss = loss_function().numpy()
+ print(f"Epoch {epoch+1}: Training Loss: {current_loss}")
+
+final_coefficients = coefficients.numpy()
+print("Final Coefficients:", final_coefficients)
+
+print("Final Equation:", end=" ")
+for i in range(degree+1):
+ print(f"{final_coefficients[i]} * x^{degree-i}", end=" + " if i < degree else "\n")
+
+plt.plot(X, Y, label="Original Data")
+plt.plot(X,[tf.math.polyval(final_coefficients, tf.constant(x, dtype=tf.float32)).numpy() for x in df[x_column]], label="Our Polynomial")
+plt.ylabel(y_column)
+plt.xlabel(x_column)
+plt.legend()
+plt.title(f"{x_column} vs {y_column}")
+plt.show()
+```
+
+
+As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
+
+## Further Programming
+
+How would you modify this code to use another type of nonlinear regression? Say, $ y = ab^x $
+
+Hint: Your loss calculation would be similar to:
+
+```python
+bx = tf.pow(coefficients[1], X)
+pred_y = tf.math.multiply(coefficients[0], bx)
+loss = tf.reduce_mean(tf.square(pred_y - Y))
+```
+
+
diff --git a/Resources/images/opengraph/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.png b/Resources/images/opengraph/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.png
new file mode 100644
index 0000000..0dbdd08
Binary files /dev/null and b/Resources/images/opengraph/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.png differ
diff --git a/docs/feed.rss b/docs/feed.rss
index d242684..df334a3 100644
--- a/docs/feed.rss
+++ b/docs/feed.rss
@@ -4,8 +4,8 @@
Navan's ArchiveRare Tips, Tricks and Posts
https://web.navan.dev/en
- Fri, 15 Mar 2024 15:00:25 -0000
- Fri, 15 Mar 2024 15:00:25 -0000
+ Thu, 21 Mar 2024 13:54:34 -0000
+ Thu, 21 Mar 2024 13:54:34 -0000250
@@ -482,6 +482,273 @@ creatingaDOS
+
+
+ https://web.navan.dev/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
+
+
+ Polynomial Regression Using TensorFlow 2.x
+
+
+ Predicting n-th degree polynomials using TensorFlow 2.x
+
+ https://web.navan.dev/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
+ Thu, 21 Mar 2024 12:46:00 -0000
+ Polynomial Regression Using TensorFlow 2.x
+
+
I have a similar post titled Polynomial Regression Using Tensorflow that used tensorflow.compat.v1 (Which still works as of TF 2.16). But, I thought it would be nicer to redo it with newer TF versions.
+
+
I will be skipping all the introductions about polynomial regression and jumping straight to the code. Personally, I prefer using scikit-learn for this task.
+
+
Position vs Salary Dataset
+
+
Again, we will be using https://drive.google.com/file/d/1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9/view (Salary vs Position Dataset)
+
+
If you are in a Python Notebook environment like Kaggle or Google Colaboratory, you can simply run:
If you just want to copy-paste the code, scroll to the bottom for the entire snippet. Here I will try and walk through setting up code for a 3rd-degree (cubic) polynomial
Here, X and Y are the values from our dataset. We initialize the coefficients for the equations as small random values.
+
+
These coefficients are evaluated by Tensorflow's tf.math.poyval function which returns the n-th order polynomial based on how many coefficients are passed. Since our list of coefficients contains 4 different variables, it will be evaluated as:
+
+
y = (x**3)*coefficients[3] + (x**2)*coefficients[2] + (x**1)*coefficients[1] (x**0)*coefficients[0]
+
+
+
Which is equivalent to the general cubic equation:
+
+
+In TensorFlow 1, we would have been using `tf.Session` instead.
+
+Here we are using `GradientTape()` instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
+
+Our loss function is Mean Squared Error (MSE)
+
+$$
+= \frac{1}{n}\sum_{i=1}^{n} (Y_i - \^{Y_i})
+$$
+
+Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
+
+### Plotting Final Coefficients
+
+
+
+### Without Gradient Tape
+
+This relies on the Optimizer's `minimize` function and uses the `var_list` parameter to update the variables.
+
+This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch to the legacy backend.
+
+
+
+
+As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
+
+## Further Programming
+
+How would you modify this code to use another type of nonlinear regression? Say, $ y = ab^x $
+
+Hint: Your loss calculation would be similar to:
+
For all posts go to Posts
diff --git a/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html b/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
new file mode 100644
index 0000000..c1a4ae4
--- /dev/null
+++ b/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
@@ -0,0 +1,311 @@
+
+
+
+
+
+
+
+
+ Polynomial Regression Using TensorFlow 2.x
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Polynomial Regression Using TensorFlow 2.x
+
+
I have a similar post titled Polynomial Regression Using Tensorflow that used tensorflow.compat.v1 (Which still works as of TF 2.16). But, I thought it would be nicer to redo it with newer TF versions.
+
+
I will be skipping all the introductions about polynomial regression and jumping straight to the code. Personally, I prefer using scikit-learn for this task.
+
+
Position vs Salary Dataset
+
+
Again, we will be using https://drive.google.com/file/d/1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9/view (Salary vs Position Dataset)
+
+
If you are in a Python Notebook environment like Kaggle or Google Colaboratory, you can simply run:
If you just want to copy-paste the code, scroll to the bottom for the entire snippet. Here I will try and walk through setting up code for a 3rd-degree (cubic) polynomial
Here, X and Y are the values from our dataset. We initialize the coefficients for the equations as small random values.
+
+
These coefficients are evaluated by Tensorflow's tf.math.poyval function which returns the n-th order polynomial based on how many coefficients are passed. Since our list of coefficients contains 4 different variables, it will be evaluated as:
+
+
y = (x**3)*coefficients[3] + (x**2)*coefficients[2] + (x**1)*coefficients[1] (x**0)*coefficients[0]
+
+
+
Which is equivalent to the general cubic equation:
+
+
+In TensorFlow 1, we would have been using `tf.Session` instead.
+
+Here we are using `GradientTape()` instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
+
+Our loss function is Mean Squared Error (MSE)
+
+$$
+= \frac{1}{n}\sum_{i=1}^{n} (Y_i - \^{Y_i})
+$$
+
+Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
+
+### Plotting Final Coefficients
+
+
+
+### Without Gradient Tape
+
+This relies on the Optimizer's `minimize` function and uses the `var_list` parameter to update the variables.
+
+This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch to the legacy backend.
+
+
+
+
+As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
+
+## Further Programming
+
+How would you modify this code to use another type of nonlinear regression? Say, $ y = ab^x $
+
+Hint: Your loss calculation would be similar to:
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/index.html b/docs/posts/index.html
index 2d9d613..d886b19 100644
--- a/docs/posts/index.html
+++ b/docs/posts/index.html
@@ -52,6 +52,21 @@
--
cgit v1.2.3
From 37661080a111768e565ae53299c4796ebe711a71 Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Thu, 21 Mar 2024 14:29:50 -0600
Subject: fix mathjax stuff
---
...-03-21-Polynomial-Regression-in-TensorFlow-2.md | 17 +++---
docs/feed.rss | 66 +++++++++-------------
...3-21-Polynomial-Regression-in-TensorFlow-2.html | 62 +++++++++-----------
3 files changed, 63 insertions(+), 82 deletions(-)
diff --git a/Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md b/Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md
index 4341f09..6317175 100644
--- a/Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md
+++ b/Content/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.md
@@ -59,9 +59,8 @@ y = (x**3)*coefficients[3] + (x**2)*coefficients[2] + (x**1)*coefficients[1] (x*
Which is equivalent to the general cubic equation:
-
+
+
$$
y = ax^3 + bx^2 + cx + d
@@ -85,15 +84,15 @@ for epoch in range(num_epochs):
In TensorFlow 1, we would have been using `tf.Session` instead.
-Here we are using `GradientTape()` instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
+Here we are using `GradientTape()` instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
-Our loss function is Mean Squared Error (MSE)
+Our loss function is Mean Squared Error (MSE):
$$
-= \frac{1}{n}\sum_{i=1}^{n} (Y_i - \^{Y_i})
+= \frac{1}{n} \sum_{i=1}^{n}{(Y\_i - \hat{Y\_i})^2}
$$
-Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
+Where is the predicted value and is the actual value
### Plotting Final Coefficients
@@ -228,7 +227,9 @@ As always, remember to tweak the parameters and choose the correct model for the
## Further Programming
-How would you modify this code to use another type of nonlinear regression? Say, $ y = ab^x $
+How would you modify this code to use another type of nonlinear regression? Say,
+
+$$ y = ab^x $$
Hint: Your loss calculation would be similar to:
diff --git a/docs/feed.rss b/docs/feed.rss
index df334a3..12e9f8d 100644
--- a/docs/feed.rss
+++ b/docs/feed.rss
@@ -4,8 +4,8 @@
Navan's ArchiveRare Tips, Tricks and Posts
https://web.navan.dev/en
- Thu, 21 Mar 2024 13:54:34 -0000
- Thu, 21 Mar 2024 13:54:34 -0000
+ Thu, 21 Mar 2024 14:27:28 -0000
+ Thu, 21 Mar 2024 14:27:28 -0000250
@@ -553,18 +553,17 @@ creatingaDOS Which is equivalent to the general cubic equation:
-
+
-
+
-$$
+
In TensorFlow 1, we would have been using tf.Session instead.
-In TensorFlow 1, we would have been using `tf.Session` instead.
+
Here we are using GradientTape() instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
-Here we are using `GradientTape()` instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
+
Where is the predicted value and is the actual value
-Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
+
Plotting Final Coefficients
-### Plotting Final Coefficients
-
final_coefficients=[c.numpy()forcincoefficients]print("Final Coefficients:",final_coefficients)
@@ -606,18 +603,15 @@ Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
plt.title("Salary vs Position")plt.show()
-
+
Code Snippet for a Polynomial of Degree N
+
Using Gradient Tape
-## Code Snippet for a Polynomial of Degree N
-
-### Using Gradient Tape
+
This should work regardless of the Keras backend version (2 or 3)
-This should work regardless of the Keras backend version (2 or 3)
-
importtensorflowastfimportnumpyasnpimportpandasaspd
@@ -666,17 +660,15 @@ This should work regardless of the Keras backend version (2 or 3)
plt.legend()plt.show()
-
+
Without Gradient Tape
-### Without Gradient Tape
+
This relies on the Optimizer's minimize function and uses the var_list parameter to update the variables.
-This relies on the Optimizer's `minimize` function and uses the `var_list` parameter to update the variables.
+
This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch to the legacy backend.
-This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch to the legacy backend.
-
importtensorflowastfimportnumpyasnpimportpandasaspd
@@ -726,26 +718,24 @@ This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch
plt.title(f"{x_column} vs {y_column}")plt.show()
-
+
As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
+
Further Programming
-As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
+
How would you modify this code to use another type of nonlinear regression? Say,
-## Further Programming
+
$$ y = ab^x $$
-How would you modify this code to use another type of nonlinear regression? Say, $ y = ab^x $
+
In TensorFlow 1, we would have been using tf.Session instead.
-In TensorFlow 1, we would have been using `tf.Session` instead.
+
Here we are using GradientTape() instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
-Here we are using `GradientTape()` instead, to keep track of the loss evaluation and coefficients. This is crucial, as our optimizer needs these gradients to be able to optimize our coefficients.
+
Where is the predicted value and is the actual value
-Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
+
Plotting Final Coefficients
-### Plotting Final Coefficients
-
final_coefficients=[c.numpy()forcincoefficients]print("Final Coefficients:",final_coefficients)
@@ -156,18 +153,15 @@ Where $\^{Y_i}$ is the predicted value and $Y_i$ is the actual value
plt.title("Salary vs Position")plt.show()
-
+
Code Snippet for a Polynomial of Degree N
+
Using Gradient Tape
-## Code Snippet for a Polynomial of Degree N
-
-### Using Gradient Tape
+
This should work regardless of the Keras backend version (2 or 3)
-This should work regardless of the Keras backend version (2 or 3)
-
importtensorflowastfimportnumpyasnpimportpandasaspd
@@ -216,17 +210,15 @@ This should work regardless of the Keras backend version (2 or 3)
plt.legend()plt.show()
-
+
Without Gradient Tape
-### Without Gradient Tape
+
This relies on the Optimizer's minimize function and uses the var_list parameter to update the variables.
-This relies on the Optimizer's `minimize` function and uses the `var_list` parameter to update the variables.
+
This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch to the legacy backend.
-This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch to the legacy backend.
-
importtensorflowastfimportnumpyasnpimportpandasaspd
@@ -276,26 +268,24 @@ This will not work with Keras 3 backend in TF 2.16.0 and above unless you switch
plt.title(f"{x_column} vs {y_column}")plt.show()
-
+
As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
+
Further Programming
-As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
+
How would you modify this code to use another type of nonlinear regression? Say,
-## Further Programming
+
$$ y = ab^x $$
-How would you modify this code to use another type of nonlinear regression? Say, $ y = ab^x $
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
Where is the predicted value and is the actual value
@@ -726,7 +722,7 @@ $$
How would you modify this code to use another type of nonlinear regression? Say,
-
$$ y = ab^x $$
+
Hint: Your loss calculation would be similar to:
@@ -3186,6 +3182,52 @@ values using the X values. We then plot it to compare the actual data and predic
]]>
+
+
+ https://web.navan.dev/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
+
+
+ Quadratic Formula Derivation
+
+
+ Quick derivation of the quadratic equation by completing the square
+
+ https://web.navan.dev/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
+ Tue, 26 Mar 2024 15:36:00 -0000
+ Quadratic Formula Derivation
+
+
The standard form of a quadratic equation is:
+
+
+
+
Here, , and
+
+
We begin by first dividing both sides by the coefficient
+
+
+
+
We can rearrange the equation:
+
+
+
+
We can then use the method of completing the square. (Maths is Fun has a really good explanation for this technique)
+
+
+
+
On our LHS, we can clearly recognize that it is the expanded form of i.e
+
+
+
+
Taking the square root of both sides
+
+
+
+
This gives you the world famous quadratic formula:
+
+
+]]>
+
+
https://web.navan.dev/posts/2022-08-05-Why-You-No-Host.html
diff --git a/docs/images/opengraph/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.png b/docs/images/opengraph/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.png
new file mode 100644
index 0000000..2464364
Binary files /dev/null and b/docs/images/opengraph/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.png differ
diff --git a/docs/index.html b/docs/index.html
index 0a3070a..c462f4b 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -50,6 +50,17 @@
For all posts go to Posts
diff --git a/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html b/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
index 7a25daf..ab46ec7 100644
--- a/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
+++ b/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
@@ -107,9 +107,7 @@
-
We begin by first dividing both sides by the coefficient
+
+
+
+
We can rearrange the equation:
+
+
+
+
We can then use the method of completing the square. (Maths is Fun has a really good explanation for this technique)
+
+
+
+
On our LHS, we can clearly recognize that it is the expanded form of i.e
+
+
+
+
Taking the square root of both sides
+
+
+
+
This gives you the world famous quadratic formula:
+
+
+
+
If you have scrolled this far, consider subscribing to my mailing list here. You can subscribe to either a specific type of post you are interested in, or subscribe to everything with the "Everything" list.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/posts/index.html b/docs/posts/index.html
index d886b19..40b6a92 100644
--- a/docs/posts/index.html
+++ b/docs/posts/index.html
@@ -52,6 +52,17 @@
I refuse to learn how to use a normal CAD software like SolidWorks. I use OpenSCAD. All of the code and exported models are stored in my GitHub Repository: navanchauhan/3D-Designs.
The best way to reach out to me is by e-mail. subject[at]navan.email Or, if I have made peace with my ISP and corrected the rDNS settings, then: hey[at]navan.dev
diff --git a/docs/feed.rss b/docs/feed.rss
index 12b90df..c66c148 100644
--- a/docs/feed.rss
+++ b/docs/feed.rss
@@ -4,8 +4,8 @@
Navan's ArchiveRare Tips, Tricks and Posts
https://web.navan.dev/en
- Tue, 26 Mar 2024 18:20:37 -0000
- Tue, 26 Mar 2024 18:20:37 -0000
+ Tue, 26 Mar 2024 23:37:56 -0000
+ Tue, 26 Mar 2024 23:37:56 -0000250
@@ -14,14 +14,14 @@
https://web.navan.dev/posts/2023-10-22-search-by-flair-reddit.html
- Search / Filter posts by flair on Reddit
+ id="search-filter-posts-by-flair-on-reddit">Search / Filter posts by flair on Reddit
Search posts by flair on Reddit Web by using _
https://web.navan.dev/posts/2023-10-22-search-by-flair-reddit.html
Sun, 22 Oct 2023 00:37:00 -0000
- Search / Filter posts by flair on Reddit
+ Search / Filter posts by flair on Reddit
Remember to replace any spaces in the flair with _
@@ -38,22 +38,22 @@
https://web.navan.dev/posts/2020-03-08-Making-Vaporwave-Track.html
- Making My First Vaporwave Track (Remix)
+ id="making-my-first-vaporwave-track-remix">Making My First Vaporwave Track (Remix)
I made my first vaporwave remix
https://web.navan.dev/posts/2020-03-08-Making-Vaporwave-Track.html
Sun, 08 Mar 2020 23:17:00 -0000
- Making My First Vaporwave Track (Remix)
+ 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
+
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
+
How to Vaporwave
The first track which is considered to be actual Vaporwave is Ramona Xavier's Macintosh Plus, this set the guidelines for making Vaporwave
@@ -69,11 +69,11 @@
( Now, there are some tracks being produced which are not remixes and are original )
-
My Remix
+
My Remix
-
Where is the Programming?
+
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)
]]>
@@ -84,24 +84,24 @@
https://web.navan.dev/posts/2021-06-25-Blog2Twitter-P1.html
- Posting Blog Posts as Twitter Threads Part 1/n
+ id="posting-blog-posts-as-twitter-threads-part-1n">Posting Blog Posts as Twitter Threads Part 1/n
Converting Posts to Twitter Threads
https://web.navan.dev/posts/2021-06-25-Blog2Twitter-P1.html
Fri, 25 Jun 2021 00:08:00 -0000
- Posting Blog Posts as Twitter Threads Part 1/n
+ Posting Blog Posts as Twitter Threads Part 1/n
Why? Eh, no good reason, but should be fun.
-
Plan of Action
+
Plan of Action
I recently shifted my website to a static site generator I wrote specifically for myself.
Thus, it should be easy to just add a feature to check for new posts, split the text into chunks for Twitter threads and tweet them.
I am not handling lists or images right now.
-
Time to Code
+
Time to Code
First, the dependency: tweepy for tweeting.
@@ -183,13 +183,13 @@ I am not handling lists or images right now.
-
Result
+
Result
Posting Blog Posts as Twitter Threads Part 1/n
Why? Eh, no good reason, but should be fun. Plan of Action
I recently shifted my website to a static site generator I wrote specifically for myself. 1/5
For the next part, I will try to append the code as well.
I actually added the code to this post after running the program.
@@ -201,19 +201,19 @@ I actually added the code to this post after running the program.
https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
- Cross-Compiling Hello World for DOS on macOS
+ id="cross-compiling-hello-world-for-dos-on-macos">Cross-Compiling Hello World for DOS on macOS
This goes through compiling Open Watcom 2 and creating simple hello-world exampls
https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
Fri, 15 Mar 2024 13:16:00 -0000
- Cross-Compiling Hello World for DOS on macOS
+ Cross-Compiling Hello World for DOS on macOS
@@ -453,7 +453,7 @@ creatingaDOS There you have it. Three different ways to compile a C program on a macOS device in 2024 that can run on an IBM PC 5150 (which was released in 1981!)
-
Testing with DOSBox-X
+
Testing with DOSBox-X
cpexample1.exe~/Downloads
@@ -487,20 +487,20 @@ creatingaDOS
- Polynomial Regression Using TensorFlow 2.x
+ id="polynomial-regression-using-tensorflow-2x">Polynomial Regression Using TensorFlow 2.x
Predicting n-th degree polynomials using TensorFlow 2.x
https://web.navan.dev/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
Thu, 21 Mar 2024 12:46:00 -0000
- Polynomial Regression Using TensorFlow 2.x
+ Polynomial Regression Using TensorFlow 2.x
I have a similar post titled Polynomial Regression Using Tensorflow that used tensorflow.compat.v1 (Which still works as of TF 2.16). But, I thought it would be nicer to redo it with newer TF versions.
I will be skipping all the introductions about polynomial regression and jumping straight to the code. Personally, I prefer using scikit-learn for this task.
-
Position vs Salary Dataset
+
Position vs Salary Dataset
Again, we will be using https://drive.google.com/file/d/1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9/view (Salary vs Position Dataset)
@@ -511,11 +511,11 @@ creatingaDOS
-
Code
+
Code
If you just want to copy-paste the code, scroll to the bottom for the entire snippet. Here I will try and walk through setting up code for a 3rd-degree (cubic) polynomial
This should work regardless of the Keras backend version (2 or 3)
@@ -658,7 +658,7 @@ creatingaDOS
-
Without Gradient Tape
+
Without Gradient Tape
This relies on the Optimizer's minimize function and uses the var_list parameter to update the variables.
@@ -718,7 +718,7 @@ creatingaDOS As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
-
Further Programming
+
Further Programming
How would you modify this code to use another type of nonlinear regression? Say,
@@ -740,14 +740,14 @@ creatingaDOS
- Hello World
+ id="hello-world">Hello World
My first post.
https://web.navan.dev/posts/hello-world.html
Tue, 16 Apr 2019 17:39:00 -0000
- Hello World
+ Hello World
Why a Hello World post?
@@ -760,14 +760,14 @@ creatingaDOS
- Experiments
+ id="experiments">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
+ Experiments
@@ -780,40 +780,40 @@ creatingaDOS
- Setting up Kaggle to use with Google Colab
+ id="setting-up-kaggle-to-use-with-google-colab">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
+ 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
+
Grabbing Our Tokens
-
Go to Kaggle
+
Go to Kaggle
-
Click on your User Profile and Click on My Account
+
Click on your User Profile and Click on My Account
-
Scroll Down until you see Create New API Token
+
Scroll Down until you see Create New API Token
-
This will download your token as a JSON file
+
This will download your token as a JSON file
Copy the File to the root folder of your Google Drive
-
Setting up Colab
+
Setting up Colab
-
Mounting Google Drive
+
Mounting Google Drive
importos
@@ -824,7 +824,7 @@ creatingaDOS After this click on the URL in the output section, login and then paste the Auth Code
-
Configuring Kaggle
+
Configuring Kaggle
os.environ['KAGGLE_CONFIG_DIR']="/content/drive/My Drive/"
@@ -840,18 +840,18 @@ creatingaDOS
- Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
+ id="creating-a-custom-image-classifier-using-tensorflow-2x-and-keras-for-detecting-malaria">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
+ Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
Done during Google Code-In. Org: Tensorflow.
-
Imports
+
Imports
%tensorflow_version2.x#This is for telling Colab that you want to use TF 2.0, ignore if running on local machine
@@ -869,9 +869,9 @@ creatingaDOS
By creating a sequential model, we create a linear stack of layers.
@@ -953,7 +953,7 @@ X_train = X_train/255.0
-
Compiling Model
+
Compiling Model
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
@@ -964,7 +964,7 @@ X_train = X_train/255.0
-
Training Model
+
Training Model
We train the model for 10 epochs on the training data and then validate it using the testing data
@@ -998,7 +998,7 @@ X_train = X_train/255.0
-
Results
+
Results
accuracy=history.history['accuracy'][-1]*100
@@ -1034,14 +1034,14 @@ X_train = X_train/255.0
https://web.navan.dev/posts/2020-05-31-compiling-open-babel-on-ios.html
- Compiling Open Babel on iOS
+ id="compiling-open-babel-on-ios">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
+ 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.
@@ -1049,17 +1049,17 @@ To give a little background, I had tried to compile AutoDock Vina using a cross-
I am running the Checkr1n jailbreak on my iPad and the Unc0ver jailbreak on my phone.
-
But Why?
+
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!
+
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
+
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
@@ -1068,7 +1068,7 @@ To give a little background, I had tried to compile AutoDock Vina using a cross-
Them I told cmake that this is the location for my SDK 😠. Successful! Now I just needed to use make.
-
Fail No. 2
+
Fail No. 2
It was giving the error that thread-local-storage was not supported on this device.
I spent 2 hours around this problem, only to see the documentation and realise I hadn't setup the environment variable 🤦♂️
-
The Final Fix ( For Now )
+
The Final Fix ( For Now )
export BABEL_DATADIR="/usr/share/openbabel/3.1.0"
export BABEL_LIBDIR="/usr/lib/openbabel/3.1.0"
@@ -1165,28 +1165,28 @@ export BABEL_LIBDIR="/usr/lib/openbabel/3.1.0"
https://web.navan.dev/posts/2022-05-21-Similar-Movies-Recommender.html
- Building a Similar Movies Recommendation System
+ id="building-a-similar-movies-recommendation-system">Building a Similar Movies Recommendation System
Building a Content Based Similar Movies Recommendatiom System
https://web.navan.dev/posts/2022-05-21-Similar-Movies-Recommender.html
Sat, 21 May 2022 17:56:00 -0000
- Building a Similar Movies Recommendation System
+ Building a Similar Movies Recommendation System
-
Why?
+
Why?
I recently came across a movie/tv-show recommender, couchmoney.tv. I loved it. I decided that I wanted to build something similar, so I could tinker with it as much as I wanted.
I also wanted a recommendation system I could use via a REST API. Although I have not included that part in this post, I did eventually create it.
-
How?
+
How?
By measuring the cosine of the angle between two vectors, you can get a value in the range [0,1] with 0 meaning no similarity. Now, if we find a way to represent information about movies as a vector, we can use cosine similarity as a metric to find similar movies.
As we are recommending just based on the content of the movies, this is called a content based recommendation system.
-
Data Collection
+
Data Collection
Trakt exposes a nice API to search for movies/tv-shows. To access the API, you first need to get an API key (the Trakt ID you get when you create a new application).
Include Cast Data
@@ -1585,24 +1585,24 @@ Spies (2015): A secret agent must perform a heist without time on his side
https://web.navan.dev/posts/2024-01-05-hello-20224.html
- Hello 2024
+ id="hello-2024">Hello 2024
Recap of 2023, and my goals for 2024
https://web.navan.dev/posts/2024-01-05-hello-20224.html
Fri, 05 Jan 2024 23:16:00 -0000
- Hello 2024
+ Hello 2024
2024 % 4 == 0
-
2023
+
2023
Another revolution around the sun! This was a pretty fun and interesting year. I got to work on some interesting projects, and learned a lot.
I am going to try and use my GitHub activity to recap.
-
Spring
+
Spring
I helped a friend modernize their Larvael codebase. Dockerized it for easier development, and added a CD pipeline. (Probably going to be released by end of this year)
@@ -1613,7 +1613,7 @@ Spies (2015): A secret agent must perform a heist without time on his side
Got into Mountain Biking!
-
Summer
+
Summer
Summer was more relaxing. I mainly worked on some maintenance patches for my projects, and did some more freelancing stuff.
@@ -1622,7 +1622,7 @@ Spies (2015): A secret agent must perform a heist without time on his side
Continued working on a research project using Computer Vision in analysing a lateral flow assay. Tried porting it to use OpenCV.js, but it wasn't reliable enough. I might look into directly working with OpenCV/Vision Framework for an iOS app.
-
Fall
+
Fall
Won a couple more hackathons. I might summarize my hackathon experience in a different blog post.
@@ -1638,7 +1638,7 @@ Spies (2015): A secret agent must perform a heist without time on his side
I also did a ton of other stuff, but I am not sure how much I want to be sharing on my blog here. Maybe as I write more I will get more comfortable with sharing more information.
-
2024
+
2024
So, what are my plans for 2024? Learn. Build. Ship.
@@ -1659,16 +1659,16 @@ Spies (2015): A secret agent must perform a heist without time on his side
https://web.navan.dev/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
- Introduction to AR.js and Natural Feature Tracking
+ id="introduction-to-arjs-and-natural-feature-tracking">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
+ Introduction to AR.js and Natural Feature Tracking
-
AR.js
+
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.
@@ -1676,7 +1676,7 @@ Spies (2015): A secret agent must perform a heist without time on his side
It was initially created by Jerome Etienne and is now maintained by Nicolo Carpignoli and the AR-js Organisation
-
NFT
+
NFT
Usually for augmented reality you need specialised markers, like this Hiro marker (notice the thick non-aesthetic borders 🤢)
@@ -1688,7 +1688,7 @@ Spies (2015): A secret agent must perform a heist without time on his side
-
Creating the Marker!
+
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'.
$ npm install
@@ -1731,12 +1731,12 @@ found 0 vulnerabilities
-
Copy the target marker to the folder
+
Copy the target marker to the folder
$ cp ~/CodingAndStuff/ARjs/me.png .
-
Generate Marker
+
Generate Marker
$ node app.js -i me.png
@@ -1805,7 +1805,7 @@ To run demo use: 'npm run demo'
me.fset me.fset3 me.iset
-
Creating the HTML Page
+
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.
@@ -1862,7 +1862,7 @@ me.fset me.fset3 me.iset
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!
-
Adding a simple box
+
Adding a simple box
Let us add a simple box!
@@ -1902,7 +1902,7 @@ Serving HTTP on 0.0.0.0 port 8000 ...
👏 Congratulations! You just built an Augmented Reality experience using AR.js and AFrame
-
Adding a Torus-Knot in the box
+
Adding a Torus-Knot in the box
Edit your index.html
@@ -1917,13 +1917,13 @@ Serving HTTP on 0.0.0.0 port 8000 ...
-
Where are the GIFs?
+
Where are the GIFs?
Now that we know how to place a box in the scene and add a torus knot in it, what do we do next? We bring the classic internet back!
AFrame GIF Shader is a gif shader for A-Frame created by mayognaise.
-
First things first
+
First things first
Add <script src="https://rawgit.com/mayognaise/aframe-gif-shader/master/dist/aframe-gif-shader.min.js"></script> to <head>
@@ -1937,15 +1937,15 @@ Serving HTTP on 0.0.0.0 port 8000 ...
-
Bonus Idea: Integrate it with GitHub's new profile Readme Feature!
+
Bonus Idea: Integrate it with GitHub's new profile Readme Feature!
-
1) Host the code using GitHub Pages
+
1) Host the code using GitHub Pages
-
2) Create a new repository ( the name should be your GitHub username )
+
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
+
3) Add QR Code to the page and tell the users to scan your profile picture
-
??) Profit 💸
+
??) 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 )
@@ -1958,40 +1958,40 @@ Serving HTTP on 0.0.0.0 port 8000 ...
https://web.navan.dev/posts/2022-11-07-a-new-method-to-blog.html
- A new method to blog
+ id="a-new-method-to-blog">A new method to blog
Writing posts in markdown using pen and paper
https://web.navan.dev/posts/2022-11-07-a-new-method-to-blog.html
Mon, 07 Nov 2022 23:29:00 -0000
- A new method to blog
+ A new method to blog
Here is the original PDF. I made some edits to the content after generating the markdown file
Paper Website is a service that lets you build a website with just pen and paper. I am going to try and replicate the process.
-
The Plan
+
The Plan
The continuity feature on macOS + iOS lets you scan PDFs directly from your iPhone. I want to be able to scan these pages and automatically run an Automator script that takes the PDF and OCRs the text. Then I can further clean the text and convert from markdown.
-
Challenges
+
Challenges
I quickly realised that the OCR software I planned on using could not detect my shitty handwriting accurately. I tried using ABBY Finereader, Prizmo and OCRMyPDF. (Abby Finereader and Prizmo support being automated by Automator).
Now, I could either write neater, or use an external API like Microsoft Azure
-
Solution
+
Solution
-
OCR
+
OCR
In the PDFs, all the scans are saved as images on a page. I extract the image and then send it to Azure's API.
-
Paragraph Breaks
+
Paragraph Breaks
The recognised text had multiple lines breaking in the middle of the sentence, Therefore, I use what is called a pilcrow to specify paragraph breaks. But, rather than trying to draw the normal pilcrow, I just use the HTML entity ¶ which is the pilcrow character.
-
Where is the code?
+
Where is the code?
I created a GitHub Gist for a sample Python script to take the PDF and print the text
@@ -2006,16 +2006,16 @@ Serving HTTP on 0.0.0.0 port 8000 ...
https://web.navan.dev/posts/2023-10-05-attack-lab.html
- Attack Lab
+ id="attack-lab">Attack Lab
Walkthrough of Attack Lab Phases 1-4 for CSCI 2400 Computer Systems
https://web.navan.dev/posts/2023-10-05-attack-lab.html
Thu, 05 Oct 2023 20:01:00 -0000
- Attack Lab
+ Attack Lab
-
Introduction
+
Introduction
Lab 3 for CSCI 2400 @ CU Boulder - Computer Systems
@@ -2028,7 +2028,7 @@ Serving HTTP on 0.0.0.0 port 8000 ...
objdump -d ctarget > dis.txt
-
Phase 1
+
Phase 1
From the instructions, we know that our task is to get CTARGET to execute the code for touch1 when getbuf executes its return statement, rather than returning to test
@@ -2084,7 +2084,7 @@ NICEJOB!
-
Phase 2
+
Phase 2
Phase 2 involves injecting a small amount of code as part of your exploit string.
@@ -2244,7 +2244,7 @@ NICEJOB!
-
Phase 3
+
Phase 3
Phase 3 also involves a code injection attack, but passing a string as argument.
@@ -2348,7 +2348,7 @@ NICEJOB!
Phases 1-3 Complete.
-
Phase 4
+
Phase 4
For Phase 4, you will repeat the attack of Phase 2, but do so on program RTARGET using gadgets from your
@@ -2480,18 +2480,18 @@ NICEJOB!
https://web.navan.dev/posts/2020-03-03-Playing-With-Android-TV.html
- Tinkering with an Android TV
+ id="tinkering-with-an-android-tv">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
+ 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
+
Developer-Settings
Go To Settings
@@ -2523,7 +2523,7 @@ NICEJOB!
Continuously click on the "Build" option until it says "You are a Developer"
-
Enable-ADB
+
Enable-ADB
Go to Settings
@@ -2531,7 +2531,7 @@ NICEJOB!
Scroll until you find ADB Debugging and enable that option
-
Connect-ADB
+
Connect-ADB
Open Terminal (Make sure you have ADB installed)
@@ -2539,22 +2539,22 @@ NICEJOB!
To test the connection run adb logcat
-
Manipulating Apps / Packages
+
Manipulating Apps / Packages
-
Listing Packages
+
Listing Packages
adb shell
pm list packages
-
Installing Packages
+
Installing Packages
adb install -r package.apk
-
Uninstalling Packages
+
Uninstalling Packages
adb uninstall com.company.yourpackagename
@@ -2567,14 +2567,14 @@ NICEJOB!
https://web.navan.dev/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
- Polynomial Regression Using TensorFlow
+ id="polynomial-regression-using-tensorflow">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
+ Polynomial Regression Using TensorFlow
In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.
@@ -2588,19 +2588,19 @@ NICEJOB!
Quintic
-
Regression
+
Regression
-
What is 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
+
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).
-
Imports
+
Imports
importtensorflow.compat.v1astf
@@ -2611,9 +2611,9 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Dataset
+
Dataset
-
Creating Random Data
+
Creating Random Data
Even though in this tutorial we will use a Position Vs Salary dataset, it is important to know how to create synthetic data
@@ -2635,7 +2635,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Position vs Salary Dataset
+
Position vs Salary Dataset
We will be using https://drive.google.com/file/d/1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9/view (Salary vs Position Dataset)
@@ -2690,7 +2690,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Defining Stuff
+
Defining Stuff
X=tf.placeholder("float")
@@ -2698,7 +2698,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Defining Variables
+
Defining Variables
We first define all the coefficients and constant as tensorflow variables having a random initial value
@@ -2712,7 +2712,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Model Configuration
+
Model Configuration
learning_rate=0.2
@@ -2720,7 +2720,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Equations
+
Equations
deg1=a*X+b
@@ -2731,7 +2731,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Cost Function
+
Cost Function
We use the Mean Squared Error Function
@@ -2744,7 +2744,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Optimizer
+
Optimizer
We use the AdamOptimizer for the polynomial functions and GradientDescentOptimizer for the linear function
@@ -2762,12 +2762,12 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Model Predictions
+
Model Predictions
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.
-
Linear Equation
+
Linear Equation
withtf.Session()assess:
@@ -2831,7 +2831,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Quadratic Equation
+
Quadratic Equation
withtf.Session()assess:
@@ -2896,7 +2896,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Cubic
+
Cubic
withtf.Session()assess:
@@ -2962,7 +2962,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Quartic
+
Quartic
withtf.Session()assess:
@@ -3029,7 +3029,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Quintic
+
Quintic
withtf.Session()assess:
@@ -3095,13 +3095,13 @@ values using the X values. We then plot it to compare the actual data and predic
-
Results and Conclusion
+
Results and Conclusion
You just learnt Polynomial Regression using TensorFlow!
-
Notes
+
Notes
-
Overfitting
+
Overfitting
@@ -3123,14 +3123,14 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2019-12-04-Google-Teachable-Machines.html
- Image Classifier With Teachable Machines
+ id="image-classifier-with-teachable-machines">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
+ Image Classifier With Teachable Machines
Made for Google Code-In
@@ -3138,7 +3138,7 @@ values using the X values. We then plot it to compare the actual data and predic
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
+
Details
1) Collecting Data
@@ -3187,14 +3187,14 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
- Quadratic Formula Derivation
+ id="quadratic-formula-derivation">Quadratic Formula Derivation
Quick derivation of the quadratic equation by completing the square
https://web.navan.dev/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
Tue, 26 Mar 2024 15:36:00 -0000
- Quadratic Formula Derivation
+ Quadratic Formula Derivation
The standard form of a quadratic equation is:
@@ -3233,14 +3233,14 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2022-08-05-Why-You-No-Host.html
- Why You No Host?
+ id="why-you-no-host">Why You No Host?
Why you should self-host with YunoHost
https://web.navan.dev/posts/2022-08-05-Why-You-No-Host.html
Fri, 05 Aug 2022 14:46:00 -0000
- Why You No Host?
+ Why You No Host?
@@ -3248,7 +3248,7 @@ values using the X values. We then plot it to compare the actual data and predic
The title refers to the “Y U No Host” internet meme, which led to the name of “YunoHost”, an operating system aiming to democratise self-hosting. This post tries to discuss the idea that anyone can self-host and why you should consider YunoHost.
-
Should you Self-Host?
+
Should you Self-Host?
Do you get annoyed when half of the internet goes down because everything a few major companies host the majority of the internet?
@@ -3273,11 +3273,11 @@ values using the X values. We then plot it to compare the actual data and predic
These are just some of the reasons to self-host.
-
What if you don’t know anything?
+
What if you don’t know anything?
No one is born with the knowledge of knowing how to orchestrate a cluster. You can always learn how to, but sometimes you just don’t have the time or energy. YunoHost tries to ease this issue by providing a clean web-interface. You do not even need to touch the command line for all the basic tasks.
-
What should you self-host?
+
What should you self-host?
Anything and everything! The best part about self-hosting is that you own the data. This data is not going to be sold to the highest bidder.
@@ -3289,7 +3289,7 @@ values using the X values. We then plot it to compare the actual data and predic
Although you can do all of this (and much more!) without needing to use YunoHost, it just makes it easy to manage.
-
What do I need to self-host?
+
What do I need to self-host?
A decent internet connection if you plan on using the services outside your home network and hosting at home
@@ -3303,7 +3303,7 @@ values using the X values. We then plot it to compare the actual data and predic
YunoHost is a server operating system which takes guesswork out of Self-Hosting. Out of the box it provides:
@@ -3319,7 +3319,7 @@ values using the X values. We then plot it to compare the actual data and predic
and much more!
-
Why did I choose YunoHost?
+
Why did I choose YunoHost?
I began my self-hosting journey with a Raspberry Pi 4 (4GB). I looked at tons of options for the base management layer:
@@ -3348,65 +3348,65 @@ values using the X values. We then plot it to compare the actual data and predic
Also, YunoHost has been here for a long time! Here is an old Hacker News post about YunoHost. All the projects mentioned in the comments? Dead.
-
What do I self-host?
+
What do I self-host?
-
audiobookshelf - an audiobook server
+
audiobookshelf - an audiobook server
-
ergo chat - an IRC server
+
ergo chat - an IRC server
-
FreshRSS - RSS aggregator
+
FreshRSS - RSS aggregator
-
Gitea - self-hosted git
+
Gitea - self-hosted git
-
+
-
Grafana - Metrics dashboard
+
Grafana - Metrics dashboard
-
Home Assistant - Home automation platform
+
Home Assistant - Home automation platform
-
Jellyfin - Media server
+
Jellyfin - Media server
-
Listmonk - Newsletter and Mailing List manager
+
Listmonk - Newsletter and Mailing List manager
-
MinIO Server - S3 compatible storage server
+
MinIO Server - S3 compatible storage server
-
Nextcloud - Storage, file-sharing, e.t.c
+
Nextcloud - Storage, file-sharing, e.t.c
-
Syncthing - continuous file synchronization
+
Syncthing - continuous file synchronization
-
Vaultwarden - Bitwarden server
+
Vaultwarden - Bitwarden server
-
Wallabag - Read it later app
+
Wallabag - Read it later app
-
h5ai - HTTP server index
+
h5ai - HTTP server index
-
How do I install YunoHost?
+
How do I install YunoHost?
Install minimal Debian 10/11 on your preferred machine
@@ -3415,7 +3415,7 @@ values using the X values. We then plot it to compare the actual data and predic
Done!
-
Should you actually self-host everything?
+
Should you actually self-host everything?
Highly context dependent. I run two YunoHost servers in two different locations. One of the ISP has actually blacklisted the residential IP address range and does not let me change my reverseDNS, which means all my outgoing emails are marked as spam. On the other hand, the other ISP gave a clean static IP and the server managed for a small business is not at all problematic for emailing. YMMV but at least you know you have an option.
]]>
@@ -3426,19 +3426,19 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2021-06-25-NFC-Music-Cards-Basic-iOS.html
- Basic NFC Music Cards for iOS
+ id="basic-nfc-music-cards-for-ios">Basic NFC Music Cards for iOS
Basic NFC Music Cards on iOS with Shortcuts
https://web.navan.dev/posts/2021-06-25-NFC-Music-Cards-Basic-iOS.html
Fri, 25 Jun 2021 16:20:00 -0000
- Basic NFC Music Cards for iOS
+ Basic NFC Music Cards for iOS
I had a pack of NFC cards and decided it was the perfect time to create Music Cards. I do not have a "music setup."
So, I did not have to ensure this could work with any device. I settled with using Shortcuts personal Automation.
-
Designing the Template
+
Designing the Template
I tried measuring the card's dimensions with the in-built Measure app, but it was off by a few mm.
@@ -3450,7 +3450,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
-
Creating the Automation
+
Creating the Automation
I created a personal automation in the Shortcuts app which got triggered when a particular NFC card was scanned, ask playback destination and play the album/playlist.
@@ -3458,7 +3458,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
-
Demo
+
Demo
]]>
@@ -3469,16 +3469,16 @@ So, I did not have to ensure this could work with any device. I settled with usi
https://web.navan.dev/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
- Creating your own custom theme for Snowboard or Anemone
+ id="creating-your-own-custom-theme-for-snowboard-or-anemone">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
+ Creating your own custom theme for Snowboard or Anemone
-
Contents
+
Contents
Getting Started
@@ -3490,7 +3490,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
Building the DEB
-
Getting Started
+
Getting Started
Note: Without the proper folder structure, your theme may not show up!
@@ -3499,7 +3499,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
Within themeName.theme folder, create another folder called IconBundles (You cannot change this name)
-
Theme Configuration
+
Theme Configuration
Now, inside the themeName.theme folder, create a file called Info.plist and paste the following
@@ -3526,7 +3526,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
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 separately 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
+
Creating Icons
Open up the Image Editor of your choice and create a new file having a resolution of 512x512
@@ -3537,7 +3537,7 @@ Then, you would name the package MyTheme and include two themes Want to create rounded icons?
Create them squared only, we will learn how to apply masks!
-
Exporting Icons
+
Exporting Icons
Note: All icons must be saved as *.png (Tip: This means you can even create partially transparent icons!)
@@ -3545,7 +3545,7 @@ Create them squared only, we will learn how to apply masks!
All Icons must be saved in themeName.theme>IconBundles as bundleID-large.png
-
Finding BundleIDs
+
Finding BundleIDs
Stock Application BundleIDs
@@ -3711,7 +3711,7 @@ Create them squared only, we will learn how to apply masks!
Create a new folder outside themeName.theme with the name you want to be shown on Cydia, e.g themeNameForCydia
@@ -3853,11 +3853,11 @@ Section: Themes
Finally, copy themeName.theme to the Themes folder (Copy the entire folder, not just the contents)
-
Building the DEB
+
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
+
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
@@ -3870,13 +3870,13 @@ Section: Themes
Now, run find . -name "*.DS_Store" -type f -delete
-
Pre-Requisite for Windows Users
+
Pre-Requisite for Windows Users
SSH into your iPhone and drag and drop the themeNameForCyia folder on the terminal
-
Common Instructions
+
Common Instructions
You should be at the root of the folder in the terminal, i.e Inside themeNameForCydia
@@ -3901,14 +3901,14 @@ Section: Themes
https://web.navan.dev/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
- Fixing X11 Error on macOS Catalina for AmberTools 18/19
+ id="fixing-x11-error-on-macos-catalina-for-ambertools-1819">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
+ 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.
@@ -3933,7 +3933,7 @@ 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
+
The Fix
Simply reinstalling XQuartz using homebrew fixed the error brew cask reinstall xquartz
@@ -3946,14 +3946,14 @@ Configure failed due to the errors above!
https://web.navan.dev/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html
- Making a Crude ML Powered Chatbot in Swift using CoreML
+ id="making-a-crude-ml-powered-chatbot-in-swift-using-coreml">Making a Crude ML Powered Chatbot in Swift using CoreML
Writing a simple Machine-Learning powered Chatbot (or, daresay virtual personal assistant ) in Swift using CoreML.
https://web.navan.dev/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html
Sun, 27 Jun 2021 23:26:00 -0000
- Making a Crude ML Powered Chatbot in Swift using CoreML
+ Making a Crude ML Powered Chatbot in Swift using CoreML
A chatbot/virtual assistant, on paper, looks easy to build.
The user says something, the programs finds the best action, checks if additional input is required and sends back the output.
@@ -3961,7 +3961,7 @@ To do this in Swift, I used two separate ML Models created using Apple's Create
First is a Text Classifier to classify intent, and the other a word tagger for extracting input from the input message.
Disclaimer: This is a very crude proof-of-concept, but it does work.
-
Text Classifier
+
Text Classifier
I opened a CSV file and added some sample entries, with a corresponding label.
@@ -3993,7 +3993,7 @@ i love you,banter
-
Word Tagging
+
Word Tagging
This is useful to extract the required variables directly from the user's input.
This model will be only called if the intent from the classifier is a custom action.
@@ -4021,7 +4021,7 @@ I created a sample JSON with only 3 examples (I know, very less, but works for a
-
Time to Get Swift-y
+
Time to Get Swift-y
The initial part is easy, importing CoreML and NaturalLanguage and then initializing the models and the tagger.
@@ -4137,14 +4137,14 @@ Otherwise, it calls the custom action.
https://web.navan.dev/posts/2024-02-26-control-element-under-another-element-html-css.html
- Interacting with underlying element in HTML
+ id="interacting-with-underlying-element-in-html">Interacting with underlying element in HTML
With CSS you can disable any interactions with an element and directly control the underlying element
https://web.navan.dev/posts/2024-02-26-control-element-under-another-element-html-css.html
Mon, 26 Feb 2024 11:57:00 -0000
- Interacting with underlying element in HTML
+ Interacting with underlying element in HTML
I know that the title is a bit weird. I was trying to interact with a video under an iPhone Bezel Screen frame.
@@ -4176,7 +4176,7 @@ Otherwise, it calls the custom action.
Let us try this in a simple example.
-
Example
+
Example
Here, we create a button and overlay a transparent box
@@ -4224,14 +4224,14 @@ A box with 200px height and 300px width
https://web.navan.dev/posts/2019-12-10-TensorFlow-Model-Prediction.html
- Making Predictions using Image Classifier (TensorFlow)
+ id="making-predictions-using-image-classifier-tensorflow">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)
+ Making Predictions using Image Classifier (TensorFlow)
This was tested on TF 2.x and works as of 2019-12-10
@@ -4298,14 +4298,14 @@ A box with 200px height and 300px width
https://web.navan.dev/posts/2020-07-01-Install-rdkit-colab.html
- Installing RDKit on Google Colab
+ id="installing-rdkit-on-google-colab">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
+ Installing RDKit on Google Colab
EDIT: Try installing RDKit using pip
@@ -4313,7 +4313,7 @@ A box with 200px height and 300px width
-
Old Method (Still Works)
+
Old Method (Still Works)
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 :/
@@ -4418,16 +4418,16 @@ logger.info("rdkit-{} installation finished!".format(rdkit.__version__))
https://web.navan.dev/posts/2023-10-04-bomb-lab.html
- Bomb Lab
+ id="bomb-lab">Bomb Lab
Walkthrough of Phases 1-6 of Bomb Lab for CSCI 2400 Computer Systems Lab 2
https://web.navan.dev/posts/2023-10-04-bomb-lab.html
Wed, 04 Oct 2023 13:12:00 -0000
- Bomb Lab
+ Bomb Lab
-
Introduction
+
Introduction
Lab 2 for CSCI 2400 @ CU Boulder - Computer Systems
Goodwork!Ontothenext...
@@ -5524,25 +5524,25 @@ Your instructor has been notified and will verify your solution.
https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html
- Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+ id="generating-https-certificate-using-dns-a-challenge-through-lets-encrypt">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
+ 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.
-
Dependencies
+
Dependencies
sudoaptupdate&&sudoaptinstallcertbot-y
-
Get the Certificate
+
Get the Certificate
sudocertbotcertonly--manual--preferred-challengesdns-01--emailsenpai@email.com-dmydomain.duckdns.org
@@ -5587,11 +5587,11 @@ navanspi.duckdns.org.60Once 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
+
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.
-
Using the Certificate with Gunicorn
+
Using the Certificate with Gunicorn
Example Gunicorn command for running a web-app:
@@ -5616,27 +5616,27 @@ navanspi.duckdns.org.60
- Building a Fake News Detector with Turicreate
+ id="building-a-fake-news-detector-with-turicreate">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
+ 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
+
Building the Machine Learning Model
-
Data Gathering
+
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
+
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
@@ -5651,7 +5651,7 @@ a CUDA compatible MXNet package.
If you do not wish to train on GPU or are running it on your computer, you can ignore the last two lines
-
Downloading the Dataset
+
Downloading the Dataset
!wget -q "https://github.com/joolsa/fake_real_news_dataset/raw/master/fake_or_real_news.csv.zip"
@@ -5659,7 +5659,7 @@ a CUDA compatible MXNet package.
-
Model Creation
+
Model Creation
importturicreateastc
@@ -5679,14 +5679,14 @@ a CUDA compatible MXNet package.
-
Splitting Dataset
+
Splitting Dataset
train,test=dataSFrame.random_split(.9)
-
Training
+
Training
model=tc.text_classifier.create(
@@ -5711,7 +5711,7 @@ a CUDA compatible MXNet package.
-
Testing the Model
+
Testing the Model
est_predictions=model.predict(test)
@@ -5744,7 +5744,7 @@ a CUDA compatible MXNet package.
-
Exporting the Model
+
Exporting the Model
model_name='FakeNews'
@@ -5757,9 +5757,9 @@ a CUDA compatible MXNet package.
First we create a single view app (make sure you check the use SwiftUI button)
@@ -5894,14 +5894,14 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
https://web.navan.dev/posts/2020-12-1-HTML-JS-RSS-Feed.html
- RSS Feed written in HTML + JavaScript
+ id="rss-feed-written-in-html-javascript">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
+ 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=""
@@ -6111,18 +6111,18 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
https://web.navan.dev/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html
- How to setup Bluetooth on a Raspberry Pi
+ id="how-to-setup-bluetooth-on-a-raspberry-pi">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
+ How to setup Bluetooth on a Raspberry Pi
This was tested on a Raspberry Pi Zero W
-
Enter in the Bluetooth Mode
+
Enter in the Bluetooth Mode
pi@raspberrypi:~ $ bluetoothctl
@@ -6132,7 +6132,7 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
[bluetooth]# scan on
-
To Pair
+
To Pair
While being in bluetooth mode
@@ -6147,23 +6147,23 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
https://web.navan.dev/posts/2022-12-25-blog-to-toot.html
- Posting blogs as Mastodon Toots
+ id="posting-blogs-as-mastodon-toots">Posting blogs as Mastodon Toots
Cross posting blog posts to Mastodon
https://web.navan.dev/posts/2022-12-25-blog-to-toot.html
Sun, 25 Dec 2022 17:32:00 -0000
- Posting blogs as Mastodon Toots
+ Posting blogs as Mastodon Toots
What is better than posting a blog post? Posting about your posting pipeline. I did this previously with Twitter.
-
the elephant in the room
+
the elephant in the room
mastodon.social does not support any formatting in the status posts.
Yes, there are other instances which have patches to enable features such as markdown formatting, but there is no upstream support.
-
time to code
+
time to code
My website is built using a really simple static site generator I wrote in Python.
Therefore, each post is self-contained in a Markdown file with the necessary metadata.
@@ -6172,13 +6172,13 @@ Therefore, each post is self-contained in a Markdown file with the necessary met
I initially planned on having a command line parser and some more flags.
-
interacting with mastodon
+
interacting with mastodon
I ended up using mastodon.py rather than crafting requests by hand. Each statuspost/toot call returns a statusid that can be then used as an inreplyto parameter.
For the code snippets, seeing that mastodon does not support native formatting, I am resorting to using ray-so.
-
reading markdown
+
reading markdown
I am using a bunch of regex hacks, and reading the blog post line by line.
Because there is no markdown support, I append all the links to the end of the toot.
@@ -6207,7 +6207,7 @@ In this case, I can extract the tags from the front matter.
@@ -6227,19 +6227,19 @@ In this case, I can extract the tags from the front matter.
-
threads! threads! threads!
+
threads! threads! threads!
Even though mastodon does officially have a higher character limit than Twitter.
I prefer the way threads look.
-
result
+
result
Everything does seem to work!
Seeing that you are reading this on Mastodon, and that I have updated this section.
-
what's next?
+
what's next?
Here is the current code:
@@ -6443,14 +6443,14 @@ Seeing that you are reading this on Mastodon, and that I have updated this secti
https://web.navan.dev/posts/2023-04-30-n-body-simulation.html
- n-body solution generator
+ id="n-body-solution-generator">n-body solution generator
n-body solution generator and solver
https://web.navan.dev/posts/2023-04-30-n-body-simulation.html
Sun, 30 Apr 2023 22:50:00 -0000
- n-body solution generator
+ n-body solution generator
This post requires JavaScript to be viewed properly :(
@@ -6467,7 +6467,7 @@ Seeing that you are reading this on Mastodon, and that I have updated this secti
To workaround memory issues, the simulations are only run on-demand when the user clicks the respective button. Scroll down to the bottom of the page to see the results.
-
The n-body problem
+
The n-body problem
The n-body problem is a classic puzzle in physics (and thus astrophysics) and mathematics that deals with predicting the motion of multiple celestial objects that interact with each other through gravitational forces.
@@ -6477,7 +6477,7 @@ Seeing that you are reading this on Mastodon, and that I have updated this secti
As the number of objects increases, finding an exact solution becomes impossible, and we rely on analytical approximations.
-
Visualising a basic orbit
+
Visualising a basic orbit
If we want to create a n-body simulation in our browser, we need to figure out how we are going to visualise the motion of the objects. There are a few ways to do this, but the easiest is to use Plotly.js, a JavaScript library for creating interactive graphs. (An alternative is to use the HTML5 canvas element).
@@ -6544,7 +6544,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
Finally, we normalize the position data by dividing it by the astronomical unit (AU) to make it more visually meaningful. We also create a circle for reference, which represents a perfect circular orbit. The code ends with the data for the Sun's position, Earth's orbit, and the reference circle ready to be plotted.
-
Plotting the orbit
+
Plotting the orbit
Now that we have the data for the Sun's position, Earth's orbit, and the reference circle, we can plot them using Plotly.js.
@@ -6618,7 +6618,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
-
Figure of 8 orbit
+
Figure of 8 orbit
The figure of 8 solution[2] in the three-body problem refers to a unique and special trajectory where three celestial bodies (e.g., planets, stars) move in a figure of 8 shaped pattern around their mutual center of mass. This is special because it represents a stable and periodic solution to the three-body problem, which is known for its complexity and lack of general solutions.
@@ -6632,7 +6632,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
It looks cool!
-
Show me the code
+
Show me the code
The code for this simulation is very similar to the Earth-Sun orbit simulation, except that we now have three bodies instead of two. We also use a different set of initial conditions to generate the figure of 8 orbit.
@@ -6724,7 +6724,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
Finally, a loop iterates over each time step, updating the positions and velocities of the celestial bodies using the step function. The updated coordinates are stored in the X, Y, VX, and VY arrays.
-
Animation?
+
Animation?
Now that we have time-series data, we need to animate it. We can use Plotly's animate function, as this does not force a full re-render, saving us some precious GPU and CPU cycles when we are trying to run this in the browser itself
@@ -6844,9 +6844,9 @@ Next, the function dR takes the position r and velocity v of Earth as input and
-
"General" N-Body Solver
+
"General" N-Body Solver
-
Show me the code!
+
Show me the code!
functionstep(coords,masses,deltaT,nBodies=3,G=6.67408313131313e-11){
@@ -7081,7 +7081,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
-
Playground
+
Playground
@@ -7165,7 +7165,7 @@ function plotRandomNBodySimulation() {
-
References
+
References
Barrow-Green, June (2008), "The Three-Body Problem", in Gowers, Timothy; Barrow-Green, June; Leader, Imre (eds.), The Princeton Companion to Mathematics, Princeton University Press, pp. 726–728
@@ -7179,14 +7179,14 @@ function plotRandomNBodySimulation() {
https://web.navan.dev/posts/2020-01-14-Converting-between-PIL-NumPy.html
- Converting between image and NumPy array
+ id="converting-between-image-and-numpy-array">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
+ Converting between image and NumPy array
importnumpy
@@ -7201,7 +7201,7 @@ function plotRandomNBodySimulation() {
-
Saving an Image
+
Saving an Image
try:
@@ -7219,14 +7219,14 @@ function plotRandomNBodySimulation() {
https://web.navan.dev/posts/2019-12-08-Splitting-Zips.html
- Splitting ZIPs into Multiple Parts
+ id="splitting-zips-into-multiple-parts">Splitting ZIPs into Multiple Parts
Short code snippet for splitting zips.
https://web.navan.dev/posts/2019-12-08-Splitting-Zips.html
Sun, 08 Dec 2019 13:27:00 -0000
- Splitting ZIPs into Multiple Parts
+ Splitting ZIPs into Multiple Parts
Tested on macOS
@@ -7262,22 +7262,22 @@ function plotRandomNBodySimulation() {
https://web.navan.dev/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html
- Compiling AutoDock Vina on iOS
+ id="compiling-autodock-vina-on-ios">Compiling AutoDock Vina on iOS
Compiling AutoDock Vina on iOS
https://web.navan.dev/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html
Tue, 02 Jun 2020 23:23:00 -0000
- Compiling AutoDock Vina on iOS
+ Compiling AutoDock Vina on iOS
Why? Because I can.
-
Installing makedepend
+
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
+
Editing the Makefile
Original Makefile ( I used the provided mac Makefile base )
@@ -7308,11 +7308,11 @@ include ../../makefile_common
-
Updating the Source Code
+
Updating the Source Code
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
+
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);
@@ -7323,7 +7323,7 @@ return path(str, boost::filesystem::native);
return path(str)
-
Error 2 - No Member Named 'nativefilestring'
+
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";
@@ -7336,15 +7336,15 @@ return path(str, boost::filesystem::native);
Turns out native_file_string was deprecated in Boost 1.57 and replaced with just string
-
Error 3 - Library Not Found
+
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.
+
Error 4 - No Member Named 'nativefilestring' Again.
But, this time in another file and I quickly fixed it
-
Moment of Truth
+
Moment of Truth
Obviously it was working on my iPad, but would it work on another device? I transferred the compiled binary and
@@ -7359,18 +7359,18 @@ return path(str, boost::filesystem::native);
https://web.navan.dev/posts/2023-02-08-Interact-with-siri-from-the-terminal.html
- Interacting with Siri using the command line
+ id="interacting-with-siri-using-the-command-line">Interacting with Siri using the command line
Code snippet to interact with Siri by issuing commands from the command-line.
https://web.navan.dev/posts/2023-02-08-Interact-with-siri-from-the-terminal.html
Wed, 08 Feb 2023 17:21:00 -0000
- Interacting with Siri using the command line
+ Interacting with Siri using the command line
My main objective was to see if I could issue multi-intent commands in one go. Obviously, Siri cannot do that (neither can Alexa, Cortana, or Google Assistant). The script here can issue either a single command, or use the help of OpenAI's DaVinci model to extract multiple commands and pass them onto siri.
Enable the Terminal to control System Events (The first time you run the script, it will prompt you to enable it)
-
Show me ze code
+
Show me ze code
If you are here just for the code:
@@ -7458,11 +7458,11 @@ python3main.py&
-
ELI5
+
ELI5
I am not actually going to explain it as if I am explaining to a five-year old kid.
-
AppleScript
+
AppleScript
In the age of Siri Shortcuts, AppleScript can still do more. It is a scripting language created by Apple that can help you automate pretty much anything you see on your screen.
@@ -7513,11 +7513,11 @@ python3main.py&
-
Multi-Intent Commands
+
Multi-Intent Commands
We can call OpenAI's API to autocomplete our prompt and extract multiple commands. We don't need to use OpenAI's API, and can also simply use Google's Flan-T5 model using HuggingFace's transformers library.
-
Ze Prompt
+
Ze Prompt
You are provided with multiple commands as a single command. Break down all the commands and return them in a list of strings. If you are provided with a single command, return a list with a single string, trying your best to understand the command.
@@ -7539,7 +7539,7 @@ python3main.py&
This prompt gives the model a few examples to increase the generation accuracy, along with instructing it to return a Python list.
To finish it all off, we can use argparse to only send the input command to OpenAI when asked to do so.
@@ -7593,7 +7593,7 @@ python3main.py&
-
Conclusion
+
Conclusion
Siri is still dumb. When I ask it to Switch off the lights, it default to the home thousands of miles away. But, this code snippet definitely does work!
]]>
@@ -7604,20 +7604,20 @@ python3main.py&
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
+ id="creating-a-custom-image-classifier-using-turicreate-to-detect-smoke-and-fire">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
+ 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
@@ -7888,14 +7888,14 @@ python3main.py&
https://web.navan.dev/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
- Trying Different Camera Setups
+ id="trying-different-camera-setups">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
+ Trying Different Camera Setups
Animated Overlays
@@ -7904,7 +7904,7 @@ python3main.py&
Using a USB Camera
-
Comparison
+
Comparison
Here are the results before you begin reading.
@@ -7916,13 +7916,13 @@ python3main.py&
-
Prerequisites
+
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.
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
+
2.1 Using your iPhone using Quicktime
Connect your iPhone via a USB cable, then Open Quicktime -> File -> New Movie Recording
2.2 Using your iPhone using an application like Camo
+
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
+
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)
@@ -8012,14 +8012,14 @@ new Dics({
https://web.navan.dev/posts/2021-06-26-Cheminformatics-On-The-Web-2021.html
- Cheminformatics on the Web (2021)
+ id="cheminformatics-on-the-web-2021">Cheminformatics on the Web (2021)
Summarising Cheminformatics on the web in 2021.
https://web.navan.dev/posts/2021-06-26-Cheminformatics-On-The-Web-2021.html
Sat, 26 Jun 2021 13:04:00 -0000
- Cheminformatics on the Web (2021)
+ Cheminformatics on the Web (2021)
Here, I have compiled a list of some libraries and possible ideas.
I, personally, like static websites which don't require a server side application and can be hosted on platforms like GitHub Pages.
@@ -8027,12 +8027,12 @@ Or, just by opening the HTML file and running it in your browser.
WebAssembly (Wasm) has made running code written for other platforms on the web relatively easier.
Combine Wasm with some pure JavaScript libraries, and you get a platform to quickly amp up your speed in some common tasks.
-
RDKit
+
RDKit
RDKit bundles a minimal JavaScript Wrapper in their core RDKit suite.
This is perfect for generating 2D Figures (HTML5 Canva/SVGs), Canonical SMILES, Descriptors e.t.c
-
Substructure Matching
+
Substructure Matching
This can be used to flag undesirable functional groups in a given compound.
Create a simple key:value pairs of name:SMARTS and use it to highlight substructure matches.
@@ -8040,13 +8040,13 @@ Thus, something like PostEra's Medicinal Chemistry Alert can be done with RDKit-
-
Computing Properties
+
Computing Properties
This is useful to calculate basic properties of a given compound.
-
Webina - Molecular Docking
+
Webina - Molecular Docking
Webina is a JavaScript/Wasm library that runs AutoDock Vina, which can enable you to run Molecular Docking straight in the browser itself.
@@ -8058,7 +8058,7 @@ Due to Spectre, this feature was disabled on all browsers.
Currently, only Chromium-based and Firefox browsers have reimplemented and enabled it.
Hopefully, soon, this will be again supported by all major browsers.
-
The project aims to port cheminformatics libraries into JavaScript via Emscripten.
They have ported InChI, Indigo, OpenBabel, and OpenMD
-
Kekule.js
+
Kekule.js
It is written by @partridgejiang, who is behind the Cheminfo-to-web project
@@ -8081,19 +8081,19 @@ They have ported InChI, Indigo, OpenBabel, and OpenMD
It is molecule-centric, focusing on providing the ability to represent, draw, edit, compare and search molecule structures on web browsers.
-
Browser Extensions
+
Browser Extensions
The previous machine learning examples can be packaged as browser-extensions to perform tasks on the article you are reading.
With iOS 15 bringing WebExtensions to iOS/iPadOS, the same browser extension source code can be now used on Desktop and Mobile Phones.
You can quickly create an extension to convert PDB codes into links to RCSB, highlight SMILES, highlight output of NER models, e.t.c
-
Conclusion
+
Conclusion
I have not even touched all the bases of cheminformatics for the web here.
There is still a lot more to unpack.
Hopefully, this encourages you to explore the world of cheminformatics on the web.
@@ -8108,16 +8108,16 @@ Hopefully, this encourages you to explore the world of cheminformatics on the we
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
+ id="workflow-for-lightning-fast-molecular-docking-part-one">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
+ Workflow for Lightning Fast Molecular Docking Part One
-
My Setup
+
My Setup
macOS Catalina ( RIP 32bit app)
@@ -8126,7 +8126,7 @@ Hopefully, this encourages you to explore the world of cheminformatics on the we
@@ -8168,14 +8168,14 @@ alias pbpaste='xclip -selection clipboard -o'
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
+ id="detecting-driver-fatigue-over-speeding-and-speeding-up-post-accident-response">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
+ Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
Based on the project showcased at Toyota Hackathon, IITD - 17/18th December 2018
@@ -8187,12 +8187,12 @@ alias pbpaste='xclip -selection clipboard -o'
Recommended citation:
-
ATP
+
ATP
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
+
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}}
@@ -8204,14 +8204,14 @@ alias pbpaste='xclip -selection clipboard -o'
https://web.navan.dev/publications/2020-03-14-generating-vaporwave.html
- Is it possible to programmatically generate Vaporwave?
+ id="is-it-possible-to-programmatically-generate-vaporwave">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?
+ Is it possible to programmatically generate Vaporwave?
This is still a pre-print.
@@ -8219,22 +8219,22 @@ alias pbpaste='xclip -selection clipboard -o'
Recommended citation:
-
APA
+
APA
Chauhan, N. (2020, March 15). Is it possible to programmatically generate Vaporwave?. https://doi.org/10.35543/osf.io/9um2r
-
MLA
+
MLA
Chauhan, Navan. “Is It Possible to Programmatically Generate Vaporwave?.” IndiaRxiv, 15 Mar. 2020. Web.
-
Chicago
+
Chicago
Chauhan, Navan. 2020. “Is It Possible to Programmatically Generate Vaporwave?.” IndiaRxiv. March 15. doi:10.35543/osf.io/9um2r.
-
Bibtex
+
Bibtex
@misc{chauhan_2020,
title={Is it possible to programmatically generate Vaporwave?},
@@ -8254,14 +8254,14 @@ alias pbpaste='xclip -selection clipboard -o'
https://web.navan.dev/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html
- Possible Drug Candidates for COVID-19
+ id="possible-drug-candidates-for-covid-19">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
+ Possible Drug Candidates for COVID-19
This is still a pre-print.
@@ -8274,14 +8274,14 @@ alias pbpaste='xclip -selection clipboard -o'
https://web.navan.dev/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.html
- Bike Soda Can Holder
+ id="bike-soda-can-holder">Bike Soda Can Holder
Carry your favourite soda (or beer) can with you while you ride
https://web.navan.dev/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.html
Sat, 17 Feb 2024 18:42:00 -0000
- Bike Soda Can Holder
+ Bike Soda Can Holder
Ever wanted a nice craft soda, or a natty light during your ride? Mounts to the standard bottle cage holes on your bike.
@@ -8306,7 +8306,7 @@ model-viewer {
}
-
Current Variations
+
Current Variations
Standard 12oz Can
@@ -8322,18 +8322,18 @@ model-viewer {
https://web.navan.dev/ideas/2022-12-17-ar-mr-xr.html
- AR XR MR
+ id="ar-xr-mr">AR XR MR
Data dump from my notes
https://web.navan.dev/ideas/2022-12-17-ar-mr-xr.html
Sat, 17 Dec 2022 19:43:00 -0000
- AR XR MR
+ AR XR MR
Last Updated: 2022-12-17
-
Projects
+
Projects
All projects listed here are in the following format:
@@ -8404,26 +8404,26 @@ model-viewer {
-
Resources
+
Resources
For latest updates, r/ARMRXR is one of the best resources out there.
Until WebXR actually becomes a thing and gets support on Safari, depending on the use case any of the frameworks can be used right now with each having their own pros and cons. Otherwise, for displaying simple models Google's ModelViewer framework can be used to integrate with the native AR frameworks for both iOS and Android to display glTF/USDZ models.
-
Ideas
+
Ideas
-
Safety Checklist for CUBRT
+
Safety Checklist for CUBRT
Would be nice to have an AR app/website that goes through all the safety checklists on our cars, so we never have to see another loose fuel line blow up the entire car.
Possible solution: Add a fiduciary marker under the hood of the car and use it to highlight areas which need to be checked, or multiple markers which are activated in a particular order and show up as disabled until you complete the previous step.
-
App Clips
+
App Clips
Although App Clips on iOS have limited capabilities available to them, ARKit is one of them. This means, a QR code / NFC trigger can be used to launch a mini ARKit based App Clip.
-
Non-AR Smart Glasses
+
Non-AR Smart Glasses
Not every pair of smart glasses need to have AR based surface tracking / SLAM, to display stuff. Just a simple display which can overlay elements on the real world should be capable of displaying tons of data
All projects listed here are in the following format:
@@ -119,26 +119,26 @@
-
Resources
+
Resources
For latest updates, r/ARMRXR is one of the best resources out there.
Until WebXR actually becomes a thing and gets support on Safari, depending on the use case any of the frameworks can be used right now with each having their own pros and cons. Otherwise, for displaying simple models Google's ModelViewer framework can be used to integrate with the native AR frameworks for both iOS and Android to display glTF/USDZ models.
-
Ideas
+
Ideas
-
Safety Checklist for CUBRT
+
Safety Checklist for CUBRT
Would be nice to have an AR app/website that goes through all the safety checklists on our cars, so we never have to see another loose fuel line blow up the entire car.
Possible solution: Add a fiduciary marker under the hood of the car and use it to highlight areas which need to be checked, or multiple markers which are activated in a particular order and show up as disabled until you complete the previous step.
-
App Clips
+
App Clips
Although App Clips on iOS have limited capabilities available to them, ARKit is one of them. This means, a QR code / NFC trigger can be used to launch a mini ARKit based App Clip.
-
Non-AR Smart Glasses
+
Non-AR Smart Glasses
Not every pair of smart glasses need to have AR based surface tracking / SLAM, to display stuff. Just a simple display which can overlay elements on the real world should be capable of displaying tons of data
Idea dumps and interesting projects found on the web. I also try to include archived links through archive.org and a self-hosted archive in-case something disappers. Most of the idea dumps are generated from an OCR scan of my diary page. Refer to /posts/2022-11-07-a-new-method-to-blog.html for details. Also, this page is not linked anywhere else and has been probably shared with you.
diff --git a/docs/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html b/docs/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
index 13b0493..7b0748e 100644
--- a/docs/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
+++ b/docs/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
@@ -6,13 +6,13 @@
- Creating your own custom theme for Snowboard or Anemone
+ id="creating-your-own-custom-theme-for-snowboard-or-anemone">Creating your own custom theme for Snowboard or Anemone
-
-
+ Creating your own custom theme for Snowboard or Anemone" />
+ Creating your own custom theme for Snowboard or Anemone" />
@@ -44,9 +44,9 @@
-
Creating your own custom theme for Snowboard or Anemone
+
Creating your own custom theme for Snowboard or Anemone
-
Contents
+
Contents
Getting Started
@@ -58,7 +58,7 @@
Building the DEB
-
Getting Started
+
Getting Started
Note: Without the proper folder structure, your theme may not show up!
@@ -67,7 +67,7 @@
Within themeName.theme folder, create another folder called IconBundles (You cannot change this name)
-
Theme Configuration
+
Theme Configuration
Now, inside the themeName.theme folder, create a file called Info.plist and paste the following
@@ -94,7 +94,7 @@
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 separately 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
+
Creating Icons
Open up the Image Editor of your choice and create a new file having a resolution of 512x512
@@ -105,7 +105,7 @@ Then, you would name the package MyTheme and include two themes Want to create rounded icons?
Create them squared only, we will learn how to apply masks!
-
Exporting Icons
+
Exporting Icons
Note: All icons must be saved as *.png (Tip: This means you can even create partially transparent icons!)
@@ -113,7 +113,7 @@ Create them squared only, we will learn how to apply masks!
All Icons must be saved in themeName.theme>IconBundles as bundleID-large.png
-
Finding BundleIDs
+
Finding BundleIDs
Stock Application BundleIDs
@@ -279,7 +279,7 @@ Create them squared only, we will learn how to apply masks!
Create a new folder outside themeName.theme with the name you want to be shown on Cydia, e.g themeNameForCydia
@@ -421,11 +421,11 @@ Section: Themes
Finally, copy themeName.theme to the Themes folder (Copy the entire folder, not just the contents)
-
Building the DEB
+
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
+
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
@@ -438,13 +438,13 @@ Section: Themes
Now, run find . -name "*.DS_Store" -type f -delete
-
Pre-Requisite for Windows Users
+
Pre-Requisite for Windows Users
SSH into your iPhone and drag and drop the themeNameForCyia folder on the terminal
-
Common Instructions
+
Common Instructions
You should be at the root of the folder in the terminal, i.e Inside themeNameForCydia
diff --git a/docs/posts/2019-12-04-Google-Teachable-Machines.html b/docs/posts/2019-12-04-Google-Teachable-Machines.html
index 9793228..e8e0227 100644
--- a/docs/posts/2019-12-04-Google-Teachable-Machines.html
+++ b/docs/posts/2019-12-04-Google-Teachable-Machines.html
@@ -6,13 +6,13 @@
- Image Classifier With Teachable Machines
+ id="image-classifier-with-teachable-machines">Image Classifier With Teachable Machines
-
-
+ Image Classifier With Teachable Machines" />
+ Image Classifier With Teachable Machines" />
@@ -44,7 +44,7 @@
-
Image Classifier With Teachable Machines
+
Image Classifier With Teachable Machines
Made for Google Code-In
@@ -52,7 +52,7 @@
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
+
Details
1) Collecting Data
diff --git a/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
index 4d27f40..a5f7ef9 100644
--- a/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
+++ b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
@@ -6,13 +6,13 @@
- Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
+ id="creating-a-custom-image-classifier-using-tensorflow-2x-and-keras-for-detecting-malaria">Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
-
-
+ Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria" />
+ Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria" />
@@ -44,11 +44,11 @@
-
Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
+
Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
Done during Google Code-In. Org: Tensorflow.
-
Imports
+
Imports
%tensorflow_version2.x#This is for telling Colab that you want to use TF 2.0, ignore if running on local machine
@@ -66,9 +66,9 @@
By creating a sequential model, we create a linear stack of layers.
@@ -150,7 +150,7 @@ X_train = X_train/255.0
-
Compiling Model
+
Compiling Model
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
@@ -161,7 +161,7 @@ X_train = X_train/255.0
-
Training Model
+
Training Model
We train the model for 10 epochs on the training data and then validate it using the testing data
@@ -195,7 +195,7 @@ X_train = X_train/255.0
-
Results
+
Results
accuracy=history.history['accuracy'][-1]*100
diff --git a/docs/posts/2019-12-08-Splitting-Zips.html b/docs/posts/2019-12-08-Splitting-Zips.html
index 67df2fd..d909be2 100644
--- a/docs/posts/2019-12-08-Splitting-Zips.html
+++ b/docs/posts/2019-12-08-Splitting-Zips.html
@@ -6,13 +6,13 @@
- Splitting ZIPs into Multiple Parts
+ id="splitting-zips-into-multiple-parts">Splitting ZIPs into Multiple Parts
-
-
+ Splitting ZIPs into Multiple Parts" />
+ Splitting ZIPs into Multiple Parts" />
@@ -44,7 +44,7 @@
-
Splitting ZIPs into Multiple Parts
+
Splitting ZIPs into Multiple Parts
Tested on macOS
diff --git a/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html b/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html
index 317af85..e0e9e10 100644
--- a/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html
+++ b/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html
@@ -6,13 +6,13 @@
- Making Predictions using Image Classifier (TensorFlow)
+ id="making-predictions-using-image-classifier-tensorflow">Making Predictions using Image Classifier (TensorFlow)
-
-
+ Making Predictions using Image Classifier (TensorFlow)" />
+ Making Predictions using Image Classifier (TensorFlow)" />
@@ -44,7 +44,7 @@
-
Making Predictions using Image Classifier (TensorFlow)
+
Making Predictions using Image Classifier (TensorFlow)
This was tested on TF 2.x and works as of 2019-12-10
diff --git a/docs/posts/2019-12-16-TensorFlow-Polynomial-Regression.html b/docs/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
index 7057815..e432792 100644
--- a/docs/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
+++ b/docs/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
@@ -6,13 +6,13 @@
- Polynomial Regression Using TensorFlow
+ id="polynomial-regression-using-tensorflow">Polynomial Regression Using TensorFlow
-
-
+ Polynomial Regression Using TensorFlow" />
+ Polynomial Regression Using TensorFlow" />
@@ -44,7 +44,7 @@
-
Polynomial Regression Using TensorFlow
+
Polynomial Regression Using TensorFlow
In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.
@@ -58,19 +58,19 @@
Quintic
-
Regression
+
Regression
-
What is 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
+
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).
-
Imports
+
Imports
importtensorflow.compat.v1astf
@@ -81,9 +81,9 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Dataset
+
Dataset
-
Creating Random Data
+
Creating Random Data
Even though in this tutorial we will use a Position Vs Salary dataset, it is important to know how to create synthetic data
@@ -105,7 +105,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Position vs Salary Dataset
+
Position vs Salary Dataset
We will be using https://drive.google.com/file/d/1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9/view (Salary vs Position Dataset)
@@ -160,7 +160,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Defining Stuff
+
Defining Stuff
X=tf.placeholder("float")
@@ -168,7 +168,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Defining Variables
+
Defining Variables
We first define all the coefficients and constant as tensorflow variables having a random initial value
@@ -182,7 +182,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Model Configuration
+
Model Configuration
learning_rate=0.2
@@ -190,7 +190,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Equations
+
Equations
deg1=a*X+b
@@ -201,7 +201,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Cost Function
+
Cost Function
We use the Mean Squared Error Function
@@ -214,7 +214,7 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Optimizer
+
Optimizer
We use the AdamOptimizer for the polynomial functions and GradientDescentOptimizer for the linear function
@@ -232,12 +232,12 @@ Polynomial regression even fits a non-linear relationship (e.g when the points d
-
Model Predictions
+
Model Predictions
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.
-
Linear Equation
+
Linear Equation
withtf.Session()assess:
@@ -301,7 +301,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Quadratic Equation
+
Quadratic Equation
withtf.Session()assess:
@@ -366,7 +366,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Cubic
+
Cubic
withtf.Session()assess:
@@ -432,7 +432,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Quartic
+
Quartic
withtf.Session()assess:
@@ -499,7 +499,7 @@ values using the X values. We then plot it to compare the actual data and predic
-
Quintic
+
Quintic
withtf.Session()assess:
@@ -565,13 +565,13 @@ values using the X values. We then plot it to compare the actual data and predic
-
Results and Conclusion
+
Results and Conclusion
You just learnt Polynomial Regression using TensorFlow!
-
Notes
+
Notes
-
Overfitting
+
Overfitting
diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html
index 17ecaa1..a7216aa 100644
--- a/docs/posts/2019-12-22-Fake-News-Detector.html
+++ b/docs/posts/2019-12-22-Fake-News-Detector.html
@@ -6,13 +6,13 @@
- Building a Fake News Detector with Turicreate
+ id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate
-
-
+ Building a Fake News Detector with Turicreate" />
+ Building a Fake News Detector with Turicreate" />
@@ -44,20 +44,20 @@
-
Building a Fake News Detector with Turicreate
+
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
+
Building the Machine Learning Model
-
Data Gathering
+
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
+
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
@@ -72,7 +72,7 @@ a CUDA compatible MXNet package.
If you do not wish to train on GPU or are running it on your computer, you can ignore the last two lines
-
Downloading the Dataset
+
Downloading the Dataset
!wget -q "https://github.com/joolsa/fake_real_news_dataset/raw/master/fake_or_real_news.csv.zip"
@@ -80,7 +80,7 @@ a CUDA compatible MXNet package.
-
Model Creation
+
Model Creation
importturicreateastc
@@ -100,14 +100,14 @@ a CUDA compatible MXNet package.
-
Splitting Dataset
+
Splitting Dataset
train,test=dataSFrame.random_split(.9)
-
Training
+
Training
model=tc.text_classifier.create(
@@ -132,7 +132,7 @@ a CUDA compatible MXNet package.
-
Testing the Model
+
Testing the Model
est_predictions=model.predict(test)
@@ -165,7 +165,7 @@ a CUDA compatible MXNet package.
-
Exporting the Model
+
Exporting the Model
model_name='FakeNews'
@@ -178,9 +178,9 @@ a CUDA compatible MXNet package.
First we create a single view app (make sure you check the use SwiftUI button)
diff --git a/docs/posts/2020-01-14-Converting-between-PIL-NumPy.html b/docs/posts/2020-01-14-Converting-between-PIL-NumPy.html
index 8d0fb1b..793585e 100644
--- a/docs/posts/2020-01-14-Converting-between-PIL-NumPy.html
+++ b/docs/posts/2020-01-14-Converting-between-PIL-NumPy.html
@@ -6,13 +6,13 @@
- Converting between image and NumPy array
+ id="converting-between-image-and-numpy-array">Converting between image and NumPy array
-
-
+ Converting between image and NumPy array" />
+ Converting between image and NumPy array" />
@@ -44,7 +44,7 @@
-
Converting between image and NumPy array
+
Converting between image and NumPy array
importnumpy
@@ -59,7 +59,7 @@
-
Saving an Image
+
Saving an Image
try:
diff --git a/docs/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab.html b/docs/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab.html
index 73c8b35..00a4ed0 100644
--- a/docs/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab.html
+++ b/docs/posts/2020-01-15-Setting-up-Kaggle-to-use-with-Colab.html
@@ -6,13 +6,13 @@
- Setting up Kaggle to use with Google Colab
+ id="setting-up-kaggle-to-use-with-google-colab">Setting up Kaggle to use with Google Colab
-
-
+ Setting up Kaggle to use with Google Colab" />
+ Setting up Kaggle to use with Google Colab" />
@@ -44,33 +44,33 @@
-
Setting up Kaggle to use with Google Colab
+
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
+
Grabbing Our Tokens
-
Go to Kaggle
+
Go to Kaggle
-
Click on your User Profile and Click on My Account
+
Click on your User Profile and Click on My Account
-
Scroll Down until you see Create New API Token
+
Scroll Down until you see Create New API Token
-
This will download your token as a JSON file
+
This will download your token as a JSON file
Copy the File to the root folder of your Google Drive
-
Setting up Colab
+
Setting up Colab
-
Mounting Google Drive
+
Mounting Google Drive
importos
@@ -81,7 +81,7 @@
After this click on the URL in the output section, login and then paste the Auth Code
-
Configuring Kaggle
+
Configuring Kaggle
os.environ['KAGGLE_CONFIG_DIR']="/content/drive/My Drive/"
diff --git a/docs/posts/2020-01-16-Image-Classifier-Using-Turicreate.html b/docs/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
index 4702325..c81a687 100644
--- a/docs/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
+++ b/docs/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
@@ -6,13 +6,13 @@
- Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
+ id="creating-a-custom-image-classifier-using-turicreate-to-detect-smoke-and-fire">Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
-
-
+ Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire" />
+ Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire" />
@@ -44,13 +44,13 @@
-
Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
+
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
diff --git a/docs/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html b/docs/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html
index 97cfc39..ef3f052 100644
--- a/docs/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html
+++ b/docs/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html
@@ -6,13 +6,13 @@
- How to setup Bluetooth on a Raspberry Pi
+ id="how-to-setup-bluetooth-on-a-raspberry-pi">How to setup Bluetooth on a Raspberry Pi
-
-
+ How to setup Bluetooth on a Raspberry Pi" />
+ How to setup Bluetooth on a Raspberry Pi" />
@@ -44,11 +44,11 @@
-
How to setup Bluetooth on a Raspberry Pi
+
How to setup Bluetooth on a Raspberry Pi
This was tested on a Raspberry Pi Zero W
-
Enter in the Bluetooth Mode
+
Enter in the Bluetooth Mode
pi@raspberrypi:~ $ bluetoothctl
@@ -58,7 +58,7 @@
[bluetooth]# scan on
-
To Pair
+
To Pair
While being in bluetooth mode
diff --git a/docs/posts/2020-03-03-Playing-With-Android-TV.html b/docs/posts/2020-03-03-Playing-With-Android-TV.html
index 72e246f..f31b869 100644
--- a/docs/posts/2020-03-03-Playing-With-Android-TV.html
+++ b/docs/posts/2020-03-03-Playing-With-Android-TV.html
@@ -6,13 +6,13 @@
- Tinkering with an Android TV
+ id="tinkering-with-an-android-tv">Tinkering with an Android TV
-
-
+ Tinkering with an Android TV" />
+ Tinkering with an Android TV" />
@@ -44,11 +44,11 @@
-
Tinkering with an Android TV
+
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
+
Developer-Settings
Go To Settings
@@ -80,7 +80,7 @@
Continuously click on the "Build" option until it says "You are a Developer"
-
Enable-ADB
+
Enable-ADB
Go to Settings
@@ -88,7 +88,7 @@
Scroll until you find ADB Debugging and enable that option
-
Connect-ADB
+
Connect-ADB
Open Terminal (Make sure you have ADB installed)
@@ -96,22 +96,22 @@
To test the connection run adb logcat
-
Manipulating Apps / Packages
+
Manipulating Apps / Packages
-
Listing Packages
+
Listing Packages
adb shell
pm list packages
-
Installing Packages
+
Installing Packages
adb install -r package.apk
-
Uninstalling Packages
+
Uninstalling Packages
adb uninstall com.company.yourpackagename
diff --git a/docs/posts/2020-03-08-Making-Vaporwave-Track.html b/docs/posts/2020-03-08-Making-Vaporwave-Track.html
index 206fc8d..41fae3c 100644
--- a/docs/posts/2020-03-08-Making-Vaporwave-Track.html
+++ b/docs/posts/2020-03-08-Making-Vaporwave-Track.html
@@ -6,13 +6,13 @@
- Making My First Vaporwave Track (Remix)
+ id="making-my-first-vaporwave-track-remix">Making My First Vaporwave Track (Remix)
-
-
+ Making My First Vaporwave Track (Remix)" />
+ Making My First Vaporwave Track (Remix)" />
@@ -44,15 +44,15 @@
-
Making My First Vaporwave Track (Remix)
+
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
+
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
+
How to Vaporwave
The first track which is considered to be actual Vaporwave is Ramona Xavier's Macintosh Plus, this set the guidelines for making Vaporwave
@@ -68,11 +68,11 @@
( Now, there are some tracks being produced which are not remixes and are original )
-
My Remix
+
My Remix
-
Where is the Programming?
+
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)
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
index b4691ff..97c3bc3 100644
--- a/docs/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
+++ b/docs/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
@@ -6,13 +6,13 @@
- Fixing X11 Error on macOS Catalina for AmberTools 18/19
+ id="fixing-x11-error-on-macos-catalina-for-ambertools-1819">Fixing X11 Error on macOS Catalina for AmberTools 18/19
-
-
+ Fixing X11 Error on macOS Catalina for AmberTools 18/19" />
+ Fixing X11 Error on macOS Catalina for AmberTools 18/19" />
@@ -44,7 +44,7 @@
-
Fixing X11 Error on macOS Catalina for AmberTools 18/19
+
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.
@@ -69,7 +69,7 @@ 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
+
The Fix
Simply reinstalling XQuartz using homebrew fixed the error brew cask reinstall xquartz
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
index 812c599..708d1bd 100644
--- a/docs/posts/2020-05-31-compiling-open-babel-on-ios.html
+++ b/docs/posts/2020-05-31-compiling-open-babel-on-ios.html
@@ -6,13 +6,13 @@
- Compiling Open Babel on iOS
+ id="compiling-open-babel-on-ios">Compiling Open Babel on iOS
-
-
+ Compiling Open Babel on iOS" />
+ Compiling Open Babel on iOS" />
@@ -44,7 +44,7 @@
-
Compiling Open Babel on iOS
+
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.
@@ -52,17 +52,17 @@ To give a little background, I had tried to compile AutoDock Vina using a cross-
I am running the Checkr1n jailbreak on my iPad and the Unc0ver jailbreak on my phone.
-
But Why?
+
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!
+
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
+
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
@@ -71,7 +71,7 @@ To give a little background, I had tried to compile AutoDock Vina using a cross-
Them I told cmake that this is the location for my SDK 😠. Successful! Now I just needed to use make.
-
Fail No. 2
+
Fail No. 2
It was giving the error that thread-local-storage was not supported on this device.
I spent 2 hours around this problem, only to see the documentation and realise I hadn't setup the environment variable 🤦♂️
-
The Final Fix ( For Now )
+
The Final Fix ( For Now )
export BABEL_DATADIR="/usr/share/openbabel/3.1.0"
export BABEL_LIBDIR="/usr/lib/openbabel/3.1.0"
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
index 9e7740e..cc8baf5 100644
--- 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
@@ -6,13 +6,13 @@
- Workflow for Lightning Fast Molecular Docking Part One
+ id="workflow-for-lightning-fast-molecular-docking-part-one">Workflow for Lightning Fast Molecular Docking Part One
-
-
+ Workflow for Lightning Fast Molecular Docking Part One" />
+ Workflow for Lightning Fast Molecular Docking Part One" />
@@ -44,9 +44,9 @@
-
Workflow for Lightning Fast Molecular Docking Part One
+
Workflow for Lightning Fast Molecular Docking Part One
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
index a1f4df6..1aed192 100644
--- a/docs/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html
+++ b/docs/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html
@@ -6,13 +6,13 @@
- Compiling AutoDock Vina on iOS
+ id="compiling-autodock-vina-on-ios">Compiling AutoDock Vina on iOS
-
-
+ Compiling AutoDock Vina on iOS" />
+ Compiling AutoDock Vina on iOS" />
@@ -44,15 +44,15 @@
-
Compiling AutoDock Vina on iOS
+
Compiling AutoDock Vina on iOS
Why? Because I can.
-
Installing makedepend
+
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
+
Editing the Makefile
Original Makefile ( I used the provided mac Makefile base )
@@ -83,11 +83,11 @@ include ../../makefile_common
-
Updating the Source Code
+
Updating the Source Code
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
+
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);
@@ -98,7 +98,7 @@ return path(str, boost::filesystem::native);
return path(str)
-
Error 2 - No Member Named 'nativefilestring'
+
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";
@@ -111,15 +111,15 @@ return path(str, boost::filesystem::native);
Turns out native_file_string was deprecated in Boost 1.57 and replaced with just string
-
Error 3 - Library Not Found
+
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.
+
Error 4 - No Member Named 'nativefilestring' Again.
But, this time in another file and I quickly fixed it
-
Moment of Truth
+
Moment of Truth
Obviously it was working on my iPad, but would it work on another device? I transferred the compiled binary and
diff --git a/docs/posts/2020-07-01-Install-rdkit-colab.html b/docs/posts/2020-07-01-Install-rdkit-colab.html
index 3d040bc..f5acc52 100644
--- a/docs/posts/2020-07-01-Install-rdkit-colab.html
+++ b/docs/posts/2020-07-01-Install-rdkit-colab.html
@@ -6,13 +6,13 @@
- Installing RDKit on Google Colab
+ id="installing-rdkit-on-google-colab">Installing RDKit on Google Colab
-
-
+ Installing RDKit on Google Colab" />
+ Installing RDKit on Google Colab" />
@@ -44,7 +44,7 @@
-
Installing RDKit on Google Colab
+
Installing RDKit on Google Colab
EDIT: Try installing RDKit using pip
@@ -52,7 +52,7 @@
-
Old Method (Still Works)
+
Old Method (Still Works)
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 :/
diff --git a/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html b/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
index 61b2115..3daafd5 100644
--- a/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
+++ b/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
@@ -6,13 +6,13 @@
- Introduction to AR.js and Natural Feature Tracking
+ id="introduction-to-arjs-and-natural-feature-tracking">Introduction to AR.js and Natural Feature Tracking
-
-
+ Introduction to AR.js and Natural Feature Tracking" />
+ Introduction to AR.js and Natural Feature Tracking" />
@@ -44,9 +44,9 @@
-
Introduction to AR.js and Natural Feature Tracking
+
Introduction to AR.js and Natural Feature Tracking
-
AR.js
+
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.
@@ -54,7 +54,7 @@
It was initially created by Jerome Etienne and is now maintained by Nicolo Carpignoli and the AR-js Organisation
-
NFT
+
NFT
Usually for augmented reality you need specialised markers, like this Hiro marker (notice the thick non-aesthetic borders 🤢)
@@ -66,7 +66,7 @@
-
Creating the Marker!
+
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'.
$ npm install
@@ -109,12 +109,12 @@ found 0 vulnerabilities
-
Copy the target marker to the folder
+
Copy the target marker to the folder
$ cp ~/CodingAndStuff/ARjs/me.png .
-
Generate Marker
+
Generate Marker
$ node app.js -i me.png
@@ -183,7 +183,7 @@ To run demo use: 'npm run demo'
me.fset me.fset3 me.iset
-
Creating the HTML Page
+
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.
@@ -240,7 +240,7 @@ me.fset me.fset3 me.iset
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!
-
Adding a simple box
+
Adding a simple box
Let us add a simple box!
@@ -280,7 +280,7 @@ Serving HTTP on 0.0.0.0 port 8000 ...
👏 Congratulations! You just built an Augmented Reality experience using AR.js and AFrame
-
Adding a Torus-Knot in the box
+
Adding a Torus-Knot in the box
Edit your index.html
@@ -295,13 +295,13 @@ Serving HTTP on 0.0.0.0 port 8000 ...
-
Where are the GIFs?
+
Where are the GIFs?
Now that we know how to place a box in the scene and add a torus knot in it, what do we do next? We bring the classic internet back!
AFrame GIF Shader is a gif shader for A-Frame created by mayognaise.
-
First things first
+
First things first
Add <script src="https://rawgit.com/mayognaise/aframe-gif-shader/master/dist/aframe-gif-shader.min.js"></script> to <head>
@@ -315,15 +315,15 @@ Serving HTTP on 0.0.0.0 port 8000 ...
-
Bonus Idea: Integrate it with GitHub's new profile Readme Feature!
+
Bonus Idea: Integrate it with GitHub's new profile Readme Feature!
-
1) Host the code using GitHub Pages
+
1) Host the code using GitHub Pages
-
2) Create a new repository ( the name should be your GitHub username )
+
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
+
3) Add QR Code to the page and tell the users to scan your profile picture
-
??) Profit 💸
+
??) 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 )
diff --git a/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html b/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
index d7efda8..649c682 100644
--- a/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
+++ b/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
@@ -6,13 +6,13 @@
- Trying Different Camera Setups
+ id="trying-different-camera-setups">Trying Different Camera Setups
-
-
+ Trying Different Camera Setups" />
+ Trying Different Camera Setups" />
@@ -44,7 +44,7 @@
-
Trying Different Camera Setups
+
Trying Different Camera Setups
Animated Overlays
@@ -53,7 +53,7 @@
Using a USB Camera
-
Comparison
+
Comparison
Here are the results before you begin reading.
@@ -65,13 +65,13 @@
-
Prerequisites
+
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.
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
+
2.1 Using your iPhone using Quicktime
Connect your iPhone via a USB cable, then Open Quicktime -> File -> New Movie Recording
2.2 Using your iPhone using an application like Camo
+
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
+
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)
diff --git a/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
index f35bca4..769bfa6 100644
--- a/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
+++ b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
@@ -6,13 +6,13 @@
- Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+ id="generating-https-certificate-using-dns-a-challenge-through-lets-encrypt">Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
-
-
+ Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt" />
+ Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt" />
@@ -44,18 +44,18 @@
-
Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+
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.
-
Dependencies
+
Dependencies
sudoaptupdate&&sudoaptinstallcertbot-y
-
Get the Certificate
+
Get the Certificate
sudocertbotcertonly--manual--preferred-challengesdns-01--emailsenpai@email.com-dmydomain.duckdns.org
@@ -100,11 +100,11 @@ navanspi.duckdns.org.60Once 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
+
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.
-
Using the Certificate with Gunicorn
+
Using the Certificate with Gunicorn
Example Gunicorn command for running a web-app:
diff --git a/docs/posts/2020-12-1-HTML-JS-RSS-Feed.html b/docs/posts/2020-12-1-HTML-JS-RSS-Feed.html
index a755c7b..1978590 100644
--- a/docs/posts/2020-12-1-HTML-JS-RSS-Feed.html
+++ b/docs/posts/2020-12-1-HTML-JS-RSS-Feed.html
@@ -6,13 +6,13 @@
- RSS Feed written in HTML + JavaScript
+ id="rss-feed-written-in-html-javascript">RSS Feed written in HTML + JavaScript
-
-
+ RSS Feed written in HTML + JavaScript" />
+ RSS Feed written in HTML + JavaScript" />
@@ -44,7 +44,7 @@
-
RSS Feed written in HTML + JavaScript
+
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=""
diff --git a/docs/posts/2021-06-25-Blog2Twitter-P1.html b/docs/posts/2021-06-25-Blog2Twitter-P1.html
index 94836b7..ba12406 100644
--- a/docs/posts/2021-06-25-Blog2Twitter-P1.html
+++ b/docs/posts/2021-06-25-Blog2Twitter-P1.html
@@ -6,13 +6,13 @@
- Posting Blog Posts as Twitter Threads Part 1/n
+ id="posting-blog-posts-as-twitter-threads-part-1n">Posting Blog Posts as Twitter Threads Part 1/n
-
-
+ Posting Blog Posts as Twitter Threads Part 1/n" />
+ Posting Blog Posts as Twitter Threads Part 1/n" />
@@ -44,17 +44,17 @@
-
Posting Blog Posts as Twitter Threads Part 1/n
+
Posting Blog Posts as Twitter Threads Part 1/n
Why? Eh, no good reason, but should be fun.
-
Plan of Action
+
Plan of Action
I recently shifted my website to a static site generator I wrote specifically for myself.
Thus, it should be easy to just add a feature to check for new posts, split the text into chunks for Twitter threads and tweet them.
I am not handling lists or images right now.
-
Time to Code
+
Time to Code
First, the dependency: tweepy for tweeting.
@@ -136,13 +136,13 @@ I am not handling lists or images right now.
-
Result
+
Result
Posting Blog Posts as Twitter Threads Part 1/n
Why? Eh, no good reason, but should be fun. Plan of Action
I recently shifted my website to a static site generator I wrote specifically for myself. 1/5
For the next part, I will try to append the code as well.
I actually added the code to this post after running the program.
diff --git a/docs/posts/2021-06-25-NFC-Music-Cards-Basic-iOS.html b/docs/posts/2021-06-25-NFC-Music-Cards-Basic-iOS.html
index 06f897f..bd1da46 100644
--- a/docs/posts/2021-06-25-NFC-Music-Cards-Basic-iOS.html
+++ b/docs/posts/2021-06-25-NFC-Music-Cards-Basic-iOS.html
@@ -6,13 +6,13 @@
- Basic NFC Music Cards for iOS
+ id="basic-nfc-music-cards-for-ios">Basic NFC Music Cards for iOS
-
-
+ Basic NFC Music Cards for iOS" />
+ Basic NFC Music Cards for iOS" />
@@ -44,12 +44,12 @@
-
Basic NFC Music Cards for iOS
+
Basic NFC Music Cards for iOS
I had a pack of NFC cards and decided it was the perfect time to create Music Cards. I do not have a "music setup."
So, I did not have to ensure this could work with any device. I settled with using Shortcuts personal Automation.
-
Designing the Template
+
Designing the Template
I tried measuring the card's dimensions with the in-built Measure app, but it was off by a few mm.
@@ -61,7 +61,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
-
Creating the Automation
+
Creating the Automation
I created a personal automation in the Shortcuts app which got triggered when a particular NFC card was scanned, ask playback destination and play the album/playlist.
@@ -69,7 +69,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
-
Demo
+
Demo
diff --git a/docs/posts/2021-06-26-Cheminformatics-On-The-Web-2021.html b/docs/posts/2021-06-26-Cheminformatics-On-The-Web-2021.html
index c9e8704..1120ca0 100644
--- a/docs/posts/2021-06-26-Cheminformatics-On-The-Web-2021.html
+++ b/docs/posts/2021-06-26-Cheminformatics-On-The-Web-2021.html
@@ -6,13 +6,13 @@
- Cheminformatics on the Web (2021)
+ id="cheminformatics-on-the-web-2021">Cheminformatics on the Web (2021)
-
-
+ Cheminformatics on the Web (2021)" />
+ Cheminformatics on the Web (2021)" />
@@ -44,7 +44,7 @@
-
Cheminformatics on the Web (2021)
+
Cheminformatics on the Web (2021)
Here, I have compiled a list of some libraries and possible ideas.
I, personally, like static websites which don't require a server side application and can be hosted on platforms like GitHub Pages.
@@ -52,12 +52,12 @@ Or, just by opening the HTML file and running it in your browser.
WebAssembly (Wasm) has made running code written for other platforms on the web relatively easier.
Combine Wasm with some pure JavaScript libraries, and you get a platform to quickly amp up your speed in some common tasks.
-
RDKit
+
RDKit
RDKit bundles a minimal JavaScript Wrapper in their core RDKit suite.
This is perfect for generating 2D Figures (HTML5 Canva/SVGs), Canonical SMILES, Descriptors e.t.c
-
Substructure Matching
+
Substructure Matching
This can be used to flag undesirable functional groups in a given compound.
Create a simple key:value pairs of name:SMARTS and use it to highlight substructure matches.
@@ -65,13 +65,13 @@ Thus, something like PostEra's Medicinal Chemistry Alert can be done with RDKit-
-
Computing Properties
+
Computing Properties
This is useful to calculate basic properties of a given compound.
-
Webina - Molecular Docking
+
Webina - Molecular Docking
Webina is a JavaScript/Wasm library that runs AutoDock Vina, which can enable you to run Molecular Docking straight in the browser itself.
@@ -83,7 +83,7 @@ Due to Spectre, this feature was disabled on all browsers.
Currently, only Chromium-based and Firefox browsers have reimplemented and enabled it.
Hopefully, soon, this will be again supported by all major browsers.
-
The project aims to port cheminformatics libraries into JavaScript via Emscripten.
They have ported InChI, Indigo, OpenBabel, and OpenMD
-
Kekule.js
+
Kekule.js
It is written by @partridgejiang, who is behind the Cheminfo-to-web project
@@ -106,19 +106,19 @@ They have ported InChI, Indigo, OpenBabel, and OpenMD
It is molecule-centric, focusing on providing the ability to represent, draw, edit, compare and search molecule structures on web browsers.
-
Browser Extensions
+
Browser Extensions
The previous machine learning examples can be packaged as browser-extensions to perform tasks on the article you are reading.
With iOS 15 bringing WebExtensions to iOS/iPadOS, the same browser extension source code can be now used on Desktop and Mobile Phones.
You can quickly create an extension to convert PDB codes into links to RCSB, highlight SMILES, highlight output of NER models, e.t.c
-
Conclusion
+
Conclusion
I have not even touched all the bases of cheminformatics for the web here.
There is still a lot more to unpack.
Hopefully, this encourages you to explore the world of cheminformatics on the web.
diff --git a/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html b/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html
index 9b90d53..5836c49 100644
--- a/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html
+++ b/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html
@@ -6,13 +6,13 @@
- Making a Crude ML Powered Chatbot in Swift using CoreML
+ id="making-a-crude-ml-powered-chatbot-in-swift-using-coreml">Making a Crude ML Powered Chatbot in Swift using CoreML
-
-
+ Making a Crude ML Powered Chatbot in Swift using CoreML" />
+ Making a Crude ML Powered Chatbot in Swift using CoreML" />
@@ -44,7 +44,7 @@
-
Making a Crude ML Powered Chatbot in Swift using CoreML
+
Making a Crude ML Powered Chatbot in Swift using CoreML
A chatbot/virtual assistant, on paper, looks easy to build.
The user says something, the programs finds the best action, checks if additional input is required and sends back the output.
@@ -52,7 +52,7 @@ To do this in Swift, I used two separate ML Models created using Apple's Create
First is a Text Classifier to classify intent, and the other a word tagger for extracting input from the input message.
Disclaimer: This is a very crude proof-of-concept, but it does work.
-
Text Classifier
+
Text Classifier
I opened a CSV file and added some sample entries, with a corresponding label.
@@ -84,7 +84,7 @@ i love you,banter
-
Word Tagging
+
Word Tagging
This is useful to extract the required variables directly from the user's input.
This model will be only called if the intent from the classifier is a custom action.
@@ -112,7 +112,7 @@ I created a sample JSON with only 3 examples (I know, very less, but works for a
-
Time to Get Swift-y
+
Time to Get Swift-y
The initial part is easy, importing CoreML and NaturalLanguage and then initializing the models and the tagger.
diff --git a/docs/posts/2022-05-21-Similar-Movies-Recommender.html b/docs/posts/2022-05-21-Similar-Movies-Recommender.html
index c7f3b3a..717513f 100644
--- a/docs/posts/2022-05-21-Similar-Movies-Recommender.html
+++ b/docs/posts/2022-05-21-Similar-Movies-Recommender.html
@@ -6,13 +6,13 @@
- Building a Similar Movies Recommendation System
+ id="building-a-similar-movies-recommendation-system">Building a Similar Movies Recommendation System
-
-
+ Building a Similar Movies Recommendation System" />
+ Building a Similar Movies Recommendation System" />
@@ -44,21 +44,21 @@
-
Building a Similar Movies Recommendation System
+
Building a Similar Movies Recommendation System
-
Why?
+
Why?
I recently came across a movie/tv-show recommender, couchmoney.tv. I loved it. I decided that I wanted to build something similar, so I could tinker with it as much as I wanted.
I also wanted a recommendation system I could use via a REST API. Although I have not included that part in this post, I did eventually create it.
-
How?
+
How?
By measuring the cosine of the angle between two vectors, you can get a value in the range [0,1] with 0 meaning no similarity. Now, if we find a way to represent information about movies as a vector, we can use cosine similarity as a metric to find similar movies.
As we are recommending just based on the content of the movies, this is called a content based recommendation system.
-
Data Collection
+
Data Collection
Trakt exposes a nice API to search for movies/tv-shows. To access the API, you first need to get an API key (the Trakt ID you get when you create a new application).
@@ -140,7 +140,7 @@
In the end, I could have dropped the embeddings field from the table schema as I never got around to using it.
-
Scripting Time
+
Scripting Time
fromdatabaseimport*
@@ -243,7 +243,7 @@
Running this script took me approximately 3 hours, and resulted in an SQLite database of 141.5 MB
-
Embeddings!
+
Embeddings!
I did not want to put my poor Mac through the estimated 23 hours it would have taken to embed the sentences. I decided to use Google Colab instead.
@@ -308,7 +308,7 @@ As of writing this post, I did not include any other database except Trakt.
That's it!
-
Interacting with Vectors
+
Interacting with Vectors
We use the trakt_id for the movie as the ID for the vectors and upsert it into the index.
@@ -359,7 +359,7 @@ It is possible that this additional step of mapping could be avoided by storing
-
Testing it Out
+
Testing it Out
movie_name="Now You See Me"
@@ -405,21 +405,21 @@ Spies (2015): A secret agent must perform a heist without time on his side
Include Cast Data
diff --git a/docs/posts/2022-08-05-Why-You-No-Host.html b/docs/posts/2022-08-05-Why-You-No-Host.html
index 12ecf83..f684833 100644
--- a/docs/posts/2022-08-05-Why-You-No-Host.html
+++ b/docs/posts/2022-08-05-Why-You-No-Host.html
@@ -6,13 +6,13 @@
- Why You No Host?
+ id="why-you-no-host">Why You No Host?
-
-
+ Why You No Host?" />
+ Why You No Host?" />
@@ -44,7 +44,7 @@
-
Why You No Host?
+
Why You No Host?
@@ -52,7 +52,7 @@
The title refers to the “Y U No Host” internet meme, which led to the name of “YunoHost”, an operating system aiming to democratise self-hosting. This post tries to discuss the idea that anyone can self-host and why you should consider YunoHost.
-
Should you Self-Host?
+
Should you Self-Host?
Do you get annoyed when half of the internet goes down because everything a few major companies host the majority of the internet?
@@ -77,11 +77,11 @@
These are just some of the reasons to self-host.
-
What if you don’t know anything?
+
What if you don’t know anything?
No one is born with the knowledge of knowing how to orchestrate a cluster. You can always learn how to, but sometimes you just don’t have the time or energy. YunoHost tries to ease this issue by providing a clean web-interface. You do not even need to touch the command line for all the basic tasks.
-
What should you self-host?
+
What should you self-host?
Anything and everything! The best part about self-hosting is that you own the data. This data is not going to be sold to the highest bidder.
@@ -93,7 +93,7 @@
Although you can do all of this (and much more!) without needing to use YunoHost, it just makes it easy to manage.
-
What do I need to self-host?
+
What do I need to self-host?
A decent internet connection if you plan on using the services outside your home network and hosting at home
YunoHost is a server operating system which takes guesswork out of Self-Hosting. Out of the box it provides:
@@ -123,7 +123,7 @@
and much more!
-
Why did I choose YunoHost?
+
Why did I choose YunoHost?
I began my self-hosting journey with a Raspberry Pi 4 (4GB). I looked at tons of options for the base management layer:
@@ -152,65 +152,65 @@
Also, YunoHost has been here for a long time! Here is an old Hacker News post about YunoHost. All the projects mentioned in the comments? Dead.
-
What do I self-host?
+
What do I self-host?
-
audiobookshelf - an audiobook server
+
audiobookshelf - an audiobook server
-
ergo chat - an IRC server
+
ergo chat - an IRC server
-
FreshRSS - RSS aggregator
+
FreshRSS - RSS aggregator
-
Gitea - self-hosted git
+
Gitea - self-hosted git
-
+
-
Grafana - Metrics dashboard
+
Grafana - Metrics dashboard
-
Home Assistant - Home automation platform
+
Home Assistant - Home automation platform
-
Jellyfin - Media server
+
Jellyfin - Media server
-
Listmonk - Newsletter and Mailing List manager
+
Listmonk - Newsletter and Mailing List manager
-
MinIO Server - S3 compatible storage server
+
MinIO Server - S3 compatible storage server
-
Nextcloud - Storage, file-sharing, e.t.c
+
Nextcloud - Storage, file-sharing, e.t.c
-
Syncthing - continuous file synchronization
+
Syncthing - continuous file synchronization
-
Vaultwarden - Bitwarden server
+
Vaultwarden - Bitwarden server
-
Wallabag - Read it later app
+
Wallabag - Read it later app
-
h5ai - HTTP server index
+
h5ai - HTTP server index
-
How do I install YunoHost?
+
How do I install YunoHost?
Install minimal Debian 10/11 on your preferred machine
@@ -219,7 +219,7 @@
Done!
-
Should you actually self-host everything?
+
Should you actually self-host everything?
Highly context dependent. I run two YunoHost servers in two different locations. One of the ISP has actually blacklisted the residential IP address range and does not let me change my reverseDNS, which means all my outgoing emails are marked as spam. On the other hand, the other ISP gave a clean static IP and the server managed for a small business is not at all problematic for emailing. YMMV but at least you know you have an option.
diff --git a/docs/posts/2022-11-07-a-new-method-to-blog.html b/docs/posts/2022-11-07-a-new-method-to-blog.html
index 427acd9..cbf80ec 100644
--- a/docs/posts/2022-11-07-a-new-method-to-blog.html
+++ b/docs/posts/2022-11-07-a-new-method-to-blog.html
@@ -6,13 +6,13 @@
- A new method to blog
+ id="a-new-method-to-blog">A new method to blog
-
-
+ A new method to blog" />
+ A new method to blog" />
@@ -44,33 +44,33 @@
-
A new method to blog
+
A new method to blog
Here is the original PDF. I made some edits to the content after generating the markdown file
Paper Website is a service that lets you build a website with just pen and paper. I am going to try and replicate the process.
-
The Plan
+
The Plan
The continuity feature on macOS + iOS lets you scan PDFs directly from your iPhone. I want to be able to scan these pages and automatically run an Automator script that takes the PDF and OCRs the text. Then I can further clean the text and convert from markdown.
-
Challenges
+
Challenges
I quickly realised that the OCR software I planned on using could not detect my shitty handwriting accurately. I tried using ABBY Finereader, Prizmo and OCRMyPDF. (Abby Finereader and Prizmo support being automated by Automator).
Now, I could either write neater, or use an external API like Microsoft Azure
-
Solution
+
Solution
-
OCR
+
OCR
In the PDFs, all the scans are saved as images on a page. I extract the image and then send it to Azure's API.
-
Paragraph Breaks
+
Paragraph Breaks
The recognised text had multiple lines breaking in the middle of the sentence, Therefore, I use what is called a pilcrow to specify paragraph breaks. But, rather than trying to draw the normal pilcrow, I just use the HTML entity ¶ which is the pilcrow character.
-
Where is the code?
+
Where is the code?
I created a GitHub Gist for a sample Python script to take the PDF and print the text
diff --git a/docs/posts/2022-12-25-blog-to-toot.html b/docs/posts/2022-12-25-blog-to-toot.html
index f978e30..4d9eb10 100644
--- a/docs/posts/2022-12-25-blog-to-toot.html
+++ b/docs/posts/2022-12-25-blog-to-toot.html
@@ -6,13 +6,13 @@
- Posting blogs as Mastodon Toots
+ id="posting-blogs-as-mastodon-toots">Posting blogs as Mastodon Toots
-
-
+ Posting blogs as Mastodon Toots" />
+ Posting blogs as Mastodon Toots" />
@@ -44,16 +44,16 @@
-
Posting blogs as Mastodon Toots
+
Posting blogs as Mastodon Toots
What is better than posting a blog post? Posting about your posting pipeline. I did this previously with Twitter.
-
the elephant in the room
+
the elephant in the room
mastodon.social does not support any formatting in the status posts.
Yes, there are other instances which have patches to enable features such as markdown formatting, but there is no upstream support.
-
time to code
+
time to code
My website is built using a really simple static site generator I wrote in Python.
Therefore, each post is self-contained in a Markdown file with the necessary metadata.
@@ -62,13 +62,13 @@ Therefore, each post is self-contained in a Markdown file with the necessary met
I initially planned on having a command line parser and some more flags.
-
interacting with mastodon
+
interacting with mastodon
I ended up using mastodon.py rather than crafting requests by hand. Each statuspost/toot call returns a statusid that can be then used as an inreplyto parameter.
For the code snippets, seeing that mastodon does not support native formatting, I am resorting to using ray-so.
-
reading markdown
+
reading markdown
I am using a bunch of regex hacks, and reading the blog post line by line.
Because there is no markdown support, I append all the links to the end of the toot.
@@ -97,7 +97,7 @@ In this case, I can extract the tags from the front matter.
@@ -117,19 +117,19 @@ In this case, I can extract the tags from the front matter.
-
threads! threads! threads!
+
threads! threads! threads!
Even though mastodon does officially have a higher character limit than Twitter.
I prefer the way threads look.
-
result
+
result
Everything does seem to work!
Seeing that you are reading this on Mastodon, and that I have updated this section.
-
what's next?
+
what's next?
Here is the current code:
diff --git a/docs/posts/2023-02-08-Interact-with-siri-from-the-terminal.html b/docs/posts/2023-02-08-Interact-with-siri-from-the-terminal.html
index 8df15ef..0c23964 100644
--- a/docs/posts/2023-02-08-Interact-with-siri-from-the-terminal.html
+++ b/docs/posts/2023-02-08-Interact-with-siri-from-the-terminal.html
@@ -6,13 +6,13 @@
- Interacting with Siri using the command line
+ id="interacting-with-siri-using-the-command-line">Interacting with Siri using the command line
-
-
+ Interacting with Siri using the command line" />
+ Interacting with Siri using the command line" />
@@ -44,11 +44,11 @@
-
Interacting with Siri using the command line
+
Interacting with Siri using the command line
My main objective was to see if I could issue multi-intent commands in one go. Obviously, Siri cannot do that (neither can Alexa, Cortana, or Google Assistant). The script here can issue either a single command, or use the help of OpenAI's DaVinci model to extract multiple commands and pass them onto siri.
-
Prerequisites
+
Prerequisites
Run macOS
@@ -56,7 +56,7 @@
Enable the Terminal to control System Events (The first time you run the script, it will prompt you to enable it)
-
Show me ze code
+
Show me ze code
If you are here just for the code:
@@ -136,11 +136,11 @@ python3main.py&
-
ELI5
+
ELI5
I am not actually going to explain it as if I am explaining to a five-year old kid.
-
AppleScript
+
AppleScript
In the age of Siri Shortcuts, AppleScript can still do more. It is a scripting language created by Apple that can help you automate pretty much anything you see on your screen.
@@ -191,11 +191,11 @@ python3main.py&
-
Multi-Intent Commands
+
Multi-Intent Commands
We can call OpenAI's API to autocomplete our prompt and extract multiple commands. We don't need to use OpenAI's API, and can also simply use Google's Flan-T5 model using HuggingFace's transformers library.
-
Ze Prompt
+
Ze Prompt
You are provided with multiple commands as a single command. Break down all the commands and return them in a list of strings. If you are provided with a single command, return a list with a single string, trying your best to understand the command.
@@ -217,7 +217,7 @@ python3main.py&
This prompt gives the model a few examples to increase the generation accuracy, along with instructing it to return a Python list.
-
Ze Code
+
Ze Code
importopenai
@@ -251,7 +251,7 @@ python3main.py&
-
Gluing together code
+
Gluing together code
To finish it all off, we can use argparse to only send the input command to OpenAI when asked to do so.
@@ -271,7 +271,7 @@ python3main.py&
-
Conclusion
+
Conclusion
Siri is still dumb. When I ask it to Switch off the lights, it default to the home thousands of miles away. But, this code snippet definitely does work!
This post requires JavaScript to be viewed properly :(
@@ -61,7 +61,7 @@
To workaround memory issues, the simulations are only run on-demand when the user clicks the respective button. Scroll down to the bottom of the page to see the results.
-
The n-body problem
+
The n-body problem
The n-body problem is a classic puzzle in physics (and thus astrophysics) and mathematics that deals with predicting the motion of multiple celestial objects that interact with each other through gravitational forces.
@@ -71,7 +71,7 @@
As the number of objects increases, finding an exact solution becomes impossible, and we rely on analytical approximations.
-
Visualising a basic orbit
+
Visualising a basic orbit
If we want to create a n-body simulation in our browser, we need to figure out how we are going to visualise the motion of the objects. There are a few ways to do this, but the easiest is to use Plotly.js, a JavaScript library for creating interactive graphs. (An alternative is to use the HTML5 canvas element).
@@ -138,7 +138,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
Finally, we normalize the position data by dividing it by the astronomical unit (AU) to make it more visually meaningful. We also create a circle for reference, which represents a perfect circular orbit. The code ends with the data for the Sun's position, Earth's orbit, and the reference circle ready to be plotted.
-
Plotting the orbit
+
Plotting the orbit
Now that we have the data for the Sun's position, Earth's orbit, and the reference circle, we can plot them using Plotly.js.
@@ -212,7 +212,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
-
Figure of 8 orbit
+
Figure of 8 orbit
The figure of 8 solution[2] in the three-body problem refers to a unique and special trajectory where three celestial bodies (e.g., planets, stars) move in a figure of 8 shaped pattern around their mutual center of mass. This is special because it represents a stable and periodic solution to the three-body problem, which is known for its complexity and lack of general solutions.
@@ -226,7 +226,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
It looks cool!
-
Show me the code
+
Show me the code
The code for this simulation is very similar to the Earth-Sun orbit simulation, except that we now have three bodies instead of two. We also use a different set of initial conditions to generate the figure of 8 orbit.
@@ -318,7 +318,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
Finally, a loop iterates over each time step, updating the positions and velocities of the celestial bodies using the step function. The updated coordinates are stored in the X, Y, VX, and VY arrays.
-
Animation?
+
Animation?
Now that we have time-series data, we need to animate it. We can use Plotly's animate function, as this does not force a full re-render, saving us some precious GPU and CPU cycles when we are trying to run this in the browser itself
@@ -438,9 +438,9 @@ Next, the function dR takes the position r and velocity v of Earth as input and
-
"General" N-Body Solver
+
"General" N-Body Solver
-
Show me the code!
+
Show me the code!
functionstep(coords,masses,deltaT,nBodies=3,G=6.67408313131313e-11){
@@ -675,7 +675,7 @@ Next, the function dR takes the position r and velocity v of Earth as input and
-
Playground
+
Playground
@@ -759,7 +759,7 @@ function plotRandomNBodySimulation() {
-
References
+
References
Barrow-Green, June (2008), "The Three-Body Problem", in Gowers, Timothy; Barrow-Green, June; Leader, Imre (eds.), The Princeton Companion to Mathematics, Princeton University Press, pp. 726–728
Lab 3 for CSCI 2400 @ CU Boulder - Computer Systems
@@ -59,7 +59,7 @@
objdump -d ctarget > dis.txt
-
Phase 1
+
Phase 1
From the instructions, we know that our task is to get CTARGET to execute the code for touch1 when getbuf executes its return statement, rather than returning to test
@@ -115,7 +115,7 @@ NICEJOB!
-
Phase 2
+
Phase 2
Phase 2 involves injecting a small amount of code as part of your exploit string.
@@ -275,7 +275,7 @@ NICEJOB!
-
Phase 3
+
Phase 3
Phase 3 also involves a code injection attack, but passing a string as argument.
@@ -379,7 +379,7 @@ NICEJOB!
Phases 1-3 Complete.
-
Phase 4
+
Phase 4
For Phase 4, you will repeat the attack of Phase 2, but do so on program RTARGET using gadgets from your
diff --git a/docs/posts/2023-10-22-search-by-flair-reddit.html b/docs/posts/2023-10-22-search-by-flair-reddit.html
index 432b24e..57604ee 100644
--- a/docs/posts/2023-10-22-search-by-flair-reddit.html
+++ b/docs/posts/2023-10-22-search-by-flair-reddit.html
@@ -6,13 +6,13 @@
-
Search / Filter posts by flair on Reddit
+ id="search-filter-posts-by-flair-on-reddit">Search / Filter posts by flair on Reddit
-
-
+ Search / Filter posts by flair on Reddit" />
+ Search / Filter posts by flair on Reddit" />
@@ -44,7 +44,7 @@
-
Search / Filter posts by flair on Reddit
+
Search / Filter posts by flair on Reddit
Remember to replace any spaces in the flair with _
Another revolution around the sun! This was a pretty fun and interesting year. I got to work on some interesting projects, and learned a lot.
I am going to try and use my GitHub activity to recap.
-
Spring
+
Spring
I helped a friend modernize their Larvael codebase. Dockerized it for easier development, and added a CD pipeline. (Probably going to be released by end of this year)
@@ -65,7 +65,7 @@
Got into Mountain Biking!
-
Summer
+
Summer
Summer was more relaxing. I mainly worked on some maintenance patches for my projects, and did some more freelancing stuff.
@@ -74,7 +74,7 @@
Continued working on a research project using Computer Vision in analysing a lateral flow assay. Tried porting it to use OpenCV.js, but it wasn't reliable enough. I might look into directly working with OpenCV/Vision Framework for an iOS app.
-
Fall
+
Fall
Won a couple more hackathons. I might summarize my hackathon experience in a different blog post.
@@ -90,7 +90,7 @@
I also did a ton of other stuff, but I am not sure how much I want to be sharing on my blog here. Maybe as I write more I will get more comfortable with sharing more information.
-
2024
+
2024
So, what are my plans for 2024? Learn. Build. Ship.
diff --git a/docs/posts/2024-02-26-control-element-under-another-element-html-css.html b/docs/posts/2024-02-26-control-element-under-another-element-html-css.html
index b9c9ebc..3085822 100644
--- a/docs/posts/2024-02-26-control-element-under-another-element-html-css.html
+++ b/docs/posts/2024-02-26-control-element-under-another-element-html-css.html
@@ -6,13 +6,13 @@
- Interacting with underlying element in HTML
+ id="interacting-with-underlying-element-in-html">Interacting with underlying element in HTML
-
-
+ Interacting with underlying element in HTML" />
+ Interacting with underlying element in HTML" />
@@ -44,7 +44,7 @@
-
Interacting with underlying element in HTML
+
Interacting with underlying element in HTML
I know that the title is a bit weird. I was trying to interact with a video under an iPhone Bezel Screen frame.
@@ -76,7 +76,7 @@
Let us try this in a simple example.
-
Example
+
Example
Here, we create a button and overlay a transparent box
diff --git a/docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html b/docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
index bb37d00..5fd5c48 100644
--- a/docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
+++ b/docs/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
@@ -6,13 +6,13 @@
- Cross-Compiling Hello World for DOS on macOS
+ id="cross-compiling-hello-world-for-dos-on-macos">Cross-Compiling Hello World for DOS on macOS
-
-
+ Cross-Compiling Hello World for DOS on macOS" />
+ Cross-Compiling Hello World for DOS on macOS" />
@@ -44,12 +44,12 @@
-
@@ -289,7 +289,7 @@ creatingaDOS There you have it. Three different ways to compile a C program on a macOS device in 2024 that can run on an IBM PC 5150 (which was released in 1981!)
-
Testing with DOSBox-X
+
Testing with DOSBox-X
cpexample1.exe~/Downloads
diff --git a/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html b/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
index ab46ec7..0d958b2 100644
--- a/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
+++ b/docs/posts/2024-03-21-Polynomial-Regression-in-TensorFlow-2.html
@@ -6,13 +6,13 @@
- Polynomial Regression Using TensorFlow 2.x
+ id="polynomial-regression-using-tensorflow-2x">Polynomial Regression Using TensorFlow 2.x
-
-
+ Polynomial Regression Using TensorFlow 2.x" />
+ Polynomial Regression Using TensorFlow 2.x" />
@@ -44,13 +44,13 @@
-
Polynomial Regression Using TensorFlow 2.x
+
Polynomial Regression Using TensorFlow 2.x
I have a similar post titled Polynomial Regression Using Tensorflow that used tensorflow.compat.v1 (Which still works as of TF 2.16). But, I thought it would be nicer to redo it with newer TF versions.
I will be skipping all the introductions about polynomial regression and jumping straight to the code. Personally, I prefer using scikit-learn for this task.
-
Position vs Salary Dataset
+
Position vs Salary Dataset
Again, we will be using https://drive.google.com/file/d/1tNL4jxZEfpaP4oflfSn6pIHJX7Pachm9/view (Salary vs Position Dataset)
@@ -61,11 +61,11 @@
-
Code
+
Code
If you just want to copy-paste the code, scroll to the bottom for the entire snippet. Here I will try and walk through setting up code for a 3rd-degree (cubic) polynomial
-
Imports
+
Imports
importpandasaspd
@@ -75,14 +75,14 @@
-
Reading the Dataset
+
Reading the Dataset
df=pd.read_csv("data.csv")
-
Variables and Constants
+
Variables and Constants
Here, we initialize the X and Y values as constants, since they are not going to change. The coefficients are defined as variables.
This should work regardless of the Keras backend version (2 or 3)
@@ -208,7 +208,7 @@
-
Without Gradient Tape
+
Without Gradient Tape
This relies on the Optimizer's minimize function and uses the var_list parameter to update the variables.
@@ -268,7 +268,7 @@
As always, remember to tweak the parameters and choose the correct model for the job. A polynomial regression model might not even be the best model for this particular dataset.
-
Further Programming
+
Further Programming
How would you modify this code to use another type of nonlinear regression? Say,
diff --git a/docs/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html b/docs/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
index 6f02f7c..c99950a 100644
--- a/docs/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
+++ b/docs/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
@@ -6,13 +6,13 @@
- Quadratic Formula Derivation
+ id="quadratic-formula-derivation">Quadratic Formula Derivation
-
-
+ Quadratic Formula Derivation" />
+ Quadratic Formula Derivation" />
@@ -44,7 +44,7 @@
-
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
Just a markdown file for all experiments related to the website
Published On: 2010-01-24 23:43
diff --git a/docs/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Response.html b/docs/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Response.html
index b0cbbbe..9600f8b 100644
--- a/docs/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Response.html
+++ b/docs/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Response.html
@@ -6,13 +6,13 @@
- Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
+ id="detecting-driver-fatigue-over-speeding-and-speeding-up-post-accident-response">Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
-
-
+ Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response" />
+ Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response" />
@@ -44,7 +44,7 @@
-
Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
+
Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
Based on the project showcased at Toyota Hackathon, IITD - 17/18th December 2018
@@ -56,12 +56,12 @@
Recommended citation:
-
ATP
+
ATP
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
+
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}}
diff --git a/docs/publications/2020-03-14-generating-vaporwave.html b/docs/publications/2020-03-14-generating-vaporwave.html
index b801f50..2a8df7f 100644
--- a/docs/publications/2020-03-14-generating-vaporwave.html
+++ b/docs/publications/2020-03-14-generating-vaporwave.html
@@ -6,13 +6,13 @@
- Is it possible to programmatically generate Vaporwave?
+ id="is-it-possible-to-programmatically-generate-vaporwave">Is it possible to programmatically generate Vaporwave?
-
-
+ Is it possible to programmatically generate Vaporwave?" />
+ Is it possible to programmatically generate Vaporwave?" />
@@ -44,7 +44,7 @@
-
Is it possible to programmatically generate Vaporwave?
+
Is it possible to programmatically generate Vaporwave?
This is still a pre-print.
@@ -52,22 +52,22 @@
Recommended citation:
-
APA
+
APA
Chauhan, N. (2020, March 15). Is it possible to programmatically generate Vaporwave?. https://doi.org/10.35543/osf.io/9um2r
-
MLA
+
MLA
Chauhan, Navan. “Is It Possible to Programmatically Generate Vaporwave?.” IndiaRxiv, 15 Mar. 2020. Web.
-
Chicago
+
Chicago
Chauhan, Navan. 2020. “Is It Possible to Programmatically Generate Vaporwave?.” IndiaRxiv. March 15. doi:10.35543/osf.io/9um2r.
-
Bibtex
+
Bibtex
@misc{chauhan_2020,
title={Is it possible to programmatically generate Vaporwave?},
diff --git a/docs/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html b/docs/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html
index 9d9e1f4..456f739 100644
--- a/docs/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html
+++ b/docs/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html
@@ -6,13 +6,13 @@
- Possible Drug Candidates for COVID-19
+ id="possible-drug-candidates-for-covid-19">Possible Drug Candidates for COVID-19
-
-
+ Possible Drug Candidates for COVID-19" />
+ Possible Drug Candidates for COVID-19" />
@@ -44,7 +44,7 @@
-
I have a huge backlog of actual articles waiting to be published. The following is just a list of pre-prints I did not find worthy of actual publications even though some journals still send me regular invites to publish these.
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
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
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
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.
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.
Carry your favourite soda (or beer) can with you while you ride
Published On: 2024-02-17 18:42
diff --git a/docs/feed.rss b/docs/feed.rss
index c66c148..4570558 100644
--- a/docs/feed.rss
+++ b/docs/feed.rss
@@ -4,8 +4,8 @@
Navan's ArchiveRare Tips, Tricks and Posts
https://web.navan.dev/en
- Tue, 26 Mar 2024 23:37:56 -0000
- Tue, 26 Mar 2024 23:37:56 -0000
+ Tue, 26 Mar 2024 23:45:22 -0000
+ Tue, 26 Mar 2024 23:45:22 -0000250
@@ -14,7 +14,7 @@
https://web.navan.dev/posts/2023-10-22-search-by-flair-reddit.html
- id="search-filter-posts-by-flair-on-reddit">Search / Filter posts by flair on Reddit
+ Search / Filter posts by flair on Reddit
Search posts by flair on Reddit Web by using _
@@ -38,7 +38,7 @@
https://web.navan.dev/posts/2020-03-08-Making-Vaporwave-Track.html
- id="making-my-first-vaporwave-track-remix">Making My First Vaporwave Track (Remix)
+ Making My First Vaporwave Track (Remix)
I made my first vaporwave remix
@@ -84,7 +84,7 @@
https://web.navan.dev/posts/2021-06-25-Blog2Twitter-P1.html
- id="posting-blog-posts-as-twitter-threads-part-1n">Posting Blog Posts as Twitter Threads Part 1/n
+ Posting Blog Posts as Twitter Threads Part 1/n
Converting Posts to Twitter Threads
@@ -201,7 +201,7 @@ I actually added the code to this post after running the program.
https://web.navan.dev/posts/2024-03-15-setting-up-macos-for-8088-dos-dev.html
- id="cross-compiling-hello-world-for-dos-on-macos">Cross-Compiling Hello World for DOS on macOS
+ Cross-Compiling Hello World for DOS on macOS
This goes through compiling Open Watcom 2 and creating simple hello-world exampls
@@ -487,7 +487,7 @@ creatingaDOS
- id="polynomial-regression-using-tensorflow-2x">Polynomial Regression Using TensorFlow 2.x
+ Polynomial Regression Using TensorFlow 2.x
Predicting n-th degree polynomials using TensorFlow 2.x
@@ -740,7 +740,7 @@ creatingaDOS
- id="hello-world">Hello World
+ Hello World
My first post.
@@ -760,7 +760,7 @@ creatingaDOS
- id="experiments">Experiments
+ Experiments
Just a markdown file for all experiments related to the website
@@ -780,7 +780,7 @@ creatingaDOS
- id="setting-up-kaggle-to-use-with-google-colab">Setting up Kaggle to use with Google Colab
+ Setting up Kaggle to use with Google Colab
Tutorial on setting up kaggle, to use with Google Colab
@@ -840,7 +840,7 @@ creatingaDOS
- id="creating-a-custom-image-classifier-using-tensorflow-2x-and-keras-for-detecting-malaria">Creating a Custom Image Classifier using Tensorflow 2.x and Keras for Detecting Malaria
+ 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
@@ -1034,7 +1034,7 @@ X_train = X_train/255.0
https://web.navan.dev/posts/2020-05-31-compiling-open-babel-on-ios.html
- id="compiling-open-babel-on-ios">Compiling Open Babel on iOS
+ Compiling Open Babel on iOS
Compiling Open Babel on iOS
@@ -1165,7 +1165,7 @@ export BABEL_LIBDIR="/usr/lib/openbabel/3.1.0"
https://web.navan.dev/posts/2022-05-21-Similar-Movies-Recommender.html
- id="building-a-similar-movies-recommendation-system">Building a Similar Movies Recommendation System
+ Building a Similar Movies Recommendation System
Building a Content Based Similar Movies Recommendatiom System
@@ -1585,7 +1585,7 @@ Spies (2015): A secret agent must perform a heist without time on his side
https://web.navan.dev/posts/2024-01-05-hello-20224.html
- id="hello-2024">Hello 2024
+ Hello 2024
Recap of 2023, and my goals for 2024
@@ -1659,7 +1659,7 @@ Spies (2015): A secret agent must perform a heist without time on his side
https://web.navan.dev/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
- id="introduction-to-arjs-and-natural-feature-tracking">Introduction to AR.js and Natural Feature Tracking
+ Introduction to AR.js and Natural Feature Tracking
An introduction to AR.js and NFT
@@ -1958,7 +1958,7 @@ Serving HTTP on 0.0.0.0 port 8000 ...
https://web.navan.dev/posts/2022-11-07-a-new-method-to-blog.html
- id="a-new-method-to-blog">A new method to blog
+ A new method to blog
Writing posts in markdown using pen and paper
@@ -2006,7 +2006,7 @@ Serving HTTP on 0.0.0.0 port 8000 ...
https://web.navan.dev/posts/2023-10-05-attack-lab.html
- id="attack-lab">Attack Lab
+ Attack Lab
Walkthrough of Attack Lab Phases 1-4 for CSCI 2400 Computer Systems
@@ -2480,7 +2480,7 @@ NICEJOB!
https://web.navan.dev/posts/2020-03-03-Playing-With-Android-TV.html
- id="tinkering-with-an-android-tv">Tinkering with an Android TV
+ Tinkering with an Android TV
Tinkering with an Android TV
@@ -2567,7 +2567,7 @@ NICEJOB!
https://web.navan.dev/posts/2019-12-16-TensorFlow-Polynomial-Regression.html
- id="polynomial-regression-using-tensorflow">Polynomial Regression Using TensorFlow
+ Polynomial Regression Using TensorFlow
Polynomial regression using TensorFlow
@@ -3123,7 +3123,7 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2019-12-04-Google-Teachable-Machines.html
- id="image-classifier-with-teachable-machines">Image Classifier With Teachable Machines
+ Image Classifier With Teachable Machines
Tutorial on creating a custom image classifier quickly with Google Teachable Machines
@@ -3187,7 +3187,7 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2024-03-26-Derivation-of-the-Quadratic-Equation.html
- id="quadratic-formula-derivation">Quadratic Formula Derivation
+ Quadratic Formula Derivation
Quick derivation of the quadratic equation by completing the square
@@ -3233,7 +3233,7 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2022-08-05-Why-You-No-Host.html
- id="why-you-no-host">Why You No Host?
+ Why You No Host?
Why you should self-host with YunoHost
@@ -3426,7 +3426,7 @@ values using the X values. We then plot it to compare the actual data and predic
https://web.navan.dev/posts/2021-06-25-NFC-Music-Cards-Basic-iOS.html
- id="basic-nfc-music-cards-for-ios">Basic NFC Music Cards for iOS
+ Basic NFC Music Cards for iOS
Basic NFC Music Cards on iOS with Shortcuts
@@ -3469,7 +3469,7 @@ So, I did not have to ensure this could work with any device. I settled with usi
https://web.navan.dev/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
- id="creating-your-own-custom-theme-for-snowboard-or-anemone">Creating your own custom theme for Snowboard or Anemone
+ Creating your own custom theme for Snowboard or Anemone
Tutorial on creating your own custom theme for Snowboard or Anemone
@@ -3901,7 +3901,7 @@ Section: Themes
https://web.navan.dev/posts/2020-04-13-Fixing-X11-Error-AmberTools-macOS.html
- id="fixing-x11-error-on-macos-catalina-for-ambertools-1819">Fixing X11 Error on macOS Catalina for AmberTools 18/19
+ 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
@@ -3946,7 +3946,7 @@ Configure failed due to the errors above!
https://web.navan.dev/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html
- id="making-a-crude-ml-powered-chatbot-in-swift-using-coreml">Making a Crude ML Powered Chatbot in Swift using CoreML
+ Making a Crude ML Powered Chatbot in Swift using CoreML
Writing a simple Machine-Learning powered Chatbot (or, daresay virtual personal assistant ) in Swift using CoreML.
@@ -4137,7 +4137,7 @@ Otherwise, it calls the custom action.
https://web.navan.dev/posts/2024-02-26-control-element-under-another-element-html-css.html
- id="interacting-with-underlying-element-in-html">Interacting with underlying element in HTML
+ Interacting with underlying element in HTML
With CSS you can disable any interactions with an element and directly control the underlying element
@@ -4224,7 +4224,7 @@ A box with 200px height and 300px width
https://web.navan.dev/posts/2019-12-10-TensorFlow-Model-Prediction.html
- id="making-predictions-using-image-classifier-tensorflow">Making Predictions using Image Classifier (TensorFlow)
+ Making Predictions using Image Classifier (TensorFlow)
Making predictions for image classification models built using TensorFlow
@@ -4298,7 +4298,7 @@ A box with 200px height and 300px width
https://web.navan.dev/posts/2020-07-01-Install-rdkit-colab.html
- id="installing-rdkit-on-google-colab">Installing RDKit on Google Colab
+ Installing RDKit on Google Colab
Install RDKit on Google Colab with one code snippet.
@@ -4418,7 +4418,7 @@ logger.info("rdkit-{} installation finished!".format(rdkit.__version__))
https://web.navan.dev/posts/2023-10-04-bomb-lab.html
- id="bomb-lab">Bomb Lab
+ Bomb Lab
Walkthrough of Phases 1-6 of Bomb Lab for CSCI 2400 Computer Systems Lab 2
@@ -5524,7 +5524,7 @@ Your instructor has been notified and will verify your solution.
https://web.navan.dev/posts/2020-11-17-Lets-Encrypt-DuckDns.html
- id="generating-https-certificate-using-dns-a-challenge-through-lets-encrypt">Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+ 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.
@@ -5616,7 +5616,7 @@ navanspi.duckdns.org.60
- id="building-a-fake-news-detector-with-turicreate">Building a Fake News Detector with Turicreate
+ 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
@@ -5894,7 +5894,7 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
https://web.navan.dev/posts/2020-12-1-HTML-JS-RSS-Feed.html
- id="rss-feed-written-in-html-javascript">RSS Feed written in HTML + JavaScript
+ RSS Feed written in HTML + JavaScript
Short code-snippet for an RSS feed, written in HTML and JavaScript
@@ -6111,7 +6111,7 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
https://web.navan.dev/posts/2020-01-19-Connect-To-Bluetooth-Devices-Linux-Terminal.html
- id="how-to-setup-bluetooth-on-a-raspberry-pi">How to setup Bluetooth on a Raspberry Pi
+ How to setup Bluetooth on a Raspberry Pi
Connecting to Bluetooth Devices using terminal, tested on Raspberry Pi Zero W
@@ -6147,7 +6147,7 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
https://web.navan.dev/posts/2022-12-25-blog-to-toot.html
- id="posting-blogs-as-mastodon-toots">Posting blogs as Mastodon Toots
+ Posting blogs as Mastodon Toots
Cross posting blog posts to Mastodon
@@ -6443,7 +6443,7 @@ Seeing that you are reading this on Mastodon, and that I have updated this secti
https://web.navan.dev/posts/2023-04-30-n-body-simulation.html
- id="n-body-solution-generator">n-body solution generator
+ n-body solution generator
n-body solution generator and solver
@@ -7179,7 +7179,7 @@ function plotRandomNBodySimulation() {
https://web.navan.dev/posts/2020-01-14-Converting-between-PIL-NumPy.html
- id="converting-between-image-and-numpy-array">Converting between image and NumPy array
+ Converting between image and NumPy array
Short code snippet for converting between PIL image and NumPy arrays.
@@ -7219,7 +7219,7 @@ function plotRandomNBodySimulation() {
https://web.navan.dev/posts/2019-12-08-Splitting-Zips.html
- id="splitting-zips-into-multiple-parts">Splitting ZIPs into Multiple Parts
+ Splitting ZIPs into Multiple Parts
Short code snippet for splitting zips.
@@ -7262,7 +7262,7 @@ function plotRandomNBodySimulation() {
https://web.navan.dev/posts/2020-06-02-Compiling-AutoDock-Vina-on-iOS.html
- id="compiling-autodock-vina-on-ios">Compiling AutoDock Vina on iOS
+ Compiling AutoDock Vina on iOS
Compiling AutoDock Vina on iOS
@@ -7359,7 +7359,7 @@ return path(str, boost::filesystem::native);
https://web.navan.dev/posts/2023-02-08-Interact-with-siri-from-the-terminal.html
- id="interacting-with-siri-using-the-command-line">Interacting with Siri using the command line
+ Interacting with Siri using the command line
Code snippet to interact with Siri by issuing commands from the command-line.
@@ -7604,7 +7604,7 @@ python3main.py&
https://web.navan.dev/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
- id="creating-a-custom-image-classifier-using-turicreate-to-detect-smoke-and-fire">Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
+ 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
@@ -7888,7 +7888,7 @@ python3main.py&
https://web.navan.dev/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
- id="trying-different-camera-setups">Trying Different Camera Setups
+ Trying Different Camera Setups
Comparison of different cameras setups for using as a webcam and tutorials for the same.
@@ -8012,7 +8012,7 @@ new Dics({
https://web.navan.dev/posts/2021-06-26-Cheminformatics-On-The-Web-2021.html
- id="cheminformatics-on-the-web-2021">Cheminformatics on the Web (2021)
+ Cheminformatics on the Web (2021)
Summarising Cheminformatics on the web in 2021.
@@ -8108,7 +8108,7 @@ Hopefully, this encourages you to explore the world of cheminformatics on the we
https://web.navan.dev/posts/2020-06-01-Speeding-Up-Molecular-Docking-Workflow-AutoDock-Vina-and-PyMOL.html
- id="workflow-for-lightning-fast-molecular-docking-part-one">Workflow for Lightning Fast Molecular Docking Part One
+ Workflow for Lightning Fast Molecular Docking Part One
This is my workflow for lightning fast molecular docking.
@@ -8168,7 +8168,7 @@ alias pbpaste='xclip -selection clipboard -o'
https://web.navan.dev/publications/2019-05-14-Detecting-Driver-Fatigue-Over-Speeding-and-Speeding-up-Post-Accident-Response.html
- id="detecting-driver-fatigue-over-speeding-and-speeding-up-post-accident-response">Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
+ 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.
@@ -8204,7 +8204,7 @@ alias pbpaste='xclip -selection clipboard -o'
https://web.navan.dev/publications/2020-03-14-generating-vaporwave.html
- id="is-it-possible-to-programmatically-generate-vaporwave">Is it possible to programmatically generate Vaporwave?
+ Is it possible to programmatically generate Vaporwave?
This paper is about programmaticaly generating Vaporwave.
@@ -8254,7 +8254,7 @@ alias pbpaste='xclip -selection clipboard -o'
https://web.navan.dev/publications/2020-03-17-Possible-Drug-Candidates-COVID-19.html
- id="possible-drug-candidates-for-covid-19">Possible Drug Candidates for COVID-19
+ 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.
@@ -8274,7 +8274,7 @@ alias pbpaste='xclip -selection clipboard -o'
https://web.navan.dev/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.html
- id="bike-soda-can-holder">Bike Soda Can Holder
+ Bike Soda Can Holder
Carry your favourite soda (or beer) can with you while you ride
@@ -8322,7 +8322,7 @@ model-viewer {
https://web.navan.dev/ideas/2022-12-17-ar-mr-xr.html
- id="ar-xr-mr">AR XR MR
+ AR XR MR
Data dump from my notes
diff --git a/docs/ideas/2022-12-17-ar-mr-xr.html b/docs/ideas/2022-12-17-ar-mr-xr.html
index b6cfa79..bade9f1 100644
--- a/docs/ideas/2022-12-17-ar-mr-xr.html
+++ b/docs/ideas/2022-12-17-ar-mr-xr.html
@@ -6,13 +6,13 @@
- id="ar-xr-mr">AR XR MR
+ AR XR MR
- AR XR MR" />
- AR XR MR" />
+
+
diff --git a/docs/ideas/index.html b/docs/ideas/index.html
index 2b91987..c0a1f20 100644
--- a/docs/ideas/index.html
+++ b/docs/ideas/index.html
@@ -52,7 +52,7 @@