Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import os | |
... | |
def thread_mask(args): | |
# Properly Parallel RNG | |
#http://stackoverflow.com/questions/444591/convert-a-string-of-bytes-into-an-int-python | |
myid=current_process()._identity[0] | |
np.random.seed(myid^struct.unpack("<L",os.urandom(4))[0]) | |
os.nice(5) |
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
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <markdowncell> | |
# basically, want to parse a file, load values in it into a dictionary (name, x, y, z, r, g, b), and scatter lot them, with labels based on RGB color | |
# <codecell> | |
%matplotlib inline |
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
Since Farbot triggers freenodes flood detection, here's the help. | |
<question> why not zoidberg? - Generates a Why Not Zoidberg? meme | |
<something> does not work that way! - Generates a Morbo meme | |
<something> is bad and you should feel bad - Generates a Zoidberg meme | |
<things> are bad and you should feel bad - Generates a Zoidberg meme | |
<things> do not work that way! - Generates a Morbo meme | |
Events: | |
alot - Shows a picture of an alot | |
countdown [for] #meetupname# e.g. countdown punerbmeetup |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import urllib2 | |
from time import sleep | |
from imgurpython import ImgurClient | |
from imgurpython.helpers.error import ImgurClientError, ImgurClientRateLimitError | |
def imgurlinker(x): | |
global client | |
try: | |
defrag = urllib2.urlparse.urldefrag(x)[0] # To deal with post-url items eg "#0" |
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
# Note: This file lives on the observium server inside /etc/cron.d/ | |
13 * * * * root host -t axfr anrg.liv.ac.uk | awk '$4 ~ "^A$" {print $1}' > /dev/shm/devices 2> /dev/null; /opt/observium/add_device.php /dev/shm/devices >> /dev/null 2>&1 |
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
bolster@yossarian ~/.cache | |
➜ spotify 5779-[14:36:24] | |
13:36:27.454 I [breakpad.cpp:110 ] Registered Breakpad for product: spotify | |
13:36:27.455 I [translate.cpp:152 ] Reloading language file | |
13:36:27.465 I [translate.cpp:152 ] Reloading language file | |
13:36:27.466 I [breakpad.cpp:269 ] Searching for crashdumps: /home/bolster/.cache/spotify/*.dmp | |
13:36:31.617 I [offline_authorizer.cpp:278 ] Unable to login offline: no such user | |
13:36:36.722 I [ap_connection_impl.cpp:901 ] Connecting to AP lon2-accesspoint-a33.ap.spotify.com:4070 |
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/bash | |
# Example script to start up tunnel with autossh. | |
# This script will tunnel 22 from the local host | |
# to 11122 on the remote host. If that post isn't | |
# availabile it'll increment. Also does the same | |
# with 8888/11188 for ipython notebook | |
# REQUIRED autossh | |
HOST=${@: -1} | |
REMOTE_SSH_PORT=11122 | |
REMOTE_HTTP_PORT=11188 |
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
" Pathogen : https://github.com/tpope/vim-pathogen | |
execute pathogen#infect() | |
set nocompatible " be iMproved | |
filetype off " required! | |
" Setting up Vundle - the vim plugin bundler | |
let iCanHazVundle=1 | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) | |
echo "Installing Vundle.." |