View gist:8cafcefe58dfee31d3a62eacd1f2423c
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
dockerCommands := Source.fromFile(file).mkString | |
.replace("\\\n", "").split("\n") | |
.withFilter(_.nonEmpty).map((line) => { | |
val cmd :: args = line.stripLineEnd.split(" ").toList | |
Cmd(cmd, args.mkString(" ")) | |
}).toSeq |
View FileReader.scala
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.io._ | |
import monix.reactive.Observable | |
object FileReader { | |
def fileObservable(files: Seq[String]): Observable[String] = { | |
Observable.fromIterable(files).flatMap({ file => | |
Observable.fromLinesReader(new BufferedReader(new InputStreamReader(new FileInputStream(file)))) | |
.doOnSubscribe(() => println(s"START [$file]")) | |
.doOnComplete(() => println(s"FINISH [$file]")) | |
}) |
View lda.py
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
file_names = os.listdir(PATH) | |
texts = [] | |
for name in file_names: | |
if name.endswith(".txt"): | |
with codecs.open(PATH + "/" + name, encoding = 'utf-8') as f: | |
print(name) | |
text = f.read() | |
lst = re.findall(r'\w+', text) | |
words = [] | |
for word in lst: |
View gist:e60e16d291645d8b9da403ea0f4d5689
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
<yandex> | |
<interserver_http_port>9009</interserver_http_port> | |
<remote_servers> | |
<test_dmp_rt> | |
<shard> | |
<replica> | |
<host>clickhouse-server_1</host> | |
<port>9009</port> | |
</replica> | |
<replica> |
View response.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
select version() | |
SELECT version() | |
┌─version()─┐ | |
│ 19.15.3.6 │ | |
└───────────┘ | |
1 rows in set. Elapsed: 0.008 sec. |
OlderNewer