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 | |
# -*- coding: utf-8 -*- | |
"""List all preset URIs of an LV2 plugin with the given URI.""" | |
import sys | |
import lilv | |
PRESET_NS = 'http://lv2plug.in/ns/ext/presets' | |
RDFS_NS = 'http://www.w3.org/2000/01/rdf-schema' |
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 python3 | |
"""Listen to and print JACK client/port meta-data changes.""" | |
import jack | |
PROPERTY_CHANGE_MAP = { | |
jack.PROPERTY_CREATED: 'created', | |
jack.PROPERTY_CHANGED: 'changed', | |
jack.PROPERTY_DELETED: 'deleted' |
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 | |
# -*- coding: utf-8 -*- | |
# | |
# timebase.py | |
# | |
"""A simple JACK timebase master.""" | |
import argparse | |
import sys | |
import time |
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
/* | |
* alsa-query.c - print hardware capabilities of ALSA device | |
* | |
* compile with: gcc -o alsa-query alsa-query.c -lasound | |
*/ | |
#include <stdio.h> | |
#include <alsa/asoundlib.h> | |
#define ARRAY_SIZE(a) (sizeof(a) / sizeof *(a)) |
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 -*- | |
"""A very basic general graph library.""" | |
from __future__ import print_function | |
__all__ = ('Edge', 'Graph', 'Node') | |
import uuid | |
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 | |
# -*- coding: utf-8 -*- | |
# | |
# gh-get.py | |
# | |
"""Download a single file from a GitHub repository.""" | |
import shutil | |
from os.path import expanduser |
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 -*- | |
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. |
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 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 |
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 | |
# -*- 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.""" |
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 | |
"""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 |