Skip to content

Instantly share code, notes, and snippets.

View phipsgabler's full-sized avatar

Philipp Gabler phipsgabler

View GitHub Profile
@fonic
fonic / python_dual_log_setup.py
Last active October 30, 2023 11:53
Python dual-logging setup (console and log file) supporting different log levels and colorized output
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# -
# Python dual-logging setup (console and log file), -
# supporting different log levels and colorized output -
# -
# Created by Fonic <https://github.com/fonic> -
# Date: 04/05/20 - 02/07/23 -
-- The meta-circular interpreter from section 5 of Reynolds's Definitional
-- Interpreters for Higher Order Programming Languages
-- (http://www.cs.uml.edu/~giam/91.531/Textbooks/definterp.pdf)
data EXP
= CONST Const
| VAR Var
| APPL Appl
| LAMBDA Lambda
| COND Cond
@ryantanner
ryantanner / poker.scala
Last active December 3, 2015 17:35
First pass at using Shapeless to describe Texas Hold'em. Pocket hand categories are based on Lee Jones' "Winning Texas Hold'em"
package org.ryantanner
import scala.annotation.implicitNotFound
import shapeless._
import Nat._
import ops.nat._
import LTEq._
import GTEq._
import RankGTEq._
@dashed
dashed / github-pandoc.css
Created September 26, 2013 13:42
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/