This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Feldman Cousin's interval | |
# Author: Austin Schneider (https://github.com/austinschneider) | |
import numpy as np | |
from scipy.stats import poisson | |
import collections | |
from functools import wraps | |
class memodict_(collections.OrderedDict): | |
def __init__(self, f, maxsize=1): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import time | |
import numpy as np | |
import subprocess | |
def slurm_get_n_jobs(user): | |
command = f"squeue --user {user} --array --format=%all" | |
result = subprocess.run(command.split(" "), stdout=subprocess.PIPE) | |
lines = result.stdout.split(b"\n") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://en.wikipedia.org/wiki/K-d_tree | |
// On building fast kd-Trees for Ray Tracing, and on doing that in O(N log N) | |
// http://www.irisa.fr/prive/kadi/Sujets_CTR/kadi/Kadi_sujet2_article_Kdtree.pdf | |
// https://axom.readthedocs.io/en/develop/index.html# | |
// https://web.archive.org/web/20090803054252/http://tog.acm.org/resources/GraphicsGems/gems/RayBox.c | |
#include <math.h> | |
#include <memory> | |
#include <vector> |