This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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
| % Crazyhouse variant testsuite from https://chessvariants.training/ | |
| r6k/pppq2pp/3pp3/4p3/3nP1BP/2NPK1P1/PPP5/3R4[RBBNNPqrb] b - - bm B@f4+ | |
| rnb2r2/ppp3p1/4kp2/4pp1Q/3P4/8/PPP2PPP/R1B1KBNR[QBPPnn] w KQ - bm Bc4+ B@d5+ | |
| rnbk4/ppp1bp1p/8/4P3/4p3/2N5/PPP2PPP/R1B1KBNR[QRNPPqp] w KQ - bm Q@h8+ Q@g8+ | |
| r7/p1p1b1rp/b3kn2/4p1P1/3pP1n1/2NP2P1/PPP2pKP/R1BQ3R[QNPPb] w - - bm Q@d5+ | |
| r1b4r/p5pp/2pkp3/3p4/3Pp3/8/P1P2PPP/R2n1RK1[QBNNqbbnppp] w - - bm B@c5+ B@b4+ | |
| r3nr1b/ppp2p1k/6p1/4P1qB/3PK3/4Q3/PPP3PP/R7[RBBNNPPnpp] b - - bm Qf5+ | |
| r4r1k/ppp2pp1/3N4/3Np3/B5p1/6B1/PP3Pp1/R1BQ1RK1[QNPPPbnpp] w - - bm Q@h6+ | |
| 1r5k/1P2Q1p1/p3Qnb1/1pp3N1/8/2P1BPp1/PP4P1/R4R1K[BBNrnppppp] w - - bm N@f7+ | |
| 1rRq1r2/1PppkpQp/p3bN2/1pb1pp2/4P3/2P4N/PP4PP/Rb5K[BNnp] w - - bm Rxd8 |
This file contains hidden or 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
| # Program to encode pawns as bitmasks from a FEN | |
| # Usage: ruby pawn_encoder.rb "rn3rk1/4bpp1/pq2bn1p/2pp4/B6B/2N1PN2/PP3PPP/2RQ1RK1" | |
| def encode(fen) | |
| board = fen.gsub("8"," 7").gsub("7"," 6").gsub("6"," 5").gsub("5"," 4").gsub("4"," 3").gsub("3"," 2").gsub("2"," 1").gsub("1"," ") | |
| wpawnsA = board.gsub(/[^P\/]/,"0").gsub(/P/,"1").split("/") | |
| bpawnsA = board.gsub(/[^p\/]/,"0").gsub(/p/,"1").split("/") | |
| wpawnsB = wpawnsA.rotate | |
| bpawnsB = bpawnsA.rotate(-1) |
This file contains hidden or 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 fnCreateKeyboard = function(keyboardElement) { | |
| // Generate keyboard | |
| // This is our main keyboard element! It's populated dynamically based on what you've set above. | |
| visualKeyboard = document.getElementById('keyboard'); | |
| selectSound = document.getElementById('sound'); | |
| var iKeys = 0; | |
| var iWhite = 0; | |
| var notes = __audioSynth._notes; |
NewerOlder