forked from lichess-org/lila
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into autocomplete
- Loading branch information
Showing
236 changed files
with
1,330 additions
and
912 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
sudo: false | ||
language: scala | ||
|
||
# https://docs.travis-ci.com/user/notifications/#IRC-notification | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,10 @@ drop us an email at [email protected] and we'll discuss it. | |
|
||
### API Limits | ||
|
||
To respect the API servers and avoid an IP ban, please wait 1 second between requests. If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. | ||
To respect the API servers and avoid an IP ban, please wait 1 second between requests. | ||
If you receive an HTTP response with a [429 status](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429), please wait a full minute before resuming API usage. | ||
|
||
Please do not automate computer analysis requests. They're very expensive. | ||
|
||
### `GET /api/user/<username>` fetch one 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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
var puzzles = db.puzzle; | ||
var count = 0; | ||
|
||
function depthOf(obj) { | ||
var level = 1; | ||
var key; | ||
|
||
for (key in obj) { | ||
if (!obj.hasOwnProperty(key)) continue; | ||
|
||
if (typeof obj[key] === 'object') { | ||
var depth = depthOf(obj[key]) + 1; | ||
level = Math.max(depth, level); | ||
} | ||
} | ||
return level; | ||
} | ||
|
||
puzzles.find({ | ||
"mate": true, | ||
"_id": { | ||
"$gt": 60120 | ||
}, | ||
'vote.sum': { | ||
'$gt': -8000 | ||
} | ||
}).forEach(function(p) { | ||
var depth = depthOf(p); | ||
if (depth % 2 === 1) { | ||
count++; | ||
puzzles.update({ | ||
_id: p._id | ||
}, { | ||
$set: { | ||
vote: { | ||
up: NumberInt(0), | ||
down: NumberInt(9000), | ||
sum: NumberInt(-9000) | ||
} | ||
} | ||
}); | ||
print(p._id); | ||
} | ||
}); | ||
print("Disabled " + count + " puzzles"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
var puzzles = db.puzzle; | ||
var count = 0; | ||
puzzles.find().forEach(function(p) { | ||
var parts = p.fen.split(/\s/); | ||
var pieceCount = parts[0].split(/[nbrqkp]/i).length - 1; | ||
if (pieceCount < 9 && p.vote.sum < 50 && p.vote.sum > -1000) { | ||
count++; | ||
puzzles.update({ | ||
_id: p._id | ||
}, { | ||
$set: { | ||
vote: { | ||
up: NumberInt(0), | ||
down: NumberInt(0), | ||
sum: NumberInt(-9000) | ||
} | ||
} | ||
}); | ||
} | ||
}); | ||
print("Disabled " + count + " puzzles"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
var coll = db.puzzle; | ||
coll.find({_id:{$lt:60120},'vote.sum':{$gte:100}}).sort({_id:1}).forEach(function(p) { | ||
if (coll.count({fen:p.fen}) == 1) { | ||
var nextId = coll.find({},{_id:1}).sort({_id:-1}).limit(1)[0]._id + 1; | ||
p.salvaged = NumberInt(p._id); | ||
p._id = NumberInt(nextId); | ||
print(p.salvaged + ' -> ' + p._id); | ||
coll.insert(p); | ||
} | ||
}); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,10 @@ net { | |
ip = "5.196.91.160" | ||
asset { | ||
domain = ${net.domain} | ||
version = 1126 | ||
version = 1141 | ||
} | ||
email = "[email protected]" | ||
crawlable = false | ||
} | ||
forcedev = false | ||
play { | ||
|
@@ -217,6 +218,7 @@ bookmark { | |
} | ||
analyse { | ||
collection.analysis = analysis2 | ||
collection.requester = analysis_requester | ||
net.domain = ${net.domain} | ||
cached.nb.ttl = ${game.cached.nb.ttl} | ||
paginator.max_per_page = ${game.paginator.max_per_page} | ||
|
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
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
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
Oops, something went wrong.