Skip to content

Instantly share code, notes, and snippets.

View WebScraper.py
import selenium
from selenium import webdriver
import time
URL = "http://edatai.us/blog/2012/11/20/placing-kpis-different-cron-schedules"
b = webdriver.Firefox()
b.get(URL)
for i in range(2, 806):
View WebpageTitle.py
import urllib
import clipboard
import bs4
import console
link = clipboard.get()
console.show_activity()
soup = bs4.BeautifulSoup(urllib.urlopen(link))
View OmniFocusScreen.py
#Summary: Takes copied text and creates new task in OmniFocus
#By: Jason Verly
#Rev: 2013-02-02
import webbrowser
import clipboard
import urllib
View Markdown Conversion.py
# Markdown Conversion
#
# This script demonstrates how you can convert Markdown documents
# to HTML and view the results in the built-in browser.
import os, tempfile, codecs
import console, clipboard, webbrowser
from markdown2 import markdown
DEMO = '''
View ImportToOmnifocus.py
#Summary: Takes copied text and creates new task in OmniFocus
#By: Jason Verly
#Rev: 2013-02-02
import webbrowser
import clipboard
import urllib
import console
task = console.input_alert('Task', 'Enter task description')
View ImportToOF.py
#Summary: Takes copied text and creates new task in OmniFocus
#By: Jason Verly
#Rev: 2013-02-04
#Rev Note: Added Page Title & URL to clipped txt
import webbrowser
import clipboard
import urllib
import console
import sys
View ImgResize.py
import Image, ImageOps, ImageFilter
import photos
import console
import clipboard
import datetime
img = photos.pick_image()
today = datetime.datetime.now()
View ImageResize.py
import photos
import Image
choose = photos.pick_image()
final = choose.resize((800,600),Image.ANTIALIAS)
saveit = photos.save_image(final)
if saveit is True:
View get_ipaddr.py
import socket
import console
console.clear()
fqdn = socket.getfqdn() + '.local'
ip_addr = socket.gethostbyname(fqdn)
print ip_addr
View DumpToOF.py
# More information: http://n8henrie.com/2013/03/send-multiple-tasks-to-omnifocus-at-once-with-drafts-and-pythonista
# Script name: MultiLineOmniFocus
# Drafts "URL Action": pythonista://MultiLineOmniFocus?action=run&argv=[[draft]]
# Modified from email script by OMZ: https://gist.github.com/omz/4073599
import smtplib
from email.mime.multipart import MIMEMultipart
from email import encoders
import sys
You can’t perform that action at this time.