Skip to content

Instantly share code, notes, and snippets.

View coderodde's full-sized avatar

Rodion Efremov coderodde

View GitHub Profile
@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
@coderodde
coderodde / Heapsort.java
Created May 30, 2023 11:56
Heapsort in Java.
package com.github.coderodde.util;
import java.util.Arrays;
import java.util.Random;
public final class Heapsort {
public static void sort(int[] array) {
if (array.length < 2) {
return;
@coderodde
coderodde / main.cpp
Created May 30, 2023 06:54
CR.NlogNSorting
#include <iostream>
#include <chrono>
#include <random>
#include <iomanip>
#include <cstring>
// coderodde's mergesort:
void coderodde_merge(int* source_array, int* target_array, int source_offset, int target_offset, int left_run_length, int right_run_length) {
int target_index = target_offset;
int left_index = source_offset;
@coderodde
coderodde / Instructions
Created May 13, 2023 18:47
My DOSKEYs.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\Autorun <- DOSKEY /MACROFILE="C:\Users\rodio\setup.doskey"
0.02980 3224
0.03970 2354
0.06940 2340
0.07930 3074
0.08920 3525
0.09910 2074
0.11890 3494
0.12880 3266
0.13870 2216
0.16840 2908