Skip to content

Instantly share code, notes, and snippets.

Thomas Parslow almost

Block or report user

Report or block almost

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
almost /
Last active Jun 17, 2019 — forked from BigglesZX/
Extract frames from an animated GIF and return them from a generator, correctly handling palettes and frame update modes
import os
from PIL import Image
# Based on (but adapted to be a
# generator that yields frames instead of a function that saves out frames)
I searched high and low for solutions to the "extract animated GIF frames in Python"
problem, and after much trial and error came up with the following solution based
on several partial examples around the web (mostly Stack Overflow).
almost /
Last active Apr 16, 2018 — forked from yangj1e/
Deploy Jupyter Notebook server
#!/usr/bin/env bash
cd ~
bash -b
echo 'PATH="/home/ubuntu/anaconda2/bin:$PATH"' >> .bashrc
. .bashrc
jupyter notebook --generate-config
almost / countries.json
Last active Oct 22, 2018 — forked from keeguon/countries.json
A list of countries along 2 letter ISO codes in JSON format (the gist I forked from was valid JS but not valid JSON)
View countries.json
{"name": "Afghanistan", "code": "AF"},
{"name": "Åland Islands", "code": "AX"},
{"name": "Albania", "code": "AL"},
{"name": "Algeria", "code": "DZ"},
{"name": "American Samoa", "code": "AS"},
{"name": "AndorrA", "code": "AD"},
{"name": "Angola", "code": "AO"},
{"name": "Anguilla", "code": "AI"},
{"name": "Antarctica", "code": "AQ"},
almost / agggh
Created Feb 13, 2012 — forked from alexanderhosford/agggh
Browser detection?
View agggh
<script type="text/javascript">
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
if (ffversion>=5)
document.write(" FF 5.x or above")
else if (ffversion>=4)
document.write(" FF 4.x or above")
else if (ffversion>=3)
document.write(" FF 3.x or above")
You can’t perform that action at this time.