This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"alans-desktop-some-script.py-main-Figure 1": [2485, 231, 1054, 862]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ipython | |
from glob import glob | |
import os | |
import re | |
# from urlparse import urlparse | |
from urllib.parse import urlparse | |
from ipdb import set_trace as debug | |
from pprint import pprint as pp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import json | |
import random | |
import requests | |
import time | |
#from plotly.offline import plot | |
#import plotly.graph_objs as go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
import sys | |
import wikipedia | |
import requests | |
import re | |
from pprint import pprint | |
# TODO: cache results and use cache to build up a tree | |
# TODO: handle disambiguation page (e.g., for 'orange') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The code for my article with the same name. You can find it at the URL below: | |
# https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python | |
# MIT License | |
# | |
# Copyright (c) 2021 Manohar Vanga | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.image as mpimg | |
from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, AnnotationBbox | |
normal_samples_min_max_diam = [ | |
[12, 14], | |
[13, 15], | |
[12, 15], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from matplotlib import pyplot as plt | |
import numpy as np | |
from shapely.geometry import Polygon | |
from ipdb import set_trace as db | |
def main(): | |
fillet_demo() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[55.60458963143672, 6.344134770404208], [55.6254632267828, 6.337129830206686], [55.60910039087562, 6.229813623881452], [55.62319315158302, 6.177102890074548], [55.599799681727454, 6.112288249833094], [55.6197243031257, 6.085758465395703], [55.57500185675112, 6.037293331710632], [55.57972586711283, 5.99042398847148], [55.531475137494226, 5.962734650863261], [55.460421247041275, 5.87334504507754], [55.43845503757297, 5.874789476632287], [55.38653276222971, 5.716568106677365], [55.34442623363374, 5.6649444409916905], [55.0906992233307, 5.521413353897024], [55.00428464574901, 5.444832031743397], [54.88500137356685, 5.403923196603118], [54.85919019379097, 5.373908570787792], [54.66938268686648, 5.3725558408613185], [54.58827630940152, 5.319732261307423], [54.52210828523082, 5.31060063116936], [54.45170456646131, 5.26900254435648], [54.43892241772447, 5.239180065187691], [54.430048050840036, 5.2568518437884455], [54.29608058774813, 5.205661074225492], [54.17762938393885, 5.122854327909668], [54.1250721254506, 5.05 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
from matplotlib.patches import Rectangle | |
import numpy as np | |
tableau20 = [(31, 119, 180), (174, 199, 232), (255, 127, 14), (255, 187, 120), | |
(44, 160, 44), (152, 223, 138), (214, 39, 40), (255, 152, 150), | |
(148, 103, 189), (197, 176, 213), (140, 86, 75), (196, 156, 148), | |
(227, 119, 194), (247, 182, 210), (127, 127, 127), (199, 199, 199), | |
(188, 189, 34), (219, 219, 141), (23, 190, 207), (158, 218, 229)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# make an http request via curl | |
# try to decode it as json with jq | |
# if it works, pretty print the json | |
# if it doesn't, ugly print the response | |
F1="$HOME/tmp.curl" | |
F2="$HOME/tmp.jq" | |
curl -s $1 > $F1 |
NewerOlder