Skip to content

Instantly share code, notes, and snippets.

View paulgessinger's full-sized avatar

Paul Gessinger paulgessinger

View GitHub Profile
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
@paulgessinger
paulgessinger / grid.cpp
Last active November 14, 2017 16:10
N Dimensional grid
#include <vector>
#include <tuple>
namespace details {
template<class T>struct tag{using type=T;};
template<class Tag>using type=typename Tag::type;
template<class T, size_t n>
struct n_dim_vec:tag< std::vector< type< n_dim_vec<T, n-1> > > > {};
template<class T>
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
echo "Setting up Docker"
apt-get install -y \
// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>
#include <boost/variant.hpp>
#include <map>
#include <vector>
#include <sstream>
typedef boost::make_recursive_variant<
int,
#!/usr/bin/env python
from __future__ import print_function
from datetime import datetime
import os
import numpy as np
import sys
from tabulate import tabulate
from random import shuffle
@paulgessinger
paulgessinger / ACR_ICS.ipynb
Last active June 23, 2018 12:24
ACR shifts to ICS
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

needs openssl, so for instance sudo yum install openssl-devel

./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
import matplotlib.pyplot as plt
import numpy as np
from IPython.display import HTML, display
from io import BytesIO
import base64
import os
import contextlib
def draw_eta_lines(ax, eta_range = (-3, 3), n=None, s=None, fmt="%.2f", **kwargs):
assert (n is None and s is not None) or (n is not None and s is None)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.