diff options
Diffstat (limited to '')
-rw-r--r-- | cv/cv.md | 32 | ||||
-rwxr-xr-x | skripti/fienta_availability.sh | 44 | ||||
-rwxr-xr-x | skripti/spotify_publish_saved.py | 43 | ||||
-rw-r--r-- | šola/ana1/kolokvij2.lyx | 121 | ||||
-rw-r--r-- | šola/aps1/dn/osvetlitev/Makefile | 4 | ||||
-rw-r--r-- | šola/aps1/dn/osvetlitev/in.txt | 9 | ||||
-rw-r--r-- | šola/aps1/dn/osvetlitev/resitev.cpp | 46 | ||||
-rw-r--r-- | šola/aps1/dn/zlivanje/in.txt | 26 | ||||
-rw-r--r-- | šola/aps1/dn/zlivanje/out.txt | 1 | ||||
-rw-r--r-- | šola/aps1/dn/zlivanje/resitev.cpp | 39 |
10 files changed, 293 insertions, 72 deletions
@@ -22,8 +22,9 @@ Delovne izkušnje ================ * Študentsko delo: + - 2024-09: Pomoč pri administraciji strežnikov FMF - Pri SAZU popravil odjemni del sistema za zaznavanje napak na DAT kasetah -* Tehnik za osvetlitev odra v Klubu Gromka: 2022 - 2023 +* Tehnik za osvetlitev odra v Klubu Gromka: 2022 - 2024 Jezikovno znanje ================ @@ -32,6 +33,18 @@ Jezikovno znanje * **angleščina**: prvi tuji jezik - potrdilo o znanju na višjem nivoju slovenske mature * nemščina: drugi tuji jezik - potrdilo o znanju na nivoju C1 +Raziskovalno delo +================= + +* [Pridobivanje podatkov iz omrežja DHT, 2023](https://plus.cobiss.net/cobiss/si/sl/bib/163807491) -- COBISS.SI ID 163807491 pdf: <http://splet.sijanec.eu./dir/kon%C4%8Dna.pdf> +* [Kaj prenašamo s protokolom BitTorrent?, 2024](https://plus.cobiss.net/cobiss/si/sl/bib/209546499) -- COBISS.SI ID 209546499 pdf: <http://glasilo-fri.si./wp-content/uploads/2024/09/revija24.pdf#page=19> + +Tekmovanja +========== + +* 2023-10: Udeležil sem se tekmovanja v informacijski varnosti [ECSC](http://ecsc.no) na Norveškem v slovenski reprezentanci. +* Enkrat prvo in enkrat drugo mesto na [računalniškem tekmovanju ACM](http://rtk.ijs.si) ter srebrno priznanje na računalniškem tekmovanju ZOTKS + Področja znanja =============== @@ -59,23 +72,12 @@ Formalne izobrazbe na naštetih področjih nimam. + **Pretakanje zvoka** (icecast2) + **ArtNet**, **OSC** (uporabil za izdelavo DMX512 vmesnika za upravljanje luči) + **OBS**+**RTSP** na nginx - + Osnovno poznavanje delovanja delovanja IEEE 802.11 protokolov (Wi-Fi) + + Osnovno poznavanje delovanja IEEE 802.11 protokolov (Wi-Fi) * Umetniška tehnika - **Odrska osvetlitev** s protokolom DMX512 in programom QLC+ - Osnovne **izkušnje obdelave zvoka v živo** na mešalkah Behringer X32 in PreSonus StudioLive 32SX - Osnove fotografije in videosnemanja -Tekmovanja -========== - -* 2023-10: Udeležil sem se tekmovanja [ECSC](http://ecsc.no) na Norveškem v slovenski reprezentanci. -* Enkrat prvo in enkrat drugo mesto na [računalniškem tekmovanju ACM](http://rtk.ijs.si) ter srebrno priznanje na računalniškem tekmovanju ZOTKS - -Raziskovalno delo -================= - -* [Pridobivanje podatkov iz omrežja DHT, 2023](https://plus.cobiss.net/cobiss/si/sl/bib/163807491) -- COBISS.SI ID 163807491 pdf: <http://splet.sijanec.eu./dir/kon%C4%8Dna.pdf> - Hobiji ====== @@ -84,5 +86,5 @@ Poleg zgoraj naštetega sem od 5. 2022 radioamater in član Radiokluba Triglav. Meta ==== -* Življenjepis nazadnje spremenjen 2024-07-05 -* Aktualna različica: <http://upload.sijanec.eu./d/cv.pdf> +* Življenjepis nazadnje spremenjen 2024-10-15 +* Aktualna različica: <http://splet.sijanec.eu./dir/cv.pdf> diff --git a/skripti/fienta_availability.sh b/skripti/fienta_availability.sh new file mode 100755 index 0000000..79018ee --- /dev/null +++ b/skripti/fienta_availability.sh @@ -0,0 +1,44 @@ +#!/bin/bash +set -e +if [ x$1 = x ] +then + echo uporaba: $0 spoznavni-zur-fri [sekund] >&2 + echo če je 2. argument nastavljen, program ne exita in v neskončnost piše timestampane podatke o zasedenosti, sicer outputa samo enkrat podatke o zasedenosti brez timestampov >&2 + echo če sta prvi argument dve mali črki, se izpišejo prosta mesta za vse evente v državi s to kodo države >&2 + exit 1 +fi +fienta_availability() { + p=`rev <<<$0 | cut -d/ -f1 | rev` + t=`mktemp -p "" $p.XXX` + page=`curl --no-progress-meter --fail-with-body --cookie $t --cookie-jar $t https://fienta.com/$1` + token=`tr '<' $'\n' <<<$page | grep _token | cut -d\" -f6` + items=`grep -o 'data-id="[0-9]*"' <<<$page | cut -d \" -f2` + postbody=`for item in $items; do echo -n "&qty%5B$item%5D=1000000"; done` + curl --no-progress-meter --cookie $t --cookie-jar $t https://fienta.com/$1 -X POST -H 'X-Requested-With: XMLHttpRequest' --data-raw "_token=$token$postbody" | tr ']' $'\n' | grep "availability has been changed" | sed -E 's/.*"qty.([0-9]*)":."Sorry, \\"(.*)\\" availability has been changed meanwhile. We only have ([0-9]*) places* left.*/\1\t\2\t\3/g' + rm $t +} +fienta_all() { + all=`curl --no-progress-meter --fail-with-body https://fienta.com/?country=$1 | grep ?utm_source=fienta-search | grep -v /s/ | cut -d/ -f4 | cut -d? -f1 | tr $'\n' ' '` + for slug in $all + do + fienta_availability $slug | sed -e "s/^/$slug\t/" + done +} +fienta_entry() { + if [ `wc -c <<<$1` -eq 3 ] + then + fienta_all $1 + else + fienta_availability $1 + fi +} +if [ x$2 = x ] +then + fienta_entry $1 +else + while : + do + fienta_entry $1 | sed -e "s/^/`date +%s`\t/" + sleep $2 + done +fi diff --git a/skripti/spotify_publish_saved.py b/skripti/spotify_publish_saved.py new file mode 100755 index 0000000..a7f737a --- /dev/null +++ b/skripti/spotify_publish_saved.py @@ -0,0 +1,43 @@ +#!/usr/bin/python3 +import spotipy +from spotipy.oauth2 import SpotifyOAuth +import json +import sys +import datetime +scope = "user-library-read playlist-modify-public" +sp = spotipy.Spotify(auth_manager=SpotifyOAuth(scope=scope, client_id="1034e542fa064c27859b61a6ec5f864e", client_secret="2503172e78ce4d5e9146047db0a39077", redirect_uri="http://b.4a.si:25425/")) +for playlist, rev in [("0ASvlSEvlQu5nyFwUZqf9n", False), ("4B9TSgOGQRRvFtOnQav42J", True)]: + publicized_uris = [] + results = {"items": [None]} + offset = 0 + while len(results["items"]) != 0: + results = sp.playlist_items(playlist, None, 100, offset) + for idx, item in enumerate(results["items"]): + publicized_uris.append(item["track"]["uri"]) + offset += 100 + results = {"items": [None]} + offset = 0 + saved_items = [] + to_add = [] + while len(results["items"]) != 0: + results = sp.current_user_saved_tracks(50, offset) + for idx, item in enumerate(results['items']): + saved_items.append(item) + if item["track"]["uri"] not in publicized_uris: + to_add.append(item["track"]["uri"]) + else: + publicized_uris.remove(item["track"]["uri"]) + offset += 50 + if rev == False: + to_add.reverse() + if len(to_add) != 0: + iterator = [to_add[i:i+50] for i in range(0, len(to_add), 50)] + if rev: + iterator = reversed(iterator) + for batch in iterator: + sp.playlist_add_items(playlist, batch, 0 if rev else None) + if len(publicized_uris) != 0: + sp.playlist_remove_all_occurrences_of_items(playlist, publicized_uris) + todaystring = datetime.datetime.now().isoformat().replace("T", " ").split(".")[0] + sp.playlist_change_details(playlist, name="public mirror of my liked songs." + " [REVERSED]" if rev else "", public=True, collaborative=False, description=f"updated {todaystring} automatically daily using http://4a.si/spotsync") + print(json.dumps(saved_items)) diff --git a/šola/ana1/kolokvij2.lyx b/šola/ana1/kolokvij2.lyx index a057288..4d94e99 100644 --- a/šola/ana1/kolokvij2.lyx +++ b/šola/ana1/kolokvij2.lyx @@ -1,5 +1,5 @@ -#LyX 2.3 created this file. For more info see http://www.lyx.org/ -\lyxformat 544 +#LyX 2.4 created this file. For more info see https://www.lyx.org/ +\lyxformat 620 \begin_document \begin_header \save_transient_properties true @@ -17,11 +17,11 @@ enumitem theorems-ams \end_modules -\maintain_unincluded_children false +\maintain_unincluded_children no \language slovene \language_package default -\inputencoding auto -\fontencoding global +\inputencoding auto-legacy +\fontencoding auto \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" @@ -29,7 +29,9 @@ theorems-ams \font_default_family default \use_non_tex_fonts false \font_sc false -\font_osf false +\font_roman_osf false +\font_sans_osf false +\font_typewriter_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false @@ -63,7 +65,9 @@ theorems-ams \suppress_date false \justification false \use_refstyle 1 +\use_formatted_ref 0 \use_minted 0 +\use_lineno 0 \index Index \shortcut idx \color #008000 @@ -86,42 +90,20 @@ theorems-ams \papercolumns 1 \papersides 1 \paperpagestyle default +\tablestyle default \tracking_changes false \output_changes false +\change_bars false +\postpone_fragile_content false \html_math_output 0 \html_css_as_file 0 \html_be_strict false +\docbook_table_output 0 +\docbook_mathml_prefix 1 \end_header \begin_body -\begin_layout Title -List s formulami za 2. - kolokvij Analize 1 -\end_layout - -\begin_layout Author - -\noun on -Anton Luka Šijanec -\end_layout - -\begin_layout Date -\begin_inset ERT -status open - -\begin_layout Plain Layout - - -\backslash -today -\end_layout - -\end_inset - - -\end_layout - \begin_layout Standard \begin_inset ERT status open @@ -161,15 +143,18 @@ begin{multicols}{2} \begin_inset Formula $\log_{a}1=0$ \end_inset -, +, + \begin_inset Formula $\log_{a}a=1$ \end_inset -, +, + \begin_inset Formula $\log_{a}a^{x}=x$ \end_inset -, +, + \begin_inset Formula $a^{\log_{a}x}=x$ \end_inset @@ -187,7 +172,8 @@ begin{multicols}{2} \begin_inset Formula $D=b^{2}-4ac$ \end_inset -, +, + \begin_inset Formula $x_{1,2}=\frac{-b\pm\sqrt{D}}{2a}$ \end_inset @@ -205,7 +191,8 @@ begin{multicols}{2} \begin_inset Formula $zw=\left(ac-bd\right)+\left(ad+bc\right)i$ \end_inset -, +, + \begin_inset Formula $\vert zw\vert=\vert z\vert\vert w\vert$ \end_inset @@ -241,7 +228,8 @@ begin{multicols}{2} \begin_inset Formula $z^{2}=a^{2}+2abi-b^{2}$ \end_inset -, +, + \begin_inset Formula $z^{3}=a^{3}-3ab^{2}+\left(3a^{2}b-b^{3}\right)i$ \end_inset @@ -259,7 +247,8 @@ begin{multicols}{2} \begin_inset Formula $z^{n}=r^{3}\left(\cos\left(3\phi\right)+i\sin\left(3\phi\right)\right)$ \end_inset -, +, + \begin_inset Formula $\phi=\arctan\frac{\Im z}{\Re z}$ \end_inset @@ -316,7 +305,8 @@ je konv. \end_layout \begin_layout Standard -Vrsta je konv., če je konv. +Vrsta je konv., + če je konv. njeno zap. delnih vsot. \end_layout @@ -343,7 +333,8 @@ n+1; & q=1 \series bold Primerjalni krit. \series default -: +: + \begin_inset Formula $\sum_{1}^{\infty}a_{k}$ \end_inset @@ -389,11 +380,13 @@ majoranta \series bold Kvocientni \series default -: +: + \begin_inset Formula $a_{k}>0$ \end_inset -, +, + \begin_inset Formula $D_{n}\coloneqq\frac{a_{n}+1}{a_{n}}$ \end_inset @@ -419,11 +412,13 @@ Kvocientni \begin_inset Formula $\exists D\coloneqq\lim_{n\to\infty}D_{n}$ \end_inset -: +: + \begin_inset Formula $\vert D\vert<1\Longrightarrow$ \end_inset -konv., +konv., + \begin_inset Formula $\vert D\vert>1\Longrightarrow div.$ \end_inset @@ -435,7 +430,9 @@ konv., \series bold Korenski \series default -: Kot Kvocientni, le da +: + Kot Kvocientni, + le da \begin_inset Formula $D_{n}\coloneqq\sqrt[n]{a_{n}}$ \end_inset @@ -447,7 +444,8 @@ Korenski \series bold Leibnizov \series default -: +: + \begin_inset Formula $a_{n}\to0\Longrightarrow\sum_{1}^{\infty}\left(\left(-1\right)^{k}a_{k}\right)<\infty$ \end_inset @@ -476,11 +474,13 @@ Pri konv. \begin_inset Formula $x$ \end_inset -, pri enakomerni ni. +, + pri enakomerni ni. \end_layout \begin_layout Standard -Potenčna vrsta: +Potenčna vrsta: + \begin_inset Formula $\sum_{j=1}^{\infty}b_{j}x^{j}$ \end_inset @@ -495,7 +495,8 @@ Potenčna vrsta: \end_inset abs. - konv., + konv., + \begin_inset Formula $\vert x\vert>R\Longrightarrow$ \end_inset @@ -719,7 +720,8 @@ divergira \end_layout \begin_layout Standard -Krožnica: +Krožnica: + \begin_inset Formula $\left(x-p\right)^{2}+\left(y-q\right)^{2}=r^{2}$ \end_inset @@ -727,7 +729,8 @@ Krožnica: \end_layout \begin_layout Standard -Elipsa: +Elipsa: + \begin_inset Formula $\frac{\left(x-p\right)^{2}}{a^{2}}+\frac{\left(y-q\right)^{2}}{b^{2}}=1$ \end_inset @@ -800,7 +803,8 @@ Odvod \begin_inset Formula $\frac{f'g-fg'}{g^{2}}$ \end_inset -, +, + \begin_inset Formula $g\not=0$ \end_inset @@ -1260,7 +1264,8 @@ Zvezna \begin_inset Formula $\sup$ \end_inset -, je omejena in doseže vse funkcijske vrednosti na +, + je omejena in doseže vse funkcijske vrednosti na \begin_inset Formula $\left[f\left(a\right),f\left(b\right)\right]$ \end_inset @@ -1275,7 +1280,8 @@ Zvezna \begin_inset Formula $I$ \end_inset -, če +, + če \begin_inset Formula $\forall\varepsilon>0\exists\delta_{\left(\varepsilon\right)}>0\ni:\forall x,y\in I:\left|x-y\right|<\delta\Rightarrow\left|f\left(x\right)-f\left(y\right)\right|<\varepsilon$ \end_inset @@ -1290,7 +1296,8 @@ Zvezna \begin_inset Formula $I$ \end_inset -, če +, + če \begin_inset Formula $\forall\varepsilon>0\forall x\in I\exists\delta_{\left(x,\varepsilon\right)}>0\ni:\forall x,y\in I:\left|x-y\right|<\delta\Rightarrow\left|f\left(x\right)-f\left(y\right)\right|<\varepsilon$ \end_inset diff --git a/šola/aps1/dn/osvetlitev/Makefile b/šola/aps1/dn/osvetlitev/Makefile new file mode 100644 index 0000000..2d78386 --- /dev/null +++ b/šola/aps1/dn/osvetlitev/Makefile @@ -0,0 +1,4 @@ +program: resitev.cpp + g++ -Wall -Wextra -pedantic -Wformat-security -std=c++20 -o$@ $< +clean: + rm program diff --git a/šola/aps1/dn/osvetlitev/in.txt b/šola/aps1/dn/osvetlitev/in.txt new file mode 100644 index 0000000..76b90fe --- /dev/null +++ b/šola/aps1/dn/osvetlitev/in.txt @@ -0,0 +1,9 @@ +30 +7 +10 2 +23 2 +14 1 +4 1 +14 4 +11 5 +1 2 diff --git a/šola/aps1/dn/osvetlitev/resitev.cpp b/šola/aps1/dn/osvetlitev/resitev.cpp new file mode 100644 index 0000000..0a17f31 --- /dev/null +++ b/šola/aps1/dn/osvetlitev/resitev.cpp @@ -0,0 +1,46 @@ +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +struct event { + int pos; + bool tip; // true za začetek, false za konec +}; +int compar_events (const void * a, const void * b) { + if (((struct event *) a)->pos == ((struct event *) b)->pos) + return 0; + if (((struct event *) a)->pos < ((struct event *) b)->pos) + return -1; + return 1; +} +int main (void) { + struct event events[20000]; + int M, N, x, d; + scanf("%d %d", &M, &N); + for (int i = 0; i < N; i++) { + scanf("%d %d", &x, &d); + events[2*i].pos = x-d >= 0 ? x-d : 0; + events[2*i].tip = true; + events[2*i+1].pos = x+d <= M ? x+d : M; + events[2*i+1].tip = false; + } + qsort(events, 2*N, sizeof events[0], compar_events); + int osv = 0; + int depth = 0; + int start; + for (int i = 0; i < 2*N; i++) { + // fprintf(stderr, "pos=%d\ttip=%d\n", events[i].pos, events[i].tip); + if (events[i].tip == true) { + if (depth == 0) + start = events[i].pos; + depth++; + } + if (events[i].tip == false) { + depth--; + if (depth == 0) + osv += events[i].pos - start; + } + } + if (depth != 0) + fprintf(stderr, "depth == %d\n", depth); + printf("%d\n", M-osv); +} diff --git a/šola/aps1/dn/zlivanje/in.txt b/šola/aps1/dn/zlivanje/in.txt new file mode 100644 index 0000000..eaca3bf --- /dev/null +++ b/šola/aps1/dn/zlivanje/in.txt @@ -0,0 +1,26 @@ +25 3 2 +13 +18 +7 +8 +17 +3 +16 +9 +10 +11 +11 +0 +2 +19 +14 +5 +6 +15 +4 +5 +12 +3 +18 +1 +3 diff --git a/šola/aps1/dn/zlivanje/out.txt b/šola/aps1/dn/zlivanje/out.txt new file mode 100644 index 0000000..6def2f9 --- /dev/null +++ b/šola/aps1/dn/zlivanje/out.txt @@ -0,0 +1 @@ +0 2 3 3 4 5 5 6 7 8 9 10 11 11 12 13 14 15 16 17 18 18 19 1 3 diff --git a/šola/aps1/dn/zlivanje/resitev.cpp b/šola/aps1/dn/zlivanje/resitev.cpp new file mode 100644 index 0000000..8926019 --- /dev/null +++ b/šola/aps1/dn/zlivanje/resitev.cpp @@ -0,0 +1,39 @@ +#include <sys/param.h> +#include <stdio.h> +#include <stdlib.h> +#include <stdbool.h> +int compar_long (const void * a, const void * b) { + if (*(long *)a < *(long *)b) + return -1; + return *(long *)a > *(long *) b; +} +int main (void) { + long N, K, A; + scanf("%ld %ld %ld", &N, &K, &A); + long * d = (long *) malloc(N*sizeof *d); + long čet = 0; + long lastidx = 0; + long long četkončno = 1; + for (long i = 0; i < A && četkončno <= 2000000; i++) // pravzaprav četkončno := K**A, + četkončno *= K; // toda C nima int potence + // fprintf(stderr, "aaaaaaaa %ld\n", četkončno); + for (long i = 0; i < N; i++) { + scanf("%ld", d+i); + if (i && d[i-1] > d[i]) + if (++čet >= četkončno) { + qsort(d+lastidx, i-lastidx, sizeof d[0], compar_long); + čet = 0; + lastidx = i; + } + } + qsort(d+lastidx, N-lastidx, sizeof d[0], compar_long); + bool devica = true; + for (long i = 0; i < N; i++) { + if (devica) + devica = false; + else + printf(" "); + printf("%ld", d[i]); + } + printf("\n"); +} |