Skip to content

Instantly share code, notes, and snippets.

View cdw's full-sized avatar

Dave Williams cdw

View GitHub Profile
@cdw
cdw / gist:22094d73c41b6c99d3b0
Created April 28, 2015 22:36
Manage an aws cluster from user-data and SQS
#!/usr/bin/env python
# encoding: utf-8
"""
sqs_control_userdata_script.py - control an aws instance from a sqs queue
Run this guy on startup as a userdata script and he will connect to
s3 to download code to a directory, and run commands in it that are
provided by an SQS queue, one job at a time per core
Created by Dave Williams on 2011-02-08
@cdw
cdw / modem_check_reset.py
Created October 27, 2015 03:51
modem_check_reset.py - check our internet connection and reset the modem if it doesn't seem to be up.
#!/usr/bin/env python
# encoding: utf-8
"""
modem_check_reset.py - check our internet connection and reset the modem if it
doesn't seem to be up. This is for a Motorola SB5101. This is intended to be run
from a cron script every 20 min or so, thus the following would be added to the
cron jobs:
0 * * * * /path/to/modem_check_reset.py
20 * * * * /path/to/modem_check_reset.py
40 * * * * /path/to/modem_check_reset.py
// StackProfileData
// This ImageJ macro gets the profile of all slices in a stack
// and writes the data for each slice to a separate CSV in the
// directory the images came from.
//
// Version 1.0, 24-Sep-2010 Michael Schmid
// Version 1.1 22-Feb-2016 Dave Williams
macro "Stack profile Data Action Tool - C059T3e16S [S]" {
if (!(selectionType()==0 || selectionType==5 || selectionType==6))
@cdw
cdw / Image KDE.ipynb
Created February 24, 2017 00:07
Plotting images on an XY plot with an opacity set by a KDE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / Image KDE.ipynb
Created July 6, 2017 21:37
Plotting images on an XY plot with an opacity set by a KDE
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / Metadata merging .ipynb
Created July 11, 2017 23:02
20170525_metadata_gathering/Metadata merging .ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / data_work.ipynb
Created October 4, 2017 19:02
Desktop/data/Untitled.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / Untitled.ipynb
Created December 18, 2017 19:15
Minimal Argonne image loading with Python
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / 01 - adding poisson ratio specification to the half-sarcomere.ipynb
Created July 6, 2018 16:54
Workloop trial creation and exploration with 20170306 version of multifilament model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdw
cdw / How subblocks work.ipynb
Created October 11, 2018 21:35
How to load a single frame of a CZI file without reading the whole thing into memory
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.