Skip to content

Instantly share code, notes, and snippets.

View cudmore's full-sized avatar

Robert Cudmore cudmore

View GitHub Profile
@cudmore
cudmore / scramble.py
Created August 8, 2017 20:22
Python script to blind all files in a folder by making a new copy with a random name
#!/usr/bin/env python2.7
"""
Author: Robert H Cudmore
Date: 20170807
email: cudmore@jhu.edu
Purpose:
- For each file in a folder, make a copy with a scrambled name.
@cudmore
cudmore / startup_tweeter.py
Created October 28, 2017 01:29
raspberry startup tweet
#!/usr/bin/env python2.7
# this code is taken from the following
# twitterwin.py by Alex Eames http://raspi.tv/?p=5281
import tweepy
import subprocess
import time, datetime
import socket
# Consumer keys and access tokens, used for OAuth
consumer_key = 'aaaaaaaaaaaaaaaaaaaaaaaaa'
import os #for interrupt
import time, datetime
import home
from random import randrange #for testing
tempInterval = 3*60 # 1*60 #2*60 == 2 minutes
lasttime = -tempInterval
numEventsToPurge = 200 #ammass this number of events and then purge
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am cudmore on github.
  • I am cudmore (https://keybase.io/cudmore) on keybase.
  • I have a public key whose fingerprint is D0B3 51C0 F563 70B6 DC62 67A7 6756 57B4 1FAD 9294

To claim this, I am signing this object:

@cudmore
cudmore / myDaskNapari.py
Last active May 28, 2020 19:09
Sample code to use Dask to view a tiling of .tif files. See comment for usage.
"""
Author: Robert Cudmore
Date: 20200528
Purpose:
Open a Napari viewer for a grid of _ch1.tif and _ch2.tif files
This is using dask arrays and blocks
Command Line Usage