This file contains hidden or 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.typedexpr; | |
import lombok.Value; | |
import lombok.val; | |
import java.util.function.Function; | |
abstract class Type<T extends Type<T>> { | |
private Type() {} |
This file contains hidden or 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.Value; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Stack; | |
interface Expr<T extends Expr<T>> { |
This file contains hidden or 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; |
This file contains hidden or 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 hidden or 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
function delay(n) { | |
return new Promise(accept => setTimeout(() => accept(), n)); | |
} | |
async function cleanUp() { | |
let xs = Array.from(document.querySelectorAll('[aria-label=Edit]')).slice(0, 10); | |
console.log(xs); | |
xs.forEach(n => n.click()); | |
await delay(1000); | |
This file contains hidden or 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 kata | |
// LastDigit kata | |
func LastDigit(as []int) int { | |
if len(as) == 0 { | |
return 1 | |
} | |
return newModPowBase(&simpleGen{ | |
state: 1, | |
base: as[0], |
This file contains hidden or 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 hidden or 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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Flooring</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
html, body { | |
height: 100%; | |
margin: 0; |
This file contains hidden or 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 hidden or 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 ConstraintKinds #-} | |
{-# Language DataKinds #-} | |
{-# Language FlexibleInstances #-} | |
{-# Language KindSignatures #-} | |
{-# Language MultiParamTypeClasses #-} | |
{-# Language PolyKinds #-} | |
{-# Language RankNTypes #-} | |
{-# Language ScopedTypeVariables #-} | |
{-# Language TypeOperators #-} | |
module Schema where |