Skip to content

Instantly share code, notes, and snippets.

View g-w1's full-sized avatar
๐Ÿ˜Ž
research

Jacob G-W g-w1

๐Ÿ˜Ž
research
View GitHub Profile
const std = @import("std");
const buffer_size = 100_000_000;
var m = std.mem.zeroes([buffer_size]u64);
var default_prng = std.Random.DefaultPrng.init(0x420);
pub fn main() void {
const a = &m;
var in: usize = 0;
while (in < buffer_size) : (in += 1) {
m[in] = default_prng.next();
}
@g-w1
g-w1 / war.py
Last active February 9, 2020 03:26
a program that when given 2 decks of 26 for the card game war can return the output
import random
import time
def decksplit():
deck = list(range(13))*4
random.shuffle(deck)
p1 = deck[:26]
p2 = deck[26:]
return (p1,p2)
def printb(p1,p2, time, war = False):
print(p1)