Create _ext/
and _templates/
subdirectories.
Move edit_on_github.py
into the _ext/
subdirectory.
Move sourcelink.html
into the _templates/
subdirectory.
Add the following after the import sys, os
line :
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import print_function | |
from __future__ import division | |
""" | |
broadband_cap | |
============== | |
Calculate time to reach broadband cap with specified bandwidth speeds | |
Usage:: |
$ time python ./test_islice_performance.py | |
=============================================================================== | |
# PERF justification for https://github.com/pydata/pandas/issues/6700 | |
# 1000 times | |
# -10% = 10% speedup | |
# 20% = 20% slowdown | |
------------------------------------------------------------------------------- | |
def get_data(n=100000): | |
return ((x, x*20, x*100) for x in xrange(n)) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
""" | |
sqla2hdfstore | |
=============== | |
Input: | |
sqlalchemy uri |
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import print_function | |
""" | |
clock_hands | |
__________________ | |
| 12 | | |
| | | |
| | | |
|9 0 3| |
.PHONY: default test | |
default: test | |
test: | |
python ./transaction_charts.py | |
open: | |
open ./test.html |
#!/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. |
#!/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]): |
# HG changeset patch | |
# User Wes Turner <wes.turner@gmail.com> | |
# Date 1258065100 21600 | |
# Node ID 706e866c5e2df95c80f4e0bf4d182604140fade2 | |
# Parent 2fd12cda91b470058b197781348541b856dee6ec | |
[mq]: accept_log_configuration | |
diff --git a/repoze/what/plugins/config.py b/repoze/what/plugins/config.py | |
--- a/repoze/what/plugins/config.py | |
+++ b/repoze/what/plugins/config.py |
diff --git a/celery/bin/celerybeat.py b/celery/bin/celerybeat.py | |
index a288780..bfc2d62 100644 | |
--- a/celery/bin/celerybeat.py | |
+++ b/celery/bin/celerybeat.py | |
@@ -176,7 +176,9 @@ def parse_options(arguments): | |
options, values = parser.parse_args(arguments) | |
return options | |
- | |
-if __name__ == "__main__": |