Skip to content

Instantly share code, notes, and snippets.

# 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__":
@westurner
westurner / setup_pandas_notebook.sh
Created July 29, 2012 07:53
Setup IPython Notebook and Pandas for OSX
#!/bin/sh
setup_brew () {
if ![-f "/usr/local/bin/brew"]; then
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
fi
}
setup_ipython () {
brew install readline
@westurner
westurner / setup_pandas_notebook_deb.sh
Created August 5, 2012 15:35
Setup IPython Notebook and Pandas for Ubuntu
#!/bin/sh -x
# Setup IPython Notebook and Pandas for Ubuntu
IPYTHONDIR="${VIRTUAL_ENV}/src/.ipython"
IPYTHON_NOTEBOOK_DIR="${VIRTUAL_ENV}/src/notebooks"
IPYTHON_NOTEBOOK_SH="${VIRTUAL_ENV}/bin/ipython_notebook.sh"
setup_python_dev () {
sudo apt-get install -y build-essential python-dev python-setuptools \
python-pip python-virtualenv virtualenvwrapper
@westurner
westurner / pulse.sh
Created September 9, 2012 02:00
PulseAudio Configuration
#!/bin/bash -x
export PULSE_SERVER=127.0.0.1
DEFAULT_COOKIE="/etc/pulse/default_cookie"
SOUNDCHECK="/usr/share/sounds/alsa/Front_Center.wav"
# see: http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules#module-native-protocol-.7Bunix.2Ctcp.7D
COOKIE_CONFIG="auth-anonymous=0 auth-cookie-enabled=1 \
auth-cookie=${DEFAULT_COOKIE}"
# COOKIE_CONFIG="${COOKIE_CONFIG} auth-ip-acl=127.0.0.0/8;192.168.0.0/24"
@westurner
westurner / mobile_voice_data.py
Last active October 10, 2015 17:08
Mobile data/voice cost comparison
AMR = {'12.20':12.20}
def calculate_data_mb(minutes=10, kbps=AMR['12.20']):
seconds = minutes*60
kilobits = (kbps*seconds) / 8.0
mb = float(kilobits) / 1024.0
return mb
def data_transfer_in_minutes(transfergb=0.134, kbps=AMR['12.20']):
gbits = transfergb * 1024**3 * 8.0
@westurner
westurner / gist:3723284
Created September 14, 2012 17:08
To Remember
from pandas import DataFrame, Series, Index
N = 1.7
index2 = Index(range(0,200))
uhh = [(n**N) for n in index2[:95]]
uhh.extend( (n**(-N)) for n in index2[95:100] )
uhh.extend( uhh )
series = Series(uhh, index=index2)
uhh2 = uhh[:95]
uhh2.extend( (uhh[-6],)*5 )
@westurner
westurner / rst_shift.py
Created September 16, 2012 23:21
ReStructuredText Heading Shift
#!/usr/bin/env python
"""
A utility for modifying ReStructuredText headings by the
specified shift offset.
For example::
==========
Title
==========
#!/usr/bin/env python
# encoding: utf-8
from __future__ import print_function
"""
parse_editable_url
"""
import urllib
import urlparse
import logging
@westurner
westurner / README.rst
Last active December 18, 2015 01:29
Draft 00: HTTP Problem JSON Object --> HTTP Problem RDFS/OWL Ontology in Turtle

ldpnotes

Linked Data Platform notes, ontologies, and resources.

Re: Proposal to close ISSUE-19: Adressing more error cases, as is

Impetus