This file has been truncated, but you can view the full file.
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
# %ECSV 1.0 | |
# --- | |
# datatype: | |
# - {name: x, datatype: float32} | |
# - {name: y, datatype: float32} | |
# - {name: z, datatype: float32} | |
# meta: {L: 2000.0} | |
# schema: astropy-2.0 | |
x y z | |
1002.2712 1022.61536 251.77208 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python3 | |
''' | |
Compress a density grid. | |
Usage: ./compress.py --help | |
''' | |
from pathlib import Path | |
import click |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 numpy as np | |
import threading | |
import queue | |
def multithreaded_read(fns, nthreads=2): | |
''' | |
A simple multithreaded reader that spins up N threads | |
to read a list of files, returning the result in a list. | |
Reads in Numpy format by default. | |
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 numba as nb | |
import numpy as np | |
def nb_ecdf(X,Rmax,ngrid=64,nthreads=1): | |
'''Compute the empirical CDF of points X (shape (N,D)) | |
in domain [0,Rmax) using a histogram with `ngrid` cells | |
per dimension. | |
Rmax and ngrid can also be length D arrays. | |
''' |
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
''' | |
A simple multi-threaded Python file writer. | |
Author: Lehman Garrison (lgarrison.github.io) | |
''' | |
import threading | |
import queue | |
import numpy as np |
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
#!/usr/bin/env python3 | |
''' | |
This script facilitates Globus transfers of Abacus simulation data. | |
In particular, for AbacusSummit we want to transfer particle data and | |
halo catalogs from OLCF to NERSC after each simulation is done. | |
Both sites already have Globus endpoints, so the job of this script | |
is to initiate a transfer between the two, saving the transfer ID | |
number so we can query the transfer status later. | |
The intention of this script is primarily to do disk-to-disk |
NewerOlder