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
#!/usr/bin/env python | |
""" | |
Starts a Tornado static file server in a given directory. | |
To start the server in the current directory: | |
tserv . | |
Then go to http://localhost:8000 to browse the directory. | |
Use the --prefix option to add a prefix to the served URL, |
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 multiprocessing | |
import pandas as pd | |
import numpy as np | |
def _apply_df(args): | |
df, func, kwargs = args | |
return df.apply(func, **kwargs) | |
def apply_by_multiprocessing(df, func, **kwargs): | |
workers = kwargs.pop('workers') |
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 re, hashlib, uuid, json, random, os, urllib2, os.path, time, sys, SimpleHTTPServer, SocketServer, string, console, webbrowser, shutil, zipfile | |
class SmarterHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): | |
server_version = 'SimpleHTTP/0.6' | |
file_name = '' | |
def do_GET(self): | |
if self.path.startswith('/transfer'): | |
self.get_transfer() | |
else: | |
f = self.send_head() |
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/sh | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' |
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 | |
# The "tmuxifier" | |
# Execute parallel processes in an arbitrary number of tmux panes | |
# This script requires the path to an existing script to | |
# execute in parallel. Optionally, the number of threads to | |
# and the name of the tmux session can be input. If threads | |
# and session name are not entered, threads are determined | |
# automatically and session names is set to a default. |
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 | |
# Michelle L. Gill | |
# 2014/10/25 | |
# For use with Today Scripts | |
# http://www.reddit.com/r/osx/comments/2k24ps/today_scripts_widget_update_colorized_output | |
# Inspired by: https://gist.github.com/anonymous/470bb40b05173fdb6348 | |
# Set this to "cpu" or "mem" | |
procname="cpu" |
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
(The start of) A personal list of useful Adblock Plus filters. | |
Add these to the "Add your own filters" section of Adblock Plus. | |
* Remove Google Plus posts from Google News: | |
news.google.com##.gpost-bubble |
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
#include <gsl/gsl_fft_complex.h> | |
#include <stdio.h> | |
void fft_test(int *dims, gsl_fft_complex_wavetable *wt, gsl_fft_complex_wavetable *wt_x, gsl_fft_complex_wavetable *wt_y, gsl_fft_complex_wavetable *wt_z) { | |
printf("\nFFT Test\n"); | |
printf("%d, %d, %d\n", dims[0], dims[1], dims[2]); // This is OK | |
printf("%d, %d, %d\n", wt_x, wt_y, wt_z); // These are equal to values from main function--OK |