The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
from __future__ import print_function | |
import os | |
import shutil | |
import stat | |
import subprocess | |
import time | |
import numpy as np | |
from scipy.io import wavfile | |
import re | |
import glob |
from __future__ import print_function | |
import subprocess | |
import shutil | |
import os | |
import stat | |
import time | |
# This script looks extremely defensive, but *should* let you rerun at | |
# any stage along the way. Also a lot of code repetition due to eventual support | |
# for "non-blob" install from something besides the magic kk_all_deps.tar.gz |
# This is a simplified script of https://gist.github.com/keunwoochoi/f0ea2c49355fc21e93dad88d210efcdd | |
# Usage: 1. Modify the font path in the line with [ss]. | |
# In my case, I copied and pasted CircularSpAraTTBlack.ttf to the same folder. | |
# 2. Put the wav file in the same folder, say, audio_file.wav | |
# 3. run $./spectrogram_scrolling_video.sh audio_file.wav | |
# 4. You'll see audio_file.mkv in the same folder! | |
# | |
# Based on example here https://trac.ffmpeg.org/wiki/Encode/YouTube | |
text=$(basename $1 .wav) | |
ffmpeg -i $1 -filter_complex \ |
# Authors: Kyle Kastner | |
# License: BSD 3-clause | |
import theano.tensor as T | |
import numpy as np | |
import theano | |
class rmsprop(object): | |
""" | |
RMSProp with nesterov momentum and gradient rescaling |
# Copyright (C) 2013 Istituto per l'Interscambio Scientifico I.S.I. | |
# You can contact us by email (isi@isi.it) or write to: | |
# ISI Foundation, Via Alassio 11/c, 10126 Torino, Italy. | |
# | |
# This work is licensed under a Creative Commons 4.0 | |
# Attribution-NonCommercial-ShareAlike License | |
# You may obtain a copy of the License at | |
# http://creativecommons.org/licenses/by-nc-sa/4.0/ | |
# | |
# This program was written by Andre Panisson <panisson@gmail.com> at |
import pyeliza | |
class Eliza: | |
aliases = 'eliza' | |
description = 'Virtual therapist' | |
_therapist = pyeliza.eliza() | |
def execute(self, expression, context): | |
''' | |
>>> from mock import Mock |
#!/bin/bash | |
# Inspired on: https://www.bountysource.com/issues/31269729-libwx_osx_cocoau-3-1-dylib-not-found | |
KICAD_LIBS_TOFIX="libwx_osx_cocoau_gl-3.0.0 libwx_osx_cocoau_adv-3.0.0 libwx_osx_cocoau_aui-3.0.0 libwx_osx_cocoau_adv-3.0.0 libwx_osx_cocoau_html-3.0.0 libwx_osx_cocoau_core-3.0.0 libwx_osx_cocoau_stc-3.0.0 libkicad_3dsg.2.0.0 libGLEW.2.0.0 libcairo.2 libpixman-1.0 libwx_baseu_net-3.0.0 libwx_baseu-3.0.0 libwx_baseu_xml-3.0.0" | |
#KICAD_LIBS_TOFIX=`find /Applications/Kicad/kicad.app/Contents/Frameworks/ -iname *.dylib | xargs otool -L | grep executable_path | awk '{print $1}' | awk -F'/' '{print $4}'` | |
for kicadlib in $KICAD_LIBS_TOFIX; | |
do | |
echo "Fixing ${kicadlib} broken path on pcbnew..." |
import theano | |
import theano.tensor as T | |
import numpy as np | |
import cPickle | |
import random | |
import matplotlib.pyplot as plt | |
class RNN(object): | |
def __init__(self, nin, n_hidden, nout): |