repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
Nishantjannu/dedo | [
"cb6bcbc9e3049d7de9385842b8d35f02c946fb94",
"cb6bcbc9e3049d7de9385842b8d35f02c946fb94"
] | [
"dedo/internal/datasets.py",
"dedo/envs/deform_env.py"
] | [
"import sys\nimport time\nimport torch\nfrom torch.utils.data import IterableDataset\nimport numpy as np\n\n\ndef worker_init_fn(worker_id):\n '''Helper function to launch each worker's env with a different seed'''\n\n gym = __import__('gym')\n worker_info = torch.utils.data.get_worker_info()\n ds = wor... | [
[
"numpy.array",
"torch.utils.data.get_worker_info",
"numpy.random.randint"
],
[
"numpy.abs",
"numpy.random.seed",
"numpy.clip",
"numpy.min",
"numpy.arange",
"numpy.isnan",
"numpy.random.choice",
"numpy.linalg.norm",
"numpy.ones",
"numpy.max",
"numpy.mean"... |
pjrigali/Poker-Now-Analysis | [
"be33d04e246f0b80beaebf394bc1eed3eb56d0c6"
] | [
"poker/poker_class.py"
] | [
"from typing import List, Optional, Union\nfrom dataclasses import dataclass\nimport pandas as pd\nimport datetime\nfrom os import walk\nfrom poker.base import flatten, unique_values, round_to, native_max\nfrom poker.game_class import Game\n\n\ndef _poker_convert_shape(data: List[str]) -> list:\n \"\"\"Converts ... | [
[
"pandas.read_csv",
"pandas.DataFrame",
"pandas.DataFrame.from_dict"
]
] |
guyhwilson/ssm | [
"4349d6b1fad93f49508e5ca1f8326d24d3cfb097"
] | [
"ssm/emissions.py"
] | [
"from warnings import warn\n\nimport autograd.numpy as np\nimport autograd.numpy.random as npr\nfrom autograd.scipy.special import gammaln\nfrom autograd import hessian\n\nfrom ssm.util import ensure_args_are_lists, \\\n logistic, logit, softplus, inv_softplus\nfrom ssm.preprocessing import interpolate_data, pca... | [
[
"sklearn.linear_model.LinearRegression"
]
] |
mihaTrajbaric/application-optimisation | [
"45767c8b10c18645f71d96e275165c68c2479117"
] | [
"use-cases/SnowUC-SkylineExtraction/peaklens-gpuopt_training.py"
] | [
"# %%\n\"\"\"\n# Notebook to train PeakLens original model \n\"\"\"\n\n# %%\nimport sys\nimport os\nimport tensorflow as tf\nimport numpy as np\nimport glob\nimport multiprocessing\nimport time \n\n# %%\nprint(tf.__version__)\n\n# %%\n\"\"\"\n## Training parameters \n\"\"\"\n\n# %%\nMODEL_NAME = \"PeakLens_original... | [
[
"tensorflow.python.framework.convert_to_constants.convert_variables_to_constants_v2",
"tensorflow.keras.callbacks.TensorBoard",
"tensorflow.image.random_flip_left_right",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.keras.layers.Conv2D",
"tensorflow.data.experimental.pre... |
justinjohn0306/uberduck-ml-dev | [
"439ec326eb7680c4fdd5ee97a09def8e355e0f7c"
] | [
"uberduck_ml_dev/utils/utils.py"
] | [
"# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/utils.utils.ipynb (unless otherwise specified).\n\n__all__ = ['load_filepaths_and_text', 'window_sumsquare', 'griffin_lim', 'dynamic_range_compression',\n 'dynamic_range_decompression', 'to_gpu', 'get_mask_from_lengths', 'reduce_tensor', 'subsequent_mask',\... | [
[
"torch.sigmoid",
"torch.distributed.all_reduce",
"torch.max",
"scipy.signal.get_window",
"torch.ones",
"torch.zeros_like",
"torch.from_numpy",
"torch.tanh",
"torch.exp",
"torch.rand",
"torch.cuda.is_available",
"torch.arange",
"torch.clamp",
"torch.cumsum",
... |
neurorishika/babySSH | [
"9239ce7243250bdd0f5f57e8919c0b15dca41c5a"
] | [
"babydes.py"
] | [
"import numpy as np\nfrom util import *\n\n'''\nServer has list of authorized public key.\nClient has public key and private key (unique to client).\n\nServer has to make sure that the client who is in contact is authorized.\n\nAuthentication:\n---------------\n - Server selects a message.\n - Encrypts with p... | [
[
"numpy.logical_xor",
"numpy.concatenate",
"numpy.copy",
"numpy.array_split",
"numpy.roll"
]
] |
ilmcconnell/Cosmos | [
"84245034727c30e20ffddee9e02c7e96f3aa115e",
"84245034727c30e20ffddee9e02c7e96f3aa115e",
"84245034727c30e20ffddee9e02c7e96f3aa115e"
] | [
"cosmos/ingestion/ingest/process/detection/src/torch_model/train/data_layer/xml_loader.py",
"cosmos/ingestion/ingest/process/postprocess/converters/pdf_extractor.py",
"cosmos/ingestion/ingest/process/proposals/connected_components.py"
] | [
"\"\"\"\nAn XML and image repo loader\nmeant to work with the GTDataset class\nAuthor: Josh McGrath\n\"\"\"\nfrom torch.utils.data import Dataset\nimport os\nfrom os.path import splitext\nfrom PIL import Image\nfrom torchvision.transforms import ToTensor\nfrom numpy import genfromtxt\nimport torch\nfrom torch.nn.ut... | [
[
"torch.abs",
"torch.norm",
"torch.ones",
"torch.zeros",
"torch.nn.utils.rnn.pad_sequence",
"torch.stack"
],
[
"pandas.DataFrame"
],
[
"numpy.min",
"numpy.hsplit",
"numpy.argwhere",
"numpy.max",
"numpy.zeros"
]
] |
jercas/MLiA_Learning_Code | [
"1d8c09f2fcbc81342941f6af97403bd2eb07483b"
] | [
"machinelearninginaction/Ch13/extras/createFig3.py"
] | [
"'''\nCreated on Jun 1, 2011\n\n@author: Peter\n'''\nfrom numpy import *\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport pca\n\nn = 1000 #number of points to create\nxcord0 = []; ycord0 = []\nxcord1 = []; ycord1 = []\nxcord2 = []; ycord2 = []\nmarkers =[]\ncolors =[]\nfw = open('testSet3.txt','w')\nfor ... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
kant/redrock | [
"572d81c60a940f9c132b715dde793e2657962e00"
] | [
"rest-api/python/resources.py"
] | [
"#\n# (C) Copyright IBM Corp. 2015, 2016\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... | [
[
"numpy.load"
]
] |
developmentseed/pg_mvt | [
"10fa599928fc96ea30fad63289e40e39e564845d"
] | [
"tests/routes/test_tiles.py"
] | [
"\"\"\"Test Tiles endpoints.\"\"\"\n\nimport mapbox_vector_tile\nimport numpy as np\n\n\ndef test_tilejson(app):\n \"\"\"Test TileJSON endpoint.\"\"\"\n response = app.get(\"/public.landsat_wrs/tilejson.json\")\n assert response.status_code == 200\n\n resp_json = response.json()\n assert resp_json[\"... | [
[
"numpy.testing.assert_almost_equal"
]
] |
datvuthanh/SPIMNET | [
"aa1518511e2c910290b6a31b19e942b49e025b38"
] | [
"processing.py"
] | [
"import glob\nimport imageio\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\nimport PIL\nfrom tensorflow.keras import layers\nimport time\nimport numpy as np\n\nfrom sklearn import metrics\nfrom scipy import interpolate\n\nimport tensorflow as tf\nimport tensorflow_addons as tfa\n\ndef load(image_f... | [
[
"tensorflow.clip_by_value",
"tensorflow.shape",
"tensorflow.reduce_mean",
"tensorflow.stack",
"tensorflow.cast",
"tensorflow.random.uniform",
"tensorflow.image.flip_left_right",
"tensorflow.image.flip_up_down",
"tensorflow.image.random_crop",
"tensorflow.image.rot90",
"... |
josepfont65/neurodsp | [
"a7c5b72665eed6368e29bf4f15443a28a2e18732",
"a7c5b72665eed6368e29bf4f15443a28a2e18732"
] | [
"neurodsp/plts/time_series.py",
"neurodsp/sim/aperiodic.py"
] | [
"\"\"\"Plots for time series.\"\"\"\n\nfrom itertools import repeat, cycle\n\nimport numpy as np\nimport numpy.ma as ma\nimport matplotlib.pyplot as plt\n\nfrom neurodsp.plts.style import style_plot\nfrom neurodsp.plts.utils import check_ax, savefig\n\n###############################################################... | [
[
"matplotlib.pyplot.yticks",
"numpy.invert"
],
[
"numpy.convolve",
"numpy.sqrt",
"numpy.fft.fft",
"numpy.fft.ifft",
"numpy.random.randn",
"numpy.exp",
"numpy.where"
]
] |
xinyandai/structural-nn | [
"373cec9ca2ee766ddb1d2a09eac4dd551d57e648"
] | [
"image/imagequantizer.py"
] | [
"import torch\nimport numpy as np\nfrom PIL import Image\nfrom glob import glob\nfrom image.dataquantizer import quantize\n\n\ndef load_image(location):\n img = Image.open(location)\n img.load()\n data = np.asarray(img, dtype=\"int32\")\n return data\n\n\ndef save_image(image, location):\n if isinsta... | [
[
"numpy.asarray",
"numpy.clip"
]
] |
lcampagn/vispy | [
"fa5e2eab9bb3d956f87ae68a56e342913e58a305",
"fa5e2eab9bb3d956f87ae68a56e342913e58a305",
"fa5e2eab9bb3d956f87ae68a56e342913e58a305"
] | [
"vispy/visuals/rectangle.py",
"vispy/visuals/components/color.py",
"examples/basics/scene/volume.py"
] | [
"# -*- coding: utf-8 -*-\n# Copradiusight (c) 2014, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\n\"\"\"\nSimple ellipse visual based on PolygonVisual\n\"\"\"\n\nfrom __future__ import division\n\nimport numpy as np\nfrom ..color import Color\nfrom .polygon ... | [
[
"numpy.linspace",
"numpy.cos",
"numpy.full",
"numpy.concatenate",
"numpy.sin",
"numpy.array",
"numpy.empty"
],
[
"numpy.array"
],
[
"numpy.rollaxis"
]
] |
Vitalii36/full-cycle_ML_Solution | [
"8c449164fe6856ade851910642a149a6325337c0"
] | [
"utils/trainer.py"
] | [
"from sklearn.svm import SVC\n\nclass Estimator:\n @staticmethod\n def fit(train_x, train_y):\n return SVC(probability=True).fit(train_x, train_y)\n\n @staticmethod\n def predict(trained, test_x):\n return trained.predict(test_x)"
] | [
[
"sklearn.svm.SVC"
]
] |
nuwanprabhath/kaggle-nba-career-prediction | [
"ff07bccd02faa7b0aa3a448884135f87927768d9"
] | [
"src/data/imputer.py"
] | [
"\ndef iterative_imputer(df, cols, operator, target_value ):\n \n# compare iterative imputation strategies for the horse colic dataset\n from numpy import mean\n from numpy import std\n from pandas import read_csv\n from sklearn.ensemble import RandomForestClassifier\n from sklearn.experimental im... | [
[
"matplotlib.pyplot.boxplot",
"pandas.read_csv",
"sklearn.model_selection.cross_val_score",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.impute.IterativeImputer",
"numpy.std",
"sklearn.model_selection.RepeatedStratifiedKFold",
"numpy.mean",
"matplotlib.pyplot.xticks",
... |
ghchen18/emnlp2021-sixt | [
"1081986bb1c867a64e84af186000008901294678"
] | [
"fairseq/modules/transformer_layer.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Dict, List, Optional\nfrom numpy.random import uniform\n\nimport torch\nimport torch.nn as nn\nfrom fairseq impor... | [
[
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.Linear",
"torch.nn.init.xavier_uniform_",
"numpy.random.uniform"
]
] |
BeHappyForMe/retrieval-faq | [
"bdc060b5005fc26bc5d27e1577bfc5a17710804d"
] | [
"faq/round_trip_translation.py"
] | [
"import pandas as pd\nimport json\nimport requests\nimport time\n\npd_all = pd.read_csv('../data/baoxian_right.csv', sep='\\t')\nbest_title = pd_all['best_title'].tolist()\n\n\ndef translate(word, ip):\n # 有道词典 api\n url = 'http://fanyi.youdao.com/translate?smartresult=dict&smartresult=rule&smartresult=ugc&se... | [
[
"pandas.read_csv"
]
] |
jeffin07/theseus | [
"3498bbddf9cca740c2703d0c1aa3a78a7264cb15",
"3498bbddf9cca740c2703d0c1aa3a78a7264cb15"
] | [
"theseus/geometry/lie_group.py",
"theseus/geometry/so2.py"
] | [
"# Copyright (c) Meta Platforms, Inc. and affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport abc\nfrom typing import Any, List, Optional, Tuple, cast\n\nimport torch\n\nfrom theseus.geometry.manifold import Manifold\... | [
[
"torch.matmul"
],
[
"torch.ones",
"torch.empty",
"torch.zeros",
"torch.randn",
"torch.einsum",
"torch.tensor",
"torch.no_grad",
"torch.rand",
"torch.stack",
"torch.allclose",
"torch.atan2"
]
] |
oxygenxo/openvino | [
"1c3848a96fdd325b044babe6d5cd26db341cf85b"
] | [
"ngraph/python/tests/test_ngraph/test_ops_fused.py"
] | [
"# ******************************************************************************\n# Copyright 2017-2020 Intel 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# ... | [
[
"numpy.allclose",
"numpy.clip",
"numpy.arange",
"numpy.subtract",
"numpy.float32",
"numpy.exp",
"numpy.array"
]
] |
madhuv2002/pandas | [
"006f1e0efb3ec81d52ff4d080b0c770b7b79d041",
"006f1e0efb3ec81d52ff4d080b0c770b7b79d041",
"006f1e0efb3ec81d52ff4d080b0c770b7b79d041"
] | [
"pandas/core/indexes/datetimelike.py",
"pandas/tests/series/indexing/test_where.py",
"pandas/tests/groupby/test_apply.py"
] | [
"\"\"\"\nBase and utility classes for tseries type pandas objects.\n\"\"\"\nfrom datetime import datetime\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Hashable,\n List,\n Optional,\n Tuple,\n Type,\n TypeVar,\n Union,\n cast,\n)\n\nimport numpy as np\n\nfrom pandas._libs import (\n ... | [
[
"numpy.asarray",
"pandas.compat.numpy.function.validate_argmax",
"pandas.core.dtypes.common.is_dtype_equal",
"pandas._libs.lib.is_scalar",
"numpy.iinfo",
"pandas.core.indexes.extension.inherit_names",
"pandas.compat.numpy.function.validate_take",
"pandas.core.common.asarray_tuplesa... |
gusamarante/QuantFin | [
"ba8ae75095692b3e6a922220ef8cefc1bea7c35e"
] | [
"cqf_final_project/chart_value.py"
] | [
"import pandas as pd\nfrom matplotlib import rcParams\nimport matplotlib.pyplot as plt\nimport matplotlib.dates as mdates\n\nfile_path = r'/Users/gustavoamarante/Dropbox/CQF/Final Project/' # Mac\n# file_path = r'/Users/gusamarante/Dropbox/CQF/Final Project/' # Macbook\n\n# Read Bloomberg Tickers for renaming\ndf... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.gca",
"pandas.read_excel",
"matplotlib.pyplot.tight_layout",
"matplotlib.dates.DateFormatter",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.dates.YearLocator",
"matplotlib.pyplot.xticks",
"matplotlib.pyplo... |
InduManimaran/pennylane | [
"375d25acc7bd2e6d5243b5273958b26513c33189",
"375d25acc7bd2e6d5243b5273958b26513c33189"
] | [
"pennylane/beta/qnodes/qubit.py",
"pennylane/qnode.py"
] | [
"# Copyright 2019 Xanadu Quantum Technologies Inc.\r\n\r\n# Licensed under the Apache License, Version 2.0 (the \"License\");\r\n# you may not use this file except in compliance with the License.\r\n# You may obtain a copy of the License at\r\n\r\n# http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n# Unless req... | [
[
"numpy.diag",
"numpy.round",
"numpy.identity",
"numpy.array",
"numpy.where",
"numpy.zeros"
],
[
"numpy.diag",
"numpy.expand_dims",
"numpy.eye",
"numpy.kron",
"numpy.round",
"numpy.identity",
"numpy.array",
"numpy.zeros",
"numpy.where"
]
] |
jgueldenstein/urdf2webots | [
"39850f249baa8461d014e0ca9c4b4d05d19cf7ab"
] | [
"urdf2webots/writeProto.py"
] | [
"\"\"\"Import modules.\"\"\"\n\nimport math\nimport numpy as np\n\nfrom urdf2webots.math_utils import rotateVector, matrixFromRotation, multiplyMatrix, rotationFromMatrix\n\ntoolSlot = None\nstaticBase = False\nenableMultiFile = False\nmeshFilesPath = None\nrobotNameMain = ''\ninitPos = None\n\n\nclass RGB():\n ... | [
[
"numpy.dot",
"numpy.array",
"numpy.transpose"
]
] |
Mishne-Lab/CIDAN | [
"30d1176773e3ad0f236ba342cba48c89492f4e63"
] | [
"cidan/GUI/ImageView/ROIPaintImageViewModule.py"
] | [
"import logging\n\nimport numpy as np\nfrom PySide2.QtWidgets import QErrorMessage\nfrom qtpy import QtCore\n\nfrom cidan.GUI.ImageView.ROIImageViewModule import ROIImageViewModule\n\nlogger1 = logging.getLogger(\"cidan.ImageView.ROIImageViewModule\")\n\n\nclass ROIPaintImageViewModule(ROIImageViewModule):\n def... | [
[
"numpy.hstack",
"numpy.zeros",
"numpy.percentile"
]
] |
hadarohana/fairseq | [
"566341e3aae9271facf6b9181b3f51b5120a2774"
] | [
"fairseq/modules/transformer_sentence_encoder.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom typing import Optional, Tuple\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom fairseq.modules imp... | [
[
"torch.nn.Embedding",
"torch.nn.functional.dropout"
]
] |
ishine/bolt | [
"ea734231f7085898ba5ca10da6d02da38058a705",
"ea734231f7085898ba5ca10da6d02da38058a705"
] | [
"model_tools/tools/tensorflow2caffe/bert/albert/transform_albert.py",
"model_tools/tools/tensorflow2caffe/bert/tinybert/tinybert-infer.py"
] | [
"#!/usr/local/bin/python\n# -*- coding: utf-8 -*-\n\nfrom tensorflow2caffe_albert import Tensorflow2CaffeALBert\nimport numpy as np\n\n\nif __name__ == '__main__':\n tensorflow_model_path = \"/data/bolt/model_zoo/tensorflow_models/albert_base_zh_additional_36k_steps/albert_model.ckpt\"\n encoder_layers = 12\n... | [
[
"numpy.array"
],
[
"tensorflow.nn.bias_add",
"tensorflow.train.Saver",
"tensorflow.matmul",
"tensorflow.import_graph_def",
"tensorflow.transpose",
"numpy.reshape",
"tensorflow.zeros_initializer",
"tensorflow.truncated_normal_initializer",
"tensorflow.placeholder",
"... |
ultmaster/tianshou | [
"3ac67d9974b6bd3e3d7feac7738ca6de33b317c7",
"3ac67d9974b6bd3e3d7feac7738ca6de33b317c7",
"3ac67d9974b6bd3e3d7feac7738ca6de33b317c7"
] | [
"test/discrete/test_a2c_with_il.py",
"examples/mujoco/mujoco_reinforce.py",
"test/base/test_batch.py"
] | [
"import os\nimport gym\nimport torch\nimport pprint\nimport argparse\nimport numpy as np\nfrom torch.utils.tensorboard import SummaryWriter\n\nfrom tianshou.utils import BasicLogger\nfrom tianshou.env import DummyVectorEnv\nfrom tianshou.utils.net.common import Net\nfrom tianshou.data import Collector, VectorReplay... | [
[
"numpy.random.seed",
"torch.manual_seed",
"torch.set_num_threads",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available"
],
[
"torch.optim.lr_scheduler.LambdaLR",
"numpy.sqrt",
"numpy.random.seed",
"numpy.min",
"torch.nn.init.constant_",
"torch.manual_s... |
DwayneDuane/tensorflow | [
"c90698124aa164e7683e3a9d03b69e9aa8461244",
"c90698124aa164e7683e3a9d03b69e9aa8461244"
] | [
"tensorflow/lite/python/lite_flex_test.py",
"tensorflow/python/kernel_tests/linalg/linear_operator_diag_test.py"
] | [
"# Copyright 2019 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... | [
[
"tensorflow.lite.python.lite.TFLiteConverterV2.from_saved_model",
"tensorflow.lite.python.interpreter.Interpreter",
"tensorflow.python.ops.array_ops.placeholder",
"tensorflow.python.ops.variables.Variable",
"tensorflow.python.saved_model.saved_model.simple_save",
"tensorflow.nn.conv2d",
... |
GLivshits/Transistors | [
"4452c17a910a706326de0b6d0c95e681fba030dd"
] | [
"Probestation_via_classes.py"
] | [
"import os\nimport serial\nimport pyvisa\nimport matplotlib as mpl\nfrom matplotlib import pyplot as plt\nimport pandas as pd\nimport numpy as np\nimport time\n\n\nclass Probestation_FETs(object):\n\n def __init__(self, measurement_type):\n\n self.measurement_type = measurement_type\n\n def turn_on_key... | [
[
"pandas.DataFrame.to_csv",
"matplotlib.ticker.SymmetricalLogLocator",
"matplotlib.pyplot.subplots",
"pandas.DataFrame",
"numpy.mean",
"numpy.equal"
]
] |
redachhaibi/FreeNN | [
"3323fed33a0a990f137c11f66c91c4195db9bd92"
] | [
"experiments/run_experiment.py"
] | [
"import torch\nimport torchvision\nimport torchvision.transforms as transforms\n\nimport numpy\n\n#from fiberedae.utils import nn as nnutils\n#from icecream import ic\n\nimport click\n\ndef _get_attr(obj, attr_name, human_err_message):\n try:\n thing = getattr(obj, attr_name)\n except (AttributeError, ... | [
[
"torch.nn.Sequential",
"torch.utils.data.DataLoader",
"numpy.save",
"torch.nn.Linear",
"torch.flatten",
"numpy.array"
]
] |
sbhadra2020/fastMRI | [
"a2b25fed53621c5d5c648993af13971b2d365fc3",
"a2b25fed53621c5d5c648993af13971b2d365fc3",
"a2b25fed53621c5d5c648993af13971b2d365fc3"
] | [
"banding_removal/fastmri/model/classifiers/resnet_r1.py",
"data/test_transforms.py",
"models/varnet/varnet.py"
] | [
"import torch\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch.autograd import Variable\nimport torch.utils.data\nimport torch.utils.data.distributed\nimport numpy as np\nimport pdb\n\nkernel_size = 5\n\nclass Discriminator(nn.Module):\n \"\"\"\n Known to work well as a GAN discrimi... | [
[
"torch.nn.Sequential",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.MaxPool2d",
"torch.nn.Linear",
"torch.nn.functional.relu",
"torch.nn.AdaptiveAvgPool2d",
"torch.nn.InstanceNorm2d",
"torch.nn.GroupNorm",
"torch.nn.init.kaiming_normal_"
],
[
"numpy.fft.f... |
HelloDyson/Sketch2Voxel | [
"55799301ece904f1b6e8696f569647748a2197c3"
] | [
"models/base_gru_net.py"
] | [
"from models.net import Net\nfrom lib.layers import SoftmaxWithLoss3D\n\nimport torch\nfrom torch.autograd import Variable\n\n\nclass BaseGRUNet(Net):\n \"\"\"\n This class is used to define some common attributes and methods that both GRUNet and \n ResidualGRUNet have. Note that GRUNet and ResidualGRUNet ... | [
[
"torch.autograd.Variable",
"torch.cuda.is_available",
"torch.zeros"
]
] |
akinoriosamura/TorchSeg-mirror | [
"34033fe85fc24015bcef7a92aad39d2a25a001a5",
"34033fe85fc24015bcef7a92aad39d2a25a001a5",
"34033fe85fc24015bcef7a92aad39d2a25a001a5",
"34033fe85fc24015bcef7a92aad39d2a25a001a5",
"34033fe85fc24015bcef7a92aad39d2a25a001a5",
"34033fe85fc24015bcef7a92aad39d2a25a001a5",
"34033fe85fc24015bcef7a92aad39d2a25a001a... | [
"model/cpn/ablation_study/cityscapes.cpn.R101_v1c.v2/train.py",
"model/cpn/ade.cpn.R50_v1c.v7/network.py",
"model/cpn/ade.cpn.R50_v1c.v37/train.py",
"model/bisenet/cityscapes.bisenet.X39.speed/config.py",
"model/cpn/ade.cpn.R50_v1c.v19/train.py",
"model/cpn/ade.cpn.R50_v1c.v39/network.py",
"model/cpn/ab... | [
"from __future__ import division\nimport os.path as osp\nimport sys\nimport argparse\nfrom tqdm import tqdm\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.distributed as dist\nimport torch.backends.cudnn as cudnn\n\nfrom config import config\nfrom dataloader import get_train_l... | [
[
"torch.cuda.set_device",
"torch.cuda.manual_seed",
"torch.manual_seed",
"torch.cuda.is_available",
"torch.optim.SGD",
"torch.distributed.all_reduce"
],
[
"torch.sigmoid",
"torch.ge",
"torch.nn.Dropout2d",
"torch.nn.functional.log_softmax",
"torch.cat",
"torch.nn... |
johnhw/complexitygraph | [
"2ed89bee365939665236fe434597f21144a68d96"
] | [
"docs/mkplot.py"
] | [
"from complexitygraph import complexity_graph\nimport matplotlib.pyplot as plt\n\ndef quadratic_time(n):\n s = 0\n for i in range(n):\n for j in range(n):\n s = s + 1\n\ncomplexity_graph(quadratic_time, range(1, 500, 20), reps=12, number=6)\nplt.savefig(\"quadratic.png\")\n"
] | [
[
"matplotlib.pyplot.savefig"
]
] |
kunwu522/cs584-project | [
"4f93229bb7d9b9e185d692b47192dfa46e51d1fa"
] | [
"code/han_bias.py"
] | [
"import os\n# os.environ[\"CUDA_DEVICE_ORDER\"] = \"PCI_BUS_ID\" # see issue #152\n# os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\"\n\nimport keras\nfrom keras.preprocessing import text\nfrom keras.engine.topology import Layer\nimport keras.layers as L\nfrom keras.models import Model\nfrom keras import initializers... | [
[
"pandas.DataFrame.from_dict",
"numpy.ones"
]
] |
mikeireland/chronostar | [
"fcf37614e1d145f3a5e265e54512bf8cd98051a0",
"fcf37614e1d145f3a5e265e54512bf8cd98051a0",
"fcf37614e1d145f3a5e265e54512bf8cd98051a0",
"fcf37614e1d145f3a5e265e54512bf8cd98051a0",
"fcf37614e1d145f3a5e265e54512bf8cd98051a0"
] | [
"chronostar/tabletool.py",
"chronostar/naivefit-bak.py",
"chronostar/datatool.py",
"projects/scocen/cmd_black.py",
"projects/scocen/cmd_age_sequence_AGIH_with_lithium.py"
] | [
"\"\"\"\ntabletool.py\n\nA bunch of functions that help handle stellar data stored as\nastropy table.\n\"\"\"\n\nimport numpy as np\nfrom astropy.table import Table\nfrom astropy.units.core import UnitConversionError\nimport string\n\nfrom . import coordinate\nfrom . import transform\n\ndef load(filename, **kwargs)... | [
[
"numpy.logical_not",
"numpy.einsum",
"numpy.triu_indices",
"numpy.isnan",
"numpy.eye",
"numpy.logical_or",
"numpy.array",
"numpy.where",
"numpy.diagonal",
"numpy.vstack"
],
[
"numpy.save",
"numpy.all",
"numpy.round",
"numpy.argmax",
"numpy.nanargmin"... |
Morisset/python-workshop | [
"ec8b0c4f08a24833e53a22f6b52566a08715c9d0"
] | [
"Day_2_Software_engineering_best_practices/solutions/04_modules/spectra_analysis/regression.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nSpectra analysis utilities for regression\n\n\n\"\"\"\n\nimport numpy as np\n\nfrom sklearn.decomposition import PCA\nfrom sklearn.ensemble import RandomForestRegressor\nfrom sklearn.linear_model import RidgeCV\nfrom sklearn.pipeline import make_pipeline\n\nfrom .plotting import pl... | [
[
"sklearn.ensemble.RandomForestRegressor",
"numpy.median",
"numpy.percentile",
"sklearn.linear_model.RidgeCV",
"sklearn.decomposition.PCA"
]
] |
YukiHata-ITS/uda_c3_3D_Object_Detection | [
"f831f7098e0c37586199b1ef355f5880e4d6ee16"
] | [
"student/objdet_detect.py"
] | [
"# ---------------------------------------------------------------------\n# Project \"Track 3D-Objects Over Time\"\n# Copyright (C) 2020, Dr. Antje Muntzinger / Dr. Andreas Haja.\n#\n# Purpose of this file : Detect 3D objects in lidar point clouds using deep learning\n#\n# You should have received a copy of the Uda... | [
[
"numpy.arctan2",
"torch.no_grad",
"torch.load"
]
] |
joesingo/tom_education | [
"9bf9ea3d465f83040e4618ce89efbab2a087b2fa"
] | [
"tom_education/tests.py"
] | [
"from datetime import datetime\nfrom io import BytesIO, StringIO\nimport json\nimport os\nfrom unittest.mock import patch\nimport tempfile\n\nfrom astropy.io import fits\nfrom django import forms\nfrom django.core import mail\nfrom django.core.exceptions import ValidationError\nfrom django.core.files.uploadedfile i... | [
[
"numpy.linspace",
"numpy.full",
"numpy.ones",
"numpy.max",
"numpy.array"
]
] |
kevinyang8/deep-learning-models | [
"271ddfa106c99bc131023e8e159c1b8cc903fe0e",
"271ddfa106c99bc131023e8e159c1b8cc903fe0e",
"271ddfa106c99bc131023e8e159c1b8cc903fe0e"
] | [
"models/vision/detection/awsdet/models/bbox_heads/cascade_head.py",
"models/vision/classification/resnet.py",
"models/vision/detection/awsdet/models/anchor_heads/rpn_head.py"
] | [
"from .. import builder\nfrom ..registry import HEADS\nfrom awsdet.core.bbox import bbox_target, transforms\nfrom awsdet.models.losses import losses\nimport tensorflow as tf\n\n\n\n@HEADS.register_module\nclass CascadeHead(tf.keras.Model): \n def __init__(self, \n num_stages=3,\n ... | [
[
"tensorflow.split",
"tensorflow.function",
"tensorflow.shape"
],
[
"tensorflow.keras.initializers.TruncatedNormal",
"tensorflow.keras.regularizers.l2",
"numpy.zeros",
"tensorflow.keras.Model"
],
[
"tensorflow.reduce_max",
"tensorflow.concat",
"tensorflow.keras.layer... |
sourabbapusridhar/master-thesis | [
"7ca0b36230dcab2e37a9501bcb519390d68b3b26"
] | [
"train.py"
] | [
"# Implementation of Training\n\nimport torch\nimport argparse\nimport numpy as np\nimport sys\nimport collections\nfrom trainer import Trainer\nimport model.loss as lossModule\nfrom utils import prepare_device\nimport model.metric as metricModule\nimport torch.nn.functional as F\nfrom parse_config import ConfigPar... | [
[
"torch.mean",
"torch.ones",
"numpy.random.seed",
"torch.autograd.set_detect_anomaly",
"torch.set_default_dtype",
"torch.manual_seed",
"torch.round",
"torch.sub",
"torch.cuda.is_available"
]
] |
SyrekGMR/Gradient-Descent-Optimisation | [
"a3b891108a8b4260d64eb8dfd7958fe686150dc6",
"a3b891108a8b4260d64eb8dfd7958fe686150dc6"
] | [
"Evaluate.py",
"Optimisers/KFAC.py"
] | [
"import torch\n\ndef evaluate(model, device, test_data_loader):\n model.eval()\n correct = 0\n total = 0\n\n with torch.no_grad():\n for images, labels in test_data_loader:\n images = images.to(device)\n labels = labels.to(device)\n\n output = model.forward(images... | [
[
"torch.sum",
"torch.no_grad",
"torch.max"
],
[
"torch.is_grad_enabled",
"torch.zeros_like",
"torch.symeig",
"torch.nn.functional.pad"
]
] |
TimoKuenstle/timeseries | [
"0e55710631f148c27c74b50dd7e960c7d4bf6601",
"0e55710631f148c27c74b50dd7e960c7d4bf6601"
] | [
"generate6.py",
"generate2.py"
] | [
"# -*- coding: utf-8 -*-\nimport sugartensor as tf\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport pandas as pd\n\n\n__author__ = 'njkim@jamonglab.com'\n\n\ntf.sg_verbosity(10)\n\n\n\nbatch_size = 100 \nnum_category = 10 \nnum_cont = 6 \nnum_dim = 30 \n\n\n\n\ntarget_num = tf.placeholder(dtype=t... | [
[
"numpy.linspace",
"numpy.arange",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.ones",
"pandas.DataFrame",
"matplotlib.pyplot.close",
"numpy.random.uniform",
"numpy.random.randint"
],
[
"numpy.linspace",
"numpy.arange",
"matplotlib.pyplot.sub... |
shoaibahmed/pl-cnn | [
"75f06630c755168771d049b7dbca300a21f27267",
"e41bb0c4e36907d33c2701d53d6fff0ac308d031"
] | [
"src/tests/svm.py",
"src/utils/visualization/lwsvm.py"
] | [
"import unittest\nimport theano\nimport theano.tensor as T\nimport numpy as np\n\nfrom layers.svm import SVMLayer\n\n\ndef compile_objective():\n\n scores = T.matrix()\n y_truth = T.ivector()\n\n objective, acc = SVMLayer.objective(scores, y_truth)\n\n return theano.function([scores, y_truth], [objectiv... | [
[
"numpy.random.normal",
"numpy.argmax",
"numpy.random.randint",
"numpy.isclose"
],
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.figure"
]
] |
isabella232/flax | [
"39a04e82d6f97ef90c59425599018f2b9df8b6ea"
] | [
"examples/wip/moco/train_moco.py"
] | [
"# Copyright 2020 The Flax 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 applicable law or a... | [
[
"tensorflow.config.experimental.set_visible_devices"
]
] |
georg-wenzel/ml-data-smell-detection | [
"7dddd401ca1f1a830dfd8b00760659911e5b1086",
"7dddd401ca1f1a830dfd8b00760659911e5b1086"
] | [
"WebApp/main/views_datasets.py",
"WebApp/main/utility/TensorflowUtility.py"
] | [
"from django.shortcuts import render, redirect\nfrom main.forms import AddDatasetForm, EditDatasetForm, DeleteDatasetForm, EditColumnFormSet\nfrom django.http import HttpResponseBadRequest\nfrom main.utility.DatabaseUtility import safe_get\nfrom main.utility import StringUtility\nfrom main.models import Dataset, Co... | [
[
"pandas.read_csv"
],
[
"tensorflow.keras.preprocessing.text.Tokenizer",
"pandas.read_csv",
"tensorflow.keras.losses.CategoricalCrossentropy",
"numpy.unique",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.callbacks.EarlyStopping",
"tensorflow.keras.utils.normalize",
"nu... |
thequilo/padertorch | [
"5e7ff6c2570739a0556d7c88bb93cd77017662a2",
"5e7ff6c2570739a0556d7c88bb93cd77017662a2",
"5e7ff6c2570739a0556d7c88bb93cd77017662a2"
] | [
"padertorch/contrib/je/models/vae.py",
"padertorch/modules/wavenet/wavenet.py",
"padertorch/testing/test_db.py"
] | [
"import numpy as np\nimport torch\nfrom einops import rearrange\nfrom padertorch.base import Model\nfrom padertorch.contrib.je.modules.conv import CNN1d, CNNTranspose1d\nfrom padertorch.contrib.je.modules.gmm import GMM\nfrom padertorch.contrib.je.modules.hmm import HMM\nfrom padertorch.contrib.je.modules.features ... | [
[
"torch.randn_like",
"numpy.maximum",
"torch.max",
"numpy.unique",
"torch.exp",
"sklearn.metrics.cluster.contingency_matrix",
"numpy.argmax",
"numpy.mean",
"torch.split",
"torch.ones_like"
],
[
"torch.nn.init.calculate_gain",
"torch.sigmoid",
"torch.cat",
... |
s1113950/models | [
"87261e70a902513f934413f009364c4f2eed6642",
"87261e70a902513f934413f009364c4f2eed6642"
] | [
"models/recommendation/tensorflow/wide_deep_large_ds/dataset/preprocess_csv_tfrecords.py",
"models/image_recognition/tensorflow/resnet50/int8/accuracy.py"
] | [
"#\n# -*- coding: utf-8 -*-\n#\n# Copyright (c) 2018 Intel 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# Unle... | [
[
"tensorflow.string_to_hash_bucket_fast",
"tensorflow.enable_eager_execution",
"pandas.read_csv",
"tensorflow.train.Example",
"tensorflow.python_io.TFRecordWriter",
"numpy.array"
],
[
"tensorflow.Graph",
"tensorflow.import_graph_def",
"tensorflow.constant",
"tensorflow.C... |
AmeerFaisalAdanan/Malaya | [
"706efa5e78e87f74981adebe9974b6df0324fe0a"
] | [
"malaya/_utils/_utils.py"
] | [
"from tqdm import tqdm\nimport tensorflow as tf\nimport sentencepiece as spm\nimport numpy as np\nimport requests\nimport os\nfrom pathlib import Path\nfrom .. import _delete_folder\nfrom tensorflow.contrib.seq2seq.python.ops import beam_search_ops\n\n\ndef sentencepiece_tokenizer_xlnet(path_tokenizer):\n sp_mod... | [
[
"tensorflow.Graph",
"tensorflow.import_graph_def",
"numpy.maximum",
"tensorflow.InteractiveSession",
"tensorflow.gfile.GFile",
"numpy.concatenate",
"tensorflow.GraphDef"
]
] |
vitalstarorg/docker-ml.py | [
"9d49739f0bf5806c2c44dc3b6f56fd0bfc4598d8"
] | [
"bin/sample1.py"
] | [
"#!/usr/bin/env python3\n\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n# Data for plotting\nt = np.arange(0.0, 2.0, 0.01)\ns = 1 + np.sin(2 * np.pi * t)\n\nfig, ax = plt.subplots()\nax.plot(t, s)\n\nax.set(xlabel='time (s)', ylabel='voltage (mV)',\n title='About as simple as it g... | [
[
"numpy.arange",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots",
"numpy.sin"
]
] |
thu-pacman/AIPerf-MoE | [
"fda4f381b4b974721b187cece968dd7bc96a81f4",
"fda4f381b4b974721b187cece968dd7bc96a81f4"
] | [
"megatron/model/multiple_choice.py",
"megatron/global_vars.py"
] | [
"# coding=utf-8\n# Copyright (c) 2020, NVIDIA CORPORATION. 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... | [
[
"torch.nn.Dropout"
],
[
"torch.cuda.synchronize",
"torch.distributed.is_initialized",
"torch.utils.tensorboard.SummaryWriter",
"torch.distributed.get_rank",
"torch.distributed.get_world_size"
]
] |
wogong/pytorch-adda | [
"56ed179ced25fda3082b592e7f1751f4a62ac489"
] | [
"core/pretrain.py"
] | [
"\"\"\"Pre-train encoder and classifier for source dataset.\"\"\"\n\nimport torch.nn as nn\nimport torch.optim as optim\n\nfrom utils import make_variable, save_model\nfrom .test import eval\n\ndef train_src(encoder, classifier, src_data_loader, tgt_data_loader, params):\n \"\"\"Train classifier for source domai... | [
[
"torch.nn.CrossEntropyLoss"
]
] |
fanmeilin/MOST_segmentation | [
"31d6bd6d77ae5c3dff6aefb9adfc23ea08072ae9"
] | [
"utils.py"
] | [
"import os\nimport cv2\nimport pickle\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nimport tensorflow as tf\nfrom tensorflow.python.framework import ops\nfrom tensorflow.python.ops import array_ops\nfrom tensorflow.python.ops import math_ops\n\n# 注意权重设置能够保证至少过半样本被认为是正确样本\ndef sample_weights_boosted(y_pred... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.imshow",
"numpy.dot",
"numpy.squeeze",
"tensorflow.python.framework.ops.convert_to_tensor_v2",
"tensorflow.cast",
"matplotlib.pyplot.plot",
"numpy.mean",
"numpy.where",
"numpy.ceil",
"matplotlib.pyplot.subplot",
"numpy.... |
CCS-Lab/pytorch_car_caring | [
"8a36d3f689e42afa81c753b4cfa0b890ab8e1000"
] | [
"src/models/dqn_linear.py"
] | [
"import torch.nn as nn\nimport torch.nn.functional as F\n\n\nclass DQNLinear(nn.Module):\n \"\"\"\n A feedforward, non-convolutional network.\n There is nothing about this architecture which is specific to Deep-q-learning - in fact,\n the algorithm's performance should be fairly robust to the number and... | [
[
"torch.nn.Linear"
]
] |
vermashresth/chainer-compiler | [
"5f5ad365d14398d6ae0214fa012eb10360db8e7e",
"5f5ad365d14398d6ae0214fa012eb10360db8e7e",
"5f5ad365d14398d6ae0214fa012eb10360db8e7e"
] | [
"testcases/ch2o_tests/node/EmbedID.py",
"testcases/ch2o_tests/model/seq2seq.py",
"testcases/elichika_tests/syntax/UserDefinedFunc.py"
] | [
"# coding: utf-8\n\nimport chainer\nimport chainer.links as L\n\n# Network definition\n\n\nclass A(chainer.Chain):\n\n def __init__(self, n_vocab, n_out):\n super(A, self).__init__()\n with self.init_scope():\n self.l1 = L.EmbedID(n_vocab, n_out)\n\n def forward(self, x):\n ret... | [
[
"numpy.random.seed",
"numpy.random.randint"
],
[
"numpy.random.rand",
"numpy.cumsum",
"numpy.random.seed"
],
[
"numpy.random.rand"
]
] |
sylvanding/detect-financial-risk | [
"dd2a143bb3c3a0fe943261954f3d836bbee08983"
] | [
"website/model_pred.py"
] | [
"# -*- coding: utf-8 -*-\nimport warnings\nwarnings.simplefilter(action='ignore', category=Warning)\nimport numpy as np\nfrom tensorflow.keras.models import load_model\n\n\ndef predictFinRisk(fin_ind):\n \"\"\"\n Predict a company's financial risk according to its indexes.\n :param fin_ind: financi... | [
[
"numpy.asarray",
"tensorflow.keras.models.load_model",
"numpy.loadtxt"
]
] |
Florian-Barthel/stylegan2 | [
"4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8",
"4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8",
"4ef87038bf9370596cf2b729e1d1a1bc3ebcddd8"
] | [
"dnnlib/tflib/ops/fused_bias_act.py",
"sandbox/unit_circle_animation/unit_circle_multiple.py",
"3_rotation_experiments/05_new_label/classifier/confusion_matrix.py"
] | [
"# Copyright (c) 2019, NVIDIA Corporation. All rights reserved.\n#\n# This work is made available under the Nvidia Source Code License-NC.\n# To view a copy of this license, visit\n# https://nvlabs.github.io/stylegan2/license.html\n\n\"\"\"Custom TensorFlow ops for efficient bias and activation.\"\"\"\n\nimport os\... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.nn.relu",
"tensorflow.nn.elu",
"tensorflow.constant",
"numpy.sqrt",
"tensorflow.nn.sigmoid",
"tensorflow.nn.softmax",
"tensorflow.nn.tanh",
"tensorflow.nn.selu",
"tensorflow.nn.softplus",
"tensorflow.nn.leaky_relu"
],
[
... |
spatialaudio/aes148-shelving-filter | [
"a11de97d6be79c23ffc55084ca95d9da15f3e3eb"
] | [
"python/mkfig-ripple-and-zp-frequency.py"
] | [
"\"\"\"Shelving Filter Cascade with Adjustable Transition Slope and Bandwidth\nFrank Schultz, Nara Hahn, Sascha Spors\nIn: Proc. of 148th AES Convention, Virtual Vienna, May 2020, Paper 10339\nhttp://www.aes.org/e-lib/browse.cfm?elib=20756\n\nFig. 4c, slide 10/12\n\n\"\"\"\n\nimport numpy as np\nimport matplotlib.p... | [
[
"matplotlib.ticker.MultipleLocator",
"numpy.log2",
"scipy.signal.sos2zpk",
"numpy.sqrt",
"numpy.abs",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"numpy.ones",
"numpy.log10",
"matplotlib.cm.get_cmap"
]
] |
threexc/SiGPyC | [
"81bdf2b691c601e266b2ea0249ad0bad074a567a",
"81bdf2b691c601e266b2ea0249ad0bad074a567a"
] | [
"ants/analyzer.py",
"ants/AutoCal.py"
] | [
"import math\nimport os\nimport re\nimport sys\nfrom textwrap import dedent\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nclass IQSamplesFile():\n def __init__(self, iq_samples_file_name, sample_rate = 20e6, noise_threshold = 0.02):\n match = re.search(\"iqsamples_(video|voice... | [
[
"matplotlib.pyplot.legend",
"numpy.sqrt",
"numpy.linspace",
"numpy.asarray",
"numpy.concatenate",
"numpy.max",
"numpy.mean",
"numpy.exp",
"numpy.where",
"numpy.arange",
"numpy.diff",
"matplotlib.pyplot.close",
"numpy.count_nonzero",
"numpy.zeros",
"matpl... |
esnmrdi/phd | [
"2eede68a52e3e9c5931cad55dc6989c14f2e5d5b"
] | [
"model-ensemble-lookback.py"
] | [
"# %%\n# Ensemble Forecasting of RNN Models Trained for Lookbacks Ranging from 1 to 6\n# Ehsan Moradi, Ph.D. Candidate\n\n# %%\n# Import required libraries\nimport pandas as pd\nimport numpy as np\nimport csv\nfrom scipy.stats.mstats import trimmed_mean, winsorize\nfrom sklearn.ensemble import (\n GradientBoosti... | [
[
"sklearn.ensemble.RandomForestRegressor",
"pandas.read_excel",
"sklearn.tree.DecisionTreeRegressor",
"sklearn.model_selection.train_test_split",
"pandas.DataFrame",
"sklearn.ensemble.GradientBoostingRegressor",
"sklearn.svm.SVR",
"sklearn.linear_model.Ridge",
"sklearn.linear_mo... |
GateBuilder/Qcodes | [
"b3729f188847f9a7db77f23f8c1b3a2a635a2ac2"
] | [
"qcodes/instrument_drivers/stanford_research/SR830.py"
] | [
"from functools import partial\nimport numpy as np\n\nfrom qcodes import VisaInstrument\nfrom qcodes.instrument.parameter import ArrayParameter\nfrom qcodes.utils.validators import Numbers, Ints, Enum, Strings\n\nfrom typing import Tuple\n\n\nclass ChannelBuffer(ArrayParameter):\n \"\"\"\n Parameter class for... | [
[
"numpy.arange",
"numpy.fromstring",
"numpy.linspace"
]
] |
IINemo/libact | [
"f9ddedcc009bfc70beeb04c9018b22eeaeafb155"
] | [
"libact/query_strategies/uncertainty_sampling.py"
] | [
"\"\"\" Uncertainty Sampling\n\nThis module contains a class that implements two of the most well-known\nuncertainty sampling query strategies: the least confidence method and the\nsmallest margin method (margin sampling).\n\n\"\"\"\nimport numpy as np\n\nfrom libact.base.interfaces import QueryStrategy, Continuous... | [
[
"numpy.partition",
"numpy.log",
"numpy.abs",
"numpy.max",
"numpy.argmax",
"numpy.shape"
]
] |
tagny/iLID | [
"38f5dcae0dc84fd9b78e170748aa38cd8f524c70"
] | [
"web-server/server.py"
] | [
"# System imports\nimport sys, subprocess, time\nimport numpy as np\nfrom os import path\nfrom flask.ext.cors import CORS\nfrom flask import *\nfrom flask.json import jsonify\nfrom werkzeug import secure_filename\nfrom flask_extensions import *\n\nlib_path = os.path.abspath(os.path.join('../evaluation'))\nsys.path.... | [
[
"numpy.mean"
]
] |
heavengate/models | [
"f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7",
"f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7",
"f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7",
"f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7",
"f05c910f8a8e3105de8c2f1d81e83ca00d2c7ec7"
] | [
"PaddleCV/PaddleVideo/utils/train_utils.py",
"PaddleRec/gnn/train.py",
"PaddleCV/PaddleDetection/ppdet/data/tools/x2coco.py",
"PaddleSpeech/DeepVoice3/deepvoice3_paddle/conv.py",
"PaddleSpeech/DeepVoice3/deepvoice3_paddle/modules.py"
] | [
"# Copyright (c) 2018 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 ... | [
[
"numpy.array",
"numpy.mean"
],
[
"numpy.arange",
"numpy.mean"
],
[
"numpy.min",
"numpy.asarray",
"numpy.argwhere",
"numpy.max",
"numpy.array",
"numpy.zeros"
],
[
"numpy.arange",
"numpy.prod"
],
[
"numpy.sqrt",
"numpy.power",
"numpy.arange... |
Aiden-Jeon/pytorch-lightning | [
"963c26764682fa4cf64c93c5a7572ae0040e9c32",
"963c26764682fa4cf64c93c5a7572ae0040e9c32",
"963c26764682fa4cf64c93c5a7572ae0040e9c32"
] | [
"tests/callbacks/test_early_stopping.py",
"pytorch_lightning/utilities/distributed.py",
"pytorch_lightning/utilities/memory.py"
] | [
"# Copyright The PyTorch Lightning team.\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... | [
[
"torch.tensor",
"numpy.mean",
"numpy.diff",
"torch.load"
],
[
"torch.cat",
"torch.distributed.all_gather",
"torch.zeros_like",
"torch.distributed.is_initialized",
"torch.distributed.barrier",
"torch.distributed.is_available",
"torch.no_grad",
"torch.stack",
... |
beppeben/wavebet | [
"74e1019b78139018c44c5993c1318db237ea8e60"
] | [
"train.py"
] | [
"\"\"\"Training script for the WaveNet network on the VCTK corpus.\n\nThis script trains a network with the WaveNet using data from the VCTK corpus,\nwhich can be freely downloaded at the following site (~10 GB):\nhttp://homepages.inf.ed.ac.uk/jyamagis/page3/page58/page58.html\n\"\"\"\n\nfrom __future__ import prin... | [
[
"tensorflow.train.get_checkpoint_state",
"tensorflow.summary.FileWriter",
"tensorflow.train.start_queue_runners",
"tensorflow.RunMetadata",
"tensorflow.train.Coordinator",
"tensorflow.RunOptions",
"tensorflow.placeholder",
"tensorflow.ConfigProto",
"tensorflow.global_variables_... |
AlexJew/CityEnergyAnalyst | [
"6eb372c79e5100a2d0abce78561ae368fb409cd1",
"6eb372c79e5100a2d0abce78561ae368fb409cd1"
] | [
"legacy/4D_plots_ArcGIS/radiation_total.py",
"cea/demand/airconditioning_model.py"
] | [
"\"\"\"\nTotal radiation calculator from the insolation files\n\"\"\"\nfrom __future__ import division\nimport pandas as pd\nfrom cea.utilities import dbf\nimport cea.inputlocator\nimport cea.config\nfrom cea.utilities import epwreader\nfrom cea.constants import HOURS_IN_YEAR\n\n\n__author__ = \"Sreepathi Bhargava ... | [
[
"pandas.DataFrame",
"pandas.date_range"
],
[
"numpy.max",
"numpy.min"
]
] |
goshdarngames/Autumn-CA | [
"85bd1db5aa08882a01d6954e085b76e316ac5712"
] | [
"autumn_ca/benchmark.py"
] | [
"import numpy as np\r\n\r\nfrom lib.simulation import Simulation\r\n\r\nfrom lib.rule_function import conway_rule\r\n\r\nfrom Conway.lib.neighbourhood import moore_neighbourhood\r\n\r\n\r\nSIMULATION_SIZE = (100,100)\r\nNUMBER_OF_STEPS = 2 \r\n\r\nsim = Simulation( SIMULATION_SIZE, conway_rule) \r\n \r\... | [
[
"numpy.zeros"
]
] |
joll05/AdventOfCode2019 | [
"faa61058dd048dfc039889eaa4bd361d34b9dc7b",
"faa61058dd048dfc039889eaa4bd361d34b9dc7b"
] | [
"Day 3/solution1.py",
"Day 11/solution1.py"
] | [
"import numpy as np\n\ndef manhattan(x, y):\n return abs(x) + abs(y)\n\nf = open(\"input.txt\")\n\nwires = f.readlines()\nwires[0] = wires[0].split(\",\")\nwires[1] = wires[1].split(\",\")\n\nmax = int(input(\"Max: \"))\n\ncrossedPositions = np.zeros((max, max), dtype=bool)\n\nclosestCrossing = [999999, 999999]\... | [
[
"numpy.zeros"
],
[
"numpy.full"
]
] |
oicr-gsi/dashi | [
"34bf96a7d447095df525df3ad27dbe10f4e3dde0"
] | [
"application/dash_application/views/rnaseqc.py"
] | [
"import dash_html_components as html\nimport dash_core_components as core\nfrom dash.dependencies import Input, Output\nfrom ..dash_id import init_ids\nimport pandas\nimport gsiqcetl.load\nfrom gsiqcetl.rnaseqqc.constants import CacheSchema\nfrom gsiqcetl.pinery.sampleprovenance.constants import (\n CacheSchema ... | [
[
"pandas.to_datetime"
]
] |
skphy/autodE | [
"fd80995206ac601299d2f78105d0fe4deee8c2cf"
] | [
"tests/test_values.py"
] | [
"import numpy as np\nfrom autode.units import ang, ha, ha_per_ang, ha_per_a0, ev\nfrom autode.values import (ValueArray, Gradient, Coordinate, Coordinates,\n MomentOfInertia)\n\n\nclass TmpValues(ValueArray):\n\n implemented_units = [ha, ev]\n\n def __repr__(self):\n return ''... | [
[
"numpy.arange",
"numpy.array",
"numpy.zeros"
]
] |
zmoon92/proplot | [
"2c6f7af8a044567bb9409d3f67d844bac05c7d14"
] | [
"proplot/axes/plot.py"
] | [
"#!/usr/bin/env python3\n\"\"\"\nThe plotting wrappers that add functionality to various `~matplotlib.axes.Axes`\nmethods. \"Wrapped\" `~matplotlib.axes.Axes` methods accept the additional keyword\narguments documented by the wrapper function. In a future version, these features will\nbe documented on the individua... | [
[
"matplotlib.patheffects.Normal",
"matplotlib.transforms.Bbox",
"numpy.linspace",
"numpy.asarray",
"numpy.issubdtype",
"matplotlib.ticker.SymmetricalLogLocator",
"numpy.concatenate",
"numpy.max",
"matplotlib.legend._parse_legend_args",
"numpy.mean",
"matplotlib.legend.Le... |
hotosm/ml-enabler-cli | [
"287d929fb0cf5be41100bdff41261ef99ded0ceb"
] | [
"ml_enabler/utils/osm.py"
] | [
"from area import area\nfrom geopy.distance import great_circle\nimport json\nimport numpy as np\nimport os\nimport subprocess\nimport tempfile\n\n\ndef get_osm(aoi):\n # convert AOI to bounding box\n pass\n\n\nclass OSMData(object):\n\n def __init__(self, aoi, overpass_url='https://lz4.overpass-api.de/api... | [
[
"numpy.array"
]
] |
nalkhish/MachineLearning | [
"591c9e351f9f02fbcf6921dd84b679a45de2c66c"
] | [
"Coursera/costs.py"
] | [
"import numpy as np\n\n\ndef regularization_cost(kwargs):\n thetas = kwargs.get('thetas', np.array([0]))\n return kwargs.get('reg_p', 0) * thetas.T.dot(thetas)\n\ndef regularization_cost_2(thetas, kwargs):\n return kwargs.get('reg_p', 0) * thetas.T.dot(thetas)\n\ndef calc_cost_linear(m, **kwargs):\n return kwar... | [
[
"numpy.log",
"numpy.array"
]
] |
asongtoruin/album_plots | [
"639ca31379f10364dc0a628889419e9a4fcaa9a2"
] | [
"draw.py"
] | [
"import argparse\nfrom pathlib import Path\nfrom textwrap import wrap\n\nimport matplotlib.patheffects as pe\nimport matplotlib.pyplot as plt\nimport palbums\nimport pandas as pd\nfrom PIL import Image\nimport seaborn as sns\nimport spotipy\nfrom spotipy.oauth2 import SpotifyClientCredentials\nimport yaml\n\nimport... | [
[
"matplotlib.patheffects.Normal",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.imread",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.savefig",
"matplotlib.patheffects.withSimplePatchShadow",
"matplotlib.pyplot.style.use"
]
] |
seyfullah/stockprediction | [
"aab0547cc1316a116ad032137722b73a36e67a51"
] | [
"experiments/2.py"
] | [
"import torch\nimport matplotlib.pyplot as plt\nfrom bindsnet.network import Network\nfrom bindsnet.network.nodes import Input, LIFNodes\nfrom bindsnet.network.topology import Connection\nfrom bindsnet.network.monitors import Monitor\nfrom bindsnet.analysis.plotting import plot_spikes, plot_voltages\n\n# Simulation... | [
[
"torch.ones",
"torch.randn",
"torch.eye",
"matplotlib.pyplot.ioff",
"matplotlib.pyplot.show"
]
] |
karolciba/playground | [
"bfba14eaacfb6e7f820b85f95d9a1a72e251489e"
] | [
"ecg/ecg_hmm.py"
] | [
"#!/usr/bin/env python\n#\n# changes to hmmlearn:\n# 0. negative delta doesnt end \n# 1. prevent overfitting by not allowing for setting transition prob to 0\n\n# ideas:\n# 0. negative delta in logprobability is not wrong - it means model is rebuilding\n# lower train signal probability is exchange for better dis... | [
[
"sklearn.externals.joblib.dump",
"matplotlib.pyplot.imshow",
"numpy.cumsum",
"matplotlib.pyplot.plot",
"numpy.concatenate",
"sklearn.externals.joblib.load",
"numpy.empty_like",
"matplotlib.pyplot.subplot",
"numpy.diff",
"numpy.argmax",
"scipy.signal.decimate",
"nump... |
prajakta0111/pytorch-lightning | [
"3df02b880a6d145ff0aca24ea429c12c0d8f1181",
"3df02b880a6d145ff0aca24ea429c12c0d8f1181",
"3df02b880a6d145ff0aca24ea429c12c0d8f1181",
"3df02b880a6d145ff0aca24ea429c12c0d8f1181"
] | [
"tests/metrics/regression/test_ssim.py",
"pytorch_lightning/metrics/functional/roc.py",
"tests/metrics/functional/test_reduction.py",
"tests/accelerators/test_tpu_backend.py"
] | [
"from collections import namedtuple\nfrom functools import partial\n\nimport pytest\nimport torch\nfrom skimage.metrics import structural_similarity\n\nfrom pytorch_lightning.metrics.functional import ssim\nfrom pytorch_lightning.metrics.regression import SSIM\nfrom tests.metrics.utils import BATCH_SIZE, MetricTest... | [
[
"torch.manual_seed",
"torch.rand"
],
[
"torch.zeros",
"torch.cat"
],
[
"torch.mean",
"torch.sum",
"torch.rand",
"torch.randint"
],
[
"torch.device",
"torch.nn.Linear",
"torch.load"
]
] |
rehohoho/models | [
"3577bc5959d7e2a3513ff1c5ec8b42c4f5bedca8",
"3577bc5959d7e2a3513ff1c5ec8b42c4f5bedca8"
] | [
"official/vision/beta/ops/yolo_ops.py",
"official/vision/beta/data/create_classification_tf_record.py"
] | [
"\"\"\"Utility ops for yolo data.\nReferenced from https://github.com/hunglc007/tensorflow-yolov4-tflite.\n\"\"\"\n\nfrom typing import List, Tuple, Mapping\n\nimport tensorflow as tf\nimport tensorflow_addons as tfa\n\n\ndef resize_image_and_bboxes(image: tf.Tensor, \n bboxes: tf.Tensor,... | [
[
"tensorflow.convert_to_tensor",
"tensorflow.concat",
"tensorflow.zeros",
"tensorflow.stack",
"tensorflow.tensor_scatter_nd_add",
"tensorflow.minimum",
"tensorflow.cast",
"tensorflow.image.pad_to_bounding_box",
"tensorflow.tensor_scatter_nd_update",
"tensorflow.boolean_mask"... |
pranjalg96/Stylized-Image-captioning | [
"e95111f36e3eed83478c990fdd70c5b9604bf57a"
] | [
"FLICKR/model_flickr.py"
] | [
"import numpy as np\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom itertools import chain\n\n\nclass RNN_VAE(nn.Module):\n \"\"\"\n 1. Hu, Zhiting, et al. \"Toward controlled generation of text.\" ICML. 2017.\n 2. Bowman, Samuel R., et al. \... | [
[
"torch.LongTensor",
"torch.nn.Dropout",
"torch.nn.functional.softmax",
"torch.zeros",
"torch.nn.LSTM",
"torch.cat",
"torch.nn.ModuleList",
"torch.nn.Conv2d",
"torch.randn",
"torch.nn.Embedding",
"torch.multinomial",
"torch.exp",
"torch.nn.Linear",
"numpy.ran... |
igorss77/diabetes_project | [
"0353ec812989c90c43a61b6aee4e02f943c51944"
] | [
"data_preparation.py"
] | [
"import pandas as pd\nimport logging\nfrom sklearn.feature_selection import SelectKBest, chi2\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.model_selection import GridSearchCV\nimport pickle\nfrom sklearn.metrics import classification_report\n\n\nlogger = logging.getLogger(__name__)\n\ndef colu... | [
[
"pandas.Series",
"sklearn.ensemble.RandomForestClassifier",
"pandas.DataFrame",
"sklearn.feature_selection.SelectKBest",
"sklearn.metrics.classification_report",
"pandas.get_dummies"
]
] |
aneeshnaik/spam | [
"f66212bf77d72c8528c1a0d6cbe814cd360794c7",
"f66212bf77d72c8528c1a0d6cbe814cd360794c7"
] | [
"fit/likelihood.py",
"data/fit_stellar_bulge.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated: 2018\nAuthor: A. P. Naik\nDescription: File containing likelihood function 'lnlike', to be fed to\nemcee sampler.\n\"\"\"\nimport numpy as np\nfrom .rotcurve import v_model\n\n\ndef lnlike(theta, theta_dict, galaxy, **kwargs):\n \"\"\"\n For g... | [
[
"numpy.log",
"numpy.sum",
"numpy.sqrt"
],
[
"scipy.optimize.curve_fit",
"numpy.sqrt",
"numpy.power"
]
] |
3vivekb/hail | [
"82c9e0f3ec2154335f91f2219b84c0fb5dbac526"
] | [
"hail/python/hail/expr/types.py"
] | [
"import abc\nimport json\nimport math\nfrom collections.abc import Mapping, Sequence\n\nimport numpy as np\n\nimport hail as hl\nfrom hail import genetics\nfrom hail.expr.nat import NatBase, NatLiteral\nfrom hail.expr.type_parsing import type_grammar, type_node_visitor\nfrom hail.genetics.reference_genome import re... | [
[
"numpy.array",
"numpy.nditer"
]
] |
YaoYinYing/OpenFold2 | [
"57fd3cfba0bc70a2ca4c6943ba00e1c4892c1945",
"57fd3cfba0bc70a2ca4c6943ba00e1c4892c1945",
"57fd3cfba0bc70a2ca4c6943ba00e1c4892c1945"
] | [
"alphafold/Tests/utils.py",
"inspect_sample.py",
"alphafold/Model/Opt/mapping.py"
] | [
"import torch\nimport numpy as np\nfrom pathlib import Path\nimport pickle\n\nfrom pytorch_memlab import MemReporter\nfrom pytorch_memlab.utils import readable_size as mem_to_str\nreporter = MemReporter()\n\n\ndef convert(arg, device:torch.device=None):\n\tif isinstance(arg, tuple):\n\t\treturn tuple([convert(arg_i... | [
[
"torch.mean",
"torch.max",
"torch.Tensor",
"torch.from_numpy",
"numpy.mean",
"torch.device",
"numpy.sum"
],
[
"torch.isnan"
],
[
"torch.chunk",
"torch.nn.functional.pad"
]
] |
AWSjswinney/LightGBM | [
"abdb234f7051b15d486902f2bda93eb5a2221e06"
] | [
"tests/python_package_test/test_engine.py"
] | [
"# coding: utf-8\nimport copy\nimport itertools\nimport math\nimport pickle\nimport platform\nimport random\nfrom pathlib import Path\n\nimport numpy as np\nimport psutil\nimport pytest\nfrom scipy.sparse import csr_matrix, isspmatrix_csc, isspmatrix_csr\nfrom sklearn.datasets import load_svmlight_file, make_multil... | [
[
"sklearn.metrics.roc_auc_score",
"numpy.linspace",
"sklearn.metrics.mean_squared_error",
"numpy.all",
"numpy.concatenate",
"numpy.max",
"numpy.mean",
"numpy.zeros_like",
"scipy.sparse.isspmatrix_csc",
"numpy.partition",
"numpy.testing.assert_equal",
"numpy.allclose"... |
eo1989/VectorBTanalysis | [
"bea3deaf2ee3fc114b308146f2af3e4f35f70197",
"bea3deaf2ee3fc114b308146f2af3e4f35f70197",
"3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9",
"bea3deaf2ee3fc114b308146f2af3e4f35f70197",
"bea3deaf2ee3fc114b308146f2af3e4f35f70197",
"bea3deaf2ee3fc114b308146f2af3e4f35f70197"
] | [
".venv/lib/python3.8/site-packages/pypfopt/efficient_frontier.py",
".venv/lib/python3.8/site-packages/pandas_datareader/compat/__init__.py",
".venv/lib/python3.8/site-packages/dill/tests/test_source.py",
".venv/lib/python3.8/site-packages/vectorbt/utils/array.py",
".venv/lib/python3.8/site-packages/findatap... | [
"\"\"\"\nThe ``efficient_frontier`` module houses the EfficientFrontier class, which\ngenerates optimal portfolios for various possible objective functions and parameters.\n\"\"\"\n\nimport warnings\nimport numpy as np\nimport pandas as pd\nimport cvxpy as cp\n\nfrom . import objective_functions, base_optimizer\n\n... | [
[
"numpy.linalg.inv",
"numpy.array",
"numpy.any"
],
[
"pandas.concat",
"pandas.io.common.get_filepath_or_buffer"
],
[
"numpy.array"
],
[
"numpy.all"
],
[
"pandas.Timestamp"
],
[
"numpy.array_equal",
"numpy.unique",
"numpy.asarray",
"numpy.issubdtyp... |
gngdb/smplx | [
"ba72def2038712784458a91f94371de6550d7e65"
] | [
"transfer_model/merge_output.py"
] | [
"# merges the output of the main transfer_model script\n\nimport torch\nfrom pathlib import Path\nimport pickle\nfrom scipy.spatial.transform import Rotation as R\n\nKEYS = [\n\"transl\",\n\"global_orient\",\n\"body_pose\",\n\"betas\",\n\"left_hand_pose\",\n\"right_hand_pose\",\n\"jaw_pose\",\n\"leye_pose\",\n\"rey... | [
[
"torch.cat"
]
] |
kolojoe/scipy | [
"3b4a30cbf580a1ea07bf48abf4bbea708b2018dd"
] | [
"scipy/stats/tests/test_distributions.py"
] | [
"\"\"\"\nTest functions for stats module\n\"\"\"\n\nimport warnings\nimport re\nimport sys\nimport pickle\nimport os\n\nfrom numpy.testing import (assert_equal, assert_array_equal,\n assert_almost_equal, assert_array_almost_equal,\n assert_allclose, assert_, asser... | [
[
"scipy.stats.erlang.pdf",
"scipy.stats.weibull_max.logsf",
"scipy.stats.uniform.fit",
"scipy.stats.norm.fit",
"scipy.stats.nbinom.logpmf",
"scipy.stats.logser.rvs",
"scipy.stats.chi2.ppf",
"scipy.stats.lognorm.stats",
"scipy.stats.levy_stable._fitstart",
"scipy.stats.weibul... |
zlpmichelle/crackingtensorflow | [
"66c3517b60c3793ef06f904e5d58e4d044628182"
] | [
"crackingcode/day4/cc_tf_day4_1.py"
] | [
"\n# coding: utf-8\n\n# In[1]:\n\n\nimport tensorflow as tf\n\n\n# In[2]:\n\n\nnode1 = tf.constant(3.0, tf.float32)\nnode2 = tf.constant(4.0) # also tf.float32 implicity\nprint(node1, node2)\n\n\n# In[3]:\n\n\nsess = tf.Session()\nprint(sess.run([node1, node2]))\n\n\n# In[5]:\n\n\nnode3 = tf.add(node1, node2)\nprin... | [
[
"tensorflow.get_variable",
"tensorflow.reduce_sum",
"tensorflow.assign_add",
"tensorflow.Variable",
"tensorflow.train.get_global_step",
"tensorflow.contrib.learn.LinearRegressor",
"tensorflow.add",
"tensorflow.Session",
"tensorflow.square",
"tensorflow.placeholder",
"te... |
iro-upgto/cime | [
"1e71927f8dc029d5968f63a1c86991eca1456dd0"
] | [
"cime/_experimental.py"
] | [
"from sympy import *\nfrom sympy.matrices import *\nfrom sympy.physics.mechanics import dynamicsymbols, init_vprinting\nimport matplotlib.pyplot as plt\ninit_vprinting()\n\ndef kinvars(*args,**kwargs):\n return dynamicsymbols(*args,**kwargs)\n\nclass Vector2D(object):\n def __init__(self,*args,**kwargs):\n ... | [
[
"matplotlib.pyplot.plot"
]
] |
ElgaSalvadore/watools | [
"daaaad474add572f32dd6a45a4230ccf636c479a",
"daaaad474add572f32dd6a45a4230ccf636c479a"
] | [
"Collect/RFE/DataAccess.py",
"General/data_conversions.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nAuthors: Tim Hessels\n UNESCO-IHE 2016\nContact: t.hessels@unesco-ihe.org\nRepository: https://github.com/wateraccounting/wa\nModule: Collect/RFE\n\"\"\"\nfrom __future__ import print_function\n\nimport numpy as np\nimport os\nimport pandas as pd\nfrom ftplib import FTP\nfr... | [
[
"numpy.min",
"numpy.max",
"numpy.ceil",
"numpy.floor",
"pandas.date_range",
"pandas.Timestamp"
],
[
"numpy.isnan",
"numpy.arange",
"numpy.indices",
"numpy.ones",
"numpy.argwhere",
"numpy.shape",
"pandas.date_range",
"numpy.float"
]
] |
Tomwmg/player-detection | [
"a5212bf80353a3b56c92f64bc07562161fa386f3"
] | [
"train.py"
] | [
"# general packages\nimport numpy as np\nimport random\nimport os\nimport errno\nimport argparse\nimport torch\nfrom torch.utils import model_zoo\nfrom torch.autograd import Variable\nfrom torch.optim import lr_scheduler\n\nfrom data_loader import YC2_train_data\nfrom model import DVSA\nfrom datetime import datetim... | [
[
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.utils.data.DataLoader",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"torch.autograd.Variable"
]
] |
robfatland/nlp | [
"f4cab048d21a4c63726d19c1d453f1d68b2589a0"
] | [
"austen-kmeans.py"
] | [
"from collections import Counter\r\nfrom collections import defaultdict\r\nimport glob, os\r\nimport pandas as pd\r\nfrom sklearn.cluster import KMeans\r\nfrom sklearn.decomposition import PCA\r\nimport matplotlib.pyplot as plt \r\n\r\n\r\n\r\n'''\r\nThe 'austen_alcott' folder contains a set of novels by Jane Auste... | [
[
"matplotlib.pyplot.scatter",
"matplotlib.pyplot.title",
"sklearn.cluster.KMeans",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.savefig",
"pandas.DataFrame",
"matplotlib.pyplot.arrow",
"matplotlib.pyplot.xlabel",
"matplotlib.pyplot.text",
"matplotlib.pyplot.show",
"skl... |
dadu0699/tytus | [
"e1920f6932c840859e3e79eb8756a1d3da88bd77"
] | [
"bases_2021_1S/Grupo 10/server/utilities/analisys_parser/analizer/statement/instructions/select/from_.py"
] | [
"from utilities.analisys_parser.analizer.reports import Nodo\nfrom utilities.analisys_parser.analizer.abstract import instruction\nfrom utilities.analisys_parser.analizer.statement.instructions.select.select import Select\nfrom utilities.analisys_parser.analizer.symbol.symbol import Symbol\nfrom utilities.analisys_... | [
[
"pandas.merge",
"pandas.DataFrame"
]
] |
deisemaia/Higra | [
"82cb78b606a383f3961faa882457a9a987f802e0",
"82cb78b606a383f3961faa882457a9a987f802e0"
] | [
"higra/hierarchy/random_hierarchy.py",
"higra/hierarchy/constrained_connectivity_hierarchy.py"
] | [
"############################################################################\n# Copyright ESIEE Paris (2018) #\n# #\n# Contributor(s) : Benjamin Perret #\n# ... | [
[
"numpy.arange",
"numpy.zeros"
],
[
"numpy.maximum.at",
"numpy.logical_and"
]
] |
Chinmay-jain767/itr | [
"041d276c2c9973ea7e33d4a293914c6e20acf968"
] | [
"itr/train_util2.py"
] | [
"import time\r\nimport torch\r\nimport numpy as np\r\nfrom pathlib import Path\r\nfrom transformers import WEIGHTS_NAME, CONFIG_NAME\r\n\r\n\r\ndef init_seed():\r\n seed_val = 42\r\n np.random.seed(seed_val)\r\n torch.manual_seed(seed_val)\r\n torch.cuda.manual_seed_all(seed_val)\r\n\r\n\r\ndevice = tor... | [
[
"numpy.random.seed",
"torch.cat",
"torch.manual_seed",
"torch.stack",
"numpy.argmax",
"torch.no_grad",
"numpy.equal",
"torch.cuda.is_available",
"torch.cuda.manual_seed_all",
"torch.device",
"torch.argmax"
]
] |
monchier/streamlit-1 | [
"202cd80bad8c8eb51d3e75d3923b225b0092c882"
] | [
"e2e/scripts/st_map.py"
] | [
"# -*- coding: utf-8 -*-\n# Copyright 2018-2020 Streamlit 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 requi... | [
[
"numpy.random.randn",
"pandas.DataFrame"
]
] |
vishalbelsare/KramersMoyal | [
"57e50278b0d31567054f763f3e0f3cc2c1e08315",
"57e50278b0d31567054f763f3e0f3cc2c1e08315",
"57e50278b0d31567054f763f3e0f3cc2c1e08315"
] | [
"test/kmc_test.py",
"test/bincount_test.py",
"older versions/older_version_1d_calculator.py"
] | [
"import numpy as np\n\nfrom kramersmoyal import km\nfrom kramersmoyal import kernels\n\ndef test_kmc():\n for t in [1,0.1,0.01,0.001]:\n for lag in [None, [1,2,3]]:\n\n X = np.random.normal(loc = 0, scale = np.sqrt(t), size = 10000)\n\n bins = np.array([5000])\n\n powers =... | [
[
"numpy.array",
"numpy.sqrt"
],
[
"numpy.random.rand",
"numpy.random.randint"
],
[
"numpy.zeros",
"numpy.linspace",
"numpy.unique"
]
] |
vanshhhhh/datasets | [
"aee32f95273ca3bfe83e09fb9b00ba4bf23597a5",
"aee32f95273ca3bfe83e09fb9b00ba4bf23597a5",
"aee32f95273ca3bfe83e09fb9b00ba4bf23597a5"
] | [
"tensorflow_datasets/ranking/libsvm_ranking_parser.py",
"tensorflow_datasets/video/ucf101.py",
"tensorflow_datasets/core/features/image_feature.py"
] | [
"# coding=utf-8\n# Copyright 2021 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 ... | [
[
"numpy.array"
],
[
"tensorflow.io.gfile.exists",
"tensorflow.io.gfile.GFile"
],
[
"tensorflow.bitcast",
"tensorflow.as_dtype",
"tensorflow.io.gfile.GFile",
"tensorflow.image.decode_image",
"tensorflow.dtypes.as_dtype"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.