This file contains 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
#include "ofApp.h" | |
//-------------------------------------------------------------- | |
void ofApp::setup(){ | |
randomSeed = ofRandom(100000); | |
for(int i = 0; i < COLOR_SOURCES; i++) { | |
ofImage img; | |
img.loadImage("color-source/color-source-" + ofToString(i) + ".jpg"); | |
img.resize(CANVAS_WIDTH, CANVAS_HEIGHT); |
This file contains 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
public boolean isValidEmailAddress(String email) { | |
String ePattern = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"; | |
java.util.regex.Pattern p = java.util.regex.Pattern.compile(ePattern); | |
java.util.regex.Matcher m = p.matcher(email); | |
return m.matches(); | |
} |
This file contains 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
var pigs = [{ | |
name: 'Doug', | |
}, { | |
name: 'Larry' | |
}, { | |
name: 'Virgil' | |
}]; | |
var houses = { | |
straw: { |
This file contains 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
# Image series to video | |
ffmpeg -y -i %05d.tif -b:v 10M -vcodec mpeg4 video.mov | |
# Movie to GIF | |
ffmpeg -i input.mov -r 10 -pix_fmt rgb24 -vf scale=500:500 output.gif | |
# Webm Encoding |
This file contains 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
app.controller('AppCtrl', function($scope, $q, $http) { | |
var reqs = [ | |
$http.get('http://10.40.110.202/api/videos/'), | |
$http.get('http://10.40.110.202/api/videos/'), | |
$http.get('http://10.40.110.202/api/videos/') | |
]; | |
$q.all(reqs).then(function(data){ | |
console.log(data[0]); // Response from the 1st request |
This file contains 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
<!-- | |
http://www.provisio.com/helpconsole/SiteKiosk%20Help/en-US/add_programs.htm | |
--> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
function Init_ScriptInterface() { | |
window.external.InitScriptInterface(); | |
} | |
function ExecuteProg() { |
This file contains 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
Base URL: http://nwhof.org/champions/public/hofRPC.php | |
Required Post Params | |
id: Doesn't seem to matter what it is. Just leave it at 1. | |
method: A method defined in hallOfFameFrontEnd.php | |
params: An array of params used by the method | |
Example call: |
This file contains 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
import urllib2 | |
import json | |
import csv | |
def write_to_csv(url): | |
response = urllib2.urlopen(url) | |
track_list = json.load(response) | |
for song in track_list: |
This file contains 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
import urllib2 | |
import json | |
import csv | |
import time | |
import math | |
from datetime import datetime | |
from datetime import timedelta | |
epoch = datetime.utcfromtimestamp(0) |
This file contains 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
import spotipy | |
import spotipy.util as util | |
import time | |
import urllib | |
import urllib2 | |
import json | |
from datetime import datetime | |
from datetime import timedelta | |