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
"""Load Dyablo simulation from a hdf5-formatted dataset | |
Requires yt_experiments to be installed: | |
$ pip install git+https://github.com/cphyc/yt_experiments@octree-converter | |
Example: | |
>>> ds = load("./test_gravity_spheres_3D_iter0008987.h5") | |
... p = yt.SlicePlot(ds, "x", ("gas","density")) | |
... p.set_unit("density", "mp/cm**3") | |
... p.save("/tmp/") |
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 argparse | |
import gc | |
from pathlib import Path | |
from typing import List, Optional, Sequence, Tuple | |
import h5py | |
import numpy as np | |
import yt | |
from yt import mylog as logger | |
from yt.fields.derived_field import ValidateSpatial |
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
"""Read RAMSES log files and outputs. For each output, print the value of the timestep.""" | |
import argparse | |
import os | |
import re | |
import sys | |
from collections import defaultdict | |
from scipy.interpolate import interp1d |
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.
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
# %% | |
from typing import Callable | |
import ast | |
from docstring_parser import parse | |
from pathlib import Path | |
# %% | |
def check_non_existing_params(dp_names: list[str], sp_names: list[str], *, has_args, has_kwargs, ctx: str): | |
for dp in dp_names: |
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
#-#-#-#-#-#-#-# | |
# ~/.XCompose | |
# To change the US International keyboard layout to behave like the | |
# Microsoft Windows (TM) version of the layout | |
# version: 0.2 edit 6 (20110403-6) | |
# by @tamh [48bytes at gmail com] | |
# | |
# Released under LGPL v2.1. Please refer to it by going to: | |
# <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html> |
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
from collections import defaultdict, namedtuple | |
from typing import Dict, List, Set | |
import numpy as np | |
Instruction = namedtuple("Instruction", ("code", "val", "line")) | |
Edge = namedtuple("Edge", ("l", "instruction")) | |
def make_link(tree, inst, fp, instructions, all_instructions): |
NewerOlder