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 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 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
# This is free and unencumbered software released into the public domain. | |
# | |
# Anyone is free to copy, modify, publish, use, compile, sell, or | |
# distribute this software, either in source code form or as a compiled | |
# binary, for any purpose, commercial or non-commercial, and by any | |
# means. | |
# | |
# In jurisdictions that recognize copyright laws, the author or authors | |
# of this software dedicate any and all copyright interest in the | |
# software to the public domain. We make this dedication for the benefit |
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
-- Copyright Matthew Murdoch | |
-- Remix under the terms of the MIT license (see http://opensource.org/licenses/MIT) | |
bounds = nil | |
circles = {} | |
function setup() | |
displayMode(FULLSCREEN) | |
physics.gravity(0, 0) | |
addBounds() |
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
-- Copyright Matthew Murdoch | |
-- Remix under the terms of the MIT license (see http://opensource.org/licenses/MIT) | |
Point = class() | |
function Point:init(x, y) | |
self._x = x | |
self._y = y | |
end |
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
# Copyright Matthew Murdoch | |
# Remix under the terms of the MIT license (see http://opensource.org/licenses/MIT) | |
from random import * | |
from scene import * | |
class Rectangle(object): | |
def __init__(self, bottom_left, size): | |
self._rect = Rect(bottom_left.x, bottom_left.y, size.w, size.h) | |
self._fill_color = Color(0, 0, 0) | |
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 random import * | |
from scene import * | |
class Velocity(object): | |
def __init__(self, dx, dy): | |
self.dx = dx | |
self.dy = dy | |
class Circle(object): | |
def __init__(self, location, color, velocity): |
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
# Copyright Matthew Murdoch | |
# Remix under the terms of the MIT license (see http://opensource.org/licenses/MIT) | |
from random import random | |
from scene import * | |
class Circle(object): | |
def __init__(self, location, color): | |
self.location = location | |
self.color = color |
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 console | |
import keychain | |
import traceback | |
from github import Github | |
def printRepository(username): | |
g = Github(username, getGithubPassword(username)) | |
user = g.get_user() | |
repositories = user.get_repos() |
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 os | |
import urllib2 | |
import tarfile | |
import shutil | |
workingPath = os.getcwd() | |
tempPath = os.path.join(workingPath, 'temp') | |
dateutilArchiveDir = 'python-dateutil-1.5' | |
dateutilArchive = dateutilArchiveDir + '.tar.gz' | |
dateutilArchivePath = os.path.join(tempPath, dateutilArchive) |
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
# Note that this script attempts to delete directories (Folders) called 'temp' and 'dateutil' | |
# within Pythonista as part of installation. It will also overwrite files in directories | |
# named 'github' and 'githubista'. If you are using Pythonista 1.3 or above please check | |
# that you have not created any Folders with these names before running this script as | |
# any files inside them will be irretrievably lost. | |
import os | |
import urllib2 | |
import tarfile | |
import shutil | |
import traceback |
NewerOlder