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 dulwich.repo import Repo | |
from dulwich.objects import Commit,Tree | |
import time | |
def find_lost_commits(): | |
r=Repo('.') | |
o=r.object_store | |
all_commits=[] | |
all_trees=[] | |
for sha in o: |
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
# coding: utf-8 | |
''' | |
This is a little helper script to make it easier | |
to create single-file scripts with Pythonista, while | |
still taking advantage of the UI editor. | |
It'll essentially convert the .pyui file to a compact | |
string representation that you can embed directly | |
in your script. The code to unpack and load the UI | |
is also auto-generated for convenience. |
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
# coding: utf-8 | |
import ui | |
import os | |
from objc_util import ObjCInstance, ObjCClass | |
from operator import attrgetter | |
import time | |
import threading | |
import functools | |
import ftplib | |
import re |
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
# coding: utf-8 | |
from objc_util import * | |
import console | |
import urllib | |
import dialogs | |
WKWebView = ObjCClass('WKWebView') | |
UIViewController = ObjCClass('UIViewController') | |
UIBarButtonItem = ObjCClass('UIBarButtonItem') | |
NSURLRequest = ObjCClass('NSURLRequest') |
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 editor, console | |
script = editor.get_text() | |
selection = editor.get_selection() | |
selected_text = script[selection[0]:selection[1]].splitlines() | |
indentation = int(console.input_alert('Indent')) | |
replacement = [] | |
for line in selected_text: | |
if indentation > 0: |
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
# Markdown to PDF Conversion | |
# | |
# This script converts Markdown markup to PDF directly on your iOS device. | |
# | |
# Please see the "Requirements" section in the docstring below for required | |
# dependencies and the "Installation" section for instructions on how to | |
# install them. | |
# | |
# Run this script directly or put it into the Pythonista editor action menu | |
# with one of the following options as the first and sole argument: |
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
#!/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. | |
''' |
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
/// | |
var pkg = require("./package.json") | |
, rimraf = require("rimraf") | |
, gulp = require("gulp") | |
, gutil = require("gulp-util") | |
, filter = require("gulp-filter") | |
, plumber = require("gulp-plumber") | |
, concat = require("gulp-concat") | |
gulp.task("clean", function() { |
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
source.sh | |
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 sound import * | |
from math import * | |
from random import random | |
import clipboard | |
FONT = 'HelveticaNeue-Bold' | |
PADDING = 6 | |
COLORS = ((1,1,1),(0.8,0,0),(0,0,0.9),(0,0.7,0),(0.6,0.1,0.6),(1,0,0),(0.8,0.8,0),(0.9,0.5,0),(0.2,0.2,0.2)) | |
TEXT1_HEIGHT = 20 |
NewerOlder