Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import boto3
import argparse
from operator import itemgetter
from collections import defaultdict
def nested_defaultdict():
return defaultdict(nested_defaultdict)
@geoffreylitt
geoffreylitt / langchain-experiment.ipynb
Created January 29, 2023 21:27
Langchain experiment
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nileshtrivedi
nileshtrivedi / ncert.rb
Created April 24, 2022 17:42
Ruby script to download all NCERT book PDFs
# NCERT books are excellent but being altered for political or other reasons
# See: https://twitter.com/SouthAsiaIndex/status/1518062204058103809
# To download the entire current set, run this script with Ruby
require 'httparty'
source = HTTParty.get('https://ncert.nic.in/textbook.php').force_encoding("ISO-8859-1").encode("utf-8", replace: nil)
# book names are like aeen1dd.zip
# First letter tells the class number a to l is class 1 to class 12. m stands for class 11 and 12 combined
@amodm
amodm / weekend-dev-puzzles-list.md
Last active February 29, 2024 14:14
List of all #WeekendDevPuzzles

Weekend Dev Puzzle

Some time between 2021-22, I ran a list of puzzles designed to push developers into developing a better understanding of the technologies they use on a day to day basis. Each puzzle is designed to be fun, provocative, and short.

This is a complete list of those puzzles. Each link takes you to the tweet where I first posed the problem. If you like any of them, please feel free to share with others.

Edit (2024-01-27): Adding other puzzles to this 2024 onwards. Criteria:

  1. Problem statement should be understandable by most in s/w tech, even if the ability to figure it out may not be.
  2. Thinking about the problem should lead to clearer understanding of some foundational concept.
  3. Should be short.
  4. Should be fun to ponder over.