Skip to content

Instantly share code, notes, and snippets.

jsbain

Block or report user

Report or block jsbain

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 h2048.py
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 12 09:33:29 2014
@author: henryiii
"""
import random
import numpy as np
from functools import partial
View h2048.py
# -*- coding: utf-8 -*-
"""
Created on Sat Jul 12 09:33:29 2014
@author: henryiii
"""
import random
import numpy as np
import ui
@jsbain
jsbain / pipista.py
Last active Aug 29, 2015 — forked from pudquick/pipista.py
updated v2 to work properly with pythinista 1.5
View pipista.py
# pipista v2, by pudquick, updated for pythonista 1.5 by jsbain
# todo: consolidate unzip, ungzip, unbzip, and untar. tarfile supports compressed archives, so can use that directly. use is_zipfile, is_tarfile rather than magic packet stuff. there is a lot of duplicate code elsewhere that should be modularized
# 2) option to use site-packages rather than pypi-modules
# 3) make sure to cleanup .tmp on errors.
import os, os.path, sys, urllib2, requests, tempfile, zipfile, shutil, gzip, tarfile, xmlrpclib, ConfigParser
__pypi_base__ = os.path.abspath(os.path.dirname(__file__))
@jsbain
jsbain / Add Web Tab.py
Created Dec 5, 2016 — forked from steventroughtonsmith/Add Web Tab.py
Insert a custom browser tab into Pythonista
View Add Web Tab.py
# coding: utf-8
from Foundation import *
from QuartzCore import *
from UIKit import *
import console
WKWebView = ObjCClass('WKWebView')
@on_main_thread
@jsbain
jsbain / gistcheck.py
Last active Dec 15, 2017 — forked from davenicholls/gistcheck.py
updated comment: prevent opening of pyui in editor
View gistcheck.py
# Source: https://gist.github.com/5212628
#
# All-purpose gist tool for Pythonista.
#
# When run directly, this script sets up four other scripts that call various
# functions within this file. Each of these sub-scripts are meant for use as
# action menu items. They are:
#
# Set Gist ID.py - Set the gist id that the current file should be
# associated with.
You can’t perform that action at this time.