Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <iostream> | |
#include <iomanip> | |
#define BINARY(x) 0b##x | |
const short UPPER_LEFT = BINARY(100000000); | |
const short FULL_BOARD = BINARY(111111111); | |
const short HORIZ_0 = BINARY(111000000); |
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
// Ant Foraging Simulator | |
// Jacob Conrad Martin | |
// http://jacobconradmartin.com | |
import processing.video.*; | |
MovieMaker mm; | |
// *** CONFIG *** | |
int worldWidth = 400; |
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
using System; | |
namespace PiDay | |
{ | |
// The probability of two random numbers to be coprime is P = 6 / Pi^2 | |
// So let's generate a bunch of random numbers. Figure out how often they're coprime. | |
// Use that percentage as our probabilty and solve for Pi. | |
// Pi = sqrt(6 / P) | |
// For more info, watch the video where I stole the idea: https://youtu.be/RZBhSi_PwHU |
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
//replace http://agar.io/main_out.js by this file | |
//with Fiddler Web Debugger (AutoResponder tab) | |
//bots can be created in different rooms - so try restart the page if need | |
var totalBotCount = 0; | |
function game(h, r, bot, botUrl, botName) { |
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
require "csv" | |
require 'action_controller/test_process' | |
file = `ls upload/*.csv | grep -v and-r`.chomp | |
info = CSV.read(ARGV.first || file) | |
info.shift | |
# TODO: set this list by eliminating the expected cols | |
properties = %w[Colour Material Size Weight Warranty] + ["Pole Diameter", "Fits Pole Size"] |