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 / Intermittent-Fasting.md
Created August 23, 2024 07:15
Intermittent Fasting

Get Started with Intermittent Fasting

Begin with a 12-hour fasting window, and gradually increase it to 14, 16, or even 24 hours to boost your weight loss results. This natural calorie reduction will help you get into a healthy rhythm.

Fuel Your Body with Protein

Aim for 50 grams of protein per meal to keep you full, rev up your metabolism, and preserve those hard-earned muscles. Easy ways to hit your protein goal include:

  • 2 scoops of whey protein
  • 6 ounces of chicken breast
@metacritical
metacritical / llama3.1_8b_going_mad.md
Last active August 15, 2024 12:09
LLama 3.1 Going mad

Q. Create a Backronym from this :

Similarity search: Find the most similar vectors to a given query vector.

Clustering: Group similar vectors together.

Nearest neighbors: Find the closest vectors to a given query vector.

K-means: Perform k-means clustering on a set of vectors.

@metacritical
metacritical / gist:12830ccaded286351871afbe386223a2
Created August 3, 2024 16:50
Download the chrome extension Locally?
https://robwu.nl/crxviewer/
@metacritical
metacritical / Claude_3.5_system_prompt.txt
Created July 7, 2024 06:38
Claude_3.5_system_prompt Leak
<artifacts_info>
The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity.
# Good artifacts are...
- Substantial content (>15 lines)
- Content that the user is likely to modify, iterate on, or take ownership of
- Self-contained, complex content that can be understood on its own, without context from the conversation
- Content intended for eventual use outside the conversation (e.g., reports, emails, presentations)
- Content likely to be referenced or reused multiple times
@metacritical
metacritical / 000_HOWTO.md
Created May 25, 2024 08:25 — forked from Papierkorb/000_HOWTO.md
Dynamic library in Crystal

Writing a dynamic library in Crystal, and calling it from C

  • Download all files.
  • Build the Crystal part:
crystal build --release --cross-compile --prelude ./no_main library.cr
              ^ You can leave this out
                        ^ We want to link ourselves!
 ^ Use our custom prelude!
@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