repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
benchmarking_graph | benchmarking_graph-main/src/hamiltonian.py | import jax
import jax.numpy as jnp
import matplotlib.pyplot as plt
import numpy as np
from jax.experimental import ode
# from shadow.plot import panel
def hamiltonian(x, p, params):
"""
hamiltonian calls lnn._H
x: Vector
p: Vector
"""
return None
def ps(*args):
for i in args:
pri... | 3,630 | 25.698529 | 91 | py |
benchmarking_graph | benchmarking_graph-main/src/utils.py | import importlib
from functools import partial
import jax
import jax.numpy as jnp
import jax_md
import numpy as np
from jax import grad, jit, random, vmap
from jax_md import smap
from . import lnn, models
def colnum(i, j, N):
"""Gives linear index for upper triangle matrix.
"""
assert (j >= i), "j >= i,... | 9,647 | 31.928328 | 99 | py |
benchmarking_graph | benchmarking_graph-main/src/graph.py | # Copyright 2020 DeepMind Technologies Limited.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed t... | 63,572 | 35.620392 | 100 | py |
benchmarking_graph | benchmarking_graph-main/src/fgn1.py | from functools import partial
import haiku as hk
import jax
import jax.numpy as jnp
import numpy as np
from jax import grad, jit, lax, random
from jax_md.nn import GraphNetEncoder
from jraph import GraphMapFeatures, GraphNetwork, GraphsTuple
from src.models import SquarePlus, forward_pass, initialize_mlp
class Grap... | 4,353 | 30.781022 | 99 | py |
benchmarking_graph | benchmarking_graph-main/src/nve.py | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 9,149 | 35.454183 | 86 | py |
benchmarking_graph | benchmarking_graph-main/src/graph1.py | # Copyright 2020 DeepMind Technologies Limited.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed t... | 47,723 | 33.408075 | 141 | py |
benchmarking_graph | benchmarking_graph-main/src/lnn.py | from functools import partial
import jax
import jax.numpy as jnp
import numpy as np
from jax import grad, jit, vmap
from numpy.core.fromnumeric import reshape
from .models import ReLU, SquarePlus, forward_pass
def MAP(input_fn):
"""Map vmap for first input.
:param input_fn: function to map
:type input_... | 11,352 | 26.030952 | 149 | py |
benchmarking_graph | benchmarking_graph-main/src/Pendulum-LGNN-post-rk.py | ################################################
################## IMPORT ######################
################################################
# from fcntl import F_SEAL_SEAL
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire... | 17,099 | 31.447818 | 166 | py |
benchmarking_graph | benchmarking_graph-main/src/models.py | from functools import partial
import jax
import jax.numpy as jnp
from jax import lax, random, vmap
from .io import loadfile, savefile
def initialize_mlp(sizes, key, affine=[False], scale=1.0):
""" Initialize the weights of all layers of a linear layer network """
keys = random.split(key, len(sizes))
# I... | 3,474 | 27.483607 | 120 | py |
benchmarking_graph | benchmarking_graph-main/src/__init__.py | 0 | 0 | 0 | py | |
benchmarking_graph | benchmarking_graph-main/src/io.py | """
"""
import pickle
import jax.numpy as jnp
def loadfile(filename, verbose=False):
if verbose:
print(f"Loading {filename}")
return pickle.load(open(filename, "rb"))
def savefile(filename, data, metadata={}, verbose=False):
if verbose:
print(f"Saving {filename}")
pickle.dump((data,... | 1,685 | 31.423077 | 92 | py |
benchmarking_graph | benchmarking_graph-main/src/lnn1.py | from functools import partial
import jax
import jax.numpy as jnp
import numpy as np
from jax import grad, jit, vmap
from numpy.core.fromnumeric import reshape
from .models import ReLU, SquarePlus, forward_pass
def MAP(input_fn):
"""Map vmap for first input.
:param input_fn: function to map
:type input_... | 12,736 | 26.68913 | 149 | py |
benchmarking_graph | benchmarking_graph-main/src/fgn.py | from functools import partial
import haiku as hk
import jax
import jax.numpy as jnp
import numpy as np
from jax import grad, jit, lax, random
from jax_md.nn import GraphNetEncoder
from jraph import GraphMapFeatures, GraphNetwork, GraphsTuple
from src.models import SquarePlus, forward_pass, initialize_mlp
class Grap... | 5,146 | 31.371069 | 99 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-HGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 12,889 | 27.836689 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CFGNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 16,284 | 30.560078 | 165 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-LGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,807 | 32.802048 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-data.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from ... | 6,696 | 28.244541 | 100 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-HGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import time
import fire
import jax
import jax.numpy a... | 13,231 | 26.798319 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-data-FGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from ... | 7,185 | 29.320675 | 105 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-FGNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 20,256 | 32.538079 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-GNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 13,629 | 26.816327 | 134 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-HGNN.py | ################################################
################## IMPORT ######################
################################################
from posixpath import split
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import m... | 12,742 | 26.823144 | 255 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-data-FGNN.py | ################################################
################## IMPORT ######################
################################################
import json
from pyexpat import model
from statistics import mode
import sys
import os
from datetime import datetime
from functools import partial, wraps
import jax
import... | 6,168 | 28.516746 | 97 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-HGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 18,563 | 32.814208 | 354 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-HGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 12,346 | 27.983568 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-FGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,912 | 32.023217 | 225 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-HGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 14,684 | 29.030675 | 184 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-FGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 10,978 | 27.740838 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-LGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 18,363 | 31.676157 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-HGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import time
import fire
import jax
import jax.numpy a... | 14,681 | 27.019084 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-LGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 11,922 | 27.93932 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-HGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 20,724 | 32.481422 | 248 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-GNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,024 | 33.403255 | 355 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-FGNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import time
import fire
import jax
import jax.numpy a... | 13,050 | 27.066667 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-data.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from ... | 6,624 | 28.444444 | 97 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-LGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,621 | 31.922819 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CHGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 14,712 | 28.843813 | 184 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CHGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 17,699 | 32.333333 | 203 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-FGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 20,094 | 32.603679 | 224 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-LGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 18,959 | 32.321617 | 196 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-GNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import time
import fire
import jax
import jax.numpy a... | 13,557 | 27.364017 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-LGNN-post.py | ################################################
################## IMPORT ######################
################################################
# from fcntl import F_SEAL_SEAL
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire... | 18,884 | 31.786458 | 356 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-data-HGNN.py | ################################################
################## IMPORT ######################
################################################
import sys
import fire
import os
from datetime import datetime
from functools import partial, wraps
from psystems.nsprings import chain
import jax
import jax.numpy as jnp
... | 6,035 | 27.880383 | 99 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-LGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import time
import fire
import jax
import jax.numpy a... | 14,755 | 27.376923 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-data-HGNN.py | ################################################
################## IMPORT ######################
################################################
import sys
import fire
import os
from datetime import datetime
from functools import partial, wraps
from psystems.nsprings import chain
import jax
import jax.numpy as jnp
... | 6,086 | 28.838235 | 107 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CLGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 15,534 | 30.194779 | 142 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-FGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 17,514 | 30.054965 | 162 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-GNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 13,643 | 26.788187 | 134 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-FGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import time
import fire
import jax
import jax.numpy a... | 13,407 | 27.050209 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-LGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,812 | 32.524535 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-FGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 17,475 | 30.488288 | 162 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-GNODE-post.py | ################################################
################## IMPORT ######################
################################################
import imp
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import ja... | 21,131 | 34.22 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-LGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 14,226 | 29.530043 | 204 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-HGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 15,726 | 29.361004 | 184 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-FGNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 16,226 | 29.84981 | 184 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CLGNN-post.py | ################################################
################## IMPORT ######################
################################################
# from fcntl import F_SEAL_SEAL
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire... | 17,750 | 31.392336 | 205 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-FGNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 20,013 | 32.580537 | 246 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-HGNN.py | ################################################
################## IMPORT ######################
################################################
from posixpath import split
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import m... | 15,437 | 30.962733 | 353 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-GNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 16,262 | 29.060998 | 121 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-HGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,693 | 33.795053 | 245 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-HGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,637 | 33.452632 | 245 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-FGNN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,478 | 32.354452 | 370 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-HGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 15,645 | 29.982178 | 184 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-LGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 16,521 | 30.530534 | 162 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-LGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 16,955 | 32.117188 | 316 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CLGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 19,008 | 32.116725 | 196 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-FGNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 18,532 | 32.27289 | 219 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-FGNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 16,177 | 30.413592 | 184 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-LGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import time
import fire
import jax
import jax.numpy a... | 13,916 | 27.344196 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-LGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 15,541 | 30.146293 | 142 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-FGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
from turtle import hideturtle
import fire
i... | 20,161 | 32.942761 | 286 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-HGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 21,151 | 32.8432 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CGNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 14,134 | 26.661448 | 114 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CHGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 20,725 | 32.537217 | 248 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-data.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
import jax
import jax.numpy as jnp
import numpy as np
from jax import j... | 5,891 | 28.024631 | 97 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-GNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 11,310 | 27.854592 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-LGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 14,856 | 29.382413 | 173 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-FGNODE.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 16,215 | 30.610136 | 216 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-HGNN.py | ################################################
################## IMPORT ######################
################################################
from posixpath import split
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import m... | 12,752 | 28.727273 | 255 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-data-HGNN.py | ################################################
################## IMPORT ######################
################################################
import sys
import fire
import os
from datetime import datetime
from functools import partial, wraps
from psystems.npendulum import get_init
import jax
import jax.numpy as ... | 5,374 | 27.141361 | 101 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CHGNN.py | ################################################
################## IMPORT ######################
################################################
from posixpath import split
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import m... | 12,543 | 26.569231 | 164 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CLGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as ... | 13,992 | 29.092473 | 137 | py |
benchmarking_graph | benchmarking_graph-main/scripts/peridynamics-FGNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 10,997 | 27.866142 | 152 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-data-FGNN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from ... | 7,313 | 29.60251 | 107 | py |
benchmarking_graph | benchmarking_graph-main/scripts/n-body-HGN-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 21,326 | 33.1232 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CGNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 18,293 | 32.261818 | 204 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Pendulum-CFGNODE-post.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import jax.numpy as jnp
import... | 18,719 | 32.074205 | 219 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-GNODE-post.py | ################################################
################## IMPORT ######################
################################################
import imp
import json
import sys
import os
from datetime import datetime
from functools import partial, wraps
from statistics import mode
import fire
import jax
import ja... | 20,974 | 33.958333 | 247 | py |
benchmarking_graph | benchmarking_graph-main/scripts/Spring-LGN.py | ################################################
################## IMPORT ######################
################################################
import json
import sys
from datetime import datetime
from functools import partial, wraps
import fire
import jax
import jax.numpy as jnp
import numpy as np
from jax import... | 16,453 | 30.045283 | 162 | py |
benchmarking_graph | benchmarking_graph-main/scripts/psystems/nbody.py | import jax.numpy as jnp
import matplotlib.pyplot as plt
import numpy as np
def get_fully_connected_senders_and_receivers(num_particles: int, self_edges: bool = False,):
"""Returns senders and receivers for fully connected particles."""
particle_indices = np.arange(num_particles)
senders, receivers = np.mes... | 2,826 | 23.37069 | 93 | py |
benchmarking_graph | benchmarking_graph-main/scripts/psystems/npendulum.py | import jax.numpy as jnp
import numpy as np
def pendulum_connections(P):
return (jnp.array([i for i in range(P-1)] + [i for i in range(1, P)], dtype=int),
jnp.array([i for i in range(1, P)] + [i for i in range(P-1)], dtype=int))
def edge_order(P):
N = (P-1)
return jnp.array(jnp.hstack([jnp.arra... | 1,375 | 28.276596 | 92 | py |
benchmarking_graph | benchmarking_graph-main/scripts/psystems/nsprings.py | import jax.numpy as jnp
import matplotlib.pyplot as plt
import numpy as np
def get_fully_connected_senders_and_receivers(num_particles: int, self_edges: bool = False,):
"""Returns senders and receivers for fully connected particles."""
particle_indices = np.arange(num_particles)
senders, receivers = np.mes... | 4,025 | 28.822222 | 111 | py |
benchmarking_graph | benchmarking_graph-main/scripts/psystems/__init__.py | 0 | 0 | 0 | py | |
watset-classes | watset-classes-master/dt-wordnet.py | #!/usr/bin/env python3
import argparse
import sys
parser = argparse.ArgumentParser()
parser.add_argument('-w', '--wordnet-super-senses', type=argparse.FileType('r', encoding='UTF-8'), required=True)
parser.add_argument('-t', type=float, default=0.01)
parser.add_argument('dt', type=argparse.FileType('r', encoding='UTF... | 1,227 | 32.189189 | 113 | py |
roman_imsim-1.0 | roman_imsim-1.0/radec_to_chip.py | import numpy as np
import sys, os
import math
import logging
import time
import yaml
import galsim as galsim
import galsim.wfirst as wfirst
import galsim.des as des
import fitsio as fio
MAX_RAD_FROM_BORESIGHT = 0.009
def radec_to_chip(obsRA, obsDec, obsPA, ptRA, ptDec):
"""
Converted from Chris' c code. Used ... | 4,827 | 75.634921 | 173 | py |
roman_imsim-1.0 | roman_imsim-1.0/setup.py | from setuptools import setup
setup(
name='roman_imsim',
version='0.0',
description='Image simulations suite for the Roman Space Telescope',
license="MIT",
author='Michael Troxel',
author_email='michael.troxel@duke.edu',
url="",
packages=['roman_imsim'],
install_requires=['galsim','ngmix', 'f... | 434 | 30.071429 | 152 | py |
roman_imsim-1.0 | roman_imsim-1.0/mpi_pool.py | class _close_pool_message(object):
def __repr__(self):
return "<Close pool message>"
class _function_wrapper(object):
def __init__(self, function, callback=None):
self.function = function
self.callback = callback
def _error_function(task):
raise RuntimeError("Pool was sent tasks ... | 3,912 | 29.811024 | 74 | py |
roman_imsim-1.0 | roman_imsim-1.0/flowchart.py | from simulate import wfirst_sim
def print_flowcart_dot_language():
print "digraph {"
cls = wfirst_sim
print "subgraph cluster_{} {{".format('wfirst_sim')
print 'style=filled;'
print 'color=lightgrey;'
for out in cls.outputs.values():
print '"{0}/{1}" [lab... | 803 | 31.16 | 93 | py |
roman_imsim-1.0 | roman_imsim-1.0/wfwcs_ami.py | # imports, etc.
import galsim
import galsim.wfirst as wf
import datetime
import sys
import numpy as np
from radec_to_chip import *
import matplotlib
matplotlib.use ('agg')
import matplotlib.pyplot as plt
import os
import inspect
import matplotlib.cm as cm
from matplotlib.colors import LogNorm
import matplotlib.gridspec... | 5,726 | 30.816667 | 99 | py |
roman_imsim-1.0 | roman_imsim-1.0/roman_imsim/make_sca_coadd.py | import wfirst_imsim
param_file = '/hpc/group/cosmology/masaya/roman_imsim/dc2_H158_g1002.yaml'
filter_ = None
post = wfirst_imsim.postprocessing(param_file)
print(post.params.keys())
post.setup_pointing()
#post.merge_fits_old()
# post.accumulate_index()
# post.get_psf_fits()
post.load_index()
post.get_coadd() | 311 | 25 | 74 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.