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
import chess.pgn | |
import chess.svg | |
from cairosvg import svg2png | |
from PIL import Image | |
from io import BytesIO | |
colors = ["#ced27b", "#aaa346"] | |
with open("mar4058_1.pgn", "r") as fin: | |
game = chess.pgn.read_game(fin) |
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
from lxml import etree | |
from pathlib import Path | |
from standoffconverter import Standoff, View | |
from tqdm import tqdm | |
def get_namespaces(): | |
return { | |
"pos":"http:///de/tudarmstadt/ukp/dkpro/core/api/lexmorph/type/pos.ecore", | |
"tcas":"http:///uima/tcas.ecore", | |
"xmi":"http://www.omg.org/XMI", |
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
import typer | |
from pathlib import Path | |
from functools import partial | |
from tqdm import tqdm | |
from lxml import etree | |
from spacy.tokens import DocBin | |
from spacy.util import get_lang_class | |
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
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
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
import pandas as pd | |
import numpy as np | |
import scipy as sc | |
from scipy import stats | |
import matplotlib.pyplot as plt | |
data = np.loadtxt('Implementation2.mat') | |
data = pd.DataFrame(data, columns=['time', 'q0', 'q1', 'q2', 'dq0', 'dq1', 'dq2', 'qd0', 'qd1', 'qd2', 'tau0', 'tau1', 'tau2', 'x0', 'x1', 'x2', 'dx0', 'dx1', 'dx2', 'xd0', 'xd1', 'xd2' ]) | |
X = data[['time','q0','q1', 'q2','qd0','qd1', 'qd2']] |