Skip to content

Instantly share code, notes, and snippets.

View coderodde's full-sized avatar

Rodion Efremov coderodde

View GitHub Profile
@coderodde
coderodde / MultiplePermuter.java
Last active January 1, 2024 12:44
Helper data structure for AiGA.
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
public class MultiplePermuter<T> {
private final List<List<T>> data;
private final Deque<Integer> indexStack;
private final List<List<List<T>>> result;
private final int numberOfGroups;
@coderodde
coderodde / MScCourseList.txt
Last active December 12, 2023 08:12
MSc course list
Design and Analysis of Algorithms - 5 / 5
Distributed Systems - 5 / 10
Introduction to Machine Learning - 5 / 15
Master's thesis - 30 / 45 TODO
CSC - 5 / 50 TODO
String processing algorithms - 5 / 55
Data Compression Techniques - 5 / 60
Seminar on Tractability - 3 / 63
Seminar on Combinatorial Pattern Matching - 3 / 66
Tiedon louhinta - 5 / 71
@coderodde
coderodde / RegexParserResearch.java
Last active November 15, 2023 10:31
Regex parsing research
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
class RegexParserResearch {
public static Deque<Token> shuntingYardAlgorithm(String regex) {
List<Token> tokens = tokenize(regex);
Deque<Token> output = new ArrayDeque<>();
@coderodde
coderodde / ThreadPreemption.c
Created October 11, 2023 04:54
The source file for the ThreadPreemptionCounter.
#include <windows.h>
#include <stdio.h>
#define MAX(X, Y) (((X) < (Y)) ? (Y) : (X))
int main() {
ULONGLONG ta = GetTickCount64();
ULONGLONG maximumDuration = 0;
@coderodde
coderodde / main.py
Last active July 20, 2023 10:56
Mod 2B.
# Author: Rodion Efremov
# Version: VIII
# Date: Jul 20, 2023 13:55.
# Info: Fixing stuff.
import os
import pygame
import time
import random
@coderodde
coderodde / mod_artur_2.py
Last active July 16, 2023 12:44
Second ETC mod for Artur.
# Author: Rodion Efremov
# Version: IV
# Date: Jul 16, 2023 15:43.
# Info: Fixing errors.
import os
import pygame
import time
import random
@coderodde
coderodde / etc_class_test.py
Last active July 7, 2023 12:38
Debugging mod for inclusion of Python classes in ETC modes.
# Version: E
# Author: Rodion Efremov
# Date: Jul 7, 2023 15:37
# Info: Debugging mod for inclusion of Python classes in ETC modes.
# What's new: Trying to fix the distribution.
import pygame
import pygame.freetype
import random
@coderodde
coderodde / etc_color_picker_values.py
Last active July 2, 2023 09:59
A test ETC mode for showing the color picker values.
# Version: G
import pygame
import pygame.freetype
RED = (255, 0, 0)
WHITE = (255, 255, 255)
def setup(screen, etc):
pygame.freetype.init()
@coderodde
coderodde / mod_artur.py
Last active July 14, 2023 12:16
The ETC mode for Artur Efremov.
# Author: Rodion Efremov
# Version: XVIII
# Date: Jul 14, 2023 15:13.
# Info: Trying to fix the random LFO.
import os
import pygame
import time
import random
import pygame.freetype
@coderodde
coderodde / rodde_knob_research_mode.py
Last active June 13, 2023 11:59
ETC - Knob research
import os
import pygame
font = None
def setup(screen, etc):
global font
font = pygame.font.SysFont("monospace", 20)
pass