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 python2.6 | |
import urllib | |
from xml.dom import minidom | |
from optparse import OptionParser | |
status_url = "http://api.tubeupdates.com/?method=get.status&lines=%s&format=xml" | |
def main(lines, show_message): | |
url = status_url % ','.join(lines) |
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/python | |
import sys | |
import pywapi | |
import subprocess | |
img_path = "/path/to/img/weather/" | |
weather_img = {} | |
weather_img['Partly Sunny'] = img_path + "part_sun.jpg" | |
weather_img['Scattered Thunderstorms'] = img_path + "thunder.jpg" |
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/local/bin/python | |
import subprocess | |
import fileinput | |
import email | |
import re | |
def extract_body(payload): | |
if isinstance(payload,str): | |
return payload |
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 python2.6 | |
import urllib | |
from xml.dom import minidom | |
from optparse import OptionParser | |
import subprocess | |
import re | |
from HTMLParser import HTMLParser | |
import random |
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
class ImagePlayer(QWidget): | |
def __init__(self, filename, title, parent=None): | |
QWidget.__init__(self, parent) | |
# Load the file into a QMovie | |
self.movie = QMovie(filename, QByteArray(), self) | |
size = self.movie.scaledSize() | |
self.setGeometry(200, 200, size.width(), size.height()) | |
self.setWindowTitle(title) |
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 python2.6 | |
import urllib | |
from xml.dom import minidom | |
from optparse import OptionParser | |
import subprocess | |
import re | |
from HTMLParser import HTMLParser | |
import random |
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/python | |
import simplejson | |
import urllib | |
import sys | |
import time | |
import pylab | |
import matplotlib.pyplot as plt | |
def getRatios(subreddit): |
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 python2.7 | |
from BeautifulSoup import BeautifulSoup | |
from textwrap import TextWrapper | |
import requests | |
import collections | |
import sys | |
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
$> brew install -v field3d 2>&1 | |
==> Downloading https://github.com/imageworks/Field3D/archive/v1.3.2.tar.gz | |
Already downloaded: /Library/Caches/Homebrew/field3d-1.3.2.tar.gz | |
==> Verifying field3d-1.3.2.tar.gz checksum | |
tar xf /Library/Caches/Homebrew/field3d-1.3.2.tar.gz | |
==> Patching | |
patching file CMakeLists.txt | |
==> cmake -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/field3d/1.3.2 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DDOXYGEN_EXECUTABLE=NOTFOUND .. | |
-- The C compiler identification is Clang 5.1.0 | |
-- The CXX compiler identification is Clang 5.1.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
#!/bin/env python2.6 | |
import os | |
import sys | |
from scapy.all import * | |
def is_root(): | |
return os.getuid() == 0 | |
OlderNewer