This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # encoding=utf8 | |
| """ | |
| formd by Seth Brown, 02-24-12 | |
| modified for iOS use (Pythonista) by Brett Terpstra, 10-17-12 | |
| """ | |
| from sys import stdin, stdout | |
| import clipboard | |
| import re | |
| from collections import OrderedDict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Note that this script attempts to delete directories (Folders) called 'temp' and 'dateutil' | |
| # within Pythonista as part of installation. It will also overwrite files in directories | |
| # named 'github' and 'githubista'. If you are using Pythonista 1.3 or above please check | |
| # that you have not created any Folders with these names before running this script as | |
| # any files inside them will be irretrievably lost. | |
| import os | |
| import urllib2 | |
| import tarfile | |
| import shutil | |
| import traceback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #TODO: Adjust size to screen size (iPhone) | |
| #TODO: Clear (and random, play/pause?) buttons | |
| from scene import * | |
| from sound import play_effect, set_volume, load_effect | |
| from colorsys import hsv_to_rgb | |
| import pickle | |
| class DrumMachine (Scene): | |
| def setup(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # YOU NEED TO INSERT YOUR APP KEY AND SECRET BELOW! | |
| # Go to dropbox.com/developers/apps to create an app. | |
| app_key = 'YOUR_APP_KEY' | |
| app_secret = 'YOUR_APP_SECRET' | |
| # access_type can be 'app_folder' or 'dropbox', depending on | |
| # how you registered your app. | |
| access_type = 'app_folder' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scene import * | |
| import sound | |
| class MyScene (Scene): | |
| def setup(self): | |
| # This will be called before the first frame is drawn. | |
| self.root_layer = Layer(self.bounds) | |
| self.bullets = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # File Transfer for Pythonista | |
| # ============================ | |
| # This script allows you to transfer Python files from | |
| # and to Pythonista via local Wifi. | |
| # It starts a basic HTTP server that you can access | |
| # as a web page from your browser. | |
| # When you upload a file that already exists, it is | |
| # renamed automatically. | |
| # From Pythonista's settings, you can add this script | |
| # to the actions menu of the editor for quick access. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from scene import * | |
| from random import randint, random, choice | |
| from sound import play_effect | |
| from colorsys import hsv_to_rgb | |
| from math import sin | |
| from functools import partial | |
| from copy import copy | |
| class Star (object): | |
| def __init__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import console | |
| import keychain | |
| import traceback | |
| from github import Github | |
| def printRepository(username): | |
| g = Github(username, getGithubPassword(username)) | |
| user = g.get_user() | |
| repositories = user.get_repos() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def shareSingleNote(authToken, noteStore, userStore, noteGuid, shardId=None): | |
| """ | |
| Share a single note and return the public URL for the note | |
| """ | |
| if not shardId: | |
| shardId = getUserShardId(authToken, userStore) | |
| if not shardId: | |
| raise SystemExit | |
| try: |