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 | |
if [[ $# -lt 3 ]] || [[ $# -gt 4 ]]; then | |
cat > /dev/stderr <<EOD | |
usage: $(basename $0) <src> <dst> <text> [opacity] | |
src: input file to be watermarked | |
dst: output file with watermark applied | |
text: watermark text | |
opacity: transparency, 10-99 (light-dark) | |
EOD |
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 docutils import utils, nodes, core | |
document = utils.new_document('<source>') | |
document.append( | |
nodes.section('', # bogus section | |
nodes.section('', # level 2 section | |
nodes.title('', 'second level'), # <h2> | |
), | |
), | |
) |
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 csv | |
import itertools | |
import os | |
import subprocess | |
import sys | |
import termios | |
import tty | |
CONFIG_FILE = 'videos.cfg' | |
YOUTUBE = 'http://www.youtube.com/watch?v=%s' |
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
<?xml version='1.0' encoding='utf-8'?> | |
<MixxxControllerPreset mixxxVersion="" schemaVersion="1"> | |
<info/> | |
<controller id="VFX"> | |
<scriptfiles> | |
<file functionprefix="MixvibesVFX" filename="Mixvibes-VFXControl-scripts.js"/> | |
</scriptfiles> | |
<controls> | |
<control> | |
<group>[Channel1]</group> |
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 | |
# encoding: utf-8 | |
from __future__ import division | |
from turtle import Turtle | |
import math | |
import random | |
class ShapefulTurtle(Turtle): |
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 | |
""" | |
Task: implement a rudimentary HTTP server in Python. It needs to support the | |
GET method to serve static HTML files. Requests to ``/`` shall be | |
automatically resolved to ``/index.html``. All invalid requests shall be | |
answered with a ``400 Bad Request``. Queries on a non-existing file shall | |
terminate in a ``404 Not Found``. The serving port shall be passed through the | |
command line. The server must be threaded. Use the socket APIs. | |
This implementation is *just a single Python expression,* and only 512 bytes. |
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/sh | |
# University of Potsdam WLAN-over-VPN wrapper | |
VPNUSER=$(read -p "Username:") | |
#VPNUSER=johndoe | |
WLANIFACE=wlan0 | |
VPNIFACE=zeik.tun0 | |
# kill all remaining Cisco AnyConnect VPNs | |
pkill openconnect |
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 django.forms.forms import BoundField | |
boundfield_as_widget = BoundField.as_widget | |
def as_widget(self, widget=None, attrs=None, only_initial=False): | |
if attrs is None: | |
attrs = {} | |
attrs['placeholder'] = self.label | |
return boundfield_as_widget(self, widget=widget, attrs=attrs, | |
only_initial=only_initial) | |
BoundField.as_widget = as_widget |
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 -*- | |
""" | |
sphinx.builders.interactive | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
Drop to an interactive shell for debugging. | |
:copyright: Copyright 2010 by the Sphinx team, see AUTHORS. | |
:license: BSD, see LICENSE for details. | |
""" |