Skip to content

Instantly share code, notes, and snippets.

View silky's full-sized avatar

Noon van der Silk silky

View GitHub Profile
Below I collected relevant links and papers more or less pertaining to the subject of tetrahedral meshes.
It's an ever-growing list.
------------------------------
Relevant links:
http://en.wikipedia.org/wiki/Types_of_mesh
http://en.wikipedia.org/wiki/Tetrahedron
http://en.wikipedia.org/wiki/Simplicial_complex
@silky
silky / maps.lean
Created February 10, 2021 12:15 — forked from brendanzab/maps.lean
Total and partial maps in Lean 4 (inspired by Software Foundations)
/-
Total and partial maps
This is inspired by [the relevant chapter in Software Foundations]. Unlike
Software Foundations, these maps are also parameterised over a `Key`
type, which must supply an implementation of `DecidableEq`.
[Software Foundations]: https://softwarefoundations.cis.upenn.edu/lf-current/Maps.html
-/
namespace Maps
@silky
silky / Trolling.hs
Created August 24, 2020 05:55 — forked from i-am-tom/Trolling.hs
Ramda-style composition where the first function must receive all arguments.
{-# LAnguage FlexibleInstances #-}
{-# LANGuage FunctionalDependencies #-}
{-# LANGUAge GADTs #-}
{-# LANGUAGE UndecidableInstances #-}
module Trolling where
---------------------------------------------------------------------
-- VARIADIC COMPOSITION IN HASKELL (A LA RAMDA.JS).
--
-- In Haskell, we typeically think of the composition operator (or
  • managing folders of data
  • saving experiments post-fact
  • waiting for stuff to run
  • easily seeing all your hyper-parameters
  • working out what you've done before
  • trying out different things, and saving them somehow
  • debugging models
  • wanting to visualise various outputs arbitrarily
  • doing things with streaming data?
  • loss landscape visualisation
@silky
silky / linear_diophantine.py
Created January 21, 2020 21:44 — forked from pjt33/linear_diophantine.py
Count solutions to linear Diophantine equations
from collections import Counter
from fractions import Fraction
def _gcd(a, b):
while a:
a, b = b % a, a
return b
{-# LANGUAGE TupleSections #-}
module Main where
import Graphics.Gloss
import Graphics.Gloss.Raster.Field
import System.Random
import Data.Semigroup
import GHC.Base (NonEmpty(..))
{-# LANGUAGE TupleSections #-}
module Main where
import Graphics.Gloss
import Graphics.Gloss.Raster.Field
import System.Random
import Data.Semigroup
import GHC.Base (NonEmpty(..))
@silky
silky / gc.c
Created November 15, 2019 05:26 — forked from sordina/gc.c
Implementation of Baby's first Garbage Collector from http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector
// http://journal.stuffwithstuff.com/2013/12/08/babys-first-garbage-collector/
//
#define STACK_MAX 256
#define INITIAL_GC_THRESHOLD 2
#include <stdio.h>
#include <stdlib.h>
void gc(); // Pre-Declared for co-recursive usage
@silky
silky / streamlit_prodigy.py
Created October 3, 2019 22:24 — forked from ines/streamlit_prodigy.py
Streamlit + Prodigy
"""
Example of a Streamlit app for an interactive Prodigy dataset viewer that also lets you
run simple training experiments for NER and text classification.
Requires the Prodigy annotation tool to be installed: https://prodi.gy
See here for details on Streamlit: https://streamlit.io.
"""
import streamlit as st
from prodigy.components.db import connect
from prodigy.models.ner import EntityRecognizer, merge_spans, guess_batch_size
@silky
silky / streamlit_prodigy.py
Created October 3, 2019 22:24 — forked from ines/streamlit_prodigy.py
Streamlit + Prodigy
"""
Example of a Streamlit app for an interactive Prodigy dataset viewer that also lets you
run simple training experiments for NER and text classification.
Requires the Prodigy annotation tool to be installed: https://prodi.gy
See here for details on Streamlit: https://streamlit.io.
"""
import streamlit as st
from prodigy.components.db import connect
from prodigy.models.ner import EntityRecognizer, merge_spans, guess_batch_size