repo_name
stringlengths
6
130
hexsha
list
file_path
list
code
list
apis
list
govindap/lyft_motion_prediction
[ "15412444fec69ce4a0082d8de730cb882833eab0" ]
[ "lyft_CNN.py" ]
[ "import numpy as np\nimport torch\nfrom torch import nn, optim\nfrom torch.utils.data import DataLoader\nfrom torchvision.models.resnet import resnet50, resnet34\nfrom torch import Tensor\nfrom typing import Dict\n\nfrom l5kit.configs import load_config_data\nfrom l5kit.data import LocalDataManager, ChunkedDataset\...
[ [ "torch.softmax", "torch.nn.Conv2d", "torch.flatten", "torch.nn.Linear", "torch.split" ] ]
zhouhan921001/DeepLearning-homework
[ "20562dc49ca5898b531a678c0e54c8d985fcc72f" ]
[ "DLCoursera_part1_week4_1.py" ]
[ "import numpy as np\nfrom dnn_utils import sigmoid,sigmoid_backward,relu,relu_backward\n\ndef initialize_two_layer(n_x,n_h,n_y):\n\n\tW1 = np.random.randn(n_h,n_x) * 0.01\n\tb1 = np.zeros(n_h,1)\n\tW2 = np.random.randn(n_y,n_h) * 0.01\n\tb2 = np.zeros(n_y,1)\n\n\tparam = {\"W1\":W1,\"b1\":b1,\"W2\":W2,\"b2\":b2}\n\...
[ [ "numpy.dot", "numpy.random.randn", "numpy.zeros", "numpy.sum", "numpy.divide" ] ]
rmodi6/word-representations
[ "4f9a13cee9ff60ce3c667c833330b59de774ed39" ]
[ "word2vec_basic.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.device", "tensorflow.zeros", "tensorflow.global_variables", "numpy.ndarray", "tensorflow.Graph", "tensorflow.Variable", "tensorflow.Session", "tensorflow.square", "tensorflow.matmul", "numpy.random.choice", "tensorflow.placeholder", "tensorflow.global_va...
daniel20162016/my-first
[ "f9554dd476302b26e8a296393025f150922f349c", "f9554dd476302b26e8a296393025f150922f349c", "f9554dd476302b26e8a296393025f150922f349c" ]
[ "read_xml_all/calcul_matrix_compare_ce_good_192matrix.py", "read_xml_all/calcul_matrix_compare_ou_good_192matrix.py", "read_xml_all/calcul_matrix_compare_il_good_192matrix.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Mon Oct 31 15:45:22 2016\n\n@author: wang\n\"\"\"\n#from matplotlib import pylab as plt\n#from numpy import fft, fromstring, int16, linspace\n#import wave\n\nfrom read_wav_xml_good_1 import*\nfrom matrix_24_2 import*\nfrom max_matrix_norm import*\n\nimport numpy as np\n#...
[ [ "numpy.savez", "numpy.zeros" ], [ "numpy.savez", "numpy.zeros" ], [ "numpy.savez", "numpy.zeros" ] ]
daniel-thom/PyDSS
[ "8c7ae2d3a17d596b42a92e33f7d29329e26fbc30" ]
[ "PyDSS/pyPostprocessor/PostprocessScripts/DERMSOptimizer_helper_modules/opt_funcs.py" ]
[ "import numpy as np\nfrom scipy.sparse import lil_matrix\nimport scipy.sparse.linalg as sp\nimport scipy.sparse as sparse\nimport math\nimport csv\nimport matplotlib.pyplot as plt\n\ndef linear_powerflow_model(Y00,Y01,Y10,Y11_inv,I_coeff,V1,slack_no):\n # voltage linearlization\n V1_conj = np.conj(V1[slack_no...
[ [ "numpy.matrix", "numpy.dot", "numpy.ix_", "numpy.imag", "numpy.conj", "numpy.linalg.inv", "numpy.asarray", "numpy.concatenate", "numpy.real", "numpy.array", "numpy.zeros" ] ]
norberto-schmidt/openmc
[ "ff4844303154a68027b9c746300f5704f73e0875", "ff4844303154a68027b9c746300f5704f73e0875", "ff4844303154a68027b9c746300f5704f73e0875", "ff4844303154a68027b9c746300f5704f73e0875" ]
[ "tests/unit_tests/test_data_photon.py", "tests/unit_tests/test_polynomials.py", "openmc/mgxs/mgxs.py", "openmc/cmfd.py" ]
[ "#!/usr/bin/env python\n\nfrom collections.abc import Mapping, Callable\nimport os\nfrom pathlib import Path\n\nimport numpy as np\nimport pandas as pd\nimport pytest\nimport openmc.data\n\n\n@pytest.fixture(scope='module')\ndef elements_endf():\n \"\"\"Dictionary of element ENDF data indexed by atomic symbol.\"...
[ [ "numpy.log10", "numpy.diff", "numpy.allclose" ], [ "numpy.radians", "numpy.allclose", "numpy.asarray", "numpy.arange", "numpy.ravel", "numpy.array", "numpy.sum" ], [ "numpy.add.reduceat", "numpy.swapaxes", "numpy.allclose", "numpy.linspace", "num...
eric91sanchez/hair_seg
[ "4f688daac0ec4ea906ff0462ae51634293e35447" ]
[ "hair_seg/evaluate.py" ]
[ "\"\"\"\nEvaluate\n\"\"\"\n\nimport re\nimport math\nimport datetime\nimport random\nimport torch\nfrom torch.nn import functional as F\nfrom torch.utils.data import DataLoader\nimport matplotlib.pyplot as plt\n\nfrom loss import iou_loss, HairMattingLoss, acc_loss, F1_loss\nfrom utils import create_multi_figure\n\...
[ [ "torch.device", "torch.utils.data.DataLoader", "matplotlib.pyplot.savefig", "torch.cuda.is_available" ] ]
pnijhara/improver
[ "5961a6fab9a79cd63a943eff07bf79d4e5f0ff03", "5961a6fab9a79cd63a943eff07bf79d4e5f0ff03", "5961a6fab9a79cd63a943eff07bf79d4e5f0ff03", "5961a6fab9a79cd63a943eff07bf79d4e5f0ff03", "a5c31be3430df429ae38e7c16e267fcbc2af1858" ]
[ "improver_tests/between_thresholds/test_between_thresholds.py", "improver_tests/blending/weighted_blend/test_MergeCubesForWeightedBlending.py", "improver_tests/ensemble_copula_coupling/ensemble_copula_coupling/test_ConvertLocationAndScaleParametersToPercentiles.py", "improver/blending/calculate_weights_and_bl...
[ "# -*- coding: utf-8 -*-\n# -----------------------------------------------------------------------------\n# (C) British Crown Copyright 2017-2020 Met Office.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following c...
[ [ "numpy.array", "numpy.flip", "numpy.ones" ], [ "numpy.array", "numpy.ones" ], [ "numpy.linspace", "numpy.reshape", "numpy.broadcast_to", "numpy.ma.masked_array", "numpy.repeat", "numpy.array", "numpy.testing.assert_allclose" ], [ "numpy.ma.is_masked"...
lsqshr/pytorch-lightning
[ "c6b68883879e38719688865aceac746477f0a9b9" ]
[ "tests/core/test_datamodules.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.device", "torch.zeros", "torch.ones", "torch.load" ] ]
bbo-lab/multitrackpy
[ "a25ebdb94969b0682c851ab69ba5895173b581d0" ]
[ "multitrackpy/mtt.py" ]
[ "import numpy as np\nimport h5py\nfrom pprint import pprint\n\ndef read_calib(mtt_path):\n mtt_file = h5py.File(mtt_path)\n\n istracking = np.squeeze(np.asarray([mtt_file['mt']['cam_istracking']]) == 1)\n calind = np.squeeze(np.int32(mtt_file['mt']['calind']))[istracking] - 1\n\n mc = {\n 'Rgloba...
[ [ "numpy.asarray", "numpy.int32", "numpy.where" ] ]
Leofltt/rg_sound_generation
[ "8e79b4d9dce028def43284f80521a2ec61d0066c" ]
[ "members/amit/clf/data_generator_binary.py" ]
[ "import random\nimport shutil\nimport os\nimport numpy as np\nimport data_loader\nimport audio_processing\n\nfrom typing import Dict\nfrom loguru import logger\nfrom tqdm import tqdm\nfrom pprint import pprint\n\n\nclass DataGenerator:\n def __init__(self, conf: Dict, batch_size: int = 8):\n assert \"csv_...
[ [ "numpy.load", "numpy.zeros", "numpy.save" ] ]
bshrram/Graduation-Project---Omnidirectional-Conveyor-Table
[ "6414fbcb3d53f3c3351c25ac8b48aa73397c250d", "6414fbcb3d53f3c3351c25ac8b48aa73397c250d" ]
[ "feedback_system/findTable.py", "shortestPath.py" ]
[ "import numpy as np\nimport cv2 as cv\n\nflann_params= dict(algorithm = 6,\n table_number = 6, # 12\n key_size = 12, # 20\n multi_probe_level = 1) #2\n\n\ndef init_feature():\n \"\"\"initialize feature detector and matcher algorithm\n \"\"\"\n detec...
[ [ "numpy.array", "numpy.int32", "numpy.sum", "numpy.float32" ], [ "numpy.std", "numpy.array", "numpy.mean" ] ]
valkenzz/Bigeleisen_KIE
[ "aa82ee63c77be2e9d0bd97702c297aa70dfaa362" ]
[ "Bigeleisen_KIE.py" ]
[ "#Importation : \r\nimport pandas as pd\r\nimport numpy as np\r\n################################################\r\n#Parameters : \r\n#Planck constant (J/Hz)\r\nh=6.62607004*10**-34\r\n#Boltzmann constant (J/K)\r\nkB=1.38064852*10**-23\r\n#Light velocity in vaccum (m/s)\r\nc=299792458.0\r\n\r\n####################...
[ [ "pandas.Series" ] ]
apexnetai/cifar-10-guide
[ "7c76f310e93da3a229ce9d66defd770ee1c7dc56" ]
[ "cifar10/custom_models.py" ]
[ "\nimport torch\nimport torch.nn as nn\nimport torch.nn.functional as F\nimport torchvision\n\n\nclass CustomResnetV1(nn.Module):\n\n def __init__(self):\n super(CustomResnetV1, self).__init__()\n self.resnet = torchvision.models.resnet18(pretrained=True)\n self.resnet.conv1 = nn.Conv2d(3, 6...
[ [ "torch.nn.BatchNorm1d", "torch.add", "torch.nn.functional.log_softmax", "torch.nn.Conv2d", "torch.nn.Linear" ] ]
zxpzhong/DR_3DFM
[ "6ef7d0d86813f4cc407a0d1011a2623e4775fbee" ]
[ "utils/Finger/tool/tools.py" ]
[ "# 定义全局变量和方法\nimport numpy as np\nimport math\n# import process.process_finger_data as pfd\n\n# 目前选用的图片尺寸\ncur_pic_size = [640, 400]\n# cur_pic_size = [1280, 800]\n# 相机索引对应相机名称\ncamera_index_to_name = ['A', 'B', 'C', 'D', 'E', 'F']\n# 6个相机的外参\ncamera_a_outer_para = np.mat([[0.574322111, 0.771054881, 0.275006333, 0....
[ [ "numpy.mat" ] ]
jojotenya/LAMOL
[ "03c31d9f0c7bf71295bc2d362ddf40a7656956e1" ]
[ "train.py" ]
[ "import torch\nfrom torch.utils.data import DataLoader\nfrom torch import nn\nfrom pytorch_transformers import AdamW, WEIGHTS_NAME, WarmupLinearSchedule\nimport csv\nimport numpy as np\nimport os\nimport logging\nfrom fp16 import FP16_Module, FP16_Optimizer\nfrom parallel import DataParallelModel, DataParallelCrite...
[ [ "torch.nn.CrossEntropyLoss", "torch.no_grad", "torch.ones", "torch.load" ] ]
RTHMaK/git-squash-master
[ "76c4c8437dd18114968e69a698f4581927fcdabf", "76c4c8437dd18114968e69a698f4581927fcdabf", "76c4c8437dd18114968e69a698f4581927fcdabf", "76c4c8437dd18114968e69a698f4581927fcdabf", "76c4c8437dd18114968e69a698f4581927fcdabf", "76c4c8437dd18114968e69a698f4581927fcdabf", "76c4c8437dd18114968e69a698f4581927fcdab...
[ "scikit-learn-weighted_kde/examples/svm/plot_separating_hyperplane_unbalanced.py", "scikit-learn-weighted_kde/examples/cluster/plot_face_segmentation.py", "scikit-learn-weighted_kde/examples/feature_selection/plot_f_test_vs_mi.py", "scikit-learn-weighted_kde/benchmarks/bench_lasso.py", "scikit-learn-weighte...
[ "\"\"\"\n=================================================\nSVM: Separating hyperplane for unbalanced classes\n=================================================\n\nFind the optimal separating hyperplane using an SVC for classes that\nare unbalanced.\n\nWe first find the separating plane with a plain SVC and then pl...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.scatter", "numpy.linspace", "matplotlib.pyplot.plot", "sklearn.svm.SVC", "matplotlib.pyplot.axis", "numpy.random.RandomState", "matplotlib.pyplot.show" ], [ "sklearn.utils.testing.SkipTest", "scipy.misc.imresize", "matp...
josehoras/Advanced-Lane-Finding
[ "e6b83d602eb89661d3bf0f4d257ed5af0f6a58bb" ]
[ "video_pipeline.py" ]
[ "import numpy as np\nimport pickle\nimport cv2\nimport matplotlib.pyplot as plt\nimport matplotlib.image as mpimg\nfrom moviepy.editor import VideoFileClip\nfrom image_thresholding import *\nfrom plotting_helpers import *\nfrom line_fit import *\nfrom Line import *\n\n\n# *** PIPELINE ***\ndef pipeline(img):\n g...
[ [ "numpy.hstack", "numpy.dstack", "numpy.int_", "numpy.zeros_like", "numpy.float32", "numpy.vstack" ] ]
EdwardFerdian/4DFlowNet
[ "e9c8bf72660b41ef5c7b6c677a71283ead32bbab", "e9c8bf72660b41ef5c7b6c677a71283ead32bbab" ]
[ "src/Network/SR4DFlowNet.py", "src/Network/loss_utils.py" ]
[ "import tensorflow as tf\n\nclass SR4DFlowNet():\n def __init__(self, res_increase):\n self.res_increase = res_increase\n\n def build_network(self, u, v, w, u_mag, v_mag, w_mag, low_resblock=8, hi_resblock=4, channel_nr=64):\n channel_nr = 64\n\n speed = (u ** 2 + v ** 2 + w ** 2) ** 0.5\...
[ [ "tensorflow.transpose", "tensorflow.keras.layers.LeakyReLU", "tensorflow.keras.regularizers.l2", "tensorflow.reshape", "tensorflow.keras.layers.Conv3D", "tensorflow.keras.layers.concatenate", "tensorflow.compat.v1.image.resize_bilinear", "tensorflow.pad" ], [ "tensorflow.cl...
kingmoon3/xalpha
[ "dd877c6bce1b85a4facd38de9dc35a7bf0acf1c6" ]
[ "xalpha/universal.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nmodules for universal fetcher that gives historical daily data and realtime data\nfor almost everything in the market\n\"\"\"\n\nimport os\nimport sys\nimport time\nimport datetime as dt\nimport numpy as np\nimport pandas as pd\nimport logging\nimport inspect\nfrom bs4 import Beaut...
[ [ "pandas.to_datetime", "pandas.read_excel", "pandas.DataFrame", "pandas.Timedelta", "pandas.date_range", "pandas.isna", "pandas.Timestamp", "pandas.to_numeric", "pandas.read_sql", "numpy.random.randint" ] ]
cs-giung/giung2
[ "c8560fd1b56f20eb1f3cf57202975d8325b591f5", "c8560fd1b56f20eb1f3cf57202975d8325b591f5" ]
[ "giung2/modeling/backbone/resnet.py", "giung2/modeling/classifier/centroid.py" ]
[ "import torch\nimport torch.nn as nn\nfrom typing import Dict, List\nfrom functools import partial\n\nfrom fvcore.common.config import CfgNode\nfrom giung2.layers import *\n\n\n__all__ = [\n \"build_resnet_backbone\",\n]\n\n\nclass IdentityShortcut(nn.Module):\n\n def __init__(\n self,\n ...
[ [ "torch.nn.Sequential", "torch.nn.init.kaiming_normal_", "torch.nn.functional.pad", "torch.nn.functional.adaptive_avg_pool2d" ], [ "torch.softmax", "torch.randn", "torch.unsqueeze", "torch.log_softmax", "torch.mul" ] ]
nasimanousheh/dipy
[ "9d20c911b4afe83e52ded698eff9ba0f0fafeca8", "d737a6af80a184322e30de4760e8c205291dbed0" ]
[ "dipy/data/tests/test_fetcher.py", "dipy/denoise/tests/test_lpca.py" ]
[ "import tempfile\nimport os.path as op\nimport sys\nimport os\nimport numpy.testing as npt\nfrom nibabel.tmpdirs import TemporaryDirectory\nimport dipy.data.fetcher as fetcher\nfrom dipy.data import SPHERE_FILES\nfrom threading import Thread\nif sys.version_info[0] < 3:\n from SimpleHTTPServer import SimpleHTTPR...
[ [ "numpy.testing.assert_raises", "numpy.testing.assert_string_equal" ], [ "numpy.sqrt", "numpy.all", "numpy.max", "numpy.mean", "numpy.zeros_like", "numpy.exp", "numpy.testing.assert_equal", "numpy.std", "numpy.zeros", "scipy.special.iv", "numpy.testing.assert...
BendeguzToth/NeuralLanguageModel
[ "f4bb60375019acd57c7396768d62ad0f3166391c" ]
[ "Project/_visualize.py" ]
[ "\"\"\"\nIn this file we visualize the activations of\nparticular neurons, at different positions\nof a provided sample text.\n\"\"\"\n\n# Standard libraries\nimport json\nimport tkinter as tk\n\n# Third-party libraries\nimport numpy as np\n\n# Project files\nfrom layers import LSTM\n\n# SETUP\nMODEL = \"saves/Shak...
[ [ "numpy.array" ] ]
vjaguilera/BERT4Rec
[ "8c460676af224c90c9cc89f1ba837b38f04e4210" ]
[ "gen_data_fin.py" ]
[ "# -*- coding: UTF-8 -*-\nimport os\nimport codecs\n\nimport collections\nimport random\n\nimport sys\n\nimport tensorflow as tf\n\nimport six\n\nfrom util import *\nfrom vocab import *\nimport pickle\nimport multiprocessing\nimport time\n\n\nrandom_seed = 12345\nshort_seq_prob = 0 # Probability of creating sequen...
[ [ "tensorflow.logging.info", "tensorflow.python_io.TFRecordWriter", "tensorflow.train.Features", "tensorflow.compat.v1.logging.set_verbosity" ] ]
richardsfc/neural_rerendering_plus
[ "f5b2bd2ebe7e9657e3584612818eb0d137714276" ]
[ "layers.py" ]
[ "# Copyright 2019 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 ...
[ [ "tensorflow.device", "tensorflow.get_variable", "numpy.sqrt", "tensorflow.compat.v1.concat", "tensorflow.stack", "tensorflow.nn.conv2d_transpose", "tensorflow.compat.v1.shape", "tensorflow.compat.v1.image.resize_nearest_neighbor", "tensorflow.compat.v1.ones", "tensorflow.co...
Abxhor/Coldairarrow
[ "3735beec8a6fa7ad9356375081229c68f0e83f3d" ]
[ "models/final_model.py" ]
[ "# -*- coding: utf-8 -*-\n\n\"\"\"Stacking of some good solutions.\nIMPORTANT:\nTo run this model you need run before the differents models.\n\"\"\"\n\nimport pandas as pd\nimport numpy as np\n\ndf1 = pd.read_csv('submission40.csv') # 0.309812 (public leaderboard)\ndf2 = pd.read_csv('submission41.csv') # 0.305985 (...
[ [ "pandas.read_csv", "pandas.DataFrame" ] ]
vlbthambawita/singan-polyp-aug-exp
[ "b4ec5155f5c36a931fad022aec04dda6b3180b55" ]
[ "777_all_in_one_v1.py" ]
[ "#=========================================================\n# Developer: Vajira Thambawita\n# Reference: https://github.com/meetshah1995/pytorch-semseg\n#=========================================================\n\n\n\nimport argparse\nfrom datetime import datetime\nimport os\nimport copy\nfrom tqdm import tqdm\ni...
[ [ "matplotlib.pyplot.imshow", "torch.cuda.set_device", "torch.utils.data.DataLoader", "torch.from_numpy", "numpy.transpose", "matplotlib.pyplot.gcf", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available", "matplotlib.pyplot.close", "torch.save" ] ]
MasaYan24/pytorch-lightning
[ "046ac714f6955ed14b831657ea1b7b16bc28ac93" ]
[ "pytorch_lightning/trainer/training_loop.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...
[ [ "numpy.argmax", "torch.cuda.empty_cache", "numpy.cumsum" ] ]
accordproject/labs-cicero-classify
[ "3a52ebaf45252515c417bf94a05e33fc1c2628b8", "3a52ebaf45252515c417bf94a05e33fc1c2628b8" ]
[ "Practice/adapter_roberta_v4/adapter_model.py", "Practice/adapter_roberta/ner_dataset.py" ]
[ "import pandas as pd\nimport numpy as np\nimport torch\nprint(f\"Torch Version: {torch.__version__}\")\n\nimport transformers\nprint(f\"transformers (Adapter) Version: {transformers.__version__}\")\n\nfrom transformers import RobertaTokenizer\nimport numpy as np\n\ntokenizer = RobertaTokenizer.from_pretrained(\"rob...
[ [ "torch.sigmoid", "pandas.read_csv", "torch.cat", "numpy.vectorize", "torch.no_grad", "numpy.array" ], [ "pandas.read_csv", "torch.zeros", "torch.nn.utils.rnn.pad_sequence", "torch.utils.data.DataLoader", "torch.zeros_like", "sklearn.preprocessing.OneHotEncoder",...
falcon2212/detr-tensorflow
[ "119da1390a02b6013e7147d822e72c38fc3a2dd9" ]
[ "detr_tf/data/tfcsv.py" ]
[ "import tensorflow as tf\nfrom random import shuffle\nimport pandas as pd\nimport numpy as np\nimport imageio\nimport os\n\nfrom detr_tf.data import processing\nfrom detr_tf.data.transformation import detr_transform\nfrom detr_tf import bbox\n\n\ndef morethan1(img, tbbox, tclass):\n ret = False\n print(\"more...
[ [ "tensorflow.data.Dataset.from_tensor_slices", "pandas.read_csv", "numpy.expand_dims", "tensorflow.shape" ] ]
tomAntoine/multi-UAV-simulator
[ "2fbd8b802ea1a5f388722714bac5563d0718b28f" ]
[ "Simulation_Python/scenarios.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nauthor: John Bass\nemail: john.bobzwik@gmail.com\nlicense: MIT\nPlease feel free to use and modify this, but keep the above information. Thanks!\n\nadaptation\nauthor: Tom Antoine and Alex Martinez\n\"\"\"\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport time\nimport cP...
[ [ "numpy.array" ] ]
sunkr1995/genetic-drawing
[ "6e5cc755a55c1994770c3f18fb14f1cc651bb700" ]
[ "Sketch.py" ]
[ "'''\nAuthor: your name\nDate: 2021-07-02 17:20:23\nLastEditTime: 2021-07-08 16:28:05\nLastEditors: Please set LastEditors\nDescription: In User Settings Edit\nFilePath: /genetic-drawing/2.py\n'''\n#coding:utf-8\nimport cv2 \nimport math\nimport numpy as np\n \n \ndef dodgeNaive(image, mask):\n # determine the s...
[ [ "numpy.zeros" ] ]
yyht/bert
[ "480c909e0835a455606e829310ff949c9dd23549", "480c909e0835a455606e829310ff949c9dd23549", "480c909e0835a455606e829310ff949c9dd23549", "480c909e0835a455606e829310ff949c9dd23549", "480c909e0835a455606e829310ff949c9dd23549", "480c909e0835a455606e829310ff949c9dd23549", "480c909e0835a455606e829310ff949c9dd2354...
[ "t2t_bert/utils/tensor2tensor/trax/rlax/ppo.py", "BERT-keras-master/BERT-keras-master/transformer/embedding.py", "bert-master/run_gaode_export.py", "t2t_bert/distributed_multitask/embed_task.py", "t2t_bert/task_module/global_batch_norm.py", "t2t_bert/distributed_single_sentence_classification/model_mdd_di...
[ "# coding=utf-8\n# Copyright 2019 The Tensor2Tensor Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requir...
[ [ "numpy.ones_like", "tensorflow.io.gfile.GFile", "tensorflow.io.gfile.makedirs", "numpy.std", "numpy.mean", "tensorflow.io.gfile.remove" ], [ "numpy.zeros", "numpy.cos", "numpy.power", "numpy.sin" ], [ "tensorflow.nn.bias_add", "tensorflow.matmul", "tenso...
viitormiiguel/AnalysisFinancial
[ "21d19c4eb200655ffd8605d4c38ab280a4552384" ]
[ "Results/ResultUniLex.py" ]
[ "import nltk\r\nimport csv\r\nimport datetime\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\nnow = datetime.datetime.now()\r\ntoday = now.strftime(\"%Y-%m-%d\")\r\n\r\ndInfoMoney = 'C:/Users/vitor/Documents/GetDataset/Infomoney/'\r\ndInvesting = 'C:/Users/vitor/Documents/GetD...
[ [ "matplotlib.pyplot.legend", "matplotlib.pyplot.subplots", "pandas.DataFrame", "matplotlib.pyplot.grid", "matplotlib.pyplot.bar", "matplotlib.pyplot.show" ] ]
gruber-sciencelab/MAPP
[ "81563f676b284c5b283a193a698ce618c044d3b5" ]
[ "modules/REPORT_RESULTS/scripts/select-motifs.py" ]
[ "\"\"\"\n##############################################################################\n#\n# Select top N distinct motifs with highest (statistically significant)\n# activity Z-score (for every site separately)\n#\n# AUTHOR: Maciej_Bak\n# AFFILIATION: University_of_Basel\n# AFFILIATION: Swiss_Institute_o...
[ [ "pandas.read_csv" ] ]
KevBarbour/cryptobot
[ "57239c83ca5dd84d2a0e273f20782cf608ce99ba" ]
[ "top10losers/top10losers.py" ]
[ "#!/usr/bin/env python\nimport requests\nfrom bs4 import BeautifulSoup\nimport sys\nfrom twython import Twython\nimport numpy as np\n\napiKey = '...'\napiSecret = '...'\naccessToken = '...'\naccessTokenSecret = '...'\n\n#BeautifulSoup scraping algorythm\nurl = 'https://coinmarketcap.com'\nsoup = BeautifulSoup(reque...
[ [ "numpy.reshape", "numpy.delete" ] ]
threefoldo/allennlp
[ "9fcc79566cc148cce9f967a7962ac03bc300f011" ]
[ "allennlp/nn/util.py" ]
[ "\"\"\"\nAssorted utilities for working with neural networks in AllenNLP.\n\"\"\"\n# pylint: disable=too-many-lines\nfrom collections import defaultdict\nfrom typing import Any, Dict, List, Optional, Sequence, Tuple, TypeVar\nimport logging\nimport math\nimport warnings\n\nimport torch\n\nfrom allennlp.common.check...
[ [ "torch.nn.functional.softmax", "torch.max", "torch.nn.functional.log_softmax", "torch.cat", "torch.zeros", "torch.sin", "torch.sum", "torch.gather", "torch.zeros_like", "torch.cuda.LongTensor", "torch.exp", "torch.matmul", "torch.arange", "torch.stack", ...
DylanHooz/uestc_yolov3
[ "72ed60aaf68a0ab2dbc8d4dfad7bddffce826dde" ]
[ "train.py" ]
[ "\"\"\"\r\nRetrain the YOLO model for your own dataset.\r\n\"\"\"\r\n\r\nimport numpy as np\r\nimport keras.backend as K\r\nfrom keras.layers import Input, Lambda\r\nfrom keras.models import Model\r\nfrom keras.optimizers import Adam\r\nfrom keras.callbacks import TensorBoard, ModelCheckpoint, ReduceLROnPlateau, Ea...
[ [ "numpy.random.shuffle", "numpy.array", "numpy.zeros", "numpy.random.seed" ] ]
tyburam/python-machine-learning
[ "7cb346c99d24e959c1af63532603dd118558b16f" ]
[ "sigmoid.py" ]
[ "#!/usr/bin/python3\n\nimport matplotlib.pyplot as plt\nimport numpy as np\n\n\ndef sigmoid(z):\n return 1.0 / (1.0 + np.exp(-z))\n\nz = np.arange(-7, 7, 0.01)\nphi_z = sigmoid(z)\n\nplt.plot(z, phi_z)\nplt.axvline(0.0, color = 'k')\nplt.axhspan(0.0, 1.0, facecolor = '1.0', alpha = 1.0, ls = 'dotted')\nplt.axhli...
[ [ "matplotlib.pyplot.axvline", "matplotlib.pyplot.axhline", "numpy.arange", "matplotlib.pyplot.ylim", "matplotlib.pyplot.axhspan", "matplotlib.pyplot.plot", "numpy.exp", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.yticks", "matplotlib.pyplot.show", "matplotlib.pyplot.y...
kalyanvasudev/pyrobot
[ "839ab89a5b3cdd6af9b1e884fa8e8f0007497e32", "839ab89a5b3cdd6af9b1e884fa8e8f0007497e32", "839ab89a5b3cdd6af9b1e884fa8e8f0007497e32" ]
[ "src/pyrobot/locobot/camera.py", "tests/test_arm_controls.py", "robots/LoCoBot/locobot_navigation/orb_slam2_ros/scripts/orb_slam2_ros/vslam.py" ]
[ "# Copyright (c) Facebook, Inc. and its affiliates.\n\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nimport os\nimport rospkg\nimport threading\nimport yaml\nfrom copy import deepcopy\n\nimport message_filters\nimport numpy as np\nimp...
[ [ "numpy.dot", "numpy.multiply", "numpy.logical_and", "numpy.linalg.inv", "numpy.eye", "numpy.stack", "numpy.ones", "numpy.mod", "numpy.array" ], [ "numpy.max", "numpy.array" ], [ "numpy.dot", "numpy.amax", "numpy.logical_and", "numpy.asarray", ...
j-varun/enas
[ "1a19ccbd7c06168ae51e0de2986b30ea01cce070" ]
[ "enas/cifar10/data_utils.py" ]
[ "import os\nimport sys\n\ntry:\n import cPickle as pickle\nexcept ImportError:\n import _pickle as pickle\n\nimport numpy as np\nimport tensorflow as tf\nfrom tensorflow.examples.tutorials.mnist import input_data\n\n\ndef _read_data(data_path, train_files):\n \"\"\"Reads CIFAR-10 format data. Always returns NHWC...
[ [ "numpy.reshape", "numpy.concatenate", "tensorflow.examples.tutorials.mnist.input_data.read_data_sets", "numpy.std", "numpy.mean", "numpy.transpose", "numpy.array" ] ]
minhhoangbui/PICK-pytorch
[ "c74d2d1e5d1f8c7e837ea9776146bc84a7ecf30a" ]
[ "src/runner/trainer.py" ]
[ "# -*- coding: utf-8 -*-\n# @Author: Wenwen Yu\n# @Created Time: 7/12/2020 9:50 PM\n\nimport os\nimport numpy as np\nfrom numpy import inf\n\nimport torch\nimport torch.distributed as dist\nfrom torch.nn.parallel import DistributedDataParallel as DDP\n\nfrom src.utils import inf_loop\nfrom src.utils.metrics import ...
[ [ "torch.mean", "numpy.sqrt", "torch.cuda.set_device", "torch.load", "torch.cuda.device_count", "torch.sum", "torch.distributed.barrier", "torch.nn.SyncBatchNorm.convert_sync_batchnorm", "torch.no_grad", "torch.utils.tensorboard.SummaryWriter", "torch.cuda.is_available", ...
Toulik1729231/WebScraping1-Using-Python
[ "42562c66c905f925ea0848b8ae7dfbca6b5a1afd" ]
[ "scrap_players.py" ]
[ "import requests\r\nfrom bs4 import BeautifulSoup\r\nfrom logger_impl import *\r\nimport MongoDao\r\nimport pandas as pd\r\nimport time\r\n\r\npayload = {'key': 'ac9e8cf2dec81949d9ee1235ed6ae3fb', 'url':\r\n'https://httpbin.org/ip'}\r\n\r\n\r\n\r\ndef scrapData(scorecardSoup, matchId, matchDesc, matchTypeText, page...
[ [ "pandas.DataFrame" ] ]
portugueslab/scikit-image
[ "0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b", "0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b", "0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b", "0fa3bcb118bb208a0cc7d3e8b96cd96c1ce7a75b" ]
[ "skimage/future/graph/graph_cut.py", "skimage/morphology/watershed.py", "skimage/transform/tests/test_warps.py", "doc/examples/color_exposure/plot_adapt_rgb.py" ]
[ "try:\n import networkx as nx\nexcept ImportError:\n from ..._shared.utils import warn\n warn('RAGs require networkx')\nimport numpy as np\nfrom . import _ncut\nfrom . import _ncut_cy\nfrom scipy.sparse import linalg\n\n\ndef cut_threshold(labels, rag, thresh, in_place=True):\n \"\"\"Combine regions sep...
[ [ "numpy.sqrt", "numpy.allclose", "numpy.linspace", "numpy.real", "numpy.zeros_like" ], [ "numpy.pad", "numpy.nonzero", "scipy.ndimage.generate_binary_structure", "numpy.ones", "numpy.flatnonzero", "numpy.isscalar", "numpy.ravel_multi_index", "numpy.argsort", ...
ibianka/HARK
[ "8678dbab0a0ace1520ac8f7ff5b33765122619f4" ]
[ "DCT-Copula-Illustration.py" ]
[ "# ---\n# jupyter:\n# jupytext:\n# formats: ipynb,py:percent\n# text_representation:\n# extension: .py\n# format_name: percent\n# format_version: '1.2'\n# jupytext_version: 1.1.3\n# kernelspec:\n# display_name: Python 3\n# language: python\n# name: python3\n# ---\n\n#...
[ [ "numpy.hstack", "matplotlib.pyplot.gca", "numpy.log", "matplotlib.pyplot.suptitle", "numpy.arange", "numpy.squeeze", "numpy.sort", "numpy.int64", "scipy.fftpack.dct", "matplotlib.pyplot.subplot", "numpy.shape", "scipy.linalg.norm", "numpy.array", "numpy.mesh...
arceushui/Keyword-Spotting-Alibaba
[ "10e718491075dee8f875c7860385bc4eef22a790", "10e718491075dee8f875c7860385bc4eef22a790" ]
[ "espnet2/bin/enh_inference.py", "espnet2/layers/senet.py" ]
[ "#!/usr/bin/env python3\nimport argparse\nimport logging\nfrom pathlib import Path\nimport sys\nfrom typing import List\nfrom typing import Optional\nfrom typing import Sequence\nfrom typing import Tuple\nfrom typing import Union\n\nimport humanfriendly\nimport numpy as np\nimport torch\nfrom tqdm import trange\nfr...
[ [ "torch.cat", "numpy.round", "torch.no_grad", "torch.unbind", "torch.stack", "torch.get_default_dtype", "torch.as_tensor" ], [ "torch.nn.Linear", "torch.nn.AdaptiveAvgPool1d", "torch.nn.ReLU", "torch.nn.Sigmoid" ] ]
RosettaCommons/jade2
[ "40affc7c4e0f1f6ee07030e72de284e3484946e7" ]
[ "jade2/basic/structure/PythonPDB2.py" ]
[ "\n## @author Jared Adolf-Bryfogle (jadolfbr@gmail.com)\n\n#Python Imports\nimport copy\nimport pandas\nimport re, logging\nfrom collections import defaultdict\nfrom typing import Union, DefaultDict, List, Any, Dict\nfrom pathlib import Path\n\nfrom jade2.basic.path import *\n\nclass PythonPDB2:\n def __init__(s...
[ [ "pandas.DataFrame" ] ]
SimiaCryptus/models
[ "c652a23a650070b71e286f1ded93726670161940", "c652a23a650070b71e286f1ded93726670161940", "c652a23a650070b71e286f1ded93726670161940", "c652a23a650070b71e286f1ded93726670161940", "c652a23a650070b71e286f1ded93726670161940", "c652a23a650070b71e286f1ded93726670161940", "c652a23a650070b71e286f1ded9372667016194...
[ "research/audioset/vggish/vggish_train_demo.py", "official/mnist/mnist_eager_test.py", "tutorials/rnn/quickdraw/train_model.py", "research/syntaxnet/dragnn/tools/conll_checkpoint_converter.py", "research/gan/progressive_gan/data_provider_test.py", "research/autoencoder/VariationalAutoencoderRunner.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 requi...
[ [ "tensorflow.Graph", "tensorflow.Variable", "tensorflow.reduce_mean", "tensorflow.sigmoid", "tensorflow.placeholder", "numpy.sin", "numpy.concatenate", "tensorflow.global_variables_initializer", "numpy.random.normal", "tensorflow.nn.sigmoid_cross_entropy_with_logits", "t...
samuelru/session-knn-ae
[ "c6232667dbe57f82391d487875b52f651ca08a21" ]
[ "ipython/3_Training_Predicting/prnn_cb12_train_predict.py" ]
[ "from keras.layers import Input, Dense, concatenate\nfrom keras.layers.recurrent import GRU\nfrom keras.utils import plot_model\nfrom keras.models import Model, load_model\nfrom keras.callbacks import ModelCheckpoint\nimport keras\nimport pandas as pd\nimport numpy as np\nimport keras.backend as K\nfrom keras.utils...
[ [ "pandas.concat", "pandas.read_csv", "pandas.merge", "numpy.expand_dims", "tensorflow.compat.v1.disable_v2_behavior", "numpy.arange", "pandas.DataFrame", "numpy.append", "tensorflow.compat.v1.shape", "numpy.argsort", "numpy.array", "numpy.zeros" ] ]
MarcosVs98/candlestick-indicators
[ "5423b56751eead43569b15917d29519b4dd6f0e3" ]
[ "CandlestickIndicators.py" ]
[ "import logging\nimport numpy as np\nimport pandas as pd\nimport plotly.graph_objects as go\nimport plotly.express as px\n\nclass ChartIndicatorException(Exception):\n\tpass\n\n\nclass PlottingExeception(ChartIndicatorException):\n\tpass\n\n\nclass TraceCandlesException(ChartIndicatorException):\n\tpass\n\n\nclass ...
[ [ "numpy.where", "pandas.DataFrame" ] ]
nr-patel/NP-SDC-T3-P4-Capstone-Project
[ "d20b4cb009c72f9d1b6fd8f36aca2af4c7bffb08" ]
[ "ros/src/tl_detector/tl_detector.py" ]
[ "#!/usr/bin/env python\nimport rospy\nfrom std_msgs.msg import Int32, Float32MultiArray\nfrom std_msgs.msg import MultiArrayDimension, MultiArrayDimension\nfrom geometry_msgs.msg import PoseStamped, Pose\nfrom styx_msgs.msg import TrafficLightArray, TrafficLight\nfrom styx_msgs.msg import Lane\nfrom sensor_msgs.msg...
[ [ "numpy.asanyarray", "numpy.argmin" ] ]
Aeon1/XlsxWriter
[ "6871b6c3fe6c294632054ea91f23d9e27068bcc1" ]
[ "examples/pandas_chart_columns.py" ]
[ "##############################################################################\n#\n# An example of converting a Pandas dataframe to an xlsx file with a grouped\n# column chart using Pandas and XlsxWriter.\n#\n# Copyright 2013-2019, John McNamara, jmcnamara@cpan.org\n#\n\nimport pandas as pd\n\n# Some sample data t...
[ [ "pandas.DataFrame", "pandas.ExcelWriter" ] ]
lucamarx/pyAutoSpec
[ "d57efb6ff4c37ede1377351fd3dd3a6ce362b551" ]
[ "pyautospec/function_mps.py" ]
[ "\"\"\"\nMps based function compression algorithm\n\"\"\"\nimport numpy as np\nimport itertools\n\nfrom typing import List\n\nfrom .mps import Mps\nfrom .plots import function_wfa_comparison_chart\n\n\ndef word2real(s : List[int], x0 : float = 0.0, x1 : float = 1.0) -> float:\n \"\"\"\n Convert the binary rep...
[ [ "numpy.eye", "numpy.array" ] ]
Cheese229/DataAssignmentCIS
[ "7e31892721aa2b3845df3e76296af500f29c9196" ]
[ "Simulation_virus_BB.py" ]
[ "\"\"\"\r\n Bigger scale simulation of a virus spread in a city.\r\n This would have been the better opt for the project, as it uses geospatial visualisation (which is not in this code)\r\n and data gathered from a a ride share, a specific city, their population, and their public transport data.\r\n\r\n ...
[ [ "numpy.zeros", "numpy.random.randint" ] ]
soumitri2001/EvoCluster
[ "001dfb4c1f00db84ad1c2f2228eed6112d7e65b1", "2f8e3f21c7045478394e7e02a22835f7c184c0c7" ]
[ "EvoCluster/_objectives.py", "EvoCluster/optimizers/CFFA.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Sat Mar 9 18:12:29 2019\n\n@author: Raneem\n\"\"\"\n\nfrom sklearn import cluster, metrics\nfrom scipy.spatial.distance import pdist, cdist\nimport numpy\nimport sys\n\ndef getLabelsPred(startpts, points, k):\n labelsPred = [-1] * len(points)\n \n for i in rang...
[ [ "numpy.nonzero", "numpy.min", "sklearn.metrics.silhouette_score", "numpy.unique", "numpy.power", "numpy.triu_indices", "numpy.linalg.norm", "sklearn.metrics.calinski_harabaz_score", "scipy.spatial.distance.cdist", "numpy.max", "scipy.spatial.distance.pdist", "numpy....
shfshf/seq2annotation
[ "a824520d46f0b3d70268fae422976a5ce1b3f4ce", "a824520d46f0b3d70268fae422976a5ce1b3f4ce" ]
[ "loadmodel.py", "seq2annotation/algorithms/Stacked_BiLSTM_CRF_model.py" ]
[ "import tensorflow as tf\r\nfrom tensorflow.python.platform import gfile\r\n\r\n# only for bugfix\r\ntf.contrib.rnn\r\n\r\noutput_graph_path = './model.pb'\r\n\r\ngraph = tf.Graph()\r\n\r\nwith gfile.FastGFile(output_graph_path, 'rb') as f:\r\n output_graph_def = tf.GraphDef()\r\n output_graph_def.ParseFromSt...
[ [ "tensorflow.Graph", "tensorflow.import_graph_def", "tensorflow.Session", "tensorflow.python.platform.gfile.FastGFile", "tensorflow.GraphDef" ], [ "tensorflow.concat", "tensorflow.contrib.rnn.TimeReversedFusedRNN", "tensorflow.contrib.rnn.LSTMBlockFusedCell", "tensorflow.tra...
GaoX2015/intro_ds
[ "886e678e5353e9b4c0d4f3da83a00d6b9a2f06a5", "886e678e5353e9b4c0d4f3da83a00d6b9a2f06a5", "886e678e5353e9b4c0d4f3da83a00d6b9a2f06a5", "886e678e5353e9b4c0d4f3da83a00d6b9a2f06a5" ]
[ "ch06-sgd/utils.py", "ch09-generative_models/yahmm/hmm/tests/test_multinomialHMM.py", "ch08-supervised/svm/linear_separable_svm.py", "ch05-logit/example/logit_example.py" ]
[ "# -*- coding: UTF-8 -*-\n\"\"\"\n此脚本用于随机生成线性模型数据、定义模型以及其他工具\n\"\"\"\n\n\nimport numpy as np\nimport tensorflow as tf\n\n\ndef generateLinearData(dimension, num):\n \"\"\"\n 随机产生线性模型数据\n\n 参数\n ----\n dimension :int,自变量个数\n\n num :int,数据个数\n\n 返回\n ----\n x :np.array,自变量\n\n y :np.arra...
[ [ "tensorflow.matmul", "numpy.random.random", "tensorflow.gfile.DeleteRecursively", "numpy.random.seed", "tensorflow.gfile.Exists", "tensorflow.placeholder", "tensorflow.square", "tensorflow.get_default_graph" ], [ "numpy.exp" ], [ "numpy.random.seed", "numpy.lins...
HarliWu/From-Deterioration-to-Acceleration-A-Calibration-Approach-to-Rehabilitating-Step-Asynchronism-in-Fe
[ "3a2f7196a2ca0446ce7ff7c8d15a0fa56a1d91d4", "3a2f7196a2ca0446ce7ff7c8d15a0fa56a1d91d4" ]
[ "federated_learning/FedaGrac/param_server.py", "data/emnist.py" ]
[ "import time, os, json, time\nimport numpy as np\n\nimport torch\nfrom torch._C import device\nimport torch.distributed as dist\nfrom torch.autograd import Variable\n\ndef test_model(model, test_data, dev):\n correct, total = 0, 0\n model.eval()\n\n with torch.no_grad():\n for data, target in test_d...
[ [ "torch.distributed.scatter", "torch.distributed.init_process_group", "numpy.random.seed", "torch.isnan", "torch.zeros_like", "torch.sum", "torch.tensor", "torch.no_grad", "torch.distributed.gather", "torch.autograd.Variable" ], [ "numpy.arange", "torch.utils.dat...
balintmaci/drone_intro_exercises
[ "1d8b839fecd6b0c5e33210b9a88fd741a71034cc" ]
[ "ex1/daniel/imu_exercise_kalman.py" ]
[ "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# IMU exercise\n# Copyright (c) 2015-2020 Kjeld Jensen kjen@mmmi.sdu.dk kj@kjen.dk\n\n# import libraries\nfrom math import pi, sqrt, atan2\nimport matplotlib.pyplot as plt\nfrom pylab import ion\n\n# name of the file to read ##\nfileName = 'imu_razor_data_pitch_55deg.t...
[ [ "matplotlib.pyplot.title", "matplotlib.pyplot.savefig", "matplotlib.pyplot.draw", "matplotlib.pyplot.plot", "matplotlib.pyplot.figure" ] ]
CanyellWang/MachineLearning_Python_wchy
[ "7eac77f7446a0c69bfb1a8be7da405895409d131" ]
[ "NeuralNetwok/NeuralNetwork.py" ]
[ "#-*- coding: utf-8 -*-\nimport numpy as np\nfrom scipy import io as spio\nfrom matplotlib import pyplot as plt\nfrom scipy import optimize\nfrom matplotlib.font_manager import FontProperties\nfont = FontProperties(fname=r\"c:\\windows\\fonts\\simsun.ttc\", size=14) # 解决windows环境下画图汉字乱码问题\n\nfrom sklearn import ...
[ [ "matplotlib.pyplot.imshow", "numpy.sqrt", "numpy.max", "numpy.exp", "numpy.random.randint", "numpy.arange", "scipy.io.loadmat", "numpy.sin", "numpy.ceil", "matplotlib.pyplot.axis", "numpy.ravel", "numpy.zeros", "scipy.optimize.fmin_cg", "matplotlib.font_mana...
bayesianbrad/pyprob
[ "a426fc51c1d6da13052979c21af447f9c4023642", "a426fc51c1d6da13052979c21af447f9c4023642" ]
[ "pyprob/nn/dataset.py", "pyprob/distributions/multivariate_normal.py" ]
[ "import torch\nfrom torch.utils.data import Dataset, ConcatDataset, Sampler\nimport torch.distributed as dist\nimport math\nimport os\nimport sys\nimport shelve\nfrom glob import glob\nimport numpy as np\nimport uuid\nfrom termcolor import colored\nfrom collections import Counter, OrderedDict\nimport random\n\nfrom...
[ [ "numpy.random.get_state", "numpy.random.seed", "torch.is_tensor", "numpy.random.shuffle", "torch.distributed.is_available", "numpy.random.set_state", "torch.sort", "torch.distributed.get_rank", "torch.distributed.get_world_size" ], [ "torch.distributions.MultivariateNor...
hengwei-chan/graph_network_demo
[ "542f2a59b1b9708abdc718d77db7111f3ba2df96", "542f2a59b1b9708abdc718d77db7111f3ba2df96", "542f2a59b1b9708abdc718d77db7111f3ba2df96", "542f2a59b1b9708abdc718d77db7111f3ba2df96", "542f2a59b1b9708abdc718d77db7111f3ba2df96", "542f2a59b1b9708abdc718d77db7111f3ba2df96", "542f2a59b1b9708abdc718d77db7111f3ba2df9...
[ "reports/configs/only_logs_dmpnn4_1/other_config.py", "reports/configs/only_logd_gin4_2/other_config.py", "reports/configs/only_logp_dmpnn3_1/other_config.py", "reports/configs/only_logp_dmpnn3_2/other_config.py", "reports/configs/only_logd_dmpnn4_2/other_config.py", "reports/configs/only_logdp_dmpnn4_2/o...
[ "from dataclasses import dataclass, field\nfrom typing import List\n\nimport tensorflow as tf\nfrom graph_networks.utilities import * \nimport logging\nimport os\n\nATOM_FEATURE_DIM = DGIN4_ATOM_FEATURE_DIM\nEDGE_FEATURE_DIM = DGIN4_EDGE_FEATURE_DIM\n\n@dataclass\nclass BasicModelConfig:\n \"\"\"\n Config for...
[ [ "tensorflow.keras.optimizers.Adam" ], [ "tensorflow.keras.optimizers.Adam" ], [ "tensorflow.keras.optimizers.Adam" ], [ "tensorflow.keras.optimizers.Adam" ], [ "tensorflow.keras.optimizers.Adam" ], [ "tensorflow.keras.optimizers.Adam" ], [ "tensorflow.keras.opti...
Artcs1/RotationDetection
[ "095be17345ee9984d8de8f24eb6b5a0b2d764a06", "095be17345ee9984d8de8f24eb6b5a0b2d764a06", "095be17345ee9984d8de8f24eb6b5a0b2d764a06", "095be17345ee9984d8de8f24eb6b5a0b2d764a06", "095be17345ee9984d8de8f24eb6b5a0b2d764a06", "095be17345ee9984d8de8f24eb6b5a0b2d764a06", "095be17345ee9984d8de8f24eb6b5a0b2d764a0...
[ "tools/r3det_gwd/train.py", "libs/configs_old/ICDAR2015/kl/cfgs_res50_icdar2015_kl_v2.py", "utils/kld.py", "libs/configs_old/DOTA/r3det_gwd/cfgs_res152_dota_r3det_gwd_v3.py", "dataloader/dataset/DOTA/data_crop.py", "libs/configs/DOTA2.0/dcl/cfgs_res50_dota2.0_dcl_v5.py", "libs/configs/DOTA/atss/cfgs_res...
[ "# -*- coding:utf-8 -*-\n# Author: Xue Yang <yangxue-2019-sjtu@sjtu.edu.cn>\n#\n# License: Apache-2.0 license\n\nfrom __future__ import absolute_import\nfrom __future__ import print_function\nfrom __future__ import division\n\nimport os\nimport sys\nimport tensorflow as tf\nimport tensorflow.contrib.slim as slim\ni...
[ [ "tensorflow.device", "tensorflow.cast", "tensorflow.random_shuffle", "tensorflow.summary.scalar", "tensorflow.add_n", "tensorflow.py_func", "tensorflow.Graph", "tensorflow.contrib.slim.get_or_create_global_step", "tensorflow.get_collection", "tensorflow.summary.image", ...
wright/OpenMDAO
[ "58f9ff47197531f4fb4ef632c6bcca11e799ccf0" ]
[ "openmdao/core/tests/test_connections.py" ]
[ "\"\"\" Tests related to connecing inputs to outputs.\"\"\"\n\nimport unittest\nimport numpy as np\n\nfrom io import StringIO\n\nimport openmdao.api as om\nfrom openmdao.utils.assert_utils import assert_near_equal, assert_warning\nfrom openmdao.utils.mpi import MPI\n\ntry:\n from openmdao.vectors.petsc_vector im...
[ [ "numpy.arange", "numpy.eye", "numpy.ones", "numpy.array", "numpy.zeros", "numpy.sum" ] ]
sgascoin/extractViewAngle
[ "2ec54426714eac9628fa73b622519c88b8ab96b2" ]
[ "extractViewAngle.py" ]
[ "#!/usr/bin/python\n\n\"\"\"\nextractViewAngle.py\nScope: export points or raster of viewing incidences angles from a Theia L2A product (rasters are scaled by 100 as UInt16) \nAuthor: simon.gascoin@cesbio.cnes.fr\n\"\"\"\n\nimport csv\nimport gdal\nimport numpy as np\nimport ogr\nimport os\nimport osr\nimport sys\n...
[ [ "numpy.isfinite", "numpy.isnan", "numpy.dstack", "numpy.fromstring", "numpy.iinfo", "numpy.floor", "numpy.nanmean", "numpy.array" ] ]
yannikkellerde/TD3
[ "6101baaa38a53bdaa34e33105f4e016eb84cf5a9" ]
[ "my_replay_buffer.py" ]
[ "import numpy as np\nimport torch\nimport pickle\nimport os\n\nclass ReplayBuffer_particles(object):\n def __init__(self, obs_space, action_space, max_size=int(1e6), load_folder=None):\n self.max_size = max_size\n self.store_np = [\"state_features\",\"state_particles\",\"action\",\n ...
[ [ "numpy.save", "torch.FloatTensor", "torch.cuda.is_available", "numpy.load", "numpy.zeros", "numpy.random.randint" ] ]
savan77/nni
[ "510213393d9cae58c5a8cccd21f322f7bba4e0cf", "510213393d9cae58c5a8cccd21f322f7bba4e0cf" ]
[ "examples/trials/cifar10_grad_match/cords/selectionstrategies/supervisedlearning/submodularselectionstrategy.py", "test/ut/retiarii/test_serializer.py" ]
[ "import apricot\nimport numpy as np\nimport torch\nimport torch.nn.functional as F\nfrom scipy.sparse import csr_matrix\nfrom .dataselectionstrategy import DataSelectionStrategy\nfrom torch.utils.data.sampler import SubsetRandomSampler\n\n\nclass SubmodularSelectionStrategy(DataSelectionStrategy):\n \"\"\"\n ...
[ [ "torch.nn.functional.softmax", "torch.max", "torch.zeros", "numpy.unique", "torch.cat", "torch.utils.data.sampler.SubsetRandomSampler", "torch.repeat_interleave", "numpy.argmax", "torch.no_grad", "numpy.where", "torch.where", "numpy.zeros", "torch.pow" ], [ ...
cloudhan/jax
[ "9781f365a1c5dbdf57bf78b98831c4390eb9ca5f" ]
[ "jax/interpreters/pxla.py" ]
[ "# Copyright 2018 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.array_equal", "numpy.min", "numpy.asarray", "numpy.issubdtype", "numpy.dtype", "numpy.flatnonzero", "numpy.max", "numpy.vectorize", "numpy.broadcast_to", "numpy.prod", "numpy.array", "numpy.zeros", "numpy.empty" ] ]
enricovara/mne-python
[ "f6f2aa7a97c3ae7ae5276202805d2f45de7b64cc", "f6f2aa7a97c3ae7ae5276202805d2f45de7b64cc", "b8f5e5ce0da8acfeb7298c8eb1d26a75d5526eac" ]
[ "mne/time_frequency/_stft.py", "tutorials/simulation/plot_creating_data_structures.py", "tutorials/machine-learning/plot_sensors_decoding.py" ]
[ "from math import ceil\nimport numpy as np\n\nfrom ..fixes import rfft, irfft, rfftfreq\nfrom ..utils import logger, verbose\n\n\n@verbose\ndef stft(x, wsize, tstep=None, verbose=None):\n \"\"\"STFT Short-Term Fourier Transform using a sine window.\n\n The transformation is designed to be a tight frame that c...
[ [ "numpy.abs", "numpy.sqrt", "numpy.asarray", "numpy.arange", "numpy.isrealobj", "numpy.prod", "numpy.zeros", "numpy.sum" ], [ "numpy.linspace", "numpy.arange", "numpy.cos", "numpy.sin", "numpy.array", "numpy.zeros" ], [ "numpy.diag", "sklearn....
scottyhq/xarray-sentinel
[ "3899a86e5bf5d56454e7467d9231bc97ebab8fe1" ]
[ "xarray_sentinel/sentinel1.py" ]
[ "\"\"\"Map Sentinel-1 data products to xarray.\n\nReferences:\n - Sentinel-1 document library: https://sentinels.copernicus.eu/web/sentinel/user-guides/sentinel-1-sar/document-library\n - Sentinel-1 Product Specification v3.9 07 May 2021 S1-RS-MDA-52-7441-3-9 documenting IPF 3.40\n https://sentinel.esa.int/doc...
[ [ "numpy.maximum", "numpy.allclose", "numpy.linspace", "numpy.arange", "pandas.Timedelta", "numpy.datetime64", "numpy.timedelta64", "numpy.full", "numpy.fromstring", "numpy.log10", "numpy.array" ] ]
Christensen-Lab-Dartmouth/MethylCapsNet
[ "17b6b19809c5e1984de804eb34cc7494210f91a6", "17b6b19809c5e1984de804eb34cc7494210f91a6" ]
[ "methylcapsnet/.ipynb_checkpoints/methylcaps_model_-checkpoint.py", "methylcapsnet/.ipynb_checkpoints/build_capsules-checkpoint.py" ]
[ "import pandas as pd\nfrom pymethylprocess.MethylationDataTypes import MethylationArray\nfrom sklearn.metrics import mean_absolute_error, r2_score\nimport warnings\nwarnings.filterwarnings(\"ignore\")\nfrom pybedtools import BedTool\nimport numpy as np\nfrom functools import reduce\nfrom torch.utils.data import Dat...
[ [ "numpy.hstack", "numpy.random.seed", "torch.load", "torch.manual_seed", "torch.utils.data.DataLoader", "pandas.DataFrame", "pandas.cut", "torch.cuda.is_available" ], [ "numpy.split", "pandas.read_csv", "numpy.random.seed", "numpy.arange", "torch.manual_seed"...
Jeremy-Tian/Data-Lake
[ "62d2aad31e924ffc536cca98001da7671a7a9fde" ]
[ "Sprint3 Creating Redshift Cluster.py" ]
[ "\nimport pandas as pd\nimport boto3\nimport json\n\n\n\nimport configparser\nconfig = configparser.ConfigParser()\nconfig.read_file(open('dwh.cfg'))\n\nKEY = config.get('AWS','KEY')\nSECRET = config.get('AWS','SECRET')\n\nDWH_CLUSTER_TYPE = config.get(\"DWH\",\"DWH_CLUSTER_...
[ [ "pandas.set_option", "pandas.DataFrame" ] ]
parthpatwa/autokeras
[ "2b23d870e91afdd2bc12663ff6e00e9df9ef855c" ]
[ "autokeras/task.py" ]
[ "import pandas as pd\n\nfrom autokeras import auto_model\nfrom autokeras.hypermodel import head\nfrom autokeras.hypermodel import node\n\n\nclass SupervisedImagePipeline(auto_model.AutoModel):\n\n def __init__(self, outputs, **kwargs):\n super().__init__(inputs=node.ImageInput(),\n ...
[ [ "pandas.read_csv" ] ]
bhbai/tensorflow
[ "d4b5c606fc9fbd1a20b5b113b4bc831f31d889a3", "d4b5c606fc9fbd1a20b5b113b4bc831f31d889a3", "d4b5c606fc9fbd1a20b5b113b4bc831f31d889a3", "d4b5c606fc9fbd1a20b5b113b4bc831f31d889a3", "d4b5c606fc9fbd1a20b5b113b4bc831f31d889a3", "d4b5c606fc9fbd1a20b5b113b4bc831f31d889a3" ]
[ "tensorflow/python/debug/wrappers/framework.py", "tensorflow/contrib/distributions/python/ops/inverse_gamma.py", "tensorflow/contrib/rnn/python/kernel_tests/core_rnn_cell_test.py", "tensorflow/contrib/distributions/python/ops/transformed_distribution.py", "tensorflow/python/tools/print_selective_registratio...
[ "# Copyright 2016 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.debug.debug_utils.watch_graph", "tensorflow.core.protobuf.config_pb2.RunOptions", "tensorflow.core.protobuf.config_pb2.RunMetadata", "tensorflow.python.debug.stepper.NodeStepper" ], [ "tensorflow.python.framework.tensor_shape.scalar", "tensorflow.python.ops.math_ops....
student-work-agu-gis2021/lesson7-matplotlib-AbeRyusei
[ "2adc657c1c1c02014a5a113b25f28756df377619" ]
[ "Exercise_7_problem_1.py" ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# ## Problem 1: Simple scatter plot using random \n# \n# We can generate random numbers using using a method `random.rand()` from the [NumPy package](https://numpy.org/). This example generates 10 random values:\n# \n# ```\n# import numpy as np\n# random_numbers = np.rando...
[ [ "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "pandas.DataFrame", "numpy.random.rand", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.show", "matplotlib.pyplot.ylabel" ] ]
MingAtUWA/SimpleMPM2
[ "7a1d7c257c621123d85a0630e93d42ae25c70fb4", "7a1d7c257c621123d85a0630e93d42ae25c70fb4" ]
[ "PyUtilities/OneDConsolidation.py", "PyUtilities/hdf5_stress_range.py" ]
[ "import math\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nclass OneDConsolidation:\n \"\"\"\n z = 0, free flow boundary condition\n z = H, impermeable boundary condition\n Parameters:\n 1. Cv, coefficient of consolidation;\n 2. Es, one dimensional compressive modulus\n 3....
[ [ "matplotlib.pyplot.show", "numpy.zeros", "matplotlib.pyplot.figure" ], [ "numpy.zeros" ] ]
YuJaceKim/Activity-Recognition-with-Combination-of-Deeply-Learned-Visual-Attention-and-Pose-Estimation
[ "23b9191f150d0edb981cf22a47a618feb55578b9", "23b9191f150d0edb981cf22a47a618feb55578b9" ]
[ "AR/exp/common/ntu_tools.py", "VA/datasets/UCF-11/extract-resize-videos.py" ]
[ "import os\n\nimport numpy as np\nimport json\nimport time\n\nfrom keras.callbacks import Callback\n\nfrom deephar.data import BatchLoader\nfrom deephar.utils import *\n\n\ndef eval_singleclip_gt_bbox_generator(model, datagen, verbose=1):\n\n num_blocks = len(model.outputs)\n num_samples = len(datagen)\n\n ...
[ [ "numpy.expand_dims", "numpy.tile", "numpy.save", "numpy.ones", "numpy.argmax", "numpy.array", "numpy.zeros", "numpy.sum" ], [ "numpy.load" ] ]
deepguider/RoadGPS
[ "7db4669a54da98a854886b89b6922fb8c7a60f33", "7db4669a54da98a854886b89b6922fb8c7a60f33", "c9689abedd7f6de0efd4effffb204aa32a8e4ef3" ]
[ "src/ocr_recog/ocr_recognizer.py", "src/logo_recog/utils.py", "src/door_detect/utils/datasets.py" ]
[ "import os\nos.environ[\"CUDA_VISIBLE_DEVICES\"]=\"0\" #CUDA_VISIBLE_DEVICES=0 (always use the first GPU only)\n\nimport time\nimport string\nimport argparse\n\nimport torch\nimport torch.backends.cudnn as cudnn\nimport torch.utils.data\n\nfrom utils import AttnLabelConverter\nfrom model import Model\n\nfrom demo ...
[ [ "torch.device", "torch.cuda.is_available", "torch.load" ], [ "numpy.pad", "numpy.random.seed", "numpy.arange", "sklearn.metrics.pairwise.cosine_similarity", "numpy.cumsum", "numpy.random.shuffle", "numpy.mean", "numpy.prod", "numpy.floor", "tensorflow.get_de...
fada-catec/advice_AI4EU_experiment
[ "624a1051e0502b60abe6122450ea53f80e9e4f8a" ]
[ "advice-road-crop/roadnet/train_valid_split.py" ]
[ "import os\nimport shutil\nimport random\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfrom tqdm import tqdm\nfrom PIL import Image\n\nrandom.seed(2020)\nIMG_CROP = True\n\n# save gt_image_2 into gt_image, so that road is assigned to 255 and non-road is 0\ntrain_gt_path = \"../../data_road/training/gt_ima...
[ [ "numpy.zeros" ] ]
adler-j/jax
[ "3d7f884ccfe15da1b218903b37b255769223b4cf" ]
[ "tests/dtypes_test.py" ]
[ "# Copyright 2019 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.array", "numpy.promote_types", "numpy.dtype", "numpy.int32" ] ]
ZHG2017/scipy
[ "859c1061b3d5aa30c4466824049d69edde5499a2", "859c1061b3d5aa30c4466824049d69edde5499a2" ]
[ "scipy/linalg/lapack.py", "scipy/stats/morestats.py" ]
[ "\"\"\"\nLow-level LAPACK functions (:mod:`scipy.linalg.lapack`)\n=======================================================\n\nThis module contains low-level functions from the LAPACK library.\n\nThe `*gegv` family of routines have been removed from LAPACK 3.6.0\nand have been deprecated in SciPy 0.17.0. They will be...
[ [ "numpy.deprecate", "numpy.nextafter", "numpy.iinfo", "scipy._lib._util.DeprecatedImport" ], [ "numpy.rollaxis", "numpy.amax", "numpy.sqrt", "numpy.linspace", "numpy.asarray", "numpy.around", "numpy.issubdtype", "numpy.all", "numpy.concatenate", "numpy.ar...
Expert68/hotel_recommendation
[ "a6c1035c7e3ff2d824039855a2349b50f9143d37" ]
[ "GBDT_modeling.py" ]
[ "import pandas as pd\nimport numpy as np\nfrom sklearn.model_selection import train_test_split\nimport xgboost as xgb\nimport h5py\nimport os\nfrom data_clean import pre_process,get_agg\n\n#------------------------------定义评估标准---------------------------\ndef map5eval(preds,dtrain):\n actual = dtrain.get_label()\...
[ [ "pandas.merge", "pandas.read_csv", "numpy.arange", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "numpy.argsort", "numpy.sum", "numpy.empty" ] ]
vincentcheny/models
[ "afb1a59fc1bc792ac72d1a3e22e2469020529788", "afb1a59fc1bc792ac72d1a3e22e2469020529788", "afb1a59fc1bc792ac72d1a3e22e2469020529788", "afb1a59fc1bc792ac72d1a3e22e2469020529788", "afb1a59fc1bc792ac72d1a3e22e2469020529788", "afb1a59fc1bc792ac72d1a3e22e2469020529788", "afb1a59fc1bc792ac72d1a3e22e246902052978...
[ "research/attention_ocr/python/demo_inference.py", "research/syntaxnet/dragnn/python/transformer_units.py", "research/autoencoder/autoencoder_models/VariationalAutoencoder.py", "research/audioset/vggish/vggish_smoke_test.py", "research/object_detection/dataset_tools/oid_tfrecord_creation.py", "research/sy...
[ "\"\"\"A script to run inference on a set of image files.\r\n\r\nNOTE #1: The Attention OCR model was trained only using FSNS train dataset and\r\nit will work only for images which look more or less similar to french street\r\nnames. In order to apply it to images from a different distribution you need\r\nto retra...
[ [ "tensorflow.python.training.monitored_session.MonitoredSession", "tensorflow.python.training.monitored_session.ChiefSessionCreator", "numpy.asarray", "tensorflow.gfile.GFile", "tensorflow.placeholder", "numpy.ndarray", "tensorflow.map_fn", "tensorflow.python.platform.flags.DEFINE_s...
bmcmenamin/word2vec_advice
[ "69dbde89b26b80d10f778147f2e3abe1628d6e05" ]
[ "scrape_scripts/textScrape.py" ]
[ "#!/Users/mcmenamin/.virtualenvs/py3env/bin/python\n\nfrom lxml import html\nimport requests\n\nfrom datetime import date\nimport numpy as np\nimport pandas as pd\n\nimport re as re\n\nfrom itertools import chain\nimport pickle\n\nfrom tqdm import tqdm\n\ndef getURLforYear(year, archiveURL='http://www.uexpress.com/...
[ [ "pandas.DataFrame.from_dict" ] ]
globotree/tensorflow
[ "b944fb947898de8cb4279a5a8a066955ba685412", "b944fb947898de8cb4279a5a8a066955ba685412", "04f2870814d2773e09dcfa00cbe76a66a2c4de88", "04f2870814d2773e09dcfa00cbe76a66a2c4de88" ]
[ "tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/multi_variables_v1.py", "tensorflow/python/keras/datasets/fashion_mnist.py", "tensorflow/python/autograph/pyct/transformer.py", "tensorflow/python/framework/tensor_util.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.random_normal_initializer", "tensorflow.compat.v1.compat.v1.saved_model.signature_def_utils.build_signature_def", "tensorflow.compat.v1.compat.v1.enable_resource_variables", "tensorflow.compat.v1.matmul", "tensorflow.compat.v1.compat.v1.disable_eager_execution", "tens...
shpotes/s4x
[ "83151b8a7cfc78ebfc1d87ccc5109b6a0444a5e5", "d14be41ea8994c36fb75801a12837c1d3e77cb57" ]
[ "t5x/losses_test.py", "t5x/contrib/moe/trainer_test.py" ]
[ "# Copyright 2022 The T5X Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or ag...
[ [ "numpy.ones_like", "numpy.random.normal", "numpy.testing.assert_allclose", "numpy.array", "numpy.random.randint" ], [ "tensorflow.cast", "numpy.ones", "numpy.testing.assert_array_equal", "tensorflow.data.Dataset.range", "numpy.zeros" ] ]
rafalmularczyk/public_lectures
[ "fcd10c217f56021ebdec0046dfe0def7f31e9b0c" ]
[ "Data Analytics/Utilities/DA_tools.py" ]
[ "import matplotlib.pyplot as plt\nimport numpy as np\nlight=\"#FFFCDC\"\nlight_highlight=\"#FEF590\"\nmid=\"#FDED2A\"\nmid_highlight=\"#f0dc05\"\ndark=\"#EECA02\"\ndark_highlight=\"#BB9700\"\ngreen=\"#00FF00\"\nlight_grey=\"#DDDDDD\"\n\ndef is_sorted(a):\n '''Check if numpy 1d-array is sorted\n '''\n retur...
[ [ "numpy.all", "matplotlib.pyplot.gca", "numpy.expand_dims", "numpy.percentile" ] ]
mkulariya1/tefla
[ "8de25c1b67dcf025535f5e8c40539de59acd7fb8", "8de25c1b67dcf025535f5e8c40539de59acd7fb8", "34f8fd0e2f2ee02aa73c6289753e08a95cc41880" ]
[ "tefla/core/losses.py", "tefla/dataset/textdataset.py", "tefla/dataset/textdataflow.py" ]
[ "# -------------------------------------------------------------------#\n# Written by Mrinal Haloi\n# Contact: mrinal.haloi11@gmail.com\n# Copyright 2016, Mrinal Haloi\n# -------------------------------------------------------------------#\nimport numpy as np\nimport tensorflow as tf\nimport numbers\nfrom functools...
[ [ "tensorflow.convert_to_tensor", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.concat", "tensorflow.is_finite", "tensorflow.control_dependencies", "tensorflow.scatter_sub", "tensorflow.reduce_sum", "numpy.linspace", "tensorflow.cast", "tensorflow.equal", ...
rusty-fast-solvers/rusty-green-kernel
[ "9317f88e873550270c482473005250a9d2df2950" ]
[ "rusty_green_kernel/test/test_rusty_green_kernel.py" ]
[ "\"\"\"Unit tests for direct assembly and evaluation of kernels.\"\"\"\nimport numpy as np\nimport pytest\n\n\n@pytest.mark.parametrize(\"parallel\", [True, False])\n@pytest.mark.parametrize(\"dtype,rtol\", [(np.float64, 1e-14), (np.float32, 5e-6)])\ndef test_laplace_assemble(dtype, rtol, parallel):\n \"\"\"Test...
[ [ "numpy.expand_dims", "numpy.imag", "numpy.geterr", "numpy.linalg.norm", "numpy.seterr", "numpy.real", "numpy.tensordot", "numpy.testing.assert_allclose", "numpy.exp", "numpy.array", "numpy.empty", "numpy.random.default_rng" ] ]
Ialkhouri/Adv_attacks_big_picture_classification
[ "53edffc3b5bb313e476dcdbaf97ec776884cad50" ]
[ "Alg2_ADMM_MNIST_model_1.py" ]
[ "# Importing Libraries\n\nfrom foolbox.criteria import TargetClass\nfrom foolbox.criteria import Misclassification\n\nfrom numpy import linalg as LA\nimport matplotlib.pyplot as plt\n\nfrom foolbox.attacks import CarliniWagnerL2Attack\nfrom foolbox.attacks import SaliencyMapAttack\nfrom foolbox.attacks import Gradi...
[ [ "tensorflow.keras.models.load_model", "tensorflow.keras.datasets.fashion_mnist.load_data", "numpy.ones", "numpy.argmin", "numpy.zeros" ] ]
ICRC-BME/epycom
[ "5bfa3fb9020f04536b7a08382533c8abf56ca85f" ]
[ "epycom/univariate/approximate_entropy.py" ]
[ "# -*- coding: utf-8 -*-\n# Copyright (c) St. Anne's University Hospital in Brno. International Clinical\n# Research Center, Biomedical Engineering. All Rights Reserved.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n# Third pary imports\nimport numpy as np\nfrom numba import njit\n\n...
[ [ "numpy.log", "numpy.full" ] ]
JPFrancoia/aws-data-wrangler
[ "5b08087d79b42683b03be91ba5ebc12ad4bd2d3d" ]
[ "awswrangler/s3.py" ]
[ "\"\"\"Amazon S3 Module.\"\"\"\n\nimport concurrent.futures\nimport csv\nimport logging\nimport time\nimport uuid\nfrom itertools import repeat\nfrom typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union\n\nimport boto3 # type: ignore\nimport botocore.exceptions # type: ignore\nimport pandas a...
[ [ "pandas.io.common.infer_compression" ] ]
Llambi/Web_Semantica
[ "16f98a7d78ba08366a67caf2bd44f3f45af6ee21" ]
[ "IndexerQuery/model/QueryAnalizer.py" ]
[ "import numpy as np\n\nfrom model.indexer_v1 import Indexer\n\n\nclass QueryAnalizer:\n def __init__(self, query, document_list, enable_stemming=True, filter_stopwords=True):\n self.__query = Indexer([query], enable_stemming=enable_stemming, filter_stopwords=filter_stopwords)\n self.__indexer = Ind...
[ [ "numpy.dot", "numpy.linalg.norm" ] ]
dolboBobo/python3_ios
[ "e149f1bc2e50046c8810f83dae7739a8dea939ee", "e149f1bc2e50046c8810f83dae7739a8dea939ee", "e149f1bc2e50046c8810f83dae7739a8dea939ee", "e149f1bc2e50046c8810f83dae7739a8dea939ee", "e149f1bc2e50046c8810f83dae7739a8dea939ee", "e149f1bc2e50046c8810f83dae7739a8dea939ee", "e149f1bc2e50046c8810f83dae7739a8dea939e...
[ "extraPackages/matplotlib-3.0.3/examples/images_contours_and_fields/contourf_log.py", "extraPackages/matplotlib-3.0.3/examples/subplots_axes_and_figures/zoom_inset_axes.py", "extraPackages/matplotlib-3.0.3/examples/pie_and_polar_charts/polar_legend.py", "extraPackages/matplotlib-3.0.3/examples/specialty_plots...
[ "\"\"\"\n============================\nContourf and log color scale\n============================\n\nDemonstrate use of a log color scale in contourf\n\"\"\"\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom numpy import ma\nfrom matplotlib import ticker, cm\n\nN = 100\nx = np.linspace(-3.0, 3.0, N)\ny =...
[ [ "numpy.meshgrid", "numpy.linspace", "numpy.ma.masked_where", "matplotlib.pyplot.subplots", "matplotlib.ticker.LogLocator", "numpy.exp", "matplotlib.pyplot.show" ], [ "numpy.load", "matplotlib.pyplot.subplots", "matplotlib.cbook.get_sample_data", "matplotlib.pyplot.s...
ska-sa/katsdpdisp
[ "3fd2f5878c0bd3ae56815568446593b876881e3f" ]
[ "katsdpdisp/test/test_data.py" ]
[ "\"\"\"Tests for :py:mod:`katsdpdisp.data`.\"\"\"\n\nimport numpy as np\nfrom numpy.testing import assert_array_equal\nfrom katsdpdisp.data import SparseArray\n\ndef test_sparsearray(fullslots=100,fullbls=10,fullchan=5,nslots=10,maxbaselines=6,islot_new_bls=6):\n \"\"\"Simulates the assignment and retrieval of d...
[ [ "numpy.testing.assert_array_equal", "numpy.random.RandomState", "numpy.zeros" ] ]
rmrafailov/metaworld
[ "b2cd055e5f2413ec6d66ef29e45d05af989dca3b", "b2cd055e5f2413ec6d66ef29e45d05af989dca3b", "b2cd055e5f2413ec6d66ef29e45d05af989dca3b", "b2cd055e5f2413ec6d66ef29e45d05af989dca3b", "b2cd055e5f2413ec6d66ef29e45d05af989dca3b" ]
[ "metaworld/policies/sawyer_coffee_pull_v2_policy.py", "metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_button_press.py", "metaworld/policies/sawyer_push_wall_v2_policy.py", "metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_coffee_button_v2.py", "metaworld/policies/sawyer_faucet_open_v2_policy.py" ]
[ "import numpy as np\n\nfrom metaworld.policies.action import Action\nfrom metaworld.policies.policy import Policy, assert_fully_parsed, move\n\n\nclass SawyerCoffeePullV2Policy(Policy):\n\n @staticmethod\n @assert_fully_parsed\n def _parse_obs(obs):\n return {\n 'hand_pos': obs[:3],\n ...
[ [ "numpy.arange", "numpy.array", "numpy.linalg.norm" ], [ "numpy.exp", "numpy.array", "numpy.linalg.norm", "numpy.abs" ], [ "numpy.arange", "numpy.array", "numpy.linalg.norm" ], [ "numpy.exp", "numpy.array", "numpy.linalg.norm", "numpy.abs" ], ...
AndreeaMutu/Python-Baseball
[ "6ca5e5006fd01ffa5b55c4859ebad7251a1f35a6" ]
[ "stats/data.py" ]
[ "import os\nimport glob\nimport pandas as pd\n\ngame_files = glob.glob(os.path.join(os.getcwd(),'games','*.EVE'))\ngame_files.sort()\n\ngame_frames = []\nfor game_file in game_files:\n game_frame = pd.read_csv(game_file, names=['type','multi2','multi3','multi4','multi5','multi6','event'])\n game_frames.append...
[ [ "pandas.Categorical", "pandas.concat", "pandas.read_csv" ] ]
KleistvonLiu/denoise-imu-gyro
[ "76e75e194a3804c473be077663b4a668fc0b7c28" ]
[ "main_EUROC.py" ]
[ "import os\nimport torch\nimport src.learning as lr\nimport src.networks as sn\nimport src.losses as sl\nimport src.dataset as ds\nimport numpy as np\n\nbase_dir = os.path.dirname(os.path.realpath(__file__))\ndata_dir = '/path/to/EUROC/dataset'\n# test a given network\n# address = os.path.join(base_dir, 'results/EU...
[ [ "numpy.log2" ] ]
nzare/ignite
[ "b53c6aeef87754b3cd3638c91172b386dc73af12", "002b595daa8a8345286c5e096c33e278948686a7", "b53c6aeef87754b3cd3638c91172b386dc73af12" ]
[ "tests/ignite/contrib/handlers/test_polyaxon_logger.py", "examples/contrib/cifar10/main.py", "tests/ignite/handlers/test_early_stopping.py" ]
[ "import os\nfrom unittest.mock import MagicMock, call\n\nimport pytest\nimport torch\n\nfrom ignite.contrib.handlers.polyaxon_logger import *\nfrom ignite.engine import Engine, Events, State\n\nos.environ[\"POLYAXON_NO_OP\"] = \"1\"\n\n\ndef test_output_handler_with_wrong_logger_type():\n\n wrapper = OutputHandl...
[ [ "torch.Tensor", "torch.tensor" ], [ "torch.nn.CrossEntropyLoss", "torch.cuda.get_device_name" ], [ "torch.randint", "torch.ones", "torch.manual_seed", "torch.tensor", "torch.distributed.get_rank", "torch.cuda.device_count", "torch.distributed.all_reduce", "t...
Monnoroch/tensorflow
[ "1d76583411038767f673a0c96174c80eaf9ff42f", "1d76583411038767f673a0c96174c80eaf9ff42f" ]
[ "tensorflow/python/ops/math_ops.py", "tensorflow/python/kernel_tests/embedding_ops_test.py" ]
[ "\"\"\"## Arithmetic Operators\n\nTensorFlow provides several operations that you can use to add basic arithmetic\noperators to your graph.\n\n@@add\n@@sub\n@@mul\n@@div\n@@mod\n\n## Basic Math Functions\n\nTensorFlow provides several operations that you can use to add basic\nmathematical functions to your graph.\n...
[ [ "tensorflow.python.framework.tensor_shape.scalar", "tensorflow.python.ops.gen_math_ops._range", "tensorflow.python.ops.gen_math_ops._abs", "tensorflow.python.framework.tensor_shape.TensorShape", "tensorflow.python.ops.array_ops.shape", "tensorflow.python.framework.ops.op_scope", "tenso...