Dataset Viewer
Auto-converted to Parquet Duplicate
repo_name
stringlengths
8
130
hexsha
sequence
file_path
sequence
code
sequence
apis
sequence
adcrn/knest
[ "a274dc9ddb642cc30f837e225f000bf33430eb43" ]
[ "utils/compare.py" ]
[ "# UCF Senior Design 2017-18\n# Group 38\n\nfrom PIL import Image\nimport cv2\nimport imagehash\nimport math\nimport numpy as np\n\nDIFF_THRES = 20\nLIMIT = 2\nRESIZE = 1000\n\n\ndef calc_hash(img):\n \"\"\"\n Calculate the wavelet hash of the image\n img: (ndarray) image file\n \"\"\"\n # resize...
[ [ "numpy.shape" ] ]
dongmengshi/easylearn
[ "df528aaa69c3cf61f5459a04671642eb49421dfb", "df528aaa69c3cf61f5459a04671642eb49421dfb" ]
[ "eslearn/utils/lc_featureSelection_variance.py", "eslearn/machine_learning/test/GCNNCourseCodes/metrics.py" ]
[ "# -*- coding: utf-8 -*-\n\"\"\"\nCreated on Tue Jul 24 14:38:20 2018\ndimension reduction with VarianceThreshold using sklearn.\nFeature selector that removes all low-variance features.\n@author: lenovo\n\"\"\"\nfrom sklearn.feature_selection import VarianceThreshold\nimport numpy as np\n#\nnp.random.seed(1)\nX = ...
[ [ "numpy.random.randn", "numpy.random.seed", "numpy.zeros", "sklearn.feature_selection.VarianceThreshold" ], [ "tensorflow.nn.sigmoid_cross_entropy_with_logits", "tensorflow.nn.sigmoid", "tensorflow.nn.softmax_cross_entropy_with_logits", "tensorflow.round", "tensorflow.reduce...
silent567/examples
[ "e9de12549125ecd93a4924f6b8e2bbf66d7635d9" ]
[ "mnist/my_multi_tune3.py" ]
[ "#!/usr/bin/env python\n# coding=utf-8\n\nfrom my_multi_main3 import main\nimport numpy as np\nimport argparse\nimport time\n\nparser = argparse.ArgumentParser(description='PyTorch MNIST Example')\nparser.add_argument('--batch-size', type=int, default=64, metavar='N',\n help='input batch size for...
[ [ "numpy.arange", "numpy.savetxt" ] ]
neonbjb/DL-Art-School
[ "a6f0f854b987ac724e258af8b042ea4459a571bc" ]
[ "codes/data/image_corruptor.py" ]
[ "import functools\nimport random\nfrom math import cos, pi\n\nimport cv2\nimport kornia\nimport numpy as np\nimport torch\nfrom kornia.augmentation import ColorJitter\n\nfrom data.util import read_img\nfrom PIL import Image\nfrom io import BytesIO\n\n\n# Get a rough visualization of the above distribution. (Y-axis ...
[ [ "numpy.ones", "numpy.sum", "numpy.zeros", "torch.from_numpy", "numpy.clip", "numpy.random.rand", "numpy.mean" ] ]
pclucas14/continuum
[ "09034db1371e9646ca660fd4d4df73e61bf77067" ]
[ "tests/test_background_swap.py" ]
[ "import os\n\nfrom torch.utils.data import DataLoader\nfrom continuum.datasets import CIFAR10, InMemoryDataset\nfrom continuum.datasets import MNIST\nimport torchvision\nfrom continuum.scenarios import TransformationIncremental\nimport pytest\nimport numpy as np\n\nfrom continuum.transforms.bg_swap import Backgroun...
[ [ "numpy.ones", "torch.utils.data.DataLoader", "numpy.random.rand", "numpy.array_equal", "numpy.random.normal" ] ]
g-nightingale/tox_examples
[ "d7714375c764580b4b8af9db61332ced4e851def" ]
[ "packaging/squarer/ml_squarer.py" ]
[ "import numpy as np\n\n\ndef train_ml_squarer() -> None:\n print(\"Training!\")\n\n\ndef square() -> int:\n \"\"\"Square a number...maybe\"\"\"\n return np.random.randint(1, 100)\n\n\nif __name__ == '__main__':\n train_ml_squarer()" ]
[ [ "numpy.random.randint" ] ]
GOOGLE-M/SGC
[ "78ad8d02b80808302e38559e2d0f430f66a809bd" ]
[ "venv/lib/python3.7/site-packages/torch/utils/benchmark/utils/timer.py" ]
[ "\"\"\"Timer class based on the timeit.Timer class, but torch aware.\"\"\"\nimport enum\nimport timeit\nimport textwrap\nfrom typing import Any, Callable, Dict, List, NoReturn, Optional, Type, Union\n\nimport numpy as np\nimport torch\nfrom torch.utils.benchmark.utils import common, cpp_jit\nfrom torch.utils.benchm...
[ [ "torch.utils.benchmark.utils.common.TaskSpec", "torch.utils.benchmark.utils.valgrind_wrapper.timer_interface.wrapper_singleton", "torch.utils.benchmark.utils.common.Measurement", "torch.utils.benchmark.utils.valgrind_wrapper.timer_interface.CopyIfCallgrind.unwrap_all", "torch.cuda.synchronize"...
mohammedshariqnawaz/Pedestron
[ "9785feb94f00e07ae24a662525b4678f12d0fdc8" ]
[ "mmdet/models/detectors/csp.py" ]
[ "\nfrom .single_stage import SingleStageDetector\nfrom ..registry import DETECTORS\nfrom mmdet.core import bbox2result\nimport torch.nn as nn\nimport torch\nfrom .. import builder\nimport numpy as np\nimport cv2\nfrom mmdet.core import bbox2roi, bbox2result, build_assigner, build_sampler\n\n@DETECTORS.register_modu...
[ [ "torch.tensor", "numpy.transpose" ] ]
MichaelAllen1966/stroke_outcome_algorithm
[ "99050bf4e0b19c38c8973fe10234fee4f230a172" ]
[ "clinical_outcome.py" ]
[ "\"\"\"\nClass to hold clinical outcome model.\nPredicts probability of good outcome of patient(s) or group(s) of patients.\n\nCall `calculate_outcome_for_all(args)` from outside of the object\n\nInputs\n======\n\nAll inputs take np arrays (for multiple groups of patients).\n\nmimic: proportion of patients with str...
[ [ "numpy.log", "pandas.DataFrame", "numpy.zeros", "numpy.full" ] ]
brettelliot/event-study
[ "cffc6a80dbc4b33e68e863488428996af51cc991" ]
[ "examples/earnings_surprises/earnings-converter.py" ]
["import pandas as pd\nfrom pandas.compat import StringIO\nimport numpy\nnumpy.set_printoptions(thre(...TRUNCATED)
[ [ "numpy.set_printoptions", "pandas.compat.StringIO" ] ]
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
5