diff options
author | Anton Luka Šijanec <anton@sijanec.eu> | 2023-04-23 02:14:48 +0200 |
---|---|---|
committer | Anton Luka Šijanec <anton@sijanec.eu> | 2023-04-23 02:14:48 +0200 |
commit | 1bb57cc0ceb60872ab1994015611ee4ceeda6681 (patch) | |
tree | 570a845fb6fb2d4697d4bbb5ff8eafeeb1b1a350 /skripti | |
parent | download changes to website in directory (diff) | |
download | r-1bb57cc0ceb60872ab1994015611ee4ceeda6681.tar r-1bb57cc0ceb60872ab1994015611ee4ceeda6681.tar.gz r-1bb57cc0ceb60872ab1994015611ee4ceeda6681.tar.bz2 r-1bb57cc0ceb60872ab1994015611ee4ceeda6681.tar.lz r-1bb57cc0ceb60872ab1994015611ee4ceeda6681.tar.xz r-1bb57cc0ceb60872ab1994015611ee4ceeda6681.tar.zst r-1bb57cc0ceb60872ab1994015611ee4ceeda6681.zip |
Diffstat (limited to 'skripti')
-rwxr-xr-x | skripti/download-changes-to-website.sh | 2 | ||||
-rwxr-xr-x | skripti/p.py | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/skripti/download-changes-to-website.sh b/skripti/download-changes-to-website.sh index 2d5dce4..6059267 100755 --- a/skripti/download-changes-to-website.sh +++ b/skripti/download-changes-to-website.sh @@ -8,6 +8,6 @@ do t=`mktemp -p "" $n.XXX` wget -O$t $1 f=`sha256sum $t | cut -d\ -f1` - mv $t $f + [ -f $f ] && rm $t || mv $t $f sleep $s done diff --git a/skripti/p.py b/skripti/p.py new file mode 100755 index 0000000..82263bc --- /dev/null +++ b/skripti/p.py @@ -0,0 +1,11 @@ +#!/usr/bin/python3 +from sys import argv +s = 0 +m = [x for x in range(3,14)] +for z in argv[1]: + x = m.pop() + s += x * int(z) +k = 11-s%11; +if k > 9: + k = 0 +print(f"{argv[1]}{k}") |