Skip to content

Instantly share code, notes, and snippets.

View akx's full-sized avatar
👹
rer

Aarni Koskela akx

👹
rer
View GitHub Profile
/*
The grammar is fed from the output of lexical analysis. The tokens returned from lexical analysis are
CONST BOOL FLOAT INT UINT
BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT
BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 UVEC2 UVEC3 UVEC4 VEC2 VEC3 VEC4
MAT2 MAT3 MAT4 CENTROID IN OUT INOUT UNIFORM
FLAT SMOOTH LAYOUT
MAT2X2 MAT2X3 MAT2X4
MAT3X2 MAT3X3 MAT3X4
<!doctype html>
<html lang="en">
<head>
</head>
<body>
<script>
function sleep(ms = 0) {
return new Promise(r => setTimeout(r, ms));
}
<!doctype html>
<html lang="en">
<head>
</head>
<body>
<script>
function sleep(ms=0) {
return new Promise(r => setTimeout(r, ms));
}
function toggle_class_1(element, name, toggle) {
@akx
akx / results.md
Created May 10, 2023 09:26
ruff-usage-aggregate 2023-05-10
Name Value
Total TOML files 3812
Unique TOML files 3230
Deduplicated TOML files 582
No select 29.8%
No ignore 35.3%
No fixable 91.9%
No unfixable 84.9%
Most popular configured Python version py310
@akx
akx / results.md
Created April 27, 2023 11:50
ruff-usage-aggregate 2023-04-27
Name Value
Total TOML files 3143
Unique TOML files 2628
Deduplicated TOML files 515
No select 29.6%
No ignore 35.8%
No fixable 92.3%
No unfixable 85.1%
Most popular configured Python version py310
@akx
akx / results.md
Created March 28, 2023 12:20
ruff-usage-aggregate 2023-03-28
Name Value
Total TOML files 1982
Unique TOML files 1703
Deduplicated TOML files 279
No select 29.8%
No ignore 36.1%
No fixable 94.2%
No unfixable 85.1%
Most popular configured Python version py310
/*
highlight v5
Highlights arbitrary terms.
<http://johannburkard.de/blog/programming/javascript/highlight-javascript-text-higlighting-jquery-plugin.html>
MIT license.
@akx
akx / results.md
Created March 21, 2023 08:45
ruff-usage-aggregate 2023-03-21
Name Value
Total TOML files 1846
Unique TOML files 1577
Deduplicated TOML files 269
No select 29.4%
No ignore 36.0%
No fixable 94.2%
No unfixable 84.6%
Most popular configured Python version py310
@akx
akx / results.md
Last active March 10, 2023 11:32
ruff-usage-aggregate 2023-03-10
Name Value
Total TOML files 1613
Unique TOML files 1352
Deduplicated TOML files 261
No select 28.7%
No ignore 35.3%
No fixable 94.8%
No unfixable 84.2%
Most popular configured Python version py310
import random
import statistics
import time
def assign_into_groups(
n_people: int,
group_max_sizes: dict[int, set[int]],
) -> dict[int, set[int]]:
groups = [set() for _ in group_max_sizes]