Skip to content

Instantly share code, notes, and snippets.

View maedoc's full-sized avatar

marmaduke woodman maedoc

  • now
  • here
View GitHub Profile
@maedoc
maedoc / cudara.py
Created April 21, 2019 21:29
recurrence analysis with Numba & CUDA
"""Implements recurrence analysis with CUDA.
"""
import os, glob
# not needed if using conda
os.environ['NUMBAPRO_NVVM'], = glob.glob('c:/program files/nvidia*/cuda/*/nvvm/bin/nvvm64*.dll')
os.environ['NUMBAPRO_LIBDEVICE'], = glob.glob('c:/program files/nvidia*/cuda/*/nvvm/libdevice')
import math
import numpy as np
from numba import cuda
@maedoc
maedoc / test-encryption.sh
Last active March 14, 2019 11:34
small dm integrity & encryption test
#!/bin/bash
# verify that plaintext isn't visible on disk
# increment this for retesting on same system
i=22
# create disk file, mount point, loop back device & file system
# nb. if this is too small, cryptsetup will fail
truncate -s 100M /opt/disk$i
@maedoc
maedoc / om-install-trace.txt
Created January 29, 2019 09:26
Trace of OpenMEEG install on macOS as conda package
(base) ~ conda create -n openmeeg python -y
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.5.12
latest version: 4.6.1
Please update conda by running
@maedoc
maedoc / test-minikube-pach.sh
Created November 23, 2018 10:19
testing pachyderm on minikube
#!/bin/bash
set -eux
minikube start --vm-driver kvm2
sleep 5
pachctl deploy local
sleep 5
while kubectl get all | grep pachd | grep ContainerCreating; do sleep 5; done
@maedoc
maedoc / Dockerfile
Last active November 12, 2018 10:53
Matplotlib GUIs with PyCharm's console
FROM ubuntu
RUN apt-get update \
&& apt-get install -y python3-matplotlib python3-ipython
@maedoc
maedoc / notes-dell-5290.md
Last active November 14, 2018 09:18
On the Dell Lattitude 5290 i5-8350U w/ Ubuntu 16.04

Notes on the Dell Lattitude 5290

I recently got a new work machine, the Lattitude 5290, for dev work with PyCharm, Docker, some VMs, some data analysis.

  • 12.5" 1366x768
    • personally I dislike programming on retina screens
    • a priori better battery life
  • i5 8350U 4C/8T TDP turbo up to 3.6 Ghz (on all four cores!)
  • 32 GB DDR4
  • 512 GB nvme
@maedoc
maedoc / nbloopfusion.py
Created August 30, 2018 21:50
Loop fusion in Numba
import math
import numpy as np
import numba as nb
@nb.njit
def k1(a):
for i in range(a.size):
a[i] += 1
@nb.njit
@maedoc
maedoc / gbmo.py
Last active August 2, 2018 09:23
Print GB months, GB and inode usage
#!/usr/bin/env python3
import os
import time
import sys
path, gbmo_limit = sys.argv[1:]
gbmo_limit = float(gbmo_limit)
now = time.time()
@maedoc
maedoc / f28-mbp.md
Last active July 5, 2018 08:49
Install Fedora 28 on MacBookPro 15" 2015

Installing Fedora Workstation 28 on a 2015 MacBookPro 15"

It turns out installing a recent Linux on a MacBookPro is as easy as any PC these days.

Steps

  • Resize MacOS partition with Disk Utility
  • Download Fedora Live ISO
  • Put ISO on USB stick
@maedoc
maedoc / keybase.md
Created February 1, 2018 09:57
keybase.md

Keybase proof

I hereby claim:

  • I am maedoc on github.
  • I am wdmn (https://keybase.io/wdmn) on keybase.
  • I have a public key ASAlgMiYnoaAeHqMFi9Uoez85hYBYb5Qwp-RlkvImJEXJwo

To claim this, I am signing this object: