Skip to content

Instantly share code, notes, and snippets.

@SebastianJarsve
SebastianJarsve / MazeCreator.py
Last active August 29, 2015 13:56
Maze Creator
from scene import *
from random import choice
def opposite(d):
return (d[0]*-1, d[1]*-1)
def sub_tuples(a, b):
return (a[0]-b[0], a[1]-b[1])
def add_tuples(a, b):
anonymous
anonymous / Archive.py
Created January 19, 2014 14:49
Archive
# PLEASE READ THESE FEW LINES
## You can contact at @theknowsbest on Twitter if you need help (though admittedly, I'm far from an expert on this stuff)
## Before you can use this script, you need to do a few things...
## 1. Create a Dropbox app for Python through 'http://dropbox.com/developers/apps'
## 2. Run the first script on this site 'http://omz-software.com/pythonista/docs/ios/dropbox.html'
## Make sure to insert your app key and secret,
## and follow the instructions you're given in the console slavishly
## 3. Download this 'https://gist.github.com/4034526' script and name it 'dropboxlogin.py'
## 4. Run 'dropboxlogin.py' and authenticate your app through
##
@BashedCrab
BashedCrab / HydrogenDemo.py
Last active March 19, 2023 04:14
Demo of the Hydrogen GUI framework for Pythonista
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#
@BashedCrab
BashedCrab / Hydrogen.py
Last active March 19, 2023 04:14
Hydrogen - A lightweight GUI framework for Pythonista
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#
@fedir
fedir / gist-backup.py
Last active April 21, 2024 21:31 — forked from nicerobot/backup.sh
Clone or update all user's gists #backup #github #gists #management
#!/usr/bin/env python
# Clone or update all a user's gists
# curl -ks https://raw.github.com/gist/5466075/gist-backup.py | USER=fedir python
# USER=fedir python gist-backup.py
import json
import urllib
from subprocess import call
from urllib import urlopen
import os
@tofias
tofias / Search Pinboard from Drafts
Created February 7, 2013 21:57
Search Pinboard from Drafts
drafts://x-callback-url/import_action?type=URL&name=Search%20in%20Pinboard&url=https%3A%2F%2Fm.pinboard.in%2Fsearch%2F%3Fquery%3D%5B%5Bdraft%5D%5D%26mine%3DSearch%2BMine
@spencerogden
spencerogden / gistcheck.py
Last active August 8, 2023 14:43 — forked from Westacular/gistcheck.py
Script for use with Pythonista to allow Github Gists for script storage and retrieval. Copy script in full into a new script in Pythonista called "gitcheck". Run the script and it will create 4 scripts starting with "Gist". These can be added to the action menu. See comments for more details.
# Source: https://gist.github.com/4702275
#
# 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.
@ctaloi
ctaloi / gist:4156185
Created November 27, 2012 18:48 — forked from fcrespo82/gist:4137305
Script to sync Pythonista App to Dropbox
import webbrowser, os, pprint
# Include the Dropbox SDK libraries
#from dropbox import client, rest, session
import dropbox
# Configuration
TOKEN_FILENAME = 'PythonistaDropbox.token'
# Get your app key and secret from the Dropbox developer website
APP_KEY = '<your dropbox app_key>'
APP_SECRET = '<your dropbox app_secret>'
@pudquick
pudquick / shellista.py
Last active November 12, 2022 16:56
Advanced shell for Pythonista
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip
# Credits
#
# The python code here was written by pudquick@github
#
# License
#
# This code is released under a standard MIT license.
#
@wrenoud
wrenoud / DropboxSync.py
Created November 10, 2012 02:46
DropboxSync
import os
import sys
import pickle
import console
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here https://gist.github.com/4034526
STATE_FILE = '.dropbox_state'