Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am centrinia on github.
  • I am centrinia (https://keybase.io/centrinia) on keybase.
  • I have a public key whose fingerprint is 323C F1FE 64B4 F3CF C2E3 041D 7B34 CAF1 BA17 EE35

To claim this, I am signing this object:

/* bf.cc */
#include <iostream>
#include <fstream>
#include <vector>
typedef char heap_type;
int main(int argc, char** argv) {
std::ifstream in;
@Centrinia
Centrinia / caseflipper.c
Last active April 18, 2016 05:19
Flip Case
#include <stdio.h>
#if 0
unsigned int flip_case(unsigned int c)
{
unsigned int lower = ((('A' - 1 - c) & (c - 'Z' - 1)) >> 8) & 1;
unsigned int upper = ((('a' - 1 - c) & (c - 'z' - 1)) >> 8) & 1;
unsigned int to_lower = (-upper) & ('A' - 'a');
#!/usr/bin/python3
#import png
import itertools
import time
import numpy as np
import math
import random
import os
.code16
start:
/* Set the palette. */
#define WARM 0x1010e0
#define HOT 0xe4e0ff
/* Switch into mode 0x13. */
#include <vector>
#include <string>
#include <iostream>
struct LispValue {
enum ValueType {
Atom,
List,
DottedList,
.globl sort
sort:
push %ebp
mov %esp, %ebp
pushl %esi
pushl %ebx
1:
#include <complex>
#include <cstdlib>
#include <iostream>
#include <fstream>
typedef double number_t;
typedef std::complex<number_t> complex_t;
void evaluate_derivative(complex_t& y, complex_t& yp, const complex_t* ap, const int n, const complex_t& x) {
0, 1, 5, 13, 41, 53, 55, 60, 61, 90, 97, 169, 185, 193, 215, 265, 269, 353, 355, 385, 397, 437,
481, 493, 617, 629, 630, 653, 713, 750, 769, 780, 889, 905, 960, 1013, 1025, 1045, 1205, 1320,
1405, 1435, 1501, 1620, 1650, 1657, 1705, 1735, 1769, 1793, 1913, 1981, 2125, 2153, 2280, 2297,
2389, 2413, 2460, 2465, 2509, 2533, 2549, 2609, 2610, 2633, 2730, 2749, 2845, 2893, 2915, 3041,
3055, 3155, 3209, 3360, 3475, 3485, 3521, 3641, 3721, 3749, 3757, 3761, 3840, 3865, 3929, 3941,
4075, 4273, 4301, 4650, 4937, 5195, 5209, 5435, 5489, 5490, 5700, 5917, 6169, 6253, 6335, 6361,
6373, 6401, 6581, 6593, 6701, 6750, 6941, 7021, 7349, 7577, 7595, 7693, 7740, 7805, 7873, 8009,
8017, 8215, 8341, 8495, 8737, 8861, 8970, 8995, 9120, 9133, 9181, 9269, 9277, 9535, 9541, 9737,
9935, 9953, 10297, 10609, 10789, 10855, 11317, 11809, 12029, 12175, 12353, 12461, 12565, 12805,
12893, 13855, 14381, 14550, 14935, 15055, 15115, 15289, 15637, 15709, 16177, 16789, 16837, 17065,
@Centrinia
Centrinia / topologies.txt
Last active October 27, 2016 01:29
Finite Topologies
1 distinct topologies for 0 unlabeled elements
[{}] T0
1 distinct topologies for 1 unlabeled elements
[{}, {0}] T0
3 distinct topologies for 2 unlabeled elements
[{}, {0, 1}]