This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Matlab code to produce PCA animations shown here: | |
| % http://stats.stackexchange.com/questions/2691 | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| % Static image | |
| clear all | |
| rng(42) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %pylab inline | |
| import numpy as np | |
| import pylab as plt | |
| import GPy | |
| import re | |
| def get_equation(kern): | |
| match = re.search(r'(math::)(\r\n|\r|\n)*(?P<equation>.*)(\r\n|\r|\n)*', kern.__doc__) | |
| return '' if match is None else match.group('equation').strip() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [[ "$#" -ne 1 ]]; then | |
| echo "Usage: ./toUTF8 <dir>" | |
| exit 1 | |
| fi | |
| OUTPUT_ENC=UTF-8 | |
| FOLDER=$1 | |
| ICONV="iconv" | |
| # Convert | |
| find $1 -type f -name "*" | while read fn; do |
#BTC Ticker Light This script updates one of your Philip's Hue lights to be either red or green depending on if the current price of bitcoin is below or above the 24 hour weighted price.
##Install Dependencies
easy_install install beautifulhue
##The Script
Save this to a python file after customizing your Philip's Hue Bridge ip, username, and light_id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Matlab cheat sheet | |
| % Author: Steven Van Vaerenbergh | |
| % Last version: https://gist.github.com/steven2358/7578242 | |
| %% SYSTEM | |
| % seed a random generator | |
| seed = 1; | |
| rng('default'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // create the audio context (chrome only for now) | |
| var context = new webkitAudioContext(); | |
| var audioBuffer; | |
| var sourceNode; | |
| var analyser; | |
| var javascriptNode; | |
| // get the context from the canvas to draw on | |
| var ctx = $("#canvas").get()[0].getContext("2d"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'mechanize' | |
| FIRST_NAME = 'FIRST_NAME' | |
| LAST_NAME = 'LAST_NAME' | |
| PHONE = 'PHONE' | |
| EMAIL = 'EMAIL@provider.com' | |
| PARTY_SIZE = 2 | |
| SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| function showLink() { | |
| document.getElementById("theLink").setAttribute("href","http://www.google.com"); //URL to show | |
| } | |
| function clickJack() { | |
| document.getElementById("theLink").setAttribute("href","http://www.bing.com"); //URL that it actually goes to | |
| } | |
| </script> | |
| <a id="theLink" href="#" onmouseover="showLink()" onmousedown="clickJack()">Click me</a> |
