Skip to content

Instantly share code, notes, and snippets.

Avatar

Jason Heeris detly

View GitHub Profile
@detly
detly / weights.py
Created Jun 11, 2020
Gammatone weights
View weights.py
# Copyright 2014 Jason Heeris, jason.heeris@gmail.com
#
# This file is part of the gammatone toolkit, and is licensed under the 3-clause
# BSD license: https://github.com/detly/gammatone/blob/master/COPYING
"""
This module contains functions for calculating weights to approximate a
gammatone filterbank-like "spectrogram" from a Fourier transform.
"""
from __future__ import division
import numpy as np
View build.log
[2017-01-16 11:09:42] lb build
P: live-build 1:20161216
P: Building config tree for a debian/jessie/armhf system
[2017-01-16 11:09:43] lb bootstrap
P: Setting up cleanup function
[2017-01-16 11:09:43] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2017-01-16 11:09:43] lb bootstrap_debootstrap
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
View build.log
[2017-01-16 06:23:28] lb build
P: live-build 1:20161216
P: Building config tree for a debian/jessie/armhf system
[2017-01-16 06:23:28] lb bootstrap
P: Setting up cleanup function
[2017-01-16 06:23:28] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2017-01-16 06:23:28] lb bootstrap_debootstrap
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
View Raspbian Live To Do.md

Things to try:

  • Copy DTB (device tree) to root of live media
  • Copy everything from /boot in chroot to root of live media (why not?)
  • Move kernel image to kernel.img instead of using config.txt entry
    • What about the initrd?

Notes:

  • live-build binary hooks are executed in build/binary
View config
#!/bin/sh
set -e
GENERAL_BUILD_OPTIONS="--gzip-options '-9 --rsyncable' --security false"
lb config noauto ${GENERAL_BUILD_OPTIONS} "${@}"
View build_log
[2016-02-09 21:20:04] lb build
P: live-build 5.0~a11
P: Building config tree for a debian/wheezy/armhf system
[2016-02-09 21:20:04] lb bootstrap
P: Setting up cleanup function
[2016-02-09 21:20:05] lb bootstrap_cache restore
P: Restoring bootstrap stage from cache...
[2016-02-09 21:20:05] lb bootstrap_debootstrap
P: Begin bootstrapping system...
P: If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy.
@detly
detly / config
Created Jan 12, 2016
live-build config
View config
#!/bin/sh
set -e
if [ -z "${HAN_APT_CACHE}" ] ; then
MIR_PREFIX="http://"
else
MIR_PREFIX="${HAN_APT_CACHE}/"
fi
View gist:fdc430b44e74d5841f90
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
ylims = (-50, 150)
fig = plt.figure()
axes = fig.add_axes([0.12,0.1,0.83,0.85])
axes.set_yscale("linear")
axes.yaxis.set_major_locator(MultipleLocator(base=10))
axes.set_ylim(ylims)
View pexpect_eof_async2.py
#!/usr/bin/env python3
import asyncio
import sys
import pexpect
@asyncio.coroutine
def run():
p = pexpect.spawn('./weirdness')
while True: