Skip to content

Instantly share code, notes, and snippets.

@matael
matael / test.py
Created August 14, 2017 13:20
Test fluidsynth
import time
import fluidsynth
fs = fluidsynth.Synth()
fs.start(driver='alsa', midi_driver='alsa_seq')
sfid = fs.sfload(b"/usr/share/soundfonts/FluidR3_GM.sf2")
fs.program_select(0, sfid, 0, 0)
fs.noteon(0, 60, 30)
### Keybase proof
I hereby claim:
* I am Matael on github.
* I am matael (https://keybase.io/matael) on keybase.
* I have a public key whose fingerprint is 856D 8A2D 6F79 4FBC 2CDD 125B 9AE0 9B2A 9506 E10E
To claim this, I am signing this object:
class GenericMetric:
def __init__(self):
pass
def score(self):
raise NotImplementedError
# etc...
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@matael
matael / battery
Created May 8, 2015 17:46
Battert
#!/bin/bash
now=`cat /sys/class/power_supply/BAT0/charge_now`;
full=`cat /sys/class/power_supply/BAT0/charge_full`;
echo "Battery charge : $(($now*100/$full))%";
package Combot;
use strict;
use warnings;
use Net::GitHub::V3;
use DBI;
use Redis; # for authorizations
use LWP::UserAgent; # for spaceapi requests
\begin{tikzpicture}[>=stealth]
\def\r{.3};
\def\M{1.5};
% hp
\draw (0,-.3) rectangle (.2,.3);
\draw (.2,-.3) -- ++(.2,-.2) -- ++(0,1) -- ++(-.2,-.2);
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@matael
matael / gist:40edbd008e96ff760c1e
Created February 9, 2015 14:05
out of trait.m
>> trait
Nombre de max retenus=5
Selectionner avec la souris les Nmax intervalles autour des pics (2Nmax valeurs)
frmean =
1.0e+03 *
0.0189 0.2627 0.5091 0.8411 1.2545
@matael
matael / Untitled0.ipynb
Created February 2, 2015 10:43
Des fois,... j'ai la flemme
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.