Skip to content

Instantly share code, notes, and snippets.

View tacaswell's full-sized avatar

Thomas A Caswell tacaswell

View GitHub Profile
@tacaswell
tacaswell / streaming_arrow.py
Created February 27, 2018 20:15 — forked from cpcloud/streaming_arrow.py
Streaming Arrow
import random
import time
from collections import deque
from threading import Thread
import zmq
import numpy as np
import pandas as pd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
""" Tiny example for BNL showing multi-actor control """
from dask.distributed import Client, get_client, Variable, fire_and_forget
import numpy as np
import time
import random
def get_image_from_detector():
@tacaswell
tacaswell / scanExamples.py
Created July 17, 2016 14:39 — forked from mlub/scanExamples.py
Loops over examples on the matplotlib1.5.1 page and opens the 1.5.1 and 2.0 version in a browser
#!/usr/bin/env python
import requests
import subprocess
from lxml import html
old_url = 'http://matplotlib.org/1.5.1/examples/'
new_url = 'http://matplotlib.org/2.0.0b2/examples/'
# Skip any urls containing these strings
skip_these = ['animation/', 'api/']
@tacaswell
tacaswell / condalog.sh
Created July 1, 2016 22:43 — forked from ericdill/condalog.sh
replace conda with condalog to get pass through behavior
#! /bin/bash
LOGBOOK=bs-testing
pkg_list_base="/tmp/automated-list-of-conda-packages"
echo "pkg_list_base=$pkg_list_base"
#exit 1
echo "
Capturing current list of conda packages in
@tacaswell
tacaswell / figureissue.ipynb
Last active June 28, 2016 14:50 — forked from cycomanic/figureissue.ipynb
interactive figure issues matplotlib notebook backend
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from tqdm import tqdm
import ipyparallel as ipp
def main():
target = 'hxn_migration'
rc = ipp.Client()
dview = rc[:]
@tacaswell
tacaswell / install-mongodb.sh
Created April 29, 2016 13:17 — forked from w0rldart/install-mongodb.sh
Installing MongoDB on Ubuntu 15.04
#!/bin/sh
##
## Bash install script for mongo 3.2 for Ubuntu 15.04, because of
## the replacement of upstart with systemd
##
## - AUTHOR: Alexandru Budurovici <https://w0rldart.com>
## - VERSION: 1.0
##
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tacaswell
tacaswell / .gitignore
Created July 4, 2012 18:20 — forked from sixtenbe/analytic_wfm.py
Peak detection in Python
*.pyc