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
ffmpeg -skip_frame nokey -i *.mp4 -vsync vfr %06d.bmp |
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/bin/zsh | |
python3 fetch_81dojo_games.py ~/81dojo/ && \ | |
cat ~/81dojo/*.json | mongoimport --db=81dojo --collection=kifu |& tail -1 |
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
# Encodes pawns as a bitwise-AND-comparable index (from a SFEN) | |
# Usage: ruby pawn_encoder.rb "lnsgkgsnl/1r5b1/ppppppppp/9/9/9/PPPPPPPPP/1B5R1/LNSGKGSNL" | |
def encode(fen) | |
board = fen.gsub("9"," 8").gsub("8"," 7").gsub("7"," 6").gsub("6"," 5").gsub("5"," 4").gsub("4"," 3").gsub("3"," 2").gsub("2"," 1").gsub("1"," ") | |
# replace 'P' with '1' and replace 'p' with '1' | |
bpawnsA = board.gsub(/[^P\/]/,"0").gsub(/P/,"1").split("/") | |
wpawnsA = board.gsub(/[^p\/]/,"0").gsub(/p/,"1").split("/") | |
# shift black pawns upwards a rank (rotate left) etc. | |
bpawnsB = bpawnsA.rotate(-1) |
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
# | |
# https://github.com/pypa/pipenv/issues/3493#issuecomment-651148507 | |
cat Pipfile.lock \ | |
| grep -B1 '"hashes"\|"version": ' \ | |
| grep -v '"markers": \|"hashes": ' \ | |
| grep ": {\|version" \ | |
| sed -e 's/: {$//g' \ | |
| tr '\n' ',' | tr -s ' ' ' ' \ | |
| sed -e 's/, "version": "//g;s/", "/ /g;s/"//g;s/,//g' \ | |
| tr ' ' '\n' \ |
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
export async function challengeUser( | |
whiteAccessToken: string, | |
blackAccessToken: string, | |
username: string | |
): Promise<ChallengeGame> { | |
const response = await createClient(whiteAccessToken).post< | |
CreateChallengeResponse | |
>( | |
`/api/challenge/${username}`, | |
stringify({ |
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
(function() { | |
function myzoom() { | |
document.body.setAttribute('style', '--zoom:140'); | |
window.lichess.dispatchEvent(window, 'resize'); | |
} | |
window.setInterval(myzoom, 1000); | |
})(); |
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
function play(min,sec){var challenges=$(".challenge");if(arguments.length===0)return challenges.eq(Math.floor(Math.random()*challenges.length)).find(".accept").click();else{challenges=challenges.filter(function(){return $(this).find(".desc").text().search(new RegExp(min+"\\+"+sec))!==-1});if(challenges.length===0)console.log("No challenges matching the specified time control");else{return challenges.eq(Math.floor(Math.random()*challenges.length)).find(".accept").click()}}} |
This file has been truncated, but you can view the full file.
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
var Module = { | |
print: (function(stdout) { | |
postMessage(stdout) | |
}) | |
}; | |
var Module; | |
if (!Module) Module = (typeof Module !== "undefined" ? Module : null) || {}; | |
var moduleOverrides = {}; | |
for (var key in Module) { | |
if (Module.hasOwnProperty(key)) { |
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
#!/bin/bash | |
x=1 | |
clear | |
while [ $? -eq 0 ] | |
do | |
x=$(( $x + 1 )) | |
/home/lila/sl/sl -dew -$x | |
done | |
clear && fortune | cowsay |
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
# -*- coding: utf-8 -*- | |
""" | |
I. About the script | |
1. It takes a pgn file with games in it and analyze those | |
games there one by one if there are more than one game | |
2. It mainly uses Stockfish uci engine during development. | |
Other uci engines can be used provided those engines support | |
multipv mode |
NewerOlder