Skip to content

Instantly share code, notes, and snippets.

@omz
omz / PythonistaFTP.py
Last active May 17, 2023 12:43
PythonistaFTP.py
'''FTP server for Pythonista (iOS)
You can use this to exchange files with a Mac/PC or a file management app on the same device (e.g. Transmit).
If you use a Mac, you can connect from the Finder, using the "Go -> Connect to Server..." menu item.
'''
import os
from socket import gethostname
anonymous
anonymous / file1.py
Created April 29, 2015 19:24
Pasted from IPython
/wallet/Cryptsy.com = Cryptsy.com
@wizardofozzie
wizardofozzie / bip39
Last active October 16, 2021 10:47
BIP39 codes & words
#!/usr/bin/python
import binascii, re, json, copy, sys
from binascii import hexlify, unhexlify
from bitcoin.main import *
# SEE https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki
ELECTRUM_ENG_V1_WORDLIST = [
'like','just','love','know','never','want','time','out',
'there','make','look','eye','down','only','think','heart',
@wizardofozzie
wizardofozzie / penrose.py
Created April 6, 2015 04:44
penrose.py
_ =\
"""if!
1:"e,V=100
0,(0j-1)**-.2;
v,S=.5/ V.real,
[(0,0,4 *e,4*e*
V)];w=1 -v"def!
E(T,A, B,C):P
,Q,R=B*w+ A*v,B*w+C
*v,A*w+B*v;retur n[(1,Q,C,A),(1,P
anonymous
anonymous / file1.py
Created March 12, 2015 02:36
Pasted from IPython
01000000014645ed9963483c284c9f631fa1bfd5d068a5c3b95b930986d814281bcc7d3cc5010000008b483045022100ae47ee6e20a969bb96e7f42a0e2bd37a24205ac201b06d65edda26989d1d215802201aa990d089ecfb9ee08eb486a244a35ec14c682360277f9099ac37ec76c35cf30141042daa93315eebbe2cb9b5c3505df4c6fb6caca8b756786098567550d4820c09db988fe9997d049d687292f815ccd6e7fb5c1b1a91137999818d17c73d0f80aef9fffffffffdb4034416000000000000c95141e4cf0200067daf13255044462d312e340a25c3a4c3bcc3b6c39f0a322030206f626a0a3c3c2f4c656e6774682033203020522f46696c7465722f466c617465446541636f64653e3e0a73747265616d0a789cad5c4b8b24b911becfafa8b3a1da292925654253d0d55373f06d61c007e39bbd061f0cde8bffbe25c55b5266f61ab3905d419ba54728e28bb76a963777fbcfb77fdf96db7d291f93f3e599f7fafcedefb73fffe1f6aff665fdefb77f7c7bfefce6c2fa166e695bdfd6dbcfbfddfef8c3dd5cf953ae4416000000000000c95141f4eb5fde17f7b8fbf7c53feeee7d098ff57d59dbc7f8b8aff43ab5676e03b747f9b8d747fbf4511fcfc73dd667785f3edba0ef8f7bc0d5609deff5e37c6c5be655411f3fe4abf591eafc3a1546c132a9be069a80ca3ad92d7584737584f32ec817eba3bc8ff0fe
// To run this:
// 1. Install node.js
// 2. Fill in encrypted & password below
// 3. node decrypt.js
var encrypted = ''; // copy paste encrypted json here
var password = ''; // your password goes here
(typeof Crypto == "undefined" || !Crypto.util) && function () {
var a = Crypto = {}, b = a.util = {
@mncfre
mncfre / diff.py
Last active November 6, 2015 11:57
A document Diff for Pythonista
# -*- coding: utf-8 -*-
#Please get the last version on https://github.com/mncfre/Document-Diff
import difflib
import re
import BaseHTTPServer
import webbrowser
import clipboard
import editor
header = '''<!DOCTYPE html>
@fyk
fyk / SaveAppIconFromAppStore.py
Last active April 22, 2016 01:34
SaveAppIconFromAppStore.py(Pythonista)
import re, os
import urllib
import ImageFile
import photos
import clipboard
from bs4 import BeautifulSoup
from PIL import Image
def download_from(url):
print("get content from " + url)
@DiKorsch
DiKorsch / coinbase.py
Last active October 30, 2015 07:10
Coinbase API in python 2.7
import hashlib, hmac, urllib2, time, json, requests
COINBASE_ENDPOINT = "https://coinbase.com/api/v1"
FORMAT = "json"
# store these in a secure place... this is only for demo purpose
KEY = "KEY"
SECRET = "SECRET"
@SpotlightKid
SpotlightKid / wagenheber.py
Last active March 19, 2023 03:07
Simple PyPI package installation client for Pythonista
#!/usr/bin/env python
#-*- coding:utf-8 -*-
#
# wagenheber.py
#
"""Simple PyPI package installation client for Pythonista.
Currently only supports installing pure Python packages for which a
distribution archive in bdist_wheel format is available on PyPI.