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
//At the top of the file | |
#import "mandelbrot.cl.h" | |
//Inside the @autoreleasepool in int main() | |
//1 | |
dispatch_queue_t dq = gcl_create_dispatch_queue(CL_DEVICE_TYPE_GPU, NULL); | |
if (!dq) { | |
fprintf(stdout, "Unable to create a GPU-based dispatch queue.\n"); | |
exit(1); |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net/url" | |
"os" | |
"regexp" | |
"sort" | |
"strconv" |
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
local function scale(x, min1, max1, min2, max2) | |
return min2 + ((x - min1) / (max1 - min1)) * (max2 - min2) | |
end | |
local function distance(x1, y1, x2, y2) | |
return math.sqrt((x2 - x1) ^ 2 + (y2 - y1) ^ 2) | |
end | |
function radialGradient(radius) | |
local data = love.image.newImageData(radius * 2, radius * 2) |
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
extern crate minifb; | |
extern crate time; | |
use minifb::{Key, Scale, WindowOptions, Window}; | |
use std::f64::consts::PI; | |
fn circle(x: f64, y: f64, x_offset: f64, y_offset: f64, rad: f64) -> bool { | |
let x_distance = x - x_offset; | |
let y_distance = y - y_offset; |
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
// This file is automatically generated, but you can add your own variables here too. | |
// Syntax: SET_VAR(variable_name, default, low_limit, upper_limit, slider_exponent) | |
// In code you can read the variable with: GET_VAR(variable_name) | |
SET_VAR(tower_height, 520.0f, 0.0f, 3000.0f, 1.0f) | |
SET_VAR(KSpring, 520.0f, 1.0f, 3000.0f, 1.0f) | |
SET_VAR(WireRadius, 2.0f, 0.1f, 34.0f, 1.0f) | |
SET_VAR(volcanic_sun_x, 0.088000, -20.0f, 20.0f, 1.0f) | |
SET_VAR(mothership_sun_x, 2.026000, -5.0f, 5.0f, 1.0f) | |
SET_VAR(mothership_sun_y, 0.507000, -5.0f, 5.0f, 1.0f) | |
SET_VAR(wire_fog_exp, 0.0f, 0.0f, 100.0f, 1.0f) |
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
[package] | |
name = "procaddress" | |
version = "0.1.0" | |
authors = [] | |
[dependencies] | |
libc = "0.2.33" |
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
<!DOCTYPE html> | |
<script src="http://mbostock.github.com/d3/d3.v2.js?2.8.1"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<style> | |
body { | |
font: 10px sans-serif; | |
} | |
rect { |
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
Show hidden characters
// Place user-specific overrides in this file, to ensure they're preserved | |
// when upgrading | |
{ | |
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"] | |
} |
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
// installed Clojure packages: | |
// | |
// * BracketHighlighter | |
// * lispindent | |
// * SublimeREPL | |
// * sublime-paredit | |
{ | |
"word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?", | |
"paredit_enabled": 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
import requests | |
from collections import defaultdict | |
csv_prefix = "https://research.google.com/youtube8m/csv" | |
r = requests.get("{0}/verticals.json".format(csv_prefix)) | |
verticals = r.json() | |
block_urls = defaultdict(list) | |
count = 0 |
OlderNewer