Skip to content

Instantly share code, notes, and snippets.

View Findus23's full-sized avatar

Lukas Winkler Findus23

View GitHub Profile
@Findus23
Findus23 / job.sh
Last active February 22, 2024 10:11
distributed 3D-rfft using JAX
#!/bin/bash
#SBATCH --time=01:00:00
#SBATCH --nodes=2 #equal to -N 1
#SBATCH --tasks-per-node=2
#SBATCH --exclusive
#SBATCH --job-name=jax-fft-test
#SBATCH --gpus=4
#SBATCH --output output/slurm-%j.out
nvidia-smi
@Findus23
Findus23 / poc_data.csv
Last active February 19, 2021 18:25
Proof of Concept -- Rebound Issue
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
1.9885e+30 0 0 0 0 0 0
1.8986e+27 5.20301 0 0.0227706 4.803 1.75356 5.82048
5.68484e+26 9.57882 0 0.0433754 5.84484 1.98338 5.29111
2.06038e+23 0.510473 0.000911538 0.000757732 5.74864 5.35403 5.188 0.25 0.74999 1e-05
2.06089e+23 0.531857 0.000196013 0.000440748 1.77871 0.494753 3.84624 0.25 0.74999 1e-05
2.11245e+23 0.554233 0.000587305 0.00139818 3.08145 1.22563 2.44103 0.25 0.74999 1e-05
2.1761e+23 0.577768 0.000159871 0.00106502 0.383951 0.405879 0.282449 0.25 0.74999 1e-05
2.24439e+23 0.602556 0.00104883
@Findus23
Findus23 / nb.py
Last active June 17, 2018 14:32
n-body-code
import argparse
import matplotlib.pyplot as plt
import numpy as np
from scipy.constants import G
day = 24 * 60 * 60
year = day * 365
parser = argparse.ArgumentParser(description="This is a simple N-body code.")
# extract proj/target particle numbers from the logfile:
if [ `grep -c "Particle numbers:" $1/simulation.logfile` != "1" ]; then
echo "ERROR! Ambiguity encountered!"
exit
fi
N_P=`grep -A 3 "Particle numbers:" $1/simulation.logfile | grep "projectile:" | cut -d\ -f6`
N_T=`grep -A 3 "Particle numbers:" $1/simulation.logfile | grep "target:" | cut -d\ -f10`
@Findus23
Findus23 / aa.diff
Last active April 1, 2018 15:56
aa.diff
--- aa-original.cls 2016-09-13 11:53:31.000000000 +0200
+++ aa.cls 2018-04-01 17:46:17.800380594 +0200
@@ -378,11 +378,10 @@
\newif\ifaa@firstonline
\aa@firstonlinetrue
\newcommand*\journalname[1]{\renewcommand*\aa@journalname{#1}}
-\newcommand*\aa@journalname{Astronomy \& Astrophysics}
+\newcommand*\aa@journalname{Anfängerpraktikum SS2018}
\newcommand*\aa@manuscriptname{%
- manuscript no. \jobname
@Findus23
Findus23 / output.txt
Created January 27, 2018 20:55
aiohttp
<ClientResponse(https://www.soeren-hentzschel.at/feed/) [200 OK]>
<CIMultiDictProxy('Date': 'Sat, 27 Jan 2018 20:53:38 GMT', 'Server': 'Apache', 'Last-Modified': 'Thu, 25 Jan 2018 23:03:14 GMT', 'ETag': '"a90d46d73255fadc47de09335c82e154"', 'X-Robots-Tag': 'noindex, follow', 'Link': '<https://www.soeren-hentzschel.at/wp-json/>; rel="https://api.w.org/"', 'Upgrade': 'h2,h2c', 'Connection': 'Upgrade', 'Vary': 'Accept-Encoding', 'Content-Encoding': 'gzip', 'Transfer-Encoding': 'chunked', 'Content-Type': 'application/rss+xml; charset=UTF-8')>
True
@Findus23
Findus23 / lösung.py
Created December 17, 2017 15:24
Astro
import matplotlib.pyplot as plt
def get_data(filename):
with open(filename) as file:
lines = file.readlines()
titles = lines[0].split() # Spaltennamen sind in der ersten Zeile
print(titles)
data = []
for dataline in lines[2:-1]: # ersten zwei Zeilen und die letzte Zeile ignorieren
diff --git a/tests/System/expected/test___Live.getLastVisitsDetails_year.xml b/tests/System/expected/test___Live.getLastVisitsDetails_year.xml
index 9b55fd8..3f5b0ce 100644
--- a/tests/System/expected/test___Live.getLastVisitsDetails_year.xml
+++ b/tests/System/expected/test___Live.getLastVisitsDetails_year.xml
@@ -70,14 +70,14 @@
<deviceModel />
<operatingSystem>Windows XP</operatingSystem>
<operatingSystemName>Windows</operatingSystemName>
- <operatingSystemIcon>plugins/DevicesDetection/images/os/WIN.png</operatingSystemIcon>
+ <operatingSystemIcon>plugins/Morpheus/icons/dist/os/WIN.png</operatingSystemIcon>