This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
threads=1 | |
task-workers=0 | |
out-of-order-eval=false | |
max-prefetch=0 | |
minibatch-size=1 | |
nncache=0 | |
smart-pruning-factor=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <complex.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <tgmath.h> | |
#define SR 44100 | |
#define SIMPLE_HARMONIC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define W (1080 / 2) | |
#define H (1920 / 2) | |
#define MAX_HEADER 128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#ifdef __SIZEOF_INT128__ | |
typedef __uint128_t block_t; | |
#else | |
#warning "128-bit integers not supported, using 64-bit blocks!" | |
typedef uint64_t block_t; | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from collections import defaultdict | |
with open("input.txt", "r", encoding="utf8") as file: | |
data = [[int(char) for char in line.strip()] for line in file.readlines()] | |
S = 5 | |
W, H = len(data), len(data[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sed -Enf | |
# Note: this code is intended for GNU sed, other implementations of sed might have issues running it. | |
# | |
# Usage: | |
# $ ./day_1.sed < ./input.txt | |
G | |
s/\n/;/m | |
h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define W 1920 | |
#define H 1080 | |
const double start_x = 0.1; | |
const double start_y = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile with: | |
// $ gcc -Ofast -march=native -fopenmp ./CA.c -o CA | |
// Output is stream of PPM frames that can be played with mpv: | |
// $ ./CA | mpv - --scale=nearest | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <time.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Finite-difference code for 2D Kuramoto-Sivashinsky equation. | |
// | |
// Uses isotropic stencils for spatial discretization and | |
// RK4 for time stepping. | |
// | |
// Should have O(h^4) error in time and space. | |
// | |
// Compile with: | |
// $ gcc -Ofast -march=native -fopenmp ./ks.c -o ks -lm | |
// View the simulation using mpv: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compile with: | |
// $ gcc -Ofast -march=native -fopenmp ./cahn_hilliard.c -o cahn_hilliard -lm | |
// View the simulation using mpv: | |
// $ ./cahn_hilliard | mpv - --scale=ewa_lanczossoft --fs | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <math.h> | |
#include <stdbool.h> |
NewerOlder