Skip to content

Instantly share code, notes, and snippets.

View ornicar's full-sized avatar
💭
⏚⏚⏚⏚

Thibault Duplessis ornicar

💭
⏚⏚⏚⏚
View GitHub Profile
/* Generates and saves a new generation of puzzle paths.
* Drops the previous generation.
*
* mongo <IP>:<PORT>/<DB> mongodb-puzzle-regen-paths.js
*
* Must run on the puzzle database.
* Should run every 60 minutes.
* Should complete within 3 minutes.
* OK to run many times in a row.
* OK to skip runs.
ACDC Discography
Afro Celt Sound System - Volume 2 - Release (1999)
Air - [1997] - Premiers Symptomes
Air - [1998] - Moon Safari
Air - [2012] - Le Voyage Dans La Lune
AL DI MEOLA, JOHN MCLAUGHLIN & PACO DE LUCIA - [9999] - Friday Night In San Francisco
AMERICA - [1972] - America
Amon Amarth - Discography
AMON TOBIN - [1997] - Bricolage
AMON TOBIN - [1998] - Permutation
{
"round": {
"finished": true,
"id": "MGYFuHDE",
"name": "Round 9",
"slug": "round-9",
"startsAt": 1682566200000
},
"study": {
"writeable": true
@ornicar
ornicar / browser-ndjson-stream-reader.js
Last active November 9, 2023 19:02
Read a ND-JSON stream from the browser or from nodejs
/* FOR THE BROWSER
Utility function to read a ND-JSON HTTP stream.
`processLine` is a function taking a JSON object. It will be called with each element of the stream.
`response` is the result of a `fetch` request.
See usage example in the next file.
*/
const readStream = processLine => response => {
const stream = response.body.getReader();
const matcher = /\r?\n/;
type Email = String
case class User(username: String, givenName: String, familyName: String, email: Email)
sealed abstract class Role(user: User, course: Course)
case class Student(user: User)
case class StudentInCourse(user: User, course: Course) extends Role(user, course)
[Event "Norway Chess"]
[Site "-"]
[Date "2023.05.31"]
[Round "3"]
[WhiteTitle "GM"] [White "Carlsen, Magnus"]
[Black "So, Wesley"]
[Result "*"]
[Board "1"]
[WhiteClock "01:03:52"]
[WhiteElo "2853"]
{"fishnet":{"version":"2.6.10","apikey":"offline"},"stockfish":{"flavor":"nnue"},"analysis":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,{"pv":"f2c5 e7f7 g3f2 d8d5 b5f1 d5e5 e1e5 c7d5 c5d4 f6e7 h2h3 e7d7 f1b5 d7d6 b5d3 d6c7 g1h2","score":{"cp":244},"depth":24,"nodes":3000675,"time":2099,"nps":1429573},{"pv":"d8d2","score":{"cp":-92},"depth":27,"nodes":3000840,"time":2029,"nps":1478974},{"pv":"e5e2","score":{"cp":104},"depth":26,"nodes":3000618,"time":2019,"nps":1486190},{"pv":"e7d7","score":{"cp":-35},"depth":23,"nodes":3000941,"time":2037,"nps":1473216},{"pv":"e5e2","score":{"cp":56},"depth":23,"nodes":3000750,"time":2041,"nps":1470235},{"pv":"d2g2
/* Generates and saves a new generation of puzzle paths.
* Drops the previous generation.
*
* mongo <IP>:<PORT>/<DB> mongodb-puzzle-regen-paths.js
*
* Must run on the puzzle database.
* Should run every 60 minutes.
* Should complete within 3 minutes.
* OK to run many times in a row.
* OK to skip runs.
751094:2023-05-02 08:00:18,391 INFO streamer onYouTubeVideo 44Fawd2A1bI on channel UCX6vJsr5GZtCQjt04x4r5nQ
751431:2023-05-02 08:00:30,030 INFO streamer onYouTubeVideo E_Trsz9uPvU on channel UCd_jjprIf7VTo_dyppgJa5Q
752713:2023-05-02 08:01:09,120 INFO streamer onYouTubeVideo E_Trsz9uPvU on channel UCd_jjprIf7VTo_dyppgJa5Q
784490:2023-05-02 08:16:40,306 INFO streamer onYouTubeVideo vOqBIlgwUiI on channel UCZtoPvVXUti0miYvFbqWYpg
810648:2023-05-02 08:28:44,990 INFO streamer onYouTubeVideo ujHdXmqYVNw on channel UC_kLDzb4R1o0UWYJ3OQ8oZg
811580:2023-05-02 08:29:12,307 INFO streamer onYouTubeVideo ujHdXmqYVNw on channel UC_kLDzb4R1o0UWYJ3OQ8oZg
847673:2023-05-02 08:45:19,788 INFO streamer onYouTubeVideo DAQy1n1Nnlk on channel UCR_vp7nyUe0uPy-vxZmmaWQ
847770:2023-05-02 08:45:22,615 INFO streamer onYouTubeVideo DAQy1n1Nnlk on channel UCR_vp7nyUe0uPy-vxZmmaWQ
850013:2023-05-02 08:46:20,540 INFO streamer onYouTubeVideo 1zk-TvqOgvM on channel UCG_RI1W4SkOf60Aywri8F2Q
865007:2023-05-02 08:52:35,350 INFO stream
[lila] $ clean
[success] Total time: 0 s, completed Apr 19, 2023, 12:10:26 PM
[lila] $ project tree
[info] set current project to tree (in build file:/home/thib/lila/)
tree> compile
[info] compiling 54 Scala sources and 1 Java source to /home/thib/lila/modules/common/target/scala-3.3.0-RC4/classes ...
[info] compiling 3 Scala sources to /home/thib/lila/modules/tree/target/scala-3.3.0-RC4/classes ...
java.lang.AssertionError: NoDenotation.owner while running checkUnusedPostInlining on /home/thib/lila/modules/tree/src/main/Eval.scala