This file contains 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
{-# LANGUAGE TupleSections #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
-- See also: https://github.com/sordina/non-orthogonal-kd-trees#non-orthogonal-kd-trees | |
module Main where | |
import Graphics.Gloss | |
import Graphics.Gloss.Raster.Field | |
import System.Random |
This file contains 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
-- Hello Agda Enthusiasts! | |
-- Let's play with Agda. | |
-- Firstly, since we're editing demo1A.agda, let's name our module correctly: | |
module demo1A where -- Load the file with C-c C-l - Like that! | |
-- Syntax is highlighted by Emacs |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE LambdaCase #-} | |
module Main where | |
import Data.AttoLisp | |
import Data.Graph.Inductive.Graph | |
import Data.Graph.Inductive.PatriciaTree | |
import Data.GraphViz |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE BlockArguments #-} | |
-- From: https://patchbay.pub | |
-- | |
-- Normal Usage: | |
-- Shell 1: curl localhost:9000/test1 | |
-- Shell 2: curl -s localhost:9000/test1 -X POST -T /dev/stdin | |
-- | |
-- Pub-Sub Usage: |
This file contains 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://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 |
This file contains 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
{-# LANGUAGE BlockArguments #-} | |
module Main where | |
import Data.Char | |
import Data.List.Split | |
import qualified Data.Set | |
main :: IO () |
This file contains 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://gist.github.com/sordina/ea8c66ddcc467f77b58b0af0b5628435 | |
module Lib ( main ) where | |
import Data.Tree | |
import Data.List | |
import System.Environment | |
type Capacity = Int | |
type Level = Int |
This file contains 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://en.wikipedia.org/wiki/APL_syntax_and_symbols | |
# https://code.jsoftware.com/wiki/NuVoc | |
# https://news.ycombinator.com/item?id=8605606 | |
# | |
# | |
# sub asterisk by multiply; | |
# Roll ?B | |
# Ceiling ⌈B >. | |
sub greater period by uni2308; |
This file contains 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
#!/bin/sh | |
if [ ! "$1" ] | |
then | |
echo "Usage: ocr <image-file>" | |
exit | |
fi | |
if [ "x$1" = "x-h" ] | |
then |
This file contains 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
module Main where | |
main :: IO () | |
main = interact (unlines . map (go . read) . lines) | |
go :: Int -> String | |
go n = case term n | |
of [] -> "nothing" | |
[(x,"")] -> numb x | |
xs -> unwords $ map item xs |