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 ui,time | |
| import bz2 | |
| from base64 import b64decode | |
| import threading | |
| import math | |
| from objc_util import on_main_thread | |
| #https://gist.github.com/b8e6f213d19e9d4668a7f28bbd1efe9f | |
| def run_async(func): |
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 ui,time | |
| import bz2 | |
| from base64 import b64decode | |
| import threading | |
| import math | |
| from objc_util import on_main_thread | |
| def run_async(func): |
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 ui,time | |
| import bz2 | |
| from base64 import b64decode | |
| import threading | |
| import math | |
| from objc_util import on_main_thread | |
| import time | |
| import sound |
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
| # coding: utf-8 | |
| # coding: utf-8 | |
| import ui | |
| #unpack pyuis | |
| pyuistr=''' | |
| [ { | |
| "class" : "View", | |
| "attributes" : { | |
| "custom_class" : "MyView", | |
| "background_color" : "RGBA(1.000000,1.000000,1.000000,1.000000)", |
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 objc_util import UIApplication | |
| with open('history.py','r') as f: | |
| UIApplication.sharedApplication().keyWindow().rootViewController().accessoryViewController().consoleViewController().history= f.readlines() |
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
| # IMPORTANT SETUP INSTRUCTIONS: | |
| # | |
| # 1. Go to http://www.dropbox.com/developers/apps (log in if necessary) | |
| # 2. Select "Create App" | |
| # 3. Select the following settings: | |
| # * "Dropbox API app" | |
| # * "Files and datastores" | |
| # * "(No) My app needs access to files already on Dropbox" | |
| # * "All file types" | |
| # * (Choose any app name) |
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
| '''Dual interpreter experiment: try launching py2 script from py3. | |
| Result: success.... but globals are cleared,- same as if play button is pressed | |
| ''' | |
| import sys | |
| from objc_util import * | |
| import editor,os | |
| @on_main_thread | |
| def _get_editor_tab(): | |
| ''' from editor.py in py3, gets the texteditorviewcontroller. |
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 objc_util import * | |
| import ctypes | |
| import numpy as np | |
| import matplotlib.image | |
| import io,ui | |
| AVAudioEngine=ObjCClass('AVAudioEngine') | |
| AVAudioSession=ObjCClass('AVAudioSession') | |
| def setup(): | |
| error=ctypes.c_void_p(0) | |
| session=AVAudioSession.sharedInstance() |