Skip to content

Instantly share code, notes, and snippets.

View mgolub2's full-sized avatar

Maximilian Golub mgolub2

View GitHub Profile
@mgolub2
mgolub2 / serverless_llama.sh
Created October 27, 2023 17:13
A quick script to setup GPU accelerated serverless llama.cpp using Podman and systemd
#!/bin/bash
# Ensuring the script is running as root
if [ "$EUID" -ne 0 ]; then
echo "This script needs to be run as root. Exiting."
exit 1
fi
# Step 1: Nvidia GPU setup with Podman
# Generate Nvidia CDI configuration if it doesn't already exist
@mgolub2
mgolub2 / credit.py
Created July 8, 2019 18:30
Calculate Paypal Credit from Copy Paste
import re
import sys
calc = lambda x: sum([float(i.group(1).replace("$", "")) for i in re.finditer(r'(-*\$\d+\.\d+)', x)])
print(calc(sys.argv[1]))
@mgolub2
mgolub2 / densenet.prototxt
Last active August 22, 2018 00:24
Densenet
name: "dense"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 5 dim: 3 dim: 32 dim: 32 } }
}
layer {
type: "Convolution"
name: "Convolution2DFunction-0-1"
@mgolub2
mgolub2 / wrn.prototxt
Last active August 21, 2018 02:49
wrn_real
name: "wrn"
layer {
name: "data"
type: "Input"
top: "data"
input_param { shape: { dim: 1 dim: 3 dim: 32 dim: 32 } }
}
layer {
type: "Convolution"
name: "Convolution2DFunction-0-1"
name: "WRN-28-10_deploy"
layer {
name: "data"
type: "Input"
top: "data"
input_param {
shape {
dim: 1
dim: 3
dim: 32

Keybase proof

I hereby claim:

  • I am mgolub2 on github.
  • I am mtg (https://keybase.io/mtg) on keybase.
  • I have a public key ASAzeXISH1ek8mEP0PwRJa6eiYk-F0rDNKqmd-06pdw5CAo

To claim this, I am signing this object:

#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'

Keybase proof

I hereby claim:

  • I am mgolub2 on github.
  • I am mtg (https://keybase.io/mtg) on keybase.
  • I have a public key whose fingerprint is FF53 C08F C97C 6A62 DACE 18C8 B50E 4B21 E75E 6550

To claim this, I am signing this object: