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
// ==UserScript== | |
// @name Analize on Lichess | |
// @namespace Andreal2000 | |
// @match https://www.chess.com/game/* | |
// @run-at document-end | |
// @grant none | |
// @version 1.0.0 | |
// @author Andreal2000 | |
// @icon https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://lichess.org&size=128 | |
// @description This plugin adds a button next to the chess board allowing to analyze the game on lichess.org |
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
import pandas as pd | |
import urllib.request | |
import re | |
import json | |
import copy | |
def translate_template(translation_path, template_path, output_path): | |
"""Translate a file using a dictionary and save the result on 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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import os | |
tmp_extension = "tmp" | |
current_dir = os.getcwd() | |
list_of_files = [] |
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
import scala.util.parsing.combinator.JavaTokenParsers | |
import scala.collection.mutable.{Stack, Map} | |
import scala.io.StdIn.{readLine, readInt} | |
class WhitespaceParser extends JavaTokenParsers { | |
override val whiteSpace = """[^ \n\t]+""".r | |
var stack = Stack[Int]() | |
var heap = Map[Int, Int]().withDefault(_ => 0) | |
var subroutines = Map[String, Int]() |