Skip to content

Instantly share code, notes, and snippets.

Bob Jansen bobjansen

Block or report user

Report or block bobjansen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View mesh_test.R
# Rscript mesh <- test.R
# LD_PRELOAD=libmesh.so Rscript mesh_test.R
#library(data.table)
#library(microbenchmark)
doDataTable <- FALSE
pid <- Sys.getpid()
GetMemSize <- function() {
@bobjansen
bobjansen / plain_R.R
Last active Jun 8, 2019
FastR experiments with Sudoku code extracted (Rcpp ignored)
View plain_R.R
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
@bobjansen
bobjansen / example.cpp
Last active Mar 10, 2016
cpr Sessions, better response
View example.cpp
// 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
@bobjansen
bobjansen / nosetmacs.el
Created Oct 20, 2012
Run nosetests from any directory in your virtualenv (Windows compatible)
View nosetmacs.el
(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")))
@bobjansen
bobjansen / echo.py
Created Aug 30, 2012
The main script for solving level8 of the Stripe CtF 2.0
View echo.py
#!/usr/bin/env python
"""
Finds chunks with some tweaking
"""
import socket
import helpers
from time import sleep
View magic_dates.cpp
#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) {
You can’t perform that action at this time.