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 java.nio.file.Paths | |
import org.platanios.tensorflow.api._ | |
import org.platanios.tensorflow.api.learn.Mode | |
import org.platanios.tensorflow.api.learn.layers.Layer | |
import org.platanios.tensorflow.api.ops.variables.RandomNormalInitializer | |
object Autoencoder2 { | |
case class IrisFlowerRecord(sepalLength: Float, sepalWidth: Float, petalLength: Float, petalWidth: Float, irisClass: String) |
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 NoImplicitPrelude #-} | |
module Example where | |
import qualified Prelude as P | |
foo :: (P.Int, P.Int) -> P.Int | |
foo t = fst t where fst = P.fst | |
foo2 :: (P.Int, P.Int) -> P.Int |
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
module LocAt where | |
import Prelude | |
bla :: [Integer] | |
bla = [x | x <- [1,10]] | |
{- | |
loc-at /home/rik/projects/haskellbook/src/LocAt.hs 6 8 6 9 x | |
/home/rik/projects/haskellbook/src/LocAt.hs:(6,12)-(6,13) |
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
In Scala I can do: | |
Option<Response> responseForTransaction = Option(getResponseForTransaction(transaction)) | |
responseForTransaction match { | |
case Some(r) => // do something with r | |
case None => .... | |
} | |
In Javaslang I tried this: | |
Option<Response> responseForTransaction = getResponseForTransaction(transaction); | |
Match(responseForTransaction).of( |
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 DeriveGeneric #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
module LocAt where | |
import Prelude | |
import Data.Aeson | |
import Data.Text | |
import GHC.Generics | |
data User = |
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
module Data.Action where | |
import Data.Array | |
import Data.Monoid | |
class (Monoid m) <= Action m a where | |
act :: m -> a -> a | |
instance numberSemigroup :: Semigroup Number where | |
(<>) x y = x * y |