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
| package main | |
| import ( | |
| "context" | |
| "database/sql" | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| _ "github.com/lib/pq" |
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
| load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library") | |
| package(default_visibility = ["//visibility:public"]) | |
| scala_library( | |
| name = 'config', | |
| deps = [ | |
| '//3rdparty/jvm/com/typesafe:config', | |
| ], | |
| exports = [ |
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
| options: | |
| languages: ["java", "scala:2.12.8"] | |
| versionConflictPolicy: fixed | |
| resolvers: | |
| - id: "mavencentral" | |
| type: "default" | |
| url: http://central.maven.org/maven2/ | |
| dependencies: | |
| ru.tinkoff: |
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
| load("@io_bazel_rules_scala//scala:scala.bzl", "scala_library", "scala_binary", "scala_test", "scala_test_suite") | |
| scala_binary( | |
| name = 'app_binary', | |
| main_class = 'demo.Main', | |
| deps = [ | |
| ':app' | |
| ] | |
| ) |
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
| package demo | |
| import java.util.concurrent.atomic.AtomicInteger | |
| class IdGenerator { | |
| private val seq = new AtomicInteger(0) | |
| def next(): Int = seq.incrementAndGet() | |
| } | |
| final case class Visitor(id: Int) |
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
| . | |
| ├── BUILD | |
| ├── README.md | |
| ├── WORKSPACE | |
| ├── generate_graph.sh | |
| └── src | |
| └── main | |
| └── scala | |
| └── demo | |
| ├── Conference.scala |
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/python3.6 | |
| import websocket | |
| import json | |
| url = 'wss://api-invest.tinkoff.ru/openapi/md/v1/md-openapi/ws' | |
| sandbox_token = "???" | |
| def do_nothing(event): pass |
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
| def doubleSay(what: String): String = s"$what $what" | |
| def capitalize(what: String): String = what.capitalize | |
| def exclaim(what: String): String = s"$what!" | |
| implicit class PipeOps[A](a: A) { | |
| def |>[B] (f: A => B): B = f(a) | |
| } | |
| "hello" |> doubleSay |> capitalize |> exclaim |
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
| package com.bitbucket.fsm | |
| import akka.actor._ | |
| import akka.persistence.fsm.PersistentFSM | |
| import akka.persistence.fsm.PersistentFSM._ | |
| import akka.stream.ActorMaterializer | |
| import com.bitbucket.fsm.Order._ | |
| import scala.concurrent.Future | |
| import scala.reflect._ |
NewerOlder