repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
dahem/coffe-images | [
"2af526c57c08317829e0b99af83b11c9fb9182da"
] | [
"coffee-maturation/src/models/non_maximum.py"
] | [
"import numpy as np\r\n\r\ndef non_max_suppression_fast(boxes, overlapThresh):\r\n\r\n\t# if there are no boxes, return an empty list\r\n\t\r\n\tif len(boxes) == 0:\r\n\t\treturn []\r\n\t\t\r\n\t# if the boxes are integers, convert them to floats (due to divisions)\r\n\t\r\n\tif boxes.dtype.kind == \"i\":\r\n\t\tbo... | [
[
"numpy.minimum",
"numpy.where",
"numpy.argsort",
"numpy.maximum"
]
] |
mdrio/slaid | [
"67c85f0d1702bced1c089bfb3c20ba1cfbc9c225"
] | [
"slaid/renderers.py"
] | [
"import abc\nimport json\nimport logging\nimport os\nfrom typing import Any, Tuple, Union\n\nimport numpy as np\nimport tifffile\nimport tiledb\nimport zarr\n\nfrom slaid.commons import Mask, BasicSlide\nfrom slaid.commons.base import Polygon\nfrom slaid.commons.ecvl import BasicSlide as EcvlSlide\n\nlogger = loggi... | [
[
"numpy.pad",
"numpy.zeros"
]
] |
ManuelaS/lifelines | [
"e48983550254625ab7e8a3747dd02b646a1bf7ad"
] | [
"perf_tests/cp_perf_test.py"
] | [
"# -*- coding: utf-8 -*-\n# cox regression\n\n\nif __name__ == \"__main__\":\n import pandas as pd\n import time\n import numpy as np\n\n from lifelines import CoxPHFitter\n from lifelines.datasets import load_rossi, load_regression_dataset\n\n reps = 1\n df = load_rossi()\n df = pd.concat([... | [
[
"pandas.concat"
]
] |
GCrispino/vi-pddlgym | [
"2401cdbb1590cd0ebab5a3d75549c63aa130ee24"
] | [
"mdp.py"
] | [
"import numpy as np\nfrom pddlgym.core import get_successor_states, InvalidAction\nfrom pddlgym.inference import check_goal\n\n\ndef get_all_reachable(s, A, env, reach=None):\n reach = {} if not reach else reach\n\n reach[s] = {}\n for a in A:\n try:\n succ = get_successor_states(s,\n ... | [
[
"numpy.max",
"numpy.linalg.norm",
"numpy.dot",
"numpy.argmin",
"numpy.copy",
"numpy.min"
]
] |
hanghu/AutoChemCluster | [
"2ab4ae996b300a90637b124707905201c89d74d8"
] | [
"deepchembed/dce.py"
] | [
"\"\"\"\nDeepChEmbed (DCE) Models\n\"\"\"\nfrom dimreducer import DeepAutoEncoder\nfrom cluster import KMeansLayer\nfrom cluster import KMeans\nfrom keras import Model\nfrom keras import optimizers\nfrom keras.utils import normalize\nimport numpy as np\n\nclass DCE():\n \"\"\"\n The class to build a deep chem... | [
[
"numpy.sum",
"numpy.array",
"numpy.unique"
]
] |
zivaharoni/capacity-rl | [
"20ed628b3bc9f3b08996f289e7855121f3addf71"
] | [
"result_buffer.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport time\nimport csv\nimport os\nimport scipy.io as mat4py\nimport logging\n\nlogger = logging.getLogger(\"logger\")\n\nclass ResultBuffer(object):\n def __init__(self, log_path, episode_types):\n self.log_path = log_path\n self.current_episo... | [
[
"numpy.array",
"numpy.reshape",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.legend",
"matplotlib.pyplot.close",
"numpy.mean",
"matplotlib.pyplot.figure",
"numpy.abs"
]
] |
kmunve/APS | [
"4c2f254ede83a3a311cbedc90c76db9ee367a000"
] | [
"aps/load_region.py"
] | [
"import os\nimport numpy as np\nfrom netCDF4 import Dataset\n\n\ndef load_region(region_id, local=False, return_regions=False):\n\n if local:\n _vr = Dataset(\n os.path.join(os.path.dirname(os.path.abspath(__file__)), r\"data/terrain_parameters/VarslingsOmr_2017.nc\"),\n \"r\")\n ... | [
[
"numpy.where",
"matplotlib.pyplot.show",
"numpy.unique",
"matplotlib.pyplot.imshow"
]
] |
Wowol/Piano-Bot | [
"feab884daa4bbe947bf6d95d816664eb7e46cc48"
] | [
"model.py"
] | [
"from tensorflow.keras.callbacks import LambdaCallback\nfrom tensorflow.keras.models import Sequential\nfrom tensorflow.keras.layers import Dense, Activation, LSTM\nfrom tensorflow.keras.layers import Dropout, TimeDistributed\ntry:\n from tensorflow.python.keras.layers import CuDNNLSTM as lstm\nexcept:\n from... | [
[
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.models.load_model",
"tensorflow.keras.models.Sequential",
"tensorflow.keras.optimizers.RMSprop",
"tensorflow.keras.layers.LSTM"
]
] |
leonardbj/AIMS | [
"7f8f484ab829f15366cb04ab37f799ad88edd29a"
] | [
"src/ML_Algorithms/ExpectationMaximization/m_step_gaussian_mixture.py"
] | [
"\"\"\" converted from Matlab code\nsource: http://www.robots.ox.ac.uk/~fwood/teaching/AIMS_CDT_ML_2015/homework/HW_2_em/\n\"\"\"\n\nimport numpy as np\n\ndef m_step_gaussian_mixture(data, gamma):\n \"\"\"% Performs the M-step of the EM algorithm for gaussain mixture model.\n %\n % @param data : n x d ma... | [
[
"numpy.sum",
"numpy.dot",
"numpy.shape",
"numpy.zeros"
]
] |
linrio/WhetherOrNotMe | [
"239a6d3be82fecb58eb3ade4cf2966d5d294ce10"
] | [
"trainCNN.py"
] | [
"import tensorflow as tf\r\nimport cv2\r\nimport numpy as np\r\nimport os\r\nfrom sklearn.model_selection import train_test_split\r\nimport random\r\nimport sys\r\n\r\nmy_image_path = 'my_face'\r\nothers_image_path = 'other_people'\r\n\r\nimage_data = []\r\nlabel_data = []\r\n\r\ndef get_padding_size(image):\r\n#de... | [
[
"numpy.array",
"tensorflow.nn.softmax_cross_entropy_with_logits",
"tensorflow.train.latest_checkpoint",
"tensorflow.nn.conv2d",
"tensorflow.train.AdamOptimizer",
"tensorflow.summary.scalar",
"tensorflow.get_default_graph",
"tensorflow.argmax",
"tensorflow.random_normal",
"t... |
stanfordmlgroup/seamseg | [
"574e89a4e5e99b0aca90071a0c37c31e57c5449e"
] | [
"seamseg/data/dataset.py"
] | [
"import glob\nfrom itertools import chain\nfrom os import path\n\nimport numpy as np\nimport torch.utils.data as data\nimport umsgpack\nfrom PIL import Image\n\n\nclass ISSDataset(data.Dataset):\n \"\"\"Instance segmentation dataset\n\n This assumes the dataset to be formatted as defined in:\n https://... | [
[
"numpy.array"
]
] |
lanl/pymplot | [
"093769a06051c6b41be76ce1431e6a6e64477e5a",
"093769a06051c6b41be76ce1431e6a6e64477e5a"
] | [
"src/module_tick.py",
"src/showwiggle.py"
] | [
"'''\n Module:\n Set regular or irregular axis ticks for a plot.\n'''\nfrom module_utility import *\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n# ticks : contains irregular ticks locations\n# tickbeg : regular major ticks begin location\n# tickend : regular major ticks end location\n# tickd : ... | [
[
"numpy.asarray",
"numpy.linspace",
"matplotlib.pyplot.tick_params",
"numpy.append",
"matplotlib.pyplot.gca"
],
[
"numpy.array",
"numpy.empty",
"matplotlib.pyplot.setp",
"scipy.interpolate.InterpolatedUnivariateSpline",
"matplotlib.pyplot.plot",
"matplotlib.pyplot.le... |
EnricoPittini/model-selection | [
"dcd3e202773372088047056d866c12c15dba65ac"
] | [
"model_selection.py"
] | [
"\"\"\"\r\nModule for the selection of machine learning models.\r\n\r\nThere are several different functions which can perform the model selection: all of them have an intuitive interface, but\r\nare also powerful and flexible.\r\nIn addition, almost all these functions can optionally make plots, which sum up the p... | [
[
"numpy.array",
"sklearn.linear_model.LinearRegression",
"sklearn.model_selection.train_test_split",
"numpy.argmin",
"numpy.sum",
"sklearn.preprocessing.PolynomialFeatures",
"numpy.mean",
"matplotlib.pyplot.subplots",
"sklearn.model_selection.cross_val_score",
"numpy.argmax"... |
tensorflow/tpu-demos | [
"8aac591077e5781785aa6c22bc400472ba14dada"
] | [
"models/official/unet3d/unet_main.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.compat.v1.disable_v2_behavior"
]
] |
WuYichen-97/Learning-to-Purify-Noisy-Labels-via-Meta-Soft-Label-Corrector | [
"9fda4caf75a35de891a48aae44b6cb0cd36ea8cc"
] | [
"dataloader.py"
] | [
"# -*- coding: utf-8 -*-\r\n\"\"\"\r\nCreated on Mon Apr 27 17:38:25 2020\r\n\r\n@author: Wu Yichen\r\n\"\"\"\r\n\r\nfrom PIL import Image\r\nimport os\r\nimport os.path\r\nimport errno\r\nimport numpy as np\r\nimport sys\r\nimport pickle\r\n\r\n\r\nimport torch.utils.data as data\r\nfrom torchvision.datasets.utils... | [
[
"numpy.concatenate",
"numpy.full",
"numpy.array",
"numpy.random.choice",
"numpy.random.seed",
"torch.autograd.Variable",
"numpy.copy",
"numpy.save",
"numpy.eye",
"numpy.random.shuffle",
"numpy.arange",
"numpy.argmax",
"torch.load",
"torch.nn.functional.softm... |
szzexpoi/AiR | [
"938ecfec51a306144eb72758530d42e35a10208d",
"938ecfec51a306144eb72758530d42e35a10208d"
] | [
"AiR-M/ban/base_model.py",
"AiR-M/util/loss.py"
] | [
"\"\"\"\nBilinear Attention Networks\nJin-Hwa Kim, Jaehyun Jun, Byoung-Tak Zhang\nhttps://arxiv.org/abs/1805.07932\n\nThis code is written by Jin-Hwa Kim.\n\"\"\"\nimport sys\nsys.path.append('./ban')\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.utils.weight_norm import weigh... | [
[
"torch.nn.Linear",
"torch.zeros",
"torch.nn.Dropout",
"torch.mul",
"torch.nn.ModuleList",
"torch.max",
"torch.autograd.Variable",
"torch.nn.Tanh",
"torch.nn.functional.dropout",
"torch.nn.functional.softmax",
"torch.nn.Embedding"
],
[
"torch.mul",
"torch.aut... |
SiggyF/bokeh | [
"52a2ce993b0f1102fd9e136f66036f52e91cdcc3"
] | [
"examples/app/clustering/main.py"
] | [
"import numpy as np\nnp.random.seed(0)\n\nfrom bokeh.io import curdoc\nfrom bokeh.layouts import widgetbox, row, column\nfrom bokeh.models import ColumnDataSource, Select, Slider\nfrom bokeh.plotting import figure\nfrom bokeh.palettes import Spectral6\n\nfrom sklearn import cluster, datasets\nfrom sklearn.neighbors... | [
[
"sklearn.cluster.estimate_bandwidth",
"sklearn.cluster.AgglomerativeClustering",
"numpy.random.rand",
"sklearn.cluster.MiniBatchKMeans",
"sklearn.datasets.make_blobs",
"sklearn.preprocessing.StandardScaler",
"numpy.random.seed",
"sklearn.cluster.Birch",
"sklearn.cluster.Spectra... |
Jaikinator/dqc | [
"47c964c7d1323a35f4f69521d40476c41843810e",
"47c964c7d1323a35f4f69521d40476c41843810e"
] | [
"dqc/api/loadbasis.py",
"dqc/hamilton/orbparams.py"
] | [
"import os\r\nimport torch\r\nfrom typing import List\r\nfrom dqc.utils.datastruct import CGTOBasis\r\n\r\n__all__ = [\"loadbasis\"]\r\n\r\n_dtype = torch.double\r\n_device = torch.device(\"cpu\")\r\n\r\ndef loadbasis(cmd: str, dtype: torch.dtype = _dtype,\r\n device: torch.device = _device, requires_g... | [
[
"torch.device",
"torch.tensor"
],
[
"torch.zeros",
"torch.triu_indices",
"torch.linalg.qr",
"torch.matrix_exp",
"torch.tensor",
"torch.mean"
]
] |
shivin7/pytorch-lightning | [
"9f2b29a7cd4b56c0d6afbbc4a1e0971d49c5f1d7"
] | [
"pytorch_lightning/callbacks/early_stopping.py"
] | [
"r\"\"\"\nEarly Stopping\n^^^^^^^^^^^^^^\n\nMonitor a validation metric and stop training when it stops improving.\n\n\"\"\"\nfrom copy import deepcopy\n\nimport numpy as np\nimport torch\nimport torch.distributed as dist\n\nfrom pytorch_lightning import _logger as log\nfrom pytorch_lightning.callbacks.base import ... | [
[
"torch.distributed.barrier",
"torch.tensor",
"torch.distributed.all_reduce"
]
] |
aidanmontare-edu/pandas | [
"41aac9f2bccfc9b20cb2e9d0c839d8b7393e2b08"
] | [
"pandas/core/arrays/period.py"
] | [
"from datetime import timedelta\nimport operator\nfrom typing import Any, Callable, List, Optional, Sequence, Type, Union\n\nimport numpy as np\n\nfrom pandas._libs.tslibs import (\n NaT,\n NaTType,\n Timedelta,\n delta_to_nanoseconds,\n iNaT,\n period as libperiod,\n to_offset,\n)\nfrom pandas... | [
[
"numpy.repeat",
"pandas._libs.tslibs.period.Period._maybe_convert_freq",
"pandas._libs.tslibs.period.Period._from_ordinal",
"pandas._libs.tslibs.period.extract_freq",
"pandas._libs.tslibs.Timedelta",
"pandas._libs.tslibs.period.IncompatibleFrequency",
"pandas.core.dtypes.common.is_floa... |
cristi161/eecvf | [
"519c488bd47f697ef51e88823f7a751a52677b88"
] | [
"Benchmarking/bsds500/bsds/thin.py"
] | [
"import numpy as np\n\n# Thinning morphological operation applied using lookup tables.\n# We convert the 3x3 neighbourhood surrounding a pixel to an index\n# used to lookup the output in a lookup table.\n\n# Bit masks for each neighbour\n# 1 2 4\n# 8 16 32\n# 64 128 256\nNEIGH_MASK_EAST = 32\nNEIGH_MASK_... | [
[
"numpy.pad",
"numpy.arange",
"numpy.zeros",
"numpy.minimum"
]
] |
HS-YN/PanoAVQA | [
"657b83421ce64ea18b3e79fb580afc7034403ccc"
] | [
"code/optimizer/schedulers.py"
] | [
"from torch.optim.lr_scheduler import LambdaLR\r\nfrom transformers import get_linear_schedule_with_warmup\r\n\r\nfrom exp import ex\r\n\r\n\r\ndef get_no_scheduler(optimizer, num_warmup_steps, num_training_steps):\r\n def lr_lambda(current_step):\r\n return 1\r\n\r\n return LambdaLR(optimizer, lr_lamb... | [
[
"torch.optim.lr_scheduler.LambdaLR"
]
] |
yycho0108/monovo | [
"9f2b5cf15f97e467c8e6e94ee16bb785ed6c7edd"
] | [
"core/track.py"
] | [
"import time\nimport cv2\nimport numpy as np\nfrom collections import defaultdict\n\nclass Tracker(object):\n def __init__(self, pLK=None):\n if pLK is None:\n # default LK param\n pLK = self.pLK0()\n self.lk_ = cv2.SparsePyrLKOpticalFlow_create(\n **pLK)\n ... | [
[
"numpy.linalg.norm",
"numpy.empty",
"numpy.roll",
"matplotlib.pyplot.subplots",
"numpy.shape",
"numpy.where",
"numpy.random.uniform",
"numpy.random.randint",
"numpy.ndim",
"matplotlib.pyplot.show",
"numpy.logical_and.reduce",
"numpy.empty_like"
]
] |
multimodalspectroscopy/hypothermia-bayescmd | [
"94307593de7697140f7563f1b449f1f6165cd79b"
] | [
"results_processing/ABC/csv_processing.py"
] | [
"import os\nimport pandas as pd\nimport re\n\n\ndef sort_human(l):\n \"\"\"Sort a list of strings by numerical.\"\"\"\n def convert(text): return float(text) if text.isdigit() else text\n\n def alphanum(key): return [convert(c)\n for c in re.split('([-+]?[0-9]*\\.?[0-9]*)', ke... | [
[
"pandas.concat"
]
] |
DanielTakeshi/baselines-fork | [
"7ac6f52ff21f43c519e01179740c019bbe1c55bf"
] | [
"baselines/imit/memory.py"
] | [
"\"\"\"Similar to DDPG except we only need obs and act, not the reward, etc.\n\"\"\"\nimport numpy as np\n\n\nclass RingBuffer(object):\n\n def __init__(self, maxlen, shape, dtype='float32'):\n self.maxlen = maxlen\n self.start = 0\n self.length = 0\n if dtype == 'uint8':\n ... | [
[
"numpy.array",
"numpy.random.randint",
"numpy.arange",
"numpy.zeros"
]
] |
nishaero/wifi-userseg-ryu | [
"1132f2c813b79eff755bdd1a9e73e7ad3980af7c"
] | [
"lib/python2.7/site-packages/networkx/algorithms/centrality/current_flow_betweenness_subset.py"
] | [
"\"\"\"\nCurrent-flow betweenness centrality measures for subsets of nodes.\n\"\"\"\n# Copyright (C) 2010-2011 by \n# Aric Hagberg <hagberg@lanl.gov>\n# Dan Schult <dschult@colgate.edu>\n# Pieter Swart <swart@lanl.gov>\n# All rights reserved.\n# BSD license.\n__author__ = \"\"\"Aric Hagberg (hagbe... | [
[
"numpy.abs"
]
] |
ptrbortolotti/pCrunch | [
"df2488891d8a0d884cb90edd5bb0412ac0af248f"
] | [
"runBatch/run_FlapGainSweep_BAR.py"
] | [
"\"\"\"\nA python script to run a parameter sweep\n\"\"\"\n# Python tools\nimport numpy as np\nimport yaml\nimport os\n# WISDEM tools\nfrom wisdem.aeroelasticse import runFAST_pywrapper, CaseGen_General\nfrom wisdem.aeroelasticse.Util import FileTools\n# ROSCO tools\nfrom ROSCO_toolbox import controller as ROSCO_co... | [
[
"numpy.arange"
]
] |
lphxx6222712/MSAN_Retina | [
"7723fbfe7c6fcd4e310beb8b776a9057af62a2f1"
] | [
"utils/FocalLoss.py"
] | [
"import torch\nimport torch.nn as nn\n\ndef clip_by_tensor(t, t_min, t_max):\n\n result = (t>=t_min)*t+(t<t_min)*t_min\n result = (result<=t_max)*result+(result>t_max)*t_max\n return result\n\nclass FocalLoss(nn.Module):\n\n def __init__(self, gamma=2, alpha=0.25):\n super(FocalLoss, self).__init... | [
[
"torch.zeros_like",
"torch.sigmoid",
"torch.where"
]
] |
MTC-ETH/RecommenderSystems | [
"ede5aa961740348a68210f271397e1924c5f7cf6"
] | [
"preprocessing.py"
] | [
"# Copyright 2021 ETH Zurich, Media Technology Center\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# Unl... | [
[
"pandas.read_pickle",
"pandas.read_csv",
"pandas.read_parquet"
]
] |
ranbir/tensorflow | [
"46924b2f7bc4262b2c4b36841d393741113594ca",
"46924b2f7bc4262b2c4b36841d393741113594ca",
"46924b2f7bc4262b2c4b36841d393741113594ca"
] | [
"tensorflow/python/autograph/impl/conversion_test.py",
"tensorflow/python/keras/engine/distributed_training_utils.py",
"tensorflow/python/autograph/impl/api_test.py"
] | [
"# Copyright 2017 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requ... | [
[
"tensorflow.python.autograph.impl.conversion.is_whitelisted_for_graph",
"tensorflow.python.autograph.pyct.compiler.ast_to_source",
"tensorflow.python.framework.constant_op.constant",
"tensorflow.python.autograph.impl.conversion.entity_to_graph",
"tensorflow.python.autograph.core.converter.Conv... |
MattePalte/Bugs-Quantum-Computing-Platforms | [
"0c1c805fd5dfce465a8955ee3faf81037023a23e",
"0c1c805fd5dfce465a8955ee3faf81037023a23e",
"0c1c805fd5dfce465a8955ee3faf81037023a23e",
"0c1c805fd5dfce465a8955ee3faf81037023a23e",
"0c1c805fd5dfce465a8955ee3faf81037023a23e"
] | [
"artifacts/old_dataset_versions/original_commits_v02/pennylane/pennylane#385/after/test_tf.py",
"artifacts/old_dataset_versions/minimal_commits_v02/pennylane/pennylane#481_B/before/_qubit_device.py",
"artifacts/old_dataset_versions/minimal_commits_v02/amazon-braket-sdk-python/amazon-braket-sdk-python#263/before... | [
"# Copyright 2018 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applica... | [
[
"numpy.array",
"numpy.sin",
"tensorflow.linspace",
"tensorflow.GradientTape",
"tensorflow.equal",
"tensorflow.Variable",
"numpy.fromiter",
"numpy.allclose",
"tensorflow.enable_eager_execution",
"tensorflow.constant",
"numpy.abs",
"numpy.sqrt",
"numpy.cos",
"... |
noamwino/IML.HUJI | [
"0b1b6f333a16200fa7717af1be12e5f38694b74c"
] | [
"exercises/city_temperature_prediction.py"
] | [
"import os.path\n\nimport IMLearn.learners.regressors.linear_regression\nfrom IMLearn.learners.regressors import PolynomialFitting\nfrom IMLearn.utils import split_train_test\n\nimport numpy as np\nimport pandas as pd\nimport plotly.express as px\nimport plotly.io as pio\npio.templates.default = \"simple_white\"\n\... | [
[
"numpy.array",
"numpy.round",
"numpy.random.seed",
"numpy.append",
"pandas.read_csv"
]
] |
moriyoshi/dummydf | [
"39d82f0022ea9d072ce56724f16bf363a37b1bbf"
] | [
"dummydf/sql/dataframe.py"
] | [
"# coding: utf-8\n#\n# Copyright 2018 Moriyoshi Koizumi\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, co... | [
[
"pandas.concat"
]
] |
psyoblade/playground | [
"28e60c24004a84d2fd70907988b06bd46d0446ca"
] | [
"pommerman/forward_model.py"
] | [
"'''Module to manage and advanced game state'''\nfrom collections import defaultdict\n\nimport numpy as np\n\nfrom . import constants\nfrom . import characters\nfrom . import utility\n\n\nclass ForwardModel(object):\n \"\"\"Class for helping with the [forward] modeling of the game state.\"\"\"\n\n def run(sel... | [
[
"numpy.where",
"numpy.zeros_like",
"numpy.zeros"
]
] |
klens-codes/MaskFlownet-Pytorch | [
"94d41fd20f774845a1b2df7f77ec95c44217af94"
] | [
"data_loaders/KLens.py"
] | [
"import os\nimport re\nimport struct\nimport glob\nimport numpy as np\nimport frame_utils\nimport skimage\nimport skimage.io\n\nimport torch\nfrom torch.utils.data import Dataset\n\n\nclass KLens(Dataset):\n #def __init__(self,raft_path=\"/data2/opticalflow/rnd/opticalflow/RAFT/out_klens_raft_chairs\", root_path... | [
[
"numpy.array",
"torch.tensor"
]
] |
anniyanvr/nesta | [
"4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3"
] | [
"nesta/packages/geo_utils/tests/test_geotools.py"
] | [
"import pandas as pd\nfrom pandas.testing import assert_frame_equal\nimport pytest\nfrom unittest import mock\n\nfrom nesta.packages.geo_utils.geocode import geocode\nfrom nesta.packages.geo_utils.geocode import _geocode\nfrom nesta.packages.geo_utils.geocode import geocode_dataframe\nfrom nesta.packages.geo_utils.... | [
[
"pandas.DataFrame",
"pandas.testing.assert_frame_equal"
]
] |
delenamalan/covid19za | [
"414a7e0771ebb4b054809f20bff6c4efc0c24ff6"
] | [
"scripts/gp_pdf_extractor.py"
] | [
"import pdfplumber\nimport re\nimport pandas as pd\nfrom datetime import datetime\nimport sys\n\n# AUTHOR: Simon Rosen\n\n# -----------------------------------\n# DEPENDENCIES\n# This module requires 'pdfplumber'\n#\n# Install: pip install pdfplumber\n# -----------------------------------\n\n\ndef extr... | [
[
"pandas.DataFrame.from_dict"
]
] |
ericwang0701/Graphonomy | [
"1942bd41723ec48e5133f932082a49d1c17050ad"
] | [
"exp/inference/inference_dir.py"
] | [
"import socket\nimport timeit\nimport numpy as np\nfrom PIL import Image\nfrom datetime import datetime\nimport os\nimport sys\nfrom collections import OrderedDict\nsys.path.append('./')\n# PyTorch includes\nimport torch\nfrom torch.autograd import Variable\nfrom torchvision import transforms\nimport cv2\n\n\n# Cus... | [
[
"numpy.array",
"torch.cat",
"numpy.zeros",
"torch.max",
"torch.autograd.Variable",
"torch.nn.functional.upsample",
"torch.no_grad",
"torch.from_numpy",
"torch.load"
]
] |
sdpython/jupytalk | [
"34abdf128de24becb21a9f08f243c3a74dadbfd9"
] | [
"_unittests/ut_talk_examples/test_pydata2016_animation.py"
] | [
"\"\"\"\n@brief test log(time=20s)\n\"\"\"\n\nimport sys\nimport os\nimport unittest\nfrom pyquickhelper.loghelper import fLOG, run_cmd\nfrom pyquickhelper.pycode import get_temp_folder, fix_tkinter_issues_virtualenv, skipif_appveyor, skipif_travis\nfrom pyquickhelper.pycode import add_missing_development_vers... | [
[
"scipy.stats.beta.pdf",
"numpy.random.rand",
"matplotlib.animation.writers.register",
"matplotlib.animation.writers.list",
"matplotlib.pyplot.close",
"matplotlib.pyplot.figure",
"numpy.arange",
"numpy.linspace",
"matplotlib.animation.writers.is_available"
]
] |
mhd53/vgg-from-torch | [
"fbcca53432648a492550fb14d2c42c10230d76f5"
] | [
"vgg/test.py"
] | [
"import argparse\nimport torch\nfrom tqdm import tqdm\nimport vgg.data_loader.data_loaders as module_data\nimport vgg.model.loss as module_loss\nimport vgg.model.metric as module_metric\nimport vgg.model.model as module_arch\nfrom vgg.parse_config import ConfigParser\n\n\ndef main(config):\n logger = config.get_... | [
[
"torch.no_grad",
"torch.cuda.is_available",
"torch.load",
"torch.nn.DataParallel"
]
] |
lukapecnik/NiaPy | [
"a40ac08a4c06a13019ec5e39cc137461884928b0"
] | [
"docs/source/conf.py"
] | [
"# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/stable/config\n\n# -- Path setup -----------------------------------------------... | [
[
"matplotlib.use"
]
] |
jason-sa/Toucans | [
"d5ba3b215482cb1044e6b38833068ba93f2852f3",
"d5ba3b215482cb1044e6b38833068ba93f2852f3"
] | [
"find_schedule.py",
"top_stations.py"
] | [
"import pandas as pd\nimport read_mta_turnstile as t\n\n# This function generally generates a schedule for all stations in the df_top.csv file in a pivot table format.\ndef find_schedule():\n # Read the stations with highest Toucan scores and select columns relavant\n # to our schedule algorithm\n top_stat... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"pandas.read_csv"
],
[
"pandas.DataFrame"
]
] |
Curli-quan/oneshot-medical-landmark | [
"572926077fffbe9832aa16baa98bd046ec326700"
] | [
"utils/eval.py"
] | [
"import numpy as np\r\n\r\nfrom .utils import make_dir\r\n\r\n\r\nclass Evaluater(object):\r\n def __init__(self, logger, size, original_size, tag='paper_figure'):\r\n self.pixel_spaceing = 0.1\r\n self.tag = tag\r\n make_dir(tag)\r\n self.tag += '/'\r\n\r\n self.logger = logge... | [
[
"numpy.array",
"numpy.power",
"numpy.zeros"
]
] |
ustc-recsys/Torchrec | [
"4d62ee42018c12961850936cfd8f4f8d3c6a8dbc"
] | [
"recstudio/model/seq/hgn.py"
] | [
"import torch\nfrom recstudio.ann import sampler\nfrom recstudio.data import dataset\nfrom recstudio.model import basemodel, loss_func, scorer\n\nr\"\"\"\nHGN\n########\n\nPaper Reference:\n Chen ma, et al. \"HGN: Hierarchical Gating Networks for Sequential Recommendation\" in KDD2019.\n https://dl.acm.org/do... | [
[
"torch.nn.Linear",
"torch.empty",
"torch.nn.Embedding",
"torch.max"
]
] |
wesselb/wbml | [
"06bf71777ab9a75ef71845f95f91755626b37ddf"
] | [
"wbml/data/data.py"
] | [
"import datetime\nimport os\nimport shutil\nimport subprocess\nimport urllib.request\nfrom contextlib import closing\n\nimport numpy as np\nimport pandas as pd\nimport requests\n\nimport wbml.out\n\n__all__ = [\n \"DependencyError\",\n \"resource\",\n \"dependency\",\n \"asserted_dependency\",\n \"sp... | [
[
"pandas.DataFrame",
"numpy.array",
"numpy.arange"
]
] |
anorthman/mmdetection | [
"52e28154364f0e19d11c206bb357d88f29fc4a2d"
] | [
"mmdet/datasets/classify/imagenet.py"
] | [
"import os\nimport cv2\nfrom PIL import Image\nimport torch\n\nimport mmcv\nimport numpy as np\nfrom torch.utils.data import Dataset\nimport torchvision.transforms as T\nfrom torchvision.datasets import ImageFolder\n\n\nclass ImageNetDataset(Dataset):\n\n def __init__(self,\n data_root,\n ... | [
[
"torch.tensor"
]
] |
pystatgen/sgk | [
"f39e1b1bc3b16d05c5043ab5d445076424dad229"
] | [
"sgkit/io/bgen/bgen_reader.py"
] | [
"\"\"\"BGEN reader implementation (using bgen_reader)\"\"\"\nimport logging\nimport tempfile\nimport time\nfrom pathlib import Path\nfrom typing import (\n Any,\n Dict,\n Hashable,\n List,\n Mapping,\n MutableMapping,\n Optional,\n Tuple,\n Union,\n)\n\nimport dask\nimport dask.array as d... | [
[
"numpy.empty",
"pandas.DataFrame",
"numpy.arange",
"numpy.issubdtype",
"pandas.read_csv",
"numpy.iinfo",
"numpy.squeeze",
"numpy.dtype"
]
] |
mzeidhassan/doctr | [
"14b376e07d31b09b6bd31bceebf6ffb477c30f08",
"14b376e07d31b09b6bd31bceebf6ffb477c30f08",
"14b376e07d31b09b6bd31bceebf6ffb477c30f08"
] | [
"api/tests/routes/test_detection.py",
"test/pytorch/test_models_preprocessor_pt.py",
"doctr/datasets/sroie.py"
] | [
"# Copyright (C) 2021, Mindee.\n\n# This program is licensed under the Apache License version 2.\n# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.\n\nimport pytest\nimport numpy as np\nfrom scipy.optimize import linear_sum_assignment\nfrom doctr.utils.metrics import... | [
[
"scipy.optimize.linear_sum_assignment",
"numpy.array"
],
[
"numpy.full",
"torch.no_grad",
"numpy.ones",
"torch.ones",
"torch.all",
"torch.full"
],
[
"numpy.asarray"
]
] |
fariasfc/solo-learn | [
"f53ff40edbc7e96e06db5238d8c3a44f7b8965c1",
"b75ba6faf5269b0849120bfb89593f9bc23e09bc",
"b75ba6faf5269b0849120bfb89593f9bc23e09bc"
] | [
"solo/utils/classification_dataloader.py",
"tests/utils/test_pretrain_dataloader.py",
"solo/losses/vicreg.py"
] | [
"import os\nfrom pathlib import Path\nfrom typing import Callable, Optional, Tuple, Union\n\nimport torchvision\nfrom torch import nn\nfrom torch.utils.data import DataLoader, Dataset\nfrom torchvision import transforms\nfrom torchvision.datasets import STL10, ImageFolder\n\n\ndef build_custom_pipeline():\n \"\"... | [
[
"torch.utils.data.DataLoader"
],
[
"numpy.random.rand"
],
[
"torch.nn.functional.mse_loss",
"torch.nn.functional.relu",
"torch.eye"
]
] |
tmartin2/EnsembleSplice-Inactive | [
"a161ff007b47ceadd3a21376f2eac2971bb81d90"
] | [
"sub_models.py"
] | [
"# -----------------------------------------------------------------------------\n# Copyright (c) 2021 Trevor P. Martin. All rights reserved.\n# Distributed under the MIT License.\n# -----------------------------------------------------------------------------\nfrom Data import encode_data\n# from utils import cros... | [
[
"tensorflow.keras.layers.Conv1D",
"tensorflow.keras.layers.InputLayer",
"tensorflow.keras.layers.Flatten",
"tensorflow.keras.layers.MaxPooling1D",
"tensorflow.keras.Sequential",
"tensorflow.keras.layers.Conv2D",
"tensorflow.keras.layers.Dropout",
"tensorflow.keras.layers.MaxPooling... |
ebartrum/NovelViewSynthesis-TensorFlow | [
"a5e236f3c564bf287c8a09d855fd2134ba86b299"
] | [
"ssim.py"
] | [
"import tensorflow as tf\nimport numpy as np\n\n\ndef _tf_fspecial_gauss(size, sigma, ch=1):\n \"\"\"Function to mimic the 'fspecial' gaussian MATLAB function\n \"\"\"\n x_data, y_data = np.mgrid[-size//2 + 1:size//2 + 1, -size//2 + 1:size//2 + 1]\n\n x_data = np.expand_dims(x_data, axis=-1)\n x_data... | [
[
"tensorflow.exp",
"tensorflow.nn.conv2d",
"tensorflow.reduce_prod",
"tensorflow.pack",
"tensorflow.constant",
"tensorflow.reduce_sum",
"tensorflow.tile",
"tensorflow.reduce_mean",
"tensorflow.image.rgb_to_grayscale",
"tensorflow.nn.avg_pool",
"numpy.expand_dims"
]
] |
junyuchen245/ViT-V-Net_for_3D_Image_Registration_Pytorch | [
"f43bcdeef1d6712dfcaa3b4e18f69474e1eeaf73"
] | [
"ViT-V-Net/models.py"
] | [
"# coding=utf-8\r\nfrom __future__ import absolute_import\r\nfrom __future__ import division\r\nfrom __future__ import print_function\r\n\r\nimport copy\r\nimport logging\r\nimport math\r\nimport torch\r\nimport torch.nn as nn\r\nimport torch.nn.functional as nnf\r\nfrom torch.nn import Dropout, Softmax, Linear, Co... | [
[
"torch.nn.Linear",
"torch.cat",
"torch.stack",
"torch.nn.ModuleList",
"torch.nn.MaxPool3d",
"torch.meshgrid",
"torch.nn.BatchNorm3d",
"torch.nn.modules.utils._triple",
"torch.sigmoid",
"torch.nn.LayerNorm",
"torch.nn.Softmax",
"torch.distributions.normal.Normal",
... |
Geson-anko/JARVIS3 | [
"bc599a352401a7e135ebaabead4d8e6d8835747e",
"bc599a352401a7e135ebaabead4d8e6d8835747e"
] | [
"_Sensation0/DeltaTime.py",
"Sensation1/sensation_models.py"
] | [
"import os\nimport torch\nimport os\nimport random\nfrom torch.nn import(\n Module,Linear,LayerNorm\n)\nimport math\nfrom .AutoEncoder import Encoder\n\nclass DeltaT(Module):\n def __init__(self):\n super().__init__()\n self.reset_seed()\n self.elem = math.prod(Encoder().output_size)\n ... | [
[
"torch.nn.Linear",
"torch.nn.LayerNorm",
"torch.cuda.manual_seed",
"torch.manual_seed",
"torch.randn"
],
[
"torch.sigmoid",
"torch.cuda.manual_seed",
"torch.relu",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.ConvTranspose2d",
"torch.add",
"torch.... |
soybase/DroneImageScripts | [
"c077325a868237569592bd3820b3d873eddb4f83"
] | [
"CNN/CNNProcessData.py"
] | [
"# import the necessary packages\nimport sys\nimport cv2\nimport numpy as np\nimport pandas as pd\nfrom tensorflow.keras.preprocessing.image import ImageDataGenerator\nfrom sklearn.preprocessing import LabelBinarizer\nfrom sklearn.preprocessing import MinMaxScaler\nfrom sklearn.model_selection import train_test_spl... | [
[
"tensorflow.keras.layers.Activation",
"tensorflow.keras.layers.Reshape",
"tensorflow.keras.callbacks.ModelCheckpoint",
"tensorflow.keras.layers.Dense",
"tensorflow.keras.Model",
"sklearn.preprocessing.MinMaxScaler",
"pandas.read_csv",
"tensorflow.keras.layers.BatchNormalization",
... |
Li-fAngyU/Paddle | [
"e548f65f96697830035a28f9070b40829408ccdb"
] | [
"python/paddle/fluid/tests/unittests/ipu/op_test_ipu.py"
] | [
"# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless ... | [
[
"numpy.random.seed",
"numpy.allclose",
"numpy.abs",
"numpy.random.get_state",
"numpy.random.set_state"
]
] |
alxfmpl/swarmlib | [
"625645d466223ebef35fa1492d47e1a252cfd863"
] | [
"swarmlib/cuckoosearch/cuckoo_problem.py"
] | [
"# ------------------------------------------------------------------------------------------------------\n# Copyright (c) Leo Hanisch. All rights reserved.\n# Licensed under the BSD 3-Clause License. See LICENSE.txt in the project root for license information.\n# -------------------------------------------------... | [
[
"numpy.random.shuffle",
"numpy.random.random_sample"
]
] |
olga-turkovska/land-cover-patterns | [
"67bbf0d01b7bb5ec5b1376a9fbc1da59addf2e31"
] | [
"scripts/2-aggregate-land-cover.py"
] | [
"import os\nimport numpy as np\nimport rasterio\n\n\naggregate_forest = np.vectorize(lambda x: np.where(0 < x < 6, 1, x))\naggregate_agriculture = np.vectorize(lambda x: np.where(11 < x < 21, 21, x))\n\n\nfor dirs, subdirs, files in os.walk('../output/ceara/'):\n for file in files:\n wp_raster = rasterio.... | [
[
"numpy.where"
]
] |
Dref360/fairlearn | [
"8f087fbb0b27740d10b31d95706bb175a4b4581c",
"3cbd144b824d7454d04b813c2cb093fae5b9b256"
] | [
"test/unit/reductions/exponentiated_gradient/simple_learners.py",
"fairlearn/reductions/_exponentiated_gradient/_lagrangian.py"
] | [
"# Copyright (c) Microsoft Corporation and contributors.\n# Licensed under the MIT License.\n\nimport numpy as np\nimport pandas as pd\n\n\nclass LeastSquaresBinaryClassifierLearner:\n def __init__(self):\n self.weights = None\n\n def fit(self, X, Y, sample_weight):\n sqrtW = np.sqrt(sample_weig... | [
[
"numpy.array",
"numpy.linalg.lstsq",
"numpy.asarray",
"numpy.sqrt"
],
[
"numpy.concatenate",
"numpy.zeros",
"pandas.DataFrame",
"numpy.ones",
"sklearn.dummy.DummyClassifier",
"pandas.Series",
"scipy.optimize.linprog",
"numpy.unique"
]
] |
MaxGosselin/portfolio_optimizer | [
"a137d5b029aff0b584adb9df0ba8bf1831731882"
] | [
"portfolio_functions.py"
] | [
"''' \n \n A collection of functions to perform portfolio analysis. \n\n Max Gosselin, 2019\n \n'''\nimport numpy as np\nimport pandas as pd\nfrom scipy import optimize\n\n\ndef portfolio_metrics(weights, avg_xs_returns, covariance_matrix):\n ''' Compute basic portfolio metrics: return, stdv, sharpe ... | [
[
"numpy.sum",
"numpy.dot",
"numpy.zeros",
"numpy.ones"
]
] |
matroshenko/SPLERGE_via_TF | [
"1768485985b00fd7dabd726d8d24cbdb947dd143"
] | [
"merge/evaluation.py"
] | [
"import os\nimport tensorflow as tf\n\nfrom merge.model import Model\n\n\ndef run_model_on_random_input(model):\n batch_size = 1\n height = 100\n width = 200\n inputs = {\n 'image': tf.random.uniform(shape=(batch_size, height, width, 3), minval=0, maxval=256, dtype='int32'),\n 'horz_split_... | [
[
"tensorflow.random.uniform"
]
] |
egonw/pyamiimage | [
"8e436bae06a0c13a4265a186832e0e679512b7b9"
] | [
"pyimage/contour.py"
] | [
"from skimage.measure import find_contours\nfrom skimage import io\nfrom skimage.color import rgb2gray\nfrom matplotlib import pyplot as plt\n\nimage = io.imread('contour_finding_test.png')\n# image = io.imread('FlowchartDiagram.png')\nimage = rgb2gray(image)\nout = find_contours(image)\nprint(len(out))\n\n# Find c... | [
[
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
dengemann/engemann-2020-multimodal-brain-age | [
"ceffb1e01658e31d19dfc4dc0be7aff1d6d21af5",
"ceffb1e01658e31d19dfc4dc0be7aff1d6d21af5"
] | [
"camcan/utils/file_parsing.py",
"camcan/utils/notebook.py"
] | [
"\"\"\"Utility functions for parcinging Freesurfer output files.\"\"\"\nfrom os.path import join\n\nimport nibabel as nb\nimport numpy as np\n\n\ndef _vectorize_fs_surf(file_path):\n \"\"\"\n Read surface information from a file and turn it into a vector.\n\n Parameters\n ----------\n file_path : str... | [
[
"numpy.concatenate"
],
[
"matplotlib.pyplot.xlim",
"numpy.mean",
"pandas.DataFrame",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.fill_between",
"matplotlib.pyplot.title",
"matplotlib.pyplot.yticks",
"matplotlib.pyplot.figure",
"numpy.std",
"matplotlib.pyplot.sh... |
dbatten5/dagster | [
"d76e50295054ffe5a72f9b292ef57febae499528",
"d76e50295054ffe5a72f9b292ef57febae499528"
] | [
"examples/hacker_news/hacker_news/resources/dbt_asset_resource.py",
"python_modules/libraries/dagster-pandas/dagster_pandas/validation.py"
] | [
"from typing import Any, Dict, List\n\nimport pandas\nfrom dagster import AssetKey, AssetMaterialization, EventMetadataEntry\nfrom dagster_dbt import DbtOutput\n\nfrom .snowflake_io_manager import connect_snowflake\n\n\nclass DbtAssetResource:\n \"\"\"\n This class defines a resource that is capable of produc... | [
[
"pandas.read_sql_query"
],
[
"pandas.Timestamp"
]
] |
kct22aws/transformers | [
"28e091430eea9e0d40839e56fd0d57aec262f5f9",
"28e091430eea9e0d40839e56fd0d57aec262f5f9"
] | [
"src/transformers/models/convbert/modeling_tf_convbert.py",
"src/transformers/models/hubert/modeling_tf_hubert.py"
] | [
"# coding=utf-8\n# Copyright 2021 The HuggingFace Inc. team. 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.... | [
[
"tensorflow.matmul",
"tensorflow.reshape",
"tensorflow.keras.layers.Dense",
"tensorflow.math.sqrt",
"tensorflow.nn.softmax",
"tensorflow.cast",
"tensorflow.concat",
"tensorflow.transpose",
"tensorflow.squeeze",
"tensorflow.pad",
"tensorflow.nn.bias_add",
"tensorflow... |
maotto/movement_primitives | [
"ce355837f06cb5fada24be7259cb0305e8ea5d91",
"ce355837f06cb5fada24be7259cb0305e8ea5d91"
] | [
"examples/plot_obstacle_avoidance_2d.py",
"examples/plot_dmp_potential_field.py"
] | [
"\"\"\"\n========================\nObstacle Avoidance in 2D\n========================\n\nPlots a 2D DMP that goes through a point obstacle when there is no coupling\nterm for obstacle avoidance and a 2D DMP that avoids the point obstacle with\na coupling term.\n\"\"\"\nprint(__doc__)\n\n\nimport matplotlib.pyplot a... | [
[
"numpy.array",
"numpy.zeros",
"numpy.ones",
"matplotlib.pyplot.figure",
"matplotlib.pyplot.tight_layout",
"matplotlib.pyplot.show"
],
[
"numpy.zeros_like",
"numpy.array",
"matplotlib.pyplot.setp",
"numpy.random.RandomState",
"numpy.copy",
"matplotlib.pyplot.plot... |
dongzhiming/cgp-cnn-PyTorch | [
"be9d3ee63741ef59bac7cf3c905833d747267207"
] | [
"exp_main.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport argparse\nimport pickle\nimport pandas as pd\n\nfrom cgp import *\nfrom cgp_config import *\nfrom cnn_train import CNN_train\n\nif __name__ == '__main__':\n\n parser = argparse.ArgumentParser(description='Evolving CAE structures')\n parser.add_argument... | [
[
"pandas.read_csv"
]
] |
jwrth/scanpy | [
"9fa01020d1f0712166b3591e67d0c766c765eca0"
] | [
"scanpy/_utils.py"
] | [
"\"\"\"Utility functions and classes\n\"\"\"\nimport sys\nimport inspect\nimport warnings\nimport importlib.util\nfrom enum import Enum\nfrom pathlib import Path\nfrom weakref import WeakSet\nfrom collections import namedtuple\nfrom functools import partial, wraps\nfrom types import ModuleType, MethodType\nfrom typ... | [
[
"numpy.array",
"numpy.random.choice",
"numpy.mod",
"numpy.random.seed",
"numpy.sum",
"numpy.min",
"numpy.where",
"numpy.arange",
"numpy.argsort",
"numpy.cumsum",
"scipy.sparse.csr_matrix",
"numpy.unique",
"numpy.signbit"
]
] |
garrettkatz/rnn-fxpts | [
"0e4ea0fe89c51764f000610957d0382917fe227c"
] | [
"roundoff.py"
] | [
"\"\"\"\nMethods for assessing treatment of finite-precision issues\n\"\"\"\nimport os\nimport sys\nimport time\nimport multiprocessing as mp\nimport numpy as np\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport matplotlib.markers as mrk\nimport plotter as ptr\nimport rnn_fxpts as rfx\nimport fxpt_... | [
[
"matplotlib.pyplot.xlim",
"numpy.load",
"matplotlib.pyplot.bar",
"matplotlib.pyplot.xticks",
"numpy.concatenate",
"numpy.histogram",
"numpy.fabs",
"numpy.arange",
"matplotlib.pyplot.tight_layout",
"numpy.array",
"numpy.zeros",
"matplotlib.pyplot.figure",
"matplo... |
hishizuka/pyqtgraph | [
"4820625d93ffb41f324431d0d29b395cf91f339e"
] | [
"examples/Legend.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nDemonstrates basic use of LegendItem\n\n\"\"\"\nimport initExample ## Add path to library (just for examples; you do not need this)\n\nimport pyqtgraph as pg\nfrom pyqtgraph.Qt import QtCore, QtGui\nimport numpy as np\n\nwin = pg.plot()\nwin.setWindowTitle('pyqtgraph example: BarGr... | [
[
"numpy.sin",
"numpy.random.randint",
"numpy.arange"
]
] |
ajkerr0/kappa | [
"7a74582596f96b6a9a1488df5a4777c7b723c919"
] | [
"kappa/lattice/ammonia.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n\n@author: alex\n\"\"\"\n\nimport numpy as np\n\ndef main():\n \"\"\"Main program execution.\"\"\"\n \n n,h1,h2,h3 = generate_ammonia_sites()\n nList = [[1,2,3],[0],[0],[0]]\n \n return [n,h1,h2,h3], nList\n \ndef generate_ammonia_sites():\n \"\"\"Generate t... | [
[
"numpy.array",
"numpy.sqrt"
]
] |
eamorgado/Car-Self-driving-Simulator | [
"498d54a30c665b38ae6e120d8ae8311e77ad61f2"
] | [
"CarlaDriving/server/lane_detection/utils.py"
] | [
"import numpy as np\nimport cv2 as cv\nimport math\nfrom server.cv_utils import * \n\ndef filterGaussian(img,size=(5,5),stdv=0):\n \"\"\"Summary of filterGaussian\n This will apply a noise reduction filter, we will use s 5x5 Gaussian filter to smooth\n the image to lower the sensitivity to noise. (The ... | [
[
"numpy.zeros_like",
"numpy.array",
"numpy.zeros",
"numpy.polyfit",
"numpy.average"
]
] |
rovo98/model-unkown-dfa-diagnosis-based-on-running-logs | [
"f80c838dea6a8313165fbf10d64d5dc935cc036c"
] | [
"models/fdconv1d_lstm/train.py"
] | [
"# author rovo98\n\nimport os\n\nimport tensorflow as tf\nfrom tensorflow.keras.utils import plot_model\nfrom tensorflow.keras.callbacks import EarlyStopping\n\nfrom model_data_input import load_processed_dataset\nfrom models.fdconv1d_lstm.model import build_fdconv1d_lstm\nfrom models.utils.misc import running_time... | [
[
"tensorflow.config.experimental.list_physical_devices",
"tensorflow.keras.callbacks.EarlyStopping",
"tensorflow.config.experimental.set_memory_growth",
"tensorflow.keras.utils.plot_model"
]
] |
trsvchn/Ax | [
"0b430641c6b33920757dd09ae4318ea487fb4136"
] | [
"ax/models/tests/test_torch_model_utils.py"
] | [
"#!/usr/bin/env python3\n# Copyright (c) Facebook, Inc. and its affiliates.\n#\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport numpy as np\nimport torch\nfrom ax.exceptions.model import ModelError\nfrom ax.models.torch.utils imp... | [
[
"torch.zeros",
"torch.rand",
"torch.device",
"numpy.array",
"numpy.exp",
"torch.ones",
"torch.tensor",
"torch.equal"
]
] |
daniloorozco/ufc-predictions | [
"0dbf91936587bc9acfea15151ab6845c77483124"
] | [
"models/model_NN.py"
] | [
"#Neural Networks\n#MLP classifier is optimal algorithm for classifications\n\nfrom sklearn.neural_network import MLPClassifier\n\nclf = MLPClassifier(solver='lbfgs', alpha=1e-5, hidden_layer_sizes=(5, 2), random_state=1)\nclf.fit(X_train_clean, y_train)\n\nclf.predict(X_test_clean)\nscoreN = clf.score(X_test_clean... | [
[
"sklearn.neural_network.MLPClassifier"
]
] |
YuGong123/ID-disentanglement-Pytorch | [
"1b110f653a1945ea498b21cd6ed7d7e4fee0f74b"
] | [
"Models/Encoders/ID_Encoder.py"
] | [
"import torch\nfrom facenet_pytorch import MTCNN, InceptionResnetV1\nfrom torchvision import transforms\nfrom Configs import Global_Config\n\nIMAGE_SIZE = 220\nmtcnn = MTCNN(\n image_size=IMAGE_SIZE, margin=0, min_face_size=20,\n thresholds=[0.6, 0.7, 0.7], factor=0.709, post_process=True,\n device=Global_... | [
[
"torch.cat"
]
] |
hadleyhzy34/reinforcement_learning | [
"14371756c2ff8225dc800d146452b7956875410c",
"14371756c2ff8225dc800d146452b7956875410c"
] | [
"TD/double_q_learning.py",
"dqn/dqn_torch/networks.py"
] | [
"import numpy as np\nimport matplotlib.pyplot as plt\nimport gym\nimport random\n\n# hyper parameters\n# test 1\n# alpha = 0.5\n# gamma = 0.95\n# epsilon = 0.1\n\nepsilon = 0.1\nalpha = 0.1\ngamma = 0.1\n\ndef update_sarsa_table(sarsa, state, action, reward, next_state, next_action, alpha, gamma):\n '''\n upd... | [
[
"numpy.max",
"numpy.zeros",
"numpy.copy",
"matplotlib.pyplot.legend",
"numpy.argmax",
"numpy.abs",
"matplotlib.pyplot.show"
],
[
"torch.nn.Linear"
]
] |
viper7882/mxnet_win32 | [
"102f8d0ed59529bbd162c37bf07ae58ad6c4caa1",
"102f8d0ed59529bbd162c37bf07ae58ad6c4caa1"
] | [
"example/gluon/tree_lstm/main.py",
"example/gluon/actor_critic.py"
] | [
"# This example is inspired by https://github.com/dasguptar/treelstm.pytorch\nimport argparse, cPickle, math, os, random\nimport logging\nlogging.basicConfig(level=logging.INFO)\nimport numpy as np\nfrom tqdm import tqdm\n\nimport mxnet as mx\nfrom mxnet import gluon\nfrom mxnet.gluon import nn\nfrom mxnet import a... | [
[
"numpy.random.seed",
"numpy.zeros"
],
[
"numpy.finfo",
"numpy.array",
"numpy.expand_dims"
]
] |
EugeneNdiaye/rootCP | [
"a9777d0f4871dbd1bc0afd680889c0a3e73ec7d0"
] | [
"rootcp/models.py"
] | [
"import numpy as np\n\n\nclass ridge:\n \"\"\" Ridge estimator.\n \"\"\"\n\n def __init__(self, lmd=0.1):\n\n self.lmd = lmd\n self.hat = None\n self.hatn = None\n\n def fit(self, X, y):\n\n if self.hat is None:\n G = X.T.dot(X) + self.lmd * np.eye(X.shape[1])\n ... | [
[
"numpy.square",
"numpy.abs",
"numpy.linalg.solve",
"numpy.eye"
]
] |
NinaHerrmann/muesli2py | [
"632bb67433c6f67eaa48dc431d51914e0fde8f22"
] | [
"swig_muesli/muesli/da/setup_da.py"
] | [
"import os\nfrom setuptools import setup, Extension\nfrom setuptools.command.build_ext import build_ext\nfrom Cython.Distutils import build_ext\nimport numpy as np\nfrom os.path import join as pjoin\nfrom setup_cuda import cuda_setup\n\nmpi_compile_args = os.popen(\"mpic++ --showme:compile\").read().strip().split('... | [
[
"numpy.get_numpy_include",
"numpy.get_include"
]
] |
x109airfighter/akshare | [
"06b553d0a56f54a0e8f8a2031c374366a8b25e91"
] | [
"akshare/stock/zh_stock_a_sina.py"
] | [
"# -*- coding:utf-8 -*-\n# /usr/bin/env python\n\"\"\"\nDate: 2019/10/30 11:28\nDesc: 新浪财经-A股-实时行情数据和历史行情数据(包含前复权和后复权因子)\n\"\"\"\nimport re\n\nimport demjson\nimport execjs\nimport pandas as pd\nimport requests\nfrom tqdm import tqdm\n\nfrom akshare.stock.cons import (zh_sina_a_stock_payload,\n ... | [
[
"pandas.to_datetime",
"pandas.DataFrame",
"pandas.merge"
]
] |
FitMachineLearning/FitML | [
"a60f49fce1799ca4b11b48307441325b6272719a",
"4ecdaa38127680c41b6d599de8011a5ad1a2c101",
"4ecdaa38127680c41b6d599de8011a5ad1a2c101",
"4ecdaa38127680c41b6d599de8011a5ad1a2c101"
] | [
"Pytorch/ActorCritic/agent_and_model.py",
"DeepDeterministicSeletiveMemory/RoboschoolHalfCheetah_v1.py",
"DeepDeterministicSeletiveMemory/Tensorflow/_Main_Algo_v1.py",
"DeepDeterministicSeletiveMemory/LunarLander_v1.py"
] | [
"## DQN Tutorial\r\n## Implementation from https://github.com/FitMachineLearning\r\nimport torch\r\nimport gym\r\nimport torch.nn as nn\r\nimport torch.nn.functional as F\r\nimport torch.optim as optim\r\nimport numpy as np\r\nfrom dataclasses import dataclass\r\nfrom typing import Any\r\nfrom random import random\... | [
[
"torch.nn.Linear",
"numpy.empty",
"torch.nn.ReLU",
"torch.cuda.is_available",
"torch.Tensor"
],
[
"numpy.concatenate",
"numpy.array",
"numpy.random.rand",
"numpy.vectorize",
"numpy.zeros",
"numpy.load",
"numpy.save",
"numpy.std",
"numpy.arange",
"num... |
vandyzhou/wxcloudrun-django | [
"454f9c1ab827543f2635a549ca7e251ed35d9305"
] | [
"wxcloudrun/common/tabledrawer.py"
] | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n# @Time : 2022/2/9 12:09 下午\n# @Author: zhoumengjie\n# @File : tabledrawer.py\n\nimport numpy as np\nimport pandas as pd\nfrom matplotlib import pyplot as plt\nfrom matplotlib.font_manager import FontProperties\n\ndef draw_table(columns_head:[], cell_vals=[]):\n ... | [
[
"pandas.DataFrame",
"matplotlib.pyplot.subplots",
"matplotlib.pyplot.show",
"matplotlib.pyplot.bar",
"matplotlib.pyplot.xticks",
"matplotlib.pyplot.table"
]
] |
DerryHub/the-TaobaoLive-Commodity-Identify-Competition | [
"7e5e5c4fbddd9949fe01810d58bd7994889c007c"
] | [
"arcface/resnet_cbam.py"
] | [
"import torch\nimport torch.nn as nn\nimport math\nfrom arcface.utils import l2_norm, Flatten, SentVec_TFIDF\n\nmodel_urls = {\n 'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',\n 'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec4.pth',\n 'resnet50': 'https://downloa... | [
[
"torch.nn.AdaptiveMaxPool2d",
"torch.cat",
"torch.flatten",
"torch.nn.Sigmoid",
"torch.max",
"torch.nn.MaxPool2d",
"torch.nn.BatchNorm2d",
"torch.nn.Sequential",
"scipy.stats.truncnorm",
"torch.no_grad",
"torch.nn.init.constant_",
"torch.nn.ReLU",
"torch.mean",
... |
ajitrajasekharan/bert_mask | [
"33c7067134f2696b849fdb273443306026c5527d"
] | [
"examine_vectors.py"
] | [
"import torch\nfrom transformers import *\nimport pdb\nimport operator\nfrom collections import OrderedDict\nimport sys\n\n# OPTIONAL: if you want to have more information on what's happening, activate the logger as follows\nimport logging\nlogging.basicConfig(level=logging.INFO)\n\n\nPATH='bert-base-cased'\n# Load... | [
[
"torch.no_grad",
"torch.tensor"
]
] |
GodWriter/GAN-Pytorch | [
"42e0657ae4844c9644a2c382de6af977733d9074"
] | [
"cgan/utils.py"
] | [
"import os\nimport imageio\nimport numpy as np\n\nfrom PIL import Image\nfrom torch.autograd import Variable\nfrom torchvision.utils import save_image\n\n\ndef create_gif(image_path):\n frames = []\n gif_name = os.path.join(\"images\", 'mnist1.gif')\n\n image_list = os.listdir(image_path)\n sorted(image... | [
[
"numpy.random.normal"
]
] |
isabella232/allsongsconsidered-poll | [
"f4b63effcf57c6b6680eac9f11a55cd0541e358c"
] | [
"scripts/pivot_cluster_day.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\nimport argparse\nimport sys\nimport numpy as np\nimport pandas as pd\n\n\ndef run(args):\n data = pd.read_csv(sys.stdin)\n\n # Find maximum rank value and increase by one to use as a fill_value\n # on the pivot with cluster by day\n # notfound_value = gro... | [
[
"pandas.read_csv",
"pandas.pivot_table"
]
] |
suhoy901/recommenders | [
"8ec9f1950d694a5aeaa3d463ac23cad661a30a11",
"839e0444fcf9f1a085de88417c61f8f938b932c9"
] | [
"reco_utils/recommender/geoimc/geoimc_utils.py",
"reco_utils/recommender/rbm/rbm.py"
] | [
"# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\nimport numpy as np\nfrom sklearn.decomposition import PCA\n\nfrom reco_utils.dataset.download_utils import maybe_download\nfrom IPython import embed\n\ndef length_normalize(matrix):\n \"\"\"Length normalize the mat... | [
[
"numpy.sum",
"sklearn.decomposition.PCA",
"numpy.mean"
],
[
"tensorflow.data.Dataset.from_tensor_slices",
"numpy.not_equal",
"tensorflow.matmul",
"tensorflow.ones_like",
"numpy.multiply",
"tensorflow.zeros_like",
"tensorflow.global_variables_initializer",
"tensorflo... |
ANI717/Self_Driving_CV_Repository | [
"27faa8ca86966838998056a42973de292bc380cb"
] | [
"deep learning/test/test.py"
] | [
"#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"Script to Test Deep Learning Model.\n\nContains a pipeline to test a deep learning model.\n\nRevision History:\n 2021-11-20 (ANI717 - Animesh Bala Ani): Baseline Software.\n\nExample:\n $ python3 test.py\n\n\"\"\"\n\n\n#___Import Modules:\nimpor... | [
[
"torch.round",
"torch.no_grad",
"torch.utils.data.DataLoader",
"torch.load"
]
] |
datboi223/UnseenObjectClustering | [
"32ec100e7c15478fba5e67509c7bff397e7c885e"
] | [
"lib/datasets/osd_object.py"
] | [
"# Copyright (c) 2020 NVIDIA Corporation. All rights reserved.\n# This work is licensed under the NVIDIA Source Code License - Non-commercial. Full\n# text can be found in LICENSE.md\n\nimport torch\nimport torch.utils.data as data\nimport os, math\nimport sys\nimport time\nimport random\nimport numpy as np\nimport... | [
[
"numpy.isnan",
"numpy.random.rand",
"torch.from_numpy",
"torch.tensor",
"numpy.unique"
]
] |
rupshree1999/Brats2019 | [
"715274b4a407f8ca8fa11d2e3743c5ddb328e59a"
] | [
"src/models.py"
] | [
"import tensorflow as tf\nimport tensorflow.contrib.slim as slim\nfrom tflearn.layers.conv import global_avg_pool\n#######################\n# 3d functions\n#######################\n# convolution\n\n\n# 3D unet graph\ndef unet(inputI, output_channel):\n \"\"\"3D U-net\"\"\"\n phase_flag = 1\n concat_dim = 4... | [
[
"tensorflow.layers.max_pooling3d",
"tensorflow.contrib.layers.batch_norm",
"tensorflow.contrib.slim.l2_regularizer",
"tensorflow.truncated_normal_initializer",
"tensorflow.concat",
"tensorflow.nn.relu",
"tensorflow.expand_dims",
"tensorflow.argmax",
"tensorflow.nn.conv3d_transp... |
yisuoyanyudmj/RLs-1 | [
"a336b57e804507bca23cbadc3b5af1924c80d942"
] | [
"rls/utils/build_networks.py"
] | [
"\r\n\r\nimport numpy as np\r\nimport tensorflow as tf\r\n\r\nfrom copy import deepcopy\r\nfrom abc import ABC, abstractmethod\r\nfrom tensorflow.keras import Model as M\r\n\r\nfrom rls.utils.indexs import OutputNetworkType\r\nfrom rls.nn.networks import get_visual_network_from_type\r\nfrom rls.nn.models import get... | [
[
"tensorflow.split",
"tensorflow.shape",
"tensorflow.concat"
]
] |
EelcoHoogendoorn/Numpy_arraysetops_EP | [
"84dc8114bf8a79c3acb3f7f59128247b9fc97243"
] | [
"numpy_indexed/grouping.py"
] | [
"\"\"\"grouping module\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\nfrom builtins import *\n\nimport itertools\n\nimport numpy as np\nfrom numpy_indexed.index import as_index\nimport numpy_indexed as npi\n\n__author__ = \"Eelco Hoogendoorn\"\n__license__ = \"LGPL\"\n__e... | [
[
"numpy.asarray",
"numpy.lexsort",
"numpy.split",
"numpy.take",
"numpy.apply_along_axis",
"numpy.sqrt"
]
] |
eddylamhw/trAIner24 | [
"ac7cf1b95a2ecdfc44d11451984b016524ed7657"
] | [
"utils/lib_classifier.py"
] | [
"'''\nThis script includes:\n\n1. ClassifierOfflineTrain\n This is for offline training. The input data are the processed features.\n2. class ClassifierOnlineTest(object)\n This is for online testing. The input data are the raw skeletons.\n It uses FeatureGenerator to extract features,\n and then use Cl... | [
[
"sklearn.ensemble.AdaBoostClassifier",
"sklearn.ensemble.RandomForestClassifier",
"numpy.sum",
"sklearn.neighbors.KNeighborsClassifier",
"sklearn.neural_network.MLPClassifier",
"sklearn.naive_bayes.GaussianNB",
"sklearn.svm.SVC",
"sklearn.discriminant_analysis.QuadraticDiscriminant... |
tjcorona/PyFR | [
"a72b41580043bb001e5a9e6bb79a0e305d48e052"
] | [
"pyfr/writers/paraview.py"
] | [
"# -*- coding: utf-8 -*-\n\n\"\"\"Converts .pyfr[m, s] files to a Paraview VTK UnstructuredGrid File\"\"\"\n\nfrom collections import defaultdict\nimport os\n\nimport numpy as np\n\nfrom pyfr.shapes import BaseShape\nfrom pyfr.util import subclass_where\nfrom pyfr.writers import BaseWriter\n\n\nclass ParaviewWriter... | [
[
"numpy.array",
"numpy.pad",
"numpy.uint32",
"numpy.zeros",
"numpy.tile",
"numpy.arange",
"numpy.ravel",
"numpy.hstack",
"numpy.column_stack",
"numpy.dtype"
]
] |
couyang24/general_learning-tiffany | [
"fa358e6f3b14386519295a8959ad02512f92fb95"
] | [
"Titanic/analysis/colab_titanic_main.py"
] | [
"# <a href=\"https://colab.research.google.com/github/couyang24/general_learning-tiffany/blob/master/Titanic/analysis/colab_titanic_main.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n\n# Need to mount Drive on or upload kaggle.json\n\nf... | [
[
"sklearn.impute.SimpleImputer",
"sklearn.ensemble.BaggingClassifier",
"sklearn.ensemble.VotingClassifier",
"sklearn.ensemble.AdaBoostClassifier",
"sklearn.ensemble.RandomForestClassifier",
"sklearn.neighbors.KNeighborsClassifier",
"sklearn.neural_network.MLPClassifier",
"sklearn.na... |
ahmedtolan23/NER-with-bilstm-CRF-CNN | [
"29db9f2e357fc4112f9b5752f8ec604e4b9a04b0"
] | [
"models/BiLSTM.py"
] | [
"\"\"\"\n FILE : BiLSTM.py\n FUNCTION : None\n\"\"\"\n\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence\nimport random\nfrom DataUtils.Common import *\nfrom models.initialize import *\nfrom models.modelHelp import ... | [
[
"torch.nn.Linear",
"torch.nn.Dropout",
"torch.nn.LSTM",
"torch.max",
"torch.manual_seed",
"torch.nn.utils.rnn.pad_packed_sequence",
"torch.nn.utils.rnn.pack_padded_sequence",
"torch.tanh",
"torch.nn.Embedding"
]
] |
yijunyu/demo-fast | [
"11c0c84081a3181494b9c469bda42a313c457ad2",
"11c0c84081a3181494b9c469bda42a313c457ad2",
"11c0c84081a3181494b9c469bda42a313c457ad2"
] | [
"datasets/tensorflow-1.0.1/tensorflow/python/ops/rnn.py",
"datasets/tensorflow-1.0.1/tensorflow/python/debug/lib/stepper_test.py",
"datasets/tensorflow-1.0.1/tensorflow/python/framework/function.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.ops.array_ops.identity",
"tensorflow.python.ops.math_ops.equal",
"tensorflow.python.ops.variable_scope.variable_scope",
"tensorflow.python.ops.array_ops.where",
"tensorflow.python.ops.array_ops.unstack",
"tensorflow.python.util.nest.flatten",
"tensorflow.python.ops.a... |
morethanbooks/XML-TEI-Bible | [
"eb42b0ff37ad0049e84f01eb55ec786c8b4a54ea"
] | [
"code/python/scripts/bible2books.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Feb 2 14:33:27 2018\n\n@author: jose\n\"\"\"\n\nimport pandas as pd\nimport re\nimport os\nimport glob \n\nmetadata = pd.read_csv(\"/home/jose/Dropbox/biblia/tb/documentation/libros.csv\", sep=\"\\t\")\n\nfor doc in glob.glob(\"/home/jose/Dropbox/biblia/datos/origen... | [
[
"pandas.read_csv"
]
] |
HexDecimal/7drl-2022 | [
"755949875cc11e288908eccaee102c7ca0e43777"
] | [
"game/rendering.py"
] | [
"from __future__ import annotations\n\nimport numpy as np\nimport tcod\n\nimport g\nimport game.constants\nimport game.engine\nimport game.game_map\nimport game.render_functions\nfrom game.tiles import tile_graphics\n\n\ndef render_map(console: tcod.Console, gamemap: game.game_map.GameMap) -> None:\n # The defau... | [
[
"numpy.select",
"numpy.ones_like"
]
] |
platiagro/tasks | [
"a6103cb101eeed26381cdb170a11d0e1dc53d3ad"
] | [
"tasks/retriever/mrr.py"
] | [
"# Import dependencies\n\n# Math/Torch\nimport numpy as np\nimport torch.nn as nn\n\n# Typing\nfrom typing import List\n\n# Instantiate class\nclass MRR(nn.Module):\n \"\"\"Compute MRR metric (Mean reciprocal rank)\"\"\"\n def __init__(self, max_rank = 10):\n\n super(MRR, self).__init__()\n\n # ... | [
[
"numpy.where",
"numpy.asarray"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.