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 / buddha_names.md
Created April 6, 2024 14:07
Names of Buddha.
  1. Siddhartha Gautama - This is the Buddha's given name at birth.
  2. Shakyamuni - This name means "sage of the Shakya clan," referring to the Buddha's tribal affiliation.
  3. Tathagata - This name means "thus gone" or "thus come" and is one of the titles of the Buddha.
  4. Bhagavan - This name means "Blessed One" or "Exalted One" and is another title of the Buddha.
  5. Sammasambuddha - This name means "fully self-enlightened Buddha" and is a title of the Buddha.
  6. Gotama - This is another name for the Buddha's family or clan.
  7. Sakyasimha - This name means "Lion of the Shakyas" and is a title of the Buddha.
  8. Vipassi - This is the name of the Buddha who appeared in the world 91 kalpas (eons) ago.
  9. Sikhi - This is the name of the Buddha who appeared in the world 71 kalpas ago.
  10. Vessabhu - This is the name of the Buddha who appeared in the world 61 kalpas ago.
@metacritical
metacritical / Preview.md
Last active January 6, 2024 12:17
Simple Mail Catcher for rails.

Preview

Screenshot 2024-01-06 at 5 28 52 PM
@metacritical
metacritical / emacsclient.c
Created December 7, 2023 09:36
Test emaclient
/* Client process that communicates with GNU Emacs acting as server.
Copyright (C) 1986-2023 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
@metacritical
metacritical / Tiny_corp_master_plan.md
Last active December 2, 2023 18:01
Tiny corp master plan - By George Hotz (This gist exists purely for accessibility purposes)

Tiny corp master plan

Our mission is to “commoditize the petaflop.” By building an ML framework where the engineering cost to add a new accelerator is 10-100x lower than competitors, we lower the cost for new players to enter the market.

Similarly, we lower the cost of new operations and optimizers, allowing ML to avoid local minima. In older versions of PyTorch, batchnorm and groupnorm have very different performance. There’s no fundamental reason for this, it was just because more work had been put into the batchnorm kernels. In tinygrad, all the kernels are compiled on the fly so things like this won’t happen.

@metacritical
metacritical / tdee.rb
Created November 15, 2023 15:27
Total Daily Energy Expenditure script
#!/usr/bin/env ruby
# Function to calculate BMR
def calculate_bmr(gender, weight, height, age)
if gender.downcase == 'male'
return 88.362 + (13.397 * weight) + (4.799 * height) - (5.677 * age)
else
return 447.593 + (9.247 * weight) + (3.098 * height) - (4.330 * age)
end
end
@metacritical
metacritical / Gemfile
Created October 28, 2023 17:56 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@metacritical
metacritical / Embedding GoLang into a Ruby application.md
Created September 26, 2023 19:15 — forked from schweigert/Embedding GoLang into a Ruby application.md
Embedding GoLang into a Ruby application - Blogpost to Magrathealabs

Go Title

I am passionate about Ruby, but its execution time compared to other languages is extremely high, especially when we want to use more complex algorithms. In general, data structures in interpreted languages become incredibly slow compared to compiled languages. Some algorithms such as ´n-body´ and ´fannkuch-redux´ can be up to 30 times slower in Ruby than Go. This is one of the reasons I was interested in embedding Go code in a Ruby environment.

For those who do not know how shared libraries operate, they work in a similar way as DLLs in Windows. However, they have a native code with a direct interface to the C compiler.

Note Windows uses the DLL system, and in this case, this does not necessarily have to be in native code.

One example is DLLs written in C#, which runs on a virtual machine. Because I do not use windows, I ended up not testing if it is poss

@metacritical
metacritical / Postgres_M2.md
Created August 6, 2023 12:43
Postgres on M2

Installing pg 1.5.3 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

brew install libpq
gem install pg -- --with-pg-config=/usr/local/opt/libpq/bin/pg_config
@metacritical
metacritical / yt_delete_comments.js
Created July 29, 2023 18:35
Delete youtube comments En Masse!
var a = document.getElementsByClassName("VfPpkd-Bz112c-LgbsSe yHy1rc eT1oJ mN1ivc")
var i = 1; while(i <= a.length){ a[i].click(); i+=1 }
@metacritical
metacritical / kandinsky.txt
Created July 14, 2023 23:18 — forked from FurkanGozukara/kandinsky.txt
Save kandinsky generated images
# tutorial video link : https://youtu.be/dYt9xJ7dnpU
# colab link : https://colab.research.google.com/drive/1xSbu-b-EwYd6GdaFPRVgvXBX_mciZ41e?usp=sharing
# repo link : https://github.com/ai-forever/Kandinsky-2
# used repo commit hash : a4354c04d5fbd48851866ef7d84ec444d3d50102
# those who getting cuda error
# pip uninstall torch
# pip3 install torch==1.13.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
import os