Skip to content

Instantly share code, notes, and snippets.

View QuantumFractal's full-sized avatar

Thomas Moll QuantumFractal

View GitHub Profile
@QuantumFractal
QuantumFractal / scott.ipynb
Created February 20, 2020 02:46
notebook-grey-scot.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
svg_grammar = '''
start : prolog element
prolog: "<?xml" S? attr+ "?>" WS?
element: inline_tag | start_tag element end_tag
start_tag : S? "<" name S? attr+ ">" WS+
end_tag : S? "</" name S? ">" WS+
@QuantumFractal
QuantumFractal / main.jl
Created September 30, 2019 01:40
julia opengl
using GLFW
using ModernGL
# NO COPY AND PASTE!!!
# CLEAN CODE IS GOOD CODE
# Create Window with size and title
GLFW.Init()
window = GLFW.CreateWindow(400, 300, "Title")
@QuantumFractal
QuantumFractal / TrappedKnights2.ipynb
Last active February 20, 2019 20:55
Trapped Knights Part 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"hide_input": true
},
"source": [
"# The Trapped Knight Problem"
]
@QuantumFractal
QuantumFractal / trapped_knight.jl
Created January 28, 2019 00:31
Trapped Knight
# ulam spiral
using Crayons.Box
knight_deltas = [(-2, -1), (-2, +1), (+2, -1), (+2, +1), (-1, -2), (-1, +2), (+1, -2), (+1, +2)]
function main()
width, height = 5,5
for y in height:-1:-height
for x in -width:width
#print("(", x, ",", y, ")")
quarter = ulam_quarter(x, y)
using UnityEngine;
using System.Collections;
using AssetBundles;
public class LoadAssets : MonoBehaviour
{
public const string AssetBundlesOutputPath = "/AssetBundles/";
public string assetBundleName;
public string assetName;
""" Scratch file for Crypto.io """
plaintext_space = "0123456789ABCDEF"
key = {'0': 'F', '1': '2', '2': '7', '3': '4',
'4': '5', '5': 'C', '6': '9', '7': 'E',
'8': 'D', '9': '1', 'A': '3', 'B': '6',
'C': '3', 'D': 'A', 'E': 'B', 'F': '0'}
def main():
plaintext = "12B70ADE"
@QuantumFractal
QuantumFractal / Fib.java
Created November 10, 2016 22:30
Exam 2 Review Code
package source;
public class Fib {
public static void main(String[] args) {
System.out.println("Total paths given 4 tiles "+countPaths(4));
System.out.println(intPower(2, 16));
}
public static void start(int n ){
echo "Setting up Tom's environment please wait..."
eval $(ssh-agent -s)
echo "Setting ssh key..."
ssh-add ~/.ssh/quanta
echo "Finished!"
echo "Setting git settingss..."
git config --global user.name "Tom"