repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
ethanabrooks/pytorch-dnc
[ "bf7a039e3062742654364fb80b1ab5d44e5746f8", "bf7a039e3062742654364fb80b1ab5d44e5746f8" ]
[ "core/circuit.py", "core/agent.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\n\n\nclass Circuit(\n nn.Module\n): # NOTE: basically this whole module is treated as a custo...
[ [ "torch.clamp", "torch.zeros", "torch.autograd.Variable" ], [ "torch.load" ] ]
luomou97/BERT-pytorch
[ "61bb990d75a23dc39b5a1ec27787c4a596ba5352" ]
[ "bert_pytorch/model/language_model.py" ]
[ "import torch.nn as nn\n\nfrom .bert import BERT\n\n\nclass BERTLM(nn.Module):\n \"\"\"\n BERT Language Model\n Next Sentence Prediction Model + Masked Language Model\n \"\"\"\n\n def __init__(self, bert: BERT, vocab_size):\n \"\"\"\n :param bert: BERT model which should be trained\n ...
[ [ "torch.nn.Linear", "torch.nn.LogSoftmax" ] ]
yakutovicha/aiida-core
[ "35b5c341e24df22b9b920c094348cef4f1a72846" ]
[ "aiida/backends/sqlalchemy/migrations/versions/ce56d84bcc35_delete_trajectory_symbols_array.py" ]
[ "# -*- coding: utf-8 -*-\n###########################################################################\n# Copyright (c), The AiiDA team. All rights reserved. #\n# This file is part of the AiiDA code. #\n# ...
[ [ "numpy.array" ] ]
yuyq96/asv-subtools
[ "a678b8f3327de0e99c445a79a9e91e5e0e006b11" ]
[ "pytorch/libs/training/optim.py" ]
[ "# -*- coding:utf-8 -*-\n\n# Copyright xmuspeech (Author: Snowdar 2019-08-01)\n\nimport logging\nimport types\nimport math\nimport itertools as it\nfrom torch._six import inf\nfrom functools import partial, wraps\nimport warnings\nfrom bisect import bisect_right\n\nimport torch\nimport torch.optim as optim\nfrom to...
[ [ "torch.max", "torch.zeros", "torch.min", "torch.clone", "torch.zeros_like", "torch.full_like", "torch.pow" ] ]
davidhalladay/DSP-Auto-drawer-Generating-and-Modifying-Images-Continually-using-Knowledge-graph
[ "1610bbd567a5caba0478d8f7026f98766e6e39f8" ]
[ "scripts/run_model.py" ]
[ "#!/usr/bin/python\n#\n# 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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app...
[ [ "torch.device", "torch.no_grad", "torch.cuda.is_available", "torch.load" ] ]
ditastaszewski/C17705971-DT228-FYP
[ "5e4be0aad9b6d86180c01a3291952e3de0bec156" ]
[ "site/mysite/facerecognition/tools.py" ]
[ "import cv2 \nimport matplotlib.pyplot as plot\nfrom matplotlib import pyplot as plt\nfrom matplotlib import image as image\nimport easygui\nimport numpy as np\nimport glob\nimport tensorflow as tf\nimport keras,os\nfrom keras.models import Sequential\nfrom keras.layers import Dense, Conv2D, MaxPool2D , Flatten\nfr...
[ [ "numpy.amax", "tensorflow.python.keras.layers.Dense", "numpy.asarray", "tensorflow.python.keras.models.Sequential", "numpy.argmax", "tensorflow.python.keras.applications.resnet.ResNet50" ] ]
CFM-MSG/SDN
[ "f309602dc2bb73117355003f3744f8e5450dbccc" ]
[ "extension/backbones/simple_backbone.py" ]
[ "import torch\n\nclass simple_backbone(torch.nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv = torch.nn.Sequential(torch.nn.Conv2d(1, 64, 3, 1, 1),\n torch.nn.ReLU(),\n torch.nn.Conv2d(64, 128...
[ [ "torch.nn.MaxPool2d", "torch.nn.ReLU", "torch.nn.Conv2d" ] ]
pfornia/tsfresh
[ "9550f84b8a920cfe53d9b6ca47eedeca619725cf" ]
[ "tests/units/transformers/test_relevant_feature_augmenter.py" ]
[ "# -*- coding: utf-8 -*-\n# This file as well as the whole tsfresh package are licenced under the MIT licence (see the LICENCE.txt)\n# Maximilian Christ (maximilianchrist.com), Blue Yonder Gmbh, 2016\n\nimport pandas as pd\nimport numpy as np\nfrom sklearn import model_selection\nfrom sklearn.ensemble import Random...
[ [ "sklearn.model_selection.cross_val_score", "pandas.Series", "sklearn.ensemble.RandomForestClassifier", "numpy.unique", "pandas.DataFrame", "numpy.repeat", "numpy.array" ] ]
szha/dgl
[ "60d2e7d3c928d43bbb18e7ab17c066451c49f649" ]
[ "apps/life_sci/python/dgllife/utils/splitters.py" ]
[ "\"\"\"Various methods for splitting chemical datasets.\n\nWe mostly adapt them from deepchem\n(https://github.com/deepchem/deepchem/blob/master/deepchem/splits/splitters.py).\n\"\"\"\n# pylint: disable= no-member, arguments-differ, invalid-name\n# pylint: disable=E0611\nfrom collections import defaultdict\nfrom fu...
[ [ "numpy.split", "numpy.allclose", "numpy.random.seed", "numpy.round", "numpy.concatenate", "numpy.argsort", "numpy.array", "numpy.sum", "numpy.random.RandomState" ] ]
peferso/pegaso-training
[ "e1c99be63b58053d0de7f6a6e392bf08c42c7337" ]
[ "src/train-random-forest.py" ]
[ "import os\nimport pymysql\nimport datetime\nimport pandas as pd\nimport numpy as np\nimport time\nimport logging\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.ensemble import RandomForestRegressor\nimport joblib\nfrom multiprocessing import Pool\nimport pickle\nfrom random import randint\n\n\...
[ [ "sklearn.ensemble.RandomForestRegressor", "pandas.read_sql_query", "numpy.arange", "pandas.DataFrame", "numpy.array", "pandas.get_dummies" ] ]
AlphaPlusTT/nerf-w
[ "c56589df46b80077eb9e0bfb29b023490b0a7fa1" ]
[ "temp.py" ]
[ "import torch\nfrom torch.utils.data import Dataset\nimport glob\nimport numpy as np\nimport os\nimport pandas as pd\nimport pickle\nfrom PIL import Image\nfrom torchvision import transforms as T\n\nfrom datasets.ray_utils import *\nfrom datasets.colmap_utils import \\\n read_cameras_binary, read_images_binary, ...
[ [ "torch.LongTensor", "pandas.read_csv", "torch.cat", "numpy.linalg.inv", "torch.from_numpy", "numpy.stack", "numpy.percentile", "numpy.concatenate", "torch.FloatTensor", "numpy.array", "numpy.zeros", "torch.ones_like" ] ]
artiste-qb-net/Quantum_Edward
[ "89d3a7d40177065eaa34fabd4b4c255b8ef51881" ]
[ "Fitter.py" ]
[ "import numpy as np\nimport numpy.random as npr\nimport scipy.stats as ss\nimport utilities as ut\nfrom TimeStep import *\nfrom Plotter import *\n\n\nclass Fitter:\n \"\"\"\n Read docstrings for Model class first.\n\n The goal of this class is to implement the BBVI(see ref below) for a \n Model object '...
[ [ "numpy.multiply", "numpy.random.seed", "numpy.clip", "scipy.stats.beta.rvs", "scipy.stats.beta.std", "scipy.stats.beta.mean", "numpy.all", "numpy.copy", "numpy.zeros", "numpy.sum" ] ]
jiunting/PhaseLink
[ "994e85ff7162869dd2a54c26eeb307e72ed1972e" ]
[ "phaselink_plot.py" ]
[ "#!/home/zross/bin/python \n\nimport numpy as np\nimport sys\nimport glob\nimport obspy\nimport pylab as plt\nimport json\nimport random\n\nclass Arrival():\n def __init__(self, net=None, sta=None, time=None, phase=None,\n dist=None, resid=None):\n self.net = net\n self.sta = sta\n se...
[ [ "numpy.arange", "pandas.DataFrame", "numpy.max", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.where" ] ]
cds-mipt/yolact
[ "d226620495f16314ff8f5dda57bca18de54e004b" ]
[ "train.py" ]
[ "from data import *\nfrom utils.augmentations import SSDAugmentation, BaseTransform\nfrom utils.functions import MovingAverage, SavePath\nfrom utils.logger import Log\nfrom utils import timer\nfrom layers.modules import MultiBoxLoss\nfrom yolact import Yolact\nimport os\nimport sys\nimport time\nimport math, random...
[ [ "torch.set_default_tensor_type", "torch.zeros", "torch.utils.data.DataLoader", "torch.isfinite", "torch.no_grad", "torch.cuda.is_available", "torch.stack", "torch.cuda.device_count" ] ]
ecdedios/ddfloww-site
[ "bd582bc34a6248338abac8c2fe9c22bfbf69d79f" ]
[ "predict2.py" ]
[ "import pandas as pd\n\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.linear_model import LogisticRegressionCV\nfrom collections import OrderedDict\nfrom sklearn.metrics import accuracy_score\n\ndf = pd.read_csv('phase2_df.csv')\n\nx_columns = ['slap',\n 'threat_object',\n ...
[ [ "sklearn.linear_model.LogisticRegressionCV", "pandas.read_csv", "sklearn.model_selection.train_test_split", "pandas.Series" ] ]
GrowthJeff/lifelines
[ "4415be1bfeb7d15203109842926c1f6e50facaa6" ]
[ "lifelines/fitters/mixins.py" ]
[ "# -*- coding: utf-8 -*-\nfrom typing import List, Optional, Dict, Any, Iterable\nfrom textwrap import dedent, fill\nfrom autograd import numpy as anp\nimport numpy as np\nfrom pandas import DataFrame, Series\nfrom lifelines.statistics import proportional_hazard_test, TimeTransformers\nfrom lifelines.utils import f...
[ [ "matplotlib.pyplot.tight_layout", "numpy.minimum", "numpy.random.choice", "pandas.DataFrame", "numpy.round", "matplotlib.pyplot.subplots_adjust", "numpy.exp", "matplotlib.pyplot.figure" ] ]
lofar-astron/lofarimaging
[ "9672b52bb9be8f3405e6e3f85701175bdc4bf211" ]
[ "lofarimaging/lofarimaging.py" ]
[ "\"\"\"Functions for working with LOFAR single station data\"\"\"\n\nfrom typing import Dict, List\nimport numpy as np\nfrom numpy.linalg import norm, lstsq\nimport numexpr as ne\nimport numba\nfrom astropy.coordinates import SkyCoord, SkyOffsetFrame, CartesianRepresentation\n\n\n__all__ = [\"nearfield_imager\", \"...
[ [ "numpy.diag", "numpy.ones_like", "numpy.conj", "numpy.linspace", "numpy.abs", "numpy.linalg.norm", "numpy.ones", "numpy.linalg.lstsq", "numpy.real", "numpy.exp", "numpy.add", "numpy.array", "numpy.meshgrid", "numpy.zeros" ] ]
AI21Labs/sense-bert
[ "32773c4da8ba23674978170598498fe0239ddb1a" ]
[ "sensebert.py" ]
[ "import os\nfrom collections import namedtuple\nimport tensorflow as tf\n\nfrom tokenization import FullTokenizer\n\n_SenseBertGraph = namedtuple(\n 'SenseBertGraph',\n ('input_ids', 'input_mask', 'contextualized_embeddings', 'mlm_logits', 'supersense_losits')\n)\n\n_MODEL_PATHS = {\n 'sensebert-base-uncas...
[ [ "tensorflow.get_default_session" ] ]
NREL/pySMARTS
[ "83e702ed508eedcd8f6a6e11f2e640557f649dcd" ]
[ "docs/tutorials/1 - Beginer - Plot ALBEDOs from Smarts.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# # 1 - Beginner - Plot Spectra and Albedos from SMARTS\n# \n# ##### Generate & Plot Spectra and Albedos from SMARTS\n# ######      * 1. DNI and DHI for a particular time and location\n# ######      * 2. Ground Albedo for various mat...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.axhline", "matplotlib.pyplot.title", "pandas.RangeIndex", "matplotlib.pyplot.ylim", "matplotlib.pyplot.rc", "pandas.DataFrame", "matplotlib.pyplot.xlim", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyp...
PerttuHamalainen/DRMM
[ "1d7d52df95adee344516322700209f3a9f8147fb" ]
[ "PrecisionRecallTest.py" ]
[ "\nimport numpy as np\nimport random\nimport os\nimport matplotlib.pyplot as pp\n#os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"-1\" #disable Tensorflow GPU usage, these simple graphs run faster on CPU\nimport tensorflow as tf\nimport DRMM as DRMM\nfrom skimage.util import view_as_blocks\nfrom precision_recall import knn_...
[ [ "tensorflow.device", "numpy.concatenate", "numpy.random.randint", "numpy.ones_like", "numpy.arange", "numpy.sin", "tensorflow.ConfigProto", "tensorflow.reset_default_graph", "tensorflow.Session", "numpy.load", "numpy.zeros", "numpy.min", "tensorflow.global_varia...
Shiao-Computing-Volumes/project-based-learning-in-python
[ "52e0b02cf085de97c3b5d9aa44bf8786d8a9ad19" ]
[ "05_normal_distribution_simulator/studio/charting/histograms.py" ]
[ "import numpy as np\nimport scipy.stats\nimport matplotlib.pyplot as plt\n\nfrom studio.settings.frames import STYLE, THEME_COLOR, AIDED_COLOR\nfrom studio.settings.frames import FIGSIZE, DPI\nfrom studio.frames.camera import Camera\nfrom studio.charting.components.legends import captioning\n\nplt.style.use(STYLE)\...
[ [ "numpy.arange", "matplotlib.pyplot.style.use", "matplotlib.pyplot.figure" ] ]
brillouinzone/atmosense-abcgan
[ "30b77fd082a55869e58839a4cfbab61a7eab2b13" ]
[ "src/abcgan/transforms.py" ]
[ "\"\"\"\nTransforms to and from z-scaled variables.\n\nUses numpy only (no pytorch)\n\"\"\"\nimport numpy as np # noqa\nimport abcgan.constants as const\n\n\ndef encode(data, name):\n \"\"\"\n Encode variables, or just add extra dimension\n\n Parameters\n ----------\n data : np.ndarray\n arra...
[ [ "numpy.log", "numpy.pad", "numpy.cos", "numpy.stack", "numpy.sin", "numpy.arctan2", "numpy.exp", "numpy.zeros" ] ]
pavelzw/pyWATTS
[ "423f5eba7a54b4ced0876454e2f24a1840210076" ]
[ "tests/unit/modules/test_root_mean_squared_error.py" ]
[ "import unittest\n\nimport pytest\nimport xarray as xr\nimport pandas as pd\nfrom pywatts.core.exceptions.input_not_available import InputNotAvailable\n\nfrom pywatts.modules.root_mean_squared_error import RmseCalculator\nimport numpy as np\n\n\nclass TestRMSECalculator(unittest.TestCase):\n\n def setUp(self) ->...
[ [ "numpy.array", "pandas.to_datetime" ] ]
shibaji7/Tdiff_Validation
[ "0e143a53763ea4eb965760c83239b5232326d91e" ]
[ "py/get_fit_data.py" ]
[ "#!/usr/bin/env python\n\n\"\"\"get_fit_data.py: utility module to fetch fitacf<v> level data.\"\"\"\n\n__author__ = \"Chakraborty, S.\"\n__copyright__ = \"Copyright 2020, SuperDARN@VT\"\n__credits__ = []\n__license__ = \"MIT\"\n__version__ = \"1.0.\"\n__maintainer__ = \"Chakraborty, S.\"\n__email__ = \"shibaji7@vt...
[ [ "numpy.abs", "numpy.unique", "numpy.mean", "pandas.DataFrame.from_records", "numpy.array" ] ]
vishwasourab/quadcopter_project
[ "67b65e41a151fc2c24dd3905f33b73209157b52e" ]
[ "task.py" ]
[ "import numpy as np\nfrom physics_sim import PhysicsSim\n\nclass Task():\n \"\"\"Task (environment) that defines the goal and provides feedback to the agent.\"\"\"\n def __init__(self, init_pose=None, init_velocities=None, \n init_angle_velocities=None, runtime=5., target_pos=None):\n \"\"\"Init...
[ [ "numpy.concatenate", "numpy.array" ] ]
csquigley/dcgan
[ "985280b5c6875062f728afe37cfb76d93a58dfb1" ]
[ "dcgan.py" ]
[ "from __future__ import print_function\n#%matplotlib inline\nimport argparse\nimport os\nimport random\nimport torch\nimport torch.nn as nn\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim as optim\nimport torch.utils.data\nimport torchvision.datasets as dset\nimport torchvision.t...
[ [ "torch.utils.data.DataLoader", "torch.no_grad", "torch.cuda.is_available", "torch.randn", "torch.nn.Sigmoid", "matplotlib.pyplot.axis", "matplotlib.pyplot.figure", "matplotlib.pyplot.title", "torch.full", "torch.nn.init.constant_", "torch.nn.ConvTranspose2d", "torch...
Saran-nns/cunumeric
[ "3472109aa3fd6a9d42409586efd39dcb5924e0b5" ]
[ "tests/test_tools/generators.py" ]
[ "# Copyright 2021 NVIDIA Corporation\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 law or ...
[ [ "numpy.prod" ] ]
keithnull/EE101
[ "298f2c1dc3c1d6437815525632c0f56b13602f3d" ]
[ "Lab4/Code/DataPreprocess/preprocess.py" ]
[ "# coding:utf8\n\nfrom load_data import load_data, timer\nfrom feature import FeatureExtracter\nfrom sklearn.svm import SVC\nfrom sklearn.linear_model import LogisticRegression\nimport pymysql\nfrom itertools import combinations\n\n\n@timer\ndef train_SVM(X_train, y_train):\n model = SVC(kernel=\"linear\", C=1, ...
[ [ "sklearn.svm.SVC" ] ]
k-ivey/TextAttack
[ "47d15acea90bf92e6a7f19200a59da29e74731e6" ]
[ "textattack/constraints/grammaticality/language_models/learning_to_write/rnn_model.py" ]
[ "from torch import nn as nn\nfrom torch.autograd import Variable\n\nfrom .adaptive_softmax import AdaptiveSoftmax\n\n\nclass RNNModel(nn.Module):\n \"\"\"Container module with an encoder, a recurrent module, and a decoder.\n\n Based on official pytorch examples\n \"\"\"\n\n def __init__(\n self,\...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "torch.nn.RNN", "torch.nn.Embedding" ] ]
sinotec2/Focus-on-Air-Quality
[ "eac84651eaf6300a16f25a4d76b97a7f53454035" ]
[ "utilities/CGI-pythons/terrainXYINC.py" ]
[ "\nimport twd97\nLatitude_Pole, Longitude_Pole = 23.61000, 120.990\nXcent, Ycent = twd97.fromwgs84(Latitude_Pole, Longitude_Pole)\n\ndef twdIJ1(xv,yv):\n return (int((xv-Xcent)/1000)+int(83*3/2))*1000+int((yv-Ycent)/1000)+int(137*3/2)\n\ndef terrainXYINC(pth,STR):\n from pandas import read_csv, DataFrame\n impor...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
mnishida/pymwm
[ "820d0a9056982fd37972b0e10f5dad9d1697ed2f" ]
[ "src/pymwm/cylinder/__init__.py" ]
[ "from __future__ import annotations\n\nimport cmath\n\nimport numpy as np\nimport psutil\nimport ray\nimport scipy.special as ssp\n\nfrom pymwm.utils import cylinder_utils\nfrom pymwm.waveguide import Database, Sampling, Waveguide\n\nfrom .samples import Samples, SamplesForRay, SamplesLowLoss, SamplesLowLossForRay\...
[ [ "scipy.special.jn_zeros", "numpy.sqrt", "scipy.special.jv", "numpy.isnan", "numpy.ascontiguousarray", "numpy.cos", "numpy.empty", "numpy.sin", "numpy.arctan2", "numpy.zeros_like", "scipy.special.jvp", "scipy.special.kvp", "scipy.special.kv", "numpy.array", ...
ikathuria/SignatureVerification
[ "4d0f26eb2652ecdf8cd5a679c6d3468046ab0d88" ]
[ "quadruplet_utils.py" ]
[ "\"\"\"Quadruplet loss utility functions.\n\nembedding_net\nbuild_metric_network\nQuadrupletLossLayer\nbuild_quadruplet_model\n\ncompute_l2_dist\ncompute_probs\ncompute_metrics\nfind_nearest\ndraw_roc\ndraw_eval_quadruplets\n\"\"\"\nimport os\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\nimport math\nimport numpy as n...
[ [ "tensorflow.keras.layers.Concatenate", "sklearn.metrics.roc_auc_score", "numpy.square", "tensorflow.keras.layers.Lambda", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Dense", "tensorflow.keras.regularizers.l2", "sklearn.metrics.roc_curve", "tensorflow.keras.layers....
FumiyukiKato/PrivBTS
[ "d2fae18588b24281d0968b8af09dc9295e73cdda" ]
[ "hdmm/hdmm/templates.py" ]
[ "import numpy as np\nfrom scipy import sparse, optimize\nfrom scipy.sparse.linalg import spsolve_triangular, aslinearoperator\nfrom hdmm import workload, approximation, implicit\nimport time\nfrom functools import reduce\n\n\nclass TemplateStrategy:\n \"\"\"\n A template strategy is a space of strategies para...
[ [ "numpy.diag", "numpy.dot", "numpy.zeros_like", "scipy.sparse.vstack", "numpy.random.laplace", "numpy.trace", "numpy.arange", "numpy.eye", "scipy.sparse.diags", "scipy.sparse.linalg.aslinearoperator", "numpy.argmax", "scipy.sparse.linalg.spsolve_triangular", "num...
arupkpatel/HandGestureDetection
[ "2be7224a53a100c37b71e7a6333ed69f5729032a" ]
[ "cnn.py" ]
[ "import tensorflow as tf\nfrom keras.backend.tensorflow_backend import set_session\nconfig = tf.ConfigProto()\nconfig.gpu_options.allow_growth = True\nconfig.gpu_options.per_process_gpu_memory_fraction = 0.3\nset_session(tf.Session(config=config))\n\nfrom keras.models import Sequential\nfrom keras.layers import Con...
[ [ "tensorflow.ConfigProto", "tensorflow.Session" ] ]
dfm/rvhmc
[ "03c9aa6a28722989cf3a6da8963a54d1e1faa0cf" ]
[ "paper/scripts/emcee-comp/compare.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom __future__ import division, print_function\n\nimport os\nimport sys\n\nif len(sys.argv) > 1:\n n_planets = int(sys.argv[1])\nelse:\n n_planets = 1\ndirname = \"{0:02d}\".format(n_planets)\nif len(sys.argv) > 2:\n version = int(sys.argv[2])\n dirnam...
[ [ "numpy.log", "numpy.random.seed", "numpy.min", "numpy.clip", "numpy.all", "numpy.max", "numpy.copy", "numpy.cov", "numpy.shape", "matplotlib.pyplot.errorbar", "matplotlib.pyplot.close", "pandas.DataFrame.from_records", "numpy.random.uniform", "matplotlib.pyp...
BorthakurAyon/snnpytorch
[ "212eea2d7cd80d9ebc709cc334ca28d165fc2861" ]
[ "snnpytorch/test/test_spike_raster.py" ]
[ "\"\"\"\n\nTest and Plot Spike Raster\n===========================\n\"\"\"\n\nfrom snnpytorch.network.spiking_neural_network import SNN\nfrom snnpytorch.dataset.spike_raster import SpikeRaster\nfrom time import time as t\nfrom torch.utils import data\nfrom tqdm import tqdm\nfrom pathlib import Path\nimport matplotl...
[ [ "torch.utils.data.DataLoader", "matplotlib.pyplot.subplots", "numpy.cumsum", "torch.tensor", "matplotlib.pyplot.savefig", "numpy.random.poisson", "torch.no_grad", "torch.cuda.is_available", "torch.where", "torch.device", "matplotlib.pyplot.show", "numpy.zeros", ...
nilp0inter/LinakDeskApp
[ "0cf287ee96002f5c270c087ba73b72c548baa8c5" ]
[ "src/linakdeskapp/gui/mpl/position_chart.py" ]
[ "# MIT License\n#\n# Copyright (c) 2017 Arkadiusz Netczuk <dev.arnet@gmail.com>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation t...
[ [ "pandas.Timestamp", "pandas.Timestamp.now" ] ]
panda-tech/poseidon-airflow
[ "bce5bc02b55f15330635a436056d99acb93488ef" ]
[ "poseidon/dags/water_tests/indicator_bacteria_jobs.py" ]
[ "import cx_Oracle\nimport pandas as pd\nimport os\nimport string\nimport logging\nimport re\n\nfrom datetime import datetime, timedelta\n\nfrom trident.util import general\n\nconf = general.config\n\n\n\ndef get_indicator_bacteria_tests(date_start='01-JAN-2014', date_end='15-JUN-2017', **kwargs):\n \n # For t...
[ [ "pandas.read_sql_query", "pandas.read_csv", "pandas.to_numeric", "pandas.to_datetime" ] ]
Aleksa14/DeepRecommender
[ "39716087ab18cfa7d42a042451b0b9bad7701359" ]
[ "infer.py" ]
[ "# Copyright (c) 2017 NVIDIA Corporation\nimport torch\nimport argparse\nimport copy\nfrom reco_encoder.data import input_layer\nfrom reco_encoder.model import model\nfrom torch.autograd import Variable\nfrom pathlib import Path\n\nparser = argparse.ArgumentParser(description='RecoEncoder')\n\nparser.add_argument('...
[ [ "torch.load" ] ]
DenXX/fvcore
[ "4b91cf092f4f5d379b2c93398780a3b5755e7179" ]
[ "tests/test_param_count.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\n\nimport unittest\nfrom torch import nn\n\nfrom fvcore.nn.parameter_count import parameter_count, parameter_count_table\n\n\nclass NetWithReuse(nn.Module):\n def __init__(self, reuse: bool = False) -> None:\n super().__init__()\n ...
[ [ "torch.nn.Conv2d" ] ]
fredericgo/rl_morph_pytorch
[ "743cd82d82c16c8d52e5265b6cc5cdf490cb8945" ]
[ "style_transfer/train.py" ]
[ "import argparse\nimport datetime\nimport gym\nimport numpy as np\nimport itertools\n\nimport sys\nsys.path.insert(0, '..')\nfrom torch.utils.tensorboard import SummaryWriter\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn import functional as F\n\nfrom torch.optim import Adam\nfrom torch.utils.data import Da...
[ [ "torch.norm", "numpy.random.seed", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.utils.data.ConcatDataset", "torch.utils.tensorboard.SummaryWriter", "torch.device" ] ]
BboyTian/gupview
[ "6ef6693f8b58d224a89e2963bcd4d44312e957de" ]
[ "gupview/Secondary_Scripts/Flouroscence.py" ]
[ "#########\n#Imports#\n#########\n\n# Python Basics\nfrom decimal import Decimal\n\n# Graph Plotting\nimport matplotlib\nmatplotlib.use(\"TkAgg\")\nfrom matplotlib.figure import Figure\n\n# Image process\nimport numpy as np\nimport PIL\nfrom .Masks import rectMask_func\n\n# Parameters\nimport Parameters as para\n\n...
[ [ "matplotlib.figure.Figure", "matplotlib.use", "numpy.append", "numpy.array", "numpy.sum" ] ]
endrol/Anomaly_Clustering
[ "670546751543f1d919c4a788e96bcf4405e3423c" ]
[ "datasets/mvtec.py" ]
[ "import os\nimport sys\nfrom pathlib import Path\nfrom typing import List, Tuple, Union\n\nimport numpy as np\nimport torch\nfrom PIL import Image\nfrom torch import Tensor\nfrom torch.utils.data import Dataset\nfrom torchvision import transforms as T\nimport config as c\n\n\n__all__ = (\"MVTecDataset\")\n\n# URL =...
[ [ "numpy.concatenate", "numpy.array", "torch.zeros" ] ]
bajcmartinez/Finding-Car-Lanes-Without-Deep-Learning
[ "2d660ce1f6f3ed5c57ddd919a13b65853dee0758" ]
[ "lib/lane.py" ]
[ "import numpy as np\nimport cv2\n\nclass Lane():\n \"\"\"\n Define a class to receive the characteristics of each line detection\n \"\"\"\n\n def __init__(self, xm_per_pix, ym_per_pix):\n # was the line detected in the last iteration?\n self.detected = False\n # x values of the last...
[ [ "numpy.polyfit", "numpy.absolute", "numpy.linspace", "numpy.max", "numpy.array" ] ]
fredmontet/tars
[ "922786e8c6456fc0cc1a9db07714f11dd78219d9" ]
[ "src/tars/utils/runner.py" ]
[ "import logging\nfrom typing import Callable, NoReturn\nfrom time import sleep\n\nfrom pandas import Timestamp, Timedelta\n\n\nclass Runner:\n \"\"\"\n A Runner represent an object able to execute a function through time.\n\n The function can be executed with a chosen frequency e.g. every 10 seconds\n a...
[ [ "pandas.Timestamp.now", "pandas.Timedelta" ] ]
Arsh0023/stockstats
[ "3b13bc74b2106d1a5ebbb6f456344abc3a06ed0e" ]
[ "stockstats.py" ]
[ "# coding=utf-8\r\n# Copyright (c) 2016, Cedric Zhuang\r\n# All rights reserved.\r\n# Redistribution and use in source and binary forms, with or without\r\n# modification, are permitted provided that the following conditions are met:\r\n#\r\n# * Redistributions of source code must retain the above copyright\r\n...
[ [ "numpy.log", "pandas.notnull", "numpy.abs", "numpy.multiply", "numpy.min", "numpy.max", "numpy.zeros_like", "numpy.diff", "numpy.where" ] ]
MattMorgis/tfx
[ "f11cc054f079c998a52002e14b6ba74063fed986" ]
[ "tfx/examples/chicago_taxi/preprocess.py" ]
[ "# 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by app...
[ [ "tensorflow.is_nan", "tensorflow.sparse_to_dense", "tensorflow.constant", "tensorflow.zeros_like", "tensorflow.logging.set_verbosity" ] ]
samuelbroscheit/open_knowledge_graph_embeddings
[ "1ce37a4261a37e357a0f4dac3ee130ff11cbea4e" ]
[ "utils/misc.py" ]
[ "import random\n\nimport numpy\nimport numpy as np\nimport torch\nfrom torch.autograd import Variable\n\n\ndef onehot(indexes, N=None, ignore_index=None):\n \"\"\"\n Creates a one-representation of indexes with N possible entries\n if N is not specified, it will suit the maximum index appearing.\n index...
[ [ "numpy.random.seed", "torch.manual_seed", "torch.cuda.manual_seed_all", "torch.cuda.is_available", "numpy.array", "torch.autograd.Variable" ] ]
ys10/GCIClassify
[ "a66b1a257ac26b10732a68228721023b99f67a8e" ]
[ "data_process/ops.py" ]
[ "# coding=utf-8\nimport os\nimport numpy as np\nfrom scipy.signal import argrelextrema\nfrom scipy.io import wavfile\n\n\ndef find_local_minimum(data, threshold=None):\n \"\"\"\n Find local minimum in data.\n :param data: input data.\n :param threshold: (optional) local minimum whose value is not less t...
[ [ "numpy.concatenate", "scipy.io.wavfile.read", "numpy.zeros", "scipy.signal.argrelextrema" ] ]
CarlOwOs/VH_and_PE_codes
[ "700726332489ed87270ec52d9efe46fcb835c598" ]
[ "Data_extraction/CS4.py" ]
[ "import pandas as pd\nimport numpy as np\nimport Auxiliary.auxiliary_functions as aux_fun\n#--------------------------------------------------\ndef read_and_extract_target():\n '''\n This function reads the processed \"events\" df and computes which\n of the observations correspond to an IC phenomena. Afte...
[ [ "pandas.read_csv" ] ]
SCiarella/jax
[ "a7c9b6d11fa833c748d72b3ccc11baeed9c0248c" ]
[ "tests/api_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.__version__.split", "numpy.asarray", "numpy.dtype", "numpy.all", "numpy.random.randn", "numpy.iinfo", "numpy.exp", "numpy.arange", "numpy.eye", "numpy.float16", "numpy.sin", "numpy.float32", "numpy.zeros", "numpy.random.rand", "numpy.testing.asser...
borisdayma/datasets
[ "ab6d9759b8b15c0109947159ff1cb6cb3486fdb8" ]
[ "src/datasets/utils/file_utils.py" ]
[ "\"\"\"\nUtilities for working with the local dataset cache.\nThis file is adapted from the AllenNLP library at https://github.com/allenai/allennlp\nCopyright by the AllenNLP authors.\n\"\"\"\n\nimport copy\nimport gzip\nimport json\nimport lzma\nimport os\nimport re\nimport shutil\nimport sys\nimport tarfile\nimpo...
[ [ "numpy.random.get_state", "tensorflow.executing_eagerly", "torch.random.set_rng_state", "numpy.random.seed", "torch.random.get_rng_state", "tensorflow.random.get_global_generator", "torch.cuda.get_rng_state_all", "torch.random.manual_seed", "tensorflow.random.set_global_generat...
LL03-Identity-Dowell/100054-dowellvoiceapp
[ "391df14aa4d438591bd7f9cb740d1f751b59e419" ]
[ "SpeakerIdentification.py" ]
[ "import os\r\nimport wave\r\nimport time\r\nimport pickle\r\n#import pyaudio\r\nimport warnings\r\nimport numpy as np\r\nimport sounddevice as sd\r\nfrom scipy.io.wavfile import write\r\nfrom sklearn import preprocessing\r\nfrom scipy.io.wavfile import read\r\nimport python_speech_features as mfcc\r\nfrom sklearn.m...
[ [ "numpy.hstack", "scipy.io.wavfile.write", "numpy.asarray", "numpy.argmax", "sklearn.mixture.GaussianMixture", "sklearn.preprocessing.scale", "numpy.zeros", "scipy.io.wavfile.read", "numpy.vstack" ] ]
andimarafioti/tifresi
[ "676db371d5c472a5f3199506bf3863367a2ecde4" ]
[ "tifresi/phase/modGabPhaseGrad.py" ]
[ "# -*- coding: utf-8 -*-\n# ######### COPYRIGHT #########\n# Credits\n# #######\n#\n# Copyright(c) 2015-2018\n# ----------------------\n#\n# * `LabEx Archimède <http://labex-archimede.univ-amu.fr/>`_\n# * `Laboratoire d'Informatique Fondamentale <http://www.lif.univ-mrs.fr/>`_\n# (now `Laboratoire d'Informatique ...
[ [ "numpy.abs", "numpy.arange", "numpy.finfo", "numpy.concatenate", "numpy.max", "numpy.all", "numpy.vectorize", "numpy.isrealobj", "numpy.roll" ] ]
sdss/lvmcam
[ "c5f421a546a0072a0dbb3d7b2ebc74316f339f64" ]
[ "python/lvmcam/araviscam/BlackflyCam.py" ]
[ "#!/usr/bin/env python3\n\n\"\"\"\nPython3 class to work with Aravis/GenICam cameras, subclass of sdss-basecam.\n.. module:: araviscam\n.. moduleauthor:: Richard J. Mathar <mathar@mpia.de>\n\"\"\"\n\nimport sys\nimport math\nimport asyncio\nimport numpy\nimport astropy\n\nfrom basecam.mixins import ImageAreaMixIn\n...
[ [ "numpy.ndarray" ] ]
wuaodi/Transfer-Learning-Library
[ "29a946143e63b66a1da9ffa685bfe95f5640028a" ]
[ "examples/domain_adaptation/digits/mdd.py" ]
[ "import random\nimport time\nimport warnings\nimport sys\nimport argparse\nimport shutil\nimport os.path as osp\n\nimport torch\nimport torch.nn as nn\nimport torch.backends.cudnn as cudnn\nfrom torch.optim import Adam\nfrom torch.optim.lr_scheduler import LambdaLR\nfrom torch.utils.data import DataLoader\nimport t...
[ [ "torch.nn.BatchNorm1d", "torch.nn.Dropout", "torch.nn.Sequential", "torch.cat", "torch.manual_seed", "torch.nn.functional.cross_entropy", "torch.utils.data.DataLoader", "torch.nn.Flatten", "torch.nn.Linear", "torch.no_grad", "torch.cuda.is_available", "torch.nn.ReLU...
ltiao/gp-dre
[ "5997a74826636a58662f5fa8c41a81d32ba8baa2" ]
[ "scripts/plotting/generate_table.py" ]
[ "import sys\nimport click\nimport pandas as pd\n\nfrom conf import DATASET_PRETTY_NAMES, WEIGHT_PRETTY_NAMES\n\n\n@click.command()\n@click.argument(\"result\", type=click.File('r'))\n@click.argument(\"table\", type=click.File('w'))\n@click.option(\"--value\", '-v', default=\"error\")\n@click.option(\"--index\", '-i...
[ [ "pandas.concat", "pandas.read_csv", "pandas.MultiIndex.from_product" ] ]
t-triobox/dowhy
[ "77906cd4edff2749683eb4b2f1ab91213e38ec9c" ]
[ "dowhy/causal_refuters/dummy_outcome_refuter.py" ]
[ "import copy\nimport math\nimport numpy as np\nimport pandas as pd\nimport logging\nimport pdb\nfrom collections import OrderedDict, namedtuple\nfrom dowhy.causal_refuter import CausalRefutation\nfrom dowhy.causal_refuter import CausalRefuter\nfrom dowhy.causal_estimator import CausalEstimator,CausalEstimate\n\nfro...
[ [ "sklearn.ensemble.RandomForestRegressor", "pandas.concat", "sklearn.neural_network.MLPRegressor", "pandas.DataFrame", "sklearn.neighbors.KNeighborsRegressor", "sklearn.svm.SVR", "numpy.random.normal", "numpy.random.uniform", "numpy.mean", "sklearn.linear_model.LinearRegress...
moorepatrick/beep
[ "c54b80d1afb5b175bd9335481efc2474a4317c47" ]
[ "beep/tests/test_principal_components.py" ]
[ "# Copyright 2019 Toyota Research Institute. All rights reserved.\nimport json\nimport os\nimport unittest\nimport numpy as np\nfrom sklearn.decomposition import PCA\nfrom beep.principal_components import PrincipalComponents, pivot_data\n\nTEST_DIR = os.path.dirname(__file__)\nTEST_FILE_DIR = os.path.join(TEST_DIR,...
[ [ "numpy.linspace" ] ]
Edadeal/deephack-rl
[ "86f13be19f5650b9acc9dd3b82ea5637418c7ad3" ]
[ "lib/atari/state_processor.py" ]
[ "import numpy as np\nimport tensorflow as tf\n\n\nclass StateProcessor():\n \"\"\"\n Processes a raw Atari iamges. Resizes it and converts it to grayscale.\n \"\"\"\n\n def __init__(self):\n # Build the Tensorflow graph\n with tf.variable_scope(\"state_processor\"):\n self.input...
[ [ "tensorflow.get_default_session", "tensorflow.image.crop_to_bounding_box", "tensorflow.image.resize_images", "tensorflow.placeholder", "tensorflow.squeeze", "tensorflow.image.rgb_to_grayscale", "tensorflow.variable_scope" ] ]
barentsen/vphastools
[ "214ddea35d2628034c236c5647a977fc2bad6572" ]
[ "surveytools/__init__.py" ]
[ "from __future__ import absolute_import\n\nimport os\n\n# Use Agg if no DISPLAY is available\nDISPLAY = os.environ.get('DISPLAY')\nif DISPLAY is None or DISPLAY.startswith('localhost'):\n import matplotlib\n matplotlib.use('Agg')\n\n###########\n# CONSTANTS\n###########\n\n# Where are VPHAS reduced images and...
[ [ "matplotlib.use" ] ]
basnijholt/qcodes-repr
[ "ab761b385c3ec60f16e975667bc08a9e30f0cb2f" ]
[ "formatting.py" ]
[ "\"\"\"String formatting routines for qcodes.DataSet.__repr__.\n\nThis code heavily borrows from `xarray`, whose license can be found\nin `licenses/XARRAY_LICENSE`.\n\"\"\"\n\nimport contextlib\nfrom datetime import datetime, timedelta\nfrom itertools import zip_longest\n\nimport numpy as np\nimport pandas as pd\nf...
[ [ "numpy.logical_not", "numpy.get_printoptions", "pandas.isnull", "numpy.asarray", "numpy.issubdtype", "numpy.set_printoptions", "pandas.Timedelta", "numpy.timedelta64", "numpy.ceil", "numpy.cumprod", "numpy.argmax", "numpy.prod", "pandas.Timestamp" ] ]
PipKat/pyaedt
[ "0c56c35cab30ef2ba63a0333b64c3d34f9f9820d" ]
[ "examples/03-Circuit/Touchstone_Management.py" ]
[ "\"\"\"\nManage Touchstone Objects\n--------------------------\nThis example shows how to use Touchstone objects without opening AEDT.\n\nTo provide the advanced postprocessing features needed for this example, Matplotlib and NumPy\nmust be installed on the machine.\n\nThis example runs only on Windows using CPytho...
[ [ "numpy.array", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
thsshz/DeblurGAN
[ "b0c786e15256639f145737874aa71fc77263b959" ]
[ "options/base_options.py" ]
[ "import argparse\nimport os\nfrom util import util\nimport torch\n\nclass BaseOptions():\n\tdef __init__(self):\n\t\tself.parser = argparse.ArgumentParser()\n\t\tself.initialized = False\n\n\tdef initialize(self):\n\t\tself.parser.add_argument('--dataroot', required=True, help='path to images (should have subfolder...
[ [ "torch.cuda.set_device" ] ]
A2Zntu/ML_HW
[ "00db8a45ba38fc864b71c31b0255488c95880c4c" ]
[ "Lab4/nnCostFunction.py" ]
[ "import numpy as np\nfrom sigmoid import sigmoid\nfrom sigmoidGradient import sigmoidGradient\n\ndef nnCostFunction(nn_params, input_layer_size, hidden_layer_size, num_labels, X, y, lambda_value):\n#NNCOSTFUNCTION Implements the neural network cost function for a two layer\n#neural network which performs classifica...
[ [ "numpy.dot", "numpy.hstack", "numpy.log", "numpy.multiply", "numpy.power", "numpy.reshape", "numpy.eye", "numpy.ones", "numpy.append", "numpy.shape", "numpy.transpose", "numpy.zeros", "numpy.empty" ] ]
ayanc/edgeml.mdp
[ "7f21b88bcf764e927ac8b9997ac9f3b1b2dabcc4" ]
[ "runtest_single.py" ]
[ "#!/usr/bin/env python3\n# - Ayan Chakrabarti <ayan.chakrabarti@gmail.com>\n\"\"\"Run experiments to derive and simulate policies for single cameras.\"\"\"\n\nfrom multiprocessing import Pool\nimport numpy as np\nfrom eomdp import simulate as sim\nfrom eomdp import policy as po\n\nFMPATH = 'save/fm_fold%d_cost%d.np...
[ [ "numpy.ones_like", "numpy.percentile", "numpy.mean", "numpy.load", "numpy.sum" ] ]
scikit-hep/uproot-methods
[ "ba9a97b3dc71c7030a9ec15a9d97397b5ff8aa0d" ]
[ "tests/test_issues.py" ]
[ "#!/usr/bin/env python\n\n# BSD 3-Clause License; see https://github.com/scikit-hep/uproot3-methods/blob/master/LICENSE\n\nimport unittest\n\nimport numpy\n\nimport awkward0\nimport uproot3_methods\nfrom uproot3_methods import *\n\nimport inspect\n\nclass Test(unittest.TestCase):\n def runTest(self):\n pa...
[ [ "numpy.array" ] ]
NISH1001/NeuralNLP-NeuralClassifier
[ "e86f750e68879d7390f0037747336110085d2f44" ]
[ "train_custom.py" ]
[ "#!/usr/bin/env python\n# coding:utf-8\n\"\"\"\nTencent is pleased to support the open source community by making NeuralClassifier available.\nCopyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.\nLicensed under the MIT License (the \"License\"); you may not use this file except in compliance...
[ [ "torch.nn.functional.softmax", "torch.sigmoid", "torch.cuda.manual_seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.save" ] ]
populationgenomics/ancestry
[ "faf6fd4bc3a1f8b2a2adb7e59cf584d4bfdf79e6" ]
[ "scripts/hail_batch/hgdp1kg_tobwgs_pca_pop_densified/hgdp_1kg_tob_wgs_pop_pca_densified.py" ]
[ "\"\"\"\nPerform pca on samples specific to a population\nfrom the HGDP,1KG, and tob-wgs dataset after densifying.\n\nDepends on hgdp1kg_tobwgs_densified_pca/hgdp_1kg_tob_wgs_densified_pca.py\n\"\"\"\n\nimport click\nimport pandas as pd\nimport hail as hl\n\nHGDP1KG_TOBWGS = (\n 'gs://cpg-tob-wgs-main/1kg_hgdp_d...
[ [ "pandas.DataFrame" ] ]
shahpnmlab/cryoem-python
[ "c4e317ba9563172c70ab4571ece0a2d322a301ff" ]
[ "place_points_on_surface.py" ]
[ "'''\nThis script will enable you to place points on the surface of an arbitary sphere\nwhose center is defined by marking the center of the sphere in IMOD and saving it as\nmod file. In writing this script I used CR Drost's response to the question \nof how do you evenly place points on the surface of sphere?\n(ht...
[ [ "numpy.hstack", "numpy.arange", "numpy.arccos", "numpy.cos", "numpy.sin", "numpy.savetxt", "numpy.array", "numpy.loadtxt" ] ]
likedan/cp-vton
[ "dde95aa0b3ede1e1c0e0b0a91ba94cf91ed1f79e" ]
[ "produce_comparison_for_test.py" ]
[ "# coding=utf-8\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nimport utils\nimport argparse\nimport os\nfrom torchvision.utils import save_image\nfrom cp_dataset import CPDataset, CPDataLoader\nfrom networks import GMM, UnetGenerator, VGGLoss, load_checkpoint, save_checkpoint\nfrom resnet...
[ [ "torch.mean", "torch.distributed.init_process_group", "torch.cuda.set_device", "torch.cat", "torch.cuda.device_count", "torch.utils.data.DataLoader", "torch.nn.functional.sigmoid", "torch.nn.functional.grid_sample", "torch.no_grad", "torch.split", "torch.nn.functional.t...
Pr0d19y/3DUnet-livers
[ "8b306b276228275c2f9df01c7b1468816dc1f332" ]
[ "unet3d/generator_multiprocess.py" ]
[ "import keras\nfrom keras.preprocessing.image import ImageDataGenerator\nimport numpy as np\nfrom unet3d.data import open_data_file\nimport time\nimport gc\n\nfrom multiprocessing import Pool\nfrom functools import partial\nfrom unet3d.generator import data_generator\nfrom unet3d.generator import create_patch_index...
[ [ "numpy.asarray", "numpy.floor", "numpy.random.shuffle", "numpy.min" ] ]
guoxueyu/gatk-sv
[ "22fc647dd3ee56a47cb0523ea8f6cc37c4b904eb" ]
[ "dockerfiles/rdpesr/add_RD_to_SVs.py" ]
[ "#script to add cov to SVs\n\ndef add_ILL_cov(pb_uni_svs,bincov):\n for i in pb_uni_svs.keys():\n for j in pb_uni_svs[i]:\n cov_list=cov_SV_readin(j, bincov)\n if len(cov_list)>0:\n j+=[len(cov_list),np.median(cov_lis...
[ [ "numpy.std", "numpy.median", "numpy.mean" ] ]
ToFeWe/qpricesim
[ "2d4312ed1d1356449f0c168835a0662b238a27bb" ]
[ "qpricesim/model_code/economic_environment.py" ]
[ "\"\"\"\n\nA module that defines the economic environment the agents are interacting in.\n\"\"\"\nimport numpy as np\nfrom numba import njit\n\n\n@njit\ndef calc_winning_price(all_prices):\n \"\"\"\n Helper function that takes in the array of all prices in the market\n and returns the winning price and the...
[ [ "numpy.where", "numpy.min" ] ]
ijjorama/DosNa
[ "8e5322a0e1b93a377a9a443d442253b45957dac2" ]
[ "dosna/backends/s3.py" ]
[ "#!/usr/bin/env python\n\"\"\"Backend s3 uses a S3 interface to store the dataset and chunks data\"\"\"\n\nimport logging\n\nimport numpy as np\n\nimport boto3\nfrom botocore.exceptions import ClientError\nfrom dosna.backends import Backend\nfrom dosna.backends.base import (BackendConnection, BackendDataChunk,\n ...
[ [ "numpy.asarray", "numpy.full" ] ]
michaelleerilee/CommunityFirnModel
[ "312fc30b62b7e36a609660e5b10e3269eb090bae" ]
[ "CFM_main/reader.py" ]
[ "#!usr/bin/env python\n'''\nFunctions to read model inputs.\n'''\n\nimport os\nimport numpy as np\n# from string import join\nfrom constants import *\nimport h5py\n\ndef read_input(filename,StartDate=None):\n '''\n Read in data from csv input files\n\n :param filename: name of the file which holds the accu...
[ [ "numpy.shape", "numpy.where", "numpy.loadtxt" ] ]
sandyhouse/FleetX
[ "b3d089cdb0f388c12ad95494ee98053d5bfa450b", "b3d089cdb0f388c12ad95494ee98053d5bfa450b" ]
[ "examples/resnet/train_fleet_static_amp.py", "examples/resnet/train_fleet_lamb.py" ]
[ "# Copyright (c) 2019 PaddlePaddle 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 re...
[ [ "numpy.array" ], [ "numpy.array" ] ]
bond005/elmo_ner
[ "c6135cfca5d7bf817a22c8c8631e7f81f6f05f94" ]
[ "tests/test_bert_ner.py" ]
[ "import copy\nimport gc\nimport os\nimport pickle\nimport re\nimport sys\nimport tempfile\nimport unittest\n\nimport numpy as np\nfrom sklearn.exceptions import NotFittedError\nfrom spacy_udpipe.language import UDPipeLanguage\n\ntry:\n from deep_ner.bert_ner import BERT_NER\n from deep_ner.utils import load_d...
[ [ "numpy.random.uniform", "numpy.array" ] ]
VictoriaSugrue/sheepclock
[ "b0eaec0b96afcc35f0d60982eb3d1215ea329d64" ]
[ "annotate_updated.py" ]
[ "import os\nimport glob\nimport numpy as np\nimport pandas as pd\n\nfilenames = [os.path.basename(x) for x in glob.glob(\"analysis_raw_results/*.bed\")]\n\nmetadata = pd.read_table('human_factor_full_QC.txt')\n\nfor file in filenames:\n temp_name = os.path.splitext(file)[0]\n df_temp = pd.read_csv(\"analysis_...
[ [ "pandas.read_table" ] ]
RSIA-LIESMARS-WHU/AxisLearning
[ "5a108860c959a200811f9643d567ca7883c74875" ]
[ "maskrcnn_benchmark-dota/modeling/rpn/rfcos/smallerRF_wo_clsloss.py" ]
[ "\"\"\"\nThis file contains specific functions for computing losses of FCOS\nfile\n\"\"\"\n\nimport torch\nfrom torch.nn import functional as F\nfrom torch import nn\n\nfrom ..utils import concat_box_prediction_layers\nfrom maskrcnn_benchmark.layers import IOULoss\nfrom maskrcnn_benchmark.layers import SigmoidFocal...
[ [ "torch.abs", "torch.cat", "torch.sqrt", "torch.nn.BCEWithLogitsLoss", "torch.pow", "torch.where", "torch.split", "torch.nonzero", "torch.ones_like", "torch.stack" ] ]
mschmidt87/VeRyPy
[ "eaac6e210d861441071565575750a2f0e25dfb72" ]
[ "classic_heuristics/gapvrp.py" ]
[ "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n###############################################################################\n\"\"\" This file is a part of the VeRyPy classical vehicle routing problem\nheuristic library and provides an implementation of the Fisher&Jaikumar (1981)\nheuristic, which generates an ...
[ [ "numpy.sqrt", "sklearn.cluster.KMeans", "numpy.multiply", "numpy.cos", "sklearn.cluster.DBSCAN", "numpy.sin", "numpy.copy", "numpy.argmax", "numpy.array", "numpy.zeros", "numpy.where", "numpy.vstack" ] ]
alpiges/probnum
[ "2e4153cb0df559984e09ec74487ef6c9d3f6d464" ]
[ "src/probnum/randprocs/markov/integrator/_iwp.py" ]
[ "\"\"\"Integrated Brownian motion.\"\"\"\n\ntry:\n # cached_property is only available in Python >=3.8\n from functools import cached_property\nexcept ImportError:\n from cached_property import cached_property\n\nimport warnings\n\nimport numpy as np\nimport scipy.special\n\nfrom probnum import config, lin...
[ [ "numpy.eye", "numpy.ones", "numpy.zeros", "numpy.linalg.cholesky" ] ]
qiaw99/CS231n-Convolutional-Neural-Networks-for-Visual-Recognition
[ "5949b4f68f04e23751879dbc679e7708735d313f" ]
[ "assignment1/cs231n/classifiers/fc_net.py" ]
[ "from builtins import range\nfrom builtins import object\nimport numpy as np\n\nfrom ..layers import *\nfrom ..layer_utils import *\n\n\nclass TwoLayerNet(object):\n \"\"\"\n A two-layer fully-connected neural network with ReLU nonlinearity and\n softmax loss that uses a modular layer design. We assume an ...
[ [ "numpy.random.normal", "numpy.zeros", "numpy.sum" ] ]
VincentSch4rf/torchtime
[ "bebd006cd67b31c342e0658285c9771c27411df0" ]
[ "torchtime/transforms/functional.py" ]
[ "import warnings\nfrom typing import Any, List, Sequence, Tuple, Optional, Union, Set\n\nimport numpy as np\nimport torch\nfrom torch import Tensor\nimport torch.nn.functional as F\n\nfrom ..exceptions import DataConversionWarning\nfrom ..utils import _check_unknown\n\n\n@torch.jit.unused\ndef _is_numpy(ts: Any) ->...
[ [ "numpy.asarray", "numpy.ravel", "numpy.shape", "torch.as_tensor" ] ]
neuronalX/reservoirpy
[ "37751e9a6be76298e1c14b3816f191f351bfb606" ]
[ "reservoirpy/_base.py" ]
[ "# Author: Nathan Trouvain at 15/02/2022 <nathan.trouvain@inria.fr>\n# Licence: MIT License\n# Copyright: Xavier Hinaut (2018) <xavier.hinaut@inria.fr>\nfrom abc import ABC, abstractmethod\nfrom contextlib import contextmanager\nfrom typing import Any, Dict, Iterator, Sequence, Union\nfrom uuid import uuid4\n\nimpo...
[ [ "numpy.atleast_2d", "numpy.zeros", "numpy.unique" ] ]
jaeikjeon9919/uncertainty-baselines
[ "15aad70bb585452d84c0afa74208338f5db5f70e" ]
[ "experimental/language_structure/psl/psl_model_multiwoz_test.py" ]
[ "# coding=utf-8\n# Copyright 2021 The Uncertainty Baselines 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# Unles...
[ [ "tensorflow.math.argmax", "tensorflow.constant", "tensorflow.test.main", "tensorflow.random.set_seed" ] ]
ebruyasar11/Duelist-Algorithm
[ "d740e0a26a33a230434441b5bcf67b1e7a7c5fd2" ]
[ "Duelist_Algorithm.py" ]
[ "import numpy as np\nimport random\nimport time\nimport matplotlib.pyplot as mp\n\nclass Duelist_Algorithm():\n\tdef __init__(self,f,x,altdeger,ustdeger,pop=200,sans=0.01,mutasyon=0.1,ogren=0.8,iterasyon=500,nc=5,karistir=False):\n\t\t#Sınıf değişkenlerinin tanımlamaları\n\t\tself.f = f\n\t\tself.x = x\n\t\tself.al...
[ [ "matplotlib.pyplot.legend", "numpy.random.seed", "numpy.asarray", "numpy.concatenate", "numpy.copy", "numpy.append", "numpy.random.mut", "numpy.random.uniform", "matplotlib.pyplot.show", "numpy.empty", "matplotlib.pyplot.figure" ] ]
Ernstsen/Pedestron
[ "0c5aa35881561bcd0acf5de8939472efd6409256" ]
[ "tools/test_crowdhuman.py" ]
[ "import argparse\nimport os\nimport os.path as osp\nimport shutil\nimport tempfile\nimport json\nimport time\n\nimport mmcv\nimport torch\nimport torch.distributed as dist\nfrom mmcv.runner import load_checkpoint, get_dist_info\nfrom mmcv.parallel import MMDataParallel, MMDistributedDataParallel\n\nfrom mmdet.apis ...
[ [ "torch.full", "torch.distributed.broadcast", "torch.no_grad", "torch.distributed.barrier" ] ]
rahulkumar1112/Audio-Classification
[ "04d16703ccc2fb10cc1ba92850364ea49b9a5bfa" ]
[ "model.py" ]
[ "import os\nfrom scipy.io import wavfile\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom keras.layers import Conv2D, MaxPool2D, Flatten, LSTM\nfrom keras.layers import Dropout, Dense, TimeDistributed\nfrom keras.models import Sequential\nfrom keras.utils import to_categorical\nfrom s...
[ [ "pandas.read_csv", "numpy.unique", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show", "scipy.io.wavfile.read" ] ]
lancerane/NIPS-2018-AI-for-Prosthetics
[ "7689646e2d079ffcbcde898ece25d2cf78c132c7" ]
[ "osim-rl/examples/arm.py" ]
[ "import os\r\nfrom osim.env import OsimEnv\r\nimport pprint\r\nimport numpy as np\r\n\r\nclass Arm3dEnv(OsimEnv):\r\n model_path = os.path.join(os.path.dirname(__file__), '../osim/models/MoBL_ARMS_J_Simple_032118.osim')\r\n time_limit = 200\r\n current_objective = np.array([0,0,0])\r\n \r\n def is_do...
[ [ "numpy.isnan", "numpy.random.uniform", "numpy.array" ] ]
flowerah/PythoMS
[ "7d500f20219157657023c8c0a930f580d3768191" ]
[ "pythoms/mzml.py" ]
[ "\"\"\"\nIGNORE:\nCHANGELOG:\n-\n---2.7 building\n\nto add:\n try to extract timepoints and tic from chromatogramList (x values are sorted, so this probably won't work)\nIGNORE\n\"\"\"\nimport sys\nimport os\nimport zlib\nimport gzip\nimport base64\nimport struct\nimport subprocess\nimport xml.dom.minidom\nimpor...
[ [ "scipy.asarray", "scipy.where" ] ]
Shang-XH/BAFTT
[ "62392325342f48b8a89f0c2bf71e48026dd90629", "62392325342f48b8a89f0c2bf71e48026dd90629" ]
[ "model/deeplab.py", "dataset/MassBuilding_dataset.py" ]
[ "import torch.nn as nn\nimport math\nimport torch.utils.model_zoo as model_zoo\nimport torch\nimport numpy as np\naffine_par = True\n\n\ndef outS(i):\n i = int(i)\n i = (i+1)/2\n i = int(np.ceil((i+1)/2.0))\n i = (i+1)/2\n return i\n\ndef conv3x3(in_planes, out_planes, stride=1):\n \"3x3 convoluti...
[ [ "torch.nn.Sequential", "torch.nn.ModuleList", "torch.nn.Conv2d", "numpy.ceil", "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.ReLU" ], [ "matplotlib.pyplot.imshow", "numpy.asarray", "torch.utils.data.DataLoader", "numpy.ones", "numpy.transpose", "nu...
tjniemi/pysteps
[ "76324d8f315f63c6723887f4c99d155749a31e83", "76324d8f315f63c6723887f4c99d155749a31e83" ]
[ "pysteps/utils/transformation.py", "examples/thunderstorm_detection_and_tracking.py" ]
[ "# -*- coding: utf-8 -*-\r\n\"\"\"\r\npysteps.utils.transformation\r\n============================\r\n\r\nMethods for transforming data values.\r\n\r\n.. autosummary::\r\n :toctree: ../generated/\r\n\r\n boxcox_transform\r\n dB_transform\r\n NQ_transform\r\n sqrt_transform\r\n\"\"\"\r\n\r\nimport num...
[ [ "scipy.stats.norm.ppf", "numpy.log", "numpy.sqrt", "numpy.min", "numpy.isnan", "numpy.arange", "numpy.log10", "numpy.argsort", "numpy.exp" ], [ "matplotlib.pyplot.legend", "numpy.unique", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib....
Ice833/Semantic-Segmentation
[ "23d23f6da3b34884c044a2253d65a1e4097adb2d" ]
[ "SegNet_Mobile/train.py" ]
[ "from nets.segnet import mobilenet_segnet\r\nfrom keras.optimizers import Adam\r\nfrom keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, EarlyStopping\r\nfrom PIL import Image\r\nimport keras\r\nfrom keras import backend as K\r\nimport numpy as np\r\n\r\nNCLASSES = 2\r\nHEIGHT = 416\r\nWIDTH =...
[ [ "numpy.reshape", "numpy.random.shuffle", "numpy.array", "numpy.random.seed" ] ]
stormage2/huji_lab
[ "07734f1891d05177dd1395a4a3e4694e258ca0f8" ]
[ "huji_lab/Display.py" ]
[ "import matplotlib.pyplot as _plt\nfrom IPython.display import Image as _Image\nfrom IPython.display import display as _display\nfrom IPython.display import Markdown as _Markdown\nfrom IPython.display import Latex as _Latex\n\n\"\"\"\n# A dangerous override function, currently unimplemented.\nfrom uncertainties.cor...
[ [ "matplotlib.pyplot.tight_layout", "matplotlib.pyplot.rc", "matplotlib.pyplot.subplots", "matplotlib.pyplot.axis" ] ]
jhamman/xrviz
[ "7b933f29330fed8c9ee6c11822058478f58d51a1" ]
[ "xrviz/dashboard.py" ]
[ "import ast\nimport dask\nimport panel as pn\nimport pandas as pd\nimport numpy as np\nimport xarray as xr\nimport hvplot.xarray\nimport hvplot.pandas\nimport holoviews as hv\nfrom holoviews import streams\nfrom bokeh.models import HoverTool\nimport warnings\nfrom itertools import cycle\nimport numpy\nfrom .sigslot...
[ [ "numpy.asarray", "numpy.cos" ] ]
RichardScottOZ/xrft
[ "5b18b88957661b8f5e1967ec28e81c552c63834f" ]
[ "xrft/xrft.py" ]
[ "import warnings\nimport operator\nimport sys\nimport functools as ft\nfrom functools import reduce\n\nimport numpy as np\nimport xarray as xr\nimport pandas as pd\n\nimport dask.array as dsar\nfrom dask import delayed\n\nimport scipy.signal as sps\nimport scipy.linalg as spl\n\nfrom .detrend import detrend as _det...
[ [ "numpy.log2", "pandas.api.types.is_datetime64_dtype", "numpy.abs", "numpy.conj", "numpy.allclose", "numpy.isnan", "numpy.sqrt", "numpy.fft.fftshift", "numpy.full", "numpy.diff", "numpy.prod", "numpy.fft.fftfreq", "numpy.ravel", "numpy.exp", "numpy.flip" ...
hashim361/text
[ "5a12211ac370f989ca359d232d3081a889e859dd" ]
[ "tensorflow_text/python/ops/bert_tokenizer_test.py" ]
[ "# coding=utf-8\n# Copyright 2020 TF.Text 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 required by appl...
[ [ "tensorflow.python.ops.ragged.ragged_tensor.RaggedTensorType", "tensorflow.python.ops.ragged.ragged_tensor.RaggedTensor.from_nested_row_splits", "tensorflow.python.ops.array_ops.tile", "tensorflow.python.ops.ragged.ragged_factory_ops.constant", "tensorflow.python.ops.string_ops.regex_replace",...
goodarzilab/pyteiser
[ "3ac78604c768957022cc7751ccdd337960a816f2" ]
[ "pyteiser/wrappers/preprocess_custom_expression_profile.py" ]
[ "import numpy as np\nimport pandas as pd\nimport argparse\n\nfrom .. import IO\n\n\ndef handler(raw_args = None):\n parser = argparse.ArgumentParser()\n\n parser.add_argument(\"--rna_bin_file\", help=\"binarized sequence file\", type=str)\n parser.add_argument(\"--exp_values_file\", help=\"expression value...
[ [ "numpy.array", "pandas.read_csv" ] ]
nikolaevra/tf-faster-rcnn
[ "4a5a5f9cfd4dc6548ee9cf63f1122eadbc06ea39" ]
[ "lib/wrapper/faster_rcnn_wrapper.py" ]
[ "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport cv2\nimport os\n\nimport tensorflow as tf\nfrom model.config import cfg\nfrom model.test import im_detect\nfrom nets.resnet_v1 import resnetv1\nfrom nets.vgg16 import vgg16\nfrom utils.timer imp...
[ [ "tensorflow.ConfigProto", "tensorflow.train.Saver", "tensorflow.Session" ] ]