Linked Data Platform notes, ontologies, and resources.
Impetus
#!/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:: |
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import print_function | |
""" | |
imgcomp -- [re]compress an image multiple times, saving intermediate output | |
* https://en.wikipedia.org/wiki/JPEG | |
* https://en.wikipedia.org/wiki/Generation_loss | |
""" |
#!/usr/bin/env python | |
# encoding: utf-8 | |
from __future__ import print_function | |
""" | |
parse_editable_url | |
""" | |
import urllib | |
import urlparse | |
import logging |
#!/usr/bin/env python | |
""" | |
A utility for modifying ReStructuredText headings by the | |
specified shift offset. | |
For example:: | |
========== | |
Title | |
========== |
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 ) |
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 |
#!/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" |
#!/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 |