First we need lsusb
command from the usbutils
package.
> nix-env -i usbutils
> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 011: ID 0403:6001 FTDI FT232 USB-Serial (UART) IC
Disclaimer 1: Type classes are great but they are not the right tool for every job. Enjoy some balance and balance to your balance.
Disclaimer 2: I should tidy this up but probably won’t.
Disclaimer 3: Yeah called it, better to be realistic.
Type classes are a language of their own, this is an attempt to document features and give a name to them.
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
-- http://www.cs.ox.ac.uk/ralf.hinze/SSGIP10/AdjointFolds.pdf | |
-- http://www.cs.ox.ac.uk/ralf.hinze/publications/SCP-78-11.pdf | |
-- https://www.cs.ox.ac.uk/people/nicolas.wu/papers/URS.pdf | |
-- https://arxiv.org/pdf/2202.13633.pdf | |
{-# LANGUAGE | |
MultiParamTypeClasses | |
, FunctionalDependencies | |
, GADTs | |
, PolyKinds |
module Printf | |
%default total | |
data Format = FInt Format -- %d | |
| FString Format -- %s | |
| FOther Char Format -- [a-zA-Z0-9] | |
| FEnd -- | |
format : List Char -> Format |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-} | |
import Data.Monoid | |
import Data.Monoid.Action | |
import Data.Monoid.MList (SM(..)) | |
import Control.Monad.Trans.Class | |
newtype UpdateT p s m a = UpdateT { runUpdateT :: s -> m (p, a) } |
[00:24] fumieval (~fumieval@124x39x126x66.ap124.ftth.ucom.ne.jp) joined the channel. | |
[00:25] nushio3 (7c277e42@gateway/web/freenode/ip.124.39.126.66) joined the channel. | |
[00:25] nushio3: hi there! | |
[00:26] edwardk: hello, hello! | |
[00:27] hiratara (~hiratara@h223020.dynamic.ppp.asahi-net.or.jp) joined the channel. | |
[00:27] fumieval: hi | |
[00:28] carter: hello everyone! Wait, is this the presentation room now? | |
[00:30] edwardk: Yep | |
[00:30] carter: enjoy! | |
[00:30] tanakh_ (~tanakh@124x39x126x66.ap124.ftth.ucom.ne.jp) joined the channel. |