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
function split_novowel { | |
echo $1 | cut -d_ -f$2 | sed 's/[aeiou]//g' | |
} | |
function abbr { | |
echo $(split_novowel $1 1 | cut -c 1-3)$(split_novowel $1 2 | cut -c 1-1) | |
} | |
abbr Computer_Hardware |
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
$ python manage.py shell | |
/Users/orluke/src/neo4django-tutorial/venv/src/neo4django/neo4django/db/models/relationships.py:170: UserWarning: `lazycat_set` and `lazycat_set` share a relationship type and direction. Is this what you meant to do? | |
% (r.name, name)) | |
Python 2.7.3 (default, Feb 6 2013, 23:59:57) | |
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.24)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
(InteractiveConsole) | |
>>> from polls.models import Poll, Choice | |
/Users/orluke/src/neo4django-tutorial/venv/src/neo4django/neo4django/db/models/relationships.py:170: UserWarning: `choices` and `choices` share a relationship type and direction. Is this what you meant to do? | |
% (r.name, name)) |
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 | |
""" | |
This script reads in lines of UTF-8 text from stdin, | |
applies the NLTK English sentence tokenizer to the text, and | |
prints out the split lines to stdout (in UTF-8), preserving runs of two or more | |
newline characters. | |
N.B. An assumption being made is that the NLTK English Punkt model is already | |
installed in an appropriate location in the environment. | |
""" |
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
# std | |
import io | |
import time | |
# vendor | |
import serial | |
ser = serial.Serial('/dev/tty.usbserial-A6008sxN', 115200, timeout=1) | |
time.sleep(2) |
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
import time | |
from nose2.tools import such | |
def slow_blocking_init(): | |
time.sleep(1) | |
print("a second elapsed") | |
time.sleep(1) | |
print("a second elapsed") | |
return True |
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
""" | |
run with: | |
nose2 test_nose2_unittest_layers --plugin nose2.plugins.layers --layer-reporter --verbose | |
""" | |
import time | |
import unittest | |
class Layer1(object): |
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
#!/bin/bash | |
#---------------------------------------# | |
# Python 2.7.3 Install on CentOS 5 # | |
# https://gist.github.com/timss/5122008 # | |
# # | |
# Installs to /usr/local/{bin,lib} # | |
# Seperate from system default # | |
# /usr/bin/python(2.4) # | |
#---------------------------------------# |
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
2014-11-01 19:22:54,843 INFO | |
VmPool.py._recycle_next: 85 | |
VmPool Recycle Queue: creating instance 1 | |
2014-11-01 19:22:54,844 INFO | |
VmPool.py._create: 319 | |
VmPool: creating instance 1: engaging VmMaster.lock() | |
2014-11-01 19:22:54,846 INFO | |
VmInstance.py.create: 225 |
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
2014-11-01 19:23:01.167+0000: starting up | |
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/libexec/qemu-kvm -name instance1.0-1 -S -M rhel6.6.0 -cpu SandyBridge,+invtsc,+erms,+smep,+fsgsbase,+pdpe1gb,+rdrand,+f16c,+osxsave,+dca,+pcid,+pdcm,+xtpr,+tm2,+est,+smx,+vmx,+ds_cpl,+monitor,+dtes64,+pbe,+tm,+ht,+ss,+acpi,+ds,+vme -enable-kvm -m 2048 -realtime mlock=off -smp 1,sockets=1,cores=1,threads=1 -uuid 971806c0-63ed-8dc3-ce07-25788aaaedbe -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/instance1.0-1.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=localtime,driftfix=slew -no-shutdown -device ich9-usb-ehci1,id=usb,bus=pci.0,addr=0x7.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.0,multifunction=on,addr=0x4 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pci.0,addr=0x4.0x1 -device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pci.0,addr=0x4.0x2 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pci.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
lorland at Lukes-Neverware-mba in ~/workspace/peptalk (symlink-hardcoded-Juicebox-code-path●) | |
$ time ansible-playbook -i hosts site.yml -l rc_fresh1 -vvvv | |
PLAY [Configure and deploy the CentOS 6.5 Juiceboxes and application code] **** | |
GATHERING FACTS *************************************************************** | |
<172.16.29.89> ESTABLISH CONNECTION FOR USER: root | |
<172.16.29.89> REMOTE_MODULE setup | |
<172.16.29.89> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/lorland/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=root', '-o', 'ConnectTimeout=10', '172.16.29.89', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1414864230.27-222877363691008 && echo $HOME/.ansible/tmp/ansible-tmp-1414864230.27-222877363691008'"] | |
<172.16.29.89> PUT /var/folders/7l/7lc870xx2wn_m2pv29mg9d100000gn/T/tm |