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
---
.../3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.png | Bin 0 -> 24564 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 Resources/images/opengraph/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.png
(limited to 'Resources')
diff --git a/Resources/images/opengraph/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.png b/Resources/images/opengraph/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.png
new file mode 100644
index 0000000..b779dcd
Binary files /dev/null and b/Resources/images/opengraph/3D-Designs/2024-02-17-Can-Holder-Mountain-Bike.png differ
--
cgit v1.2.3
From 2ede57d571e382f5aae167bd2a059a12fa1108ea Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Mon, 26 Feb 2024 12:09:08 -0700
Subject: add new post
---
...ntrol-element-under-another-element-html-css.md | 35 ++++++++
.../assets/underlying/video-under-element.jpg | Bin 0 -> 155017 bytes
...trol-element-under-another-element-html-css.png | Bin 0 -> 22985 bytes
docs/assets/underlying/video-under-element.jpg | Bin 0 -> 155017 bytes
docs/feed.rss | 48 ++++++++++-
...trol-element-under-another-element-html-css.png | Bin 0 -> 22985 bytes
docs/index.html | 32 +++-----
...rol-element-under-another-element-html-css.html | 88 +++++++++++++++++++++
docs/posts/index.html | 13 +++
docs/tags/CSS.html | 71 +++++++++++++++++
docs/tags/HTML.html | 13 +++
11 files changed, 279 insertions(+), 21 deletions(-)
create mode 100644 Content/posts/2024-02-26-control-element-under-another-element-html-css.md
create mode 100644 Resources/assets/underlying/video-under-element.jpg
create mode 100644 Resources/images/opengraph/posts/2024-02-26-control-element-under-another-element-html-css.png
create mode 100644 docs/assets/underlying/video-under-element.jpg
create mode 100644 docs/images/opengraph/posts/2024-02-26-control-element-under-another-element-html-css.png
create mode 100644 docs/posts/2024-02-26-control-element-under-another-element-html-css.html
create mode 100644 docs/tags/CSS.html
(limited to 'Resources')
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
new file mode 100644
index 0000000..1c253fe
--- /dev/null
+++ b/Content/posts/2024-02-26-control-element-under-another-element-html-css.md
@@ -0,0 +1,35 @@
+---
+date: 2024-02-26 11:57
+description: With CSS you can disable any interactions with an element and directly control the underlying element
+tags: HTML, CSS
+draft: false
+---
+
+# 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.
+
+```html
+
+
+
+
+
+
+
+```
+
+
+
+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 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
(limited to 'Resources')
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
+```
+
+
+
+*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
(limited to 'Resources')
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 @@
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 @@
Ever wanted a nice craft soda, or a natty light during your ride? Mounts to the standard bottle cage holes on your bike.
@@ -78,14 +96,15 @@ model-viewer {
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.
This website is generated using a custom static site generator I wrote in Python. The theme is a port of @mdo's Hyde, ported by the makers of Zola.
+
+
All the Open Graph images are generated using Pillow and the Futura font. The math is taken care of by an extra I created for the python-markdown2 library that converts inline and block into MathML.
+
+
Since this website is currently using the .dev tld, there is no support for HTTP in most browsers (Since they use HSTS preloading). But if you ever find yourself on an IBM PC 5150 and need to use hget, that should work.
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docs/feed.rss b/docs/feed.rss
index 4570558..cadea45 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:45:22 -0000
- Tue, 26 Mar 2024 23:45:22 -0000
+ Wed, 27 Mar 2024 22:48:36 -0000
+ Wed, 27 Mar 2024 22:48:36 -0000250
diff --git a/docs/ideas/2022-12-17-ar-mr-xr.html b/docs/ideas/2022-12-17-ar-mr-xr.html
index bade9f1..60df87f 100644
--- a/docs/ideas/2022-12-17-ar-mr-xr.html
+++ b/docs/ideas/2022-12-17-ar-mr-xr.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ AR XR MR
+
+
+
+
+
+
+
- AR XR MR
-
@@ -29,21 +41,27 @@
-
-
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
+
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.
iGopherBrowser: A modern Gopher client for iOS, macOS, and VisionOS. It is built on top of my swift-gopher library. Available on the App Store
+
TimeSlicerX: A timeboxing app for iOS (and macOS) to schedule tasks around your calendar items. Everything is done on-device. Available on the App Store
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.
-
+
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 4463b37..1c89f5c 100644
--- a/docs/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
+++ b/docs/posts/2019-05-05-Custom-Snowboard-Anemone-Theme.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Creating your own custom theme for Snowboard or Anemone
+
+
+
+
+
+
+
- Creating your own custom theme for Snowboard or Anemone
-
@@ -29,21 +41,27 @@
-
-
Creating your own custom theme for Snowboard or Anemone
Contents
@@ -462,14 +480,15 @@ Section: Themes
You can share this with your friends :+1:
+
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.
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.
-
+
diff --git a/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
index b75bdca..7d88d48 100644
--- a/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
+++ b/docs/posts/2019-12-08-Image-Classifier-Tensorflow.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ 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
-
@@ -29,21 +41,27 @@
-
-
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.
-
+
diff --git a/docs/posts/2019-12-08-Splitting-Zips.html b/docs/posts/2019-12-08-Splitting-Zips.html
index 1ecb4e6..894e0be 100644
--- a/docs/posts/2019-12-08-Splitting-Zips.html
+++ b/docs/posts/2019-12-08-Splitting-Zips.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Splitting ZIPs into Multiple Parts
+
+
+
+
+
+
+
- Splitting ZIPs into Multiple Parts
-
@@ -29,21 +41,27 @@
-
-
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.
-
+
diff --git a/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html b/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html
index ecb7680..7624fa7 100644
--- a/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html
+++ b/docs/posts/2019-12-10-TensorFlow-Model-Prediction.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Making Predictions using Image Classifier (TensorFlow)
+
+
+
+
+
+
+
- Making Predictions using Image Classifier (TensorFlow)
-
@@ -29,21 +41,27 @@
-
-
Making Predictions using Image Classifier (TensorFlow)
This was tested on TF 2.x and works as of 2019-12-10
@@ -104,14 +122,15 @@
Infected
+
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.
In this tutorial you will learn about polynomial regression and how you can implement it in Tensorflow.
@@ -586,14 +604,15 @@ values using the X values. We then plot it to compare the actual data and predic
Basically if you train your machine learning model on a small dataset for a really large number of epochs, the model will learn all the deformities/noise in the data and will actually think that it is a normal part. Therefore when it will see some new data, it will discard that new data as noise and will impact the accuracy of the model in a negative manner
+
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.
-
+
diff --git a/docs/posts/2019-12-22-Fake-News-Detector.html b/docs/posts/2019-12-22-Fake-News-Detector.html
index 553831d..8b784e5 100644
--- a/docs/posts/2019-12-22-Fake-News-Detector.html
+++ b/docs/posts/2019-12-22-Fake-News-Detector.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Building a Fake News Detector with Turicreate
+
+
+
+
+
+
+
- Building a Fake News Detector with Turicreate
-
@@ -29,21 +41,27 @@
-
-
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
@@ -308,14 +326,15 @@ DescriptionThe bag-of-words model is a simplifying representation used in NLP, i
+
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.
-
+
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 825f17d..e3c77bb 100644
--- a/docs/posts/2020-01-14-Converting-between-PIL-NumPy.html
+++ b/docs/posts/2020-01-14-Converting-between-PIL-NumPy.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Converting between image and NumPy array
+
+
+
+
+
+
+
- Converting between image and NumPy array
-
@@ -29,21 +41,27 @@
-
-
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.
-
+
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 760d44b..7dc3608 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Setting up Kaggle to use with Google Colab
+
+
+
+
+
+
+
- Setting up Kaggle to use with Google Colab
-
@@ -29,21 +41,27 @@
-
-
In order to be able to access Kaggle Datasets, you will need to have an account on Kaggle (which is Free)
@@ -90,14 +108,15 @@
Voila! You can now download Kaggle datasets
+
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.
-
+
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 f9ed54d..3533db8 100644
--- a/docs/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
+++ b/docs/posts/2020-01-16-Image-Classifier-Using-Turicreate.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
+
+
+
+
+
+
+
- Creating a Custom Image Classifier using Turicreate to detect Smoke and Fire
-
@@ -29,21 +41,27 @@
-
-
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
@@ -314,14 +332,15 @@
We just got an accuracy of 94% on Training Data and 97% on Validation Data!
+
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.
-
+
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 4524da8..d4e02a6 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ How to setup Bluetooth on a Raspberry Pi
+
+
+
+
+
+
+
- How to setup Bluetooth on a Raspberry Pi
-
@@ -29,21 +41,27 @@
-
-
To Exit out of bluetoothctl anytime, just type exit
+
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.
-
+
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 923730c..b036d5a 100644
--- a/docs/posts/2020-03-03-Playing-With-Android-TV.html
+++ b/docs/posts/2020-03-03-Playing-With-Android-TV.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Tinkering with an Android TV
+
+
+
+
+
+
+
- Tinkering with an Android TV
-
@@ -29,21 +41,27 @@
-
-
So I have an Android TV, this posts covers everything I have tried on it
@@ -117,14 +135,15 @@
adb uninstall com.company.yourpackagename
+
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.
-
+
diff --git a/docs/posts/2020-03-08-Making-Vaporwave-Track.html b/docs/posts/2020-03-08-Making-Vaporwave-Track.html
index 5b01064..2f6532e 100644
--- a/docs/posts/2020-03-08-Making-Vaporwave-Track.html
+++ b/docs/posts/2020-03-08-Making-Vaporwave-Track.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Making My First Vaporwave Track (Remix)
+
+
+
+
+
+
+
- Making My First Vaporwave Track (Remix)
-
@@ -29,21 +41,27 @@
-
-
I finally completed my first quick and dirty vaporwave remix of "I Want It That Way" by the Backstreet Boys
@@ -76,14 +94,15 @@
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)
+
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.
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.
@@ -75,14 +93,15 @@ Configure failed due to the errors above!
If you do not have XQuartz installed, you need to run brew cask install xquartz
+
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.
-
+
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 f9a5cb4..427cc86 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Compiling Open Babel on iOS
+
+
+
+
+
+
+
- Compiling Open Babel on iOS
-
@@ -29,21 +41,27 @@
-
-
Due to the fact that my summer vacations started today,
@@ -161,14 +179,15 @@ export BABEL_LIBDIR="/usr/lib/openbabel/3.1.0"
Edit 1: Added Screenshots, had to replicate the errors.
+
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.
-
+
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 8126a04..b396ad6 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Workflow for Lightning Fast Molecular Docking Part One
+
+
+
+
+
+
+
- Workflow for Lightning Fast Molecular Docking Part One
-
@@ -29,21 +41,27 @@
-
-
Workflow for Lightning Fast Molecular Docking Part One
My Setup
@@ -90,14 +108,15 @@ alias pbpaste='xclip -selection clipboard -o'
This is just the docking command for AutoDock Vina. In the next part I will tell how to use PyMOL and a plugin to directly generate the coordinates in Vina format --center_x -9.7 --center_y 11.4 --center_z 68.9 --size_x 19.3 --size_y 29.9 --size_z 21.3 without needing to type them manually.
+
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.
The package is available on my repository and only depends on boost. ( Both, Vina and Vina-Split are part of the package)
+
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.
-
+
diff --git a/docs/posts/2020-07-01-Install-rdkit-colab.html b/docs/posts/2020-07-01-Install-rdkit-colab.html
index 6e96c60..aec6741 100644
--- a/docs/posts/2020-07-01-Install-rdkit-colab.html
+++ b/docs/posts/2020-07-01-Install-rdkit-colab.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Installing RDKit on Google Colab
+
+
+
+
+
+
+
- Installing RDKit on Google Colab
-
@@ -29,21 +41,27 @@
-
-
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.
-
+
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 acebee4..cd65be1 100644
--- a/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
+++ b/docs/posts/2020-08-01-Natural-Feature-Tracking-ARJS.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Introduction to AR.js and Natural Feature Tracking
+
+
+
+
+
+
+
- Introduction to AR.js and Natural Feature Tracking
-
@@ -29,21 +41,27 @@
-
-
Introduction to AR.js and Natural Feature Tracking
AR.js
@@ -329,14 +347,15 @@ Serving HTTP on 0.0.0.0 port 8000 ...
+
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.
-
+
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 d90cdfc..4d61d9e 100644
--- a/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
+++ b/docs/posts/2020-10-11-macOS-Virtual-Cam-OBS.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Trying Different Camera Setups
+
+
+
+
+
+
+
- Trying Different Camera Setups
-
@@ -29,21 +41,27 @@
-
-
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.
-
+
diff --git a/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
index 270adfa..c78fb06 100644
--- a/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
+++ b/docs/posts/2020-11-17-Lets-Encrypt-DuckDns.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
+
+
+
+
+
+
+
- Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt
-
@@ -29,21 +41,27 @@
-
-
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.
@@ -122,14 +140,15 @@ navanspi.duckdns.org.60Caveats with copying the certificate: If you renew the certificate you will have to re-copy the files
+
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.
-
+
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 dabde3d..c0262ec 100644
--- a/docs/posts/2020-12-1-HTML-JS-RSS-Feed.html
+++ b/docs/posts/2020-12-1-HTML-JS-RSS-Feed.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ RSS Feed written in HTML + JavaScript
+
+
+
+
+
+
+
- RSS Feed written in HTML + JavaScript
-
@@ -29,21 +41,27 @@
-
-
If you want to directly open the HTML file in your browser after saving, don't forget to set CORS_PROXY=""
@@ -247,14 +265,15 @@
+
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.
-
+
diff --git a/docs/posts/2021-06-25-Blog2Twitter-P1.html b/docs/posts/2021-06-25-Blog2Twitter-P1.html
index 15d7cd7..26e1596 100644
--- a/docs/posts/2021-06-25-Blog2Twitter-P1.html
+++ b/docs/posts/2021-06-25-Blog2Twitter-P1.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Posting Blog Posts as Twitter Threads Part 1/n
+
+
+
+
+
+
+
- Posting Blog Posts as Twitter Threads Part 1/n
-
@@ -29,21 +41,27 @@
-
-
@@ -147,14 +165,15 @@ I am not handling lists or images right now.
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.
+
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.
-
+
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 426e975..492711b 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Basic NFC Music Cards for iOS
+
+
+
+
+
+
+
- Basic NFC Music Cards for iOS
-
@@ -29,21 +41,27 @@
-
-
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."
@@ -73,14 +91,15 @@ So, I did not have to ensure this could work with any device. I settled with usi
+
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.
-
+
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 2947c21..a249433 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Cheminformatics on the Web (2021)
+
+
+
+
+
+
+
- Cheminformatics on the Web (2021)
-
@@ -29,21 +41,27 @@
-
-
Here, I have compiled a list of some libraries and possible ideas.
@@ -126,14 +144,15 @@ Hopefully, this encourages you to explore the world of cheminformatics on the we
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.
-
+
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 f4c779f..d6d2ecc 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Making a Crude ML Powered Chatbot in Swift using CoreML
+
+
+
+
+
+
+
- Making a Crude ML Powered Chatbot in Swift using CoreML
-
@@ -29,21 +41,27 @@
-
-
Making a Crude ML Powered Chatbot in Swift using CoreML
A chatbot/virtual assistant, on paper, looks easy to build.
@@ -221,14 +239,15 @@ Otherwise, it calls the custom action.
If I ever release a part-2, it will either be about implementing this in Tensorflow.JS or an iOS app using SwiftUI ;)
+
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.
-
+
diff --git a/docs/posts/2022-05-21-Similar-Movies-Recommender.html b/docs/posts/2022-05-21-Similar-Movies-Recommender.html
index c1c103b..bba6725 100644
--- a/docs/posts/2022-05-21-Similar-Movies-Recommender.html
+++ b/docs/posts/2022-05-21-Similar-Movies-Recommender.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Building a Similar Movies Recommendation System
+
+
+
+
+
+
+
- Building a Similar Movies Recommendation System
-
@@ -29,21 +41,27 @@
-
-
@@ -450,14 +468,15 @@ Spies (2015): A secret agent must perform a heist without time on his side
Filter based on popularity: The data already exists in the indexed database
+
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.
-
+
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 bef89f6..281e21e 100644
--- a/docs/posts/2022-08-05-Why-You-No-Host.html
+++ b/docs/posts/2022-08-05-Why-You-No-Host.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Why You No Host?
+
+
+
+
+
+
+
- Why You No Host?
-
@@ -29,21 +41,27 @@
-
-
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.
+
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.
-
+
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 7f30c72..9f4ce15 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ A new method to blog
+
+
+
+
+
+
+
- A new method to blog
-
@@ -29,21 +41,27 @@
-
-
Here is the original PDF. I made some edits to the content after generating the markdown file
@@ -78,14 +96,15 @@
* In Part 2, I will discuss some more features *
+
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.
What is better than posting a blog post? Posting about your posting pipeline. I did this previously with Twitter.
@@ -326,14 +344,15 @@ Seeing that you are reading this on Mastodon, and that I have updated this secti
Not the best thing I have ever written, but it works!
+
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.
-
+
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 29322a1..e31fb80 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Interacting with Siri using the command line
+
+
+
+
+
+
+
- Interacting with Siri using the command line
-
@@ -29,21 +41,27 @@
-
-
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.
@@ -275,14 +293,15 @@ python3main.py&
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!
+
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 love taking jotting down my thoughts as bullet points.
-I find it easier to be able to recall my thoughts by just reading the keywords.
-But, at the same time, am I actually able to recall everything?
-
-
The primary reason I started writing in my journal is because I knew, I was never
-able to recall anything with 100% guarantee.
-
-
So, the question arises, does it still make sense to put time and effort into writing blog posts?
-You can simply ask an autoregressive model to generate it for you, based on bullet points.
-I feel like writitng still has a place in this world. Limitting ourselves to a model trained on a finite dataset, feels like an insult to creativity.
-If neural networks stopped being prediction machines, and were actually able to "think", I would still believe that creativity wins.
-Even if that creativity was now coming from the machine.
-
-
-
I am the master of my fate,. I am the captain of my soul.
-
-
-
As long as I am alive, and I have the spirit of being rebellious, I am never going to stop trying to write.
-Even if we have a tool that can generate the perfect essay, we humans will still write.
-
-
Why? Just because we can.
-
-
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.
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.
@@ -1136,14 +1154,15 @@ Your instructor has been notified and will verify your solution.
But, what about the secret phase?
+
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.
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.
Remember to replace any spaces in the flair with _
@@ -54,14 +72,15 @@
I wish this was documented somewhere.
+
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.
Do a deeper dive into the math of Machine/Deep Learning, before I get back into it
+
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.
-
+
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 6c44808..3509983 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Interacting with underlying element in HTML
+
+
+
+
+
+
+
- Interacting with underlying element in HTML
-
@@ -29,21 +41,27 @@
-
-
I know that the title is a bit weird. I was trying to interact with a video under an iPhone Bezel Screen frame.
@@ -117,14 +135,15 @@ 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.
-
+
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 7fcece6..502d4c9 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Cross-Compiling Hello World for DOS on macOS
+
+
+
+
+
+
+
- Cross-Compiling Hello World for DOS on macOS
-
@@ -29,21 +41,27 @@
-
-
Technically this should work for any platform that OpenWatcom 2 supports compiling binaries for. Some instructions are based on a post at retrocoding.net,
@@ -316,14 +334,15 @@ creatingaDOSMy 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.
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.
@@ -283,14 +301,15 @@
+
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.
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.
Just re-did the entire website using Publish (Publish by John Sundell). So, a new hello world post :)
+
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.
Detecting Driver Fatigue, Over-Speeding, and Speeding up Post-Accident Response
@@ -66,14 +84,15 @@
@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}}
+
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.
-
+
diff --git a/docs/publications/2020-03-14-generating-vaporwave.html b/docs/publications/2020-03-14-generating-vaporwave.html
index cbebbbf..5796cd7 100644
--- a/docs/publications/2020-03-14-generating-vaporwave.html
+++ b/docs/publications/2020-03-14-generating-vaporwave.html
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Is it possible to programmatically generate Vaporwave?
+
+
+
+
+
+
+
- Is it possible to programmatically generate Vaporwave?
-
@@ -29,21 +41,27 @@
-
-
Is it possible to programmatically generate Vaporwave?
This is still a pre-print.
@@ -80,14 +98,15 @@
}
+
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.
-
+
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 f990ce6..cd7a590 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
@@ -2,14 +2,26 @@
-
+
+
+
+
+ Possible Drug Candidates for COVID-19
+
+
+
+
+
+
+
- Possible Drug Candidates for COVID-19
-
@@ -29,35 +41,42 @@
-
-
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 64f80f9211b97812e8552546b0c97c5bdb1e3328 Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Thu, 28 Mar 2024 00:10:12 -0600
Subject: css
---
Resources/assets/c-hyde.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'Resources')
diff --git a/Resources/assets/c-hyde.css b/Resources/assets/c-hyde.css
index 0f374b1..6f82afd 100644
--- a/Resources/assets/c-hyde.css
+++ b/Resources/assets/c-hyde.css
@@ -569,7 +569,7 @@ html {
*/
.sidebar {
text-align: center;
- padding: 2rem 1rem;
+ padding: 0.5rem 1rem;
color: rgba(255, 255, 255, 0.5);
background-color: #202020;
}
--
cgit v1.2.3
From fdf67099dbe882b50444a42e4bbd024394cfb548 Mon Sep 17 00:00:00 2001
From: Navan Chauhan
Date: Thu, 28 Mar 2024 21:28:46 -0600
Subject: adfrsuite
---
.../2024-03-28-Running-ADFRSuite-on-arm64-Macs.md | 379 ++++++++++++++++
.../2024-03-28-Running-ADFRSuite-on-arm64-Macs.png | Bin 0 -> 26043 bytes
docs/feed.rss | 412 +++++++++++++++++-
.../2024-03-28-Running-ADFRSuite-on-arm64-Macs.png | Bin 0 -> 26043 bytes
docs/index.html | 26 +-
...2024-03-28-Running-ADFRSuite-on-arm64-Macs.html | 484 +++++++++++++++++++++
docs/posts/index.html | 13 +
docs/tags/Cheminformatics.html | 13 +
docs/tags/macOS.html | 13 +
9 files changed, 1325 insertions(+), 15 deletions(-)
create mode 100644 Content/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.md
create mode 100644 Resources/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png
create mode 100644 docs/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png
create mode 100644 docs/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.html
(limited to 'Resources')
diff --git a/Content/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.md b/Content/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.md
new file mode 100644
index 0000000..f43f15c
--- /dev/null
+++ b/Content/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.md
@@ -0,0 +1,379 @@
+---
+date: 2024-03-28 20:12
+description: Fixing ADFRsuite on M1/MX chip Macs - CLI Tools
+tags: macOS, Cheminformatics
+---
+
+# Fixing ADFRSuite for Apple Silicon
+
+We are going to be running everything through Rosetta 2. I am confident that if I had access to the original source code, I could find a way to run everything natively.
+
+These are the following issues that we will be fixing in this part:
+
+* “python2.7” cannot be opened because the developer cannot be verified.
+* OpenBabel Error
+* Segmentation fault while running the [redocking tutorial](https://ccsb.scripps.edu/adcp/tutorial-redocking/)
+
+For the sake of simplicity, I am assuming that I am running all these commands in the folder `~/Developer/scrippstuff/`
+
+## Installing Rosetta 2
+
+We are going to run all of these steps in the terminal
+
+```bash
+/usr/sbin/softwareupdate --install-rosetta --agree-to-license
+```
+
+### Install Homebrew for x86
+
+Both versions of homebrew (x86 and arm64) can peacefully coexist on your system.
+
+From now on, every command should be run in a terminal session that starts with this as the first command:
+
+```bash
+arch -x86_64 zsh
+```
+
+Now, we can install homebrew:
+
+```bash
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+```
+
+Here is my output:
+
+``` bash
+➜ scrippstuff uname -a
+Darwin Navans-MacBook-Pro.local 23.3.0 Darwin Kernel Version 23.3.0: Wed Dec 20 21:31:00 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6020 x86_64
+➜ scrippstuff /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
+==> Checking for `sudo` access (which may request your password)...
+Password:
+==> This script will install:
+/usr/local/bin/brew
+/usr/local/share/doc/homebrew
+/usr/local/share/man/man1/brew.1
+/usr/local/share/zsh/site-functions/_brew
+/usr/local/etc/bash_completion.d/brew
+/usr/local/Homebrew
+==> The following new directories will be created:
+/usr/local/Cellar
+/usr/local/Caskroom
+
+Press RETURN/ENTER to continue or any other key to abort:
+==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Caskroom
+==> /usr/bin/sudo /bin/chmod ug=rwx /usr/local/Cellar /usr/local/Caskroom
+==> /usr/bin/sudo /usr/sbin/chown navanchauhan /usr/local/Cellar /usr/local/Caskroom
+==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Caskroom
+==> /usr/bin/sudo /usr/sbin/chown -R navanchauhan:admin /usr/local/Homebrew
+==> /usr/bin/sudo /bin/mkdir -p /Users/navanchauhan/Library/Caches/Homebrew
+==> /usr/bin/sudo /bin/chmod g+rwx /Users/navanchauhan/Library/Caches/Homebrew
+==> /usr/bin/sudo /usr/sbin/chown -R navanchauhan /Users/navanchauhan/Library/Caches/Homebrew
+==> Downloading and installing Homebrew...
+remote: Enumerating objects: 47, done.
+remote: Counting objects: 100% (47/47), done.
+remote: Compressing objects: 100% (19/19), done.
+remote: Total 47 (delta 28), reused 47 (delta 28), pack-reused 0
+Unpacking objects: 100% (47/47), 6.11 KiB | 223.00 KiB/s, done.
+From https://github.com/Homebrew/brew
+ + 18ebdd8c8f...67a096fcbb tapioca-compiler-for-tty-rbi -> origin/tapioca-compiler-for-tty-rbi (forced update)
+Switched to and reset branch 'stable'
+==> Updating Homebrew...
+==> Installation successful!
+
+==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
+Read the analytics documentation (and how to opt-out) here:
+ https://docs.brew.sh/Analytics
+No analytics data has been sent yet (nor will any be during this install run).
+
+==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
+ https://github.com/Homebrew/brew#donations
+
+==> Next steps:
+- Run these two commands in your terminal to add Homebrew to your PATH:
+ (echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/navanchauhan/.zprofile
+ eval "$(/usr/local/bin/brew shellenv)"
+- Run brew help to get started
+- Further documentation:
+ https://docs.brew.sh
+```
+
+At this point, you don't need to edit your `zshrc` or `zsh_profile`.
+
+### Install pyenv
+
+The reason we are installing pyenv is because it is easier to build Python 2.7.18 from scratch than messing around with codesigning and quarantine bs on macOS.
+
+```bash
+➜ scrippstuff brew install pyenv
+==> Downloading https://ghcr.io/v2/homebrew/core/pyenv/manifests/2.3.36
+############################################################################################################################################################### 100.0%
+==> Fetching dependencies for pyenv: m4, autoconf, ca-certificates, openssl@3, pkg-config and readline
+==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19
+############################################################################################################################################################### 100.0%
+==> Fetching m4
+==> Downloading https://ghcr.io/v2/homebrew/core/m4/blobs/sha256:8434a67a4383836b2531a6180e068640c5b482ee6781b673d65712e4fc86ca76
+############################################################################################################################################################### 100.0%
+==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72
+############################################################################################################################################################### 100.0%
+==> Fetching autoconf
+==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/blobs/sha256:12368e33b89d221550ba9e261b0c6ece0b0e89250fb4c95169d09081e0ebb2dd
+############################################################################################################################################################### 100.0%
+==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2024-03-11
+############################################################################################################################################################### 100.0%
+==> Fetching ca-certificates
+==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/blobs/sha256:cab828953672906e00a8f25db751977b8dc4115f021f8dfe82b644ade03dacdb
+############################################################################################################################################################### 100.0%
+==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.2.1-1
+############################################################################################################################################################### 100.0%
+==> Fetching openssl@3
+==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:ef8211c5115fc85f01261037f8fea76cc432b92b4fb23bc87bbf41e9198fcc0f
+############################################################################################################################################################### 100.0%
+==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/manifests/0.29.2_3
+############################################################################################################################################################### 100.0%
+==> Fetching pkg-config
+==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/blobs/sha256:421571f340277c62c5cc6fd68737bd7c4e085de113452ea49b33bcd46509bb12
+############################################################################################################################################################### 100.0%
+==> Downloading https://ghcr.io/v2/homebrew/core/readline/manifests/8.2.10
+############################################################################################################################################################### 100.0%
+==> Fetching readline
+==> Downloading https://ghcr.io/v2/homebrew/core/readline/blobs/sha256:9796e0ff1cc29ae7e75d8fc1a3e2c5e8ae2aeade8d9d59a16363306bf6c5b8f4
+############################################################################################################################################################### 100.0%
+==> Fetching pyenv
+==> Downloading https://ghcr.io/v2/homebrew/core/pyenv/blobs/sha256:d117a99ed53502aff29109bfa366693ca623f2326e1e6b4db68fef7b7f63eeba
+############################################################################################################################################################### 100.0%
+==> Installing dependencies for pyenv: m4, autoconf, ca-certificates, openssl@3, pkg-config and readline
+==> Installing pyenv dependency: m4
+==> Downloading https://ghcr.io/v2/homebrew/core/m4/manifests/1.4.19
+Already downloaded: /Users/navanchauhan/Library/Caches/Homebrew/downloads/5b2a7f715487b7377e409e8ca58569040cd89f33859f691210c58d94410fd33b--m4-1.4.19.bottle_manifest.json
+==> Pouring m4--1.4.19.sonoma.bottle.tar.gz
+🍺 /usr/local/Cellar/m4/1.4.19: 13 files, 739.9KB
+==> Installing pyenv dependency: autoconf
+==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.72
+Already downloaded: /Users/navanchauhan/Library/Caches/Homebrew/downloads/b73cdb320c4261bbf8d02d03e50dc755c869c5859c1d4e93616898fc7cd939ff--autoconf-2.72.bottle_manifest.json
+==> Pouring autoconf--2.72.sonoma.bottle.tar.gz
+🍺 /usr/local/Cellar/autoconf/2.72: 71 files, 3.6MB
+==> Installing pyenv dependency: ca-certificates
+==> Downloading https://ghcr.io/v2/homebrew/core/ca-certificates/manifests/2024-03-11
+Already downloaded: /Users/navanchauhan/Library/Caches/Homebrew/downloads/c431e0186df2ccc2ea942b34a3c26c2cebebec8e07ad6abdae48447a52c5f506--ca-certificates-2024-03-11.bottle_manifest.json
+==> Pouring ca-certificates--2024-03-11.all.bottle.tar.gz
+==> Regenerating CA certificate bundle from keychain, this may take a while...
+🍺 /usr/local/Cellar/ca-certificates/2024-03-11: 3 files, 229.6KB
+==> Installing pyenv dependency: openssl@3
+==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.2.1-1
+Already downloaded: /Users/navanchauhan/Library/Caches/Homebrew/downloads/f7b6e249843882452d784a8cbc4e19231186230b9e485a2a284d5c1952a95ec2--openssl@3-3.2.1-1.bottle_manifest.json
+==> Pouring openssl@3--3.2.1.sonoma.bottle.1.tar.gz
+🍺 /usr/local/Cellar/openssl@3/3.2.1: 6,874 files, 32.5MB
+==> Installing pyenv dependency: pkg-config
+==> Downloading https://ghcr.io/v2/homebrew/core/pkg-config/manifests/0.29.2_3
+Already downloaded: /Users/navanchauhan/Library/Caches/Homebrew/downloads/ac691fc7ab8ecffba32a837e7197101d271474a3a84cfddcc30c9fd6763ab3c6--pkg-config-0.29.2_3.bottle_manifest.json
+==> Pouring pkg-config--0.29.2_3.sonoma.bottle.tar.gz
+🍺 /usr/local/Cellar/pkg-config/0.29.2_3: 11 files, 656.4KB
+==> Installing pyenv dependency: readline
+==> Downloading https://ghcr.io/v2/homebrew/core/readline/manifests/8.2.10
+Already downloaded: /Users/navanchauhan/Library/Caches/Homebrew/downloads/4ddd52803319828799f1932d4c7fa8d11c667049b20a56341c0c19246a1be93b--readline-8.2.10.bottle_manifest.json
+==> Pouring readline--8.2.10.sonoma.bottle.tar.gz
+🍺 /usr/local/Cellar/readline/8.2.10: 50 files, 1.7MB
+==> Installing pyenv
+==> Pouring pyenv--2.3.36.sonoma.bottle.tar.gz
+🍺 /usr/local/Cellar/pyenv/2.3.36: 1,158 files, 3.4MB
+==> Running `brew cleanup pyenv`...
+Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
+Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
+```
+
+And, build the last version of Python 2.7
+
+```bash
+➜ scrippstuff PYENV_ROOT="~/Developer/scrippstuff" pyenv install 2.7.18
+python-build: use openssl from homebrew
+python-build: use readline from homebrew
+Downloading Python-2.7.18.tar.xz...
+-> https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tar.xz
+Installing Python-2.7.18...
+patching file configure
+patching file configure.ac
+patching file setup.py
+patching file 'Mac/Tools/pythonw.c'
+patching file setup.py
+patching file 'Doc/library/ctypes.rst'
+patching file 'Lib/test/test_str.py'
+patching file 'Lib/test/test_unicode.py'
+patching file 'Modules/_ctypes/_ctypes.c'
+patching file 'Modules/_ctypes/callproc.c'
+patching file 'Modules/_ctypes/ctypes.h'
+patching file 'Modules/_ctypes/callproc.c'
+patching file setup.py
+patching file 'Mac/Modules/qt/setup.py'
+patching file setup.py
+python-build: use readline from homebrew
+python-build: use zlib from xcode sdk
+Installed Python-2.7.18 to /Users/navanchauhan/Developer/scrippstuff/~/Developer/scrippstuff/versions/2.7.18
+```
+
+Test the new installation:
+
+```bash
+➜ scrippstuff ~/Developer/scrippstuff/\~/Developer/scrippstuff/versions/2.7.18/bin/python2.7
+Python 2.7.18 (default, Mar 28 2024, 20:47:13)
+[GCC Apple LLVM 15.0.0 (clang-1500.1.0.2.5)] on darwin
+Type "help", "copyright", "credits" or "license" for more information.
+>>> from random import randint
+>>> randint(0,10)
+6
+>>> exit()
+```
+
+Now, we can compress this newly created Python version into a `tar.gz` file to replace the one provided in ADFRsuite_x86_64Darwin_1.0.tar.gz. Don't forget the `.` at the end
+
+```bash
+➜ scrippstuff tar -C ./\~/Developer/scrippstuff/versions/2.7.18 -czf new.tar.gz .
+```
+
+## Install ADFRsuite
+
+If you don't already have the tarball, you can download it by:
+
+```bash
+$ curl -o adfr.tar.gz https://ccsb.scripps.edu/adfr/download/1033/
+```
+
+Uncompress it
+
+```bash
+$ tar -xvzf adfr.tar.gz
+```
+
+Replace the provided Python archive with the one we created:
+
+```bash
+$ cd ADFRsuite_x86_64Darwin_1.0
+$ mv new.tar.gz Python2.7.tar.gz
+```
+
+Note: For some reason simply copying it doesn't work and you need to use `mv`
+
+Just to not mess with anything else, I will be installing everything in a folder called `clean_install`
+
+```bash
+$ mkdir clean_install
+$ ./install.sh -d clean_install
+...
+ ADFRsuite installation complete.
+To run agfr, agfrgui, adfr, autosite, about, pythonsh scripts located at:
+/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/bin
+add /Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/bin to the path environment variable in .cshrc or .bashrc:
+.cshrc:
+set path = (/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/bin $path)
+
+.bashrc:
+export PATH=/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/bin:$PATH
+```
+
+Now, to test `agfr`, first run the command (replacing `navanchauhan` with yout username)
+
+```bash
+$ export PATH=/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/bin:$PATH
+$ agfr
+➜ ADFRsuite_x86_64Darwin_1.0 agfr
+==============================
+*** Open Babel Error in openLib
+ /Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/lib/openbabel/2.4.1/acesformat.so did not load properly.
+ Error: dlopen(/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/lib/openbabel/2.4.1/acesformat.so, 0x0009): Library not loaded: /opt/X11/lib/libcairo.2.dylib
+ Referenced from: <24174F3E-2670-79AC-4F26-F8B49774194A> /Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/lib/openbabel/2.4.1/acesformat.so
+ Reason: tried: '/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/lib/libcairo.2.dylib' (no such file), '/opt/X11/lib/libcairo.2.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/X11/lib/libcairo.2.dylib' (no such file), '/opt/X11/lib/libcairo.2.dylib' (no such file), '/usr/local/lib/libcairo.2.dylib' (no such file), '/usr/lib/libcairo.2.dylib' (no such file, not in dyld cache)
+==============================
+```
+
+
+## Fixing `Open Babel Error`
+
+```bash
+$ brew install cairo
+```
+
+## Completing the re-docking tutorial
+
+### Dowbloading the dataset
+
+```bash
+$ curl -o tutorial-data.zip https://ccsb.scripps.edu/adcp/download/1063/
+$ unzip tutorial-data.zip
+$ cd ADCP_tutorial_data/3Q47
+```
+
+### Conversion to PDBQT
+
+```bash
+$ reduce 3Q47_rec.pdb > 3Q47_recH.pdb
+$ reduce 3Q47_pep.pdb > 3Q47_pepH.pdb
+```
+
+### Preparing Receptor
+
+```
+$ prepare_receptor -r 3Q47_recH.pdb
+$ prepare_ligand -l 3Q47_pepH.pdb
+```
+
+### Generate Target File
+
+```bash
+$ agfr -r 3Q47_recH.pdbqt -l 3Q47_pepH.pdbqt -asv 1.1 -o 3Q47
+➜ 3Q47 agfr -r 3Q47_recH.pdbqt -l 3Q47_pepH.pdbqt -asv 1.1 -o 3Q47
+Traceback (most recent call last):
+ File "/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFR/bin/runAGFR.py", line 36, in
+ from ADFR.utils.runAGFR import runAGFR
+ File "/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFR/utils/runAGFR.py", line 41, in
+ from ADFR.utils.maps import flexResStr2flexRes
+ File "/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFR/utils/maps.py", line 35, in
+ from ADFRcc.adfr import GridMap
+ File "/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFRcc/__init__.py", line 34, in
+ from ADFRcc.adfr import Parameters
+ File "/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFRcc/adfr.py", line 43, in
+ import ADFRcc.adfrcc as CPP
+ File "/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFRcc/adfrcc.py", line 28, in
+ _adfrcc = swig_import_helper()
+ File "/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFRcc/adfrcc.py", line 24, in swig_import_helper
+ _mod = imp.load_module('_adfrcc', fp, pathname, description)
+ImportError: dlopen(/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFRcc/_adfrcc.so, 0x0002): Library not loaded: /Users/Shared/mgltoolsDev/src/homebrew/opt/gcc/lib/gcc/8/libgomp.1.dylib
+ Referenced from: <424BF61E-BF0F-351E-B546-E82EBBD8FBF5> /Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/CCSBpckgs/ADFRcc/_adfrcc.so
+ Reason: tried: '/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0/clean_install/lib/libgomp.1.dylib' (no such file), '/Users/Shared/mgltoolsDev/src/homebrew/opt/gcc/lib/gcc/8/libgomp.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/Shared/mgltoolsDev/src/homebrew/opt/gcc/lib/gcc/8/libgomp.1.dylib' (no such file), '/Users/Shared/mgltoolsDev/src/homebrew/opt/gcc/lib/gcc/8/libgomp.1.dylib' (no such file), '/usr/local/lib/libgomp.1.dylib' (no such file), '/usr/lib/libgomp.1.dylib' (no such file, not in dyld cache)
+➜ 3Q47
+```
+
+Sometimes this error is simply outputted as a segmentation fault. But, it is because it cannot find the `libgomp.1.dylib`. I haven't tested using a newer version of GCC to make it work. Building GCC 8 yourself is absolutely painful. We are going to use a copy generated by the homebrew team.
+
+```bash
+$ cd ../../
+$ pwd
+/Users/navanchauhan/Developer/scrippstuff/ADFRsuite_x86_64Darwin_1.0
+$ curl -L -H "Authorization: Bearer QQ==" -o gcc8amd64.tar.gz https://ghcr.io/v2/homebrew/core/gcc/8/blobs/sha256:438d5902e5f21a5e8acb5920f1f5684ecfe0c645247d46c8d44c2bbe435966b2
+$ tar -xzf gcc8amd64.tar.gz
+$ cp -r gcc@8/8.5.0/lib/gcc/8/* clean_install/lib/
+```
+
+Now, we should be able to go back and run the target generation command:
+
+```bash
+$ cd ADCP_tutorial_data/3Q47
+$ agfr -r 3Q47_recH.pdbqt -l 3Q47_pepH.pdbqt -asv 1.1 -o 3Q47
+#################################################################
+# If you used AGFR in your work, please cite: #
+# #
+# P.A. Ravindranath S. Forli, D.S. Goodsell, A.J. Olson and #
+# M.F. Sanner #
+# AutoDockFR: Advances in Protein-Ligand Docking with #
+...
+```
+
+### Docking Peptide
+
+```bash
+$ adcp -t 3Q47.trg -s npisdvd -N 20 -n 1000000 -o 3Q47_redocking -ref 3Q47_pepH.pdb
+```
+
+There you have it. Running ADCP on the newest macOS version against all odds.
+
+I haven't yet looked into fixing/patching `agfrgui` as I don't use the software. But, if someone reallllly needs to run it on Apple Silicon, I am happy to take a look at monkeypatching it.
+
+In case years down the line the prebuilt version of GCC 8 is not available, let me know so I can replace the link with my mirror.
diff --git a/Resources/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png b/Resources/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png
new file mode 100644
index 0000000..4b1bad2
Binary files /dev/null and b/Resources/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png differ
diff --git a/docs/feed.rss b/docs/feed.rss
index 2cb2370..d4cd27c 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, 27 Mar 2024 23:45:05 -0000
- Wed, 27 Mar 2024 23:45:05 -0000
+ Thu, 28 Mar 2024 21:27:46 -0000
+ Thu, 28 Mar 2024 21:27:46 -0000250
@@ -1953,6 +1953,414 @@ Serving HTTP on 0.0.0.0 port 8000 ...
]]>
+
+
+ https://web.navan.dev/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.html
+
+
+ Fixing ADFRSuite for Apple Silicon
+
+
+ Fixing ADFRsuite on M1/MX chip Macs - CLI Tools
+
+ https://web.navan.dev/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.html
+ Thu, 28 Mar 2024 20:12:00 -0000
+ Fixing ADFRSuite for Apple Silicon
+
+
We are going to be running everything through Rosetta 2. I am confident that if I had access to the original source code, I could find a way to run everything natively.
+
+
These are the following issues that we will be fixing in this part:
+
+
+
“python2.7” cannot be opened because the developer cannot be verified.
At this point, you don't need to edit your zshrc or zsh_profile.
+
+
Install pyenv
+
+
The reason we are installing pyenv is because it is easier to build Python 2.7.18 from scratch than messing around with codesigning and quarantine bs on macOS.
Now, we can compress this newly created Python version into a tar.gz file to replace the one provided in ADFRsuitex8664Darwin_1.0.tar.gz. Don't forget the . at the end
Sometimes this error is simply outputted as a segmentation fault. But, it is because it cannot find the libgomp.1.dylib. I haven't tested using a newer version of GCC to make it work. Building GCC 8 yourself is absolutely painful. We are going to use a copy generated by the homebrew team.
Now, we should be able to go back and run the target generation command:
+
+
+
$cdADCP_tutorial_data/3Q47
+$agfr-r3Q47_recH.pdbqt-l3Q47_pepH.pdbqt-asv1.1-o3Q47
+#################################################################
+# If you used AGFR in your work, please cite: #
+# #
+# P.A. Ravindranath S. Forli, D.S. Goodsell, A.J. Olson and #
+# M.F. Sanner #
+# AutoDockFR: Advances in Protein-Ligand Docking with #
+...
+
There you have it. Running ADCP on the newest macOS version against all odds.
+
+
I haven't yet looked into fixing/patching agfrgui as I don't use the software. But, if someone reallllly needs to run it on Apple Silicon, I am happy to take a look at monkeypatching it.
+
+
In case years down the line the prebuilt version of GCC 8 is not available, let me know so I can replace the link with my mirror.
+]]>
+
+
https://web.navan.dev/posts/2022-11-07-a-new-method-to-blog.html
diff --git a/docs/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png b/docs/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png
new file mode 100644
index 0000000..4b1bad2
Binary files /dev/null and b/docs/images/opengraph/posts/2024-03-28-Running-ADFRSuite-on-arm64-Macs.png differ
diff --git a/docs/index.html b/docs/index.html
index da5e542..7b1f66c 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -88,6 +88,19 @@ lead.innerText = new_phrase;
We are going to be running everything through Rosetta 2. I am confident that if I had access to the original source code, I could find a way to run everything natively.
+
+
These are the following issues that we will be fixing in this part:
+
+
+
“python2.7” cannot be opened because the developer cannot be verified.
At this point, you don't need to edit your zshrc or zsh_profile.
+
+
Install pyenv
+
+
The reason we are installing pyenv is because it is easier to build Python 2.7.18 from scratch than messing around with codesigning and quarantine bs on macOS.
Now, we can compress this newly created Python version into a tar.gz file to replace the one provided in ADFRsuitex8664Darwin_1.0.tar.gz. Don't forget the . at the end
Sometimes this error is simply outputted as a segmentation fault. But, it is because it cannot find the libgomp.1.dylib. I haven't tested using a newer version of GCC to make it work. Building GCC 8 yourself is absolutely painful. We are going to use a copy generated by the homebrew team.
Now, we should be able to go back and run the target generation command:
+
+
+
$cdADCP_tutorial_data/3Q47
+$agfr-r3Q47_recH.pdbqt-l3Q47_pepH.pdbqt-asv1.1-o3Q47
+#################################################################
+# If you used AGFR in your work, please cite: #
+# #
+# P.A. Ravindranath S. Forli, D.S. Goodsell, A.J. Olson and #
+# M.F. Sanner #
+# AutoDockFR: Advances in Protein-Ligand Docking with #
+...
+
There you have it. Running ADCP on the newest macOS version against all odds.
+
+
I haven't yet looked into fixing/patching agfrgui as I don't use the software. But, if someone reallllly needs to run it on Apple Silicon, I am happy to take a look at monkeypatching it.
+
+
In case years down the line the prebuilt version of GCC 8 is not available, let me know so I can replace the link with my mirror.
+
+
+
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 a64a79a..ef630d7 100644
--- a/docs/posts/index.html
+++ b/docs/posts/index.html
@@ -84,6 +84,19 @@ lead.innerText = new_phrase;