Skip to content

Instantly share code, notes, and snippets.

def to_dataframe(columns=None, iter=None):
"""
Decorator to return a pandas DataFrame from an iterator.
"""
def decorator(f):
@wraps(f)
def wrapper(*args, **kwds):
arr = list(f(*args, **kwds))
iter_columns = []
addprocs(3)
type AtomicTask
category::Symbol
end
const jobs = RemoteChannel(()->Channel{AtomicTask}(Inf))
const results = RemoteChannel(()->Channel{Float64}(Inf))
@everywhere function execute_jobs(jobs, results)
@cynddl
cynddl / tether_usb.sh
Created February 14, 2017 11:05
Android USB tethering with HoRNDIS
#!/bin/sh
adb root
adb shell service call connectivity 30 i32 1
sudo kextunload /Library/Extensions/HoRNDIS.kext
sudo kextload /Library/Extensions/HoRNDIS.kext
#!/usr/bin/env python
from xmlrpc.client import ServerProxy
import click
@click.command()
@click.option('--alias', '-a', help='alias to add to the default mail account')
@click.option('--login', default='YOUR_LOGIN')
@click.option('--domain', default='YOUR_DOMAIN')
def main(alias, login, domain):
@cynddl
cynddl / gist:9fbff472034d05f11a4e
Created February 26, 2016 12:46
libxmlsec1.dylib symbols list
000000000002a076 T _xmlSecAddChild
000000000002a24e T _xmlSecAddChildNode
000000000002ab36 T _xmlSecAddIDs
000000000002a385 T _xmlSecAddNextSibling
000000000002a505 T _xmlSecAddPrevSibling
0000000000031f8e S _xmlSecAttrAlgorithm
0000000000031f85 S _xmlSecAttrEncoding
0000000000031f98 S _xmlSecAttrFilter
0000000000031f70 S _xmlSecAttrId
0000000000031f7c S _xmlSecAttrMimeType
from __future__ import division
import bandicoot as bc
import datetime
import json
def load_google_gps(json_path, name='me'):
"""
Loads history from https://google.com/maps/timeline into
a bandicoot User object.
@cynddl
cynddl / test_cas_client.go
Last active August 29, 2015 14:07
Testing a simple CAS authentication
package main
import (
"net/http"
"net/url"
"io/ioutil"
"log"
"strings"
@cynddl
cynddl / _.md
Created February 13, 2014 13:48
Bar chart skeleton
@cynddl
cynddl / _.md
Created February 13, 2014 12:05
Simple circles
@cynddl
cynddl / _.md
Created February 12, 2014 23:56
bar chart