Skip to content

Instantly share code, notes, and snippets.

View tawfiqkhalilieh's full-sized avatar
👀
coding my future

Tawfiq Khalilieh tawfiqkhalilieh

👀
coding my future
View GitHub Profile
@tawfiqkhalilieh
tawfiqkhalilieh / public-text-template-gist
Created October 2, 2025 13:05
public text template
fb66
fa35
d031
9cf1
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<iframe id="11541633" allowtransparency="true" frameborder="0" style="width:100%;border:none;" src="//www.chess.com/emboard?id=11541633"></iframe><script>window.addEventListener("message",e=>{e['data']&&"11541633"===e['data']['id']&&document.getElementById(`${e['data']['id']}`)&&(document.getElementById(`${e['data']['id']}`).style.height=`${e['data']['frameHeight']+30}px`)});</script>
</body>
</html>
@tawfiqkhalilieh
tawfiqkhalilieh / main.py
Created May 31, 2023 14:11
Use Opening Books With python-chess engine
import chess
import chess.engine
import random
# Create a board and an engine
board = chess.Board()
engine = chess.engine.SimpleEngine.popen_uci("./stockfish")
# Load the book file
with open("book.pgn") as f: