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 <string> | |
#include <utility> | |
#include <vector> | |
#include <regex> | |
#include <unordered_map> | |
#include <cmath> | |
using namespace std; | |
using value_t = double; |
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
import Data.Char | |
data VM = VM { | |
mem :: [Int], | |
ptr :: Int | |
} | |
tPlus = '+' | |
tMinus = '-' | |
tDot = '.' |
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
package main | |
import "gopkg.in/resty.v1" | |
import "fmt" | |
import "log" | |
import "strconv" | |
import "sync" | |
func main() { | |
var wg sync.WaitGroup |
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 'pp' | |
class RuleOption | |
attr_accessor :parts | |
def initialize(*parts) | |
@parts = parts | |
end | |
end |
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
-- Custom data types | |
data Value = ValueString String | ValueInt Int | ValueJson Json deriving (Show) | |
data KeyValuePair = KeyValuePair String Value deriving (Show) | |
data Json = JsonObject [KeyValuePair] | JsonArray [Value] deriving (Show) | |
-- Decoder | |
decode :: String -> Value | |
decode raw = v |
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
## CONSTS ##################################################################### | |
PERSON_NUM = 32 | |
# Number of meeting iterations. | |
ITERATION = 64 | |
## METHODS #################################################################### | |
# Generates start-state meetings with the number of iterations | |
def generate_old_meetings |
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 'pp' | |
class Cube | |
attr_accessor :cells | |
def initialize | |
@cells = { | |
top: [0] * 9, | |
front: [1] * 9, | |
left: [2] * 9, |
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
# Call: ruby add_frozen_heading.rb PATH_TO_FOLDER | |
dir = ARGV[0] || '' | |
if !Dir.exist?(dir) | |
puts 'Missing folder.' | |
exit | |
end | |
def check_headers(dir) | |
# puts "Inspect #{dir}" |
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 'pp' | |
require 'ostruct' | |
require 'cgi' | |
class CallChild | |
attr_accessor( | |
:file, | |
:method, | |
:callee_called, | |
:callee_line, |
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 <fstream> | |
#include <sstream> | |
using namespace std; | |
int main(int argc, char* argv[]) { | |
ifstream file(argv[1]); | |
string s; |