repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
rishabhchhillar/Image-Classifier | [
"b59331d7b16f97cdc629fab764478aabb6f50fad"
] | [
"funcs.py"
] | [
"#Imports\nimport argparse\nimport torch \nfrom torchvision import datasets, transforms, models\nfrom torch import nn, optim\nimport time\nfrom PIL import Image\nimport numpy as np\n\n#Define arg_parser to parse arguments\ndef arg_parser():\n \n parser = argparse.ArgumentParser()\n \n parser.add_argumen... | [
[
"torch.nn.Dropout",
"torch.nn.LogSoftmax",
"torch.utils.data.DataLoader",
"torch.exp",
"torch.nn.Linear",
"torch.no_grad",
"torch.device",
"torch.nn.ReLU",
"torch.save"
]
] |
jgrss/sacfei | [
"bf65d00be843ffb36d6eefda471be73938e73f56"
] | [
"sacfei/utils.py"
] | [
"from __future__ import division\n\nfrom future.utils import viewitems\nfrom builtins import int, zip\n\nimport concurrent.futures\n\nimport os\nimport itertools\n\nfrom ._adaptive_threshold import threshold as athreshold\nfrom .pool import pooler\nfrom ._moving_window import moving_window\n\n# from mpglue.raster_t... | [
[
"numpy.nanmedian",
"numpy.minimum",
"numpy.sqrt",
"numpy.nanmean",
"numpy.any",
"numpy.nanstd",
"numpy.exp",
"numpy.where",
"numpy.allclose",
"numpy.unique",
"numpy.uint8",
"numpy.interp",
"numpy.float32",
"numpy.zeros",
"numpy.log",
"scipy.ndimage.m... |
Arun-George-Zachariah/pharml | [
"68b23598a0d23a3f8c805e3434b7da526eff1fec"
] | [
"results/covid19-6vsb-example-run-64xV100-full-ensemble/mldock_gnn_backup_12092019.py"
] | [
"#!/usr/bin/env python\n############################################################\n#\n# The model we explore includes three components:\n#\n# - An \"Encoder\" graph net, which independently encodes the edge, node, and\n# global attributes (does not compute relations etc.).\n#\n# - A \"Core\" graph net, which p... | [
[
"matplotlib.pyplot.legend",
"tensorflow.concat",
"tensorflow.cast",
"matplotlib.pyplot.plot",
"tensorflow.train.AdamOptimizer",
"tensorflow.contrib.layers.variance_scaling_initializer",
"tensorflow.truncated_normal_initializer",
"tensorflow.train.get_or_create_global_step",
"te... |
haakanbaarman/python_speech_features | [
"311349f4898c75246f2bb05f35f6e7ea9379352e"
] | [
"python_speech_features/base.py"
] | [
"# calculate filterbank features. Provides e.g. fbank and mfcc features for use in ASR applications\n# Author: James Lyons 2012\nfrom __future__ import division\nimport numpy\nfrom python_speech_features import sigproc\nfrom scipy.fftpack import dct\n\ndef calculate_nfft(samplerate, winlen):\n \"\"\"Calculates t... | [
[
"numpy.dot",
"numpy.log",
"numpy.pad",
"numpy.linspace",
"numpy.empty_like",
"numpy.arange",
"numpy.ones",
"numpy.finfo",
"scipy.fftpack.dct",
"numpy.size",
"numpy.log10",
"numpy.shape",
"numpy.sin",
"numpy.zeros",
"numpy.sum"
]
] |
alexandru-dinu/hmm | [
"194f55229a94da473eb3223027abe933be10f7a6"
] | [
"src/utils.py"
] | [
"import numpy as np\n\n\ndef sample_from(distribution):\n # s, t = .0, np.random.sample()\n # for (value, p) in distribution:\n # s += p\n # if s >= t:\n # return value\n # raise ValueError(\"Probabilities \" + str(distribution) + \" do not sum to one!\")\n\n values, probs = zip... | [
[
"numpy.array"
]
] |
jackie930/amazon-sagemaker-deploy-nlp-huggingface | [
"544a08e7ddac53dd3ffa38e58e114d363b1270f3"
] | [
"multi-model/default-pytorch-dl-container/source_dir/model3/inference.py"
] | [
"# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n# SPDX-License-Identifier: MIT-0\nimport subprocess\nsubprocess.call([\"pip\", \"install\", \"transformers==4.4.2\"])\nimport logging\nimport json\nimport torch \n\nfrom transformers import BertTokenizer\nfrom modeling_cpt import CPTModel, CPTFo... | [
[
"torch.cuda.is_available"
]
] |
D4shka/MMEmotionRecognition | [
"37572a506f8247eb5b14d59139e1f9b52f5f694b",
"37572a506f8247eb5b14d59139e1f9b52f5f694b",
"37572a506f8247eb5b14d59139e1f9b52f5f694b"
] | [
"src/Video/models/sequenceLearning/dataloaders/dataloaders.py",
"src/Video/models/sequenceLearning/utils/training.py",
"src/Audio/FineTuningWav2Vec/main_FineTuneWav2Vec_CV.py"
] | [
"import os\nimport numpy\nimport pickle\nimport pandas as pd\n\nfrom collections import Counter\nfrom os.path import exists, join\nfrom torch.utils.data import Dataset\n\nfrom src.Video.models.sequenceLearning.environment import CACHE_PATH\nfrom src.Video.models.sequenceLearning.utils.preprocessors import vectorize... | [
[
"pandas.read_csv",
"numpy.std",
"numpy.mean",
"numpy.load",
"numpy.array"
],
[
"torch.optim.Adam",
"torch.nn.CrossEntropyLoss",
"numpy.unique",
"sklearn.utils.compute_class_weight",
"torch.nn.BCEWithLogitsLoss",
"torch.nn.MSELoss"
],
[
"numpy.squeeze",
"... |
mtdev2/covid-19-germany-gae | [
"8298821267b70857047d433b4450eee62ab4db42"
] | [
"tools/csv-epsilon-merge.py"
] | [
"# MIT License\n\n# Copyright (c) 2020 Dr. Jan-Philip Gehrcke\n\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use... | [
[
"pandas.read_csv",
"pandas.to_datetime"
]
] |
4lrz/ml-newbie | [
"64bbf77fb3b5bf4fe7479eb75ea6182714de36f3"
] | [
"som/challenge-1/iris.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nfrom sklearn import datasets\nfrom som.SelfOrganizedMap import SOM\n\n\n# https://tcosmo.github.io/2017/07/27/fun-with-som.html\n\niris = datasets.load_iris()\nX = iris.data[:, :]\ny = iris.target\nnp.random.seed(1)\nweight = 0.01\nindices = np.random.permutatio... | [
[
"sklearn.datasets.load_iris",
"numpy.random.seed"
]
] |
anujkumar93/metrics-mvp | [
"c55f520026b5798e0178a501e1f65aa225cd58b8"
] | [
"backend/models/eclipses.py"
] | [
"import time\nfrom datetime import datetime, date, timedelta, timezone\nimport pytz\nimport pandas as pd\nimport numpy as np\nfrom . import routeconfig, util, config\n\ndef produce_buses(route_state: dict) -> pd.DataFrame:\n buses = pd.io.json.json_normalize(route_state,\n re... | [
[
"pandas.concat",
"numpy.nonzero",
"numpy.min",
"numpy.unique",
"pandas.option_context",
"pandas.DataFrame",
"numpy.diff",
"numpy.any",
"numpy.floor",
"pandas.io.json.json_normalize",
"numpy.logical_and"
]
] |
SubramaniKrishna/VaPar-Synth | [
"51ce07de856365f9c3c9637c048eacbb70d5f38a",
"e7c496eb5fd4b8694eab0fc049cf98a5e3dfd886"
] | [
"extra_dependencies/models/sineModel.py",
"extra_dependencies/models/hpsModel.py"
] | [
"# functions that implement analysis and synthesis of sounds using the Sinusoidal Model\n# (for example usage check the examples models_interface)\n\nimport numpy as np\nfrom scipy.signal import blackmanharris, triang\nfrom scipy.fftpack import ifft, fftshift\nimport math\nimport dftModel as DFT\nimport utilFunctio... | [
[
"scipy.fftpack.ifft",
"scipy.signal.triang",
"numpy.nonzero",
"scipy.signal.blackmanharris",
"numpy.copy",
"numpy.delete",
"numpy.append",
"numpy.random.rand",
"numpy.insert",
"numpy.argsort",
"numpy.array",
"numpy.zeros",
"numpy.vstack"
],
[
"numpy.maxi... |
HaotianZhang96/FDS_2020_2021 | [
"c79c5c501b54902b5292742357cba9e33f45a08a"
] | [
"part_3_match_module.py"
] | [
"import numpy as np\nfrom PIL import Image\nimport matplotlib.pyplot as plt\n\nimport histogram_module\nimport dist_module\n\n\ndef rgb2gray(rgb):\n r, g, b = rgb[:, :, 0], rgb[:, :, 1], rgb[:, :, 2]\n gray = 0.2989 * r + 0.5870 * g + 0.1140 * b\n\n return gray\n\n\n# model_images - list of file names of m... | [
[
"matplotlib.pyplot.title",
"matplotlib.pyplot.subplot",
"numpy.argmin",
"numpy.argsort",
"numpy.array",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
chunbo777/RECIPENLGforMC | [
"144e4d5fe9d02a0dc644b018322268fa30af984e"
] | [
"generation_kogpt/run_finetuning_kogpt.py"
] | [
"\"\"\"\nFine-tuning the library models for language modeling on a text file (GPT-2,).\nGPT-2 is fine-tuned using a causal language modeling (CLM) loss\n\"\"\"\n\nimport argparse\nimport glob\nimport logging\nimport os\nimport random\nimport gc\nimport h5py\nimport boto3\nimport shutil\n\nimport numpy as np\nimport... | [
[
"torch.utils.data.SequentialSampler",
"torch.utils.data.DataLoader",
"torch.utils.data.RandomSampler",
"torch.cuda.empty_cache",
"torch.tensor",
"torch.no_grad",
"torch.utils.tensorboard.SummaryWriter",
"torch.cuda.is_available",
"torch.cuda.device_count"
]
] |
gyu-don/OpenFermion | [
"bed55bed7050f60c365b6544b556806886d8a2ee"
] | [
"src/openfermion/ops/_interaction_operator_test.py"
] | [
"# 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 agreed to in writing, software... | [
[
"numpy.array_equal",
"numpy.eye",
"numpy.ones",
"numpy.zeros_like",
"numpy.zeros"
]
] |
JT-Ushio/gnn-dep-parsing-1 | [
"3fcd142d425756d31e8fd3cd38174383d6eff87b"
] | [
"gnn-dep-parser/src/utils/PTB_dataset.py"
] | [
"from typing import Dict, List, Callable, Union, Set\nfrom overrides import overrides\nfrom antu.io.vocabulary import Vocabulary\nfrom antu.io.instance import Instance\nfrom antu.io.datasets.dataset import Dataset\nfrom antu.io.dataset_readers.dataset_reader import DatasetReader\nimport random\nfrom itertools impor... | [
[
"numpy.eye",
"numpy.array"
]
] |
yuxiang-gao/HeteroCrowdNav | [
"2bb35def26b8dd1836affbf24d2a5262f06159c7"
] | [
"crowd_sim/envs/crowd_sim.py"
] | [
"import logging\nimport gym\nimport matplotlib.lines as mlines\nimport numpy as np\nimport rvo2\nfrom matplotlib import patches\nfrom numpy.linalg import norm\nfrom crowd_sim.envs.utils.human import Human\nfrom crowd_sim.envs.utils.info import *\nfrom crowd_sim.envs.utils.utils import point_to_segment_dist\n\n\ncla... | [
[
"matplotlib.pyplot.legend",
"matplotlib.pyplot.plot",
"numpy.arctan2",
"numpy.max",
"matplotlib.patches.ArrowStyle",
"numpy.iinfo",
"numpy.reshape",
"numpy.sin",
"matplotlib.pyplot.Circle",
"matplotlib.pyplot.subplot",
"matplotlib.pyplot.cm.get_cmap",
"numpy.min",
... |
Matheusqz/pucpr-ciencia-de-dados | [
"28a833a902dba41a35dc9d02bc5607a66aca78b0"
] | [
"02-am/10-trabalho/LBP.py"
] | [
"import cv2\r\nimport numpy as np\r\nimport pandas as pd\r\nimport re\r\nimport math\r\n\r\nfrom skimage import feature\r\nfrom imutils import paths\r\n\r\ndef label(n):\r\n return {\r\n 0: 'c1',\r\n 1: 'c2',\r\n 2: 'c3',\r\n 3: 'c4',\r\n 4: 'c5',\r\n 5: 'c6',\r\n ... | [
[
"numpy.ravel",
"pandas.DataFrame"
]
] |
kashmoneygt/tensorflow_workshop | [
"8cf9851a39a0a26c4c31556ac9abf98d0b1b3540"
] | [
"MNISTExample.py"
] | [
"import tensorflow as tf\nimport numpy as np\n\ndef normalize(v):\n norm=np.linalg.norm(v)\n if norm==0: \n return v\n return v/norm\n\ndef readToLines(file):\n csvFile=open(file)\n lines=csvFile.read().splitlines()\n csvFile.close()\n splitLines=[]\n for line in lines:\n splitL... | [
[
"tensorflow.matmul",
"tensorflow.InteractiveSession",
"tensorflow.zeros",
"tensorflow.cast",
"tensorflow.placeholder",
"numpy.linalg.norm",
"tensorflow.initialize_all_variables",
"tensorflow.train.GradientDescentOptimizer",
"tensorflow.log",
"tensorflow.argmax"
]
] |
jasjung/Python | [
"dfe8f490aff610cc295fac54c117b7afe891bb8e"
] | [
"AWS/TF_World_SageMaker_Workshop/workshop3-distributed-training-workshop-master/notebooks/part-2-sagemaker/code/cifar10-multi-gpu-horovod-sagemaker.py"
] | [
"import tensorflow as tf\nimport horovod.tensorflow.keras as hvd\n\nfrom datetime import datetime\nimport argparse\nimport os\nimport numpy as np\nimport codecs\nimport json\nimport boto3\n\nimport tensorflow.keras.backend as K\nfrom tensorflow import keras\nfrom tensorflow.keras.layers import Input, Dense, Flatten... | [
[
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.image.resize_image_with_crop_or_pad",
"tensorflow.image.random_flip_left_right",
"tensorflow.FixedLenFeature",
"tensorflow.data.TFRecordDataset",
"tensorflow.decode_raw",
"tensorflow.cast",
"tensorflow.keras.callbacks.Reduce... |
jhcho99/CoFormer | [
"8a1f1fca94f9c392d83abc2e7bed15a424998c65"
] | [
"main.py"
] | [
"# ----------------------------------------------------------------------------------------------\n# CoFormer Official Code\n# Copyright (c) Junhyeong Cho. All Rights Reserved \n# Licensed under the Apache License 2.0 [see LICENSE for details]\n# ---------------------------------------------------------------------... | [
[
"torch.utils.data.DistributedSampler",
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.utils.data.SequentialSampler",
"torch.utils.data.DataLoader",
"torch.utils.data.RandomSampler",
"torch.optim.AdamW",
"torch.device",
"torch.utils.data.BatchSampler",
"t... |
lichunshang/tfoptflow | [
"3f99da46f79376d627d9ae579b0becb623f0cec6"
] | [
"tfoptflow/ckpt_mgr.py"
] | [
"\"\"\"\nckpt_mgr.py\n\nMaintains a directory containing only the best n checkpoints.\n\nWritten by Domenick Poster, modifications by Phil Ferriere\n\nModifications licensed under the MIT License (see LICENSE for details)\n\nBased on:\n - https://github.com/vonclites/checkmate/blob/master/checkmate.py\n W... | [
[
"tensorflow.train.Saver"
]
] |
kpaskov/FamilySeqError | [
"d85767dea5d23c6f6908cb696dc0b6ef561d1fc7"
] | [
"parameter_estimation/calculate_metrics.py"
] | [
"import numpy as np\n\n## ------------------------------------ Calculate Various Metrics ------------------------------------\n\ndef add_observed_counts(params, counts, j, m, gens, obss):\n for i, obs in enumerate(obss):\n params['observed_%s' % obs] = int(np.sum(counts[tuple(i if x==j else slice(None, No... | [
[
"numpy.log10",
"numpy.sum"
]
] |
MickaelRigault/sncosmo | [
"6b934228f7d3734223e4f21cb590a24d76e39511",
"6b934228f7d3734223e4f21cb590a24d76e39511"
] | [
"sncosmo/spectral.py",
"sncosmo/fitting.py"
] | [
"# Licensed under a 3-clause BSD style license - see LICENSE.rst\n\nimport abc\nimport math\nfrom copy import deepcopy\n\nimport numpy as np\n\nfrom astropy.utils import OrderedDict, lazyproperty\nfrom astropy.io import ascii\nimport astropy.units as u\nimport astropy.constants as const\nfrom astropy import cosmolo... | [
[
"numpy.gradient",
"numpy.asarray",
"numpy.ediff1d",
"numpy.flipud",
"numpy.interp",
"numpy.sum"
],
[
"numpy.diag",
"numpy.dot",
"numpy.linspace",
"numpy.min",
"numpy.linalg.inv",
"numpy.invert",
"numpy.ones",
"numpy.all",
"numpy.max",
"numpy.rand... |
Sparxxz/Flood-Rainfall-Disaster-Prediction-Website | [
"ed7866c717bf438e0160c903830951db36c3b0a2"
] | [
"sourceCode/trained/trainer/daily_runoff_prophet.py"
] | [
"\n# Let's start off by importing the relevant libraries\nimport pandas as pd\nimport numpy as np\nimport math\nimport itertools\nfrom sklearn.cluster import KMeans\nfrom sklearn.metrics import pairwise_distances_argmin\nfrom sklearn.preprocessing import MinMaxScaler\nfrom datetime import datetime\nimport time\nimp... | [
[
"sklearn.externals.joblib.dump",
"pandas.to_datetime",
"pandas.read_excel",
"matplotlib.pyplot.title",
"sklearn.metrics.mean_absolute_error",
"pandas.DataFrame",
"sklearn.preprocessing.MinMaxScaler"
]
] |
ehsangolshani/workload-predictor | [
"517182fd9044b3a8c8f86c313b4b0d314d352c43"
] | [
"custom_datasets/windowed_dataset.py"
] | [
"import torch\nfrom torch.utils.data.dataset import Dataset\nimport pandas as pd\n\n\nclass WindowedWorkloadDataset(Dataset):\n def __init__(self, csv_path: str, window_size: int):\n self.data = pd.read_csv(csv_path)[['normalized_request_rate']]\n self.data_tensor: torch.Tensor = torch.tensor(data=... | [
[
"pandas.read_csv",
"torch.tensor"
]
] |
jiyunyoung/openfl | [
"85657e0bb0b951912fe847af5076555a565c348e"
] | [
"openfl/utilities/utils.py"
] | [
"# Copyright (C) 2020-2021 Intel Corporation\n# SPDX-License-Identifier: Apache-2.0\n\"\"\"Utilities module.\"\"\"\n\nimport hashlib\nimport logging\nimport os\nfrom socket import getfqdn\n\nimport numpy as np\n\n\ndef getfqdn_env(name: str = '') -> str:\n \"\"\"\n Get the system FQDN, with priority given to ... | [
[
"numpy.issubdtype"
]
] |
NEU-Libraries/dsg-mhs | [
"c831da06c53c8fcd7567170c02f59ee2810a9055"
] | [
"Jupyter_Notebooks/Interfaces/NER_Application/Dash/NER-XML-Helper/application.py"
] | [
"#!/usr/bin/env python\n# coding: utf-8\n\nimport warnings, re, glob, datetime, csv, sys, os, base64, io, spacy\nimport pandas as pd\nimport numpy as np\nfrom lxml import etree\n\nimport dash, dash_table\nimport dash_core_components as dcc\nfrom dash.dependencies import Input, Output, State\nimport dash_html_compon... | [
[
"pandas.DataFrame"
]
] |
sluh-hackclub/DiagnoSys | [
"ad8922633688aee50ccfcf0a9a397471efce6fbc"
] | [
"ml/mlapi.py"
] | [
"from flask import Flask, render_template, flash, request, url_for, redirect, jsonify\nfrom symptom_prediction import SymptomClassifier\nfrom disease_prediction import DiseaseClassifier\nimport pandas as pd\nimport numpy as np\n\nsymptom_df = pd.read_csv('cleaned_final_data.csv').rename(columns={'Unnamed: 0': 'dise... | [
[
"numpy.array",
"pandas.read_csv"
]
] |
TimVan1596/ACM-ICPC | [
"07f7d728db1ecd09c5a3d0f05521930b14eb9883"
] | [
"python/TensorFlow/main.py"
] | [
"# -*- coding:utf-8 -*-\n# @Time:2020/8/18 2:11\n# @Author:TimVan\n# @File:main.py\n# @Software:PyCharm\n\nimport os\nimport tensorflow as tf\n# from tensorflow.python.client import device_lib\n\n# os.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"99\"\n\nif __name__ == \"__main__\":\n print(tf.__version__)\n # sess... | [
[
"tensorflow.test.gpu_device_name"
]
] |
megagonlabs/coop | [
"e3d5a13641d5d2cd689a905c8eaa1fd3ef29784d"
] | [
"coop/reader.py"
] | [
"import json\nimport linecache\nfrom pathlib import Path\nfrom typing import List\n\nimport torch.tensor\nfrom torch.nn.utils.rnn import pad_sequence\nfrom torch.utils.data import Dataset\n\nfrom .tokenizer import Tokenizer\n\n\ndef get_length(fp):\n i = 0\n for i, _ in enumerate(open(fp), 1):\n pass\n... | [
[
"torch.nn.utils.rnn.pad_sequence"
]
] |
AliGhadirzadeh/KTH_RL_COURSE_DD3359 | [
"43bf9ca0851d32588ba980abbd18eeef8ea30b17"
] | [
"ppo.py"
] | [
"# MIT License\n# Copyright (c) 2020 Ali Ghadirzadeh\n#\n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, ... | [
[
"torch.mean",
"torch.nn.init.uniform_",
"torch.distributions.MultivariateNormal",
"torch.cat",
"torch.zeros",
"torch.clone",
"torch.min",
"torch.utils.data.DataLoader",
"torch.tensor",
"torch.exp",
"torch.nn.Linear",
"torch.nn.init.zeros_",
"torch.clamp",
"t... |
kant/vframe_synthetic | [
"70158d0e4e2b143099bf4a7670d12f9d9e17b05c"
] | [
"cli/app/commands/convert/mask_to_bbox.py"
] | [
"import click\n\nfrom app.models import types\nfrom app.settings import app_cfg\nfrom app.utils import click_utils\n\n@click.command()\n@click.option('-i', '--input', 'opt_dir_in', required=True,\n help='Path to project folder (metadata.csv, mask, real)')\n@click.option('-f', '--force', 'opt_force', is_flag=True,\... | [
[
"pandas.read_csv",
"numpy.unique",
"pandas.DataFrame.from_dict"
]
] |
javoweb/Mask_RCNN | [
"a531386e05a8a3cae303699ccd027fa13be750ab"
] | [
"mrcnn/model.py"
] | [
"\"\"\"\nMask R-CNN\nThe main Mask R-CNN model implementation.\n\nCopyright (c) 2017 Matterport, Inc.\nLicensed under the MIT License (see LICENSE for details)\nWritten by Waleed Abdulla\n\"\"\"\n\nimport os\nimport random\nimport datetime\nimport re\nimport math\nimport logging\nfrom collections import OrderedDict... | [
[
"numpy.amax",
"numpy.expand_dims",
"tensorflow.concat",
"tensorflow.control_dependencies",
"tensorflow.stack",
"tensorflow.reduce_sum",
"tensorflow.minimum",
"tensorflow.cast",
"tensorflow.image.non_max_suppression",
"tensorflow.equal",
"tensorflow.image.crop_and_resize... |
PlantandFoodResearch/MCHap | [
"ea25c3af889275d742e64e722ceeed0f7201f690"
] | [
"mchap/tests/test_calling/test_calling_likelihood.py"
] | [
"import numpy as np\nimport pytest\nfrom numba import njit\n\nfrom mchap.calling.likelihood import (\n log_likelihood_alleles,\n log_likelihood_alleles_cached,\n)\nfrom mchap.assemble.likelihood import log_likelihood\nfrom mchap.testing import simulate_reads\n\n\n@pytest.mark.parametrize(\n \"seed\",\n ... | [
[
"numpy.random.seed",
"numpy.full",
"numpy.random.randint",
"numpy.empty",
"numpy.testing.assert_array_almost_equal"
]
] |
leaprovenzano/torforce | [
"cb2f3222d40caa52da3c968580ca5a2ae3789d2f"
] | [
"src/torforce/modules/utils.py"
] | [
"\"\"\"grad and modeling utils\"\"\"\n\nfrom contextlib import contextmanager\nimport functools\n\nimport torch\nfrom torch import nn\n\n\ndef freeze(model: nn.Module):\n \"\"\"Freeze all parameters in the given model.\n \"\"\"\n for param in model.parameters():\n param.requires_grad = False\n\n\nde... | [
[
"torch.no_grad"
]
] |
niccw/NORBIS901_practical_report | [
"b4acd717e1b23bd6714b98b958c1d921f1e74237"
] | [
"alignment_with_anchor.py"
] | [
"#!/usr/bin/env python3\n\nimport sys\nimport re\nimport argparse\nimport numpy as np\nfrom collections import OrderedDict\n\n\nclass Seq:\n def __init__(self,seq_id:str,seq:str):\n self.seq_id = seq_id\n self.seq = seq\n self.idx = None\n\n def __repr__(self):\n return {\n ... | [
[
"numpy.zeros"
]
] |
cgeorgitsis/ai4netmon | [
"36c4c1695fd980705d3e3f76385cda14baf7f397",
"36c4c1695fd980705d3e3f76385cda14baf7f397"
] | [
"graph_embeddings/graph_representation.py",
"Analysis/Karateclub_Library/call_library_method.py"
] | [
"import pandas as pd\nimport networkx as nx\nimport tempfile\nimport os.path\nfrom node2vec import Node2Vec\nfrom gensim.models import Word2Vec\n\n# temp_dir = tempfile.TemporaryDirectory()\n# print(temp_dir.name)\n\ndata = pd.read_csv('../Datasets/AS-relationships/20210701.as-rel2.txt', sep=\"|\", skiprows=180)\nd... | [
[
"pandas.read_csv"
],
[
"pandas.read_csv",
"numpy.insert",
"pandas.DataFrame"
]
] |
samrat-halder/models | [
"36ba8d10547c1925acc84580325adc4df3726304"
] | [
"official/nlp/modeling/networks/span_labeling.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.keras.layers.LayerNormalization",
"tensorflow.concat",
"tensorflow.nn.log_softmax",
"tensorflow.keras.utils.register_keras_serializable",
"tensorflow.rank",
"tensorflow.keras.layers.Lambda",
"tensorflow.squeeze",
"tensorflow.nn.top_k",
"tensorflow.tile",
"tensor... |
My-Code-Nikhil/Leaf-Disease-Detection | [
"44f09dad0a086d0e5c19a99cd48c5be2c6c905e0"
] | [
"Training.py"
] | [
"from tensorflow.compat.v1 import ConfigProto\nfrom tensorflow.compat.v1 import InteractiveSession\n\nconfig = ConfigProto()\nconfig.gpu_options.allow_growth = True\nsession = InteractiveSession(config=config)\n\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Conv2D\nfrom tensor... | [
[
"tensorflow.compat.v1.ConfigProto",
"tensorflow.keras.preprocessing.image.ImageDataGenerator",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Conv2D",
"tensorflow.compat.v1.InteractiveSession",
"tensorflow.compat.v1.disable_eager_execution",
"tensorflow.keras.layers.MaxPooli... |
zburning/incubator-mxnet | [
"a8b31a239f5d5ed0ebff0f3be44b5e5534e0b3f5"
] | [
"tests/python/unittest/test_numpy_op.py"
] | [
"# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (the\n# \"License\"); y... | [
[
"numpy.dot",
"numpy.expand_dims",
"numpy.take",
"numpy.linspace",
"numpy.sqrt",
"numpy.einsum",
"scipy.special.erfinv",
"numpy.squeeze",
"numpy.issubdtype",
"numpy.nan_to_num",
"numpy.zeros_like",
"numpy.tri",
"numpy.moveaxis",
"numpy.exp",
"numpy.trace"... |
ohadmen/detectron2 | [
"bcf641a43c6546f9f9abddbbca6b0e4fa31bbe98"
] | [
"detectron2/structures/boxes.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\nimport math\nimport numpy as np\nfrom enum import IntEnum, unique\nfrom typing import List, Tuple, Union\nimport torch\nfrom torch import device\n\nfrom detectron2.utils.env import TORCH_VERSION\n\n_RawBoxType = Union[List[float], Tuple[float, ...], torch.Tensor,... | [
[
"torch.max",
"torch.empty",
"torch.zeros",
"torch.cat",
"torch.sin",
"torch.min",
"numpy.asarray",
"torch.tensor",
"torch.isfinite",
"torch.stack",
"torch.device",
"torch.cos",
"torch.as_tensor"
]
] |
xjdeng/Fastai_lessons | [
"9e4d3d39607cd63c4ba76e31463ee18d90e2f9e5"
] | [
"simple_binary_image_classifier.py"
] | [
"from fastai.imports import *\nfrom fastai.transforms import *\nfrom fastai.conv_learner import *\nfrom fastai.model import *\nfrom fastai.dataset import *\nfrom fastai.sgdr import *\nfrom fastai.plots import *\n\nimport numpy as np\n#import matplotlib.pyplot as plt\nfrom path import Path as path\nimport random\nim... | [
[
"numpy.abs",
"numpy.argmax",
"numpy.argsort",
"numpy.exp",
"numpy.where"
]
] |
YantaoShen/openBCT | [
"69e798c2dd6380572da7a88b68e0e9d31d9b08a4"
] | [
"utils/data/datasets.py"
] | [
"from torch.utils.data import Dataset, DataLoader\nfrom torchvision.datasets import ImageFolder\nfrom PIL import Image, ImageFile\nfrom pathlib import Path\nimport numpy as np\nimport os\nimport pickle\nimport torch\nimport torch.utils.data.distributed\nImageFile.LOAD_TRUNCATED_IMAGES = True\n\n\nclass ImageListDat... | [
[
"torch.utils.data.DataLoader",
"torch.utils.data.distributed.DistributedSampler",
"numpy.unique"
]
] |
PedroUria/detectron2 | [
"53d838d1528c3511838a1a3b35c642291e0df495"
] | [
"projects/DensePose/densepose/data/transform/image.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\nimport torch\n\n\nclass ImageResizeTransform:\n \"\"\"\n Transform that converts frames loaded from a dataset\n (RGB data in NHWC channel order, typically uint8) to a format ready to be\n consumed by DensePose training (BGR float... | [
[
"torch.nn.functional.interpolate"
]
] |
iivek/sandbox | [
"c95653618b7be5022b0a8e217a4e5667badb2449"
] | [
"notebooks/realnvp/realnvp_helpers.py"
] | [
"import numpy as np\nfrom keras import backend as K\nfrom keras.layers import Layer\nfrom keras.engine import InputSpec\n\n\nclass Mask(Layer):\n def __init__(self, mask_type, *args, **kwargs):\n mask_type in ['check_even', 'check_odd', 'channel_even', 'channel_odd']\n self.mask_type = mask_type\n ... | [
[
"numpy.ravel",
"numpy.ones"
]
] |
zju-3dv/multi-person3dpose | [
"f1bf69d650c7d337e73e0bd63b4472737e49ecba",
"f1bf69d650c7d337e73e0bd63b4472737e49ecba"
] | [
"backend/light_head_rcnn/lib/lib_kernel/lib_psroi_pooling/psroi_pooling_op_test.py",
"backend/light_head_rcnn/lib/lib_kernel/lib_nms_dev/nms_op.py"
] | [
"import tensorflow as tf\nimport numpy as np\nimport psroi_pooling_op\nimport psroi_pooling_op_grad\nimport pdb\nimport os\nos.environ[\"CUDA_VISIBLE_DEVICES\"] = '7'\n\n# pdb.set_trace()\n\nrois = tf.convert_to_tensor([[0, 0, 0, 4, 4], [0, 0, 0, 2, 4], [\n 0, 0, 0, 4, 2]], dtype=tf.float... | [
[
"tensorflow.convert_to_tensor",
"numpy.random.rand",
"tensorflow.ConfigProto"
],
[
"tensorflow.load_op_library"
]
] |
tabeak/Labeled-TOF-MRA-with-DP | [
"46fe6a37d493a706cada585447f376c5efc83dce",
"46fe6a37d493a706cada585447f376c5efc83dce"
] | [
"run_gan.py",
"utils/pred_helpers.py"
] | [
"import argparse\nimport os\nimport random\nimport time\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torch.optim as optim\nimport torch.utils.data as data_utils\nimport torchcsprng as prng\n... | [
[
"torch.set_default_tensor_type",
"matplotlib.pyplot.legend",
"torch.cat",
"numpy.asarray",
"matplotlib.pyplot.plot",
"torch.FloatTensor",
"torch.cuda.manual_seed_all",
"torch.cuda.is_available",
"torch.randn",
"torch.utils.data.TensorDataset",
"matplotlib.pyplot.close",... |
TimoHackel/ILA-SCNN | [
"99ff4b3f68877d660dc56e086b6a12d6846b379a",
"99ff4b3f68877d660dc56e086b6a12d6846b379a",
"99ff4b3f68877d660dc56e086b6a12d6846b379a"
] | [
"tensorflow/core/user_ops/gpu_tests/RuntimeMemorySparseDense.py",
"tensorflow/core/user_ops/gpu_tests/multilayer_test_gpu.py",
"tensorflow/core/user_ops/gpu_tests/unit_test_direct_conversion_gpu.py"
] | [
"from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport collections\nimport math\n\nfrom tensorflow.python.framework import constant_op\nfrom tensorflow.python.framework import dtypes\nfrom tensorflow.python.ops import gradient_checker\nfrom tensorfl... | [
[
"tensorflow.python.ops.nn_ops.conv3d",
"tensorflow.device",
"tensorflow.SparseTensor",
"tensorflow.ConfigProto",
"numpy.copy",
"tensorflow.reset_default_graph",
"numpy.prod",
"tensorflow.Session",
"numpy.zeros"
],
[
"tensorflow.python.ops.nn_ops.conv3d",
"tensorflow... |
Mause/statistical_atlas_of_au | [
"9a1e46cdb1075f993086640827dabb0f4df4fd17"
] | [
"saau/sections/population/male_vs_female.py"
] | [
"'''\nABS_CENSUS2011_B13_LGA\n\nEstimated Resident Population by Sex by Age Group by LGA, 2001-2013 on\nASGS 2013 MetaData : ERP by LGA (ASGS 2013)\n'''\n\nimport logging\n\nimport cartopy.crs as ccrs\nfrom matplotlib import patches as mpatches\nfrom matplotlib.colors import ListedColormap\n\nfrom ..image_provider... | [
[
"matplotlib.patches.Rectangle",
"matplotlib.colors.ListedColormap"
]
] |
LibCity/Bigscity-LibCity-Docs-zh_CN | [
"24b7ecb99f29da8794def8f5e7441371ff419329"
] | [
"libcity/model/traffic_speed_prediction/DKFN.py"
] | [
"import math\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.autograd import Variable\nfrom torch.nn.parameter import Parameter\nfrom libcity.model import loss\nfrom libcity.model.abstract_traffic_state_model import AbstractTrafficStateModel\n\n\nclass FilterLinear(nn.Module):\n ... | [
[
"torch.Tensor",
"torch.cat",
"torch.var",
"torch.zeros",
"torch.eye",
"torch.sum",
"torch.tanh",
"torch.nn.Linear",
"torch.matmul",
"torch.FloatTensor",
"torch.device",
"torch.clamp"
]
] |
dilililiwhy/tensorflow | [
"5ff15db57cc449ff0d7cb0847a251fd4688f34f8"
] | [
"tensorflow/python/debug/lib/dumping_callback_test_lib.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.python.framework.tensor_util.MakeNdarray",
"tensorflow.python.debug.lib.check_numerics_callback.disable_check_numerics",
"tensorflow.python.debug.lib.debug_events_reader.DebugEventsReader",
"tensorflow.python.framework.dtypes.DType",
"tensorflow.python.debug.lib.dumping_callback.di... |
jialuli-luka/SyntaxVLN | [
"4c8358dd0ce347853d523c1b6255f1c148873826"
] | [
"r2r_src/env.py"
] | [
"''' Batched Room-to-Room navigation environment '''\n\nimport sys\nsys.path.append('buildpy36')\nimport MatterSim\nimport csv\nimport numpy as np\nimport math\nimport base64\nimport utils\nimport json\nimport os\nimport random\nimport networkx as nx\nfrom param import args\n\nfrom utils import load_datasets, load_... | [
[
"numpy.concatenate",
"numpy.array",
"numpy.zeros",
"numpy.sqrt"
]
] |
jimsrc/seatos | [
"e775dba1a2a96ff44b837cf8d85101ccfef302b1"
] | [
"etc/n_CR/Vmc_lo/load_data.py"
] | [
"#!/usr/bin/env ipython\nimport numpy as np\n#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\nclass gral():\n def __init__(self):\n self.name = ''\n\nsh, mc = gral(), gral()\ncr = gral()\ncr.sh, cr.mc = gral(), gral()\n\nvlo, vhi = 100.0, 450.0 #100.0, 450.0... | [
[
"numpy.loadtxt"
]
] |
hrsfc-ees/NewThreading | [
"ff5c7a01307776fc47f0d589ae7e0064c10acb30"
] | [
"NewThreading.py"
] | [
"import threading\nimport queue\nimport matplotlib.pyplot as plt\nimport matplotlib.animation as animation\nimport matplotlib.ticker as tkr\nimport argparse\nimport serial\nfrom time import sleep\nimport os\nimport matplotlib.text as txt\n\n\nclass SerialReader(threading.Thread):\n \"\"\"Serial Reader class that... | [
[
"matplotlib.ticker.AutoMinorLocator",
"matplotlib.pyplot.axes",
"matplotlib.ticker.LinearLocator",
"matplotlib.animation.FuncAnimation",
"matplotlib.pyplot.text",
"matplotlib.pyplot.show",
"matplotlib.pyplot.figure"
]
] |
mateusfavarin/CTR-AutoIGT | [
"95b6189d29c1dfe815a2d4ea0ed196666b77661d"
] | [
"src/videoProcessing.py"
] | [
"import cv2\nimport numpy as np\nimport pickle\nfrom pywinauto import application\n\nfrom imageProcessing import *\n\ndef in_range(n, a, b):\n ''' Checks if number is n in ]a, b[ '''\n\n if n > a and n < b:\n return True\n return False\n\ndef mean_hsv(v):\n ''' Calculates the mean color of a HSV ... | [
[
"numpy.reshape",
"numpy.mean"
]
] |
shunak/tensorflow | [
"142cb17be1c024839cd972071b2f9665c87ed5f1"
] | [
"tensorflow/python/compat/compat.py"
] | [
"# Copyright 2018 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.python.util.tf_export.tf_export"
]
] |
sunieee/wencai | [
"27bcd549a789a5d07d44e67a7a3e3d86962040cb"
] | [
"wencai/core/crawler.py"
] | [
"# -*- coding:utf-8 -*-\nimport logging\nimport re\nimport pandas as pd\nfrom wencai.core.cons import WENCAI_CRAWLER_URL, WENCAI_HEADERS\nfrom wencai.core.content import BackTest, YieldBackTest, EventBackTest, LastJs\nfrom wencai.core.cookies import WencaiCookie\nfrom wencai.core.session import Session\n\n\nclass W... | [
[
"pandas.DataFrame"
]
] |
kkahatapitiya/occlusion_removal | [
"b574f06ae32ea7e86b6051ee43afe084d5f005a3"
] | [
"utils/img_transformations_2.py"
] | [
"import os\nimport cv2\nimport numpy as np\nimport random\nfrom keras.preprocessing import image as Im\nfrom datetime import datetime\nimport scipy.ndimage as ndi\n\nread_dir='./images/'\nwrite_dir='./aug_images/'\n\nshape=(512,512)\n\ndef random_aug(x, rg, wrg, hrg, row_axis=1, col_axis=2, channel_axis=0, fill_mod... | [
[
"numpy.rollaxis",
"numpy.dot",
"numpy.cos",
"numpy.stack",
"numpy.sin",
"numpy.deg2rad",
"numpy.shape",
"numpy.random.uniform",
"numpy.array",
"scipy.ndimage.interpolation.affine_transform"
]
] |
neurodata/maggot_connectome | [
"7a1d5dcf3a01c0d60e287efeac6b50f7ccb29cdf"
] | [
"scripts/match_improve_pairs.py"
] | [
"#%% [markdown]\n# # Matching when including the contralateral connections\n#%% [markdown]\n# ## Preliminaries\n#%%\nfrom pkg.utils import set_warnings\n\nset_warnings()\n\n\nimport datetime\nimport time\nfrom pathlib import Path\nimport os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd... | [
[
"pandas.Series",
"numpy.sqrt",
"pandas.DataFrame",
"scipy.optimize.linear_sum_assignment",
"numpy.trace",
"numpy.ix_",
"numpy.arange",
"numpy.eye",
"numpy.intersect1d",
"numpy.zeros",
"matplotlib.pyplot.figure",
"numpy.nonzero",
"matplotlib.pyplot.GridSpec",
... |
kyawlin/dgl | [
"195f99362d883f8b6d131b70a7868a537e55b786",
"36daf66f6216bad4d30651311bcb87aa45dd33d5",
"4579bbf7b7254eee84a9cba14f26808df8b00c09"
] | [
"tests/tensorflow/test_nn.py",
"examples/pytorch/pointcloud/pointnet/provider.py",
"tutorials/blitz/3_message_passing.py"
] | [
"import tensorflow as tf\nfrom tensorflow.keras import layers\nimport networkx as nx\nimport pytest\nimport dgl\nimport dgl.nn.tensorflow as nn\nimport dgl.function as fn\nimport backend as F\nfrom test_utils.graph_cases import get_cases, random_graph, random_bipartite, random_dglgraph\nfrom test_utils import param... | [
[
"tensorflow.matmul",
"tensorflow.constant",
"tensorflow.keras.layers.Dense",
"tensorflow.reshape",
"scipy.sparse.random",
"tensorflow.random.normal",
"numpy.random.randint"
],
[
"numpy.dot",
"numpy.random.random",
"numpy.arange",
"numpy.cos",
"numpy.random.shuff... |
hjiang1/suspect | [
"f8b320b16bbd73a95d58eea1660921d6cad16f36",
"f8b320b16bbd73a95d58eea1660921d6cad16f36"
] | [
"tests/test_mrs/test_rda.py",
"tests/test_mrs/test_processing/test_denoising.py"
] | [
"import pytest\n\nimport suspect.io.rda\n\nimport numpy\n\n\ndef test_twix_nofile():\n with pytest.raises(FileNotFoundError):\n suspect.io.rda.load_rda(\"\")\n\n\ndef test_svs_file():\n data = suspect.io.load_rda(\"tests/test_data/siemens/SVS_30.rda\")\n assert data.shape == (1024,)\n assert data... | [
[
"numpy.testing.assert_equal",
"numpy.array",
"numpy.testing.assert_allclose"
],
[
"numpy.std",
"numpy.arange",
"numpy.real",
"numpy.random.randn"
]
] |
phymhan/essl | [
"23a4bfb1ef1e298cea7a2a392097a1097863d8ac"
] | [
"cifar10/stylegan_model.py"
] | [
"import math\nimport random\nimport functools\nimport operator\n\nimport torch\nfrom torch import nn\nfrom torch.nn import functional as F\nfrom torch.autograd import Function\n\nfrom stylegan_op import FusedLeakyReLU, fused_leaky_relu, upfirdn2d\n\n\nclass PixelNorm(nn.Module):\n def __init__(self):\n su... | [
[
"torch.nn.functional.conv_transpose2d",
"torch.nn.Sequential",
"torch.mean",
"torch.cat",
"torch.zeros",
"torch.randn",
"torch.nn.functional.conv2d",
"torch.nn.ModuleList",
"torch.tensor",
"torch.nn.Module",
"torch.nn.functional.leaky_relu",
"torch.nn.functional.lin... |
Yifanfanfanfan/torchutils | [
"939331d28fcee97bfb0a4b2eaab8e799877fb0dc"
] | [
"calflops.py"
] | [
"from __future__ import print_function\nimport torchvision.models as models\nimport torch\nimport argparse\nimport os\nimport sys\nsys.path.append('../')\n# from resnet_1d import ResNet50_1d\n# from resnet_1d_lite import ResNet50_1d_shrink\n#from args import *\nimport math\n# parser = argparse.ArgumentParser(descri... | [
[
"torch.randn",
"torch.randint"
]
] |
yoelcortes/fluids | [
"bf0400d00ab72da52d051335be2664db3771cb11"
] | [
"tests/test_design_climate.py"
] | [
"# -*- coding: utf-8 -*-\n'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.\nCopyright (C) 2016, 2017 Caleb Bell <Caleb.Andrew.Bell@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Sof... | [
[
"numpy.testing.assert_allclose"
]
] |
PetersResearchGroup/PCND | [
"584768cc683a6df0152ead69b567d05b781aab2b"
] | [
"hoomd/test-py/test_lattice.py"
] | [
"# -*- coding: iso-8859-1 -*-\n# Maintainer: joaander\n\nfrom hoomd import *\nimport hoomd;\ncontext.initialize()\nimport unittest\nimport os\nimport numpy\nimport math\n\n# unit tests for sq\nclass lattice_sq_test (unittest.TestCase):\n def test_init(self):\n sysdef = init.create_lattice(unitcell=lattice... | [
[
"numpy.testing.assert_allclose"
]
] |
tiagovla/pwe.py | [
"18864b4315c0cf7e12567fde6aadae7c504e5330",
"18864b4315c0cf7e12567fde6aadae7c504e5330"
] | [
"morpho/geometry.py",
"morpho/solver.py"
] | [
"\"\"\"Implement photonic crystal geometries.\"\"\"\n\nfrom __future__ import annotations\n\nfrom abc import ABC\nfrom dataclasses import dataclass\nfrom typing import Callable, Optional, Tuple, Union\n\nimport numpy as np\n\n\nclass GeometryBase(ABC):\n \"\"\"Base Geometry class.\"\"\"\n\n def __init__(self,... | [
[
"numpy.array",
"numpy.linspace",
"numpy.ones"
],
[
"numpy.diag",
"numpy.hstack",
"numpy.maximum",
"numpy.minimum",
"numpy.linalg.inv",
"numpy.arange",
"numpy.eye",
"scipy.linalg.eigh",
"numpy.meshgrid"
]
] |
kws/quality-lac-data-beta-validator | [
"638ecc986dfd31d0569e8faa48d0c7e8cfe3f7ed"
] | [
"tests/test_report.py"
] | [
"import json\nfrom pathlib import Path\n\nimport pandas as pd\nimport pytest\n\nfrom validator903.report import _create_child_summary\n\n\n@pytest.fixture(scope=\"session\")\ndef report_fixtures():\n with open(Path(__file__).parent / \"reports/child_summary.json\", 'rt') as file:\n return json.load(file)\... | [
[
"pandas.DataFrame"
]
] |
ikajic/nengolib | [
"bd30ec38ba656bedb94a267b5f86b51d1cec4954",
"bd30ec38ba656bedb94a267b5f86b51d1cec4954",
"bd30ec38ba656bedb94a267b5f86b51d1cec4954",
"bd30ec38ba656bedb94a267b5f86b51d1cec4954"
] | [
"nengolib/stats/ntmdists.py",
"nengolib/networks/tests/test_reservoir.py",
"nengolib/signal/tests/test_realizers.py",
"nengolib/stats/ortho.py"
] | [
"import warnings\n\nimport numpy as np\nfrom scipy.special import beta, betainc, betaincinv\n\nfrom nengo.dists import Distribution, UniformHypersphere\nfrom nengo.utils.compat import is_integer\n\nfrom nengolib.stats.ortho import random_orthogonal\nfrom nengolib.stats._sobol_seq import i4_sobol_generate\n\n__all__... | [
[
"numpy.dot",
"numpy.sqrt",
"numpy.linspace",
"numpy.asarray",
"numpy.empty_like",
"numpy.cos",
"numpy.sin",
"numpy.ones",
"numpy.atleast_1d",
"numpy.cumprod",
"scipy.special.betaincinv",
"numpy.zeros",
"numpy.where",
"scipy.special.beta"
],
[
"numpy.... |
jizongFox/deep-clustering-toolbox | [
"0721cbbb278af027409ed4c115ccc743b6daed1b",
"0721cbbb278af027409ed4c115ccc743b6daed1b"
] | [
"test/deepclustering/meters/test_meters.py",
"deepclustering/meters2/historicalContainer/historical_container.py"
] | [
"from unittest import TestCase\nfrom deepclustering.meters import AverageValueMeter, MeterInterface, SliceDiceMeter\nimport numpy as np\nimport torch\n\n\nclass TestBasicInterface(TestCase):\n def test_averagevalueMeter(self):\n meter = AverageValueMeter()\n for i in range(10000):\n mete... | [
[
"torch.randn",
"torch.randint"
],
[
"pandas.DataFrame"
]
] |
plaidbean/assistant-dialog-skill-analysis | [
"68723ac3919a61eee49a81eb73cae0614fdc7a1f"
] | [
"tests/term_analysis/test_chi2_analyzer.py"
] | [
"import unittest\nimport json\nimport pandas as pd\n\nfrom assistant_dialog_skill_analysis.utils import skills_util, lang_utils\nfrom assistant_dialog_skill_analysis.term_analysis import chi2_analyzer\n\n\nclass TestChi2Analyzer(unittest.TestCase):\n \"\"\"Test for Chi2 Analyzer module\"\"\"\n\n def setUp(sel... | [
[
"pandas.DataFrame"
]
] |
liuqipei/uuv_simulator | [
"7b6d06345f8a54fd2f65768afc71b9f9a895b868"
] | [
"uuv_evaluation/src/bag_evaluation/metrics/mean_error.py"
] | [
"# Copyright (c) 2016 The UUV Simulator Authors.\n# 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# U... | [
[
"numpy.array"
]
] |
RiccardoGrin/NVIDIA-tacotron2 | [
"29b0d99bc585c9ec2be115d399fecbad516082f4"
] | [
"hparams.py"
] | [
"import tensorflow as tf\nfrom text import symbols\n\n\ndef create_hparams(hparams_string=None, verbose=False):\n \"\"\"Create model hyperparameters. Parse nondefault from given string.\"\"\"\n\n hparams = tf.contrib.training.HParams(\n ################################\n # Experiment Parameters ... | [
[
"tensorflow.logging.info"
]
] |
RomanJuranek/photo-rectify | [
"aa6182376c5f4fcdc0976926e5ecf57e97edd20b"
] | [
"datasets/ecd.py"
] | [
"import os.path\nfrom pathlib import Path\n\nimport numpy as np\nfrom scipy.io import loadmat\nfrom skimage.io import imread\n\n\nclass EurasianCities:\n def __init__(self, data_path):\n self.path = Path(data_path)\n\n image_names = [f.stem for f in self.path.glob(\"*.jpg\")]\n self.data = [... | [
[
"numpy.array",
"scipy.io.loadmat"
]
] |
KazuakiToyoura/KazuakiToyoura-Poisson-Nernst-Planck-Simulator | [
"b7abfdec29eebc795eea6de1806b8caf552b34d2"
] | [
"mkImpedance.py"
] | [
"#!/usr/bin/env python\nimport numpy as np\n\n# Calculate impedance spectra from V profile by slight change in current I --> I+delta_I.\ndef calcImp(w_,dt_,delta_I_,voltage_):\n\tvoltage_ = np.abs(voltage_)\n\tt_ = np.cumsum(dt_)\n\tt_ = np.concatenate([np.array([0.0]),t_])\n\tdelta_V_re = np.zeros(w_.shape[0])\n\t... | [
[
"numpy.abs",
"numpy.cumsum",
"numpy.cos",
"numpy.sin",
"numpy.array",
"numpy.zeros"
]
] |
fsx950223/text | [
"24ea0a43ef21a33c3f3f2f526530d23ad3ff7d90"
] | [
"tensorflow_text/python/ops/hub_module_splitter.py"
] | [
"# coding=utf-8\n# Copyright 2020 TF.Text Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appl... | [
[
"tensorflow.python.ops.ragged.ragged_tensor.RaggedTensor.from_row_lengths",
"tensorflow.python.ops.ragged.ragged_tensor.convert_to_tensor_or_ragged_tensor",
"tensorflow.python.ops.ragged.ragged_tensor.is_ragged",
"tensorflow.python.ops.ragged.ragged_tensor.RaggedTensor.from_tensor",
"tensorflo... |
arthurgof/FDS-Project | [
"6f7fed77047b4762fed748e1d9012d63b007317b"
] | [
"Function.py"
] | [
"import numpy as np\nfrom scipy.stats import norm\n\n\nclass Neural_Network:\n \n def __init__(self, input , hidden, output):\n layers = [input, hidden, output]\n self.weights = [np.random.uniform(-1, 1,(layers[i], layers[i+1]))for i in range(2)]\n self.bias = [np.random.uniform(-1, 1,(la... | [
[
"numpy.dot",
"numpy.log",
"numpy.array_equal",
"numpy.unique",
"numpy.min",
"numpy.isnan",
"numpy.max",
"scipy.stats.norm.logpdf",
"numpy.argmax",
"numpy.exp",
"numpy.random.uniform",
"numpy.array2string",
"numpy.array",
"numpy.zeros",
"numpy.sum",
"... |
zheng-liu/res2s2am | [
"e8a2def9cf67964502d86c42d29e92bfb7352257"
] | [
"src/genome_browser.py"
] | [
"# UCSC Genome Browser\nimport os\nimport sys\nimport numpy as np\nimport pandas as pd\nfrom Bio import SeqIO\nfrom Bio.Seq import Seq\nfrom tqdm import tqdm\nfrom itertools import repeat\nimport wget\nimport ast\nimport multiprocessing as mp\nfrom sqlalchemy import create_engine\nfrom sqlalchemy.engine.url import ... | [
[
"numpy.array_split",
"pandas.DataFrame"
]
] |
KazukiOnodera/PLAsTiCC-2018 | [
"f7f3e86fd3b01145de6f96ebe9a7bdad49439956",
"f7f3e86fd3b01145de6f96ebe9a7bdad49439956",
"f7f3e86fd3b01145de6f96ebe9a7bdad49439956"
] | [
"py/trash/bk0/901_predict_1015-1.py",
"py/bk1-005_aggregate_pb-v.py",
"py/trash/936_predict_1122-1.py"
] | [
"#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Oct 15 00:41:27 2018\n\n@author: Kazuki\n\"\"\"\n\n\nimport numpy as np\nimport pandas as pd\nimport os, gc\nfrom glob import glob\nfrom tqdm import tqdm\n\nimport sys\nsys.path.append(f'/home/{os.environ.get(\"USER\")}/PythonLibrary')\nimport... | [
[
"pandas.concat",
"pandas.read_csv",
"pandas.DataFrame",
"pandas.read_feather",
"numpy.random.randint"
],
[
"pandas.read_pickle",
"numpy.percentile"
],
[
"pandas.concat",
"pandas.read_csv",
"numpy.random.seed",
"pandas.DataFrame",
"numpy.std",
"numpy.mean... |
qa4510qa/GCCRW_yhHuang | [
"39c7e2b3c75416d658aac69bb9133b84319a490c"
] | [
"GWLF/GWLF.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Wed Mar 6 11:25:31 2019\r\n\r\n@author: Philip\r\n\"\"\"\r\nimport pandas as pd\r\nimport numpy as np\r\nimport julian\r\nimport calendar\r\nimport os \r\n\r\ndef HamonETo_mm(wthdata, lat = None, dz_m = 0):\r\n wthdata = wthdata.copy()\r\n def cal_daylight_hou... | [
[
"pandas.read_csv",
"numpy.minimum",
"numpy.maximum",
"numpy.isnan",
"numpy.sin",
"numpy.tan",
"numpy.nansum",
"numpy.nanmean",
"pandas.DataFrame.from_dict",
"numpy.array",
"numpy.exp",
"pandas.datetime"
]
] |
haifangong/TRFE-Net-for-thyroid-nodule-segmentation | [
"5fd0da2bee39072fe1c74d6d6e07b1cb1e7e3da1"
] | [
"model/trfe.py"
] | [
"import torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\n\r\nclass DoubleConv(nn.Module):\r\n def __init__(self, in_ch, out_ch):\r\n super(DoubleConv, self).__init__()\r\n self.conv = nn.Sequential(\r\n nn.Conv2d(in_ch, out_ch, 3, padding=1),\r\n nn.BatchNo... | [
[
"torch.nn.ConvTranspose2d",
"torch.cat",
"torch.nn.init.constant_",
"torch.nn.Conv2d",
"torch.nn.init.xavier_normal_",
"torch.nn.Sigmoid",
"torch.nn.MaxPool2d",
"torch.nn.functional.interpolate",
"torch.nn.BatchNorm2d",
"torch.nn.ReLU"
]
] |
korntewin/capstone-arvato-customer-segmentation | [
"1492f03f9ec36382b0eee1b6df491d511c0ff7fd"
] | [
"py_modules/utils.py"
] | [
"# builtin lib\nimport typing as t\n\n# third party lib\nimport numpy as np\nimport pandas as pd\n\nfrom sklearn.decomposition import PCA\nfrom sklearn.cluster import MiniBatchKMeans, KMeans\nfrom sklearn.impute import SimpleImputer\nfrom sklearn.compose import ColumnTransformer\nfrom sklearn.preprocessing import M... | [
[
"numpy.cumsum",
"numpy.argmax",
"sklearn.cluster.MiniBatchKMeans",
"numpy.array",
"sklearn.decomposition.PCA"
]
] |
anshul96go/toolbox | [
"f60ba0b885eb0eb4786f6e56260073f923a7f844"
] | [
"qnt/exposure.py"
] | [
"import qnt.stats as qnstats\nimport xarray as xr\nimport numpy as np\n\n\ndef drop_bad_days(weights, max_weight = 0.049):\n exposure = qnstats.calc_exposure(weights)\n return weights.where(exposure.max('asset') < max_weight).fillna(0)\n\n\ndef mix_weights(primary, secondary, max_weight = 0.049):\n primary... | [
[
"numpy.sign"
]
] |
bkmgit/hpc-parallel-novice | [
"3eebe118f095e9f3ac544f30b6ff466af077a8d2"
] | [
"_includes/code/02_parallel_jobs/generate_scrambled_data.py"
] | [
"#!/usr/bin/env python3\nimport sys\nimport numpy as np\n\nnp.random.seed(2017)\n\ndef inside_circle(total_count):\n\n x = np.float32(np.random.uniform(size=total_count))\n y = np.float32(np.random.uniform(size=total_count))\n\n radii = np.sqrt(x*x + y*y)\n\n count = len(radii[np.where(radii<=1.0)])\n\n... | [
[
"numpy.sqrt",
"numpy.random.seed",
"numpy.dtype",
"numpy.random.uniform",
"numpy.where"
]
] |
Sandy1811/pandas | [
"90961f2acad5c2db6aa957e2a79df8668f5b02d1"
] | [
"pandas/io/formats/format.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nInternal module for formatting output data in csv, html,\nand latex files. This module also applies to display formatting.\n\"\"\"\n\nfrom __future__ import print_function\n\nfrom functools import partial\n\nimport numpy as np\n\nfrom pandas._libs import lib\nfrom pandas._libs.tsli... | [
[
"pandas.core.indexes.datetimes.DatetimeIndex",
"pandas._libs.tslibs.Timestamp",
"pandas.Series",
"numpy.asarray",
"pandas.core.dtypes.missing.notna",
"numpy.all",
"pandas.compat.map",
"pandas.core.dtypes.common.is_datetime64_dtype",
"pandas.io.formats.html.HTMLFormatter",
"... |
shovsj/studio | [
"4bc01301c6acfd5d9bdcd711c6cfec22ff7cad4c"
] | [
"function/python/brightics/function/transform/merge.py"
] | [
"import pandas as pd\nfrom brightics.common.validation import raise_runtime_error\n\n\ndef bind_row_column(first_table, second_table, row_or_col):\n if row_or_col == 'row':\n table = pd.concat([first_table, second_table], ignore_index=True, sort=False)\n else: # col\n if list(set(first_table.co... | [
[
"pandas.concat",
"pandas.merge"
]
] |
butroy/movie-autoencoder | [
"d18a54ecf7145f6cbda2d2233d4ff53056812b11"
] | [
"data/dataset.py"
] | [
"import tensorflow as tf\nimport os\n\n\ndef _get_training_data(FLAGS): \n ''' Buildind the input pipeline for training and inference using TFRecords files.\n @return data only for the training\n @return data for the inference\n '''\n \n filenames=[FLAGS.tf_records_train_path+f for f in os.listdi... | [
[
"tensorflow.cast",
"tensorflow.data.TFRecordDataset",
"tensorflow.parse_single_example",
"tensorflow.FixedLenFeature"
]
] |
Joxis/AdaptiveReID | [
"34852a61ffe1ab7b94d8187c86bac37c7a0f0eb1"
] | [
"eval.py"
] | [
"import os\nimport pickle\nimport shutil\nimport time\nfrom collections import OrderedDict\nfrom datetime import datetime\nfrom itertools import product\n\nimport cv2\nimport matplotlib\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport tensorflow as tf\nfrom absl import app, flags\nfrom sklearn.metrics i... | [
[
"matplotlib.pyplot.legend",
"numpy.split",
"numpy.savez",
"numpy.max",
"tensorflow.keras.layers.Concatenate",
"tensorflow.keras.layers.Lambda",
"numpy.unique",
"numpy.arange",
"tensorflow.keras.backend.int_shape",
"matplotlib.pyplot.close",
"tensorflow.argmax",
"skl... |
dylanirion/wbia-plugin-cnn | [
"cd0018b829de3f077ca289551492cdad84806ed6"
] | [
"wbia_cnn/models/labeler.py"
] | [
"# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function\nimport functools\nimport six\nimport numpy as np\nimport utool as ut\nfrom wbia_cnn import ingest_data\nfrom lasagne import init, layers, nonlinearities\nfrom theano import tensor as T # NOQA\nfrom wbia_cnn.models import ab... | [
[
"numpy.hstack",
"numpy.sqrt",
"numpy.pad",
"numpy.around",
"numpy.ceil",
"numpy.copy",
"numpy.array"
]
] |
thorbenortmann/ud-ds-cp-dog-breed-classifier | [
"8c5237fa615107064c8c0b44205acc3cdfdfbd4d"
] | [
"dog_breed_classifier/detection/training/utils.py"
] | [
"from pathlib import Path\nfrom typing import Tuple, Iterable\n\nfrom keras import utils\nfrom keras.callbacks import History\nfrom keras.models import Model\nfrom keras.preprocessing import image\nfrom matplotlib import pyplot as plt\nimport numpy as np\nfrom sklearn.datasets import load_files\nfrom tqdm import tq... | [
[
"matplotlib.pyplot.legend",
"numpy.expand_dims",
"matplotlib.pyplot.title",
"matplotlib.pyplot.savefig",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.clf",
"numpy.argmax",
"matplotlib.pyplot.xlabel",
"numpy.array",
"numpy.vstack",
"matplotlib.pyplot.ylabel"
]
] |
MMesgar/privacy_leackage_detection | [
"302920d2241b55e7fb18cdba3a183667ea539525"
] | [
"train.py"
] | [
"import torch\nimport torch.nn as nn\n\nimport opts, util\nimport numpy as np\nfrom tqdm import tqdm\nimport argparse, sys\n\nfrom nn_model import DualLinear, SingleLinear\nfrom nn_model import TripletSimLoss, TripletMulLoss, TripletAttLoss\n\nparser = argparse.ArgumentParser(\n description='train.py')\nopts.mod... | [
[
"torch.cuda.manual_seed",
"numpy.random.seed",
"torch.load",
"torch.manual_seed",
"torch.cuda.is_available",
"numpy.random.randint"
]
] |
strathclyde-rse/strathclyde-software-survey | [
"1dd3805a416f1da6cbfa27958ae96a5ad685fe19"
] | [
"combine_bivariate_results_for_graphing.py"
] | [
"#!/usr/bin/env python\n# encoding: utf-8\n\nimport pandas as pd\nimport glob\nimport os\n\nBIVARIATESTORE = \"./output_csv/bivariate/\"\n\n\ndef import_csv_to_df(location, filename):\n \"\"\"\n Imports a csv file into a Pandas dataframe\n :params: an xls file and a sheetname from that file\n :return: a... | [
[
"pandas.read_csv",
"pandas.DataFrame"
]
] |
kvetab/BioPhi | [
"fd73ec538f1e4166d28760853f56266967c6dc87"
] | [
"biophi/humanization/methods/humanization.py"
] | [
"from functools import cached_property\nfrom typing import Dict, List, Optional\nimport pandas as pd\nimport requests\nfrom dataclasses import dataclass\nfrom abnumber.chain import Chain, Alignment, Position\nfrom flask import current_app\n\nfrom biophi.common.utils.formatting import get_valid_filename\nfrom biophi... | [
[
"pandas.concat"
]
] |
deboeser/javascript_code_transformer | [
"20f355eb655bad40195ae302b9d8036716be9a23"
] | [
"preprocess.py"
] | [
"''' Handling the data io '''\nimport argparse\nimport torch\nimport transformer.Constants as Constants\n\ndef read_instances_from_file(inst_file, max_sent_len, keep_case):\n ''' Convert file into word seq lists and vocab '''\n\n word_insts = []\n trimmed_sent_count = 0\n with open(inst_file) as f:\n ... | [
[
"torch.load",
"torch.save"
]
] |
Cedo00/tensorflow | [
"623dd8361325d22d1487b6a2ec67c54065dd726b",
"623dd8361325d22d1487b6a2ec67c54065dd726b"
] | [
"tensorflow/python/ops/variable_scope.py",
"tensorflow/tools/docs/generate_1_0.py"
] | [
"# Copyright 2015 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.python.framework.ops.get_collection_ref",
"tensorflow.python.ops.variables.PartitionedVariable",
"tensorflow.python.platform.tf_logging.warn",
"tensorflow.python.ops.array_ops.slice",
"tensorflow.python.framework.ops.get_collection",
"tensorflow.python.ops.resource_variable_ops... |
rhdong/models | [
"4b3a1288bff9cc48778e7830d1942f3441bc6c18",
"4b3a1288bff9cc48778e7830d1942f3441bc6c18"
] | [
"tests/torch/tabular/test_tabular.py",
"tests/tf/prediction/test_next_item.py"
] | [
"#\n# Copyright (c) 2021, NVIDIA CORPORATION.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
[
"torch.cuda.is_available"
],
[
"tensorflow.keras.losses.CategoricalCrossentropy",
"tensorflow.constant",
"tensorflow.shape",
"tensorflow.random.uniform",
"tensorflow.cast",
"tensorflow.assert_equal",
"tensorflow.math.logical_not"
]
] |
thehanzo/tensor_flow_practice | [
"40c7ad63fb879ed0dc903b78ca7af3b9a773d48a"
] | [
"keras/functional.py"
] | [
"import os\n\nos.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'\n\nimport tensorflow as tf\nfrom tensorflow import keras\nfrom tensorflow.keras import layers\nfrom tensorflow.keras.datasets import mnist\n\nphysical_devices = tf.config.list_physical_devices('GPU')\ntf.config.experimental.set_memory_growth(physical_devices[0]... | [
[
"tensorflow.keras.Input",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.keras.losses.SparseCategoricalCrossentropy",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Model",
"tensorflow.keras.datasets.mnist.load_data",
"tensorflow.keras.optimizers.Adam",
"tensor... |
data301-2021-winter1/project-group07-project | [
"2a102feff124c0bb437b9e3e086f62af23b9ae92"
] | [
"notebooks/project_functions1.py"
] | [
"import numpy as np\nimport pandas as pd\n\ndef unprocessed(csv_file):\n df11 = pd.read_csv(csv_file)\n return df11\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
] | [
[
"pandas.read_csv"
]
] |
gshashank84/MultinomialNB | [
"374657c5cecb91f7ef0fcbb5261d8efabf83fffc"
] | [
"Gaussian/GaussianNB.py"
] | [
"import pandas as pd\nimport numpy as np\n\n\nclass NB:\n def __init__(self, target, dataframe):\n self.df = dataframe\n # Target/Category Column\n self.c_n = target\n # Column Names\n self.cols = list(self.df.columns)\n self.cols.remove(self.c_n)\n \n # De... | [
[
"pandas.read_csv",
"numpy.sqrt",
"numpy.random.shuffle",
"numpy.std",
"numpy.mean",
"numpy.exp",
"numpy.zeros",
"numpy.sum"
]
] |
RM35M4419/Biorefinery_field_analysis | [
"83bd83b651512c3c7948b5e68554d0cb72e490e8"
] | [
"src/data_preprocess.py"
] | [
"import pandas as pd\n\n\n# %% METHODS\n\ndef cleanup_df(df, index_column, date_label, column_types, columns_to_drop):\n \"\"\"Cleans up the full tweets DF\"\"\"\n\n clean_df = df.copy()\n\n # Dropping columns not to be used\n clean_df = clean_df.drop(columns_to_drop, axis=1, inplace=False)\n\n # Typ... | [
[
"pandas.read_pickle",
"pandas.to_datetime"
]
] |
giahaowjx/detectron2 | [
"f17ba8bad9d8f3cd9e6a91511b55c92fd10173fe"
] | [
"projects/Block-DensePose/densepose/modeling/losses/distribution.py"
] | [
"# Copyright (c) Facebook, Inc. and its affiliates.\n\nfrom typing import Any, List\nimport torch\nfrom torch.nn import functional as F\n\nfrom detectron2.config import CfgNode\nfrom detectron2.structures import Instances\n\nfrom .mask_or_segm import MaskOrSegmentationLoss\nfrom .registry import DENSEPOSE_LOSS_REGI... | [
[
"torch.any",
"torch.linspace",
"torch.nn.functional.smooth_l1_loss",
"torch.nn.functional.softmax"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.