This file contains 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
# Workaround for default editable text entries on OS X .. sadly relies on curses | |
import curses, curses.textpad | |
from curses.textpad import Textbox | |
screen = curses.initscr() | |
curses.savetty() | |
curses.noecho() | |
class BackspaceTextbox(Textbox): |
This file contains 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 base64 | |
from scene import * | |
from PIL import Image | |
def load_keyboard(retina_display = False): | |
kb_filename = "keyboard.png" | |
if retina_display: | |
kb_filename = "[email protected]" | |
kb_image = load_image_file(kb_filename) | |
if not kb_image: |
This file contains 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, os.path, sys, urllib2, requests | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) | |
def _chunk_report(bytes_so_far, chunk_size, total_size): | |
if (total_size != None): |
This file contains 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
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>PayloadContent</key> | |
<array> | |
<dict> | |
<key>FullScreen</key> | |
<true/> | |
<key>IsRemovable</key> | |
<true/> |
This file contains 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 uuid, BaseHTTPServer, select, types, clipboard, console | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
try: | |
from cStringIO import StringIO | |
except ImportError: | |
from StringIO import StringIO | |
global mobile_config_str | |
mobile_config_str = '' |
This file contains 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, 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. | |
# |
This file contains 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 sys, os.path | |
settings_file = sys.argv[1] | |
id_list_file = sys.argv[2] | |
f = open(settings_file) | |
settings = f.read() | |
f.close() | |
f = open(id_list_file) | |
ids = f.read() |
This file contains 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 sys, os.path | |
with open(sys.argv[1]) as f, open(sys.argv[2]) as g: | |
settings = [x for x in f.read().split('\n')] | |
ids = g.read().split() | |
mode = 0 | |
for i, line in enumerate(settings): | |
if line.strip(): | |
if (mode == 0) and line.startswith('[') and (line.strip('[]') in ids): mode = 1 | |
if (mode == 1): settings[i] = ';' + settings[i] | |
else: mode = 0 |
This file contains 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 sqlite3, plistlib | |
tracks_cmap = {'Album' :'album', | |
'Album Rating' :'album_rating', | |
'Artist' :'artist', | |
'Comments' :'comments', | |
'Compilation' :'compilation', | |
'Composer' :'composer', | |
'Disabled' :'disabled', | |
'Disc Count' :'disc_count', |
This file contains 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, os.path, sys, urllib2, requests, tempfile, zipfile, shutil, gzip, tarfile | |
__pypi_base__ = os.path.abspath(os.path.dirname(__file__)) | |
class PyPiError(Exception): | |
def __init__(self, value): | |
self.value = value | |
def __str__(self): | |
return repr(self.value) |
OlderNewer