Skip to content

Instantly share code, notes, and snippets.

View gregorypease280's full-sized avatar

Gregory Pease gregorypease280

  • Los Angeles, California
View GitHub Profile
@omz
omz / FontInstaller.py
Last active August 8, 2023 14:43
FontInstaller
# FontInstaller (by @olemoritz)
# This script installs a custom TTF font on iOS (system-wide).
# It can be used in one of two ways:
# 1. Simply run it in Pythonista, you'll be prompted for the URL of the font
# you'd like to install (if there's a URL in the clipboard, it'll be used by default)
# 2. Use it as an 'Open in...' handler, i.e. select this file in Pythonista's 'Open in...
# menu' setting. This way, you can simply download a ttf file in Safari and open it in
@BashedCrab
BashedCrab / JumpyOctopus.py
Created February 12, 2014 03:25
JumpyOctopus
from scene import *
from PIL import Image
import sound
import random
GAME_READY = 0
GAME_PLAY = 1
GAME_DYING = 2
GAME_DEAD = 3
@cclauss
cclauss / watch_pythonista_forum.py
Last active November 25, 2020 17:27
Learning how to use feedparser... recent_entries() will print out info on all posts to the Pythonista forum in the past 24 hours. watch_feed() will print out info on the last post to the Pythonista forum. Sleeps for 15 minutes then check to see if there is a newer post. If so, prints out info on it and opens its URL in the webbrowser. Repeat.
#!/usr/bin/env python
'''
recent_entries() will print out info on all posts to the Pythonista forum in the past 24 hours.
watch_feed() will print out info on the last post to the Pythonista forum.
Sleeps for 15 minutes then check to see if there is a newer post.
If so, prints out info on it and opens its URL in the webbrowser. Repeat.
'''
@stophlong
stophlong / pythonista_google_tts.py
Created February 2, 2014 19:28
Ios 7 pythonista script: takes clipboard (in Spanish) and reads it aloud (in Spanish) using Google Text to Speech
# -*- coding: utf-8 -*-
""" ios clipboard to google TTS (in Spanish)
This was written for ios pythonista, a python 2.x language. It takes whatever is in the clipboard
and reads it out using google text-to-speech. The present form takes Spanish and reads it aloud as my
interest is in learning to understand spoken Spanish. I take text from the immersion part of
Duolingo and listen. It should be quite easy to modify for different purposes.
On a jail-broken device one can even: copy to clipboard, use activator to launch the pythonista script, and
have it start speaking! I simple gathered some python from the web, fit it together, debugged a bit, and I
had a new tool. Pythonista blew my mind.
@harryjubb
harryjubb / Find and Replace.py
Created June 1, 2013 18:58
Find and Replace in Pythonista for iPad
'''
Pythonista Find and Replace
===========================
Notices
-------
Copyright 2013 Harry Jubb.
This program is free software: you can redistribute it and/or modify
@LandyQuack
LandyQuack / gui1.py
Created March 17, 2013 18:14
First experiments with a Pythonista GUI on the iPad
# A very simple first experiment in GUI creation using Pythonista
# on an iPad2. Creates two square buttons which change colour and
# make a noise when touched. It's modelled on what I vaguely remember
# of the innards of MS Windows
from scene import *
from random import random
import sound
# Base class for controls
@omz
omz / Curve Demo.py
Created March 5, 2013 02:30
Curve Demo
import canvas
canvas.set_size(512, 512)
from_point = (10, 10)
cp1 = (40, 200) #control point 1
cp2 = (350, 50) #control point 2
to_point = (300, 300)
# Draw the actual curve:
@silverkors
silverkors / fileman.py
Created November 27, 2012 20:40
Useful filemanager for Pythonista, move files, delete and create files and directories
# -*- coding: utf-8 -*-
import os, sys, editor, shutil
from glob import glob
from scene import *
from time import time
from copy import deepcopy
from PIL import Image, ImageDraw, ImageFont
# https://gists.github.com/4034526
@silverkors
silverkors / gui.py
Created November 20, 2012 21:36
The simple beginning of a gui for Pythonista - an input field and keyboard
# -*- coding: utf-8 -*-
from scene import *
from time import time
from copy import deepcopy
from PIL import Image, ImageDraw, ImageFont
global EventQ
def p_click():
@silverkors
silverkors / kbd_draw.py
Created November 20, 2012 21:35
Create an iPhone US keyboard with Pythonista
# -*- coding: utf-8 -*-
from scene import *
from PIL import Image, ImageDraw, ImageFont
row_rects = []
row_keys = []
n_row_rects = []
n_row_keys = []