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
URL: http://lichess.org/s8m31hrg | |
1. e4 | |
1... e6 | |
2. d4 | |
2... Nf6 | |
3. Nc3 | |
3... d5 | |
4. e5 | |
4... Nfd7 | |
5. Bb5 |
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
(ns pcg) | |
(defn log [& args] (.log js/console (apply pr-str args))) | |
(log "minimal program") |
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
(ns lichess.problem | |
(:require [dommy.core :as dommy] | |
[cljs.core.async :refer [put! chan <!]]) | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:use-macros [dommy.macros :only [node sel sel1]])) | |
(defn log! [& args] (.log js/console (apply pr-str args))) | |
(defn log-obj! [obj] (.log js/console obj)) | |
(def static-domain (str "http://" (clojure.string/replace (.-domain js/document) #"^\w+" "static"))) |
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
{ | |
"history": "...", | |
"solution": { | |
"c3e4": { | |
"eval": 24, // always positive if white wins | |
"then": { | |
"e8g8": { | |
"eval": 32, | |
"then": { | |
"f3h4": "end", |
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 utils | |
import scala.util.{ Try, Success, Failure } | |
import scala.concurrent.Future | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import akka.actor._ | |
// This actor will perform asynchronous side effects sequentially. | |
// It ensures two effects are not performed at the same time, without blocking. |
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 models.store.prismicDB | |
import scala.util.{ Try, Success, Failure } | |
import scala.concurrent.{ Future, ExecutionContext} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import akka.actor._ | |
// This actor will perform asynchronous side effects sequentially. | |
// It ensures two effects are not performed at the same time, without blocking. |
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
e5c6 | |
d5f4 | |
d2d3 | |
f4e2 | |
c6e7 | |
b7b5 | |
c1g5 | |
e2c3 | |
b2c3 | |
b5a4 win |
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 gainsbar | |
import Dir._ | |
import Tile._ | |
class GainsBot { | |
import GainsBot._ | |
def move(input: Input) = { |
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 lila.puzzle | |
import scala.util.Random | |
import reactivemongo.api.QueryOpts | |
import reactivemongo.bson.{ BSONDocument, BSONInteger } | |
import lila.db.Types.Coll | |
import lila.user.User |
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
ns29899(mongod-2.4.8) lichess> db.puzzle_attempt.aggregate({$group:{_id:'$u', nb:{$sum:1}}},{$sort:{nb:-1}},{$limit:10}) | |
{ | |
"result": [ | |
{ | |
"_id": "rwax_77", | |
"nb": 279 | |
}, | |
{ | |
"_id": "thiago", | |
"nb": 156 |
OlderNewer