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
oldsums=$(sed -n '/^.*sums=(.*/,/.*)/p' PKGBUILD); newsums=$(makepkg -g); sed -i "/^.*sums=(.*/,/.*)$/y/${oldsums/$'\n'/\\n}/${newsums/$'\n'/\\n}/" PKGBUILD |
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 | |
from sqlalchemy import create_engine | |
from sqlalchemy.ext.declarative import declarative_base | |
from sqlalchemy import Column, Integer, String | |
from sqlalchemy.orm import sessionmaker | |
engine = create_engine('sqlite:///:memory:', echo=True) | |
Session = sessionmaker(bind=engine) | |
Base = declarative_base() |
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 StringIO import StringIO | |
from PIL import ImageFileIO | |
import matplotlib.pyplot as plt | |
from reportlab.platypus import Image | |
buf = StringIO() | |
#plot your graphs | |
plt.save_figure(buf, format="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
#!/usr/bin/env python2 | |
#-*- coding=utf-8 -*- | |
# © 2013 Mark Harviston, BSD License | |
from __future__ import absolute_import, unicode_literals, print_function | |
""" | |
Qt data models that bind to SQLAlchemy queries | |
""" | |
from PyQt4 import QtGui | |
from PyQt4.QtCore import QAbstractTableModel, QVariant, Qt | |
import logging # noqa |
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 | |
# | |
# Corey Goldberg, 2013 | |
# | |
# Python 2.7 | |
"""validate and analyze dimensions of image files. Supports: PNG, JPG, GIF.""" |
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 feedparser | |
f=open('blogroll.html','w') | |
f.write("<html>\n<head>\n<title>Blogroll</title>\n</head>\n<body>"); | |
blogs=["http://programminggenin.blogspot.com/feeds/posts/default","http://djangolearner.blogspot.com/feeds/posts/default"]; | |
for blog in blogs : | |
feed=feedparser.parse(blog) | |
f.write('<a href="%s">%s</a>\n'% (feed.feed.link,feed.feed.title)); | |
f.write('<ul>\n'); | |
for e in feed.entries: |
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
#vsenc.py | |
#coding: utf-8 | |
import sys | |
from subprocess import Popen, PIPE | |
import vapoursynth as vs | |
x264_binary_path = 'D:/tools/x86/x264.exe' | |
avconv_binary_path = 'D:/tools/x86/avconv.exe' |
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 | |
# | |
# Python Timer Class - Context Manager for Timing Code Blocks | |
# Corey Goldberg - 2012 | |
# | |
from timeit import default_timer | |
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
os | |
from flask_extended import Flask | |
app = Flask(__name__) | |
app.config.from_yaml(os.join(app.root_path, 'config.yml')) |