Skip to content

Instantly share code, notes, and snippets.

View thepushkarp's full-sized avatar
🐒
embracing chaos

Pushkar Patel thepushkarp

🐒
embracing chaos
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active May 6, 2024 16:10
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'
<?
//
// AUTO KEYWORD-BASED FOLLOWER CURATION BOT (by @levelsio)
//
// File: twitterFollowerCuratorBot.php
//
// Created: May 2021
// License: MIT
//
@karlkranich
karlkranich / multisheet-duplicate-finder.js
Last active May 30, 2021 13:52
Find duplicates across Google Sheets
/** Multisheet Duplicate Finder **
To use, paste this code into a Google Spreadsheets Apps Script (Tools - Script editor)
Loops through all of the sheets in the current spreadsheet.
Identifies duplicates in the chosen column.
Skips the chosen number of header rows.
Creates and alert box listing the duplicates, and colors the duplicate cells red.
The directive below limits the script to only be able to access this spreadsheet.
* @OnlyCurrentDoc
*/
@klamouri
klamouri / README.md
Last active February 22, 2024 02:04
Iterm2 Auto Dark/Light mode

Most of it is taken from this gist. I just tweaked the script to check the right theme at startup in case the theme change occured when iTerm2 was closed.

Make sure the theme is the same as the themes you have installed (Preferences > Profiles > Colors > Color Presets...). I personally use Solarized Dark and Solarized Light

From someone on the linked gist:

First-time installation steps for me:

  1. Download the script from GitHub by right-clicking on Raw button and save as...
  2. copy the script to $HOME/Library/Application Support/iTerm2/Scripts/AutoLaunch
  3. create AutoLaunch folder if it does not exist
  4. go to iTerm2 > Scripts > AutoLaunch
// Pre Placement Revision Guide!
// All the very best for placements!
#include <bits/stdc++.h>
using namespace std;
/*
THIS RESOURCE WAS MADE FOR END MIN REVISION OF SOME INBUILT DS AND CONTAINERS THAT C++ STL
HAS TO OFFER.
IF THERE IS ANY BUG OR ERROR PLEASE LET ME KNOW!
@aashutoshrathi
aashutoshrathi / clearClutter.js
Created July 9, 2020 14:10
Clears the new x/x repository cards from GitHub Feed
x = document.querySelectorAll('div.f4.lh-condensed.text-bold.text-gray-dark');
for(let i=0; i<x.length; i++) {
const [a, b] = x[i].children[0].innerText.split('/');
if(a === b)
x[i].parentElement.parentElement.remove();
}
@L-Ramos
L-Ramos / shap_cross_validation.ipynb
Last active February 14, 2022 23:35
shap_cross_validation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@claraj
claraj / git_submodule_fix.md
Last active April 7, 2024 13:37
Fixing git submodule AKA git repo inside another git repo

Problem, and symptoms:

You experience one or more of these symptoms

  • you have code in a directory but it's not being pushed to GitHub. You just see an empty directory icon
  • you see this message when you add code to your git repository from the command prompt
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
keyboard = "qwertyuiop[]asdfghjkl;zxcvbnm,./"
puzzle_by_kushwaha = "o vsmmpy dsu rbrm dpttu yp upi yjod yi,r niy nr;orbr ,r o s,
fuomh gtp, omdofr/// s;; o esmy od yp hp nsvl smf trdyptr rbrtuyjomh niy o s,
divj s dommrt yjsy o lmpe o eo;; vp,,oy yjr ds,r ,odyslr shon...."
solution = ""
for letter in puzzle_by_kushwaha:
if letter is not " ":
index = keyboard.index(letter)