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
[package] | |
name = "specs_saveload_derive" | |
edition = "2018" | |
[dependencies] | |
specs = { version = "0.15.1", features = ["serde", "shred-derive"] } | |
quote = "1.0.2" | |
syn = { version = "1.0.13", features = ["full", "extra-traits"] } | |
proc-macro2 = "1.0.7" |
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
package org.apache.beam.examples.usercount.transformexample; | |
import com.google.cloud.firestore.Firestore; | |
import com.google.cloud.firestore.FirestoreOptions; | |
import com.google.cloud.firestore.WriteBatch; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.concurrent.ExecutionException; | |
import org.apache.beam.examples.usercount.domain.ProgressEvent; |
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
package org.apache.beam.examples.usercount; | |
import com.google.common.base.MoreObjects; | |
import com.google.common.base.Objects; | |
import java.io.Serializable; | |
import org.apache.beam.examples.usercount.ChangeStateTraker.ChangeResult; | |
import org.apache.beam.sdk.coders.AvroCoder; | |
import org.apache.beam.sdk.coders.Coder; | |
import org.apache.beam.sdk.coders.DefaultCoder; | |
import org.apache.beam.sdk.state.StateSpec; |
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
2018-05-08 07:31:21.892 UTC [33] LOG: duration: 924169.808 ms plan: | |
Query Text: create temporary table resolved_by_ltree as | |
select rule_id, rule_pcd, product_leaf_pcd, location_leaf_pcd from | |
(select | |
rule_id, | |
rule_pcd, | |
product_leaf_pcd, | |
location_leaf_pcd, | |
row_number() | |
over ( |
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
Hue | |
--- | |
Spark overview | |
-------------- | |
http://spark-summit.org/wp-content/uploads/2013/10/McDonough-spark-tutorial_spark-summit-2013.pdf | |
Spark libs | |
---------- | |
http://spark-summit.org/2014/training |
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
# Dynamic typing | |
if false | |
"".foo | |
end | |
# Strong typing | |
[] + {} | |
{} + [] | |
{} + "" | |
[] + "" |
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
-- [x] Get input from user | |
-- [x] Do it only every two seconds | |
-- [x] Filter output < 3 | |
-- [x] Send request to server | |
-- [x] Display results to user | |
import Graphics.Input as Input | |
import Maybe | |
import Http as H | |
import Json as J |
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 Graphics.Input as Input | |
import Text as T | |
import Keyboard as K | |
-- utility | |
ith : Int -> [a] -> a | |
ith index = head . drop index | |
replaceIth : [a] -> Int -> (a -> a) -> [a] |
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 Graphics.Input as Input | |
(hashTagField, rawHashTag) = Input.field "Type your hash tag" | |
main = fields | |
fields = above <~ hashTagField ~ (asText <~ hashTag) | |
hashTag : Signal String | |
hashTag = delayed (2*second) [] rawHashTag |
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 Env where | |
import System.IO.Error (isDoesNotExistError) | |
import GHC.IO.Exception (IOException) | |
import System.Environment (getEnv) | |
import Control.Monad.Error (catchError, Error, ErrorT) | |
import Control.Monad ((>=>), liftM) | |
-- Error handler | |
data GenericError = | |
-- wrapper for IOExceptions |
NewerOlder