Skip to content

Instantly share code, notes, and snippets.

View loganzartman's full-sized avatar
🏳️‍🌈
protect civil liberties

Logan loganzartman

🏳️‍🌈
protect civil liberties
View GitHub Profile
@loganzartman
loganzartman / ship
Created December 12, 2025 03:29
factorio nuclear ship
0eNrtnftyG7mxh99Ff4up6cZlBlsneZGUS0VTY5sVilR48Wazte9+hqIs0TZBNPB5new6VacqR2upG8AA+DUu/eHXm7erw/i4Xa73Nz/9erNcbNa7m5/+/uvNbvl+PV8d/9t6/jDe/HQz/utxO+52s/12vt49brb72dtxtb/57fZmub4f/3Xzk/x2e+HPFh/Gh+Vivpo9rubr81/X397c3ozr/XK/HE8un3745W59eHg7bid7t59szHf7cbtZ3s8Wm9VqXOw325vbm8fNbvrTzfroazI3E/+XcHvzy/H/07+Eyc9U2sNqP1uuP06GN9vpX9aH1epYyC8caaUjaXXk6hwNrX58nZ/Q6ifU+dFWP/HFz26/WY+zn+er1QX73Yt9N9m/YKevtaOX7QwmO0UzqdJMplbSVX2G5q8gdQOyuVdJ3XhsHiVSNxzbh73Ujcf2iUxeB+S7ydP0F7txOzm8Plt2mW4V7cakaKw3GxuKtgazrVC0lcy2tGRLu9rpRTKGpHJiyNlRa+XKdXNWU8UmV281VewJau7v5R6q5u5eHjpqFJpXS0PG0GtX/xR+Haboaft+u5n+9xSAXTObnuaP++V2mmqefmGyt//l8WhvuX48HMOxr30mY+FdofDudTy8P6xn+8N2O14srvvUmhetiH0a0vMSfV7vS5bVWFEpVdQZDXUlQ77pcwv53C7YCj+Uyh5byj6govfGDtZd7WB2OUl1/cs4kPpCy3rjOOqv1dLbh1GsqqU3jqLSVOeNgyiU7DSNoUD6oTcOIS0VvWkIKSq6cQj5q33LPoJcXd+ySlGhYYNVia7VMthHUFdVy2AbQcVKOlMlr9fRHJtVVtE2QkoDJLQMEDQ+gnndUtezg20LoTTZBdsAKc29sWtoVzRlRjF11qvTTrSNm5K8Rtu4uaqu0Txu6sQ12sZNKTaLLeMGhWbRPG7qYqpoGzfFSDvaBk4x9O9bRg4L2Hvb0Lke9PZGzSmt8XrzvkDl4qz3tlpeXTv2tuFTXIb3LeOHrcL
@loganzartman
loganzartman / arch-ros-tricks.md
Last active January 19, 2021 00:53
ROS installation/etc tricks on arch linux

no warranty express or implied

Install/Remove

  • install instructions
  • (bad practice) minimal install w/ trizen:
    trizen --noconfirm --sudo-autorepeat-at-runtime -Sy ros-melodic-ros-base
    • might need to set sudo_remove_timestamp => 0 in ~/.config/trizen/trizen.conf
  • remove all ROS packages:
    sudo pacman -Rs $(pacman -Qsq ros-melodic-)

Troubleshooting

@loganzartman
loganzartman / catkin_install.sh
Created June 12, 2020 00:36
Install catkin packages on Arch
# this sucks
# you will need to chmod some /opt/ros/melodic directories for make install to work...
# feel free to tell me how to actually do this
source /usr/share/ros-build-tools/clear-ros-env.sh
source /opt/ros/melodic/setup.bash
mkdir build
cd build
/usr/share/ros-build-tools/fix-python-scripts.sh -v 3 ..
@loganzartman
loganzartman / findros.py
Last active March 16, 2020 18:24
Automatically connect to an unused lab machine with ROS
#!/usr/bin/env python3
import asyncio
import subprocess
import sys
from random import shuffle
from argparse import ArgumentParser
def get_machines(username):
print("Getting list of CS hosts...", file=sys.stderr)
@loganzartman
loganzartman / compose_dead_greek.py
Last active January 27, 2020 18:09
adds dead_greek-like bindings for compose key
#!/usr/bin/env python3
"""
usage:
chmod +x compose_dead_greek.py
./compose_dead_greek.py
"""
import os.path
"Install vim-plug
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim'
if empty(glob(data_dir . '/autoload/plug.vim'))
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Install missing plugins
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | source $MYVIMRC
@loganzartman
loganzartman / star-run.py
Created April 5, 2019 07:38
termpixels demo
"""
star-run.py
dependencies: termpixels 0.0.6 (via pip)
"""
import operator
import math
from random import uniform
from termpixels import App, Color
"""@package tester
Test harness for kmeans
"""
from math import floor
import sys
import subprocess
import multiprocessing
import csv_mt
@loganzartman
loganzartman / csv_mt.py
Created April 29, 2018 20:29
Multi-table CSV parser
"""@package csv_mt
csv_mt allows reading of a multi-table CSV format described as follows:
Table name
header 1,header 2,header 3
data1,data1,data1
data2,data2,data2
{blank line}
There may be as many tables as desired in a single input. Tables should be
import matplotlib.pyplot as plt
def plot_bars(barGroups, barNames, groupNames, colors, ylabel="", title="", width=0.8):
"""Plot a grouped bar chart
barGroups - list of groups, where each group is a list of bar heights
barNames - list containing the name of each bar within any group
groupNames - list containing the name of each group
colors - list containing the color for each bar within a group
ylabel - label for the y-axis
title - title