This is the README file.
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
_BUCKET_NAME="foo.example.com" | |
_POLICY=$(cat <<EOT | |
{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"PublicReadForGetBucketObjects", | |
"Effect":"Allow", | |
"Principal": "*", | |
"Action":["s3:GetObject"], |
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 | |
# Barcode scanner demo for Pythonista | |
# Based on http://www.infragistics.com/community/blogs/torrey-betts/archive/2013/10/10/scanning-barcodes-with-ios-7-objective-c.aspx | |
from objc_util import * | |
from ctypes import c_void_p | |
import ui | |
import sound | |
found_codes = set() |
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 | |
# Olaf, Dec 2015, Pythonista 1.6 beta | |
'''Appex GetFromURL | |
Pythonista app extension for use on share sheet of other apps to import file from URL into Pythonista | |
The file is saved at HOME/DESTINATION without user interaction (no 'save as' dialog) unless duplicate''' | |
from __future__ import print_function | |
try: | |
import appex, console, contextlib, itertools, os, os.path, sys, time, urllib, urlparse |
After you made some cool games or apps with Pythonista, you may want to make it run as a standaone app on iPad/iPhone and possibly share it on the AppStore. This how-to tells you how to do it.
- Pythonista code you wrote
- A Mac with Xcode 7.1 installed
- iPhone/iPad running iOS 9
- Download PythonistaProjectTemplate.zip. The original PythonistaProjectTemplate described at http://olemoritz.net/pythonista-15-whats-new-and-whats-missing.html does not work with Xcode 7. I updated it to work with Xcode 7 and added a more interesting example than the plain old Hello World thing.
- Unzip the file and open the project in Xcode 7.1. In project settings, change the Bundle Identifier from com.yuhangwang.pythonistaproject to something else.
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
# Standalone mini version of pip | |
# Geared towards Pythonista, but easily adaptable to other pure python installs | |
import argparse, copy, gzip, os, os.path, re, requests, shutil, site, sys, tarfile, time, xmlrpclib | |
# Where packages will end up installed | |
site_packages = site.USER_SITE | |
# Root of Pythonista saveable document location | |
pythonista_base = os.path.split(site_packages)[0] | |
# Temporary directory for work |
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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
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
body {font-family:"Open Sans", "Helvetica Neue", Arial, sans-serif;} | |
h1, h2, h3, h4, h5, h6 {border-bottom-color:#ddd;} | |
p {line-height:1.8em; margin-bottom:1.8em;} | |
#mw-content-text {font-size:1.1em; line-height:1.8em;} | |
li:last-of-type, dd:last-of-type {margin-bottom:1.3em;} | |
#mw-content-text h2 {padding-top:1.7em;} | |
a, div#content a.external {color:#00d;} | |
a:visited, div#content a.external:visited{color:#90d;} | |
.mw-editsection, .mw-editsection a {color:#ccc !important;} | |
#mw-panel .portal{-webkit-transition:opacity 250ms ease; opacity:0.3;} |
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
body {font-family:"Open Sans", "Helvetica Neue", Arial, sans-serif;} | |
h1, h2, h3, h4, h5, h6 {border-bottom-color:#ddd;} | |
p {line-height:1.3em; margin-bottom:1.3em;} | |
#mw-content-text {font-size:1.1em; line-height:1.3em;} | |
li:last-of-type, dd:last-of-type {margin-bottom:1.3em;} | |
#mw-content-text h2 {padding-top:1.7em;} |