Skip to content

Instantly share code, notes, and snippets.

View mszegedy's full-sized avatar

Maria Szegedy mszegedy

  • Rutgers University, Khare Lab
View GitHub Profile
This file has been truncated, but you can view the full file.
[LOG 06:56:38.642] ******* Log Initiated for Kerbal Space Program - 1.10.1.2939 (LinuxPlayer) en-us *******
Kerbal Space Program - 1.10.1.2939 (LinuxPlayer) en-us
OS: Linux 5.11 Arch rolling 64bit
CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12)
RAM: 64171
GPU: NVIDIA GeForce GTX 1060/PCIe/SSE2 (6144MB)
SM: 50 (OpenGL 4.5.0 NVIDIA 465.24.02)
RT Formats: ARGB32, Depth, ARGBHalf, Shadowmap, RGB565, ARGB4444, ARGB1555, Default, ARGB2101010, DefaultHDR, ARGB64, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8, ARGBInt, RGInt, RInt, BGRA32, RGB111110Float, RG32, RGBAUShort, RG16, BGRA10101010_XR, BGR101010_XR, R16
@mszegedy
mszegedy / KSP.log
Created April 22, 2021 23:11
a boot log of a minimal install of KSP 1.10.1 running the Beyond Home 1.5.2 mod and its dependencies, which exhibits the error that replaces all of your textures with pure magenta.
[LOG 19:04:58.260] ******* Log Initiated for Kerbal Space Program - 1.10.1.2939 (LinuxPlayer) en-us *******
Kerbal Space Program - 1.10.1.2939 (LinuxPlayer) en-us
OS: Linux 5.11 Arch rolling 64bit
CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12)
RAM: 64171
GPU: Mesa Intel(R) UHD Graphics 630 (CFL GT2) (512MB)
SM: 50 (OpenGL 4.6 (Core Profile) Mesa 21.0.2)
RT Formats: ARGB32, Depth, ARGBHalf, Shadowmap, RGB565, ARGB4444, ARGB1555, Default, ARGB2101010, DefaultHDR, ARGB64, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8, ARGBInt, RGInt, RInt, BGRA32, RGB111110Float, RG32, RGBAUShort, RG16, BGRA10101010_XR, BGR101010_XR, R16
This file has been truncated, but you can view the full file.
[LOG 10:18:00.269] ******* Log Initiated for Kerbal Space Program - 1.10.1.2939 (LinuxPlayer) en-us *******
Kerbal Space Program - 1.10.1.2939 (LinuxPlayer) en-us
OS: Linux 5.11 Arch rolling 64bit
CPU: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12)
RAM: 64171
GPU: GeForce GTX 1060/PCIe/SSE2 (6144MB)
SM: 50 (OpenGL 4.5.0 NVIDIA 460.67)
RT Formats: ARGB32, Depth, ARGBHalf, Shadowmap, RGB565, ARGB4444, ARGB1555, Default, ARGB2101010, DefaultHDR, ARGB64, ARGBFloat, RGFloat, RGHalf, RFloat, RHalf, R8, ARGBInt, RGInt, RInt, BGRA32, RGB111110Float, RG32, RGBAUShort, RG16, BGRA10101010_XR, BGR101010_XR, R16
@mszegedy
mszegedy / make-everything-2.py
Created March 21, 2021 19:23
Writing this gave me brain damage.
#!/opt/anaconda/bin/python
import os
import math
import re
import json
import csv
import copy
import itertools
import numpy as np
#!/usr/bin/env python3
# crops a series of screenshots, splits them based on vertical blackspace (i.e.
# completely black scanlines), then aligns and merges them by y-concatenation.
# if a piece can't be y-catted to the previous one, a new file is created for
# it. this has the use of ripping ebooks that have been pirated from temporary
# views via screenshots, such as those lent out by archive.org.
import os
from os.path import join
@mszegedy
mszegedy / truss-solver.py
Created May 2, 2016 00:30
Truss solver
import sys
import re
import numpy as np
trussfile = open(sys.argv[-1])
joints = {} # keys are joint names, values are positions
members = {} # keys and values are joint names
memberlist = [] # items are two-char strings of member names
forces = {} # keys are joint names, values are directions ('x', 'y', or 'z')
@mszegedy
mszegedy / spb.py
Last active August 29, 2015 14:05
#!/bin/python
import os,sys,random,math
import numpy as np
from functools import reduce
from PIL import Image
### SETUP ###
# Constants
palette = {'bg':(255,255,255),
@mszegedy
mszegedy / Maxwell's Demon.py
Last active December 21, 2015 13:39
Maxwell's Demon
import math
from random import random,choice
from scene import *
# An explanation for anyone wondering what this is: this is a game I wrote for
# Pythonista for the iPhone on a boring plane ride from Budapest to Muenchen.
# The credit for the idea goes to my father, although he apparently doesn't
# remember coming up with it. You play as Maxwell's Demon, trying to get all
# the balls on the screen on one side of the barrier by manipulating a little
# gate. The controls are simple; just tap the screen to toggle the gate.
@mszegedy
mszegedy / lisp.md
Last active December 1, 2018 19:32
A short introduction to Lisp

Hi! Before I give you my Lisp book, I want to save you some trouble and lay down the basics.

Lisp revolves around three things: parentheses, lists, and functions. Everything else is just glitter. Even calling a function looks almost exactly like a list. Lisp does, after all, get three-quarters of its name from the same word. (I think the P stands for Parser, but I'm not sure.) Reflect briefly on this Hello World program in Lisp:

"Hello, world!"

That's it. Remember how you complained about putting stuff just out in the open in Python, without anything actually doing anything with them? Well, in Lisp you can do that. If you leave a thing like that out in the open that returns a value and isn't getting evaluated, it just prints the value. And I mean why not? What were you doing with that anyway? Trust me, you're better off this way.
The thing about Lisp is that it is an interpreted language. Python is also an interpreted language, but it's difficult to notice. Interpreted means that instead of a