repo_name
stringlengths
8
130
hexsha
list
file_path
list
code
list
apis
list
panodata/python_dwd
[ "a9ee1bdf21b8fc12f6b6b33628ca804e656f310d" ]
[ "tests/dwd/observations/test_api_sites_geo.py" ]
[ "from pathlib import Path\n\nimport pytest\nimport numpy as np\nfrom datetime import datetime\nfrom unittest.mock import patch, MagicMock\nimport pandas as pd\n\nfrom wetterdienst.dwd.metadata.column_map import METADATA_DTYPE_MAPPING\nfrom wetterdienst.util.geo import derive_nearest_neighbours\nfrom wetterdienst.ut...
[ [ "numpy.array", "numpy.datetime64", "pandas.read_json", "numpy.int64" ] ]
UKPLab/coling2018-fake-news-challenge-
[ "6446c4459b520b7f7713bc66117917e341d899dc" ]
[ "fnc/pipeline.py" ]
[ "import sys\nimport datetime\nimport argparse\nimport os\nimport csv\nimport numpy as np\nimport os.path as path\nfrom builtins import isinstance\nsys.path.append(path.dirname(path.dirname(path.abspath(__file__))))\nimport fnc.refs.fnc1.scorer as scorer\nimport fnc.utils.score_calculation as score_calculation\nimpo...
[ [ "numpy.load", "numpy.argsort", "numpy.array", "numpy.std", "numpy.concatenate" ] ]
PaullMP/TensorFlowT
[ "b9b3b5b19971671fe24868273ca5274c1ec7169f" ]
[ "tensorflow/python/__init__.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.util.all_util.remove_undocumented" ] ]
KOLANICH-ML/rbfopt
[ "2243135f7307b4cb9a99292220e2381a1e776fbf" ]
[ "tests/test_rbfopt_degree0_models.py" ]
[ "\"\"\"Test the successful creation of Pyomo 0-degree models in RBFOpt.\n\nThis module contains unit tests for the module rbfopt_degree0_models.\n\nLicensed under Revised BSD license, see LICENSE.\n(C) Copyright International Business Machines Corporation 2016.\n\n\"\"\"\n\nfrom __future__ import print_function\nfr...
[ [ "numpy.random.uniform", "numpy.matrix", "numpy.random.seed", "numpy.array", "numpy.random.randint" ] ]
derdon/sunpy
[ "619102cd48c73a326c45263369446be9b74366e8" ]
[ "sunpy/wcs/wcs.py" ]
[ "from __future__ import absolute_import\n\nimport numpy as np\nimport sunpy.sun as sun\n\nimport astropy.units as u\n\nrsun_meters = sun.constants.radius.si.value\n\n__all__ = ['_convert_angle_units', 'convert_pixel_to_data', 'convert_hpc_hg',\n 'convert_data_to_pixel', 'convert_hpc_hcc', 'convert_hcc_hpc...
[ [ "numpy.sqrt", "numpy.arctan2", "numpy.arcsin", "numpy.rad2deg", "numpy.cos", "numpy.arange", "numpy.all", "numpy.array", "numpy.sin", "numpy.deg2rad" ] ]
Julio-Felix/socket-python
[ "93b6ce44dd88c2af49e7702bb16c69bc4f55240d" ]
[ "transmissor.py" ]
[ "import socket\r\nimport numpy as np # pip install numpy\r\n\r\n\r\nsocketUDP = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)\r\ntransmissor = (\"127.0.0.1\", 2020)\r\nreceptor = (\"127.0.0.1\", 3030)\r\nsocketUDP.bind(transmissor)\r\nbuff_size = 10000\r\n\r\nnext_sequence_number = 0\r\n\r\n\r\ndef calculate_ch...
[ [ "numpy.invert", "numpy.uint16", "numpy.array", "numpy.concatenate", "numpy.random.randint", "numpy.frombuffer" ] ]
UKPLab/linspector
[ "46a7cca6ad34dc673feb47c4d452f1248d5e635b" ]
[ "intrinsic/evaluation/classifiers/embeddings/sentence_embedding.py" ]
[ "import codecs\nfrom collections import defaultdict\n\nimport torch\nfrom allennlp.common import Params\nfrom allennlp.data import Vocabulary\nfrom allennlp.modules.token_embedders.token_embedder import TokenEmbedder\n\n\n@TokenEmbedder.register(\"sentence_embedding\")\nclass SentenceEmbedding(TokenEmbedder):\n ...
[ [ "torch.tensor" ] ]
spatchcock/models
[ "b97eef75d080c903cc6280b1d5955033d14bcf84", "b97eef75d080c903cc6280b1d5955033d14bcf84" ]
[ "normal.py", "foraminifera/foraminiferal_test_accumulation_time_evolution.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Fri Jan 24 22:11:12 2014\n\n@author: spatchcock\n\"\"\"\n\nimport math\nimport numpy\nimport matplotlib.pyplot as plt\n\n# Plot the normal distribution function as well as its first and second derivatives\n# \n# Use the numpy.vectorize function to handle array manupulati...
[ [ "numpy.arange", "matplotlib.pyplot.figure", "numpy.vectorize" ], [ "numpy.zeros", "matplotlib.pyplot.figure", "numpy.exp", "matplotlib.pyplot.subplots_adjust", "matplotlib.animation.FuncAnimation", "numpy.linspace" ] ]
magood/MarkeplacePredict
[ "f74ea035d6b861b9594ec2b91b38adad18e1bb00" ]
[ "eda.py" ]
[ "# Exploratory data analysis\n# py 3, using \"mplace\" conda env.\n\nimport numpy as np\nimport pandas as pd\nimport pickle, itertools, os\nfrom matplotlib import pyplot as plt\nimport seaborn as sns\nfrom yahoofinancials import YahooFinancials as YF\nfrom sklearn.preprocessing import StandardScaler\nfrom sklearn.p...
[ [ "pandas.read_pickle", "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "matplotlib.pyplot.xticks", "pandas.read_csv", "matplotlib.pyplot.figure", "pandas.DataFrame", "numpy.random.seed", "matplotlib.pyplot.title", "pandas.to_datetime", "matplotlib.pyplot.ylabel"...
ongchinkiat/CarND-Capstone
[ "abd768450825a03975f2b7b87f1379285357347b" ]
[ "ros/src/visual/visual.py" ]
[ "#!/usr/bin/env python\n\nimport numpy as np\nimport rospy\nimport matplotlib\nmatplotlib.use('Qt5Agg')\n\nfrom matplotlib import pyplot as plt\nfrom geometry_msgs.msg import PoseStamped\nfrom geometry_msgs.msg import TwistStamped\nfrom sensor_msgs.msg import Image\nfrom styx_msgs.msg import TrafficLightArray, Traf...
[ [ "matplotlib.pyplot.pause", "matplotlib.pyplot.draw", "scipy.spatial.KDTree", "matplotlib.pyplot.figure", "matplotlib.pyplot.show", "matplotlib.use", "matplotlib.pyplot.ion", "numpy.dot", "numpy.array" ] ]
aphedges/pytorch-lightning
[ "160e7e128909abc8489261287a562777cf1ada02" ]
[ "pytorch_lightning/loops/utilities.py" ]
[ "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "torch.isfinite" ] ]
fengtony686/workspace
[ "9e382a02439cb510df5fb2c278ae4e206d830336" ]
[ "MachineLearning/MINST/CNN.py" ]
[ "import os\nimport torch\nimport torch.nn as nn\nimport torch.utils.data as Data\nimport torchvision\n\n\nEPOCH = 1\nBATCH_SIZE = 50\nLR = 0.001\nDOWNLOAD_MNIST = False\n\n\nif not(os.path.exists('./mnist/')) or not os.listdir('./mnist/'):\n DOWNLOAD_MNIST = True\n\n\ntrain_data = torchvision.datasets.MNIST(\n ...
[ [ "torch.unsqueeze", "torch.utils.data.DataLoader", "torch.nn.MaxPool2d", "torch.nn.Linear", "torch.nn.CrossEntropyLoss", "torch.nn.Conv2d", "torch.max", "torch.nn.ReLU" ] ]
kundajelab/bias_correction
[ "521678ea8739473f793b0ce85e22e622d13df6fe" ]
[ "genomewide_gc/get_gc_content.py" ]
[ "import pandas as pd\nimport pysam\nimport argparse\ndef parse_args():\n parser=argparse.ArgumentParser(description=\"get gc content from a bed file\")\n parser.add_argument(\"--input_bed\")\n parser.add_argument(\"--ref_fasta\")\n parser.add_argument(\"--split_chroms\",action=\"store_true\",default=Fal...
[ [ "pandas.read_csv", "pandas.read_hdf" ] ]
repos-cl/akshare
[ "94fa42fb095ac4bfa5d8d58673b805d36cc0128e" ]
[ "akshare/index/index_eri.py" ]
[ "# -*- coding:utf-8 -*-\n# /usr/bin/env python\n\"\"\"\nDate: 2021/5/9 16:16\nDesc: 浙江省排污权交易指数\nhttps://zs.zjpwq.net/\n\"\"\"\nimport requests\nimport pandas as pd\n\n\ndef index_eri() -> pd.DataFrame:\n \"\"\"\n 浙江省排污权交易指数\n https://zs.zjpwq.net\n :return: 浙江省排污权交易指数\n :rtype: pandas.DataFrame\n ...
[ [ "pandas.DataFrame" ] ]
abc4pwm/abc4pwm
[ "29c9e833b076f8ce7e3e206c5ae8b560eff02b9e" ]
[ "build/lib/abc4pwm/clustering.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Oct 23 14:43:24 2019\n\n@author: omerali\n\"\"\"\n\nimport numpy as np\nimport os, shutil\nfrom pathlib import Path\nfrom time import gmtime, strftime\nimport json\nfrom glob import glob\nimport warnings\nwarnings.filterwarnings(\"ignore\")\nf...
[ [ "sklearn.cluster.AffinityPropagation", "numpy.concatenate", "numpy.unique", "numpy.asarray" ] ]
ezavesky/metadata-flatten-extractor
[ "5e81713424970087492b7835195235575f0024e2" ]
[ "contentai_metadata_flatten/parsers/yolo3.py" ]
[ "#! python\n# ===============LICENSE_START=======================================================\n# metadata-flatten-extractor Apache-2.0\n# ===================================================================================\n# Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved.\n# ===========...
[ [ "pandas.DataFrame" ] ]
tiagotouso/TALENTOS_HUMANOS
[ "c391f7d7a331d5f8b186b27af6a9b61448620cc6" ]
[ "IMPORTAMBIENTE.py" ]
[ "'''\nARQUIVO PARA IMPORTAR OS AMBIENTES DOS SERVIDORES\n\nOSB: COLOCAR A LISTA DE SERVIDORES (XLSX) COM OS CAMPOS [SIAPE - AMBIENTE - SETOR EXERCÍCIO]\n'''\nimport os\nimport pandas as pd\n\nfrom SQL import sqlexecute\nfrom MENSAGEM import mensagemErro, mensagemInformacao\n\ndef importarAmbienteServidores():\n ...
[ [ "pandas.read_excel" ] ]
treid5/probnum
[ "1c5499883672cfa029c12045848ea04491c69e08" ]
[ "src/probnum/quad/solvers/stopping_criteria/_rel_mean_change.py" ]
[ "\"\"\"Stopping criterion based on the relative change of the successive integral estimators.\"\"\"\n\nimport numpy as np\n\nfrom probnum.quad.solvers.bq_state import BQState\nfrom probnum.quad.solvers.stopping_criteria import BQStoppingCriterion\nfrom probnum.typing import FloatArgType\n\n# pylint: disable=too-few...
[ [ "numpy.abs" ] ]
JiangBowen0008/bop_toolkit
[ "375da05664c1b9b4249b191378f25d5815c305f9" ]
[ "bop_toolkit_lib/renderer_py.py" ]
[ "# Author: Tomas Hodan (hodantom@cmp.felk.cvut.cz)\n# Center for Machine Perception, Czech Technical University in Prague\n\n\"\"\"A Python based renderer.\"\"\"\n\nimport os\nimport numpy as np\nfrom glumpy import app, gloo, gl\n\nfrom bop_toolkit_lib import inout\nfrom bop_toolkit_lib import misc\nfrom bop_toolki...
[ [ "numpy.eye", "numpy.ones", "numpy.flipud", "numpy.zeros", "numpy.array", "numpy.dot", "numpy.round" ] ]
falabrasil/kaldi-br
[ "2b11eb937c485941c2209f577af38c2f21bf9017" ]
[ "utils/clustering/cluster.py" ]
[ "#!/usr/bin/env python3\n#\n# author: dec 2020\n# cassio batista - https://cassota.gitlab.io\n#\n# sponsored by MidiaClip (Salvador - BA)\n\n\nimport sys\nimport os\nimport shutil\nimport glob\nimport argparse\nimport logging\nfrom collections import OrderedDict\n\nimport torch\nimport numpy as np\n\nfrom pyannote....
[ [ "numpy.vstack", "torch.hub.load", "numpy.mean" ] ]
RainingComputers/pykitml
[ "1c3e50cebcdb6c4da63979ef9a812b44d23a4857" ]
[ "tests/test_mnist.py" ]
[ "import sys\nimport os.path\n\nimport numpy as np\nimport pykitml as pk\nfrom pykitml.datasets import mnist\nfrom pykitml.testing import pktest_graph, pktest_nograph\n\ndef test_download():\n # Download the mnist data set\n mnist.get()\n # Test ran successfully\n assert True\n\n@pktest_graph\ndef test_a...
[ [ "matplotlib.pyplot.show" ] ]
testinground/Proctoring-AI
[ "27b04739fa8f126e3c796ea5e9a21bdfbf48debf" ]
[ "face_detector.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Wed Jul 29 17:52:00 2020\n\n@author: hp\n\"\"\"\n\nimport cv2\nimport numpy as np\n\ndef get_face_detector(modelFile = \"models/res10_300x300_ssd_iter_140000.caffemodel\",\n configFile = \"models/deploy.prototxt\"):\n \"\"\"\n Get the face dete...
[ [ "numpy.array" ] ]
heikoschmidt1187/CarND-Advanced-Lane-Lines
[ "671c8d9a08853b4a9c00995a2ace6d25eb478e8f" ]
[ "threshold_par.py" ]
[ "import numpy as np\nimport cv2\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nimport glob\n\ndef abs_sobel_threshold(img, orientation='x', kernel_size=3, threshold=(0, 255)):\n \"\"\"\n `orientation` Input for setting the sobel operator gradient orientation (x, y)\n `kernel_size` Inpu...
[ [ "numpy.zeros_like", "numpy.zeros", "numpy.dstack", "numpy.max", "numpy.absolute", "numpy.sqrt" ] ]
clebouteiller/landlab
[ "e6f47db76ea0814c4c5a24e695bbafb74c722ff7" ]
[ "landlab/components/overland_flow/generate_overland_flow_deAlmeida.py" ]
[ "\"\"\"Landlab component that simulates overland flow.\n\nThis component simulates overland flow using the 2-D numerical model of\nshallow-water flow over topography using the de Almeida et al., 2012\nalgorithm for storage-cell inundation modeling.\n\n.. codeauthor:: Jordan Adams\n\nExamples\n--------\n>>> import n...
[ [ "numpy.sqrt", "numpy.append", "numpy.zeros", "numpy.broadcast_arrays", "numpy.intersect1d", "numpy.in1d", "numpy.amax", "numpy.maximum", "numpy.where" ] ]
MouvementMondial/OccupancyGridSLAM
[ "6473c2c33025933b937a8ed5b04fb1bcb563ebe0" ]
[ "lib/mapping.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\n@author: Thorsten\n\"\"\"\n\nimport numpy as np\nfrom numba import jit\n\nimport os\nimport sys\nnb_dir = os.path.split(os.getcwd())[0]\nif nb_dir not in sys.path:\n sys.path.append(nb_dir)\n\nfrom lib import bresenham\n\n@jit\ndef addMeasurement(grid, x, y, pos_sensor, offset, ...
[ [ "numpy.array" ] ]
i-aki-y/librosa
[ "a464b336c23a94e00943fc50e936180f503367eb" ]
[ "tests/test_onset.py" ]
[ "#!/usr/bin/env python\n# CREATED:2013-03-11 18:14:30 by Brian McFee <brm2132@columbia.edu>\n# unit tests for librosa.onset\n\nfrom __future__ import print_function\nimport pytest\nfrom contextlib2 import nullcontext as dnr\n\n# Disable cache\nimport os\n\ntry:\n os.environ.pop(\"LIBROSA_CACHE_DIR\")\nexcept:\n...
[ [ "numpy.zeros_like", "numpy.allclose", "numpy.ones", "numpy.zeros", "numpy.random.randn", "numpy.all", "numpy.maximum", "numpy.linspace" ] ]
littlejgogo/MDCPE-co-training-method-for-hyperspectral-image-classification
[ "b7d367abd97ada77adc45a1120149cf247f9713c" ]
[ "training code/paviau/rnn/test/logitsmulti.py" ]
[ "\nimport tensorflow as tf\nimport cnn_indices\n\ndata = cnn_indices.read_data_sets()\nimport final_index\nimport numpy as np\nsaver = tf.train.import_meta_graph('/home/asdf/Documents/juyan/paper/salinas/cnn/model/NEW/'\n 'CNN0507.ckpt.meta')\nbatch_size = data.valid._num_examples\...
[ [ "tensorflow.Session", "numpy.savez", "numpy.argmax", "tensorflow.train.import_meta_graph" ] ]
galipremsagar/dask
[ "134182e05009dbb20bd8e59ccf8bf771e5d4399a" ]
[ "dask/dataframe/io/parquet/utils.py" ]
[ "import re\n\nimport pandas as pd\n\nfrom ....core import flatten\nfrom ....utils import natural_sort_key\n\n\nclass Engine:\n \"\"\" The API necessary to provide a new Parquet reader/writer \"\"\"\n\n @classmethod\n def read_metadata(\n cls,\n fs,\n paths,\n categories=None,\n ...
[ [ "pandas.DataFrame" ] ]
isaiahnixon/python-google-trends
[ "7d8535885bf4e39c0954172bfe0dae1451c8007a" ]
[ "plot-data.py" ]
[ "import matplotlib.pyplot as plt\nimport matplotlib.dates as mdates\nfrom datetime import datetime as dt\nimport pandas as pd \nimport numpy as np\n\n# Load the csv\ndf1 = pd.read_csv('data/aggregate-daily-values.csv')\ndf2 = pd.read_csv('data/aggregate-daily-values-covid-19.csv')\ndf3 = pd.read_csv('data/aggregate...
[ [ "matplotlib.pyplot.legend", "pandas.read_csv", "matplotlib.pyplot.gcf", "matplotlib.dates.DateFormatter", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ] ]
slettner/jina
[ "4140961c62359e3acd540a6d88931665c6313824" ]
[ "tests/unit/drivers/test_kv_search_driver.py" ]
[ "from typing import Optional, Iterable\n\nimport numpy as np\nimport pytest\n\nfrom jina import Document, DocumentArray\nfrom jina.drivers.search import KVSearchDriver\nfrom jina.executors.indexers import BaseKVIndexer\nfrom jina.types.ndarray.generic import NdArray\n\n\nclass MockIndexer(BaseKVIndexer):\n def a...
[ [ "numpy.array" ] ]
shkolnick-kun/kalman_h_infinity_filters
[ "4e76c38d91d5cb44e5f43f675aced4b917a5dbfd" ]
[ "EKHFPost.py" ]
[ "# -*- coding: utf-8 -*-\n# pylint: disable=invalid-name,too-many-instance-attributes, too-many-arguments\n\"\"\"\nCopyright 2019 Paul A Beltyukov\nCopyright 2015 Roger R Labbe Jr.\n\nFilterPy library.\nhttp://github.com/rlabbe/filterpy\n\nDocumentation at:\nhttps://filterpy.readthedocs.org\n\nSupporting book at:\n...
[ [ "numpy.eye", "scipy.stats.chi2.ppf", "numpy.finfo", "numpy.asarray", "scipy.linalg.inv", "numpy.linalg.eigvals", "scipy.linalg.pinv", "numpy.max", "numpy.array", "numpy.dot", "numpy.isscalar", "numpy.outer" ] ]
Ronak1958/blog
[ "b477bda7641970ed1f1438994aa7a084c921b898" ]
[ "docs/downloads/code/digitize-graph/digitize-data.py" ]
[ "from pynput import mouse\n\nclass MyException(Exception):pass\n\nX = []\nY = []\nNumberOfMouseClicks = 0\nprint('Click Origin')\n\ndef on_click(x, y, button, pressed):\n button = str(button)\n global NumberOfMouseClicks\n\n NumberOfMouseClicks = NumberOfMouseClicks + 1\n if NumberOfMouseClicks==1:\n ...
[ [ "matplotlib.pyplot.plot", "matplotlib.pyplot.show", "matplotlib.pyplot.ylim", "matplotlib.pyplot.xlim" ] ]
Komutsou/StructPy
[ "6b25b369ff14b31dbff4eb2cb4d6c43963ec7b3b" ]
[ "Examples/In progress/CEE213 CP4.py" ]
[ "import numpy as np\nimport cross_sections as xs\n\nxs1 = xs.IBeam(1, 1, 0.1, 0.1)\n\nL = 10\np = 1\nE = 29000\n\ndef constant(x, **kwargs):\n\treturn 1\n\ndef linearup(s, **kwargs):\n\treturn x\n\nload = constant\n\ndef simpsons(f, a, b, n): #function, start, stop, intervals\n\tif n % 2 == 0:\n\t\th = (b-a)/n\n\t\...
[ [ "numpy.array", "numpy.matrix", "numpy.linalg.solve" ] ]
kiminh/tequila
[ "464085265e125222c63e65446861e9c0a2428bab" ]
[ "src/tequila/quantumchemistry/qc_base.py" ]
[ "from dataclasses import dataclass\nfrom tequila import TequilaException, BitString, TequilaWarning\nfrom tequila.hamiltonian import QubitHamiltonian\n\nfrom tequila.circuit import QCircuit, gates\nfrom tequila.objective.objective import Variable, Variables, ExpectationValue\n\nfrom tequila.simulators.simulator_api...
[ [ "numpy.zeros", "numpy.take", "numpy.linalg.eigh", "numpy.isclose", "numpy.abs", "numpy.ndenumerate", "numpy.ndarray", "numpy.einsum" ] ]
justindujardin/allennlp
[ "c4559f3751775aa8bc018db417edc119d29d8051" ]
[ "allennlp/modules/elmo_lstm.py" ]
[ "\"\"\"\nA stacked bidirectional LSTM with skip connections between layers.\n\"\"\"\nfrom typing import Optional, Tuple, List\nimport warnings\n\nimport torch\nfrom torch.nn.utils.rnn import PackedSequence, pad_packed_sequence\n\nwith warnings.catch_warnings():\n warnings.filterwarnings(\"ignore\", category=Futu...
[ [ "torch.FloatTensor", "torch.stack", "numpy.transpose", "torch.cat", "torch.nn.utils.rnn.pad_packed_sequence" ] ]
chukren/seisflows
[ "c4a5a8a9411b365c9bba818f6ed3ba03f24e681b" ]
[ "seisflows/postprocess/total_variation.py" ]
[ "\nimport numpy as np\n\nfrom seisflows.tools import unix\nfrom seisflows.tools.array import loadnpy, savenpy\nfrom seisflows.tools.array import grid2mesh, mesh2grid, stack\nfrom seisflows.tools.code import exists\nfrom seisflows.tools.config import SeisflowsParameters, SeisflowsPaths, \\\n ParameterError, custo...
[ [ "numpy.mean" ] ]
zhenlohuang/tvm
[ "fd2e6d17120a79533852c6bb705429d9c7bc286b", "fd2e6d17120a79533852c6bb705429d9c7bc286b" ]
[ "vta/tests/python/integration/test_benchmark_topi_conv2d_transpose.py", "tests/python/frontend/pytorch/test_forward.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.allclose", "numpy.clip", "numpy.flip", "numpy.random.randint" ], [ "torch.nn.ReflectionPad1d", "torch.addcdiv", "torch.rand", "torch.jit.save", "torch.nn.Conv2d", "torch.meshgrid", "torch.cat", "torch.neg", "torch.jit.trace", "torch.nn.ConstantPad...
jaidevd/scikit-image
[ "62d6a3d7e95a228c729c9ff99b4f45336a210885" ]
[ "skimage/morphology/selem.py" ]
[ "\"\"\"\n:author: Damian Eads, 2009\n:license: modified BSD\n\"\"\"\n\nimport numpy as np\nfrom scipy import ndimage\nfrom skimage import draw\n\ndef square(width, dtype=np.uint8):\n \"\"\"Generates a flat, square-shaped structuring element.\n\n Every pixel along the perimeter has a chessboard distance\n n...
[ [ "numpy.ones", "numpy.zeros", "numpy.abs", "numpy.arange", "scipy.ndimage.morphology.generate_binary_structure", "numpy.array", "numpy.meshgrid" ] ]
shan18/taxi
[ "286e2c9a97c1e0b52d63bbb3508045001f449714" ]
[ "jnt/freq.py" ]
[ "from pandas import read_csv\nimport _pickle as pickle\nfrom traceback import format_exc\n\nfrom .common import exists, preprocess_pandas_csv\nfrom .common import try_remove\n\n\nDEFAULT_FREQ = 1\n\n\ndef load_freq(freq_fpath, min_freq=1, preprocess=True, sep='\\t', strip_pos=True, use_pickle=True):\n f = FreqDi...
[ [ "pandas.read_csv" ] ]
hmthanh/LaTeX_OCR
[ "bf5cf4642aff9cbbd5c4f8f232cd993a38ee6d81" ]
[ "models/layers/norm_act.py" ]
[ "from typing import Union, List\n\nimport torch\nfrom torch import nn as nn\nfrom torch.nn import functional as F\n\nfrom models.layers.create_act import get_act_layer\nfrom .trace_utils import _assert\n\n\nclass BatchNormAct2d(nn.BatchNorm2d):\n \"\"\"BatchNorm + Activation\n This module performs BatchNorm +...
[ [ "torch.nn.Identity", "torch.nn.functional.group_norm", "torch.nn.functional.batch_norm", "torch.nn.functional.layer_norm" ] ]
joycenerd/bird-images-classification
[ "9430f65ba22523809d62b3d84c3e40d8bc47111f" ]
[ "dataset.py" ]
[ "from torch.utils.data import Dataset, DataLoader\nfrom torchvision import transforms\nfrom PIL import Image\nimport torch.nn as nn\nimport numpy as np\nimport torch\n\nfrom pathlib import Path\nimport collections\nimport numbers\nimport random\nimport os\n\n\nclass BirdDataset(Dataset):\n def __init__(self, roo...
[ [ "numpy.random.uniform", "torch.utils.data.DataLoader" ] ]
BB88Lee/mmdetection3d
[ "62aeeadf70ac1229c595e3a4fe09d8a49df808f1" ]
[ "tests/test_voxel_encoders.py" ]
[ "import torch\n\nfrom mmdet3d.models.builder import build_voxel_encoder\n\n\ndef test_pillar_feature_net():\n pillar_feature_net_cfg = dict(\n type='PillarFeatureNet',\n in_channels=5,\n feat_channels=[64],\n with_distance=False,\n voxel_size=(0.2, 0.2, 8),\n point_cloud...
[ [ "torch.rand", "torch.Size", "torch.randint" ] ]
bhklab/ptl-oar-segmentation
[ "354c3ee7f042a025f74e210a7b8462beac9b727d" ]
[ "utils/models/unetplusplus/model.py" ]
[ "import torch\nfrom torch import nn\nfrom .parts import *\n\n__all__ = [\"VGGUNet\", \"NestedUNet\"]\n\n\nclass VGGUNet(nn.Module):\n def __init__(self, num_classes, input_channels=3, leak_p=0.1, factor=1, **kwargs):\n super().__init__()\n\n nb_filter = [\n 32 // factor,\n 64 ...
[ [ "torch.nn.MaxPool3d", "torch.nn.BatchNorm3d", "torch.nn.Upsample", "torch.cat", "torch.nn.Conv3d", "torch.nn.LeakyReLU" ] ]
WendyBaiYunwei/FSL
[ "e20470872d52332efdb1449b4593445c5d94e4fb" ]
[ "cifar/trans_trans.py" ]
[ "import torch\nimport torch.nn as nn\nfrom torch.autograd import Variable\nfrom torch.optim.lr_scheduler import StepLR\nfrom torchvision import datasets\nimport torchvision.transforms as transforms\nfrom self_attention_cv import TransformerEncoder\nimport argparse\nimport math\nimport numpy as np\nfrom torchvision ...
[ [ "torch.ones_like", "torch.utils.data.DataLoader", "torch.sum", "torch.nn.Linear", "torch.load", "torch.square", "torch.flatten", "torch.manual_seed", "torch.autograd.Variable", "torch.nn.CrossEntropyLoss", "torch.from_numpy", "torch.max", "torch.optim.lr_schedul...
k4ntz/mushroom-rl
[ "17c8e9b2a9648a59169f3599c4ef8d259afc39f4" ]
[ "mushroom_rl/algorithms/value/td/q_lambda.py" ]
[ "import numpy as np\n\nfrom mushroom_rl.algorithms.value.td import TD\nfrom mushroom_rl.utils.eligibility_trace import EligibilityTrace\nfrom mushroom_rl.utils.table import Table\n\n\nclass QLambda(TD):\n \"\"\"\n Q(Lambda) algorithm.\n \"Learning from Delayed Rewards\". Watkins C.J.C.H.. 1989.\n\n \"\"...
[ [ "numpy.max" ] ]
manda-creator/probability
[ "5238303f39973b7a365914732fe72f179a86cc97" ]
[ "tensorflow_probability/python/experimental/mcmc/sample_sequential_monte_carlo.py" ]
[ "# Copyright 2020 The TensorFlow Probability 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 a...
[ [ "tensorflow.compat.v2.math.log", "tensorflow.compat.v2.convert_to_tensor", "tensorflow.compat.v2.zeros", "tensorflow.compat.v2.reduce_max", "tensorflow.compat.v2.reduce_mean", "tensorflow.compat.v2.math.reduce_logsumexp", "tensorflow.compat.v2.math.log1p", "tensorflow.compat.v2.ide...
raj713335/AI-102
[ "15f4b61dbcbf84abf25ce2f967afc0d52795e9f8" ]
[ "15-computer-vision/Python/image-analysis/image-analysis.py" ]
[ "from dotenv import load_dotenv\nimport os\nfrom array import array\nfrom PIL import Image, ImageDraw\nimport sys\nimport time\nfrom matplotlib import pyplot as plt\nimport numpy as np\n\n\n# import namespaces\nfrom azure.cognitiveservices.vision.computervision import ComputerVisionClient\nfrom azure.cognitiveservi...
[ [ "matplotlib.pyplot.figure", "matplotlib.pyplot.axis", "matplotlib.pyplot.annotate", "matplotlib.pyplot.imshow" ] ]
coltonbh/QCElemental
[ "b75fb72d7f45c8b605ae1a54773d4a8be6655752" ]
[ "qcelemental/datum.py" ]
[ "\"\"\"\nDatum Object Model\n\"\"\"\n\nfrom decimal import Decimal\nfrom typing import Any, Dict, Optional\n\nimport numpy as np\nfrom pydantic import BaseModel, validator\n\n\nclass Datum(BaseModel):\n r\"\"\"Facilitates the storage of quantum chemical results by labeling them with basic metadata.\n\n Attrib...
[ [ "numpy.array_str" ] ]
jhardenberg/EnsClus
[ "c7591aa39d649fc4321ac4db219f241aabcaf295" ]
[ "clus/sel_season_area.py" ]
[ "# Standard packages\nfrom netCDF4 import Dataset, num2date\nfrom datetime import datetime\nimport numpy as np\nimport pandas as pd\n\n#____________Selecting a season (DJF,DJFM,NDJFM,JJA)\ndef sel_season(var,dates,season,timestep):\n #------------------------------------------------------------------------------...
[ [ "numpy.sum", "pandas.to_datetime", "numpy.argmax" ] ]
pengfei-ma/Google-Play-Store-Subjects-Analysis
[ "65d224eef9c0b6a2714f329edcfd5a4c32f6a2dd" ]
[ "Gradient Descent finding parameters.py" ]
[ "import sys\nfrom operator import add\nfrom pyspark.sql import SparkSession\nfrom pyspark import SparkContext\nimport pyspark\nfrom pyspark.ml.linalg import Vectors\nimport numpy as np\nfrom sklearn.linear_model import LinearRegression\nfrom pyspark.sql.types import *\nfrom pyspark.sql import functions as func\nfro...
[ [ "sklearn.linear_model.LinearRegression", "matplotlib.pyplot.title", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "numpy.stack", "matplotlib.pyplot.plot", "numpy.array", "matplotlib.pyplot.xlabel" ] ]
Ahmed-elshorbagy/dog_web_app
[ "058b79328d3ed16a77c312f39b5b150eb6423612" ]
[ "web/dog/dog/views.py" ]
[ "# import the necessary packages \r\nfrom django.shortcuts import render\r\nfrom django.views.decorators.csrf import csrf_exempt\r\nfrom django.http import JsonResponse,HttpResponse\r\nimport numpy as np\r\nimport urllib\r\nimport json\r\nimport cv2\r\nimport os\r\nfrom .face import dog_ear\r\nfrom glob impo...
[ [ "numpy.expand_dims", "numpy.argmax", "tensorflow.get_default_graph" ] ]
itouchz/TRepNet
[ "5fa9f273dc57b778ac0a94fffcb926de333ecc37" ]
[ "OnlyWavenet.py" ]
[ "import numpy as np\nimport pandas as pd\nimport tensorflow as tf\nimport os\nimport warnings\nimport time\n\nwarnings.filterwarnings('ignore') \n\nfrom tensorflow import keras\nfrom sklearn.preprocessing import RobustScaler, Normalizer, StandardScaler\nfrom sklearn.model_selection import train_test_split\nfrom dat...
[ [ "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Dropout", "tensorflow.keras.layers.Conv2DTranspose", "tensorflow.keras.layers.Reshape", "tensorflow.keras.layers.Conv1D", "numpy.random.seed", "tensorflow.keras.layers.Activation", "tensorflow.keras.models.Model", "ten...
daniilgaltsev/ImageNet-Training
[ "9ca1d26cde07782398c7f366d5bf510c9e988236" ]
[ "imagenet_training/models/simple_cnn.py" ]
[ "\"\"\"A simple cnn model.\"\"\"\n\n\nimport argparse\nfrom collections import OrderedDict\nfrom typing import Any, Dict, Optional\n\nimport torch\nimport torch.nn as nn\n\n\nclass SimpleCNN(nn.Module):\n \"\"\"A simple CNN model.\n\n Args:\n data_config: a dictionary containing information about data....
[ [ "torch.nn.MaxPool2d", "torch.nn.BatchNorm2d", "torch.nn.Linear", "torch.nn.Flatten", "torch.nn.AdaptiveAvgPool2d", "torch.nn.Conv2d", "torch.nn.ReLU" ] ]
sgjholt/SpecMod
[ "453c77c1fa51c220470e2aa4d92ec432360bfc9f" ]
[ "specmod/Models.py" ]
[ "# MODELS contains a set of functions for minimisation to seismic spectra.\n# It can be modified as appropriate.\nimport numpy as np\nfrom . import config as cfg\n\nMODS = [\"BRUNE\", \"BOATWRIGHT\"]\n\n# UTIL FUNCS\ndef which_model(mod):\n if mod in MODS:\n if mod == \"BRUNE\":\n return BRUNE_...
[ [ "numpy.log", "numpy.log10", "numpy.power" ] ]
egonina/svm
[ "397f6fa8d29e8299478586e88864cae095fb08c1" ]
[ "test/svm_test.py" ]
[ "import unittest2 as unittest\nimport copy\nimport numpy as np\nfrom svm_specializer.svm import * \n\nclass BasicTests(unittest.TestCase):\n def test_init(self):\n svm = SVM()\n self.assertIsNotNone(svm)\n\nclass SyntheticDataTests(unittest.TestCase):\n def read_data(self, in_file_name):\n ...
[ [ "numpy.array" ] ]
runxuanjiang/DeepRL
[ "f5c47c52d4db50577fbada17b09d739da3da67cc" ]
[ "deep_rl/agent/PPO_recurrent_agent_recurrence.py" ]
[ "#######################################################################\n# Copyright (C) 2017 Shangtong Zhang(zhangshangtong.cpp@gmail.com) #\n# Permission given to modify the code as long as you keep this #\n# declaration at the top #\n#######################...
[ [ "numpy.arange", "numpy.random.permutation" ] ]
icmaple931/facenet-pytorch
[ "555aa4bec20ca3e7c2ead14e7e39d5bbce203e4b" ]
[ "tests/travis_test.py" ]
[ "\"\"\"\nThe following code is intended to be run only by travis for continuius intengration and testing\npurposes. For implementation examples see notebooks in the examples folder.\n\"\"\"\n\nfrom PIL import Image, ImageDraw\nimport torch\nfrom torch.utils.data import DataLoader\nfrom torchvision import transforms...
[ [ "torch.stack", "pandas.DataFrame", "numpy.abs", "numpy.argsort", "torch.tensor", "torch.cuda.is_available", "torch.cuda.amp.autocast", "numpy.array", "torch.device" ] ]
SandhyaaGopchandani/PythonNetworkLibsComparion
[ "72db0cabecd0a9764663a044b19ef4dde843c402" ]
[ "net_performance_comparison.py" ]
[ "import itertools\nimport numpy as np\nfrom timeit import default_timer as timer\nfrom graph_tool.all import *\nimport pickle\nimport networkx as nx\nimport matplotlib as mpl\n#mpl.use('TkAgg')\nimport matplotlib.pyplot as plt\nfrom igraph import *\n\n\ndef nodes_edges(num_nodes):\n \"\"\" this function takes nu...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.xticks", "numpy.random.random", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.xlabel" ] ]
tsjayram/mi-prometheus
[ "cf163d9e246c3ae3c100045e58924148b2f81c39" ]
[ "miprometheus/workers/worker.py" ]
[ "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) IBM Corporation 2018\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/L...
[ [ "torch.utils.data.DataLoader", "torch.cuda.manual_seed_all", "torch.manual_seed", "numpy.random.seed", "torch.tensor", "torch.cuda.is_available" ] ]
laughingwithu/jesse
[ "c21adf59074ad62e4aa775261b4ad86c542ec4d5" ]
[ "jesse/indicators/mom.py" ]
[ "import numpy as np\nimport talib\n\nfrom typing import Union\n\n\ndef mom(candles: np.ndarray, period=10, sequential=False) -> Union[float, np.ndarray]:\n \"\"\"\n MOM - Momentum\n\n :param candles: np.ndarray\n :param period: int - default=10\n :param sequential: bool - default=False\n\n :return...
[ [ "numpy.isnan" ] ]
LJ-LiJiahe/cnn_pytorch
[ "abddc46240a2c7da9818c1cb945d951a8e3b107f" ]
[ "plot_loss_accuracy.py" ]
[ "import os\n\nimport numpy as np\nfrom matplotlib import pyplot as plt\nimport matplotlib\n\nimport config as cfg\nfrom utils import read_from_pickle_file\n\n# Server to Dell box\nmatplotlib.use('TkAgg')\ntrain_loss = []\nvalidation_loss = []\n\ntrain_loss_loc = os.path.join(cfg.loss_dir, 'train_loss')\nvalidation_...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel", "matplotlib.use", "matplotlib.pyplot.plot", "numpy.array", "matplotlib.pyplot.xlabel" ] ]
antonkulaga/DeepAb
[ "51a32d06d19815705bdbfb35a8a9518c17ec313a" ]
[ "deepab/resnets/CrissCrossResNet2D.py" ]
[ "import torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nfrom torch.utils.checkpoint import checkpoint\nfrom einops import rearrange, repeat\n\n\nclass CrissCrossAttention(nn.Module):\n def __init__(self, in_dim):\n super(CrissCrossAttention, self).__init__()\n self.query_conv = nn.Co...
[ [ "torch.nn.BatchNorm2d", "torch.utils.checkpoint.checkpoint", "torch.nn.Softmax", "torch.nn.ReLU", "torch.nn.Conv2d", "torch.zeros", "torch.bmm", "torch.cat" ] ]
eugeniu1994/Update_CV
[ "562b646e02ffb374dae428a7b6f3ae1debecc997" ]
[ "stuff/scripts/stuff/PointCloudViz.py" ]
[ "from mpl_toolkits.mplot3d import Axes3D\nimport matplotlib.pyplot as plt\nimport numpy as np\n\nskip = 15\n#source = '/home/eugen/catkin_ws/src/Camera_Lidar/DATA/pcd/0002.csv'\n#data = np.genfromtxt(source, delimiter=',')[1::skip,:3]\n#print ('data ', np.shape(data))\n\n#x,y,z = data[:,0],data[:,1],data[:,2]\n\n''...
[ [ "numpy.ones", "numpy.meshgrid", "matplotlib.pyplot.figure", "numpy.argmin", "matplotlib.pyplot.gca", "numpy.abs", "numpy.zeros", "matplotlib.pyplot.subplots", "numpy.arange", "numpy.max", "numpy.min", "numpy.array", "numpy.linalg.norm", "numpy.matrix", "...
sandbox/pandas
[ "fd5471208244ae1cb9cb426d6aa02ab408cfacba", "fd5471208244ae1cb9cb426d6aa02ab408cfacba" ]
[ "pandas/tests/test_base.py", "pandas/tests/plotting/test_boxplot_method.py" ]
[ "# -*- coding: utf-8 -*-\nfrom __future__ import print_function\n\nimport re\nimport sys\nfrom datetime import datetime, timedelta\n\nimport numpy as np\n\nimport pandas as pd\nimport pandas.compat as compat\nfrom pandas.types.common import (is_object_dtype, is_datetimetz,\n needs_i8...
[ [ "pandas.Series", "pandas.util.testing.makeFloatIndex", "pandas.core.base.FrozenNDArray", "pandas.types.common.is_datetimetz", "pandas.util.testing.assert_produces_warning", "pandas.util.testing.assert_series_equal", "pandas.util.testing.makeStringIndex", "pandas.util.testing.makeIn...
dgoodwin208/6.883ProteinDocking
[ "07f33688bd5ec8c5ae6d4d4113eb64b0f2352e9e" ]
[ "config.py" ]
[ "import torch\n\ndevice = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')\nFloatTensor = torch.cuda.FloatTensor if torch.cuda.is_available() else torch.FloatTensor\nLongTensor = torch.cuda.LongTensor if torch.cuda.is_available() else torch.LongTensor\n" ]
[ [ "torch.cuda.is_available", "torch.device" ] ]
ilya-fedin/tg_owt
[ "d5c3d43b959c7e9e7d8004b9b7fdadd12ce7d589" ]
[ "src/modules/audio_processing/test/py_quality_assessment/quality_assessment/test_data_generation_unittest.py" ]
[ "# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.\n#\n# Use of this source code is governed by a BSD-style license\n# that can be found in the LICENSE file in the root of the source\n# tree. An additional intellectual property rights grant can be found\n# in the file PATENTS. All contributing ...
[ [ "numpy.random.rand" ] ]
alexandgu/hyperopt
[ "cfb7a89d689ea8102b90b20daefd390d526eb131" ]
[ "hyperopt/tpe.py" ]
[ "\"\"\"\nGraphical model (GM)-based optimization algorithm using Theano\n\"\"\"\nfrom past.utils import old_div\nimport logging\nimport time\n\nimport numpy as np\nfrom scipy.special import erf\nfrom . import pyll\nfrom .pyll import scope\nfrom .pyll.stochastic import implicit_stochastic\n\nfrom .base import miscs_...
[ [ "numpy.ones", "numpy.sum", "numpy.argsort", "numpy.asarray", "numpy.log", "numpy.seterr", "numpy.zeros", "numpy.searchsorted", "numpy.argmax", "numpy.all", "numpy.prod", "numpy.maximum", "numpy.array", "numpy.zeros_like", "numpy.random.default_rng", ...
selflein/nn_uncertainty_eval
[ "94a7f2292b8db2197cd55fab57324d438618ae06" ]
[ "uncertainty_eval/datasets/other.py" ]
[ "import json\nfrom pathlib import Path\n\nimport torch\nimport numpy as np\nfrom PIL import Image\nfrom torch.utils.data import Dataset, TensorDataset\nfrom tfrecord.torch.dataset import MultiTFRecordDataset\n\nfrom uncertainty_eval.datasets.tabular import TabularDataset\nfrom uncertainty_eval.datasets.abstract_dat...
[ [ "torch.distributions.Uniform", "numpy.load", "torch.empty", "torch.distributions.Normal", "torch.from_numpy", "torch.utils.data.TensorDataset" ] ]
atakanokan/flair
[ "d33aa6a007384da76d1ae8dac6f4fc61bc652ce7" ]
[ "flair/embeddings.py" ]
[ "import os\nimport re\nimport logging\nfrom abc import abstractmethod\nfrom collections import Counter\nfrom pathlib import Path\nfrom typing import List, Union, Dict\n\nimport gensim\nimport numpy as np\nimport torch\nfrom bpemb import BPEmb\nfrom deprecated import deprecated\n\nfrom pytorch_pretrained_bert import...
[ [ "torch.nn.init.xavier_uniform_", "torch.nn.LSTM", "torch.nn.Linear", "torch.nn.utils.rnn.pack_padded_sequence", "torch.nn.Dropout", "torch.FloatTensor", "numpy.zeros", "torch.no_grad", "torch.tensor", "torch.nn.GRU", "torch.nn.ReLU", "torch.eye", "torch.zeros", ...
mavismonica/pandas
[ "dbdc55c9d59f25589d58cc60247af193f06c3c66" ]
[ "pandas/tests/indexing/test_indexing.py" ]
[ "\"\"\" test fancy indexing & misc \"\"\"\n\nfrom datetime import datetime\nimport re\nimport weakref\n\nimport numpy as np\nimport pytest\n\nfrom pandas.core.dtypes.common import is_float_dtype, is_integer_dtype\n\nimport pandas as pd\nfrom pandas import DataFrame, Index, NaT, Series\nimport pandas._testing as tm\...
[ [ "pandas.Series", "pandas.array", "pandas._testing.assert_frame_equal", "pandas.Float64Index", "pandas.core.dtypes.common.is_float_dtype", "pandas.Categorical", "pandas._testing.assert_series_equal", "pandas.core.indexing.maybe_numeric_slice", "pandas._testing.assert_produces_wa...
jinhan814/PyTorch-GAN-Study
[ "c63ed1bbcbc663d3267671d8ded4ed13c766b738" ]
[ "PGGAN/hyun_experiments.py" ]
[ "import torch\n## 실험용 입니다\n\n# x = torch.randint(10,size=(1,4,2,2))\n# print(x)\n# print(x.size())\n\n# factor =2\n# s = x.size()\n# x = x.view(-1, s[1], s[2], 1, s[3], 1) # (-1, 4, 2, 1, 2, 1)\n# print(x.size())\n# # print(x)\n# x = x.expand(-1, s[1], s[2], factor, s[3], factor) # (-1, 4,2,2,2,2)\n# print(x.size(...
[ [ "torch.randint", "torch.transpose" ] ]
nxdao2000/probability
[ "33d2bc1cb0e7b6284579ea7f3692b9d056e0d700", "33d2bc1cb0e7b6284579ea7f3692b9d056e0d700" ]
[ "tensorflow_probability/python/positive_semidefinite_kernels/positive_semidefinite_kernel.py", "tensorflow_probability/python/internal/backend/numpy/nn.py" ]
[ "# Copyright 2018 The TensorFlow Probability 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 a...
[ [ "tensorflow.compat.v2.name_scope", "tensorflow.compat.v2.squeeze", "tensorflow.compat.v2.expand_dims", "tensorflow.compat.v2.convert_to_tensor" ], [ "numpy.reshape", "numpy.abs", "numpy.exp", "numpy.max", "numpy.maximum" ] ]
PeterDeWeirdt/sgrna_modeler
[ "5c6cf0330cda35acf67d7e5f58d0b2ae29bf026e" ]
[ "sgrna_modeler/models.py" ]
[ "from sgrna_modeler import features as fe\nfrom sklearn.model_selection import train_test_split\nfrom sklearn import ensemble\nfrom tensorflow import keras as k\nimport pandas as pd\nimport os\nfrom joblib import load\nimport sgrna_modeler.enzymes as en\n\ndef curr_path():\n return os.path.dirname(__file__)\n\nd...
[ [ "tensorflow.keras.layers.Flatten", "tensorflow.keras.layers.Dropout", "sklearn.ensemble.GradientBoostingRegressor", "tensorflow.keras.callbacks.History", "pandas.DataFrame", "tensorflow.keras.layers.AveragePooling1D", "tensorflow.keras.models.Model", "tensorflow.keras.callbacks.Ear...
kagemeka/competitive-programming
[ "c70fe481bcd518f507b885fc9234691d8ce63171", "c70fe481bcd518f507b885fc9234691d8ce63171" ]
[ "src/atcoder/abc212/g/sol_8.py", "src/atcoder/abc016/d/sol_1.py" ]
[ "import typing\nimport numpy as np\nimport numba as nb\n\n\n\n\n@nb.njit\ndef find_divisors(\n n: int,\n) -> np.array:\n i = np.arange(int(n ** .5))\n i += 1\n i = i[n % i == 0]\n i = np.hstack((i, n // i))\n return np.unique(i)\n\n\n\n@nb.njit\ndef gpf(\n n: int = 1 << 20,\n) -> np.array:\n s = np.arange(n...
[ [ "numpy.arange", "numpy.hstack", "numpy.flatnonzero", "numpy.unique" ], [ "numpy.vstack", "numpy.count_nonzero" ] ]
tobiasmaier/pytorch-lightning
[ "7f352cb69a8202e3f829419657597697ca5d99e2" ]
[ "pytorch_lightning/core/lightning.py" ]
[ "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law...
[ [ "torch.jit.save", "torch.no_grad", "torch.onnx.export", "torch._C._log_api_usage_once" ] ]
HotMaps/renovation_effect
[ "5b1fb81102b3c6ee531b719d8136ed9a343c2598" ]
[ "cm/app/api_v1/my_calculation_module_directory/CM/__delete_if_tested__/CEDM/create_csv_results.py" ]
[ "\nimport numpy as np\nimport os\nimport time\nimport sys\n\npath = os.path.dirname(os.path.dirname(os.path.dirname(os.path.\n abspath(__file__))))\nif path not in sys.path:\n sys.path.append(path)\n \nimport CM_intern.CEDM.modules.cyf.create_density_map a...
[ [ "numpy.ones", "numpy.sum", "numpy.zeros_like", "numpy.zeros", "numpy.ones_like", "numpy.arange", "numpy.max", "numpy.round" ] ]
RiccardoNanni/bigbang
[ "70b9890fcd615ccb21a3685a9b33d79226e6fb36" ]
[ "bigbang/listserv.py" ]
[ "import datetime\nimport email\nimport email.parser\nimport glob\nimport mailbox\nimport os\nimport re\nimport subprocess\nimport time\nimport urllib\nimport warnings\nfrom email.header import Header\nfrom email.message import Message\nfrom email.mime.text import MIMEText\nfrom typing import Dict, List, Optional, T...
[ [ "numpy.max", "numpy.min" ] ]
bhigy/discrete-repr
[ "3d4a4fc3833df3a1fa287c78c7402ce6df09abd4" ]
[ "metrics.py" ]
[ "from collections import Counter\nfrom itertools import groupby\nfrom math import log2\nimport numpy as np\n\n\ndef segments_start(array):\n return [i for i in range(len(array)) if i == 0 or array[i] != array[i-1]]\n\n\ndef split_sequences(array, start):\n end = start[1:] + [len(array)]\n return [array[s:e...
[ [ "numpy.sum", "numpy.unique" ] ]
shivammalviya712/Real-Time-Trigger-Word-Detection
[ "7ad9144d31ef407f7326750633471dcb30cb5e46" ]
[ "code/realtime.py" ]
[ "\"\"\"Implement the model in real time.\"\"\"\n\n# Third party modules\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport sounddevice as sd\nfrom pydub import AudioSegment\nfrom pydub.playback import play\n\n\nclass Realtime:\n \"\"\"Implement the modle in real time.\"\"\"\n def __init__(self, sett...
[ [ "matplotlib.pyplot.specgram", "matplotlib.pyplot.show", "numpy.zeros", "matplotlib.pyplot.pause" ] ]
mfarthin/PyDMD
[ "ac2c800cfa9fb23ab110d2b2957b5681e2aa5055" ]
[ "pydmd/hodmd.py" ]
[ "\"\"\"\nDerived module from dmdbase.py for higher order dmd.\n\nReference:\n- S. L Clainche, J. M. Vega, Higher Order Dynamic Mode Decomposition.\nJournal on Applied Dynamical Systems, 16(2), 882-925, 2017.\n\"\"\"\nimport numpy as np\n\nfrom .dmdbase import DMDBase\nfrom .utils import compute_tlsq\n\n\nclass HODM...
[ [ "numpy.ma.is_masked", "numpy.isnan", "numpy.full", "numpy.average", "numpy.mean" ] ]
martahal/DeepLearning
[ "c3a70a117c2f3417832c7caecd3baf6cd9862ae2" ]
[ "GenerativeModelling/gen_autoencoder_routine.py" ]
[ "from GenerativeModelling.Autoencoder import Autoencoder\nfrom GenerativeModelling.Encoder import Encoder\nfrom GenerativeModelling.Decoder import Decoder\nfrom GenerativeModelling.verification_net import VerificationNet\nfrom SemiSupervisedLearning import visualisations\nfrom GenerativeModelling.Trainer import Tra...
[ [ "torch.ones", "matplotlib.pyplot.legend", "matplotlib.pyplot.figure", "torch.manual_seed", "matplotlib.pyplot.savefig", "numpy.argsort", "torch.zeros", "matplotlib.pyplot.title", "numpy.array" ] ]
mlepori1/Representations_Of_Syntax
[ "7a09004a1e443618ee6b1645e54224766c3965f1" ]
[ "Natural_and_Artificial/MARCC/test_aug500_const_1.py" ]
[ "import sys\n\nif not sys.warnoptions:\n import warnings\n warnings.simplefilter(\"ignore\")\n\nimport numpy as np\nimport csv\nimport copy\n\nfrom torch import optim\nfrom torch.nn import BCELoss\nfrom torch.optim import Adam\nimport torch\n\nfrom random import shuffle\nimport random\n\nimport models\nimport...
[ [ "torch.FloatTensor", "torch.load" ] ]
VitaliyPavlyukov/AutoMLWhitebox
[ "4acd55624490707a7fbf036631533e29123bb1bd" ]
[ "autowoe/lib/types_handler/types_handler.py" ]
[ "import collections\n\nimport pandas as pd\n\nfrom typing import Dict, Hashable, Optional, Any\nfrom copy import deepcopy\n\nfrom .features_checkers_handlers import dates_handler, dates_checker, cat_checker\n\n\nclass TypesHandler:\n \"\"\"\n Класс для автоматического определения типов признаков.\n Базовая...
[ [ "pandas.to_numeric" ] ]
bombrun/GaiaLQSO
[ "b4d787a4d80732cbb5a3762c34298f2430dd0540" ]
[ "lens/sie/random.py" ]
[ "import numpy as np\nimport pandas as pd\nimport astropy.units as u\nimport healpy as hp\n\nfrom lens.sie.plot import *\n\ndef angle2pixel(ra_deg,dec_deg):\n \"\"\" return healpix index 12\"\"\"\n phi = ra_deg * np.pi / 180\n theta = np.pi/2 - (dec_deg * np.pi/180)\n return hp.ang2pix(4096,theta,phi,nes...
[ [ "numpy.random.uniform", "pandas.DataFrame", "numpy.abs", "numpy.asarray", "numpy.cos", "pandas.concat", "numpy.random.normal", "numpy.sin" ] ]
DongChengdongHangZhou/CycleGAN-tiff
[ "e13a4d702ac6ce3e13af4946a1bc6657c1a2089e" ]
[ "util/visualizer.py" ]
[ "import numpy as np\nimport os\nimport sys\nimport ntpath\nimport time\nfrom . import util, html\nfrom subprocess import Popen, PIPE\nimport tifffile as tiff\n\n\nif sys.version_info[0] == 2:\n VisdomExceptionBase = Exception\nelse:\n VisdomExceptionBase = ConnectionError\n\n\ndef save_images(webpage, visuals...
[ [ "numpy.array" ] ]
pjgao/Deep-Forest
[ "0fdec38b671ababfcc3476807fe512aa993d4fd4" ]
[ "tests/test_buffer.py" ]
[ "import os\nimport pytest\nimport numpy as np\n\nfrom deepforest import _io as io\n\n\nopen_buffer = io.Buffer(use_buffer=True,\n buffer_dir=\"./\",\n store_est=True,\n store_pred=True,\n store_data=True)\n\n\nclose_buffer =...
[ [ "numpy.zeros" ] ]
qwertpi/techdiff-textgen
[ "fd7578a24e11b96d86a92d2935b6153b1bea73f8" ]
[ "train.py" ]
[ "from json import dump\nfrom math import ceil\nfrom random import randint\nimport string\n\nfrom keras.layers import Input, Dense, Embedding\n#uncoment if using CPU\n##from keras.layers import LSTM\n#comment out the line bellow if using CPU\nfrom keras.layers import CuDNNLSTM as LSTM\nfrom keras.models import Model...
[ [ "numpy.array", "numpy.random.choice" ] ]
Mithrillion/BiQA
[ "f61bea95521f5b2ffd838aa60aecaad568de6564" ]
[ "scripts/data_utils.py" ]
[ "import numpy as np\nimport re\nimport torch.utils.data as tud\nimport torch\nimport shutil\n\n\ndef get_word_ids(doc, rnn_encode=True, max_length=100,\n nr_unk=100, nr_var=600, rev_dic=None, relabel=True, ent_dict=None):\n queue = list(doc)\n X = np.zeros(max_length, dtype='int32')\n # M =...
[ [ "numpy.sum", "numpy.zeros", "torch.save", "numpy.array", "numpy.linalg.norm", "torch.sort" ] ]
dbseorms16/drnxgaze
[ "c7b84189c263456c648829bc399a5edb2ec17bb8" ]
[ "estimate_gaze_standalone.py" ]
[ "#!/usr/bin/env python\n\n# Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode)\n\nfrom __future__ import print_function, division, absolute_import\n\nimport argparse\nimport os\nimport sys\nimport time\n\nimport cv2\ni...
[ [ "numpy.array", "numpy.dot", "numpy.zeros" ] ]
mbmccoy/jax
[ "74346f464bc8369d81964305fcf05f95f43fb2d3" ]
[ "jaxlib/pocketfft.py" ]
[ "# Copyright 2020 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed ...
[ [ "numpy.dtype", "numpy.issubdtype", "numpy.asarray", "numpy.arange", "numpy.prod", "numpy.array", "numpy.frombuffer" ] ]
Qiza-lyhm/mmcv-1
[ "362a90f8bfffe62d5802925944f540ed16b2731e" ]
[ "tests/test_ops/test_bbox.py" ]
[ "# Copyright (c) OpenMMLab. All rights reserved.\nimport numpy as np\nimport pytest\nimport torch\n\nfrom mmcv.device.mlu import IS_MLU_AVAILABLE\nfrom mmcv.utils import IS_CUDA_AVAILABLE\n\n\nclass TestBBox(object):\n\n def _test_bbox_overlaps(self, device, dtype=torch.float):\n from mmcv.ops import bbox...
[ [ "numpy.array", "torch.tensor" ] ]
ZenanLin1999/FPGA_accerator_with_mnist_dataset
[ "1db3d698ebe3cf57050af9465e0b83ffef717d25" ]
[ "int16_version/tensorflow_mnist/mnist_int16.py" ]
[ "# -*- coding: utf-8 -*-\nimport input_data\nimport tensorflow as tf\nimport numpy as np\nfrom tf_fix import *\n\nmnist = input_data.read_data_sets('MNIST_data', one_hot=True)\nsess = tf.InteractiveSession()\n\nwith tf.name_scope('input'): \n\tx = tf.placeholder(\"float\", shape=[None, 784])\n\ty_ = tf.placeholder(...
[ [ "tensorflow.initialize_all_variables", "tensorflow.placeholder", "tensorflow.nn.max_pool", "tensorflow.reshape", "tensorflow.truncated_normal", "tensorflow.train.AdamOptimizer", "tensorflow.nn.conv2d", "tensorflow.InteractiveSession", "tensorflow.matmul", "tensorflow.name_s...
granatumx/gbox-py
[ "b3e264a22bc6a041f2dd631d952eae29c0ecae21", "b3e264a22bc6a041f2dd631d952eae29c0ecae21" ]
[ "sample_coloring.py", "scanpy_normalization.py" ]
[ "#!/usr/bin/env python\n\nimport math\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom scipy.spatial import ConvexHull\nfrom colour import Color\nfrom matplotlib.patches import Polygon\nimport statistics as st\n\nfrom granatum_sdk import Granatum\n\nCOLORS = [\"#3891ea\", \"#29ad19\",...
[ [ "numpy.arctan2", "scipy.spatial.ConvexHull", "matplotlib.pyplot.legend", "pandas.Series", "matplotlib.pyplot.gca", "matplotlib.pyplot.get_cmap", "matplotlib.pyplot.ylabel", "numpy.mean", "matplotlib.pyplot.colorbar", "numpy.array", "matplotlib.pyplot.xlabel", "matpl...
Bheshaj-Kumar/Transformer-Grapheme-to-Phoneme-Conversion
[ "cc1ff53498cf9d178e1880b5d074ec91559ac95a" ]
[ "model/new_models.py" ]
[ "import sys\nimport numpy as np\nimport tensorflow as tf\nfrom model.transformer_utils import create_encoder_padding_mask, create_mel_padding_mask, create_look_ahead_mask\n#from preprocessing.text import Pipeline\nfrom model.layers import PreBottleNeckDecoder, Encoder, Decoder, SpeakerModule\nfrom utils.losses impo...
[ [ "tensorflow.math.equal", "tensorflow.zeros", "tensorflow.shape", "tensorflow.function", "tensorflow.reduce_mean", "numpy.asarray", "tensorflow.expand_dims", "tensorflow.cast", "tensorflow.GradientTape", "tensorflow.convert_to_tensor", "tensorflow.keras.layers.Dense", ...
cvanoort/differentiable-plasticity
[ "28c53765ed38f80fd5a5c49e3e62a0e6555eb669" ]
[ "maze/plotfigure.py" ]
[ "# Code for making a figure\n#\n# Copyright (c) 2018 Uber 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...
[ [ "numpy.sqrt", "matplotlib.pyplot.legend", "matplotlib.pyplot.rc", "matplotlib.pyplot.xticks", "matplotlib.pyplot.figure", "numpy.std", "numpy.median", "numpy.insert", "numpy.percentile", "numpy.max", "matplotlib.pyplot.ylabel", "numpy.min", "numpy.loadtxt", ...
greenelab/phenoplier
[ "95f04b17f0b5227560fcf32ac0a85b2c5aa9001f" ]
[ "nbs/13_consensus_clustering/py/030_03-analysis-coassociation.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# cell_metadata_filter: all,-execution,-papermill,-trusted\n# formats: ipynb,py//py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.3'\n# jupytext_version: 1.7.1\n# kernelspec:\n# display_nam...
[ [ "numpy.load", "pandas.read_pickle", "pandas.Series", "numpy.ones", "matplotlib.pyplot.subplots", "numpy.unique" ] ]
tensorleap/tensorflow-onnx
[ "56f6070828928bbb0f30890b2229eec8b663213d", "56f6070828928bbb0f30890b2229eec8b663213d" ]
[ "tests/test_tf_shape_inference.py", "tests/test_cudnn_compatible_gru.py" ]
[ "# SPDX-License-Identifier: Apache-2.0\n\n\n\"\"\"Unit Tests for Tensorflow shape inference.\"\"\"\n\nfrom __future__ import division\nfrom __future__ import print_function\nfrom __future__ import unicode_literals\n\nimport os\nimport numpy as np\nimport tensorflow as tf\n\nfrom tensorflow.python.ops import variabl...
[ [ "numpy.ones", "tensorflow.nn.dynamic_rnn", "tensorflow.concat", "numpy.stack", "tensorflow.nn.rnn_cell.LSTMStateTuple", "tensorflow.identity", "tensorflow.contrib.seq2seq.dynamic_decode", "tensorflow.compat.v1.disable_eager_execution", "tensorflow.nn.rnn_cell.LSTMCell", "te...
cnheider/xgboost
[ "e7fbc8591fa7277ee4c474b7371c48c11b34cbde" ]
[ "tests/python/test_training_continuation.py" ]
[ "import xgboost as xgb\nimport testing as tm\nimport numpy as np\nimport unittest\n\nrng = np.random.RandomState(1337)\n\n\nclass TestTrainingContinuation(unittest.TestCase):\n num_parallel_tree = 3\n\n xgb_params_01 = {\n 'silent': 1,\n 'nthread': 1,\n }\n\n xgb_params_02 = {\n 'si...
[ [ "numpy.random.RandomState", "sklearn.datasets.load_digits", "numpy.testing.assert_almost_equal" ] ]
feldman4/NatureProtocols
[ "a0a6775b8edfc493ac6265b1844040c1ae29c33b" ]
[ "ops/ngs.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom glob import glob\nfrom natsort import natsorted\n\n# TODO: from ops.constants import *\nfrom . import utils\n\ndef load_hist(filename, threshold):\n try:\n return (pd.read_csv(filename, sep='\\s+', header=None)\n .rename(columns={0: 'count', 1: 'se...
[ [ "pandas.read_csv", "numpy.log10", "pandas.concat" ] ]
norfordb/groundmotion
[ "3f714894a34d9d37e1ac236f26b4366e25a05056" ]
[ "gmprocess/metrics/reduction/arias.py" ]
[ "# Third party imports\nimport numpy as np\nfrom scipy import integrate\n\n# Local imports\nfrom gmprocess.constants import GAL_TO_PCTG\nfrom gmprocess.metrics.reduction.reduction import Reduction\nfrom gmprocess.stationstream import StationStream\nfrom gmprocess.stationtrace import StationTrace\n\n\nclass Arias(Re...
[ [ "scipy.integrate.cumtrapz", "numpy.max" ] ]