Skip to content

Instantly share code, notes, and snippets.

@utkarsharma2
utkarsharma2 / fabricate_dag.py
Created April 1, 2021 13:54
Dynamically Create Airflow DAG(s) via JSON.
"""Dag Factory"""
from datetime import datetime
from airflow import DAG
def create_dag(schedule, default_args, definition):
"""Create dags dynamically."""
with DAG(
definition["name"], schedule_interval=schedule, default_args=default_args
) as dag:
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active July 30, 2026 09:31
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@CoreyMSchafer
CoreyMSchafer / YouTube-OAuth-Snippets
Created September 10, 2020 02:06
YouTube-OAuth-Snippets
# token.pickle stores the user's credentials from previously successful logins
if os.path.exists('token.pickle'):
print('Loading Credentials From File...')
with open('token.pickle', 'rb') as token:
credentials = pickle.load(token)
# Google's Request
from google.auth.transport.requests import Request
@RamonWill
RamonWill / TkinterTemplate.py
Last active June 18, 2026 16:03
Tkinter GUI template
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
"""
Useful Links:
https://stackoverflow.com/questions/7546050/switch-between-two-frames-in-tkinter Most useful in my opinion
https://www.tutorialspoint.com/python/python_gui_programming.htm
https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html
import re
from collections import Counter
import spacy
from graph_show import GraphShow
import itertools
from collections import defaultdict
class NewsMining():
@journeymanavi
journeymanavi / production-web-server-setup-and-deployment-guide.md
Last active May 15, 2026 23:39
A runbook for setting up a Linux based secure, production web server, for serving static web content as well as deploying Node.js based web applications.
@joepie91
joepie91 / vpn.md
Last active July 27, 2026 13:26
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@karpathy
karpathy / min-char-rnn.py
Last active July 21, 2026 18:39
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)