Skip to content

Instantly share code, notes, and snippets.

{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
module Data.DiscreetDistribution where
import Control.Monad.Trans.Free
import Control.Monad
newtype DiscreetDistribution a = DiscreetDistribution {
unDD :: [(a, Double)]
import socket
UDP_IP = "127.0.0.1"
UDP_PORT = 5005
MESSAGE = b"Hello, World!"
print("UDP target IP: %s" % UDP_IP)
print("UDP target port: %s" % UDP_PORT)
print("message: %s" % MESSAGE)
for dir in ~/.vscode-server/bin/*; do
rm $dir/node
nix-build "<nixpkgs>" -A nodejs-18_x
ln -s $PWD/result/bin/node $dir/node
done
@elikoga
elikoga / replit.py
Last active May 3, 2023 23:50
Running the replit model on my machine gives this:
print("start")
import time
import datetime
start_dt = datetime.datetime.now()
start = start_dt.timestamp()
# format as execution start date, iso8601
print(f"importing time, finished at { start_dt.isoformat() }")
# convert start to float in epoch seconds