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
$ docker run -p 5150:5150 scalacenter/scastie-sbt-runner:bb732e5b7e99d977ec80a44567f1751e6b5e1fd1-dirty | |
... | |
[WARN] [08/04/2017 15:21:30.749] [New I/O boss #3] [NettyTransport(akka://Runner)] Remote connection to null failed with java.net.ConnectException: Connection refused: /127.0.0.1:15000 | |
[WARN] [08/04/2017 15:21:30.752] [Runner-akka.remote.default-remote-dispatcher-7] [akka.tcp://Runner@127.0.0.1:5150/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FWeb%40127.0.0.1%3A15000-2] Association with remote system [akka.tcp://Web@127.0.0.1:15000] has failed, address is now gated for [5000] ms. Reason: [Association failed with [akka.tcp://Web@127.0.0.1:15000]] Caused by: [Connection refused: /127.0.0.1:15000] | |
[INFO] [08/04/2017 15:21:30.758] [Runner-akka.actor.default-dispatcher-3] [akka.tcp://Web@127.0.0.1:15000/temp/$a] Message [com.olegych.scastie.api.SbtPong$] from Actor[akka://Runner/user/SbtActor#5867794] to Actor[akka.tcp://Web@127.0.0.1:15000/temp/$a] was not delivered. [3] dead letters encou |
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
Dmitriis-MacBook-Pro:scastie dmitriipetukhov$ docker rm $(docker ps -a -f status=exited -q) | |
21ad02816abb | |
cdd4876378c7 | |
Dmitriis-MacBook-Pro:scastie dmitriipetukhov$ docker run --network=host scalacenter/scastie-sbt-runner:e1ca58b04ac982a784818d01849541f4d0e9166a-dirty | |
18:06:19.432 INFO SbtMain:18 | Starting sbtRunner pid: 1 | |
18:06:19.462 WARN com.getsentry.raven.dsn.Dsn:90 | Couldn't find a suitable DSN, defaulting to a Noop one. | |
18:06:21.173 INFO akka.event.slf4j.Slf4jLogger:92 | Slf4jLogger started | |
18:06:21.508 INFO akka.remote.Remoting:83 | Starting remoting | |
18:06:21.915 INFO akka.remote.Remoting:83 | Remoting started; listening on addresses :[akka.tcp://SbtRemote@127.0.0.1:5150] | |
18:06:21.919 INFO akka.remote.Remoting:83 | Remoting now listens on addresses: [akka.tcp://SbtRemote@127.0.0.1:5150] |
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
71:~ dmitriipetukhov$ docker exec -it 70e9d71092e1 bash | |
bash-4.3# | |
bash-4.3# ls | |
RUNNING_PID dev lib mnt root srv usr | |
app etc linuxrc output.log run sys var | |
bin home media proc sbin tmp | |
bash-4.3# cd /tmp/scastie1529165791252604347/ | |
bash-4.3# ls | |
build.sbt project src target | |
bash-4.3# ls -la |
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
val req = WebSocketRequest(uri = "ws://127.0.0.1/ws") | |
val webSocketFlow = Http().webSocketClientFlow(req) | |
val messageSource: Source[Message, ActorRef] = | |
Source.actorRef[TextMessage.Strict](bufferSize = 10, OverflowStrategy.fail) | |
val messageSink: Sink[Message, NotUsed] = | |
Flow[Message] | |
.map(message => println(s"Received text message: [$message]")) | |
.to(Sink.ignore) |
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
=========================================== | |
========= Basic facade for Monaco ========= | |
=========================================== | |
package monaco | |
import org.scalajs.dom.raw.HTMLElement | |
import scala.scalajs.js | |
import scala.scalajs.js.UndefOr |
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
<!DOCTYPE html> | |
<html> | |
<head></head> | |
<body> | |
<div id="container" style="width:800px;height:600px;border:1px solid grey"></div> | |
<script src="monaco-editor/min/vs/loader.js"></script> | |
<script> | |
require.config({ paths: { 'vs': 'monaco-editor/min/vs' }}); |
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
diff --git a/build.sbt b/build.sbt | |
index 0af6612..90f2908 100644 | |
--- a/build.sbt | |
+++ b/build.sbt | |
@@ -188,7 +188,7 @@ lazy val scastie = project | |
balancer, | |
instrumentation, | |
sbtRunner, | |
- codemirror, | |
+ monaco, |
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
#!/usr/local/bin/python | |
# -*- coding: utf-8 -*- | |
import codecs | |
import re | |
import string | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from sklearn.neighbors import KNeighborsClassifier | |
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 time | |
from collections import defaultdict | |
from math import log | |
DEBUG = False | |
# number of good users to read from file | |
USER_COUNT = 1000 | |
NUM_SONG_PER_USER = 100 | |
TRAIN_FILE = 'train_triplets.txt' |
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 numpy as np | |
from sklearn.naive_bayes import GaussianNB | |
from sklearn.cluster import KMeans | |
import hdf5_getters as h5 | |
import glob | |
import os | |
from math import log |
NewerOlder