Skip to content

Instantly share code, notes, and snippets.

View maartenb's full-sized avatar

Maarten Ballintijn maartenb

  • Boston, MA, USA
View GitHub Profile
@maartenb
maartenb / README.md
Created December 11, 2021 04:39 — forked from smoser/README.md
Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default

Ubuntu Grub Boot Kernel

Boot a specific installed Ubuntu kernel using grub-reboot and grub-set-default.

This allows you to pick what kernel you want to boot on next reboot, or set the default, without having to know much about how grub works or editing config files.

Usage

  Usage: boot-kernel [options] [kernel]

call grub-reboot or grub-set-default to boot the provided kernel.

@maartenb
maartenb / wide_parquet.py
Created May 10, 2020 02:33
benchmark for wide parquet reading in python
import pyarrow as pa
import pyarrow.parquet as pq
import numpy as np
import os
import pandas as pd
import time
import matplotlib.pyplot as plt
pa.set_cpu_count(8)
@maartenb
maartenb / test_df_io.py
Created September 22, 2019 05:43
test writing and reading a Dataframe using different technologies
#!/usr/bin/env python
"""
test_df_io.py - test writing and reading a Dataframe using different technologies
"""
import time
from contextlib import contextmanager
import fastparquet as fpq
@maartenb
maartenb / bench.py
Created July 23, 2019 16:02 — forked from apalala/bench.py
A simple Python benchmark
from __future__ import print_function
from math import sin, cos, radians
import timeit
'''
A simple Python benchmark.
Results on an overclocked AMD FX-8150 Eight-Core CPU @ 3.0 GHz, and
an Intel Core i5-2410M CPU @ 2.30GHz.
@maartenb
maartenb / .htaccess
Created June 24, 2018 19:53 — forked from jdevalk/.htaccess
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>