A minimal HTTP server in python. It sends a JSON Hello World for GET requests, and echoes back JSON for POST requests.
python server.py 8009
Starting httpd on port 8009...
curl http://localhost:8009
{"received": "ok", "hello": "world"}
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
| (ns particles.core) | |
| (def display (.getElementById js/document "display")) | |
| (def context (.getContext display "2d")) | |
| (def damping 0.999) | |
| (def max-particles 250) | |
| (def line-width 2) | |
| (def app-state (atom {:width (.-innerWidth js/window) | |
| :height (.-innerHeight js/window)})) |
Open Computing Language (OpenCL) is a language and framework for writing computationally intensive kernels that run accross heterogenious platforms, including GPUs, CPUs, and perhaps other more esoteric devices.
Intel provides an OpenCL implementation for Intel CPUs, but there's not a lot of instructions on how to get it set up. Here's what I did.
- Download the Intel® SDK for OpenCL* Applications XE 2013 from the Intel website, here http://software.intel.com/en-us/vcsource/tools/opencl-sdk-xe. The download is a tarball -- the one I got is called
intel_sdk_for_ocl_applications_2013_xe_sdk_3.0.67279_x64.tgz - Unpack the tarball and cd into the new directory
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
| julia> airline_array = readdlm("/Users/randyzwitch/airline/1987.csv", ','); | |
| julia> size(airline_array) | |
| (1311827,29) | |
| julia> typeof(airline_array) | |
| Array{Any,2} |
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
| git shortlog -e -s -n |
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
| #include <string> | |
| #include <ctime> | |
| #include <msgpack.hpp> | |
| struct message | |
| { | |
| std::string tag; | |
| std::time_t time; | |
| std::string text; | |
| MSGPACK_DEFINE(tag, time, text); |
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
| # Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/ | |
| # Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date. | |
| ################################################################## | |
| Installing and Configuring SmartOS on a budget server (with a /29) | |
| ################################################################## | |
| # if you find this gist useful, please star it | |
| # please be aware that budget hosting companies usually cut corners somewhere, |