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
#!/usr/bin/env python | |
import sys | |
import bibtexparser | |
from bibtexparser.bparser import BibTexParser | |
FIELDS_TO_KEEP = { | |
'*': ['title', 'author', 'year', 'pages', 'ENTRYTYPE', 'ID'], |
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
Show hidden characters
[ | |
{ "keys": ["ctrl+q"], "command": "exit" }, | |
{ "keys": ["ctrl+shift+n"], "command": "new_window" }, | |
{ "keys": ["ctrl+shift+w"], "command": "close_window" }, | |
{ "keys": ["ctrl+o"], "command": "prompt_open_file" }, | |
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" }, | |
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "hh", "h", "ipp", "inl", "m", "mm"]} }, | |
{ "keys": ["ctrl+n"], "command": "new_file" }, | |
{ "keys": ["ctrl+s"], "command": "save" }, |
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
<html> | |
<head> | |
<style media="screen" type="text/css"> | |
#content { | |
margin-top: 2em; | |
font-size: 16pt; | |
font-family: monospace; | |
} | |
#nodes { | |
top: 0px; |
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 Evaluator where | |
--data Expr | |
-- = Lit Int | |
-- | Add Expr Expr | |
class ExprSym e where | |
lit :: Int -> e | |
add :: e -> e -> e |
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 BangPatterns #-} | |
module Main where | |
import Criterion.Main | |
import System.Random | |
data Expr = Literal Int | |
| Add Expr Expr | |
| Var String | |
deriving (Eq, Show) |
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 EventSourcing where | |
import Control.Monad.State | |
data Command = CreateToDoItemCommand { cmdTodoId :: String, cmdDescription :: String } | |
| MarkCompletedCommand { cmdTodoId :: String } | |
deriving (Eq, Ord, Show) | |
data Event = ToDoItemCreatedEvent { evtTodoId :: String, evtDescription :: String } | |
| ToDoItemCompletedEvent { evtTodoId :: String } |
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
import java.util.concurrent.Executor | |
import scala.collection.mutable | |
import scala.concurrent._ | |
import scala.util.{Success, Failure} | |
implicit val synchronousExecutionContext = ExecutionContext.fromExecutor(new Executor { | |
def execute(task: Runnable) = task.run() | |
}) | |
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 Set where | |
import Control.Applicative | |
import Control.Monad.State | |
import Data.List | |
import Data.Maybe | |
import Data.Ord | |
import System.Random | |
data Colour = Red | Purple | Green deriving (Eq, Enum, Ord, Bounded, Show) |
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, FlexibleInstances #-} | |
module SQL where | |
import Control.Applicative | |
import Database.SQLite3 | |
import Data.Function | |
import Data.Int | |
import Data.Text | |
dbname = "chinook.sqlite" |
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
case class Env() | |
case class A(env: Env, b: B) | |
case class B() | |
trait Serialisation[T, U, -C] { | |
def serialised(obj: T): U | |
def deserialised(obj: U, context: C): T | |
} |
NewerOlder