repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
cksisu/comps
[ "70cc87b143a98f6f58e233ed35da6a65099e5a12" ]
[ "comps/conftest.py" ]
[ "import os\nfrom pathlib import Path\n\nimport pytest\n\nimport numpy as np\nimport pandas as pd\n\n@pytest.fixture\ndef pd_bank_data():\n \"\"\"Returns bank data in pandas DataFrame for testing.\n\n Returns\n -------\n pandas : DataFrame \n Pandas DataFrame with bank data.\n \"\"\"\n retur...
[ [ "numpy.array" ] ]
minhnn-tiny/mycroft-precise
[ "5c9b9a3c1e79b1724e3458b5f487de7a4d9d83ad" ]
[ "test/scripts/test_listen.py" ]
[ "import numpy as np\nimport os\nimport shutil\n\nimport wave\nfrom prettyparse import Usage\n\nfrom precise_runner import PreciseEngine, PreciseRunner\nfrom precise_runner.runner import ListenerEngine\nfrom precise.network_runner import Listener\nfrom precise.scripts.base_script import BaseScript\nfrom precise.util...
[ [ "numpy.array", "numpy.loadtxt", "numpy.argwhere", "numpy.squeeze", "numpy.expand_dims" ] ]
charignon/financier
[ "5b5bc89a97c265376bbc134911419a06d938b7dd" ]
[ "financier/visualizer.py" ]
[ "#!/usr/bin/env python3\nfrom typing import Any, Optional\n\n\ndef plot_income(df: Any, fname: Optional[str] = None) -> None:\n \"\"\"Plot an offer df, if fname is None save to a file named fname\"\"\"\n from matplotlib import pyplot as plt # type: ignore\n\n ax = df.plot(kind=\"bar\", figsize=(20, 6), fo...
[ [ "matplotlib.pyplot.show", "matplotlib.pyplot.savefig", "matplotlib.pyplot.tight_layout" ] ]
liuyuan000/yolox_sar
[ "007e493010d2ef2c3996e936c250bff89741cd8c" ]
[ ".history/tools/demo_20211008151155.py" ]
[ "#!/usr/bin/env python3\n# -*- coding:utf-8 -*-\n# Copyright (c) Megvii, Inc. and its affiliates.\n\nimport argparse\nimport os\nimport time\nfrom loguru import logger\n\nimport cv2\n\nimport torch\nimport sys\nsys.path.append(\"D:\\mynetwork\\YOLOX-main\")\nfrom yolox.data.data_augment import ValTransform\n# from ...
[ [ "torch.ones", "torch.no_grad", "torch.load", "torch.from_numpy" ] ]
rmitra/google-research
[ "88481d10a87947ffb9305dc7665682e008b27391" ]
[ "towards_gan_benchmarks/lib/gan.py" ]
[ "# coding=utf-8\n# Copyright 2019 The Google Research 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 requ...
[ [ "tensorflow.compat.v1.assign", "tensorflow.contrib.layers.xavier_initializer", "tensorflow.compat.v1.log", "tensorflow.compat.v1.ones_like", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.asinh", "tensorflow.compat.v1.nn.softplus", "tensorflow.compat.v1.reshape", "tensorfl...
tnoumar/PSPNet
[ "5424e931681db4ee5cb98f6409df15b67e78137f" ]
[ "train.py" ]
[ "\"\"\"\r\nThis code is based on DrSleep's framework: https://github.com/DrSleep/tensorflow-deeplab-resnet \r\n\"\"\"\r\n\r\nfrom __future__ import print_function\r\n\r\nimport argparse\r\nimport os\r\nimport sys\r\nimport time\r\n\r\nimport tensorflow as tf\r\nimport numpy as np\r\n\r\nfrom model import PSPNet101\...
[ [ "tensorflow.train.start_queue_runners", "tensorflow.group", "tensorflow.train.get_checkpoint_state", "tensorflow.reshape", "tensorflow.gradients", "tensorflow.control_dependencies", "tensorflow.global_variables_initializer", "tensorflow.set_random_seed", "tensorflow.trainable_v...
sathappanspm/geocoding
[ "bb49968dfacaad5d0e19b29a3b11d932726489bd" ]
[ "TextGeo/src/geoutils/gazetteer.py" ]
[ "#!/usr/bin/env python\n#-*- coding:utf-8 -*-\n\n\"\"\"\n *.py: Description of what * does.\n Last Modified:\n\"\"\"\n\n__author__ = \"Sathappan Muthiah\"\n__email__ = \"sathap1@vt.edu\"\n__version__ = \"0.0.1\"\n\n# import gevent\nfrom .dbManager import SQLiteWrapper, MongoDBWrapper\nimport pandas as pd\nfro...
[ [ "pandas.DataFrame" ] ]
kinect59/ad_examples
[ "bf0bb75faa3f713a2efef04b6b093e6a313825af" ]
[ "python/dnn/gan.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport numpy.random as rnd\nfrom sklearn import mixture\nfrom common.gen_samples import *\nfrom common.nn_utils import get_train_batches\nimport os\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\n\n\"\"\"\nA simple [conditional|Info] GAN with fully connected layers for both ...
[ [ "tensorflow.matmul", "numpy.mean", "tensorflow.global_variables_initializer", "tensorflow.train.GradientDescentOptimizer", "tensorflow.set_random_seed", "tensorflow.trainable_variables", "tensorflow.shape", "tensorflow.concat", "tensorflow.subtract", "tensorflow.train.Saver...
astronomical-data-processing/curig
[ "4d0e944b8c67e99106e56decda00c9c424002625" ]
[ "python/curagridder/cursl.py" ]
[ "# Contents in this file are specified for RASCIL\n\nimport ctypes\nimport os\nimport warnings\n\nimport numpy as np\nfrom ctypes import c_double\nfrom ctypes import c_int\nfrom ctypes import c_float\nfrom ctypes import c_void_p\n\nc_int_p = ctypes.POINTER(c_int)\nc_float_p = ctypes.POINTER(c_float)\nc_double_p = c...
[ [ "numpy.ctypeslib.ndpointer", "numpy.reshape", "numpy.zeros" ] ]
aotitoola/political-sa-reddit
[ "a27d2017730ca8bd87e227b0fd24372b83e1da8d" ]
[ "app/util/utils.py" ]
[ "import os\nimport streamlit as st\nimport joblib\nimport torch\nimport json\n\nimport base64\nimport uuid\nimport re\nimport jupytext\nfrom bokeh.models.widgets import Div\nimport math\nimport importlib.util\n\n\ndef import_from_file(module_name: str, filepath: str):\n \"\"\"\n Imports a module from file.\n ...
[ [ "torch.save" ] ]
dontLoveBugs/box-convolutions
[ "caa244ced4a7c17e4668bc9419525d3a8e320583" ]
[ "examples/ENet.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nclass ENet(nn.Module):\n def __init__(self, n_classes=19):\n super().__init__()\n\n self.net = nn.ModuleList([\n Downsampler(3, 16),\n Bottleneck(16, 64, 0.01, downsample=True),\n\n Bottleneck(...
[ [ "torch.nn.Sequential", "torch.nn.BatchNorm2d", "torch.nn.ConvTranspose2d", "torch.nn.functional.max_unpool2d", "torch.nn.Module.__init__", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.nn.PReLU", "torch.nn.functional.pad", "torch.nn.functional.max_pool2d", "torch.nn.Dropou...
lauragustafson/fvcore
[ "1f43d07bf4d2ed987928c0c8501b31dfdbbca8a5" ]
[ "tests/test_common.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n\nimport math\nimport time\nimport typing\nimport unittest\n\nimport numpy as np\nfrom fvcore.common.config import CfgNode\nfrom fvcore.common.history_buffer import HistoryBuffer\nfrom fvcore.common.registry import Registry\nfrom fvcore.commo...
[ [ "numpy.random.seed", "numpy.median", "numpy.mean", "numpy.arange", "numpy.random.randint" ] ]
newnativeabq/mendeley-search
[ "a9d7514deb57c34d72e06b1f33b0e8e9bb9fb090" ]
[ "google-trends/processdict.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nProcessDict\nReturns dataframe random sample of size n from medical dictionary sorted by\nLexical difficulty.\n\nCreated on Tue Jul 30 21:30:48 2019\n\n@author: vince\n\"\"\"\nimport pandas as pd\n\nclass request():\n def __init__(self, n=10, dictionary='meddict_clean.csv'):\n ...
[ [ "pandas.read_csv" ] ]
Zrealshadow/ark-nlp
[ "159045d17747524bd4e9af7f65f1d0283e8098e6" ]
[ "ark_nlp/model/ner/span_bert/span_bert_named_entity_recognition.py" ]
[ "\"\"\"\n# Copyright 2020 Xiang Wang, Inc. 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# http://www.apache.org/licenses/LICENSE-2.0\n\nAuthor: Xiang Wang, x...
[ [ "torch.cat", "torch.tensor", "torch.argmax", "torch.no_grad" ] ]
HelmholtzAI-Consultants-Munich/test-doi
[ "b5cc685eeff27ef4fad69b96396bdc72d7d33bde" ]
[ "src/ml_pipeline_template/models/mnist_module.py" ]
[ "from typing import Any, List\n\nimport torch\nfrom pytorch_lightning import LightningModule\nfrom torchmetrics import MaxMetric\nfrom torchmetrics.classification.accuracy import Accuracy\n\nfrom ml_pipeline_template.models.components.simple_dense_net import SimpleDenseNet\n\n\nclass MNISTLitModule(LightningModule)...
[ [ "torch.argmax", "torch.nn.CrossEntropyLoss" ] ]
miketarpey/piper
[ "d1620727889228d61fbe448f4747cef9351ede59", "d1620727889228d61fbe448f4747cef9351ede59" ]
[ "piper/styler.py", "piper/custom.py" ]
[ "'''\r\nStyler function style summary\r\n=============================\r\nStyler.applymap(func) : element-wise styles\r\nStyler.apply(func, axis=0) : column-wise styles\r\nStyler.apply(func, axis=1) : row-wise styles\r\nStyler.apply(func, axis=None) : tablewise styles\r\n'''\r\nimport pandas as pd\r\n...
[ [ "pandas.isnull", "numpy.any", "numpy.isnan" ], [ "pandas.to_datetime", "pandas.Timedelta", "pandas.api.types.is_numeric_dtype", "pandas.CategoricalDtype", "pandas.api.types.is_timedelta64_dtype" ] ]
czh4/mmf-hateful-memes
[ "f1686ce612adda3c0553df1b5adf643d992a6afb" ]
[ "mmf/models/m4c.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\nimport functools\nimport logging\nimport math\n\nimport torch\nimport torch.nn.functional as F\nfrom mmf.common.registry import registry\nfrom mmf.models.base_model import BaseModel\nfrom mmf.modules.layers import ClassifierLayer\nfrom mmf.utils.build import buil...
[ [ "torch.zeros", "torch.nn.functional.normalize", "torch.nn.Dropout", "torch.nn.Linear", "torch.cat", "torch.nn.Identity", "torch.arange", "torch.nn.functional.embedding", "torch.zeros_like", "torch.nn.Embedding" ] ]
nuannuanhcc/deep-high-resolution-net.pytorch
[ "163eb4797e5242d753ccbc69a4354b487657fdcb" ]
[ "tools/train.py" ]
[ "# ------------------------------------------------------------------------------\n# Copyright (c) Microsoft\n# Licensed under the MIT License.\n# Written by Bin Xiao (Bin.Xiao@microsoft.com)\n# ------------------------------------------------------------------------------\n\nfrom __future__ import absolute_import\...
[ [ "torch.rand", "torch.nn.DataParallel", "torch.load", "torch.optim.lr_scheduler.MultiStepLR" ] ]
dumpmemory/t5x
[ "463a23d577490a26498d9bbb2d7554be88afa316" ]
[ "t5x/examples/t5/layers.py" ]
[ "# Copyright 2021 The T5X 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 ag...
[ [ "numpy.log", "numpy.minimum", "numpy.where", "numpy.finfo", "numpy.prod", "numpy.arange", "numpy.abs", "numpy.maximum" ] ]
jroesch/torchdynamo
[ "0b1e34d53f53937b3066e61a14d210365a24b156" ]
[ "torchdynamo/allowed_functions.py" ]
[ "import builtins\nimport collections\nimport copy\nimport functools\nimport itertools\nimport math\nimport operator\nimport types\nimport warnings\nfrom functools import lru_cache\n\nimport numpy\nimport torch\n\n\n@lru_cache(None)\ndef _disallowed_function_ids():\n remove = [\n True,\n False,\n ...
[ [ "torch.distributions.Distribution.set_default_validate_args" ] ]
ianthomas23/xarray
[ "aa1d1d19b822897399c8ed2cf346afbac71f45b3" ]
[ "xarray/tests/test_formatting_html.py" ]
[ "from __future__ import annotations\n\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nimport xarray as xr\nfrom xarray.core import formatting_html as fh\n\n\n@pytest.fixture\ndef dataarray():\n return xr.DataArray(np.random.RandomState(0).randn(4, 6))\n\n\n@pytest.fixture\ndef dask_dataarray(dataarray...
[ [ "numpy.sin", "numpy.random.RandomState", "pandas.date_range", "numpy.random.randn", "pandas.MultiIndex.from_product" ] ]
INK-USC/CPL
[ "215c2850ac5d931eac206c03e2eca0fbbfd99948" ]
[ "baselines/MultiHopKG-master/src/utils/ops.py" ]
[ "\"\"\"\n Copyright (c) 2018, salesforce.com, inc.\n All rights reserved.\n SPDX-License-Identifier: BSD-3-Clause\n For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause\n \n Customized operators and utility functions.\n\"\"\"\n\nimport numpy as np\n\nimport to...
[ [ "torch.zeros", "torch.cat", "torch.gather", "torch.autograd.Variable", "torch.nn.ConstantPad1d", "torch.ones", "numpy.finfo", "torch.log", "torch.exp", "torch.randn", "torch.sum" ] ]
KFilippopolitis/MIP-Engine
[ "11b43c80066ae3face1c7242c1dfafd4b974e5f8" ]
[ "tests/unit_tests/test_logistic_regression.py" ]
[ "import numpy as np\nimport pandas as pd\n\nfrom mipengine.algorithms.logistic_regression import label_binarize\n\n\ndef test_label_binarize_two_classes_equal():\n y = pd.DataFrame({\"y\": [\"a\", \"a\", \"b\", \"b\"]})\n ybin = label_binarize(y, classes=[\"a\", \"b\"])\n assert sum(ybin) == 2\n\n\ndef tes...
[ [ "pandas.DataFrame", "numpy.array" ] ]
iron316/pytorch-lightning
[ "1aba411da96ed95419d13ec1f86a0d38a232f73e" ]
[ "pytorch_lightning/trainer/data_loading.py" ]
[ "from abc import ABC, abstractmethod\nfrom typing import Union, List, Tuple, Callable\n\nimport torch.distributed as torch_distrib\nfrom torch.utils.data import SequentialSampler, DataLoader\nfrom torch.utils.data.distributed import DistributedSampler\n\nfrom pytorch_lightning.core import LightningModule\nfrom pyto...
[ [ "torch.distributed.barrier", "torch.utils.data.DataLoader", "torch.utils.data.distributed.DistributedSampler" ] ]
mintproject/topoflow36
[ "1dd25ce1b37cef129c8ee74b30af851658a7a8d9", "1dd25ce1b37cef129c8ee74b30af851658a7a8d9" ]
[ "topoflow/utils/idl_func.py", "topoflow/utils/regrid_LAST.py" ]
[ "\n# idl_func.py\n\n# Author: Dr. Scott D. Peckham, INSTAAR, Univ. of Colorado\n# Created: August 14, 2008\n\nfrom numpy import *\nimport numpy\nimport os\nimport os.path\nimport re\nimport platform\n \n#------------------------------------------\n# Define the \"bunch\" class for structures\n#------------...
[ [ "numpy.array", "numpy.zeros", "numpy.size", "numpy.ndim", "numpy.repeat", "numpy.int32" ], [ "numpy.float32" ] ]
GPrathap/rrt-algorithms
[ "b97af0b57306cdbc0e148f5c086345571d34e823" ]
[ "examples/rrt_star/rrt_star_3d.py" ]
[ "# This file is subject to the terms and conditions defined in\n# file 'LICENSE', which is part of this source code package.\nimport numpy as np\n\nfrom src.rrt.rrt_star import RRTStar\nfrom src.search_space.search_space import SearchSpace\nfrom src.utilities.plotting import Plot\nX_dimensions = np.array([(0, 100),...
[ [ "numpy.array" ] ]
ryuwd/mplhep
[ "8a91aac0a2f1b867ece143cf37bdad6e65cd7c83" ]
[ "tests/test_basic.py" ]
[ "from __future__ import annotations\n\nimport os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pytest\n\nos.environ[\"RUNNING_PYTEST\"] = \"true\"\n\nimport mplhep as hep # noqa: E402\n\n\"\"\"\nTo test run:\npytest --mpl\n\nWhen adding new tests, run:\npytest --mpl-generate-path=tests/baseline\n\...
[ [ "matplotlib.pyplot.switch_backend", "numpy.random.normal", "numpy.array", "numpy.histogram2d", "numpy.random.seed", "numpy.random.poisson", "matplotlib.pyplot.close", "matplotlib.pyplot.subplots", "numpy.geomspace", "numpy.arange", "numpy.sqrt", "numpy.linspace" ]...
Siwensun/Neural-Diffeomorphic-Flow----NDF
[ "dabbee6546069cb9c2c14408f9188b80937b48dc" ]
[ "evaluate.py" ]
[ "#!/usr/bin/env python3\n# Copyright 2004-present Facebook. All Rights Reserved.\n\nimport argparse\nimport logging\nimport json\nimport numpy as np\nimport os\nimport trimesh\nfrom pathos.multiprocessing import ProcessPool as Pool\n\nimport deep_sdf\nimport deep_sdf.workspace as ws\n\n\ndef evaluate_one_instance(d...
[ [ "numpy.median", "numpy.load", "numpy.mean" ] ]
renzobalb/pacific
[ "75f58c782e4a04c6996d353bc4c8c4ba3e607332" ]
[ "scripts/PACIFIC.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Apr 15 09:32:02 2020\n\nPACIFIC takes a FASTA/FASTQ input file and predicts the presence of the following viruses and their relative sample proportions:\n SARS-CoV-2,\n 128 taxonomic units from Influenza,\n 5 species from ...
[ [ "tensorflow.set_random_seed", "numpy.array", "numpy.random.seed", "pandas.DataFrame", "tensorflow.compat.v1.ConfigProto", "tensorflow.random.set_seed", "tensorflow.compat.v1.Session" ] ]
sansoohan/Enneagram
[ "b9ed041ffd2e084ae80c26a767030626bd33b491" ]
[ "BigDataAnalyzing/training/freeze.py" ]
[ "import tensorflow as tf\nimport numpy as np\nfrom tensorflow.python.tools import freeze_graph\nfrom tensorflow.python.tools import optimize_for_inference_lib\n\n# Freeze the graph\nMODEL_NAME=\"enneagram_classification_model\"\ninput_graph_path = MODEL_NAME+'.pbtxt'\ncheckpoint_path = './'+MODEL_NAME+'.ckpt'\ninpu...
[ [ "tensorflow.python.tools.freeze_graph.freeze_graph", "tensorflow.io.gfile.GFile", "tensorflow.python.tools.optimize_for_inference_lib.optimize_for_inference", "tensorflow.compat.v1.GraphDef" ] ]
DennisMcWherter/SingleImageDataAugmentation
[ "a5fb760ce852adcd89498fa8f8b5be1deaf03d26" ]
[ "src/models/MobilenetV2.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\n\nfrom torchvision import models\n\nclass TestMobilenetV2(nn.Module):\n\n def __init__(self, num_classes):\n super(TestMobilenetV2, self).__init__()\n\n # Freeze mobilenet\n self.mobilenetv2 = models.mobilenet_v2(pretrain...
[ [ "torch.nn.Linear", "torch.flatten", "torch.nn.functional.dropout", "torch.nn.functional.softmax" ] ]
ZhiangChen/ZhiangChen
[ "639c4bc7140b8253d89b11920187e88d07081ae7" ]
[ "infer.py" ]
[ "\"\"\"\ntraining.py\nZhiang Chen, April 2020\n\"\"\"\n\nimport torch\nimport torch.utils.data\nimport torchvision.datasets\nimport torch.nn as nn\nimport torchvision.transforms as transforms\nfrom utils import *\nimport torchvision.models as models\nfrom data import EurekaDataset\nimport pickle\n\nmodel_names = so...
[ [ "torch.nn.Linear", "torch.device", "torch.optim.lr_scheduler.StepLR", "torch.optim.SGD", "torch.manual_seed", "torch.utils.data.DataLoader", "torch.nn.CrossEntropyLoss" ] ]
natke/tutorials
[ "32e5407cfe848e9c50d62c3bfa69487af8b64a72" ]
[ "beginner_source/examples_autograd/two_layer_net_autograd.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nPyTorch: Tensors and autograd\n-------------------------------\n\nA fully-connected ReLU network with one hidden layer and no biases, trained to\npredict y from x by minimizing squared Euclidean distance.\n\nThis implementation computes the forward pass using operations on PyTorch\...
[ [ "torch.device", "torch.no_grad", "torch.randn" ] ]
DocVaughan/CRAWLAB-Code-Snippets
[ "90c946bef0fbe37401f822d58ce5a6b3c5349616" ]
[ "OpenAI Gym/openAI_variableLengthPendulumContinuous_learning.py" ]
[ "import numpy as np\nimport gym\nimport variable_pendulum_continuous\n\nfrom keras.models import Sequential, Model\nfrom keras.layers import Dense, Activation, Flatten, Input, merge\nfrom keras.optimizers import Adam\n\nfrom rl.agents import DDPGAgent\nfrom rl.memory import SequentialMemory\nfrom rl.random import O...
[ [ "numpy.random.seed" ] ]
MitchellTesla/automl
[ "426b5a82b96afb2aa90e0eaf17335118e0aad8fd" ]
[ "efficientnetv2/utils.py" ]
[ "# Copyright 2021 Google Research. 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 required by...
[ [ "tensorflow.nn.swish", "tensorflow.compat.v1.profiler.ProfileOptionBuilder.float_operation", "tensorflow.io.gfile.GFile", "tensorflow.compat.v1.get_default_graph", "tensorflow.compat.v1.summary.all_v2_summary_ops", "tensorflow.compat.v1.global_variables", "tensorflow.reshape", "ten...
sangyongjeong1604/safegail
[ "76828169fbf1f9dce7bcc7fc03638abc6ef7a425" ]
[ "reference_src/4.windowsub0406/model.py" ]
[ "import numpy as np\nimport tensorflow as tf\nimport csv\nimport matplotlib.pyplot as plt\nimport os, sys\nimport cv2\nfrom sklearn.model_selection import train_test_split\nfrom keras.models import Sequential, Model\nfrom keras.layers.core import Dense, Dropout, Activation,Lambda\nfrom keras.optimizers import Adam\...
[ [ "numpy.array", "numpy.zeros", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.hist", "numpy.float32", "numpy.random.randint", "numpy.random.uniform", "matplotlib.pyplot.ylabel", "sklearn.model_selection.train_test_split", "sklearn.utils.shuffle" ] ]
Unity05/IronyDetection
[ "02dcf3d992efe35bcf23f9c724a4627778659fa3" ]
[ "src/audio_streaming.py" ]
[ "import pyaudio\nimport struct\nimport numpy as np\n\n\ndef audio_streaming(output_queue):\n CHUNK = 1024\n SAMPLE_FORMAT = pyaudio.paInt16\n # SAMPLE_FORMAT = pyaudio.paFloat32\n CHANNELS = 1\n RATE = 16000\n\n REQUIRED_SILENCE_LENGTH = (RATE / CHUNK) * 0.3\n REQUIRED_SILENCE_LENGTH_FOR_SHUTD...
[ [ "numpy.absolute" ] ]
CherokeeLanguage/IMS-Toucan
[ "5d48d9ad371b7564abc807078ecde9532e5320d6", "5d48d9ad371b7564abc807078ecde9532e5320d6" ]
[ "InferenceInterfaces/InferenceFastSpeech2.py", "TrainingInterfaces/TrainingPipelines/pretrain_aligner_chr.py" ]
[ "import itertools\nimport os\n\nimport librosa.display as lbd\nimport matplotlib.pyplot as plt\nimport noisereduce\nimport sounddevice\nimport soundfile\nimport torch\n\nfrom InferenceInterfaces.InferenceArchitectures.InferenceFastSpeech2 import FastSpeech2\nfrom InferenceInterfaces.InferenceArchitectures.Inference...
[ [ "torch.zeros", "torch.device", "torch.cat", "matplotlib.pyplot.subplots", "torch.inference_mode", "matplotlib.pyplot.show", "matplotlib.pyplot.subplots_adjust" ], [ "torch.manual_seed", "torch.utils.data.ConcatDataset", "torch.random.manual_seed", "torch.device" ]...
ShkalikovOleh/OptAlg
[ "03399eee50203dcba834a4d9ab48751142a6de2b" ]
[ "optalg/unconstrained/evolutional/generator/binary.py" ]
[ "import numpy as np\nfrom .generator_base import Generator\n\n\nclass BinaryGenerator(Generator):\n\n def __init__(self, n_genes: int = 22) -> None:\n super().__init__(n_genes)\n\n def __call__(self, population_size: int, n_variables: int) -> np.ndarray:\n shape = (population_size, n_variables, ...
[ [ "numpy.random.randint" ] ]
Odin-son/ATSS
[ "e111ee9927b408c5a762d356be4bd08f63f04468" ]
[ "tests/checkpoint.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\nfrom collections import OrderedDict\nimport os\nfrom tempfile import TemporaryDirectory\nimport unittest\n\nimport torch\nfrom torch import nn\n\nfrom atss_core.utils.model_serialization import load_state_dict\nfrom atss_core.utils.checkpoint...
[ [ "torch.nn.Linear", "torch.rand", "torch.nn.Module", "torch.nn.DataParallel" ] ]
DJ-LYH/dgl
[ "480a4ae35c84c4497bfa901c25e6e6eca85b67eb" ]
[ "python/dgl/nn/pytorch/explain/gnnexplainer.py" ]
[ "\"\"\"Torch Module for GNNExplainer\"\"\"\n# pylint: disable= no-member, arguments-differ, invalid-name\nfrom math import sqrt\nimport torch\n\nfrom torch import nn\nfrom tqdm import tqdm\n\nfrom ....base import NID, EID\nfrom ....subgraph import khop_in_subgraph\n\nclass GNNExplainer(nn.Module):\n r\"\"\"GNNEx...
[ [ "torch.is_tensor", "torch.no_grad", "torch.optim.Adam", "torch.nn.init.calculate_gain", "torch.mean", "torch.log", "torch.randn", "torch.sum" ] ]
gustavotcustodio/AutomaticSummarization
[ "da0111c84eb2f23c7c0380ac606b622272b335c1" ]
[ "RefreshWordEmbeddings/my_flags.py" ]
[ "####################################\n# Author: Shashi Narayan\n# Date: September 2016\n# Project: Document Summarization\n# H2020 Summa Project\n####################################\n\n\"\"\"\nMy flags\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print...
[ [ "tensorflow.app.flags.DEFINE_float", "tensorflow.app.flags.DEFINE_integer", "tensorflow.app.flags.DEFINE_boolean", "tensorflow.app.flags.DEFINE_string" ] ]
Shark-y/qiskit-sdk-py
[ "c1361b823dc1a3fab76545e62975c2afb02e442d", "c1361b823dc1a3fab76545e62975c2afb02e442d" ]
[ "qiskit/extensions/quantum_initializer/_initializer.py", "test/performance/state_tomography.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright 2017 IBM RESEARCH. 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\...
[ [ "numpy.matrix", "numpy.arccos", "numpy.angle", "numpy.exp", "numpy.identity", "numpy.absolute" ], [ "numpy.log2", "numpy.sqrt" ] ]
elfadys/pyquadkey
[ "81eb631fd96a0067e5366022c0667900ca09e9c4" ]
[ "tile_system.py" ]
[ "from util import precondition\nfrom math import pi\nimport numpy as np\nimport pandas as pd\n\n\ndef valid_level(level):\n LEVEL_RANGE = (1, 23)\n return LEVEL_RANGE[0] <= level <= LEVEL_RANGE[1]\n\n\n@precondition(lambda key: valid_level(len(key)))\ndef valid_key(key):\n return TileSystem.KEY_PATTERN.mat...
[ [ "numpy.sin", "numpy.zeros_like", "numpy.log", "numpy.round", "pandas.DataFrame", "numpy.exp", "numpy.cos", "numpy.maximum" ] ]
everguard-inc/dino
[ "49c8142167867704b22cc9420e3aa18f8ce3cd00" ]
[ "main_dino.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\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.distributed.get_world_size", "torch.optim.AdamW", "torch.cuda.amp.autocast", "torch.hub.load", "torch.sum", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.utils.data.DataLoader", "torch.zeros", "torch.utils.data.DistributedSampler", "torch.optim.SGD", "t...
guigolab/DeepFryer
[ "83ddde69134c28a662735f153f568b247cb4d091" ]
[ "deepfryer/batcheffect/correction.py" ]
[ "# -*- coding: utf-8 -*-\nimport copy\nimport sys\nimport numpy as np\nimport pandas as pd\n\nfrom sklearn.linear_model import LinearRegression\n\n\ndef assign_val(dataset, valueset, var, name):\n\t''' It takes two datasets and map values from one to the other.\n\t\t-dataset: Pandas DataFrame to where the values ar...
[ [ "sklearn.linear_model.LinearRegression", "numpy.unique", "pandas.get_dummies" ] ]
slawekkopacz/dl-az
[ "1a49ed3c205b2e2aaa35d64050864f08df1b0543" ]
[ "Deep_Learning_A_Z/Volume 1 - Supervised Deep Learning/Part 1 - Artificial Neural Networks (ANN)/Section 4 - Building an ANN/Artificial_Neural_Networks/ann.py" ]
[ "# Artificial Neural Network\n\n# Installing Theano\n# pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git\n\n# Installing Tensorflow\n# pip install tensorflow\n\n# Installing Keras\n# pip install --upgrade keras\n\n# Part 1 - Data Preprocessing\n\n# Importing the libraries\nimport numpy as np\ni...
[ [ "sklearn.preprocessing.LabelEncoder", "sklearn.metrics.confusion_matrix", "sklearn.preprocessing.StandardScaler", "sklearn.model_selection.train_test_split", "pandas.read_csv", "sklearn.preprocessing.OneHotEncoder" ] ]
loco-3d/multicontact-locomotion-planning
[ "86c3e64fd0ee57b1e4061351a16e43e6ba0e15c2" ]
[ "python/mlp/utils/trajectories.py" ]
[ "import numpy as np\nimport numpy.matlib\nfrom numpy.polynomial.polynomial import polyval\n#from numpy import polyder\nfrom numpy.linalg import pinv\nfrom pinocchio import SE3, log3, exp3, Motion, Quaternion\nfrom pinocchio.utils import zero as mat_zeros\nfrom mlp.utils.util import effectorPositionFromHPPPath\n\n\...
[ [ "numpy.polyder", "numpy.array", "numpy.matrix", "numpy.zeros", "numpy.polynomial.polynomial.polyval", "numpy.linalg.pinv", "numpy.identity" ] ]
mvdbeek/seaplotlib
[ "af465b58fc321ddc29649f08860f81a874d95605" ]
[ "seaplotlib/data.py" ]
[ "import numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom matplotlib.font_manager import FontProperties\n\nclass DataDescription(object):\n\n def __init__(self, df):\n self.data = df\n\n\nclass CanDisplayScatter(object):\n \"\"\"Can be displayed as scatterplot without conversion.\"\"\"\n\n ...
[ [ "numpy.log10", "matplotlib.font_manager.FontProperties", "numpy.log2", "pandas.read_csv" ] ]
wmonteiro92/xmoai
[ "032602a4f6a33f2cc798ff7f7afe5aefcc9b30e7" ]
[ "xmoai/problems/objectives.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Jul 11 23:58:52 2020\n\n@author: wmonteiro92\n\"\"\"\nimport numpy as np\nimport gower\n\nnum_objectives = 3 # number of objectives used by xMOAI\n\ndef get_difference_target_regression(model, x, y_desired, method='predict'):\n \"\"\"Calcul...
[ [ "numpy.where", "numpy.array", "numpy.nan_to_num", "numpy.abs" ] ]
SHARANTANGEDA/CueObserve
[ "c3fbd77058101154ab59fc0e88bf6c02f8e2b446" ]
[ "api/ops/tasks.py" ]
[ "import json\nimport traceback\nimport datetime as dt\nimport pandas as pd\nimport html2text\nfrom django.template import Template, Context\nfrom celery import shared_task, group\nfrom celery.result import allow_join_result\n\nfrom anomaly.models import Anomaly, AnomalyDefinition, RunStatus, AnomalyCardTemplate\nfr...
[ [ "pandas.DataFrame" ] ]
unnat/active_gcn_ner
[ "eed43687cc09fd6469371b69a5d8f0079f30c012" ]
[ "train.py" ]
[ "from gcn_ner import GCNNer\n\nif __name__ == '__main__':\n\t\n\tfrom numpy import genfromtxt\n\timport numpy as np\n\t\n\t# al_length = 3750\n\t# al_list = list(np.random.randint(0,45112,al_length))\n\t# GCNNer.train_and_save(dataset='./data/labeled.conll', saving_dir='./data/unlabeled_50_random', epochs=20, al_ar...
[ [ "numpy.genfromtxt" ] ]
Fragalli/brFinance
[ "f06d7b148d20d07361c89158837d47225c4fea1f" ]
[ "brFinance/scraper/cvm/search.py" ]
[ "import re\nimport time\nfrom abc import ABC, abstractmethod\nfrom datetime import datetime\nfrom typing import Tuple, Any\n\nimport lxml.html as LH\nimport pandas as pd\nfrom selenium import webdriver\n\nfrom brFinance.utils.browser import Browser\n\n\nclass Search(ABC):\n \"\"\"\n Perform webscraping on the...
[ [ "pandas.to_datetime", "pandas.to_numeric", "pandas.read_html" ] ]
ingako/lifelong-ml
[ "a0108502b3e1ba5556a6cf6f1123037900db6427" ]
[ "eval/mean-stats-eval.py" ]
[ "#!/usr/bin/env python3\n\nimport os\nimport subprocess\nimport math\nimport pandas as pd\nimport numpy as np\nfrom statistics import stdev\n\nclass Config:\n def __init__(self, kappa, ed, reuse_rate=0, reuse_window_size=0, lossy_window=0):\n self.kappa = kappa\n self.ed = ed\n self.reuse_ra...
[ [ "numpy.std", "pandas.read_csv", "numpy.isnan", "numpy.mean" ] ]
pnode-dev/pnode
[ "be42bce4b2e904525c11bcaa952c269e4c8ad45c" ]
[ "examples/models/sqnxt_PETSc.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport numpy as np\nimport math\n\n\nclass BasicBlock(nn.Module):\n def __init__(self, in_channels, out_channels, stride):\n super(BasicBlock, self).__init__()\n reduction = 0.5\n if 2 == stride:\n reduction = ...
[ [ "torch.nn.functional.avg_pool2d", "torch.nn.Sequential", "torch.nn.BatchNorm2d", "torch.nn.Conv2d", "torch.nn.functional.relu" ] ]
yueqiw/attentive_clustering_processes
[ "3925eebbbce5b17f86805836b720c7bb518af9f4" ]
[ "acp/encoders/mog_encoder.py" ]
[ "\nimport torch\nimport torch.nn as nn\n\n\ndef get_mog_encoder(params):\n return MOG_Encoder(\n in_dim=params['x_dim'],\n out_dim=params['e_dim'],\n H_dim=params['H_dim'])\n\n\nclass MOG_Encoder(nn.Module):\n\n def __init__(self, in_dim, out_dim, H_dim):\n super().__init__()\n\n ...
[ [ "torch.nn.Linear", "torch.nn.PReLU" ] ]
anesh-ml/Document-and-ML-track-tool
[ "9b176985b0a5513a1e34ca8ff112e20629346470" ]
[ "ml_track_tool/summary_plots.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[1]:\n\n\nimport plotly\nimport plotly.express as px\nimport plotly.graph_objects as go\nfrom plotly.subplots import make_subplots\nimport os\nimport json\nimport pandas as pd\nimport numpy as np\nfrom sklearn.metrics import roc_auc_score,accuracy_score,f1_score,precis...
[ [ "numpy.array", "numpy.round", "sklearn.metrics.accuracy_score", "numpy.argmax", "numpy.ndim", "sklearn.metrics.precision_score", "sklearn.metrics.f1_score", "sklearn.metrics.recall_score" ] ]
Marcel-Busschers/former
[ "5380fad4c0890503188e01f9b2cbd06fdb33a7af" ]
[ "experiments/latent.py" ]
[ "from argparse import ArgumentParser\n\nfrom _context import former\nfrom former import TransformerVAE\nfrom generate import load_financial_data, batchByTokens, pad, splitArray\n\nfrom sklearn.manifold import TSNE\n\nimport torch\nimport os\nimport seaborn as sns\nimport pandas as pd\nfrom fpdf import FPDF\n\ndef g...
[ [ "torch.cat", "pandas.DataFrame", "torch.no_grad", "sklearn.manifold.TSNE", "torch.load" ] ]
karlnapf/kernel_goodness_of_fit
[ "b76ad54481475df5f061615b0922dec812d48eda" ]
[ "density_estimation/increasing_features_fixed_test_plot.py" ]
[ "import os\n\nimport numpy as np\nimport pandas as pd\nimport seaborn as sns\nfrom tools.latex_plot_init import plt\n\n\nfname = \"increasing_features_fixed_test.txt\"\n\nfields = ['p_value']\nfield_plot_names = {\n 'p_value': 'p-value',\n 'm': r'$m$'\n }\nde...
[ [ "pandas.read_csv" ] ]
TxusLopez/curie
[ "84e71916f05448a415661776491ba74127e6f913" ]
[ "CA_VonNeumann_estimator.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 2 10:38:41 2019\n\n@author: txuslopez\n\"\"\" \n\nfrom sklearn.base import BaseEstimator\nfrom copy import deepcopy\nfrom sklearn.base import clone\nfrom collections import deque\nfrom functools import reduce\n\nimport numpy as np\nimport...
[ [ "numpy.max", "numpy.array", "numpy.zeros", "numpy.min", "numpy.where", "numpy.any", "numpy.arange", "numpy.argmax", "numpy.indices", "numpy.flip" ] ]
YZ-Xie/caltech-ee148-spring2020-hw02
[ "26317707cac0f96250c45544aefbf31ad327cee6" ]
[ "visualize.py" ]
[ "import numpy as np\r\nfrom matplotlib import pyplot as plt\r\nfrom PIL import Image\r\n\r\ndef visualize_box(box, image, thick = 5):\r\n\r\n '''\r\n Visualize the bounding boxes with thick green sides\r\n Code for Q5 and Q6\r\n\r\n box: the bounding box coordinates, list of np arrays\r\n image: the ...
[ [ "numpy.copy" ] ]
Datajacker/Disaster_Response_Web_App
[ "651a26089eb631b3e213cc4d34230fd6fec3cfae" ]
[ "app/run.py" ]
[ "import json\nimport plotly\nimport pandas as pd\nimport re\n\n\nfrom nltk.tokenize import word_tokenize, RegexpTokenizer\nfrom nltk.corpus import stopwords\nfrom nltk.stem import WordNetLemmatizer, PorterStemmer\n\nfrom flask import Flask\nfrom flask import render_template, request, jsonify\nfrom plotly.graph_objs...
[ [ "sklearn.externals.joblib.load", "pandas.read_sql_table" ] ]
phaustin/e211_lib
[ "fb19ec28743e5dfe19a1ad9c14beeea2eab9de69" ]
[ "src/e211_lib/e211.py" ]
[ "# %%\n'''\ne211 Function library\n\nauthor: Andrew Loeppky\ncourse: eosc 211 - computer methods for earth, ocean and atmospheric scientists\n''';\n\n# %%\nfrom PIL import Image\nimport numpy as np\nfrom scipy.io import loadmat\nimport datetime\nimport pandas as pd\nfrom matplotlib import pyplot as plt\nimport arro...
[ [ "numpy.concatenate", "numpy.asarray", "scipy.io.loadmat", "numpy.save", "pandas.read_csv", "numpy.empty_like" ] ]
susmitpy/modin
[ "c7d7b492e52fcc4aa36af2a210312101bbada06e" ]
[ "modin/pandas/dataframe.py" ]
[ "# Licensed to Modin Development Team under one or more contributor license agreements.\n# See the NOTICE file distributed with this work for additional information regarding\n# copyright ownership. The Modin Development Team licenses this file to you under the\n# Apache License, Version 2.0 (the \"License\"); you...
[ [ "pandas.DataFrame.from_records", "pandas.Index", "numpy.empty", "numpy.asarray", "numpy.array", "pandas.DataFrame.from_dict", "pandas.core.common.apply_if_callable", "pandas.DataFrame", "pandas.io.formats.printing.pprint_thing", "pandas.core.dtypes.common.is_dict_like", ...
acolinisi/h5py
[ "c69fc627c96aafcc1393bb70115e5bcd3a6f8a95" ]
[ "h5py/_hl/filters.py" ]
[ "# This file is part of h5py, a Python interface to the HDF5 library.\n#\n# http://www.h5py.org\n#\n# Copyright 2008-2013 Andrew Collette and contributors\n#\n# License: Standard 3-clause BSD; see \"license.txt\" for full license terms\n# and contributor agreement.\n\n\"\"\"\n Implements support for H...
[ [ "numpy.product", "numpy.array", "numpy.ceil", "numpy.isfinite", "numpy.log10" ] ]
Brym-Gyimah/mmdetection
[ "96abfd90cf0e38c5ce398795f949e9328eb85c1b" ]
[ "mmdet/datasets/xml_style.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport os.path as osp\nimport xml.etree.ElementTree as ET\n\nimport mmcv\nimport numpy as np\nfrom PIL import Image\n\nfrom .builder import DATASETS\nfrom .custom import CustomDataset\n\n\n@DATASETS.register_module()\nclass XMLDataset(CustomDataset):\n \"\"\"XML ...
[ [ "numpy.array", "numpy.zeros" ] ]
shiwanghua/Rein-Bits
[ "b7e594673c9d4ce1682b01cd119a4499128688e8" ]
[ "pictures/programs/hem_exp3_n.py" ]
[ "import matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom matplotlib import rc\nfrom matplotlib.pyplot import MultipleLocator\nrc('mathtext', default='regular')\n\nplt.rcParams['axes.unicode_minus'] = False\nplt.rcParams['font.family'] = ['Times New Roman'] # \nName = [\"REIN\", \"HEM\", \"Simpl...
[ [ "matplotlib.pyplot.figure", "matplotlib.pyplot.tick_params", "matplotlib.rc", "matplotlib.pyplot.gcf", "matplotlib.pyplot.show" ] ]
PMBio/GNetLMM
[ "103d6433ff6d4a13b5787c116032fda268dc4302" ]
[ "GNetLMM/pycore/io/writer.py" ]
[ "import pdb\nimport numpy as np\nimport csv\n\nclass Writer:\n \"\"\"\n basic class for writing out experiments\n \"\"\"\n def __init__(self, basefile):\n \"\"\"\n constructor\n\n input:\n basefile : name of basefile\n \"\"\"\n self.basefile = basefile\n\n\n ...
[ [ "numpy.savetxt" ] ]
mstypulk/qiskit-terra
[ "058feb06657ec4b598cc65216288bdd984550d00" ]
[ "qiskit/extensions/standard/cz.py" ]
[ "# -*- coding: utf-8 -*-\n\n# Copyright 2017, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n# pylint: disable=invalid-name\n\n\"\"\"\ncontrolled-Phase gate.\n\"\"\"\n\nimport numpy\n\nfrom qiskit.circuit i...
[ [ "numpy.array" ] ]
p-glaum/PyPSA
[ "a8cfdf1acd9b348828474ad0899afe2c77818159" ]
[ "examples/sector-coupling/power-to-gas-boiler-chp.py" ]
[ "# -*- coding: utf-8 -*-\n## Power to Gas Example with Optional Coupling to Heat Sector (via Boiler OR Combined-Heat-and-Power (CHP))\n#\n# A location has an electric, gas and heat bus. The primary source is wind power, which can be converted to gas. The gas can be stored to convert into electricity or heat (with e...
[ [ "pandas.DataFrame", "pandas.date_range", "numpy.arange", "matplotlib.pyplot.subplots" ] ]
seanandrews/ARAA
[ "6c95f88f5619642b6914c611ba6c902b5412ab29" ]
[ "mdisk_dist.py" ]
[ "import numpy as np\nimport os\nimport sys\nfrom astropy.io import ascii\nfrom km_estimator import km_estimator\n\nimport matplotlib.pyplot as plt\nimport matplotlib.gridspec as gridspec\nplt.style.use('araa')\nfrom matplotlib import rc\nrc('text.latex', preamble=r'\\usepackage{amsmath}')\nrc(\"font\", **{\"family\...
[ [ "numpy.zeros_like", "numpy.ones_like", "numpy.exp", "matplotlib.pyplot.figure", "matplotlib.rc", "numpy.ma.column_stack", "matplotlib.pyplot.style.use", "numpy.ma.concatenate", "numpy.unique", "matplotlib.gridspec.GridSpec", "numpy.ma.min" ] ]
wxy1224/cs224n_project
[ "6dbd7869622565d0eaa3ac7b1dacc569f33d5a18", "6dbd7869622565d0eaa3ac7b1dacc569f33d5a18" ]
[ "data_process/word_entity.py", "src/train/pretrained_embedding_bidirectional_lstm_model.py" ]
[ "# !/usr/bin/env python -W ignore::DeprecationWarning\nimport pandas as pd, numpy as np\nimport nltk\nfrom itertools import chain\nimport re\nimport nltk\nimport nltk.tag.stanford as st\nimport os\n\ntagger = st.StanfordNERTagger(\n '../../stanford-ner/classifiers/english.all.3class.distsim.crf.ser.gz',\n '../../...
[ [ "pandas.read_csv" ], [ "numpy.asarray", "numpy.zeros" ] ]
rte-france/relife
[ "b68177c0f2614f1a9074698aa7cbef691babd556" ]
[ "relife/reward.py" ]
[ "\"\"\"Rewards for renewal reward processes.\"\"\"\n\n# Copyright (c) 2022, RTE (https://www.rte-france.com)\n# See AUTHORS.txt\n# SPDX-License-Identifier: Apache-2.0 (see LICENSE.txt)\n# This file is part of ReLife, an open source Python library for asset\n# management based on reliability theory and lifetime data...
[ [ "numpy.where" ] ]
aksakalli/heatmap-wms
[ "058014329b746991135f2c371614c4515287f763" ]
[ "heatmap.py" ]
[ "from io import BytesIO\n\nimport numpy as np\nfrom PIL import Image\nfrom scipy.ndimage import gaussian_filter\nfrom matplotlib import cm, colors\n\nalpha_heat = colors.LinearSegmentedColormap(\n \"alpha_heat\",\n {\n \"red\": [\n (0, 0, 0),\n (0.001, 0.54, 0.54),\n (0...
[ [ "matplotlib.cm.register_cmap", "matplotlib.cm.get_cmap", "numpy.zeros", "scipy.ndimage.gaussian_filter", "matplotlib.colors.Normalize", "matplotlib.colors.LinearSegmentedColormap" ] ]
rogeryan/ssd_keras
[ "45c364a122d2aa894ce8ba687876b02223a83cd0" ]
[ "ssd7_pred.py" ]
[ "import os\nimport logging\nfrom tensorflow.keras.optimizers import Adam\nfrom tensorflow.keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau, TerminateOnNaN, CSVLogger\nfrom tensorflow.keras import backend as K\nfrom tensorflow.keras.models import load_model\nfrom math import ceil\nimport nump...
[ [ "numpy.set_printoptions", "numpy.linspace", "matplotlib.pyplot.figure", "tensorflow.keras.models.load_model", "tensorflow.keras.backend.clear_session", "matplotlib.pyplot.Rectangle", "matplotlib.pyplot.gca", "matplotlib.pyplot.imshow" ] ]
awasthiabhijeet/CRES
[ "217c2d3b0cdaec1b22bc498c4cd17c5262b3fd13" ]
[ "src/hls/get_rule_related_statistics.py" ]
[ "# gets majority voting accuracy from validation_processed.p and test_processed.p (or any pickle of similar format)\n# for validation and test data respectively\n\nimport pickle\nimport sys,os\nfrom collections import Counter\nimport numpy as np\nimport random\nfrom sklearn.metrics import precision_recall_fscore_su...
[ [ "numpy.equal", "numpy.array", "numpy.sum", "numpy.mean", "sklearn.metrics.precision_recall_fscore_support", "numpy.unique" ] ]
francescodelduchetto/nbs_experiments
[ "9d8a2e9a7253d0c027f5a6e7225d2432ea8db198" ]
[ "scripts/parseRosbagsNoPlay.py" ]
[ "#!/usr/bin/env python\n\n'''\nOffline rosbag parser!\nBag contains: tf topic with robot tf and rfid tags tf\n rfid readings\n laser readings \n\n'''\n\n\nimport rosbag\nfrom tf_bag import BagTfTransformer\n\nimport tf\nimport pandas as pd\nimport rospy\nfrom rfid_node.msg import TagReadin...
[ [ "pandas.DataFrame.from_records" ] ]
AnnaTruzzi/cornet_analysis
[ "0a2fd0c5a6b09a80d3c8a47441b08fd6129f7a2d" ]
[ "summarize_performance_aoa_fitlearningrate.py" ]
[ "#%% \n\nimport os\nfrom os import path\nimport pickle\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport json\nimport seaborn as sns\nimport math\nimport numpy as np\n\nfrom scipy.optimize import curve_fit\n\n\ndef learningcurve(x,A,b):\n y=A*(np.exp(-x*b))\n return y\n\n# Colormap for AoA\ncmap =...
[ [ "scipy.optimize.curve_fit", "numpy.exp", "matplotlib.pyplot.subplots", "pandas.read_json", "numpy.arange", "matplotlib.pyplot.show", "matplotlib.pyplot.cm.get_cmap" ] ]
stefan-falk/tensor2tensor
[ "7ea91197843399ddf46ebf78c9d42c2a573a4335" ]
[ "tensor2tensor/models/research/rl.py" ]
[ "# coding=utf-8\n# Copyright 2019 The Tensor2Tensor 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 requir...
[ [ "tensorflow.exp", "tensorflow.reduce_min", "tensorflow.reshape", "tensorflow.zeros_like", "tensorflow.clip_by_value", "tensorflow.cast", "tensorflow.random_normal_initializer", "tensorflow.shape", "tensorflow.concat", "tensorflow.layers.flatten", "tensorflow.logging.inf...
manueltonneau/electra-1
[ "d02495609c6d90d71dbc3af2c5a7329316581e13" ]
[ "run_pretraining.py" ]
[ "# coding=utf-8\n# Copyright 2020 The Google Research 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 requ...
[ [ "tensorflow.compat.v1.distribute.cluster_resolver.TPUClusterResolver", "tensorflow.compat.v1.zeros", "tensorflow.compat.v1.nn.bias_add", "tensorflow.compat.v1.estimator.tpu.TPUEstimator", "tensorflow.compat.v1.equal", "tensorflow.compat.v1.trainable_variables", "tensorflow.compat.v1.ge...
azizullah2017/conversational-datasets
[ "932050fbfa0f650c43a3a4df78238e0fcf848f3f" ]
[ "amazon_qa/create_data.py" ]
[ "\"\"\"A Dataflow script for creating Amazon question/answer data.\n\nFor usage see README.md.\n\"\"\"\n\n\nimport argparse\nimport ast\nimport hashlib\nimport json\nimport logging\nimport os\nimport uuid\nfrom functools import partial\n\nimport apache_beam as beam\nimport tensorflow as tf\nfrom apache_beam import ...
[ [ "tensorflow.train.Example" ] ]
Anatoly1010/Atomize_NIOCH
[ "9359f2ee31e71ee3b2e210ad5ccc2dc3ad3dfbe0" ]
[ "atomize/tests/pulse_epr/01_resonator_tuning.py" ]
[ "import sys\nimport signal\nimport numpy as np\nimport atomize.general_modules.general_functions as general\nimport atomize.device_modules.Keysight_3000_Xseries as t3034\nimport atomize.device_modules.Mikran_X_band_MW_bridge as mwBridge\nimport atomize.device_modules.PB_ESR_500_pro as pb_pro\n#import atomize.genera...
[ [ "numpy.transpose", "numpy.zeros" ] ]
ReDrawing/redrawing
[ "20743f0c8d64d9d2e15cefa840423c9698c74653" ]
[ "src/redrawing/ai_models/third_models/oak_blazepose/BlazeposeDepthai.py" ]
[ "import numpy as np\nfrom collections import namedtuple\nfrom . import mediapipe_utils as mpu\nimport cv2\nfrom pathlib import Path\nfrom .FPS import FPS, now\nimport argparse\nimport os\nimport depthai as dai\nfrom math import atan2\n\nimport open3d as o3d\nfrom .o3d_utils import create_segment, create_grid\nimpor...
[ [ "numpy.array", "numpy.asarray", "numpy.degrees", "numpy.hstack", "numpy.expand_dims" ] ]
ManuelNavarroGarcia/cpsplines
[ "544e8ccf7e438a192dea6c4a4e685d9346f57f9a" ]
[ "tests/test_b_matrix.py" ]
[ "import numpy as np\r\nimport pytest\r\nfrom cpsplines.psplines.bspline_basis import BsplineBasis\r\nfrom cpsplines.utils.weighted_b import get_idx_fitting_region, get_weighted_B\r\n\r\nB1 = (1 / 8) * np.array(\r\n [\r\n [4, 4, 0, 0, 0, 0, 0],\r\n [1, 6, 1, 0, 0, 0, 0],\r\n [0, 4, 4, 0, 0, 0...
[ [ "numpy.testing.assert_allclose", "numpy.array", "numpy.linspace" ] ]
jiyongze/yolov4-tiny-pytorch
[ "1eaf47512bc70982ad558625bb3741cce854169e" ]
[ "utils/callbacks.py" ]
[ "import datetime\r\nimport os\r\n\r\nimport torch\r\nimport matplotlib\r\nmatplotlib.use('Agg')\r\nimport scipy.signal\r\nfrom matplotlib import pyplot as plt\r\nfrom torch.utils.tensorboard import SummaryWriter\r\n\r\n\r\nclass LossHistory():\r\n def __init__(self, log_dir, model, input_shape):\r\n time_...
[ [ "matplotlib.use", "matplotlib.pyplot.grid", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.legend", "matplotlib.pyplot.close", "matplotlib.pyplot.cla", "matplotlib.pyplot.figure", "torch.randn", "matplotlib.pyplot.ylabel", "torch.utils.tensorbo...
archu2020/python-2
[ "3975c678d985c468deecd03560d882e9d316bb63" ]
[ "DeepLearning/YOLOv3/video_demo.py" ]
[ "import cv2\nimport time\nimport numpy as np\nimport core.utils as utils\nimport tensorflow as tf\nfrom PIL import Image\n\n\nreturn_elements = [\"input/input_data:0\", \"pred_sbbox/concat_2:0\", \"pred_mbbox/concat_2:0\", \"pred_lbbox/concat_2:0\"]\npb_file = \"./yolov3_coco.pb\"\nvideo_path = \"./doc...
[ [ "numpy.reshape", "numpy.asarray", "tensorflow.Graph", "tensorflow.Session", "numpy.copy" ] ]
mayankanand007/cudf
[ "a4730f30ce46c336de7ed71c509dcb6c9c1f6d3d", "a4730f30ce46c336de7ed71c509dcb6c9c1f6d3d" ]
[ "python/cudf/cudf/core/cut.py", "python/cudf/cudf/tests/test_gcs.py" ]
[ "from collections.abc import Sequence\n\nimport cupy\nimport numpy as np\nimport pandas as pd\n\nimport cudf\nfrom cudf.api.types import is_list_like\nfrom cudf.core.column import as_column, build_categorical_column\nfrom cudf.core.index import IntervalIndex, interval_range\n\n\ndef cut(\n x,\n bins,\n rig...
[ [ "numpy.around", "numpy.linspace" ], [ "pandas.DataFrame", "numpy.array" ] ]
searobbersduck/FattyLiver_Solution
[ "7b8542e70cdb4417889799ea6da2c794e9eae392" ]
[ "copy/train_diff_3d_cls2.py" ]
[ "import os\nimport sys\n\nsys.path.append(os.path.join(os.path.dirname(__file__), os.path.pardir))\n\nimport numpy as np\nimport sys\nimport scipy.ndimage as nd\nimport json\nimport pickle\nimport torch\nimport torch.nn as nn\nimport torchvision\nfrom torch.utils.data import Dataset, DataLoader\n# from models.resne...
[ [ "numpy.equal", "numpy.array", "torch.nn.functional.softmax", "torch.max", "numpy.round", "torch.utils.data.DataLoader", "torch.load", "numpy.append", "numpy.all", "torch.nn.CrossEntropyLoss", "torch.nn.DataParallel" ] ]
limn2o4/analytics-zoo
[ "78d6ce10976a7e1320ff5ebdf431db93a439ec56" ]
[ "pyzoo/test/zoo/chronos/data/utils/test_impute.py" ]
[ "#\n# Copyright 2018 Analytics Zoo 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 ...
[ [ "pandas.DataFrame", "pandas.date_range", "numpy.random.random_sample" ] ]
ali-manhani/fun-simulations
[ "47f96279cc14e410c1216ada4a144d62225979ec" ]
[ "non-linear_dynamics_and_chaos/cobweb_plot/cobweb.py" ]
[ "#!/usr/bin/env python\n\n\"\"\" Code to draw the cobweb diagram of a recursive fucntion \"\"\"\n\nimport numpy as np\nfrom matplotlib import pyplot as plt\n\n\ndef f(x, r):\n \"\"\" the function in question \"\"\"\n return x * r * (1 - x)\n\n\ndef iterate(func, r, iter_num):\n \"\"\" function to generate ...
[ [ "matplotlib.pyplot.savefig", "matplotlib.pyplot.title", "matplotlib.pyplot.subplots", "numpy.random.uniform", "matplotlib.pyplot.show", "numpy.linspace" ] ]
ddatta-DAC/NOAA_Weather_Fetcher
[ "84baf6facf5f3ba3128df012b66420f0156c3f76" ]
[ "src/week_util.py" ]
[ "import pandas as pd\nfrom datetime import datetime\nfrom datetime import timedelta\nimport os\nimport sys\n\nsys.path.append('./../..')\nsys.path.append('./..')\nimport common_utils\n\nformat = \"%Y-%m-%d\"\nfile_location = './../aux_data'\nweek_info_file = 'year_week_data.csv'\nseason_year_week_file = 'season_yea...
[ [ "pandas.read_csv" ] ]
caotians1/OD-test-master
[ "e272421294a3614bdcdb3a4e4b530f613dad1a1c" ]
[ "setup/categories/deep_ensemble_setup.py" ]
[ "from __future__ import print_function\nimport os\nfrom termcolor import colored\n\nimport torch\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader\n\nimport models as Models\nimport global_vars as Global\nfrom utils.iterative_trainer import IterativeTrainer, IterativeTrainerConfig\nfrom utils.lo...
[ [ "torch.optim.lr_scheduler.ReduceLROnPlateau", "torch.save", "torch.utils.data.DataLoader", "torch.load" ] ]
tao-pr/52-challenges
[ "21c1723b8bb64c0a52afcca8f429b97e9948e86a" ]
[ "011-tensor/tensor/run.py" ]
[ "import tensorflow as tf\nimport numpy as np\nimport joblib\nimport logging\nimport json\n\nimport argparse\nimport sys\nimport os\nimport cv2\n\nfrom .model import build\nfrom .data import DataSet\n\n# Log to file and print to stdout simulteneously\nlogging.basicConfig(filename='tensor.log',level=logging.DEBUG)\nl...
[ [ "numpy.array" ] ]
w-klijn/TVB-NEST
[ "f3a4e18c9c6aab9d39d7ab45097d2fa98418cc1e" ]
[ "nest_elephant_tvb/translation/science_tvb_to_nest.py" ]
[ "# Copyright 2020 Forschungszentrum Jülich GmbH and Aix-Marseille Université\n# \"Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements; and to You under the Apache License, Version 2.0. \"\n\nimport numpy as np\nfrom nest_elephant_tvb.translation.rate_spike import rates...
[ [ "numpy.concatenate", "numpy.array", "numpy.random.binomial", "numpy.random.rand", "numpy.random.seed", "numpy.where", "numpy.repeat" ] ]
colour-science/prysm
[ "6673eaada6766f4debd910c445741accfc25aac2" ]
[ "prysm/coordinates.py" ]
[ "''' Coordinate conversions\n'''\nimport numpy as np\nfrom scipy import interpolate\n\nfrom prysm.mathops import pi, sqrt, atan2, cos, sin, exp\n\n\ndef cart_to_polar(x, y):\n ''' Returns the (rho,phi) coordinates of the (x,y) input points.\n\n Args:\n x (float): x coordinate.\n\n y (float): y c...
[ [ "numpy.angle", "scipy.interpolate.RectBivariateSpline", "numpy.linspace", "scipy.interpolate.RegularGridInterpolator", "numpy.meshgrid" ] ]
nusnlp/neuralreord-aaai2017
[ "82e04d1b5beadda9c8c0b8a684fe0aa8230852e3" ]
[ "tools/DependencyReordering/nnAdapt/models/logistic_sgd_beta_zeros.py" ]
[ "#!/usr/bin/python\n\"\"\"\nThis code is adapted from Deep Learning tutorial introducing logistic regression\nusing Theano and stochastic gradient descent.\n\n\"\"\"\n__docformat__ = 'restructedtext en'\n\nimport cPickle\nimport gzip\nimport os\nimport sys\nimport timeit\n\nimport numpy\n\nimport theano\nimport the...
[ [ "numpy.zeros" ] ]
giordafrancis/DSfS
[ "e854db2da376e1c3efe7740073b55f8692cb0863" ]
[ "old_dsfs/1_probability.py" ]
[ "# -*- coding: utf-8 -*-\n# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py:light\n# text_representation:\n# extension: .py\n# format_name: light\n# format_version: '1.4'\n# jupytext_version: 1.2.1\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.legend", "matplotlib.pyplot.plot" ] ]
Django-Jiang/BigDL
[ "542c0e18f93eaafa571613fd5951278ddaf5446d" ]
[ "python/chronos/test/bigdl/chronos/autots/test_autotsestimator.py" ]
[ "#\n# Copyright 2016 The BigDL 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 ...
[ [ "torch.nn.Linear", "torch.nn.Dropout", "numpy.array", "torch.nn.MSELoss", "tensorflow.keras.layers.Input", "sklearn.preprocessing.StandardScaler", "numpy.testing.assert_almost_equal", "pandas.date_range", "numpy.random.randn", "torch.unsqueeze", "torch.nn.ReLU", "te...
mack-the-psych/plimac3
[ "7b47abf7a087961e5a3e9c90b1ae20d07b3d6898" ]
[ "Lib/ac_hyponyms.py" ]
[ "################################################################################\n# This module retrieves hyponyms from Wordnet as a part of NLTK module and its\n# corpus. The module recognizes each input pandas.DataFrame record as a unit of \n# assessment content (i.e. a single passage section, an item stem, \n# ...
[ [ "pandas.DataFrame", "pandas.__version__.split", "pandas.merge" ] ]
mo-igor/FIR_CNN-LSTM
[ "e88d7bdfb5a22ad2ce0bb16da8431aaf05de3c4a" ]
[ "main.py" ]
[ "from tools import dataset\nfrom tools.dataset import Dataset\nfrom tools import prepare\nfrom tools import augmentation as augment\n\nimport os\nimport argparse\nimport pandas as pd\n\nfrom glob import glob\nimport collections\nimport re\nimport random\nSEED = None # set to None to use the current system time\nran...
[ [ "tensorflow.keras.utils.to_categorical", "tensorflow.keras.optimizers.SGD", "sklearn.metrics.confusion_matrix", "tensorflow.keras.backend.set_image_data_format", "tensorflow.keras.callbacks.TerminateOnNaN", "numpy.load", "tensorflow.keras.models.Model", "tensorflow.keras.layers.Den...