Instantly share code, notes, and snippets.

View gh-get.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# gh-get.py
#
"""Download a single file from a GitHub repository."""
import shutil
from os.path import expanduser
View urlparse.py
# -*- coding: utf-8 -*-
def parse_qsl(qs, keep_blank_values=False, strict_parsing=False,
encoding='utf-8', errors='replace'):
"""Parse a query given as a string argument.
Arguments:
qs: percent-encoded query string to be parsed. May be a unicode
string or a UTF-8 encoded byte-string.
View OPNplug.desktop
[Desktop Entry]
Name=OPNplug
Name[fr]=OPNplug
Comment=FM Yamaha OPN2 synthesizer for ADLMIDI
Comment[fr]=Synthétiseur FM Yamaha OPN2 pour ADLMIDI
TryExec=OPNplug
Exec=OPNplug
Icon=OPNplug
Type=Application
Categories=AudioVideo;Audio;Music;Midi
View sendmail-smtp.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Simple command line mailer.
Send text-only email via SMTP with message text read from stdin to all email addresses given as
arguments.
"""
import sys
View PKGBUILD-gimp-plugin-bimp.sh
# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: Lara Maia <lara@craft.net.br>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
_pkgname=bimp
pkgname=gimp-plugin-bimp
pkgver=1.18
pkgrel=1
pkgdesc='Batch Image Manipulation Plugin for GIMP.'
arch=('x86_64' 'i686')
View example_program_change_map.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Example script which maps program change numbers."""
from miditk.smf import MidiFileReader, MidiFileWriter
class ProgramChangeMapper(MidiFileWriter):
"""Change program number of Program Change events according to given mapping."""
View file2h.py
#!/usr/bin/env python
"""Convert a file to a C char array representation.
Outputs a C header on standard output.
"""
from sys import argv, exit, stdout
from os.path import basename, isfile
View PKGBUILD
# Maintainer: webmeister <aur -dot- 20 -dot- webmeister -at- spamgourmet -dot- com>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
pkgname=mu-editor
epoch=1
pkgver=1.0.0
pkgrel=1
pkgdesc='A simple Python editor for beginner programmers'
arch=('any')
url='https://codewith.mu/'
View PKGBUILD
# $Id$
# Maintainer: Peter Strapp <peter at strapp.co.uk>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
_projname='pigpio'
_pkgname="python-${_projname}"
pkgname="${_pkgname}-git"
pkgver=r183.934874b
pkgrel=1
pkgdesc="A C and Python library for controlling GPIOs on a Raspberry Pi"
View PKGBUILD-juce.sh
# Maintainer: Gergely Imreh <imrehg@gmail.com>
pkgname=juce
pkgdesc='Cross-platform C++ framework, including the Projucer C++ editor'
pkgver=5.3.1
pkgrel=1
arch=('i686' 'x86_64')
url='https://www.juce.com/'
license=('custom')
depends=('hicolor-icon-theme' 'webkit2gtk' 'zenity')