Skip to content

Instantly share code, notes, and snippets.

Pedro Kroger kroger

Block or report user

Report or block kroger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ex1.5.py
def p():
return p()
def test(x, y):
return 0 if x == 0 else y
test(0, p())
View process-latex
s/\quarternote= /\quarternote=/g
s/\quarternote /\quarternote{} /
s/\textbf{Exercise/\par \\textbf{Exercise/g
s/\textbf{Track/\par \\textbf{Track/g
@kroger
kroger / code.tex
Last active Aug 29, 2015
Printing Python Code With Latex
View code.tex
\newcommand{code}[2]{
hrulefill
subsection*{#1}
lstinputlisting{#2}
vspace{2em}
}
@kroger
kroger / header.tex
Created Jun 30, 2014
python quick ref
View header.tex
\newcommand{\header}[1]{
\begin{tikzpicture}
\node [fill=shade,rounded corners=5pt]
{
\parbox{.95\linewidth}{
\large
\textcolor{blue}{\sf \textbf{\raisebox{-15pt}{#1}}}
\vspace*{1ex}
}
};
@kroger
kroger / cond_ex.py
Last active Aug 29, 2015
harmonize-scale
View cond_ex.py
cond = cond_interval_count(((0, 1), (1, 2)))
filter_sets(cond)
@kroger
kroger / pascal-triangle
Last active Aug 29, 2015
pascal-triangle
View pascal-triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
@kroger
kroger / convert.sh
Last active May 7, 2018
midi-to-mp3
View convert.sh
fluidsynth -F output.wav ~/Soundfonts/my-soundfont.sf2 myfile.midi
lame output.wav
View autoimage
.. autoimage:: notation3.png
:scale-html: 40
:scale-latex: 80
@kroger
kroger / gist:9962764
Created Apr 3, 2014
Convert ogg to mp3
View gist:9962764
#!/bin/bash
for file in */*.ogg
do
echo "* Converting: $name"
name=${file%%.*}
ogg123 -d wav -f - $file | lame -h -m s -b 192 - "$name.mp3"
done
@kroger
kroger / midi2mp3
Last active Jun 8, 2019
Convert MIDI files to MP3 using fluidsynth. See
View midi2mp3
#!/usr/bin/env bash
SOUNDFONT=/Users/kroger/Dropbox/Sfonts/BOPLMEVF16.sf2
TMPDIR=/tmp
if [[ ! -f $SOUNDFONT ]]
then
echo "Couldn't find the soundfont: $SOUNDFONT"
exit 1
You can’t perform that action at this time.