Skip to content

Instantly share code, notes, and snippets.

View cohnt's full-sized avatar

Thomas Cohn cohnt

View GitHub Profile
@cohnt
cohnt / foo
Created June 9, 2025 02:37
Steam System Information
"LD_* scout runtime" information:
{
"steam-runtime-system-info" : {
"version" : "0.20250408.0+srt1",
"path" : "/home/tommy/.steam/debian-installation/ubuntu12_32/steam-runtime/amd64/usr/bin/steam-runtime-system-info"
},
"can-write-uinput" : true,
"steam-installation" : {
"path" : "/home/tommy/.steam/debian-installation",
"data_path" : "/home/tommy/.steam/debian-installation",
@cohnt
cohnt / steam-218230.log
Created June 9, 2025 02:33
Planetside 2 Crash Proton Log
This file has been truncated, but you can view the full file.
======================
Proton: 1748966679 experimental-10.0-20250603b
SteamGameId: 218230
Command: ['/mnt/9e35f787-a028-48b8-8f0e-9eda11669830/SteamLibrary/steamapps/common/PlanetSide 2/LaunchPad.exe', 'Updates:enable=0', 'Updates:PatchSelf=1', 'campaignID=1063272', 'promoID=146', 'launchPoint=steam', 'launchArgs=STEAM_ENABLED=1']
Options: {'forcelgadd'}
depot: 3.0.20250408.124536
pressure-vessel: 0.20250408.0 scout
scripts: 0.20250408.0
sniper: 3.0.20250408.124536 sniper 3.0.20250408.124536
@cohnt
cohnt / parse.py
Created May 12, 2025 02:38
Filter Out Emails of People Who RSVPed Yes (Aisle Planner)
import csv
# File paths (change these if needed)
parties_file = 'parties.csv'
guests_file = 'guests.csv'
output_file = 'yes_rsvp_emails.txt'
# Step 1: Collect RSVP IDs for guests who RSVPed yes
yes_rsvp_ids = set()
@cohnt
cohnt / CMakeLists.txt
Created May 7, 2025 20:14
Binding `static constexpr` in Python
cmake_minimum_required(VERSION 3.14)
project(constexpr_demo)
# Enable C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Find pybind11
find_package(pybind11 REQUIRED)
import numpy as np
import time
from pydrake.all import (
StartMeshcat,
RigidTransform,
RotationMatrix
)
meshcat = StartMeshcat()
@cohnt
cohnt / main.py
Last active September 17, 2024 17:37
Inertia Error
import os
from pydrake.all import (
StartMeshcat,
DiagramBuilder,
AddMultibodyPlantSceneGraph,
Parser,
LoadModelDirectivesFromString,
ProcessModelDirectives,
)
import numpy as np
import matplotlib.pyplot as plt
from sklearn.neighbors import kneighbors_graph
from collections import deque
def adj_mat_to_adj_list(adj_mat):
return [list(np.where(adj_mat[i] != 0)[0]) for i in range(adj_mat.shape[0])]
def edge_set_to_adj_mat(edge_set, n_points):
# Takes in a set of edges, and the number of points, and outputs an adjacency
@cohnt
cohnt / maze_new.py
Last active July 3, 2024 18:20
KinematicTrajectoryOptimization Non-Determinism
# In[2]:
import numpy as np
import os
import pydot
from IPython.display import display, Image, SVG
from tqdm import tqdm
@cohnt
cohnt / maze_new.py
Last active July 3, 2024 18:20
Box Box Problem Reproduction
# In[2]:
import numpy as np
import os
import pydot
from IPython.display import display, Image, SVG
from tqdm import tqdm
@cohnt
cohnt / A.npy
Last active June 11, 2024 20:28
Drake Affine Hull of HPolyhedron Check
This file has been truncated, but you can view the full file.