Skip to content

Instantly share code, notes, and snippets.

View mdzhang's full-sized avatar
🇵🇸
decolonizepalestine.com

meesh mdzhang

🇵🇸
decolonizepalestine.com
View GitHub Profile
@mdzhang
mdzhang / states.json
Last active September 18, 2015 15:14
US states in JSON (state code => state name)
{
"AL": "Alabama",
"AK": "Alaska",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
"DC": "District of Columbia",
@mdzhang
mdzhang / currencies.json
Last active November 16, 2016 06:54
Currency information by currency code
{
"AED": {
"countries": [
"UNITED ARAB EMIRATES (THE)"
],
"decimal_mark": ".",
"decimals": 2,
"exponent": "2",
"iso_code": "AED",
"iso_numeric": "784",
[
{
"kana": "あ",
"roumaji": "a",
"type": "gojuuon"
},
{
"kana": "い",
"roumaji": "i",
"type": "gojuuon"
[
{
"kana": "ア",
"roumaji": "a",
"type": "gojuuon"
},
{
"kana": "イ",
"roumaji": "i",
"type": "gojuuon"

Keybase proof

I hereby claim:

  • I am mdzhang on github.
  • I am mdzhang (https://keybase.io/mdzhang) on keybase.
  • I have a public key ASBcz-kSfFWfyIqFcW9qGjl_D9Bm5qcRRLF_ITQkE4YxNQo

To claim this, I am signing this object:

@mdzhang
mdzhang / python.vim
Last active December 8, 2021 05:39
Vim - SQL highlighting in Python strings
" Put this in ~/.vim/after/syntax/python.vim
" Slight tweaks to https://lonelycoding.com/can-i-use-both-python-and-sql-syntax-highlighting-in-the-same-file-in-vim/
" Needed to make syntax/sql.vim do something
unlet b:current_syntax
" Load SQL syntax
syntax include @SQL syntax/sql.vim
@mdzhang
mdzhang / goodreads.py
Last active August 30, 2019 04:17
Script to filter down goodreads listopia items and order them based on what I'm mostly likely to want to read
"""Filter down a Goodreads Listopia list to books I'm most likely to like.
Fetches the raw HTML with Selenium (requires chromedriver), extracts book data
to a pandas data frame using BeautifulSoup, does some massaging, then prints
it out nicely.
TODO:
- more data points (year, contents of top upvoted reviews, shelves,
page count, read status, etc.)
- support multi-page Listopia lists
@mdzhang
mdzhang / nomad.py
Created October 12, 2019 19:24
Scrape NomadList for data and dump to CSV
"""Scrape data from NomadList into local CSV.
Usage:
python scrape.py --cities Austin 'Chiang Mai' Taipei Auckland Ubud 'Buenos Aires' 'Mexico City'
"""
import argparse
import logging
import os
import re
import string
@mdzhang
mdzhang / release
Created December 4, 2020 06:59
Release
#!/bin/bash
set -ex
command -v gh >/dev/null 2>&1 || die "gh is required but not installed. Aborting. See https://github.com/cli/cli"
usage()
{
echo " Usage: ${0}
@mdzhang
mdzhang / keybase.md
Last active February 20, 2021 18:29

Keybase proof

I hereby claim:

  • I am mdzhang on github.
  • I am mdzhang (https://keybase.io/mdzhang) on keybase.
  • I have a public key whose fingerprint is 1392 FAAD 8AFC 2222 AD84 195E 1650 A224 DE3E 63DB

To claim this, I am signing this object: