These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.
raise ValueError("DEPRECATED/FROZEN - see https://github.com/kastnerkyle/tools for the latest") | |
# License: BSD 3-clause | |
# Authors: Kyle Kastner | |
# Harvest, Cheaptrick, D4C, WORLD routines based on MATLAB code from M. Morise | |
# http://ml.cs.yamanashi.ac.jp/world/english/ | |
# MGC code based on r9y9 (Ryuichi Yamamoto) MelGeneralizedCepstrums.jl | |
# Pieces also adapted from SPTK | |
from __future__ import division | |
import numpy as np |
import numpy as np | |
import subprocess as sp | |
import os | |
DEVNULL = open(os.devnull, 'w') | |
# load_audio can not detect the input type | |
def ffmpeg_load_audio(filename, sr=44100, mono=False, normalize=True, in_type=np.int16, out_type=np.float32): | |
channels = 1 if mono else 2 | |
format_strings = { | |
np.float64: 'f64le', |
import CoreMIDI | |
enum ChannelMessage { | |
case NoteOn(key: UInt8, velocity: UInt8) | |
case NoteOff(key: UInt8) | |
case ControlChange(controller: UInt8, value: UInt8) | |
func bytesForChannel(channel: Int) -> [UInt8] { | |
let status = { $0 | (UInt8(channel) & 0x0F) } | |
let removeMSB = { $0 & UInt8(0x7F) } |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from pyqtgraph.Qt import QtGui, QtCore | |
import numpy as np | |
import pyqtgraph as pg | |
from pyqtgraph.ptime import time | |
import serial | |
app = QtGui.QApplication([]) |
In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.
All the examples use demical types, except for the original value, which is automatically casted as a float.
To set the context of what we are working with, let's start with an original value.
As configured in my dotfiles.
start new:
tmux
start new with session name: