This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with open('day16challengeinput','r') as f: | |
data = f.read().split(',') | |
moves = [] | |
for move in data: | |
if move[0] == 's': | |
moves.append( (0, int(move[1:])) ) | |
elif move[0] == 'x': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Game.hpp" | |
#include <iostream> | |
#include <GL/glew.h> | |
#include <GLFW/glfw3.h> | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <glm/gtc/type_ptr.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d2ef1e5505a7b3e9b3ad393df344b3cda5e2ad09 Mon Sep 17 00:00:00 2001 | |
From: Julian <[email protected]> | |
Date: Tue, 18 Dec 2018 03:34:32 +1300 | |
Subject: [PATCH] added locking of linear and angular velocities with | |
RigidBody::setLinearVelocityFactor(), RigidBody::setAngularVelocityFactor() | |
--- | |
src/body/RigidBody.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++- | |
src/body/RigidBody.h | 42 +++++++++++++++++++++++++++++++++++++---- | |
src/engine/DynamicsWorld.cpp | 14 +++++++++++++- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct { | |
int x; | |
int y; | |
float health; | |
} monster_t; | |
typedef struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64, zlib, sys, os, json | |
inflator = zlib.decompressobj() | |
bins = sorted([i for i in os.listdir('.') if i.endswith('.in.bin')], key=lambda j:int(j[:-7])) | |
pretty_print = True | |
# go through all the *.in.bin files, decompress them sequentially | |
# and write them to *.in.json files. Optionally pretty print | |
# them (switch the variable above) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
A 'range' in this context is a 2-tuple | |
(a, b) that represents the set of integers | |
in the (mathematical) range (a, b]. | |
a must always be less than b. | |
''' | |
def range_contains(ra, sub): |
OlderNewer