Skip to content

Instantly share code, notes, and snippets.

View binkiklou's full-sized avatar

Maxence binkiklou

View GitHub Profile
@binkiklou
binkiklou / hack.py
Created December 8, 2023 20:49
kinda hacky aoc 2023 day 8 part 2
# lol
import numpy as np
arr = np.array([ ])
x = np.lcm.reduce(arr)
print(x)
@binkiklou
binkiklou / collatz.cpp
Created July 20, 2022 02:04
Calculates a lot of collatz number fast
// It is 4AM and I cannot sleep, so here is this multithreaded collatz conjecture calculator
// You can specifiy the number of numbers to calculate via the command line, or it defaults to 100
// This code is awfull, and there are a lot of ways to optimize it that I can think of
#include <iostream>
#include <vector>
#include <thread>
#include <mutex>
#include <chrono>
#include <fstream>
@binkiklou
binkiklou / stringsearch.cpp
Last active January 13, 2021 01:09
Tests time for finding 100k strings in vector of 1M strings ranging from 1 to 64 chars
// I started writing this on WSL, but I'm finishing it
// on Visual Studio, cuz I want to see the native performance
// Should work with gcc, but might not.
// btw Opening the file in Visual Studio broke the whole formating
#include <string>
#include <chrono>
#include <vector>
#include <random>
#include <utility>
@binkiklou
binkiklou / Error.sh
Created June 1, 2019 01:05
Munchii, please fix
binkiklou@Windows-10-Max:~/Chirp-Dev/Munchii-Fork/Chirp/Tools/Build$ make
Starting build processs
In file included from ../../Source/Console/Commands.cpp:3:0:
../../Source/Console/../Parser/Parser.h:74:8: error: declaration of ‘Scope Function::Scope’ [-fpermissive]
Scope Scope;
^~~~~
../../Source/Console/../Parser/Parser.h:47:7: error: changes meaning of ‘Scope’ from ‘class Scope’ [-fpermissive]
class Scope
^~~~~
../../Source/Logger/Error.cpp: In function ‘void Log::Error::At(int, std::__cxx11::string)’: