Add day_5

This commit is contained in:
Mo 2022-08-29 22:35:46 +02:00
parent 132cf5b58c
commit 263282356b
2 changed files with 29 additions and 0 deletions

26
day_5/h_t.py Executable file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env python3
import subprocess
import matplotlib.pyplot as plt
# Run the command and get the standard output
h_t = subprocess.run(
"curl -Ls https://gitlab.rlp.net/mobitar/julia_course/-/raw/main/Day_3/resources/fitting_task_data.csv | tail -n +6 | head -n -2 | cut -d ',' -f 1,3",
shell=True,
capture_output=True,
text=True,
).stdout
h_values = []
t_values = []
for line in h_t.strip().split("\n"):
h, t = line.strip().split(",")
h_values.append(h)
t_values.append(t)
plt.plot(h_values, t_values)
plt.xlabel("h")
plt.ylabel("t")
plt.savefig("h_t.pdf")

3
day_5/ripgrep.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
curl -Ls https://knowunity.de/knows/biologie-neurobiologie-1c6a4647-4707-4d1b-8ffb-e7a750582921 | rg '.*(https://.+\.pdf).*' -r '$1' | xargs curl -LsO