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
def search_operators(str_): | |
matches = [] | |
for thing in [[x, getattr(int, x).__doc__] for x in dir(int) if x.startswith('__')]: | |
print((">>>>", (thing[0], thing[1]))) | |
if thing[1] is not None and "<==>" in thing[1]: | |
print(('<==>', thing[1].split(" <==> ")[::-1])) | |
if str_ in thing[1]: | |
matches.append(thing) | |
print('') |
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 python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
""" | |
parse_inputrc -- parse a readline .inputrc file | |
.. note:: This probably only handles a subset of ``.inputrc`` syntax. | |
""" |
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
Verifying that +westurner is my blockchain ID. https://onename.com/westurner |
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 python | |
from __future__ import print_function | |
import logging | |
### | |
def addLevelName__TRACE(): | |
logging.addLevelName(8, 'TRACE') | |
### |
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 python | |
""" | |
ordereddefaultdict.OrderedDefaultDict | |
.. code:: bash | |
$ python ./ordereddefaultdict.py -t | |
$ nosetests ./ordereddefaultdict.py | |
$ py.test ./ordereddefaultdict.py |
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
# :*_markdown_github[__html] | |
# :*_markdown_commonmark[__html] | |
# Markdown[HTML] > MarkdownGithub[HTML] | |
# Markdown[HTML] > MarkdownCommonmark[HTML] | |
rdfx:Markdown a rdfs:Datatype ; | |
. | |
rdfx:MarkdownGithub a rdfs:Datatype ; |
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 python | |
""" | |
i3t.py -- list i3wm windows, get next window id, wrap/loop around | |
Configuration (``.i3/config``):: | |
set $i3t_alt_tab ~/-dotfiles/src/i3t/i3t.py n | |
set $i3t_alt_shift_tab ~/-dotfiles/src/i3t/i3t.py p | |
bindsym Mod1+Tab exec exec $i3t_alt_tab | |
bindsym Mod1+Shift+Tab exec $i3t_alt_shift_tab |
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/sh | |
## newtab.sh -- newtab(), newwin() functions and osascripts for OSX Terminal | |
## src: https://stackoverflow.com/questions/7171725/open-new-terminal-tab-from-command-line-mac-os-x/12147804#12147804 | |
## license: Creative Commons cc by-sa 3.0 | |
function newtab { | |
# newtab() -- Open a new tab in the current Terminal window and | |
# optionally run a command. | |
# When invoked via a function named 'newwin', opens a new Terminal *window* instead. |
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 python | |
from __future__ import print_function | |
""" | |
Print psutil.Process.memory_info for processes with sockets open to | |
the specified ports. | |
""" | |
import psutil | |
import logging | |
def net_connection_memory_info(ports=[80, 443]): |
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
.PHONY: default test | |
default: test | |
test: | |
python ./transaction_charts.py | |
open: | |
open ./test.html |