diff options
Diffstat (limited to 'mat/fmf/fmf.py')
-rwxr-xr-x | mat/fmf/fmf.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/mat/fmf/fmf.py b/mat/fmf/fmf.py new file mode 100755 index 0000000..87a50c3 --- /dev/null +++ b/mat/fmf/fmf.py @@ -0,0 +1,23 @@ +#!/usr/bin/python3 +import numpy +a = "abcčdefghijklmnopqrsštuvwxyzžABCČDEFGHIJKLMNOPQRSŠTUVZŽ.,-" +u = "Y-TČTNŽOF-MQUWMA-FINF-METRRJJLIWUŠVZQŠ.X-Č-GNSSIGPŽKOUUZNMFF-MNYQCXATSUGGLZJNHKIEFVULLDZTUBRŠB-ČRQHUNPVQQGPOJ.BBAYČ.VMRXGČF-MOCJQPDLGAOSKELŠ-AIŠPKATOŠŽOLZRKWUUZNMFF-M-TRZFAWBŽVŠV_" +n = "Y-TČtNžof-mQUWMA-FINf-mEtRrJjLIWušvzQš.X-č-gnssIGPžkOuuzNmFf-mNYQcxatsuGGLzjNhkiEFvuLlDZtuBršb-ČrQHunpvqQgPOJ.bbaYč.vMrxgčf-mOcJQpDlGaoSKElš-aIšpkatOšžOLZrkwuuzNmFf-m-TrzFAwBžVŠV_" +t = "Matematika-je-kul." +if n.upper() != u: + raise Exception +k = [ + [1, 1, 1], + [0, 3, 1], + [2, 0, 1]] +v = [[], [], []] +s = -1 +for i in range(len(t)): + if s != i//3: + s = i//3 + for j in range(3): + v[j].append(-1) + v[i%3][i//3] = a.find(t[i]) +print(numpy.dot(k, v)) + +## ne znam matematike |