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
from flask import Flask, Response | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
return Response('<h1>Hello, world.</h1>',mimetype='text/html') | |
if __name__=='__main__': | |
app.run(host='0.0.0.0',port=8080,debug=True) |
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 <iostream> | |
#include <string> | |
#include <boost/thread.hpp> | |
#include <boost/asio.hpp> | |
#define N_THREADS 4 | |
#define N_JOBS 10 | |
/* compile on Ubuntu using | |
g++ par.cpp -lboost_thread -lboost_system |
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
#!/bin/sed -e | |
1i digraph foo { | |
s/\([[:alnum:]]*\) \([[:alnum:]]*\) \([[:alnum:]]*\)/\1 -> \3 [label="\2"];/ | |
$a } |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
( | |
Routine({ | |
SynthDef("buzz", {arg bufnum; | |
var dust, pitch, density, amp, env, pan, osc, gate; | |
var brown1, brown2, brown3, brown4, brown5; | |
var pitch1, pitch2; | |
pitch1 = IRand(10,128); | |
pitch2 = IRand(10,128); | |
brown1 = LFNoise2.kr(LFNoise2.kr(0.1, 10).abs + 0.1, LFNoise2.kr(0.1, 1.0).abs).abs; | |
brown2 = LFNoise2.kr(LFNoise2.kr(0.1, 10).abs + 0.1, LFNoise2.kr(0.1, 1.0).abs).abs; |
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
ECHO OFF | |
cd /d %~dp0 | |
for /f "tokens=2* delims= " %%F IN ('vagrant status ^| find /I "default"') DO (SET "STATE=%%F%%G") | |
ECHO Close this window if it remains open, and http://localhost:8081 is responsive | |
IF "%STATE%" NEQ "saved" ( | |
ECHO Starting Vagrant VM from powered down state... | |
vagrant up | |
) ELSE ( |
NewerOlder