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
// Usage example: | |
// input image: http://f.cl.ly/items/3v0S3w2B3N0p3e0I082d/Image%202011.07.22%2011:29:25%20PM.png | |
// | |
// UIImage *buttonImage = [UIImage ipMaskedImageNamed:@"UIButtonBarAction.png" color:[UIColor redColor]]; | |
// .h | |
@interface UIImage (IPImageUtils) | |
+ (UIImage *)ipMaskedImageNamed:(NSString *)name color:(UIColor *)color; | |
@end |
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
FooBar.pdf | |
================================================================================ | |
p. 4 | highlight | yellow | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor | |
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis | |
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. | |
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu | |
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in | |
culpa qui officia deserunt mollit anim id est laborum. |
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
# 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 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
# Google Search for Pythonista (iOS) | |
# Searches Google and copies the first result to the clipboard as | |
# a Markdown link in the form [title](url). | |
# | |
# Inspired by Brett Terpstra's SearchLink: | |
# http://brettterpstra.com/searchlink-automated-markdown-linking-improved/ | |
import clipboard | |
def google(terms): |
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
# Shows a list of the 10 top paid apps on the App Store. | |
print 'Loading...' | |
import feedparser | |
import console | |
print 'Fetching Feed...' | |
feed = feedparser.parse('http://itunes.apple.com/us/rss/toppaidapplications/limit=10/xml') | |
entries = feed['entries'] |
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
# Meme Generator 1 | |
# Demonstrates how to draw text on images using PIL | |
# (Python Imaging Library) | |
# | |
# The script loads an image from the clipboard (or uses | |
# a default one if the clipboard is empty) and asks for | |
# two captions (top and bottom) that are then drawn onto | |
# the image. | |
import 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 Image | |
import ImageChops | |
import ImageDraw | |
import ImageFont | |
import ImageFilter | |
import clipboard | |
def draw_caption(img, text, outline=2, top=False): | |
text_img = Image.new('RGBA', img.size, (0, 0, 0, 0)) | |
draw = ImageDraw.Draw(text_img) |
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
#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 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 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): |
OlderNewer