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 <Wire.h> | |
#define CTRL_REG1 0x20 | |
#define CTRL_REG2 0x21 | |
#define CTRL_REG3 0x22 | |
#define CTRL_REG4 0x23 | |
#define CTRL_REG5 0x24 | |
// I2C address of the L3G4200D. | |
// Use I2C scanner to find this value! |
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
<head> | |
<title>PropSlam Mumble Counter</title> | |
<link href='http://fonts.googleapis.com/css?family=Inconsolata' rel='stylesheet' type='text/css'> | |
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> | |
<style> | |
body { | |
font-family: 'Inconsolata', sans-serif; |
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
{ | |
"name": "(TODO) Simple Ship Mk I", | |
"parts": [ | |
{ | |
"type": "brain", | |
"pos": [0,0] | |
}, | |
{ | |
"type": "hull", | |
"pos": [-1,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
local turnLeft = false | |
function Update() | |
-- Store our angular velocity in a variable to make it easier to use | |
local angVel = gyro:AngVel() | |
if ranger:Range() > 0 then | |
-- We see another ship, stop spinning, start ramming, | |
-- and remember which way to turn if we lose it again |
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 random | |
import time | |
import copy | |
# Parameters | |
NUM_COLORS = 4 | |
NUM_ROWS = 17 | |
NUM_COLS = 17 |
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
NUM SOLS PER GEN,% SELECTION,% CHILDREN,% RANDOM,MUTATION,CROSSOVER BUFFER,PRESERVE,AVERAGE T2S | |
10,0.2,0.8,-2.22E-16,0.05,0,0,0.023999989 | |
10,0.2,0.6,0.2,0.05,0.1,1,0.024999976 | |
10,0.2,0.7,0.1,0.05,0,0,0.024999976 | |
10,0.2,0.8,-2.22E-16,0.05,0.15,1,0.025250137 | |
10,0.3,0.6,0.1,0.05,0.15,2,0.0255 | |
15,0.2,0.8,-2.22E-16,0.05,0.05,2,0.025500059 | |
10,0.2,0.6,0.2,0.05,0.05,1,0.025749981 | |
10,0.2,0.7,0.1,0.05,0.1,0,0.025750041 | |
10,0.2,0.8,-2.22E-16,0.05,0.05,0,0.026250064 |
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; | |
namespace System.Collections.Generic | |
{ | |
public static class MinMaxBy | |
{ | |
public static T MinBy<T>(this IEnumerable<T> list, Func<T, IComparable> selector) | |
{ | |
IComparable lowest = null; | |
T result = default(T); |
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
const demofile = require('demofile'); | |
const fs = require('fs'); | |
const _ = require('lodash'); | |
const DEMO_FILE = 'astralis-vs-liquid-inferno.dem'; | |
let distance3 = (p1, p2) => { | |
return Math.sqrt( Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2) + Math.pow(p2.z - p1.z, 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
const fs = require('fs'); | |
const _ = require('lodash'); | |
const D3Node = require('d3-node'); | |
const ATTACKS_FILE = 'inferno.json'; | |
const DAMAGE_ALPHA_SCALE = 0.9; | |
const BORDER = 2048; | |
const data = JSON.parse(fs.readFileSync(ATTACKS_FILE)); | |
const attacks = data.attacks; |
This file has been truncated, but you can view the full file.
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
{"attacks":[{"time":56.8203125,"attacker":{"pos":{"x":2595.98779296875,"y":-120.5957260131836,"z":84.03125},"team":"CT","name":"fer"},"victim":{"pos":{"x":1990.938232421875,"y":146.4513397216797,"z":173.1717071533203},"team":"T","name":"shox"},"amount":19,"weapon":"weapon_usp_silencer"},{"time":57.1796875,"attacker":{"pos":{"x":2595.98779296875,"y":-120.5957260131836,"z":84.03125},"team":"CT","name":"fer"},"victim":{"pos":{"x":1967.9163818359375,"y":175.4272918701172,"z":196.3261260986328},"team":"T","name":"shox"},"amount":15,"weapon":"weapon_usp_silencer"},{"time":57.890625,"attacker":{"pos":{"x":1986.9085693359375,"y":237.31130981445312,"z":160.03125},"team":"T","name":"shox"},"victim":{"pos":{"x":2590.4619140625,"y":-130.273681640625,"z":84.03125},"team":"CT","name":"fer"},"amount":95,"weapon":"weapon_glock"},{"time":60.6875,"attacker":{"pos":{"x":2541.727294921875,"y":-81.61331939697266,"z":84.03125},"team":"CT","name":"fer"},"victim":{"pos":{"x":2033.9188232421875,"y":112.19583129882812,"z":180.52557373 |
OlderNewer