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 FlexibleContexts #-} | |
{-# LANGUAGE LambdaCase #-} | |
module Data.DiscreetDistribution where | |
import Control.Monad.Trans.Free | |
import Control.Monad | |
newtype DiscreetDistribution a = DiscreetDistribution { | |
unDD :: [(a, Double)] |
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 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) |
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
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 |
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
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 |