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 example data set (not provided) is over 100,000 records. The following code calculates 30-day moving | |
// averages (over 3 million aggregations) using Crossfilter and the Reductio helper library. It takes about | |
// 3 seconds for the initial aggregation in Chrome Canary (42.0.2291.0) on a 2.3 GHz Core i7, mid-2012 rMBP. | |
d3.csv('dataJan-29-2015.csv', function (data) { | |
//convert the iso timestamps to JS Dates | |
var parseDate = d3.time.format("%Y-%m-%dT%H:%M:%S").parse; | |
var ymd = d3.time.format("%Y-%m-%d"); | |
data.forEach(function(d) { |
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
#ifndef NOISE_SIMPLEX_FUNC | |
#define NOISE_SIMPLEX_FUNC | |
/* | |
Description: | |
Array- and textureless CgFx/HLSL 2D, 3D and 4D simplex noise functions. | |
a.k.a. simplified and optimized Perlin noise. | |
The functions have very good performance | |
and no dependencies on external data. |
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
/* OpenSimplex Noise in C# | |
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19 | |
* and heavily refactored to improve performance. */ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
namespace NoiseTest |
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 loki = require('lokijs'), | |
db = new loki('test.json'), | |
db2 = new loki('test.json'); | |
var users = db.addCollection('users'); | |
users.insert({ | |
name: 'joe' | |
}); | |
users.insert({ | |
name: 'john' |
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
## | |
# @server studio | |
# @host hackisition.com | |
# @desc nginx host rules | |
# @author Julien Le Coupanec <julien@gentlenode.com> | |
## | |
# HTTP Server | |
server { | |
listen 80; |
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
/* | |
* OpenSimplex (Simplectic) Noise in Javascript. | |
* original by Kurt Spencer (https://gist.github.com/KdotJPG/b1270127455a94ac5d19) | |
* ported to Javascript (ASM) by Ryan Guthrie | |
* | |
*/ | |
function OpenSimplexASM(stdlib, foreign, heap ) { | |
"use asm"; |
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
/* | |
* OpenSimplex (Simplectic) Noise Test for Unity (C#) | |
* This file is in the Public Domain. | |
* | |
* This file is intended to test the functionality of OpenSimplexNoise.cs | |
* Attach this script to a GameObject with mesh (eg a Quad prefab). | |
* Texture is updated every frame to assist profiling for performance. | |
* Using a RenderTexture should perform better, however using a Texture2D | |
* as an example makes this compatible with the free version of Unity. | |
* |
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
/** | |
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex") | |
* | |
* More language ports, as well as legacy 2014 OpenSimplex, can be found here: | |
* https://github.com/KdotJPG/OpenSimplex2 | |
*/ | |
public class OpenSimplex2S { | |
private static final long PRIME_X = 0x5205402B9270C86FL; |
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 java.util.Arrays; | |
import java.util.HashSet; | |
public class BlockStorage { | |
private static final int DATA_SHIFT = 12; | |
private static final int EMITTEDLIGHT_SHIFT = DATA_SHIFT + 4; | |
private static final int SKYLIGHT_SHIFT = EMITTEDLIGHT_SHIFT + 4; | |
private static final int EMPTY_ENTRY = -1; | |
private byte[] index = new byte[2048]; |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Serialization; | |
namespace UnityEngine.UI | |
{ |