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 SomeModelForm(forms.ModelForm): | |
def __init__(self, *args, **kwargs): | |
super(MessageModelForm, self).__init__(*args, **kwargs) | |
for f in self.fields.values(): | |
if isinstance(f.widget, widgets.CheckboxInput): | |
f.widget.attrs.update({'class': "checkbox inline"}) |
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
# Superceded by this: https://gist.github.com/stuaxo/9308767 | |
import Queue | |
import sys | |
import time | |
import select | |
import tty | |
import termios | |
from threading import Thread |
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 random | |
random.seed(1) | |
size(550,450) | |
background(1,1,1) | |
colors=ximport("colors") | |
clr3 = colors.named_color("#DD7100") | |
clr4 = colors.named_color("yellowy") |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
vlc -I dummy -vvv %1 --sout=#transcode{acodec="mp3",ab="512","channels=2"}:standard{access="file",mux="raw",dst="%~n1.mp3"} vlc://quit |
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
if __name__ == '__main__': | |
try: | |
for name in ['cairo', 'gtk', 'pygtk', 'hello']: | |
try: | |
m = __import__(name) | |
print '%s: %s' % (name, m) | |
except Exception as e: | |
print '%s: %s' % (e.__class__.__name__, str(e)) | |
print '' |
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
""" | |
Install a file into the root of sitepackages on windows as well as linux. | |
Under normal operation on win32 path_to_site_packages | |
gets changed to '' which installs inside the .egg instead. | |
""" | |
import os | |
from distutils import sysconfig |
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
./field_linux64_mozilla.sh | |
/home/stu/projects/external/Field/Contents/linux/.. | |
rm: cannot remove ‘../core/classes/org/eclipse/swt’: No such file or directory | |
Listening for transport dt_socket at address: 5555 | |
hello | |
## trampoline <class field.bytecode.protect.StandardTrampoline:sun.misc.Launcher$AppClassLoader@6f171e30> | |
warning: wildcard path </home/marc/fieldwork/personal/classpath/**> is not a directory or does not exist | |
warning, path </home/stu/projects/external/Field/Contents/linux/../extensions/../extras/syphon/bin>added to classpath through Field-RedirectionPath inside extension /home/stu/projects/external/Field/Contents/linux/../extensions/syphon.mf doesn't exist | |
warning, path </home/stu/projects/external/Field/Contents/linux/../extensions/../extras/gstreamer/bin>added to classpath through Field-RedirectionPath inside extension /home/stu/projects/external/Field/Contents/linux/../extensions/gstreamer.mf doesn't exist | |
warning, path </home/stu/projects/external/Field/Contents/linux/../extensions/.. |
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
try: | |
import gi | |
print('using gi') | |
except ImportError: | |
import pgi | |
pgi.install_as_gi() | |
print('using pgi') | |
from gi.repository import Gtk, Gdk, cairo, Pango, PangoCairo | |
import math |
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/bash | |
# Either pass in the dest directory, or will install to current dir | |
# from | |
# https://gist.github.com/bongole/304a006a5386220246aa | |
for arch in armv7-a x86 x86_64; do | |
echo "Create standalone for $arch" | |
case $arch in | |
arm*) |
OlderNewer