Skip to content

Instantly share code, notes, and snippets.

Light version
Works well when the maximum number of requests per 30 minutes can be sorted with 1 GB of RAM.
On each node, there is an FE and an MSD.
Nodes are indexed from 0 to 99.
MSD
Begin
#lang rzk-1
-- A is contractible there exists x : A such that for any y : A we have x = y.
#def iscontr (A : U) : U
:= ∑ (a : A), (x : A) -> a =_{A} x
-- A is a proposition if for any x, y : A we have x = y
#def isaprop (A : U) : U
:= (x : A) -> (y : A) -> x =_{A} y
"""
Creating a Kubernetes Deployment
"""
import pulumi
from pulumi_kubernetes.apps.v1 import Deployment, DeploymentSpecArgs
import pulumi_kubernetes.core.v1 as k8s
from pulumi_kubernetes.meta.v1 import ObjectMetaArgs, LabelSelectorArgs
from pulumi_kubernetes.provider import Provider
from pulumi import ResourceOptions
@deemp
deemp / A.hs
Created February 12, 2023 07:11
Export constructors to be promoted
module A (P(..)) where
data P = MkP
@deemp
deemp / Database.sol
Last active December 15, 2022 09:42
Database-like contract using solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
contract Database {
struct Table {
string[] columns;
mapping(string => string[]) values;
bool exists;
}
example :: IO ()
example = do
ct <- getPOSIXTime
let
name = "3"
ws =
X.def
& X.atCell (3, 2) ?~ X.Cell (Just 0) (Just $ X.CellDouble 42.0) Nothing Nothing
styleSheet = sheet
where
@deemp
deemp / nix.conf
Created September 28, 2022 14:58
accept-flake-config = false
access-tokens =
allow-dirty = true
allow-import-from-derivation = true
allow-new-privileges = false
allow-symlinked-store = false
allow-unsafe-native-code-during-evaluation = false
allowed-impure-host-deps =
allowed-uris =
allowed-users = *
{-# LANGUAGE DeriveDataTypeable #-}
module ListTemplate where
import Data.Data
import Data.HashMap.Strict
import Prelude hiding (lookup)
data A = A deriving (Data, Typeable, Show)
{-# LANGUAGE LambdaCase #-}
module Lib
where
import Text.Megaparsec
import Data.Void (Void)
import Text.Megaparsec.Char (digitChar)
import Data.Function ((&))
type Parser = Parsec Void String
module Main where
import Prelude
import Affjax as AX
import Affjax.ResponseFormat as AXRF
import Affjax.Web as AW
import Data.Either (hush)
import Data.Maybe (Maybe(..))
import Effect (Effect)