Skip to content

Instantly share code, notes, and snippets.

@BiCapitalization
BiCapitalization / antilog.tex
Created December 8, 2018 12:55
An antilog operator in Latex
\documentclass{standalone}
\usepackage{amsmath}
\usepackage{calc}
\usepackage{scalerel}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\newcommand{\antilog}[1]{%
@BiCapitalization
BiCapitalization / fizzbuzz.cpp
Created March 30, 2018 22:29
Compile-time FizzBuzz
#include <cstddef>
#include <type_traits>
#include <utility>
template <typename... T>
struct dummy_type;
template <std::size_t N>
struct u;
@BiCapitalization
BiCapitalization / generate.cpp
Created November 1, 2017 21:02
Shakespeare-esque Markov Chain Drama Generator
/*
*MIT License
*
*Copyright (c) 2017 Ben Steffan
*
*Permission is hereby granted, free of charge, to any person obtaining a copy
*of this software and associated documentation files (the "Software"), to deal
*in the Software without restriction, including without limitation the rights
*to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
*copies of the Software, and to permit persons to whom the Software is
/*
*This program approximates pi using the monte carlo method of counting how
*many points in a square fall into a circle inscribed in it.
*
*The program outputs the deviation from pi for a circle radius from 1 to 10^9
*and a number of points from 1 to 10^7, where consecutive rows represent an
*increase in radius by one power of 10 each and consecutive columns represent
*an increase in number of points by one power of 10, respectively.
*
*Author: Ben Steffan