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 RankNTypes #-} | |
module Symbolic where | |
data Expr | |
= Var -- x | |
| Lit Double | |
| BinOp BinOp Expr Expr | |
| UnaOp UnaOp Expr | |
deriving (Show, Eq) |
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
package example.playground.ufuture; | |
import com.google.common.util.concurrent.FluentFuture; | |
import com.google.common.util.concurrent.Futures; | |
import com.google.common.util.concurrent.SettableFuture; | |
import lombok.EqualsAndHashCode; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Value; | |
import java.util.concurrent.CompletableFuture; |
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
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<title>Mandala</title> | |
<style type="text/css"> | |
html, body { | |
overflow: hidden; | |
width: 100%; |
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 inspect | |
from typing import Any, Dict, Iterable, List, get_type_hints | |
def linearize_type_hierarchy(root: type) -> Iterable[type]: | |
if root is object: | |
return | |
yield root | |
for node in inspect.getclasstree([root]): | |
if isinstance(node, tuple): |
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
package example.playground; | |
import lombok.RequiredArgsConstructor; | |
import lombok.Value; | |
import lombok.With; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Parameter; | |
import java.util.ArrayList; | |
import java.util.Arrays; |
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
<body style="margin:0"></body> | |
<script src="https://gbrlgrct.com/gists/07d74ba686ce04eccb11faa44f2ae229/functional.js"></script> | |
<script> | |
'use strict'; | |
/* Init */ | |
const SPACEW = document.body.clientWidth; | |
const SPACEH = document.body.clientHeight; |
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
package example.playground.parsec; | |
import lombok.EqualsAndHashCode; | |
import lombok.Value; | |
import lombok.val; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.HashSet; |
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 GADTs #-} | |
{-# Language RankNTypes #-} | |
{-# Language TypeFamilies #-} | |
import Control.Monad | |
--- | |
class Rel a where | |
type Delta a :: * |
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
from abc import ABCMeta, abstractmethod | |
from dataclasses import dataclass | |
from typing import TYPE_CHECKING, Any, Awaitable, Generic, Generator, Iterable, \ | |
List, Tuple, TypeVar, cast | |
### | |
T = TypeVar('T') | |
R = TypeVar('R') |
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
package com.uber.playground; | |
import lombok.NonNull; | |
import lombok.SneakyThrows; | |
import lombok.Value; | |
import org.jetbrains.annotations.Nullable; | |
import java.io.Serializable; | |
import java.lang.invoke.SerializedLambda; | |
import java.lang.reflect.InvocationTargetException; |