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
""" | |
A simple experiment to time different ways to save orders | |
Start the servers with | |
> python main.py server 5 | |
and start the experiment with | |
> python main.py client 5 | |
Servers can be reused. | |
Example output: | |
Connecting to 5 exchanges with sync writer |
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
--- | |
title: "Infinite(?) Knight Tour" | |
author: "Bob Jansen" | |
format: pdf | |
editor: visual | |
keep-tex: True | |
monofont: "Fira Code" | |
--- | |
## Terminating Knight Tour on Infinite Boards |
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
--- | |
title: "Infinite(?) Knight Tour" | |
author: "Bob Jansen" | |
format: pdf | |
editor: visual | |
monofont: "Fira Code" | |
--- | |
## Terminating Knight Tour on Infinite Boards |
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
# Rscript mesh <- test.R | |
# LD_PRELOAD=libmesh.so Rscript mesh_test.R | |
#library(data.table) | |
#library(microbenchmark) | |
doDataTable <- FALSE | |
pid <- Sys.getpid() | |
GetMemSize <- function() { |
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
sudokuTxt <- " | |
1 0 0 0 0 0 0 0 6 | |
0 0 6 0 2 0 7 0 0 | |
7 8 9 4 5 0 1 0 3 | |
0 0 0 8 0 7 0 0 4 | |
0 0 0 0 3 0 0 0 0 | |
0 9 0 0 0 4 2 0 1 | |
3 1 2 9 7 0 0 4 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
// This is based on the example cpr project | |
/* | |
* My output was: | |
➜ build git:(master) ✗ ./example | |
elapsed time: 0.533153s | |
elapsed time: 0.537888s | |
elapsed time: 0.502068s | |
elapsed time: 0.122032s | |
elapsed time: 0.125355s |
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
(defun run-tests () | |
"Finds the virtualenv bin-dir and run nosetests" | |
(interactive) | |
(let ((bin-dir (if (eq system-type 'windows-nt) "Scripts" "bin")) | |
(cwd (reverse (split-string default-directory "/")))) | |
(let ((venv-dir (if (string= (first cwd) "") | |
(find-bin-dir (rest cwd) bin-dir) | |
(find-bin-dir cwd bin-dir)))) | |
(if venv-dir | |
(let ((old-path (getenv "PATH"))) |
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
#!/usr/bin/env python | |
""" | |
Finds chunks with some tweaking | |
""" | |
import socket | |
import helpers | |
from time import sleep |
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 <iostream> | |
using namespace std; | |
bool checkAddition(int y, int m, int d); | |
bool checkMultiply(int y, int m, int d); | |
bool checkDivision(int y, int m, int d); | |
bool checkSubstraction(int y, int m, int d); | |
bool checkAddition(int y, int m, int d) { |