Skip to content

Instantly share code, notes, and snippets.

View metacritical's full-sized avatar
Creating Black holes.

Pankaj Doharey metacritical

Creating Black holes.
View GitHub Profile
@metacritical
metacritical / Routine_that_works.md
Last active July 10, 2023 16:28
The meal and exercise routine that is working for me.

I am feeling the best i have felt in a long time. I have been experimenting with diet and suppliments. here is my current stack:

Morning:

  • 15g Collagen + 5g Creatine + aloevera juice + 1 lemon
  • Go for a walk + run 1.5 Km + 1.5 Km
  • Some basic resistance band exercises.

Since Aloevera is a laxative the best way to prepare it is first cut the leaf in 2-3 pieces horizontally and let it soak in a lot of water for 4-5 hours. throw away that water before removing the aloe gel. Be careful not to scrape any green stuff and you will have no laxative effect.

@metacritical
metacritical / MealPlan.md
Last active July 10, 2023 16:04
Meal Plan

Update: this shit doesnt work.

Day Meal Food Item Portion Size Calories Carbs (g) Protein (g) Fat (g) Fiber (g)
1 Breakfast Oatmeal 1/2 cup (40g) 150 27 5 2 4
Blueberries 1/4 cup (40g) 20 5 0 0 2
Almonds 1 ounce (28g) 160 6 6 14 3
Lunch Grilled Chicken 3 ounces (85g) 165 0 31 3 0
Brown Rice 1/2 cup cooked (90g) 100 22 2 1 2
Broccoli 1 cup cooked (156
@metacritical
metacritical / llama-home.md
Created May 16, 2023 03:53 — forked from rain-1/llama-home.md
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@metacritical
metacritical / simples_lstm_softmax_classifier_keras.py
Created May 8, 2023 05:28 — forked from bzamecnik/simples_lstm_softmax_classifier_keras.py
Simplest sequence classifier with LSTM & softmax in Keras
"""
Classifies sequences of length 10 with 20 features into 2 classes
with a single LSTM layer with 32 neurons.
See also a more involved example:
https://gist.github.com/bzamecnik/dccc1c4fdcf1c7a31757168b19c827a7
"""
from keras.layers import Input, LSTM, Dense
@metacritical
metacritical / lstm_with_softmax_keras.py
Created May 8, 2023 05:27 — forked from bzamecnik/lstm_with_softmax_keras.py
LSTM with softmax activation in Keras
"""
When classifying upon a sequence usually we stack some LSTM returning sequences,
then one LSTM returning a point, then Dense with softmax activation.
Is it possible instead to give the last non-sequential LSTM a softmax activation?
The answer is yes.
In this example we have 3 sequential layers and one layer producing the final result.

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@metacritical
metacritical / emacs.md
Last active November 16, 2022 08:59
Emacs with non title bars, Xwidgets support.
brew install emacs-mac --with-no-title-bars --with-natural-title-bar --with-native-comp --with-xwidgets
@metacritical
metacritical / markdown-with-xwidget-webkit.md
Created August 22, 2022 06:37 — forked from jhacksworth/markdown-with-xwidget-webkit.md
Doom Emacs: Markdown live preview with xwidget-webkit

Doom Emacs: Markdown live preview with xwidget-webkit

I saw that there's a markdown-live-preview-mode and the var markdown-live-preview-window-function which was set to the function markdown-live-preview-window-eww. That function looks like this:

(defun markdown-live-preview-window-eww (file)
  "Preview FILE with eww.
To be used with `markdown-live-preview-window-function'."
@metacritical
metacritical / gist:f8fd4a572076e559093bc026e6602d8d
Created August 22, 2022 04:02 — forked from justinhj/gist:eb2d354d06631076566f
Sending a notification from emacs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Terminal notifier
;; requires 'sudo gem install terminal-notifier'
;; stolen from erc-notifier
(defvar terminal-notifier-command (executable-find "terminal-notifier") "The path to terminal-notifier.")
; (terminal-notifier-notify "Emacs notification" "Something amusing happened")
(defun terminal-notifier-notify (title message)
@metacritical
metacritical / neomuttrc
Created August 21, 2022 10:06 — forked from VladimirPal/neomuttrc
Minimal neomutt config for gmail imap
set imap_user="mail.vpal@gmail.com"
set imap_pass=`/usr/bin/security find-generic-password -w -a 'mail.vpal@gmail.com' -s 'Gmail'`
set folder=imaps://imap.gmail.com/
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# https://www.neomutt.org/guide/reference search sleep_time for additional info
set sleep_time=0 # be faster