It turns out installing a recent Linux on a MacBookPro is as easy as any PC these days.
- Resize MacOS partition with Disk Utility
- Download Fedora Live ISO
- Put ISO on USB stick
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| mkdir -p /tmp/cerb_1 | |
| sshfs $host_dir /tmp/cerb_1 | |
| mkdir -p /tmp/cerb_2 | |
| encfs /tmp/cerb_{1,2} | |
| for d in $@ | |
| do |
| #!/bin/bash | |
| function setup_db() { | |
| docker run -d --name gcpg postgres | |
| echo "waiting for db to spin up..." | |
| sleep 2 | |
| docker exec gcpg psql -U postgres -c 'CREATE DATABASE gcdb;' | |
| docker exec gcpg psql -U postgres -c "CREATE ROLE gcu WITH PASSWORD 'foo';" | |
| docker exec gcpg psql -U postgres -c "ALTER ROLE gcu WITH LOGIN;" | |
| docker run --rm guacamole/guacamole /opt/guacamole/bin/initdb.sh --postgres | \ |
| CMDSTAN ?= ~/Downloads/cmdstan-2.17.0 | |
| nsim ?= 1 | |
| ./%: %.stan prelude.stan | |
| $(CMDSTAN)/bin/stanc --o=$*.hpp $*.stan | |
| here=$(shell pwd); cd $(CMDSTAN); make $$here/$@; cd $$here | |
| sim.csv: sim.data.R ./sim | |
| ./sim sample algorithm=fixed_param num_samples=$(nsim) data file=sim.data.R output file=sim.csv |
| import re | |
| def lines(fname='awssg.py'): | |
| with open(fname,'r') as fd: | |
| for line in fd.readlines(): | |
| if "f'" in line: | |
| yield line | |
| def fmt_str(line): | |
| ex = r'f\'(.*)\'' |
| from .models import Thing | |
| import time | |
| all_ids = [] | |
| size = 10000 | |
| num_items = Thing.objects.count() | |
| qs = Thing.objects.order_by('id') | |
| last_id = qs.first().id | |
| count = 0 |
| import boto | |
| import requests | |
| import json | |
| import os.path | |
| # keep the list of cidr/ip addrs we used in the past | |
| known_fname = os.path.expanduser('~/.awssg') | |
| # aws credentials | |
| creds = { |
| from numpy import * | |
| import numpy as np | |
| from numpy.random import randn, rand | |
| def spmat(A): | |
| n = A.shape[0] | |
| m = A != 0 # non-zero mask | |
| a = A[m] # non-zero elements | |
| r, c = argwhere(m).T # non-zero row & col indices |
| import os | |
| import sys | |
| import subprocess | |
| # gcc $(python3-config --cflags) -fPIC -c $file | |
| # gcc -shared $(python3-config --ldflags) utils.o -o utils.so | |
| def flags(): | |
| proc = subprocess.Popen(['python3-config', '--cflags'], stdout=subprocess.PIPE) | |
| cflags = proc.stdout.read().decode('ascii') |