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
# Copyright 2020 The HuggingFace Team. All rights reserved. | |
# | |
# Copyright 2024 Iikka Hauhio (removed OPUS/Tatoeba-specific code to allow converting arbitrary models) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 taivutin | |
import stanza | |
import re | |
nlp = stanza.Pipeline("fi") | |
tai = taivutin.Taivutin() | |
case_stanza2taivutin = { | |
"Nom": "nom", | |
"Gen": "gen", |
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
# (c) 2023 Iikka Hauhio | |
# Use freely but attribute me | |
import argparse | |
import readline | |
import traceback | |
from pynvml import * | |
import rich, rich.text, rich.panel, rich.live, rich.console | |
import torch |
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
/* | |
* This is a script that can analyze Klingon words using the boQwI' dictionary. | |
* | |
* You need to have dictionary.json available somewhere. | |
* | |
* Usage: | |
* | |
* const analyzeWord = await initializeDictionary(); | |
* console.log(analyzeWord("Heghlu'meH")) | |
*/ |
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
#*************************************************************************************** | |
# Klingon | |
# Definition des liens entre la notation Sampa et les Fragments | |
C GLST T2 SH | |
G RXS RXS | |
N NG | |
T GLST T2 GLST LFI | |
a A | |
b SQ B |
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
/* | |
* Klingon keyboard layout for the Sailfish keyboard (Jolla maliit plugin) | |
* | |
* Copyright (C) Iikka Hauhio 2020 | |
* Saa käyttää vapaasti mihin tahansa tarkoitukseen :) | |
* May be used freely for whatever purpose | |
* | |
* How to install: | |
* 1. Copy file to /usr/share/maliit/plugins/com/jolla/layouts/ | |
* 2. Add this text to the end of /usr/share/maliit/plugins/com/jolla/layouts/layouts_western.conf: |
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
{ | |
conllu := require("conllu") | |
} | |
main treebank { | |
time := currentTime() | |
conllu.parseSentences treebank | addTree _ | |
time = currentTime()-time | |
print time/1000, " s" |
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
' Pelaajan sijainti | |
Dim playerAngle As Number = 0 | |
Dim playerX As Number = 1.5 | |
Dim playerY As Number = 1.5 | |
' Näkökentän koko | |
Dim FOV = ebPi / 2 ' 90° |
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
{ | |
case := require("case").case | |
vok := "aeiouyäöå" | |
kon := "bcdfghjklmnpqrstvwx" | |
} | |
select l { | |
return l[abs(randomInteger())%#l] | |
} |
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
/* | |
* Copyright (c) 2018 Iikka Hauhio | |
* Do whatever you want with this. | |
* | |
* This Röda script will process an Aktia bank statement and | |
* create a report with nice pie charts. It relies on the | |
* pgf-pie LaTeX package. After creating pictures using LaTeX | |
* it creates the report using Troff (Groff) and the ms | |
* preprocessor. | |
* |
NewerOlder