This file contains hidden or 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
/* http://redd.it/2z68di */ | |
#define _BSD_SOURCE // MAP_ANONYMOUS | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <sys/mman.h> | |
#define PAGE_SIZE 4096 |
This file contains hidden or 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
#define _BSD_SOURCE // byteswap | |
#include <stdio.h> | |
#include <stdbool.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <endian.h> | |
#define DB_FILE "animals.db" |
This file contains hidden or 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
/* https://oeis.org/A072841 | |
* This is free and unencumbered software released into the public domain. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#define MAX(a, b) ((b) > (a) ? (b) : (a)) |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <inttypes.h> | |
#include <time.h> | |
#include <getopt.h> | |
static uint64_t | |
xorshift(uint64_t *state) | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
/* 1) Immediately prints the base puzzle SVG to stdout. | |
* 2) Creates a path-*.svg each * time it hits a longest path. | |
* 3) Creates a solution-*.svg for each solution. | |
*/ | |
#include <stdio.h> | |
#include <stdint.h> | |
#define WIDTH 8u | |
#define HEIGHT 8u |
This file contains hidden or 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
/* $ cc -std=c99 -Ofast -fopenmp -o julia julia.c -lm | |
* $ ./julia > output.ppm | |
* $ ppmtoy4m -F 60:1 < output.ppm > output.y4m | |
* $ x264 --qp 0 -o output.mp4 output.y4m | |
* | |
* Due to parallel compute, stdout must be seekable. Therefore it | |
* cannot be piped directly into ppmtoy4m. | |
*/ | |
#define IMAGE_SIZE 600 | |
#define IMAX 512 |
This file contains hidden or 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
CC = c99 | |
CFLAGS = -Wall -Wextra -O3 -g3 | |
generate16: generate16.c | |
clean: | |
rm -f generate16 |
This file contains hidden or 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 <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define A 10 | |
#define B 30 | |
#define C 5 | |
#define N 1 | |
#define RULE_B |