Skip to content

Instantly share code, notes, and snippets.

View avivajpeyi's full-sized avatar
🦥

Avi Vajpeyi avivajpeyi

🦥
View GitHub Profile
""" Plots total number of CPU hours used
To create a "jobstats.txt" run somthing like the following:
> sacct -S 2020-01-01 -E 2021-10-06 -u avajpeyi -X -o "jobname%-40,cputimeraw,start" --parsable2 > jobstats.txt
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from humanize import intword
from matplotlib import ticker
@avivajpeyi
avivajpeyi / intro-to-jax-part2.ipynb
Last active June 29, 2022 19:19 — forked from dfm/intro-to-jax-part2.ipynb
intro-to-jax-part2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
""" Plots total number of CPU hours used
To create a "jobstats.txt" run somthing like the following:
> sacct -S 2020-01-01 -E 2021-10-06 -u avajpeyi -X -o "jobname%-40,cputimeraw,start" --parsable2 > jobstats.txt
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from humanize import intword
from matplotlib import ticker
from datetime import timedelta, datetime, date
trigger-time=1268431094.157825
channel-dict={ H1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01, L1:DCS-CALIB_STRAIN_CLEAN_SUB60HZ_C01,V1:Hrec_hoft_16384Hz }
coherence-test=False
detectors=['H1', 'L1', 'V1']
duration=16.0
psd-dict={ H1:/home/daniel.williams/events/O3/event_repos/S200316a/C01_offline/psds/4096/H1-psd.dat, L1:/home/daniel.williams/events/O3/event_repos/S200316a/C01_offline/psds/4096/L1-psd.dat, V1:/home/daniel.williams/events/O3/event_repos/S200316a/C01_offline/psds/4096/V1-psd.dat }
psd-fractional-overlap=0.5
post-trigger-duration=2.0
sampling-frequency=4096.0
psd-length=16
@avivajpeyi
avivajpeyi / GW150914_pbilby_example.ini
Created November 3, 2022 00:18
Example GW150914 ini
ntasks-per-node = 48
time = 10:30:00
nodes = 4
mem-per-cpu="2GB"
extra-lines = "module --force purge && module load git/2.18.0 git-lfs/2.4.0 gcc/9.2.0 openmpi/4.0.2 numpy/1.19.2-python-3.8.5 mpi4py/3.0.3-python-3.8.5 && module unload zlib && source /fred/oz980/avajpeyi/envs/sstar_venv/bin/activate"
# The following are the same as bilby_pipe
label = GW150914
outdir = outdir_GW150914
trigger-time = 1126259462.391
@avivajpeyi
avivajpeyi / get_GW150914_data.py
Created November 3, 2022 00:21
GW Data downloader
import logging
import os
from gwpy.timeseries import TimeSeries
TRIGGER_TIME = 1126259462.4
GPS_START_TIME = TRIGGER_TIME - 2
DATA_DURATION = 4
EXTRA_DATA = 10
DATA_START_TIME = int(GPS_START_TIME) - EXTRA_DATA
@avivajpeyi
avivajpeyi / demo.md
Created November 14, 2022 04:23
COMPAS py interface demo

installing

To install COMPAS, it would be nice if all the user needs to do is:

pip install compas

This can be configured to not only install COMPAS python code, but also the CPP code. It can also be confiugured to find user's boost libs etc (no need to manually edit the make-file).

running

Then a user can run COMPAS with:

@avivajpeyi
avivajpeyi / image_regression.ipynb
Created December 6, 2022 00:59
NN regression with image data example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@avivajpeyi
avivajpeyi / dnn_regression.ipynb
Created January 9, 2023 23:38
DNN regression example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@avivajpeyi
avivajpeyi / gpflow_demo.ipynb
Created January 27, 2023 00:10
GPFlow testing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.