🧙♂️
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 turtle | |
t = turtle.Pen() | |
t.ht() | |
t.speed(0) | |
turtle.colormode(255) | |
rgb = [255, 0, 0] | |
def progressrainbow(rgb): | |
new = [] |
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 images2gif import writeGif | |
from PIL import Image, ImageDraw | |
import console | |
W, H = 1024,1024 | |
RESOLUTION = 5 |
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 * | |
import motion | |
def mean(list1, limit=0): | |
''' | |
Find the mean of values in a list. | |
Options: | |
list1- the inout list of integers | |
limit- how many of the most recent items to include. 0 to include all. | |
''' |
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 ui | |
from PIL import Image | |
from io import BytesIO | |
from math import exp, log, copysign, ceil | |
BGCOLOR = '#0F0F0F' | |
def pil_to_ui(img): | |
b = BytesIO() | |
img.save(b, "PNG") |
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 math | |
from operator import itemgetter | |
import console | |
from PIL import Image, ImageDraw | |
import scene | |
class Point3D: |
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 appex, bs4, dialogs, urllib2, webbrowser | |
if appex.is_running_extension(): | |
starturl = appex.get_url() | |
else: | |
#ask for video url | |
starturl = dialogs.form_dialog(fields=[{'type':'url', 'title':'URL:', 'key':'url'}])['url'] | |
#handle redirects, in case of shortened url | |
url = urllib2.urlopen(urllib2.Request(starturl)).geturl() | |
#keepvid page url | |
url = 'http://www.keepvid.com/?url='+url.split('&feature')[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
import bs4, urllib2, webbrowser | |
starturl = raw_input('url: ') | |
#handle redirects, in case of shortened url | |
url = urllib2.urlopen(urllib2.Request(starturl)).geturl() | |
#keepvid page url | |
url = 'http://www.keepvid.com/?url='+url.split('&feature')[0] | |
#beautifulsoup object of keepvid page | |
soup = bs4.BeautifulSoup(urllib2.urlopen(url).read()) | |
#find valid links | |
links = [] |
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 pyimgur,photos,clipboard,os,console | |
i=photos.pick_image() | |
format = 'gif' if (i.format == 'GIF') else 'jpg' | |
i.save('img.'+format) | |
clipboard.set('.upload_image('img.'+format, title="Uploaded-Image").link)+')') | |
console.hud_alert("link copied!") | |
os.remove('img.'+format) |
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 urllib2, appex, time, zipfile, os | |
a=time.time() | |
if appex.is_running_extension(): | |
url = appex.get_url() | |
print url | |
e=0 | |
else: | |
import clipboard, editor | |
url = clipboard.get() | |
e=1 |
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 xml.etree.ElementTree as ET | |
def getDialogueList(*plays): | |
dialogues = [] | |
for p in plays: | |
root = ET.parse("shakespeare/"+p+".xml") | |
playtitle = root.findtext("TITLE") | |
playsubt = root.findtext("PLAYSUBT") | |
print playtitle |
OlderNewer