Skip to content

Instantly share code, notes, and snippets.

View automathan's full-sized avatar
🛟
On the 315th Degree of the 13th Revolution

Jonathan Jørgensen automathan

🛟
On the 315th Degree of the 13th Revolution
View GitHub Profile
@automathan
automathan / entity.gdshader
Created April 25, 2026 15:31
Arc of Icarus Entity Shader
shader_type canvas_item;
uniform vec4 line_color: source_color = vec4(1);
uniform float line_thickness: hint_range(0.0, 1.0) = 0.5;
uniform float gradient: hint_range(0.0, 1.0) = 0.1;
uniform float alpha_cutoff = 1.0;
void fragment(){
vec4 color = texture(TEXTURE, UV);
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
torch.set_default_tensor_type('torch.DoubleTensor')
class DenseNet(nn.Module):
def __init__(self, input_size, layer_sizes):
super(DenseNet, self).__init__()
@automathan
automathan / samplegen.py
Created January 29, 2019 10:43
Script for generating sample movement data in 3D space
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
import math
ax = plt.axes(projection='3d')
jump_duration = 9
jump_height = 5
step_size = 1.5
public class GlobalState : MonoBehaviour {
private static GlobalState _instance = null;
public static GlobalState Instance() { return _instance; }
void Awake () { // Dollar store singleton
if (_instance != null) {
Destroy(gameObject);
} else {
#include <bitset>
#include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef unsigned char byte; // 0-255
vector<byte> output(16); // 16 burde egentlig være (ceil((double)(totalt antall bits) / 8)), altså antall bytes man trenger
@automathan
automathan / gdb.log
Created August 30, 2017 06:29
backtrace
Starting program: web_server
No executable file specified.
Use the "file" or "exec-file" command.
Starting program: /home/jonathaj/skole/sikkerhet/oving2/web_server ./web_server
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Program received signal SIGABRT, Aborted.
0x00007f36138e68c0 in raise () from /usr/lib/libc.so.6
Temporary breakpoint 1 at 0x7f36138e68c0