Skip to content

Instantly share code, notes, and snippets.

View aganders3's full-sized avatar

Ashley Anderson aganders3

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aganders3
aganders3 / test_monitor.py
Created May 6, 2015 18:28
Streaming (faked) LabJack data to Bokeh plot
import csv, datetime, os
from threading import Timer, Lock
import re
import numpy as np
import bokeh.plotting as bk
from bokeh.models import Range1d
# import u3 # LabJack library
# from LabJackPython import LabJackException
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aganders3
aganders3 / Flask Gunicorn NginX Digital Ocean fabfile.py
Last active September 26, 2018 03:49
My fabfile for deploying a Flask app on a Digital Ocean droplet
from fabric import task
import os
import getpass
import subprocess
# you also need to install doctl and set it up for create/destroy to work
APP_NAME = 'the-name-of-your-app'
DOMAIN = 'example.com' # SSL is not in here yet
@aganders3
aganders3 / desertpy-lightning.md
Last active September 26, 2018 03:50
DesertPy Lightning Talks

Requested Lightning Talk Topics

  • Introductory Topics
    • Mutable vs. immutable objects
    • Classes and Objects
    • Iterators
    • Working with strings
    • File I/O
    • Python 2 and Python 3
  • Is there a good Python IDE?
@aganders3
aganders3 / mrc_neuroglancer.py
Created November 27, 2023 14:05
A script to open an MRC file (generally CryoET data) and host it for viewing with Neuroglancer
# open an MRC file (optionally using mmap) and host it using Neuroglancer as a LocalVolume
# usage: python -m mrc_neuroglancer.py --mrcfile <filename> [--mmap] [--bind-address ADDRESS]
#
# requirements may be installed from PyPI:
# neuroglancer
# mrcfile
import argparse
import signal