Skip to content

Instantly share code, notes, and snippets.

Joseph Atkins-Turkish Spacerat

Block or report user

Report or block Spacerat

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View remove_dup_pip_requirements.py
#!/usr/bin/env python
# Quick and dirty script to scrub pip requirements files of duplicate requirements
import sys
import fileinput
from requirements.requirement import Requirement
seen = set()
@Spacerat
Spacerat / ML.ipynb
Last active Aug 29, 2015
Machine Learning Algorithms
View ML.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Spacerat
Spacerat / ml.ipynb
Created Feb 28, 2015
Machine Learning Examples
View ml.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Spacerat
Spacerat / GLDM.ipynb
Created Feb 22, 2015
GLDM for texture classification
View GLDM.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Spacerat
Spacerat / siecherman.ipynb
Created Apr 15, 2014
Basic brute-force solution of solution to Siecherman Dice problem
View siecherman.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View e.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Spacerat
Spacerat / circuits.ipynb
Last active Aug 29, 2015
Circuit tree calculator
View circuits.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Spacerat
Spacerat / rand.ipynb
Last active Aug 29, 2015
Uniform distribution as building block for other distributions
View rand.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Spacerat
Spacerat / delete_duplicates.py
Created Feb 2, 2014
Delete the newest of files with the same name except for different extensions.
View delete_duplicates.py
import os, time
import os.path
for path, dirs, files in os.walk('./'):
dups = {}
for x in files:
name, ext = os.path.splitext(x)
fullpath = path+'/'+x
(mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) = os.stat(fullpath)
if not name in dups:
@Spacerat
Spacerat / delete_orphans.scpt
Last active Mar 23, 2016
AppleScript to remove items from iTunes whose files have been deleted
View delete_orphans.scpt
tell application "iTunes"
set selectedTracks to selection
repeat with i from 1 to (length of selectedTracks)
if class of item i of selectedTracks is not shared track then
tell item i of selectedTracks to set {loc} to {get location}
if loc is missing value then
tell application "iTunes"
delete item i of selectedTracks
end tell
end if
You can’t perform that action at this time.