Skip to content

Instantly share code, notes, and snippets.

View RouNNdeL's full-sized avatar
:shipit:

Krzysztof Zdulski RouNNdeL

:shipit:
  • Warsaw
View GitHub Profile
@RouNNdeL
RouNNdeL / spotify.py
Last active January 30, 2022 12:21
A simple script to fetch spotify song audio features and use a regression forest to predict it's year
#!/usr/bin/env python3
import enum
import spotipy
import os
import numpy as np
from typing import List
from regtree.tree import RandomForest
@RouNNdeL
RouNNdeL / filter_wordlist.c
Created June 18, 2020 12:30
Word list prefix filter
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
bool matches(const char *pre, const char *str) {
return strncmp(pre, str, strlen(pre)) == 0;
}
int main(int argc, char *argv[]) {
if (argc < 4) {
@RouNNdeL
RouNNdeL / animate.py
Last active June 11, 2020 09:14
Quaternions
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from IPython.display import HTML
import matplotlib.animation as animation
import numpy as np
import quaternion
def q(phi, v):
@RouNNdeL
RouNNdeL / apro2_bomberman.md
Last active May 6, 2020 17:37
Zgłoszenie projektu własnego w ramach przedmiotu APRO2 - Zdulski, Grzybowski, Walusiak

Projekt własny Bomberman

Założenia wstępne

Stworzenie gry multiplayer rozgrywanej w czasie rzeczywistym pomiędzy 2-4 graczy. Gra polega stawianiu bomb w celu niszczenia przeszkód na planszy, aby dostać się do pozostałych graczy, w celu ich neutralizacji. Żeby zwiększyć dynamikę rozgrywki ze zniszczonych przeszkód, istnieje szansa otrzymania bonusów, m.in.:

@RouNNdeL
RouNNdeL / railcraft-tank-bug-client.log
Created April 13, 2020 16:32
Railcraft iron tank bug
This file has been truncated, but you can view the full file.
[17:54:32] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:54:32] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[17:54:32] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[17:54:32] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2847 for Minecraft 1.12.2 loading
[17:54:32] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_241, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_241
[17:54:33] [main/WARN] [FML]: The coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin) is not signed!
[17:54:33] [main/WARN] [FML]: The coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin) is not signed!
[17:54:33] [main/INFO] [FML]: Searching C:\Users\krzys\Games\MultiMC\instances\Tekxit-3-v0.971-MultiMC\.minecraft\mods for mods
[17:54:33] [main/INFO] [FML]: Searchi
---- Minecraft Crash Report ----
// You should try our sister game, Minceraft!
Time: 2020-04-04 20:23:09 CEST
Description: Ticking player
java.lang.UnsupportedOperationException
at com.google.common.collect.UnmodifiableIterator.remove(UnmodifiableIterator.java:46)
at crazypants.enderio.base.item.darksteel.upgrade.direct.DirectUpgrade.doDirect(DirectUpgrade.java:161)
at crazypants.enderio.base.item.darksteel.upgrade.direct.DirectUpgrade.blockDropEvent(DirectUpgrade.java:79)
@RouNNdeL
RouNNdeL / main.cpp
Last active March 11, 2020 22:17
Lora sesnor
#include <Arduino.h>
#include <MKRWAN.h>
#include "secrets.h"
LoRaModem modem;
#define ITERATION_DELAY 120000 // 1 min
#define DEBUG 0
#if DEBUG
@RouNNdeL
RouNNdeL / calculator.js
Last active January 14, 2020 23:20
One of my first programs (2013)
var pr = 365;
var sy = 200;
var sx = 120;
var a1 = 0;
var a = 0;
var ap = a;
var b1 = 0;
var b = 0;
var bp = b;
var c = 0;
@RouNNdeL
RouNNdeL / main.c
Created December 11, 2019 17:00
ESP8266 Piano - Quick and dirty
#include <Arduino.h>
#include <ESP8266WebServer.h>
#include "config.h"
#define PIN_BUZZER 4
ESP8266WebServer server(80);
volatile int freq = 500;
@RouNNdeL
RouNNdeL / pdf2bwPngs.py
Created December 2, 2019 22:54
Ugly script to generate B&W PNGs from a pdf
import glob, os
import pdf2image
from PIL import Image, ImageEnhance
import PIL.ImageOps
file = input("File:")
dpi = int(input("DPI:"))
i = 0;
dir = "d_"+file
if not os.path.exists(dir):