Skip to content

Instantly share code, notes, and snippets.

View eigenfoo's full-sized avatar
Probably drinking coffee

George Ho eigenfoo

Probably drinking coffee
View GitHub Profile
import string
import sys
import requests
import whois
from nltk import tokenize
BOOKFILE = sys.argv[1]
OUTPUTFILE = BOOKFILE + '.possible-domains.txt'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cavaunpeu
cavaunpeu / wills-31st-birthday-party.txt
Created May 14, 2020 02:24
Will's 31st Birthday Party!
Will Wolf is inviting you to a scheduled Zoom meeting.
Topic: Will's 31st Birthday Party!
Time: May 31, 2020 11:00 AM Eastern Time (US and Canada)
Join Zoom Meeting
https://asapp.zoom.us/j/98245285251?pwd=aVN2ZWZXRjVPU1A0TkhZcmRRNWpjQT09
Meeting ID: 982 4528 5251
Password: 076822
@eigenfoo
eigenfoo / ipynb_toc.py
Created June 24, 2019 08:37
Print a Markdown table of contents for a Jupyter notebook.
#!/bin/python
import argparse
import re
import json
import string
parser = argparse.ArgumentParser(
description="Print a Markdown table of contents for a Jupyter notebook."
)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jakevdp
jakevdp / PEP8LineLengths.ipynb
Created November 10, 2017 14:52
Further exploration of line lengths and PEP8
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eigenfoo
eigenfoo / Makefile
Last active November 9, 2017 03:01
C++ simple general-purpose Makefile
.PHONY: clean debug run
CXX = g++
CXXFLAGS = -std=c++11 -Wall -Wextra
LDFLAGS =
SOURCES = hash.cpp spellcheck.cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXECUTABLE = spell.exe
@eigenfoo
eigenfoo / asdf.sh
Last active September 13, 2017 02:51
shell script for some command line fun
#!/bin/bash
# Dependencies: fortune, cowsay, lolcat and coreutils
# brew install fortune cowsay lolcat coreutils
# Directory where the ASCII art is
cowfiledir='/usr/local/Cellar/cowsay/3.04/share/cows/'
randfile=$(ls $cowfiledir/*.cow | gshuf -n 1)
basefile=$(basename $randfile)
cowarg=${basefile%.*}
@MInner
MInner / parallel.py
Last active August 9, 2022 02:14
Executing jobs in parallel with a nice progress bar: a tqdm wrapper for joblib.Parallel
from tqdm import tqdm_notebook as tqdm
from joblib import Parallel, delayed
import time
import random
def func(x):
time.sleep(random.randint(1, 10))
return x