repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
aehsani/ergo
[ "1c03494fcbc89192212b9595bb00acc794bd621c" ]
[ "ergo/foretold.py" ]
[ "from dataclasses import dataclass\nfrom typing import List, Union\n\nimport numpy as np\nimport pandas as pd\nimport requests\nimport seaborn\nimport torch\n\nfrom ergo.ppl import uniform\n\n\nclass Foretold:\n \"\"\"Interface to Foretold\"\"\"\n\n def __init__(self, token=None):\n \"\"\"token (string...
[ [ "numpy.cumsum", "numpy.array", "numpy.histogram", "numpy.interp" ] ]
drnextgis/cogeo-mosaic
[ "034d0124a2da894c2bb432b1c0cebba7f716edbd" ]
[ "cogeo_mosaic/utils.py" ]
[ "\"\"\"cogeo_mosaic.utils: utility functions.\"\"\"\n\nimport logging\nimport os\nimport sys\nfrom concurrent import futures\nfrom typing import Dict, List, Sequence, Tuple\n\nimport click\nimport mercantile\nimport numpy\nfrom pygeos import area, intersection\nfrom rio_tiler.io import COGReader\n\nlogger = logging...
[ [ "numpy.array" ] ]
pradeeptadas/uniswap-v3-project
[ "8f938dc5602fdb6e58b2cf42393a01994f48682d", "8f938dc5602fdb6e58b2cf42393a01994f48682d" ]
[ "uniswapv3_simulator/optimization/ddpg/ddpg.py", "uniswapv3_simulator/math.py" ]
[ "import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.optim as optim\nimport copy\nimport logging\n\nfrom .replay_buffer import ReplayBuffer\nfrom .exploration_noise import ConstantNoise\n\n\nlogger = logging.getLogger('optimization.ddpg')\n\n\nclass DDPG:\n def __init__(self,\n ...
[ [ "torch.nn.Sequential", "torch.sigmoid", "torch.cat", "numpy.clip", "torch.nn.utils.clip_grad_norm_", "torch.nn.Linear", "torch.no_grad", "numpy.random.SeedSequence", "numpy.mean", "torch.nn.ReLU", "numpy.array", "torch.as_tensor" ], [ "numpy.log", "numpy...
Arif064001/multifocus_multiview_stereo_reconstruction
[ "0c1039a1a3dfa75c4904d5ca55fef5f59175b7d0", "0c1039a1a3dfa75c4904d5ca55fef5f59175b7d0" ]
[ "pyramid.py", "alignments.py" ]
[ "import numpy as np\nfrom scipy import ndimage\nimport cv2\nfrom timed import timed\n\n'''\nSource: https://github.com/sjawhar/focus-stacking.git\nReference: Chang and Wang (2011) A Multi-focus Image Fusion Method Based on Laplacian Pyramid\n'''\n\ndef generating_kernel(a):\n kernel = np.array([0.25 - a / 2.0, 0...
[ [ "numpy.square", "numpy.log", "numpy.log2", "numpy.arange", "numpy.copy", "numpy.argmax", "numpy.average", "numpy.outer", "numpy.array", "numpy.zeros", "numpy.where" ], [ "numpy.eye", "numpy.array" ] ]
jkalloor3/bqskit
[ "ad34a6eae3c0e62d2bd960cd4cd841ba8e845811" ]
[ "tests/ir/opt/instantiaters/test_qfactor.py" ]
[ "\"\"\"This test module verifies the QFactor instantiater.\"\"\"\nfrom __future__ import annotations\n\nimport numpy as np\nfrom scipy.stats import unitary_group\n\nfrom bqskit.ir.circuit import Circuit\nfrom bqskit.ir.gates.parameterized import RXGate\nfrom bqskit.ir.gates.parameterized.unitary import VariableUnit...
[ [ "numpy.imag", "numpy.random.random", "numpy.allclose", "numpy.reshape", "numpy.real", "scipy.stats.unitary_group.rvs" ] ]
ythlml/mindspore
[ "028ae212624164044cfaa84f347fc502cb7fcb0f", "028ae212624164044cfaa84f347fc502cb7fcb0f", "028ae212624164044cfaa84f347fc502cb7fcb0f", "028ae212624164044cfaa84f347fc502cb7fcb0f", "028ae212624164044cfaa84f347fc502cb7fcb0f", "028ae212624164044cfaa84f347fc502cb7fcb0f" ]
[ "tests/st/ops/gpu/test_batchnorm_fold_op.py", "tests/st/ops/ascend/test_tbe_ops/test_addn.py", "tests/ut/python/dataset/test_minddataset.py", "tests/st/ops/gpu/test_flatten_op.py", "tests/st/ops/ascend/test_tbe_ops/test_softmax_cross_entropy_with_logits.py", "tests/ut/python/dataset/test_skip.py" ]
[ "# Copyright 2020 Huawei Technologies Co., Ltd\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable l...
[ [ "numpy.ones_like", "numpy.sqrt", "numpy.zeros_like", "numpy.random.uniform", "numpy.array" ], [ "numpy.random.randn" ], [ "numpy.asarray", "numpy.array" ], [ "numpy.array" ], [ "numpy.random.randn" ], [ "numpy.array" ] ]
ushham/JournalTool
[ "f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe", "f0ab9b6711b733f3c68a8a94bbb9773ffd3a95fe" ]
[ "journal_venv/lib/python3.9/site-packages/cartopy/tests/mpl/test_plots.py", "journal_venv/lib/python3.9/site-packages/cartopy/tests/io/test_srtm.py" ]
[ "# (C) British Crown Copyright 2018 - 2019, Met Office\n#\n# This file is part of cartopy.\n#\n# cartopy is free software: you can redistribute it and/or modify it under\n# the terms of the GNU Lesser General Public License as published by the\n# Free Software Foundation, either version 3 of the License, or\n# (at ...
[ [ "numpy.asarray", "numpy.degrees", "matplotlib.pyplot.figure" ], [ "numpy.testing.assert_array_equal", "numpy.hstack", "numpy.array", "numpy.dtype" ] ]
jakelishman/qutip
[ "fbb7fad5bc205910228db622d90601c82db45e4b", "fbb7fad5bc205910228db622d90601c82db45e4b", "fbb7fad5bc205910228db622d90601c82db45e4b", "fbb7fad5bc205910228db622d90601c82db45e4b", "fbb7fad5bc205910228db622d90601c82db45e4b" ]
[ "qutip/tests/solve/test_sesolve.py", "qutip/core/states.py", "qutip/core/data/expm.py", "qutip/solve/nonmarkov/heom.py", "qutip/_mkl/spmv.py" ]
[ "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are...
[ [ "numpy.testing.run_module_suite", "numpy.linspace", "numpy.cos", "numpy.shape", "numpy.testing.assert_allclose", "numpy.exp" ], [ "numpy.log", "numpy.sqrt", "numpy.asarray", "numpy.empty_like", "numpy.arange", "numpy.flipud", "numpy.cumprod", "numpy.roll...
dandiez/AdventOfCode
[ "99ebe6991964290ede87b144c8692c8f6b31030d" ]
[ "2019/day_12/solution.py" ]
[ "import itertools\nfrom math import lcm\nfrom typing import List\nfrom unittest import TestCase\n\nimport numpy as np\nfrom parse import parse\n\nVector3D = np.ndarray\n\n\ndef read_input(filename=\"input\"):\n with open(filename) as f:\n lines = [line.strip() for line in f.readlines() if line.strip()]\n ...
[ [ "numpy.array" ] ]
anhddo/ai-arena
[ "bc881e83073be4f9130b1a50fa56a51c11d21f9f" ]
[ "arena5/algos/hppo/hppo.py" ]
[ "# ©2020 Johns Hopkins University Applied Physics Laboratory LLC.\nimport random\nimport os\nimport numpy as np\nfrom arena5.algos.hppo.utils import ned_to_ripCoords_tf\nfrom arena5.algos.hppo.GAE import GAE\nimport tensorflow as tf\nfrom stable_baselines.common.policies import MlpPolicy, CnnPolicy\nfrom stable_bas...
[ [ "numpy.expand_dims", "tensorflow.concat", "numpy.asarray", "tensorflow.minimum", "numpy.exp", "tensorflow.keras.backend.set_session", "tensorflow.ConfigProto", "numpy.argmax", "tensorflow.Session", "tensorflow.square", "numpy.invert", "tensorflow.keras.layers.Dense"...
r-matsuzaka/baby-steps-of-rl-ja
[ "fdfd1da6df2fc12168c7f0c1ed211f09b0da1135" ]
[ "IRL/bayesian.py" ]
[ "import numpy as np\nimport scipy.stats\nfrom planner import PolicyIterationPlanner\nfrom scipy.special import logsumexp\nfrom tqdm import tqdm\n\n\nclass BayesianIRL:\n def __init__(self, env, eta=0.8, prior_mean=0.0, prior_scale=0.5):\n self.env = env\n self.planner = PolicyIterationPlanner(env)\...
[ [ "numpy.random.normal", "numpy.array", "numpy.random.randn", "scipy.special.logsumexp" ] ]
teomores/Oracle_HPC_contest
[ "6be9a097abc6d4b45f7c80e7095f536a38b13161" ]
[ "features/target.py" ]
[ "import pandas as pd\nimport numpy as np\nimport os\n\ndef target(df_exp_train, path=\"\"):\n path_validation = os.path.join(path, \"test.csv\")\n df_val = pd.read_csv(path_validation, escapechar=\"\\\\\")\n df_exp_train = df_exp_train.merge(df_val[['record_id', 'linked_id']], how='left', left_on='queried_...
[ [ "pandas.read_csv", "numpy.where" ] ]
elvijs/GPflow
[ "056e59f2c5aa2b5021de9b7b91ce1cee2ea0bb92", "056e59f2c5aa2b5021de9b7b91ce1cee2ea0bb92", "056e59f2c5aa2b5021de9b7b91ce1cee2ea0bb92" ]
[ "gpflow/expectations/cross_kernels.py", "tests/test_mean_functions.py", "gpflow/mean_functions.py" ]
[ "import tensorflow as tf\n\nfrom . import dispatch\nfrom .. import kernels\nfrom ..inducing_variables import InducingPoints\nfrom ..probability_distributions import DiagonalGaussian, Gaussian\nfrom .expectations import expectation\n\n\n@dispatch.expectation.register((Gaussian, DiagonalGaussian), kernels.SquaredExpo...
[ [ "tensorflow.linalg.diag_part", "tensorflow.transpose", "tensorflow.linalg.cholesky_solve", "tensorflow.shape", "tensorflow.zeros", "tensorflow.linalg.triangular_solve", "tensorflow.linalg.diag", "tensorflow.linalg.matmul", "tensorflow.exp", "tensorflow.expand_dims", "te...
GBillotey/Fractal-shades
[ "99c690cb1114ab7edcbfd9836af585fed2b133e8", "99c690cb1114ab7edcbfd9836af585fed2b133e8" ]
[ "tests/test_memmap.py", "src/fractalshades/numpy_utils/xrange.py" ]
[ "# -*- coding: utf-8 -*-\nimport os\nimport unittest\nimport concurrent.futures\nimport contextlib\nimport sys\nimport uuid\n\nimport numpy as np\nfrom numpy.lib.format import open_memmap\n\n\nimport fractalshades.utils as fsutils\nimport fractalshades.settings as fssettings\nfrom fractalshades.mprocessing import M...
[ [ "numpy.testing.assert_array_equal", "numpy.ones" ], [ "numpy.can_cast", "numpy.sqrt", "numpy.get_printoptions", "numpy.take", "numpy.asarray", "numpy.around", "numpy.squeeze", "numpy.dtype", "numpy.broadcast", "numpy.where", "numpy.square", "numpy.frexp"...
pwambach/cate
[ "956eff12530e4a339f56d6d3739bc41328df4f75" ]
[ "cate/util/im/utils.py" ]
[ "# The MIT License (MIT)\n# Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy of\n# this software and associated documentation files (the \"Software\"), to deal in\n# the Software without restriction, ...
[ [ "numpy.fmax", "numpy.fmin" ] ]
AdrienCorenflos/JSL
[ "8a3ba27179a2bd90207214fccb81df884b05c3d0" ]
[ "jsl/experimental/seql/experiments/poly_logreg_sgd_demo.py" ]
[ "import jax.numpy as jnp\nfrom jax import random, nn\nfrom sklearn.preprocessing import PolynomialFeatures\n\nfrom jsl.experimental.seql.agents.sgd_agent import sgd_agent\nfrom jsl.experimental.seql.environments.base import make_random_poly_classification_environment\nfrom jsl.experimental.seql.experiments.plotting...
[ [ "sklearn.preprocessing.PolynomialFeatures" ] ]
KazutakaYamanouchi/bachelor-study
[ "a5b8392459e7649cb8a35d09e65bd269d13b5297", "a5b8392459e7649cb8a35d09e65bd269d13b5297" ]
[ "utils/dwt.py", "utils/dct.py" ]
[ "import torch\nimport torch.nn as nn\n\n\nclass LossyYCbCr(nn.Module):\n def forward(self, rgb: torch.Tensor):\n return torch.cat([\n # Y (B, 1, H, W)\n 0.299 * rgb[:, 0:1]\n + 0.587 * rgb[:, 1:2]\n + 0.114 * rgb[:, 2:3],\n # Cb (B, 1, H, W)\n ...
[ [ "torch.cat" ], [ "numpy.sqrt", "torch.nn.ConvTranspose2d", "torch.zeros", "torch.cat", "torch.nn.Conv2d", "numpy.cos", "torch.nn.UpsamplingBilinear2d", "torch.nn.AvgPool2d", "torch.flatten" ] ]
tjdcs/colour
[ "09413da71b5da57408eb812797c5db1300d4791a" ]
[ "colour/models/rgb/datasets/itur_bt_2020.py" ]
[ "\"\"\"\nITU-R BT.2020 Colourspace\n=========================\n\nDefines the *ITU-R BT.2020* colourspace:\n\n- :attr:`colour.models.RGB_COLOURSPACE_BT2020`.\n\nReferences\n----------\n- :cite:`InternationalTelecommunicationUnion2015h` : International\n Telecommunication Union. (2015). Recommendation ITU-R BT...
[ [ "numpy.linalg.inv", "numpy.array" ] ]
Unmesh-Kumar/DMRM
[ "f1c24049bd527c9dcc5ab6e6727dfa6c8e794c02" ]
[ "Decoders/decoder1_attention.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nimport torch.nn.functional as F\nfrom classifier import SimpleClassifier\n\nclass _netG(nn.Module):\n def __init__(self, args):\n super(_netG, self).__init__()\n\n self.ninp = args.ninp\n self.nhid = args.nhid\n ...
[ [ "torch.div", "torch.LongTensor", "torch.max", "torch.nn.functional.log_softmax", "torch.nn.functional.dropout", "torch.zeros", "torch.unsqueeze", "torch.multinomial", "torch.exp", "torch.nn.Linear", "torch.FloatTensor", "torch.sort", "torch.nn.init.xavier_unifor...
jrobrien91/ACT
[ "604b93d75366d23029f89d88df9053d52825c214", "604b93d75366d23029f89d88df9053d52825c214", "604b93d75366d23029f89d88df9053d52825c214", "604b93d75366d23029f89d88df9053d52825c214" ]
[ "examples/plot_daytime_averages.py", "examples/plot_raw_minimpl.py", "examples/plot_multiple_dataset.py", "examples/plot_rh_timeseries.py" ]
[ "\"\"\"\nCalculate and plot daily daytime temperature averages\n-----------------------------------------------------\n\nExample of how to read in MET data and plot up daytime\ntemperature averages using the add_solar_variable function\n\nAuthor: Adam Theisen\n\"\"\"\n\nimport matplotlib.pyplot as plt\n\nimport act...
[ [ "matplotlib.pyplot.show" ], [ "matplotlib.pyplot.show" ], [ "matplotlib.pyplot.show" ], [ "matplotlib.pyplot.show" ] ]
vigneshyaadav27/Car-Rental
[ "9437f90fb1ed000df9c66ec3911b60c99d2cc7ee" ]
[ "gamblers_problem.py" ]
[ "#######################################################################\r\n# Copyright (C) #\r\n# 2016-2018 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #\r\n# 2016 Kenta Shimada(hyperkentakun@gmail.com) #\r\n# Permission gi...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "matplotlib.use", "numpy.arange", "matplotlib.pyplot.savefig", "numpy.round", "numpy.max", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.subplot", "matplotlib.pyplot.close", "matplotlib.pyplot.xlabel", "numpy...
aaronspring/xclim
[ "18c5b358d1bed4014b0877df3dd7ff435f772157", "393797308a581428c229920a3b0933c8243cd03a" ]
[ "xclim/analog.py", "xclim/testing/tests/test_units.py" ]
[ "# -*- encoding: utf8 -*-\n# noqa: D205,D400\n\"\"\"\nSpatial analogs\n===============\n\nSpatial analogues are maps showing which areas have a present-day climate that is analogous\nto the future climate of a given place. This type of map can be useful for climate adaptation\nto see how well regions are coping tod...
[ [ "numpy.logical_xor", "numpy.log", "numpy.abs", "numpy.isnan", "sklearn.neighbors.kneighbors_graph", "numpy.arange", "scipy.spatial.distance.cdist", "numpy.atleast_1d", "numpy.atleast_2d", "numpy.atleast_3d", "scipy.spatial.distance.pdist", "numpy.apply_along_axis", ...
Javilleiro/-SDC_ND_P2-Advanced-Lane-Finding
[ "080466fa34c4d51856c30b47894828e3cd399a63" ]
[ "line.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sun Feb 7 11:38:55 2021\n\n@author: dahouse\n\"\"\"\nimport numpy as np\n\n# Define a class to receive the characteristics of each line detection\nclass Line():\n def __init__(self):\n # was the line detected in the last iteration?\n self.detected = Fal...
[ [ "numpy.array" ] ]
AlainLich/COVID-Data
[ "43d7f950c86270bfe411af8bc899464f0599f48e" ]
[ "source/USA-covidtracking-com.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # Analyze population data from https://covidtracking.com\n# \n# \n# **Note:** This is a Jupyter notebook which is also available as its executable export as a Python 3 script (therefore with automatically generated comments).\n\n# ### Sept 29,2021: Obsolete data\n# Our s...
[ [ "pandas.to_datetime" ] ]
garyteofanus/pandas
[ "cc51219fad8add8f442b847ccdabd3f9e9077cb6", "cc51219fad8add8f442b847ccdabd3f9e9077cb6", "cc51219fad8add8f442b847ccdabd3f9e9077cb6", "cc51219fad8add8f442b847ccdabd3f9e9077cb6", "cc51219fad8add8f442b847ccdabd3f9e9077cb6", "cc51219fad8add8f442b847ccdabd3f9e9077cb6" ]
[ "asv_bench/benchmarks/rolling.py", "pandas/tests/test_nanops.py", "asv_bench/benchmarks/multiindex_object.py", "pandas/tests/groupby/test_bin_groupby.py", "pandas/tests/plotting/test_frame.py", "pandas/tests/frame/methods/test_diff.py" ]
[ "import numpy as np\n\nimport pandas as pd\n\n\nclass Methods:\n\n params = (\n [\"DataFrame\", \"Series\"],\n [10, 1000],\n [\"int\", \"float\"],\n [\"median\", \"mean\", \"max\", \"min\", \"std\", \"count\", \"skew\", \"kurt\", \"sum\"],\n )\n param_names = [\"contructor\", \"...
[ [ "numpy.random.random", "pandas.Series", "pandas.DataFrame", "pandas.date_range", "numpy.sum" ], [ "pandas._testing.assert_almost_equal", "numpy.split", "numpy.imag", "pandas.Series", "numpy.take", "numpy.linspace", "numpy.vstack", "numpy.max", "numpy.ran...
OxfordHED/sunbear
[ "9c7f368c4086f69868e7e5d87ea0b40700610e19" ]
[ "sunbear/vis.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\nfrom sunbear.forward import forward_pos\n\n__all__ = [\"vis\"]\n\ndef vis(phi, ngrid=10, line_kwargs={}):\n \"\"\"\n Plot the grid deformation based on the given deflection potential, `phi`.\n It only works for 2D signal at the moment.\n\n Parameters...
[ [ "matplotlib.pyplot.gca", "numpy.linspace", "numpy.ndim", "matplotlib.pyplot.plot", "numpy.meshgrid" ] ]
aurelienpierre/colour
[ "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47", "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47", "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47", "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47", "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47", "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c47", "3ac45c12fbc0493e49ba4d4b2cb253df9fe14c4...
[ "colour/contrast/tests/test_barten1999.py", "colour/recovery/tests/test_meng2015.py", "colour/examples/notation/examples_hexadecimal.py", "colour/characterisation/tests/test_aces_it.py", "colour/models/osa_ucs.py", "colour/appearance/tests/test_rlab.py", "colour/examples/models/examples_cmyk.py", "col...
[ "\"\"\"Defines the unit tests for the :mod:`colour.contrast.barten1999` module.\"\"\"\n\nimport numpy as np\nimport unittest\nfrom itertools import permutations\n\nfrom colour.contrast import (\n optical_MTF_Barten1999,\n pupil_diameter_Barten1999,\n sigma_Barten1999,\n retinal_illuminance_Barten1999,\n...
[ [ "numpy.reshape", "numpy.array", "numpy.tile" ], [ "numpy.array" ], [ "numpy.array" ], [ "numpy.array" ], [ "scipy.optimize.fmin", "numpy.array" ], [ "numpy.reshape", "numpy.array", "numpy.tile" ], [ "numpy.array" ], [ "numpy.array" ...
ExternalRepositories/shroud
[ "86c39d2324d947d28055f9024f52cc493eb0c813", "86c39d2324d947d28055f9024f52cc493eb0c813" ]
[ "regression/run/struct-numpy-c/python/test.py", "regression/run/vectors-numpy/python/test.py" ]
[ "# Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and\n# other Shroud Project Developers.\n# See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (BSD-3-Clause)\n# #######################################################################\n#\n# Test Python API generated from...
[ [ "numpy.array" ], [ "numpy.array", "numpy.equal", "numpy.allclose" ] ]
ecreager/jax
[ "948def817fd7cc2ee7a988b5142401a580b1bbd3" ]
[ "tests/lax_test.py" ]
[ "# Copyright 2018 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.swapaxes", "numpy.minimum", "numpy.take", "numpy.maximum", "numpy.unique", "numpy.asarray", "numpy.dtype", "numpy.ones", "numpy.full", "numpy.finfo", "numpy.iinfo", "numpy.prod", "numpy.array", "numpy.random.RandomState", "numpy.flip", "numpy....
tmay-sarsaparilla/advent-of-code-2021
[ "3cd827df57d315dd96627544b9f5c31b7db1aa11" ]
[ "23/day_twentythree.py" ]
[ "\nimport numpy as np\nfrom numpy.lib.index_tricks import index_exp\n\n\ndef create_burrow(lines):\n longest = max(len(l) for l in lines)\n normalised_lines = []\n for line in lines:\n if len(line) == longest:\n normalised_lines.append(line)\n continue\n missing = longes...
[ [ "numpy.ndenumerate" ] ]
Angericky/CenterPoint-KITTI
[ "093a4a352e8b14cd1fb430770d9b4ccd7d3b0803" ]
[ "pcdet/datasets/dataset.py" ]
[ "from collections import defaultdict\nfrom pathlib import Path\n\nimport numpy as np\nfrom numpy.lib.arraysetops import unique\nimport torch.utils.data as torch_data\n\nfrom ..utils import common_utils\nfrom .augmentor.data_augmentor import DataAugmentor\nfrom .processor.data_processor import DataProcessor\nfrom .p...
[ [ "numpy.split", "numpy.sqrt", "numpy.pad", "numpy.unique", "numpy.random.choice", "numpy.cos", "numpy.stack", "numpy.sin", "numpy.arctan2", "numpy.lexsort", "numpy.delete", "numpy.concatenate", "numpy.round", "numpy.array", "numpy.zeros", "numpy.where...
bbartling/bacnet-people-counter
[ "db269b6b62e4e3e207c443dfb89164af587e9baf" ]
[ "restful_people_count.py" ]
[ "# To read from webcam and write back out to disk:\n# py -3.9 people_counter.py \n\n# import the necessary packages\nfrom pyimagesearch.centroidtracker import CentroidTracker\nfrom pyimagesearch.trackableobject import TrackableObject\nfrom imutils.video import VideoStream\nfrom imutils.video import FPS\nimport nump...
[ [ "numpy.arange", "numpy.array", "numpy.mean" ] ]
ezzaimsoufiane/keras-ocr
[ "df98046b9ed2a506311515db830d3fd7357ca45a" ]
[ "keras_ocr/evaluation.py" ]
[ "# pylint: disable=invalid-name,too-many-locals\nimport copy\nimport warnings\n\nimport editdistance\nimport numpy as np\nimport pyclipper\nimport cv2\n\n\n# Adapted from https://github.com/andreasveit/coco-text/blob/master/coco_evaluation.py\ndef iou_score(box1, box2):\n \"\"\"Returns the Intersection-over-Unio...
[ [ "numpy.array", "numpy.int32" ] ]
XinGuoZJU/SPFN
[ "e7fc2fb40e42c39c1a9329b2495127d2b945cef8" ]
[ "pointnet_plusplus/architectures.py" ]
[ "import os, sys\nBASE_DIR = os.path.normpath(\n os.path.join(os.path.dirname(os.path.abspath(__file__))))\nsys.path.append(os.path.join(BASE_DIR, 'utils'))\n\nfrom pointnet_util import pointnet_sa_module, pointnet_fp_module\nimport tensorflow as tf\nimport tf_util\n\ndef build_pointnet2_seg(scope, X, out_dim...
[ [ "tensorflow.concat", "tensorflow.shape", "tensorflow.slice", "tensorflow.reshape", "tensorflow.variable_scope" ] ]
nishanth-/goldenowl
[ "7e45d1e5274366e90332bb6fd06aa87f818217e3" ]
[ "goldenowl/portfolio/simplePut.py" ]
[ "import itertools\nimport pandas as pd\nimport datetime as dt\nfrom xirr.math import xirr\nimport goldenowl.asset.asset\nfrom goldenowl.portfolio.holding import Holding\n\nclass SimplePut(Holding):\n def __init__(self, aName, aAsset, aStrike, aExpiry, aOTMCostFactor):\n Holding.__init__(self, aName, aAsse...
[ [ "pandas.to_datetime" ] ]
JieZheng-ShanghaiTech/KG4SL
[ "dc52424aaf36de28124013f080dfa59083c314a8" ]
[ "src/train.py" ]
[ "import tensorflow as tf\nimport numpy as np\nfrom model import KG4SL\nimport pandas as pd\nfrom sklearn.model_selection import ShuffleSplit\nimport matplotlib as mpl\nmpl.use('Agg')\nimport matplotlib.pyplot as plt\n\ndef reindexid2geneName(test_data):\n entity2id = pd.read_csv('../data/entity2id.txt', sep='\\t...
[ [ "matplotlib.pyplot.legend", "tensorflow.concat", "tensorflow.zeros", "pandas.DataFrame", "matplotlib.pyplot.plot", "numpy.mean", "tensorflow.get_default_graph", "pandas.read_csv", "sklearn.model_selection.ShuffleSplit", "numpy.std", "tensorflow.reset_default_graph", ...
gregbugaj/form-processor
[ "0c803de43a98b4a02efa956803e64793995256ff" ]
[ "hsv_selector.py" ]
[ "import cv2\nimport numpy as np\n\ndef nothing(x):\n pass\n\n# Load image\nimg_path ='./assets/forms-seg/001_fake.png'\nimg_path ='/tmp/form-segmentation/PID_10_5_0_2787.original.redacted.tif/work/resized_mask.png'\nimg_path ='/tmp/form-segmentation/269692_202006290005214_001.tif/work/resized_mask.png'\nimg_path...
[ [ "numpy.array" ] ]
covid-19-impact-lab/sid-germany
[ "aef4bbfb326adaf9190c6d8880e15b3d6f150d28", "aef4bbfb326adaf9190c6d8880e15b3d6f150d28" ]
[ "src/create_initial_states/task_build_full_params.py", "src/plotting/task_create_scenario_comparison_tables.py" ]
[ "from pathlib import Path\n\nimport pandas as pd\nimport pytask\nimport sid\n\nfrom src.config import BLD\nfrom src.config import SRC\nfrom src.contact_models.get_contact_models import get_all_contact_models\n\nEPI_PARAMS_PATH = Path(sid.__file__).parent.joinpath(\"covid_epi_params.csv\").resolve()\n\n_DEPENDENCIES...
[ [ "pandas.concat", "pandas.read_csv", "pandas.Series", "pandas.DataFrame", "pandas.read_pickle" ], [ "pandas.read_pickle", "pandas.Series", "pandas.DataFrame" ] ]
quynhu-d/asr_project_template
[ "1f2cebcf7d516b66a2d049b3e67611141866b0e7" ]
[ "hw_asr/text_encoder/ctc_char_text_encoder.py" ]
[ "from typing import List, Tuple\n\nimport torch\nfrom collections import defaultdict\nfrom tqdm import tqdm\n\nfrom hw_asr.text_encoder.char_text_encoder import CharTextEncoder\nimport numpy as np\n\nclass CTCCharTextEncoder(CharTextEncoder):\n EMPTY_TOK = \"^\"\n\n def __init__(self, alphabet: List[str]):\n ...
[ [ "numpy.log" ] ]
Lkruitwagen/global-fossil-fuel-supply-chain
[ "f5d804a5f7cee19af46d2f31e635590d3930bacd", "f5d804a5f7cee19af46d2f31e635590d3930bacd" ]
[ "ffsc/flow/make_network.py", "ffsc/pipeline/datasets/gpkg_dataset.py" ]
[ "import logging, json, os, sys\nlogging.basicConfig(stream=sys.stdout, level=logging.INFO)\n\nimport pandas as pd\nfrom tqdm import tqdm\ntqdm.pandas()\n\nfrom ffsc.flow.recipes import recipes\n\ndef get_edges(df,dup_1, dup_2, reverse):\n edges = ['START','END']\n if dup_1:\n edges[0] = 'START_B'\n ...
[ [ "pandas.DataFrame" ], [ "pandas.concat" ] ]
tyjiang1997/NonLocalProp_MVD
[ "5cf5a5b422fd20e710429363447dc36a90f12b18", "5cf5a5b422fd20e710429363447dc36a90f12b18" ]
[ "core/utils/inverse_warp_d.py", "ddptest.py" ]
[ "from __future__ import division\nimport torch\nfrom torch.autograd import Variable\nimport pdb\n\npixel_coords = None\n\n\ndef set_id_grid(depth):\n global pixel_coords\n b, d, h, w = depth.size()\n i_range = Variable(torch.arange(0, h).view(1, 1, h, 1).expand(1,d,h,w)).type_as(depth) # [1, H, W]\n j_...
[ [ "torch.stack", "torch.linspace", "torch.ones", "torch.arange" ], [ "torch.abs", "matplotlib.pyplot.imsave", "torch.mean", "torch.distributed.init_process_group", "torch.cuda.set_device", "torch.load", "torch.cat", "torch.utils.data.DataLoader", "numpy.linalg...
ludwig-ai/ludw
[ "b9d95bbdb474bc22260269de1bc094bc5455f37c", "b9d95bbdb474bc22260269de1bc094bc5455f37c", "b9d95bbdb474bc22260269de1bc094bc5455f37c" ]
[ "tests/integration_tests/test_sequence_sampled_softmax.py", "ludwig/modules/mlp_mixer_modules.py", "ludwig/utils/loss_utils.py" ]
[ "# Copyright (c) 2019 Uber Technologies, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl...
[ [ "numpy.random.choice", "numpy.random.seed", "pandas.DataFrame", "numpy.random.randint" ], [ "torch.mean", "torch.Size", "torch.nn.Dropout", "torch.nn.Conv2d", "torch.nn.LayerNorm", "torch.nn.Linear" ], [ "torch.mean", "torch.clamp", "torch.sum", "tor...
nishiwen1214/GLUE-bert4keras
[ "4ac2477192471001cd2b98ec9ff329ad1c20e767" ]
[ "MRPC.py" ]
[ "#! -*- coding:utf-8 -*-\n# https://github.com/nishiwen1214/GLUE-bert4keras\n# 句子对分类任务,MRPC数据集\n# val_acc: 84.174, F1: 88.525\n\nimport numpy as np\nfrom bert4keras.backend import keras, set_gelu, K\nfrom bert4keras.tokenizers import Tokenizer\nfrom bert4keras.models import build_transformer_model\nfrom bert4keras....
[ [ "sklearn.metrics.f1_score", "numpy.array", "numpy.append" ] ]
hammer-wang/FOCAL-ICLR
[ "4d19149f86acc1d6b987c93cdd3a9d957535c5e3", "4d19149f86acc1d6b987c93cdd3a9d957535c5e3" ]
[ "rlkit/launchers/launcher_util.py", "rlkit/torch/brac/utils.py" ]
[ "import json\nimport os\nimport os.path as osp\nimport shutil\nimport pickle\nimport random\nimport sys\nimport time\nimport uuid\nimport click\nfrom collections import namedtuple\n\nimport __main__ as main\nimport datetime\nimport dateutil.tz\nimport numpy as np\n\nfrom rlkit.core import logger\nfrom rlkit.launche...
[ [ "numpy.random.seed" ], [ "torch.abs", "torch.clamp", "torch.zeros_like", "torch.ones_like" ] ]
ronner1234/BERT-for-IBC-TF1
[ "e2b8f628974017df159ab50ba615aeb2ea1d363c" ]
[ "data/generate_political_corpus_test.py" ]
[ "import pandas as pd\nimport spacy\nimport numpy as np\n\nnlp=spacy.load(\"en_core_web_md\") # load sentence tokenzation\n\ninput_data=pd.read_csv(\"ideological_books_corpus.csv\", header=None, sep=\"@\", names=['label', 'sentence'])\n\nprint(input_data)\n\nmapping = {'Liberal': 1, 'Conservative': 2, 'Neutral': 3}\...
[ [ "pandas.read_csv" ] ]
balakhonoff/catalyst
[ "82d904aee97045efbaef3963e36c2ce5173ddac4", "82d904aee97045efbaef3963e36c2ce5173ddac4", "82d904aee97045efbaef3963e36c2ce5173ddac4", "82d904aee97045efbaef3963e36c2ce5173ddac4" ]
[ "catalyst/contrib/scripts/find_thresholds.py", "catalyst/dl/utils/torch.py", "catalyst/contrib/utils/visualization.py", "catalyst/data/scripts/split_dataframe.py" ]
[ "from typing import Any, Callable, Dict, List, Tuple\nimport argparse\nfrom itertools import repeat\nimport json\nfrom pathlib import Path\nfrom pprint import pprint\n\nimport numpy as np\nimport pandas as pd\nfrom scipy.special import expit\nfrom sklearn import metrics\nfrom sklearn.model_selection import Repeated...
[ [ "sklearn.metrics.__dict__.keys", "pandas.read_csv", "numpy.linspace", "scipy.special.expit", "numpy.load", "numpy.sort", "sklearn.model_selection.RepeatedStratifiedKFold", "numpy.mean", "numpy.argmax", "numpy.argsort", "numpy.array", "numpy.zeros" ], [ "torc...
raviddoss/ActivityNet
[ "eba0ec905d831802e131ecae6fea58d376da49dd" ]
[ "Evaluation/ava/per_image_evaluation.py" ]
[ "# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ...
[ [ "numpy.array", "numpy.logical_and", "numpy.zeros", "numpy.argmax" ] ]
zrobertson466920/RL_Baselines_BCO
[ "0287305a926864e6c685a9c46aa2b9094da1e213" ]
[ "enjoy_double_Q.py" ]
[ "import gym\nfrom keras.models import Sequential\nfrom keras.layers import Dense\nfrom keras.optimizers import Adam\nfrom keras.utils import to_categorical\nimport numpy as np\nimport random\nfrom matplotlib import pyplot as plt\nimport pickle\nfrom tensorflow import convert_to_tensor\nimport tensorflow as tf\n\n# ...
[ [ "matplotlib.pyplot.title", "numpy.random.choice", "numpy.reshape", "numpy.arange", "numpy.ma.masked_where", "matplotlib.pyplot.subplots", "matplotlib.pyplot.plot", "matplotlib.pyplot.NullFormatter", "numpy.random.uniform", "numpy.argmax", "numpy.mean", "numpy.random...
anjunhu/inter-rel-net
[ "c25fbee3ef4607a492e37728a80323137d83e368" ]
[ "src/datasets/YMJA.py" ]
[ "import pandas as pd\nimport numpy as np\nimport os\nimport random\nimport glob\n\nfrom misc import data_io\n\nDATA_DIR = 'data/YMJA/'\n\n\"\"\" Folder structure\naction/\n clip0_positions.json\n clip1_positions.json\n clip2_positions.json\n \nEx: DATA_DIR + 'Tripping/_2017-11-06-det-van-home15.json...
[ [ "numpy.arange", "pandas.DataFrame" ] ]
amitbcp/tsai-vision
[ "14a66d4c3295714fdcc97db13804ffba9d6f06cc" ]
[ "assignment_6/src/test.py" ]
[ "import torch\nimport torch.nn.functional as F\n\n\ndef test(model, device, test_loader, test_acc, test_losses):\n model.eval()\n test_loss = 0\n correct = 0\n with torch.no_grad():\n for data, target in test_loader:\n data, target = data.to(device), target.to(device)\n outp...
[ [ "torch.no_grad", "torch.nn.functional.nll_loss" ] ]
pnnl/deimos
[ "3f5e8d67a698818679bea91b7605c6418ef02265" ]
[ "tests/test_calibration.py" ]
[ "import deimos\nimport numpy as np\nimport pytest\n\n\n@pytest.fixture()\ndef ccs_cal():\n return deimos.calibration.CCSCalibration()\n\n\n@pytest.fixture()\ndef pos():\n return {'mz': [118.086255, 322.048121, 622.028960, 922.009798, 1221.990636, 1521.971475],\n 'ta': [13.72, 18.65, 25.20, 30.44, 3...
[ [ "numpy.abs" ] ]
bvsk35/Linear-Regression-
[ "0b4791c99dd97a99f8f4309f204b95307d3e21f6" ]
[ "GenerateData.py" ]
[ "# This file generates data required for Linear Regression\r\n\r\n# Import required libraries\r\nimport numpy\r\n\r\n# To generate X\r\na = numpy.arange(1, 51)\r\nb = numpy.ones(50)\r\nX = numpy.concatenate((b[:, numpy.newaxis], a[:, numpy.newaxis]), axis=1)\r\nnumpy.savetxt('X.txt', X)\r\n\r\n# To generate Y\r\nA ...
[ [ "numpy.arange", "numpy.ones", "numpy.concatenate", "numpy.savetxt", "numpy.random.uniform" ] ]
parthgajjar4/infertrade
[ "2eebf2286f5cc669759de632970e4f8f8a40f232" ]
[ "tests/test_performance.py" ]
[ "import numpy as np\nimport pandas as pd\nimport pytest\nfrom pathlib import Path\nfrom examples.my_first_infertrade_strategy import buy_on_small_rises\nfrom infertrade.PandasEnum import PandasEnum\nfrom infertrade.utilities.performance import calculate_allocation_from_cash\nimport infertrade.utilities.performance\...
[ [ "numpy.isnan", "pandas.read_csv" ] ]
DLPerf/Open3D-ML
[ "6e8c3160642749936b7fe0c40e1f1aa72960eab2" ]
[ "ml3d/tf/models/point_rcnn.py" ]
[ "import tensorflow as tf\n\nimport numpy as np\nimport os\nimport pickle\n\nfrom .base_model_objdet import BaseModel\nfrom ..modules.losses.smooth_L1 import SmoothL1Loss\nfrom ..modules.losses.focal_loss import FocalLoss\nfrom ..modules.losses.cross_entropy import CrossEntropyLoss\nfrom ..modules.pointnet import Po...
[ [ "numpy.logical_xor", "tensorflow.sign", "tensorflow.concat", "tensorflow.zeros", "tensorflow.reduce_sum", "tensorflow.stack", "tensorflow.cast", "tensorflow.keras.Sequential", "numpy.round", "numpy.concatenate", "tensorflow.argsort", "tensorflow.where", "numpy.w...
jmaces/rde
[ "d71169d697c322695901653fedd2ccf97413f018", "d71169d697c322695901653fedd2ccf97413f018" ]
[ "stl10/script_lime.py", "mnist/data/keras_generators.py" ]
[ "import os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nfrom lime.lime_image import LimeImageExplainer\nfrom tqdm import tqdm\n\nimport instances\n\nfrom models import load_model\n\n\n# PARAMETERS\nINDICES = range(0, 7999, 160) # data samples\n\n\nif __name__ == \"__main__\":\n # LOAD MODEL\n mo...
[ [ "numpy.expand_dims", "numpy.abs", "numpy.reshape", "numpy.argmax", "numpy.mean", "numpy.zeros" ], [ "tensorflow.keras.preprocessing.image.ImageDataGenerator", "tensorflow.keras.backend.image_data_format" ] ]
reliapy/reliapy
[ "3efd48af5cc3bedbcbc5de64fb43e6c5625e3f6d", "3efd48af5cc3bedbcbc5de64fb43e6c5625e3f6d", "3efd48af5cc3bedbcbc5de64fb43e6c5625e3f6d" ]
[ "src/reliapy/distributions/continuous/_exponnorm.py", "src/reliapy/distributions/continuous/_chi.py", "src/reliapy/distributions/continuous/_erlang.py" ]
[ "from reliapy.distributions.continuous import _Continuous\nfrom scipy.stats import exponnorm as prob\n\n\nclass ExponNorm(_Continuous):\n\n def __init__(self, K=None, loc=None, scale=None, random_state=None):\n self.K = K\n self.loc = loc\n self.scale = scale\n self.stats = prob.stats...
[ [ "scipy.stats.exponnorm.cdf", "scipy.stats.exponnorm.pdf", "scipy.stats.exponnorm.stats", "scipy.stats.exponnorm.ppf", "scipy.stats.exponnorm.rvs", "scipy.stats.exponnorm.moment" ], [ "scipy.stats.chi.pdf", "scipy.stats.chi.cdf", "scipy.stats.chi.stats", "scipy.stats.chi...
fkwai/geolearn
[ "30cb4353d22af5020a48100d07ab04f465a315b0", "30cb4353d22af5020a48100d07ab04f465a315b0", "30cb4353d22af5020a48100d07ab04f465a315b0", "30cb4353d22af5020a48100d07ab04f465a315b0", "30cb4353d22af5020a48100d07ab04f465a315b0", "30cb4353d22af5020a48100d07ab04f465a315b0", "30cb4353d22af5020a48100d07ab04f465a315b...
[ "app/paper/presentation/temp.py", "app/wqFull/legacy/temp.py", "hydroDL/model/layers.py", "app/waterQual/newSite/prep/countSitePlot.py", "app/waterQual/model/HBN_CQ_click.py", "hydroDL/data/usgs/read.py", "app/waterQual/WRTDS-L5/geoCorr.py", "app/streamflow/regional/box_region_lev0.py", "app/region/...
[ "from scipy.stats import invgamma\nimport matplotlib.pyplot as plt\n\nimport numpy as np\n\nx = np.linspace(invgamma.ppf(0.01, a),\n invgamma.ppf(0.99, a), 100)\nrv = invgamma(a)\nfig, ax = plt.subplots(1, 1)\n\nax.plot(x, rv.pdf(x), 'k-', lw=2, label='frozen pdf')\n", "import numpy as np\nimport p...
[ [ "scipy.stats.invgamma", "matplotlib.pyplot.subplots", "scipy.stats.invgamma.ppf" ], [ "matplotlib.pyplot.subplots", "pandas.DataFrame", "numpy.datetime64" ], [ "torch.nn.Dropout", "torch.sin", "torch.zeros", "torch.arange", "torch.cos" ], [ "numpy.arange...
toogy/mnist-em-bmm-gmm
[ "8a4f4d743cd0226a45a70464648ee8724757577e" ]
[ "visualize.py" ]
[ "import scipy.misc\nimport matplotlib.pyplot as plt\n\ndef plot_means(means):\n\n k = means.shape[0]\n\n rows = k // 5 + 1\n columns = min(k, 5)\n\n for i in range(k):\n plt.subplot(rows, columns, i + 1)\n plt.imshow(scipy.misc.toimage(means[i].reshape(28, 28),\n ...
[ [ "matplotlib.pyplot.subplot" ] ]
DavidXu9000/AdversarialAblation
[ "a692bfde3a9814bf6639a95ca870fd44f56efbb0" ]
[ "dump_hdf5_dataset.py" ]
[ "# Author: Wei-Ning Hsu\nimport h5py\nimport json\nimport librosa\nimport numpy as np\nimport os\nimport scipy\nimport time\nfrom pathlib import Path\nfrom PIL import Image\nfrom torchvision.transforms import transforms\n\nfrom dataloaders.utils import WINDOWS, compute_spectrogram\n\n\ndef run(json_path, hdf5_json_...
[ [ "numpy.frombuffer", "numpy.dtype" ] ]
podismine/BrainAgeReg
[ "134ea1e088a330449c75ef732dc979ae126ca2cf" ]
[ "utils/visualize.py" ]
[ "#coding:utf8\nimport visdom\nimport time\nimport numpy as np\n\nclass Visualizer(object):\n def __init__(self, env='default', **kwargs):\n self.vis = visdom.Visdom(env=env, **kwargs)\n \n self.index = {} \n self.log_text = ''\n def reinit(self,env='default',**kwargs):\n\n s...
[ [ "numpy.array" ] ]
AlbanOdot/DeepPhysics-article
[ "ff9da848873098396c30de78e5ef086bd9644d87" ]
[ "network_architecture.py" ]
[ "import torch\nimport torch.nn as nn\nfrom typing import List\n\n\nclass FCNN(nn.Module):\n \"\"\"Class that describe the architecture and behavior of the neural network\"\"\"\n neurons_per_layer: int = 0 # number of neurons per layer\n layers: List[nn.Module] # Ordered list of the network lay...
[ [ "torch.nn.Linear", "torch.nn.Sequential", "torch.nn.PReLU" ] ]
UTokyo-ICEPP/multiml_htautau
[ "5f926c2291a55f57419aa0130d07e2a793fc7353", "5f926c2291a55f57419aa0130d07e2a793fc7353", "5f926c2291a55f57419aa0130d07e2a793fc7353" ]
[ "multiml_htautau/task/keras/higgsId_mass.py", "multiml_htautau/task/keras/tau4vec_zero.py", "examples/pytorch/run_utils.py" ]
[ "from . import HiggsID_BaseTask\n\n\nclass HiggsID_MassTask(HiggsID_BaseTask):\n ''' HiggsID MLP task\n '''\n def __init__(self,\n layers=None,\n activation=None,\n batch_norm=False,\n scale_mass=1.,\n **kwargs):\n \"\"\...
[ [ "tensorflow.keras.layers.Concatenate", "tensorflow.keras.backend.cos", "tensorflow.keras.backend.sin", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Lambda", "tensorflow.keras.backend.sqrt", "tensorflow.keras.backend.sum", "tensorflow.keras.backend.reshape", "tensor...
adithyabsk/foreshadow
[ "ca2e927c396ae0d61923b287d6e32e142f3ba96f", "ca2e927c396ae0d61923b287d6e32e142f3ba96f", "ca2e927c396ae0d61923b287d6e32e142f3ba96f", "ca2e927c396ae0d61923b287d6e32e142f3ba96f" ]
[ "foreshadow/tests/test_core/test_resolver.py", "foreshadow/steps/feature_summarizer.py", "foreshadow/tests/test_transformers/test_concrete/test_cleaners/test_data_cleaner.py", "foreshadow/intents/numeric.py" ]
[ "\"\"\"Test intent resolution steps.\"\"\"\n\n\ndef test_resolver_overall():\n \"\"\"Big picture intent resolution test.\"\"\"\n\n import numpy as np\n import pandas as pd\n from foreshadow.cachemanager import CacheManager\n from foreshadow.steps import IntentMapper\n\n columns = [\"financials\"]\...
[ [ "numpy.arange" ], [ "pandas.DataFrame" ], [ "numpy.arange", "numpy.array_equal", "pandas.DataFrame" ], [ "pandas.to_numeric" ] ]
ZhiliangWu/etips
[ "e5bee81c498287005658f012912c27b491ef3892" ]
[ "tuning.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# etips\n#\n# Copyright (c) Siemens AG, 2020\n# Authors:\n# Zhiliang Wu <zhiliang.wu@siemens.com>\n# License-Identifier: MIT\n\nimport gc\nfrom functools import partial\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport tensorflow as tf\n...
[ [ "numpy.multiply", "numpy.around", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "numpy.concatenate", "numpy.argmax", "tensorflow.keras.backend.clear_session", "numpy.mean", "numpy.random.RandomState", "numpy.zeros", "numpy.divide", "sklearn.metrics...
SamGalanakis/FlowCompare
[ "ed26e48298fe42cf9ddcc252c19b502b4a71d54e" ]
[ "models/scene_seg_PAConv/model/pointnet2/pointnet2_paconv_seg.py" ]
[ "from collections import namedtuple\n\nimport torch\nimport torch.nn as nn\n\nfrom .pointnet2_paconv_modules import PointNet2FPModule\nfrom models.scene_seg_PAConv.util import block\nfrom models import MLP\n\n\n# Code adapted from : https://github.com/CVMI-Lab/PAConv\n\nclass PointNet2SSGSeg(nn.Module):\n r\"\"\...
[ [ "torch.nn.ModuleList", "torch.nn.GELU" ] ]
Stelele/papi_iot
[ "d416276417244b05c42184e2daf619b14f0c5162" ]
[ "papi_iot/papi_storage_offline.py" ]
[ "import os\nimport glob\nfrom shutil import copy\nfrom os import listdir\nfrom os import makedirs\nfrom os import path\nfrom matplotlib import image\nfrom papi_iot.papi_exceptions import DirectoryCreationFail\n\nclass OfflineStorage (object):\n rootDir = 'home/pi'\n knownFaces = '/knownFaces'\n unknownFace...
[ [ "matplotlib.image.imread" ] ]
rominf/videoflow
[ "704ce6069a32332256264787d920bc296f2ca57c" ]
[ "videoflow/processors/vision/trackers.py" ]
[ "from __future__ import print_function\nfrom __future__ import division\nfrom __future__ import absolute_import\n\nimport numpy as np\nfrom filterpy.kalman import KalmanFilter\nfrom sklearn.utils.linear_assignment_ import linear_assignment\nimport math\n\nfrom ...core.node import OneTaskProcessorNode\n\nclass Bound...
[ [ "sklearn.utils.linear_assignment_.linear_assignment", "numpy.maximum", "numpy.sqrt", "numpy.minimum", "numpy.isnan", "numpy.concatenate", "numpy.ma.masked_invalid", "numpy.array", "numpy.where", "numpy.empty" ] ]
cclauss/SparseSC
[ "bd5c65f162a5431f92ed957df3385c803f2d3365" ]
[ "SparseSC/cross_validation.py" ]
[ "from SparseSC.fit_fold import fold_v_matrix, fold_score\nfrom SparseSC.fit_loo import loo_v_matrix, loo_score, loo_weights\nfrom SparseSC.fit_ct import ct_v_matrix, ct_score\n#-- from SparseSC.optimizers.cd_line_search import cdl_search\nfrom SparseSC.lambda_utils import get_max_lambda, L2_pen_guestimate\nimpor...
[ [ "numpy.diag", "numpy.hstack", "numpy.square", "scipy.optimize.differential_evolution", "numpy.multiply", "numpy.diagflat", "numpy.arange", "numpy.vstack", "numpy.sort", "sklearn.model_selection.KFold", "numpy.asmatrix", "numpy.sign", "numpy.mean", "numpy.exp...
cmcuervol/Mojana
[ "e5491d6af0b6d5ac1900371ece561b8bf8835f02" ]
[ "Modules/Hidrografas.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport numpy as np\nimport pandas as pd\nimport datetime as dt\n\nimport Graphs\n\nPath = os.getcwd()\n\ndef kmsq2misq(km2):\n \"\"\"\n Pass square kms to square milles\n INPUTS\n km2 : float of square kms\n \"\"\"\n if km2 ...
[ [ "numpy.poly1d", "numpy.linspace", "numpy.arange", "numpy.around", "numpy.percentile", "numpy.concatenate", "numpy.max", "numpy.mean", "numpy.interp", "numpy.where", "numpy.exp", "numpy.roll", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
NotAnyMike/stable-baselines
[ "dee991c673cfd52a81534bee033023e080517a21" ]
[ "tests/test_continuous.py" ]
[ "import subprocess\nimport os\n\nimport gym\nimport pytest\nimport numpy as np\n\nfrom stable_baselines import A2C, SAC\n# TODO: add support for continuous actions\n# from stable_baselines.acer import ACER\n# from stable_baselines.acktr import ACKTR\nfrom stable_baselines.ddpg import DDPG\nfrom stable_baselines.ppo...
[ [ "numpy.all", "numpy.squeeze", "numpy.allclose" ] ]
Asichurter/Few-Shot-Project
[ "865cd6aa7b996c518dfa48dcc9ffad90445f9efe" ]
[ "modules/model/SNAIL_.py" ]
[ "import math\nimport numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom modules.utils.dlUtils import get_block_1\n\n\nclass CasualConv1d(nn.Module):\n def __init__(self, in_channels, out_channels, kernel_size,\n stride=1, dilation=1, groups=1, bias=True):\n ...
[ [ "torch.nn.Sequential", "torch.nn.functional.softmax", "torch.transpose", "torch.sigmoid", "torch.ByteTensor", "torch.nn.functional.log_softmax", "torch.cat", "torch.tanh", "torch.nn.Linear", "torch.bmm", "torch.nn.Conv1d" ] ]
RubensBritto/AlgoritmoGenetico
[ "dc79bdb46bccadbaf0ad851bb2844378f6400b62", "dc79bdb46bccadbaf0ad851bb2844378f6400b62" ]
[ "hibrido/main.py", "rede-neural/perceptron.py" ]
[ "from ga import *\nfrom perceptron import *\nimport time\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\nepocasPlot = []\ntimePlot = []\nclf = Perceptron()\n\ndf = pd.read_csv('dataSetTrain2.csv')\ndf.head()\n\nX_train = df.iloc[0:,[0,1,2,3,4,5,6,7]].values\ny_train = df.iloc[0:,8].values\n\n\ndef train(po...
[ [ "pandas.read_csv", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ], [ "numpy.zeros" ] ]
Diuner/sign-segmentation
[ "4b5bd72898d393913f6d1dd451ebde9ef6964179" ]
[ "4_pred_postprocessing.py" ]
[ "import cv2\nimport numpy as np\nimport os\nfrom tqdm import tqdm\nimport json\nfrom shapely.geometry import Point\nfrom shapely.geometry.polygon import Polygon\nimport argparse\n\nthis_dir = \"/\".join(os.path.realpath(__file__).split('/')[:-1]) + '/'\nparent_dir = '/'.join(this_dir.split('/')[:-2]) + '/'\n\nparse...
[ [ "numpy.int0", "numpy.array", "numpy.array_equal" ] ]
rmgogogo/tfx
[ "8ed47f2570bd01d258d8ee9b1ab001e08d16af89", "8ed47f2570bd01d258d8ee9b1ab001e08d16af89", "8ed47f2570bd01d258d8ee9b1ab001e08d16af89", "8ed47f2570bd01d258d8ee9b1ab001e08d16af89" ]
[ "tfx/utils/io_utils.py", "tfx/components/pusher/executor_test.py", "tfx/components/pusher/component_test.py", "tfx/components/example_gen/big_query_example_gen/executor_test.py" ]
[ "# Lint as: python2, python3\n# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\...
[ [ "tensorflow.io.TFRecordWriter", "tensorflow.io.gfile.isdir", "tensorflow.io.gfile.walk", "tensorflow.io.gfile.exists", "tensorflow.python.lib.io.file_io.FileIO", "tensorflow.io.gfile.stat", "tensorflow.python.lib.io.file_io.write_string_to_file", "tensorflow.io.gfile.makedirs", ...
shashank3959/NAS-Projects
[ "5eed8101a78d223a20a43494176051298b24ac3a", "2c0577231a52375de5ebd7a588750899a8c7bf1c" ]
[ "others/GDAS/lib/nas_rnn/model_search.py", "lib/nas_infer_model/operations.py" ]
[ "import copy, torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom collections import namedtuple\nfrom .genotypes import PRIMITIVES, STEPS, CONCAT, Genotype\nfrom .basemodel import DARTSCell, RNNModel\n\n\nclass DARTSCellSearch(DARTSCell):\n\n def __init__(self, ninp, nhid, dropouth, dropoutx):\n ...
[ [ "torch.nn.BatchNorm1d", "torch.mean", "torch.nn.functional.softmax", "torch.zeros_like", "torch.nn.init.normal_", "torch.no_grad", "torch.split" ], [ "torch.nn.ConstantPad2d", "torch.nn.ModuleList", "torch.nn.Conv2d", "torch.nn.MaxPool2d", "torch.nn.AvgPool2d", ...
MarvinLavechin/daem
[ "2994297af7547510d00c64aa193a12021cd557e5" ]
[ "tools/reconstruct.py" ]
[ "import numpy as np\nfrom tifffile import imread as tifread\nfrom matplotlib import pyplot as plt\nfrom skimage.measure import label\n\n\ndef label_cytoplasma_and_overlap(data):\n \"\"\"\n Transform a volume of labels to a stack of two channels. The first channel is the cytoplasma label and the second\n ch...
[ [ "matplotlib.pyplot.imshow", "numpy.resize", "matplotlib.pyplot.title", "matplotlib.pyplot.subplot", "numpy.diff", "matplotlib.pyplot.show", "numpy.zeros" ] ]
8-prime/trading-bot
[ "531b13df0fda0603ebc272cc32ed4b4fbe45aa70" ]
[ "scrape.py" ]
[ "import requests\nimport pandas as pd\nfrom bs4 import BeautifulSoup\n\n\n'''\nTakes an integer specifiying how many of the top changers are to be returned\nTakes Yahoo finance and parses for a list which is the list of the top gainers and then returns the first n entries\n'''\ndef get_daily_top_n (top_n):\n URL...
[ [ "pandas.read_html" ] ]
AaronJny/luwu
[ "05ee0bc605926661e42cada6cff5e281f4506291" ]
[ "luwu/run.py" ]
[ "# -*- coding: utf-8 -*-\n# @Author : AaronJny\n# @LastEditTime : 2021-01-29\n# @FilePath : /LuWu/luwu/run.py\n# @Desc :\nimport time\nimport traceback\nfrom multiprocessing import Process\nimport os\nimport sys\n\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), \"..\")))\n...
[ [ "tensorflow.config.experimental.list_physical_devices", "tensorflow.config.experimental.set_memory_growth" ] ]
mohsenhariri/ml-simple-models
[ "32b469eadd2880f3f55cfe104cea314b326cedd6" ]
[ "data_augmentation/ds_builder_3visualization.py" ]
[ "from data_augmentation.ds_builder_2builder import train_loader\nimport torchvision\nimport matplotlib.pyplot as plt\n\nsample_dataset_batch = next(iter(train_loader))\nsample_input_batch = sample_dataset_batch[0]\nsample_label_batch = sample_dataset_batch[1]\n\nimg_grid = torchvision.utils.make_grid(sample_input_b...
[ [ "matplotlib.pyplot.show" ] ]
j-adamczyk/Numerical-Algorithms
[ "47cfa8154bab448d1bf87b892d83e45c68dd2e2a" ]
[ "lab4_simulated_annealing/task_1/plotter.py" ]
[ "import matplotlib.pyplot as plt\n\n\ndef plot_data(first_path, best_path, distances_plot_data, temperatures_plot_data):\n first_path_xs = []\n first_path_ys = []\n for city in first_path:\n first_path_xs.append(city[0])\n first_path_ys.append(city[1])\n\n first_path_xs.append(first_path_x...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots" ] ]
lukepfister/scico
[ "c849c4fa6089b99d9a4dec520c9a04cca426d2d7", "c849c4fa6089b99d9a4dec520c9a04cca426d2d7", "c849c4fa6089b99d9a4dec520c9a04cca426d2d7" ]
[ "scico/test/linop/test_matrix.py", "examples/scripts/pgm_stepsize_poisson.py", "scico/_generic_operators.py" ]
[ "import operator as op\n\nimport numpy as np\n\nimport jax\nfrom jax.interpreters.xla import DeviceArray\n\nimport pytest\n\nimport scico.numpy as snp\nfrom scico import linop\nfrom scico.linop import MatrixOperator\nfrom scico.random import randn\nfrom scico.test.linop.test_linop import AbsMatOp\n\n\nclass TestMat...
[ [ "numpy.random.randn", "numpy.testing.assert_allclose" ], [ "matplotlib.pyplot.legend", "matplotlib.pyplot.stem", "matplotlib.pyplot.title", "scipy.linalg.dft", "matplotlib.gridspec.GridSpec", "matplotlib.pyplot.xlabel" ], [ "numpy.isscalar" ] ]
praneethgb/rasa
[ "5bf227f165d0b041a367d2c0bbf712ebb6a54792", "5bf227f165d0b041a367d2c0bbf712ebb6a54792" ]
[ "rasa/nlu/featurizers/sparse_featurizer/regex_featurizer.py", "rasa/nlu/classifiers/_diet_classifier.py" ]
[ "import logging\nimport re\nfrom typing import Any, Dict, List, Optional, Text, Type, Tuple\nfrom pathlib import Path\nimport numpy as np\nimport scipy.sparse\n\nimport rasa.shared.utils.io\nimport rasa.utils.io\nimport rasa.nlu.utils.pattern_utils as pattern_utils\nfrom rasa.nlu import utils\nfrom rasa.nlu.compone...
[ [ "numpy.zeros" ], [ "tensorflow.boolean_mask", "numpy.expand_dims", "tensorflow.concat", "tensorflow.shape", "tensorflow.reduce_any", "tensorflow.reduce_sum", "tensorflow.cast", "tensorflow.squeeze", "tensorflow.math.add_n", "tensorflow.keras.optimizers.Adam", "t...
pavpanchekha/bitrate-lab
[ "f9f804ad08bb544a90d5191d3db3f78398e1f51a" ]
[ "plots/bar.py" ]
[ "import numpy as np\nimport matplotlib.pyplot as plt\n\nN = 4\nsamplerate1 = (16.474, 13.585, 5.42, 16.138, 7.455)\nminstrel1 = (12.653, 10.208, 7.587, 10.867, 8.430)\nminproved1 = (17.037, 14.879, 11.107, 15.846, 12.162)\n\nsamplerate2 = (13.107, 9.688, 7.982, 13.894)\nminstrel2 = (11.575, 10.837, 8.320, 11.729)\n...
[ [ "numpy.arange", "matplotlib.pyplot.show", "matplotlib.pyplot.figure" ] ]
kzbnb/numerical_bugs
[ "bc22e72bcc06df6ce7889a25e0aeed027bde910b", "bc22e72bcc06df6ce7889a25e0aeed027bde910b", "bc22e72bcc06df6ce7889a25e0aeed027bde910b", "bc22e72bcc06df6ce7889a25e0aeed027bde910b", "bc22e72bcc06df6ce7889a25e0aeed027bde910b", "bc22e72bcc06df6ce7889a25e0aeed027bde910b", "bc22e72bcc06df6ce7889a25e0aeed027bde910...
[ "scripts/study_case/ID_4/benchmark/runtime/gat.py", "scripts/study_case/ID_36/ch10_04_03_Pic_10_05_exp_grist.py", "scripts/study_case/ID_13/torch_geometric/nn/prop/agnn_prop.py", "scripts/study_case/ID_21/mnist_softmax_grist.py", "scripts/study_case/ID_4/examples/qm9_nn_conv.py", "scripts/study_case/ID_12...
[ "import torch\nimport torch.nn.functional as F\nfrom scripts.study_case.ID_4.torch_geometric.nn import GATConv\n\n\nclass GAT(torch.nn.Module):\n def __init__(self, in_channels, out_channels):\n super(GAT, self).__init__()\n self.conv1 = GATConv(in_channels, 8, heads=8, dropout=0.6)\n self.c...
[ [ "torch.nn.functional.log_softmax", "torch.nn.functional.dropout" ], [ "tensorflow.matmul", "tensorflow.reduce_max", "tensorflow.InteractiveSession", "numpy.sqrt", "tensorflow.reduce_mean", "tensorflow.zeros", "numpy.min", "tensorflow.gradients", "tensorflow.placehol...
gicheonkang/sglkt-visdial
[ "b2927e8bc8e45c2d2a2a76fbf75a15f8ecb78b88", "b2927e8bc8e45c2d2a2a76fbf75a15f8ecb78b88", "b2927e8bc8e45c2d2a2a76fbf75a15f8ecb78b88" ]
[ "visdialch/decoders/gen.py", "visdialch/utils/initialization.py", "visdialch/encoders/sparse.py" ]
[ "\"\"\"\nThis code is from batra-mlp-lab's repository.\nhttps://github.com/batra-mlp-lab/visdial-challenge-starter-pytorch\n\"\"\"\n\nimport torch\nfrom torch import nn\n\n\nclass GenerativeDecoder(nn.Module):\n def __init__(self, config, vocabulary):\n super().__init__()\n self.config = config\n\n...
[ [ "torch.nn.Dropout", "torch.nn.LogSoftmax", "torch.nn.LSTM", "torch.sum", "torch.zeros_like" ], [ "torch.nn.init.xavier_normal_", "torch.nn.init.kaiming_normal_" ], [ "torch.nn.functional.normalize", "torch.nn.functional.softmax", "torch.nn.LogSoftmax", "torch.ze...
dballesteros7/master-thesis-2015
[ "8c0bf9a6eef172fc8167a30780ae0666f8ea2d88" ]
[ "src/utils/file.py" ]
[ "import numpy as np\n\n\ndef load_csv_test_data(filename):\n with open(filename, 'r') as input_file:\n return [[item for item in line.strip().split(',')]\n for line in input_file]\n\n\ndef load_csv_data(filename:str) -> np.ndarray:\n if not filename.endswith('.csv'):\n filename +=...
[ [ "numpy.array" ] ]
itaigat/MEMM_POS_Tagger
[ "9a095720f50dea2a9dba444ebdb0b325a51ea130" ]
[ "tests/test_clf.py" ]
[ "import numpy as np\nfrom numpy.testing import assert_array_almost_equal\n\n\ndef test_first_loss(clf, feature_matrix, X, y, sentences):\n \"\"\"\n test first loss evaluation on train_dev.wtag (unigram features)\n\n NOTICE: no regularization (lambda = 0)\n\n first test: clf produces feature matrix of si...
[ [ "numpy.ones", "numpy.array", "numpy.exp", "numpy.zeros", "numpy.testing.assert_array_almost_equal" ] ]
jskhu/probdet-1
[ "b8bda3bd7cdd573aa9f70a62453d147664211af6" ]
[ "src/core/visualization_tools/results_processing_tools.py" ]
[ "import glob\nimport itertools\nimport numpy as np\nimport os\nimport pickle\nimport torch\n\nfrom collections import defaultdict\n\n# Project imports\nfrom core.setup import setup_config, setup_arg_parser\nfrom probabilistic_inference.inference_utils import get_inference_output_dir\n\n\ndef get_clean_results_dict(...
[ [ "torch.norm", "torch.full", "torch.load", "torch.cat", "torch.zeros", "torch.distributions.Bernoulli", "torch.eye", "numpy.percentile", "torch.distributions.Categorical", "numpy.nanmean", "torch.stack", "numpy.array", "numpy.where", "torch.nn.MSELoss" ] ]
pengyang486868/PY-read-Document
[ "8d1d145cc6c384a64b3a28781dbcce1733b77513", "8d1d145cc6c384a64b3a28781dbcce1733b77513", "8d1d145cc6c384a64b3a28781dbcce1733b77513" ]
[ "analysis_pdf.py", "testrun.py", "docDAL/mysql.py" ]
[ "import pandas as pd\nfrom cloudservice import get_documenttask, download_doc, get_new_doc_task_db\nfrom cloudservice import get_doctag, create_doctag, delete_doctag\nfrom cloudservice import create_doctagrel, delete_doctagrel\nfrom cloudservice import change_step\nfrom cloudservice import get_docs_byid, fill_docin...
[ [ "pandas.DataFrame" ], [ "pandas.DataFrame" ], [ "pandas.read_sql_query" ] ]
mansueto-institute/National_GDPpc_Urbanization
[ "c83d33b2db0c3c9eae2b77013deb9bc1367e440b" ]
[ "Figure_1A.py" ]
[ "import csv\nimport scipy.optimize\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom matplotlib import cm\nimport matplotlib.colors as colors\nfrom colorsys import hsv_to_rgb\nimport datetime as dt\n\n\ndef lin_fit(x, y):\n '''Fits a linear fit of the form mx+b to the data'''\n fitfunc = lambda param...
[ [ "numpy.sqrt", "matplotlib.pyplot.ylim", "matplotlib.pyplot.savefig", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlim", "numpy.log10", "matplotlib.cm.ScalarMappable", "matplotlib.pyplot.xlabel", "numpy.array", "matplotlib.pyplot.ylabel" ] ]
fractalsproject/solaris
[ "ac1facb1daa661ddf6ab1ff13dba36ff88ef1c0f" ]
[ "solaris/nets/infer.py" ]
[ "import os\nimport skimage\nimport torch\nfrom warnings import warn\nfrom .model_io import get_model\nfrom .transform import process_aug_dict\nfrom .datagen import InferenceTiler\nfrom ..raster.image import stitch_images\nfrom ..utils.core import get_data_paths\n\n\nclass Inferer(object):\n \"\"\"Object for trai...
[ [ "torch.device", "torch.no_grad", "torch.from_numpy", "torch.cuda.is_available" ] ]
sarahmish/Cardea
[ "85c4246c12178e6d1b9cc12eb39c264f3c20f3e9", "85c4246c12178e6d1b9cc12eb39c264f3c20f3e9", "85c4246c12178e6d1b9cc12eb39c264f3c20f3e9" ]
[ "tests/cardea/fhir/test_fhirbase.py", "tests/cardea/problem_definition/test_readmission.py", "tests/cardea/modeling/test_modeler.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport pandas as pd\nimport pytest\n\nfrom cardea.fhir import Patient\n\n\n@pytest.fixture()\ndef patient_df():\n return pd.DataFrame({\"identifier\": [0, 1, 2, 3],\n \"gender\": ['female', 'female', 'male', 'female'],\n ...
[ [ "pandas.DataFrame" ], [ "pandas.to_datetime", "pandas.DataFrame" ], [ "sklearn.datasets.load_iris" ] ]
yoavfreund/DAPPER
[ "c2fa5cc446a2b22a1efc174afc7e091363c9375d", "c2fa5cc446a2b22a1efc174afc7e091363c9375d", "c2fa5cc446a2b22a1efc174afc7e091363c9375d" ]
[ "examples/param_estim.py", "dapper/mods/LA/evensen2009.py", "dapper/mods/LorenzUV/wilks05.py" ]
[ "# # Illustrate usage of DAPPER to do parameter estimation.\n#\n# In DA terminology, \"parameters\" (in contrast to \"state\") are\n# (unknown) variables that (generally) do not change in time.\n# Our approach (to parameter estimation) is the typical one in DA of augmenting\n# (concatenating) the state vector with ...
[ [ "numpy.full_like", "numpy.arange", "numpy.zeros", "numpy.ones" ], [ "numpy.sqrt" ], [ "numpy.arange" ] ]
yifu-yang/ShiningLight
[ "9bd756807c537a2fc0ef2bc348215d14c4499880" ]
[ "shininglight/face_alignment.py" ]
[ "#coding=utf-8\nimport face_comm\nimport face_detect\nimport cv2\nimport numpy as np\nimport os\nimport time\nimport random\n\nclass Alignment:\n def align_face(self,opic,faceKeyPoint):\n img = cv2.imread(opic)\n faceKeyPoint = faceKeyPoint[0]\n\n #根据两个鼻子和眼睛进行3点对齐\n eye1 = face...
[ [ "numpy.array" ] ]
automl/nas-bench-x11
[ "ebf64ce3c30cc2ad0909508b5e25652011179956" ]
[ "naslib/optimizers/discrete/ls_svr/optimizer.py" ]
[ "import collections\nimport logging\nimport torch\nimport copy\nimport random\nimport numpy as np\n\nfrom sklearn.svm import NuSVR\nfrom sklearn.linear_model import BayesianRidge\nfrom sklearn.ensemble import RandomForestRegressor\nimport time\nfrom sklearn.model_selection import cross_val_score, train_test_split\n...
[ [ "numpy.hstack", "numpy.log", "sklearn.model_selection.cross_val_score", "torch.nn.ModuleList", "sklearn.svm.NuSVR", "torch.nn.Module", "numpy.max", "numpy.std", "numpy.argmax", "numpy.diff", "numpy.mean", "sklearn.linear_model.BayesianRidge", "numpy.random.unifo...
KelvinKan/gluon-ts
[ "72e99c7f4c2538bf1fefaa78ee548139cfa5907a", "72e99c7f4c2538bf1fefaa78ee548139cfa5907a" ]
[ "src/gluonts/nursery/SCott/pts/dataset/utils.py", "src/gluonts/nursery/SCott/pts/dataset/process.py" ]
[ "# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\").\n# You may not use this file except in compliance with the License.\n# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# or ...
[ [ "numpy.isnan", "pandas.Series" ], [ "numpy.asarray", "pandas.Timestamp", "numpy.expand_dims" ] ]
zaman13/Brownian-dynamics-in-a-time-varying-force-field
[ "1dce268fcc4f27e066be0ec0b511178cbc1437c5", "1dce268fcc4f27e066be0ec0b511178cbc1437c5" ]
[ "Codes/Version 1.9.1/force_DEP.py", "Codes/Version 1.6/forceDEP.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Feb 23 17:44:46 2021\n\n@author: Mohammad Asif Zaman\n\n- April 10, 2021\n - Added active electrode text\n- April 11, 2021\n - Changed axis limit units to microns\n- May 28, 2021\n - Functionalized fluid velocity \n\"...
[ [ "numpy.random.normal", "numpy.zeros", "numpy.interp", "numpy.linspace" ], [ "numpy.random.normal", "numpy.zeros", "numpy.linspace" ] ]
CBIIT/NCI-DOE-Collab-Pilot2-Autoencoder_MD_Simulation_Data
[ "2b1213f944cf5f2c60799099a469989a1f0a6d3a", "2b1213f944cf5f2c60799099a469989a1f0a6d3a" ]
[ "common/viz_utils.py", "common/darts/modules/network.py" ]
[ "from pathlib import Path\nimport matplotlib as mpl\nmpl.use('Agg')\nimport matplotlib.pyplot as plt\n\nimport numpy as np\n\nfrom scipy import interpolate\n\n\ndef plot_history(out, history, metric='loss', val=True, title=None, width=8, height=6):\n title = title or 'model {}'.format(metric)\n val_metric = '...
[ [ "matplotlib.pyplot.legend", "numpy.linspace", "numpy.asarray", "matplotlib.pyplot.rc", "matplotlib.pyplot.plot", "numpy.max", "matplotlib.pyplot.gca", "matplotlib.pyplot.close", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "matplotlib.pyplot.cm.get_cmap", ...
alexcere/syrup_dash_visualizer
[ "0559d3ee0fb3cda5b344c806b9a9cfaa222d14dc" ]
[ "plots.py" ]
[ "import itertools\n\nimport numpy as np\nimport plotly.graph_objects as go\nimport pandas as pd\nimport pathlib\nimport plotly.express as px\nfrom plotly.subplots import make_subplots\n\nPATH = pathlib.Path(__file__).parent\nDATA_PATH = (PATH.joinpath(\"data\")).resolve()\nencoding_names = {'initial_configuration':...
[ [ "numpy.append", "pandas.read_csv", "numpy.empty" ] ]
shikhar2707/datasets
[ "c034a193967d6d72152196708a5638e546e320f4", "c034a193967d6d72152196708a5638e546e320f4", "c034a193967d6d72152196708a5638e546e320f4" ]
[ "tensorflow_datasets/image_classification/imagenet2012_subset.py", "tensorflow_datasets/structured/rock_you.py", "tensorflow_datasets/image_classification/colorectal_histology.py" ]
[ "# coding=utf-8\n# Copyright 2020 The TensorFlow Datasets Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ...
[ [ "tensorflow.compat.v2.io.gfile.GFile", "tensorflow.compat.v2.io.gfile.exists" ], [ "tensorflow.compat.v2.io.gfile.GFile" ], [ "tensorflow.compat.v2.io.gfile.GFile", "numpy.array", "tensorflow.compat.v2.io.gfile.listdir" ] ]