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
| # python 3.12 | |
| # pip install torch devinterp matplotlib scikit-learn | |
| import torch | |
| import torch.nn as nn | |
| from torch.utils.data import DataLoader, TensorDataset | |
| from devinterp.slt.callback import SamplerCallback | |
| from devinterp.slt.llc import LLCEstimator | |
| from devinterp.slt.sampler import sample | |
| from devinterp.optim import SGLD |
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
| #!/usr/bin/env stack | |
| -- stack --resolver lts-11.6 script --package containers | |
| module Blockchain where | |
| import Data.Set (Set) | |
| import qualified Data.Set as Set | |
| -- refining just to get measures from data constructors | |
| {-@ data Tx = Tx { tI :: Set Inp, tO :: [Out] } @-} |
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
| #!/usr/bin/env stack | |
| {- stack | |
| script | |
| --resolver lts-11.17 | |
| --package distributed-process | |
| --package network-transport-tcp | |
| --package distributed-process-simplelocalnet | |
| --package pqueue | |
| --package options | |
| --package random |