Skip to content

Instantly share code, notes, and snippets.

View blech's full-sized avatar

Paul Mison blech

View GitHub Profile
@blech
blech / DeleteGmusicDupes-Python35.py
Created December 13, 2017 19:54 — forked from TKIPisalegacycipher/DeleteGmusicDupes-Python35.py
Python script to find and delete duplicate tracks from Google Play Music library.
#!/usr/bin/env python
# created by shuichinet https://gist.github.com/shuichinet
# forked from https://gist.github.com/shuichinet/8159878 21 Nov 2015
# using minor edits by fcrimins https://www.reddit.com/user/fcrimins from https://www.reddit.com/r/google/comments/2xzgyv/remove_duplicate_songs_from_google_play_music/csh6mrh
# also using clever edits by Morgan Gothard https://medium.com/@mgothard
# updated for Python 3.5 by John M. Kuchta https://medium.com/@sebvance 22 Nov 2016 (hey I was busy)
# compiled by John M. Kuchta https://medium.com/@sebvance
# thanks to shuichinet, fcrimins and Mr. Gothard for their work
@blech
blech / index.html
Last active December 6, 2017 23:36
Muni new train finder
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Muni New Train Finder</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.js'></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<link href='https://api.mapbox.com/mapbox.js/v3.1.1/mapbox.css' rel='stylesheet' />
<style>
Astronomical Applications Department
U. S. Naval Observatory
Washington, DC 20392-5420
SAN FRANCISCO, CALIFORNIA
Location: W122°26'24.0", N37°45'36.0", 0m
(Longitude referred to Greenwich meridian)
Time Zone: 7h 00m west of Greenwich
KAILUA, HAWAII
Location: W157°44'24.0", N21°24'00.0", 0m
(Longitude referred to Greenwich meridian)
Time Zone: 10h 00m west of Greenwich
Jupiter
Date Rise Az. Transit Alt. Set Az.
(Zone)
@blech
blech / backup-path-moments.py
Created December 27, 2013 06:38
A start on archiving data from Path
# requirements
# biplist==0.6
# requests==2.1.0
import json
import requests
from biplist import readPlist
from requests.auth import HTTPBasicAuth
@blech
blech / README.md
Last active December 26, 2015 21:59 — forked from tomgp/LICENSE.txt
DST Transitions

Using some animated clocks from d3 to show the difference between how US and EU timezone transitions work.

The top row shows three clocks in the three main European Union timezones on the last Sunday in October. As London passes 0200 BST it resets to 0100 GMT; simultaneously, the clocks change in Berlin and Helsinki.

The bottom row shows four clocks for the US timezones, on the first Sunday in November. In contrast to the EU clocks, the DST ripples across the country at 0200 local time.

(Thanks to bl.ocks.org/tomgp/6475678 for the starting point and to @mbostock for help with heights.)

@blech
blech / index.html
Last active December 25, 2015 22:29
Weekender - the NYC MTA's map.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Weekender</title>
</head>
<body style='margin:0; padding:0;'>
<div style='white-space:nowrap; height:256px;'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_0_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_1_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_2_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_3_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_4_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_5_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_6_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_7_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_8_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_9_0.png'><img src='http://web.mta.info/weekender/images/subwaytilesnew/15_10_0.png'><img src='http://web.mta.
@blech
blech / .run
Last active December 25, 2015 17:59 — forked from mbostock/.block
python -m SimpleHTTPServer 5120
@blech
blech / supersub.py
Created August 26, 2013 01:36
Make Unicode sub- and super-scripts
#!/usr/bin/python
# -*- coding: utf8 -*-
def up(input):
normal = u"0123456789+-()"
superscript = u"⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁽⁾"
trantab = dict((ord(a), ord(b)) for a, b in zip(normal, superscript))
return input.translate(trantab)
def down(input):
@blech
blech / ll2zxy.html
Last active December 21, 2015 07:38
Find My Tiles: lat/long to zxy
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Find My Tiles</title>
<link rel="stylesheet" href="http://husk.org/collected.css">
</head>
<body>
<h1>Find My Tiles</h1>
<p id="latitude">Finding your lat/long…</p>