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
# Display Port Audio Test Program | |
# ------------------------------- | |
# | |
# Goal: | |
# To play sound through the attached monitor, | |
# connected using a display port cable, | |
# without using a passive adapter. | |
# Purpose: | |
# To aid in manual testing of audio for hardware certification | |
# Requirements: |
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 | |
class Meta(type): | |
def __new__(mcls, name, bases, ns): | |
ns['_meta_for'] = name | |
return type.__new__(mcls, name, bases, ns) | |
class Base(object): |
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 __future__ import absolute_import, print_function, unicode_literals | |
from collections import defaultdict, namedtuple | |
from gettext import gettext as _, ngettext | |
from unittest import TestCase | |
from unittest.loader import TestLoader | |
from unittest.result import TestResult | |
from unittest.suite import TestSuite |
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 | |
# Producers | |
def text_producer() -> str: | |
yield "I write" | |
yield "some text" | |
yield "some of which zażółć gęślą jaźń is in Polish" |
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
/* | |
Alleged vboxfs bug test program. | |
Copyright (c) 2013, Zygmunt Krynicki | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: |
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 | |
junk=$(mktemp -d --suffix=.plainbox-junk) | |
logs=$(mktemp -d --suffix=.plainbox-logs) | |
echo "Going to temporary place: $junk" | |
echo "Log files and everything else: $logs" | |
cd $session | |
for job in $(plainbox special --list-jobs); do | |
job_mangled=$(echo $job | sed 's!/!_!g') | |
echo "Running $job... (output in $logs/$job_mangled.*)" | |
time plainbox run -r $job -o $logs/$job_mangled.json -f json >$logs/$job_mangled.out 2>$logs/$job_mangled.err |
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
# TI LaunchPad Stellaris board (ICDI external programmer) | |
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0660", GROUP="plugdev", |
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 | |
# Basic backlight data collection script for Lantern | |
# Written by Zygmunt Krynicki <zygmunt.krynicki@canonical.com> | |
set -x | |
id=$(cat /proc/sys/kernel/random/uuid) | |
dest=$(mktemp -d --suffix=-lantern) | |
lspci > "$dest/lspci" | |
lsmod > "$dest/lsmod" | |
uname -a > "$dest/uname" | |
if [ -e /etc/os-release ]; then |
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 JobCollection: | |
@signal | |
def job_added(self, job): | |
""" signal sent whenever a job is added """ | |
class SomethingElse: | |
def __init__(self, collection): | |
col.job_added.connect(on_job_added) | |