This file contains hidden or 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 python | |
from os import path | |
import sys | |
import json | |
import yaml | |
if len(sys.argv) > 1: | |
print("usage:\n\t{} < your_json_file > your_yaml_file".format( | |
path.basename(sys.argv[0]))) |
This file contains hidden or 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
# This script, when used with Google Apps Scripts will delete 500 emails - the amount the API will return with one call. | |
# It can be triggered to run periodically (I set @ 5 minute, since it runs slow) without user interaction | |
# enabling you to bulk delete email in Gmail without getting the #793 errors, etc., from Gmail. | |
# Configure the search query in the code below to match the type of emails you want to delete | |
# See - https://developers.google.com/apps-script/reference/gmail/gmail-app#search(String) | |
# and https://support.google.com/mail/answer/7190?hl=en | |
# Browser to https://script.google.com/. | |
# Start a script and paste in the code below. |
This file contains hidden or 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 sh | |
# NOTE: keeping this gist for 3.6.0 release, because I want to keep 3.5 around for a bit too; | |
# Here is how I built Python v3.6.0b1...onward | |
# on OS/X, where brew is installed | |
# (and python2.7 and python3.5 installed by brew): | |
# make sure you have openssl installed (this is for installing pip) | |
# and a recent tcl-tk, if you're going to use idle | |
# (see https://www.python.org/download/mac/tcltk/ for more info) | |
# If you have them installed, you might want to `brew upgrade` them. |
This file contains hidden or 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 python | |
''' | |
usage: | |
session_staff [<url>] | |
session_staff --report [<kind>] [<url>] | |
session_staff --version | |
session_staff --debug | |
options: |
This file contains hidden or 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
""" | |
An Plantuml extension for generating UML figures from within ipython notebook. | |
Source: http://stackoverflow.com/questions/20303335/ipython-notebook-plantuml-extension | |
See example notebook at: http://nbviewer.ipython.org/gist/sberke/bb90ff09193a8888d7f7 | |
""" | |
import os | |
from IPython.core.magic import magics_class, cell_magic, Magics | |
from IPython.display import Image, SVG |
This file contains hidden or 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
def clear(alist): | |
'''clear(alist) | |
when you want the contents of a list cleared, | |
so that all references to that list are affected. | |
python3 has a clear() method on lists; | |
there are at least 3 other ways to accomplish the same, | |
two of them syntactically tricky, and obscure. |
This file contains hidden or 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 bash | |
# When "brew upgrade python3 --devel", make the devel version | |
# the default python3 version, along w/ other py3-tools | |
# brew python 3.5 --devel installs seem to consistently mislink. | |
# this tries to correct. | |
# first, make any python3 apps in bin point to the python3-devel version | |
# next, make any current release python apps link to version-specific | |
# names, e.g. python3 => python3.5, but python3.4 => python3.4 | |
BN='/usr/local/bin' |
I hereby claim:
- I am yarko on github.
- I am yarkot (https://keybase.io/yarkot) on keybase.
- I have a public key whose fingerprint is F5AA 9AFA 0273 A0CF 8500 9845 8E77 6F94 BF39 12FA
To claim this, I am signing this object:
Recently, I saw proponents of automated tools show a bug found in the timsort hybrid sorting algorithm.
It's been widely used, and ported, so this is with some pride that proponents of a particular approach gloat, with cause.
But several things stand out. The solution is what SEI would have named "low maturity" (not quite - the article did go through it elsewhere):
- it copy / paste's what was and what is, leaving it to the reader to discover what changes were made;