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
#!/usr/bin/env python | |
import os | |
import csv | |
#source_dir = "\\\gameshare2\IEB\Reliability\BRB-2015\\98-Non-FTE\\01-DataAndTestResults\\11-Headband\Data_Processor" | |
source_dir = "C:\cygwin64\home\Test Data" | |
#change source directory for testing | |
input_file_path = source_dir + "\IP.csv" | |
#can this be any .csv files? |
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
var reducePath = function (x, y, entryOffset, rangeOffset, entryRequiredWall, entryDisallowedWall) { | |
var rangeEntryRequiredDirections = [entryDisallowedWall, OppositeDirections[entryDisallowedWall]]; | |
var rangeEntryDisallowedDirections = [entryRequiredWall, OppositeDirections[entryRequiredWall]]; | |
var endDisallowedDirections = [OppositeDirections[entryRequiredWall], OppositeDirections[entryDisallowedWall]]; | |
var endRequiredDirections = [entryRequiredWall, entryDisallowedWall]; | |
var tile = tiles[x][y]; | |
var color = tile.color; | |
var entry = tiles[x+entryOffset[0]][y+entryOffset[1]]; |
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
// Tested in Node.js v0.10.2 | |
// * RESULTS * | |
// native bind with context x 696,362 ops/sec ±2.23% (84 runs sampled) | |
// native bind with context and arg x 672,228 ops/sec ±1.90% (86 runs sampled) | |
// custom bind with context x 1,186,009 ops/sec ±1.21% (98 runs sampled) | |
// custom bind with context and arg x 1,202,547 ops/sec ±1.28% (94 runs sampled) |
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
// Tested in Node.js v0.10.3 | |
// * RESULTS * | |
// custom bind x 29,388,127 ops/sec ±1.46% (95 runs sampled) | |
// native bind x 636,295 ops/sec ±2.66% (81 runs sampled) | |
// custom bind invoke x 45,884,456 ops/sec ±1.19% (95 runs sampled) | |
// native bind invoke x 5,424,592 ops/sec ±1.76% (96 runs sampled) | |