Skip to content

Instantly share code, notes, and snippets.

View maschere's full-sized avatar

Maximilian maschere

View GitHub Profile
@maschere
maschere / lowpolypy.ipynb
Last active June 4, 2020 13:51
lowpolypy.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maschere
maschere / precision_parking.py
Created October 4, 2023 12:25
Example script for the level editor in JOY OF PROGRAMMING
### INIT CODE - DO NOT CHANGE ###
from pyjop import *
from types import SimpleNamespace
SimEnv.connect()
editor = LevelEditor.first()
data = SimpleNamespace() # use this to share mutable data between your function calls
### END INIT CODE ###
### IMPORTS - Add your imports here ###
@maschere
maschere / pg.py
Last active May 9, 2024 07:50
PG for Cartpole
#mostly from https://github.com/Finspire13/pytorch-policy-gradient-example/blob/master/pg.py
import time
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Bernoulli
from torch.autograd import Variable
from itertools import count
import matplotlib.pyplot as plt