repo_name
stringlengths
8
75
hexsha
stringlengths
40
40
code
stringlengths
447
163k
apis
list
file_path
stringlengths
7
127
api_extract
stringlengths
346
104k
Bertinus/IRM-games
e8a94e9647d1ea7211236bbd3f4ed16b1e8207b6
import tensorflow as tf import torch import numpy as np import matplotlib.pyplot as plt from sklearn.utils import shuffle from tqdm import tqdm_notebook as tqdm tf.compat.v1.enable_eager_execution() class AbstractIrmGame: """ Abstract class for IRM games. """ def __init__(self, models, optimizers, extra_gra...
[ "matplotlib.pyplot.legend", "tensorflow.zeros", "torch.zeros", "tensorflow.reduce_sum", "tensorflow.compat.v1.enable_eager_execution", "matplotlib.pyplot.plot", "numpy.concatenate", "numpy.mean", "torch.no_grad", "tensorflow.where", "numpy.where", "torch.nn.CrossEntropyLoss", "torch.tensor",...
IRM_methods.py
[(8, 'tensorflow.compat.v1.enable_eager_execution', 'tf.compat.v1.enable_eager_execution', ([], {}), True, 'import tensorflow as tf\n'), (27, 'tensorflow.keras.losses.SparseCategoricalCrossentropy', 'tf.keras.losses.SparseCategoricalCrossentropy', ([], {'from_logits': '(True)'}), True, 'import tensorflow as tf\n'), (28...
paulokuong/fourthbrain_capstone
db4f76bfc5fd7b1ecc355282f37a87a06f62aa47
import pandas as pd import numpy as np import seaborn as sns from datetime import datetime import os import time from sklearn.inspection import permutation_importance from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier...
[ "pandas.Series", "sklearn.ensemble.RandomForestClassifier", "numpy.abs", "sklearn.inspection.permutation_importance", "sklearn.model_selection.train_test_split", "pandas.DataFrame", "numpy.full", "tensorflow.keras.backend.clear_session", "pandas.unique", "pandas.read_json", "tensorflow.optimizer...
presentation/groupby_user_conversion.py
[(50, 'numpy.full', 'np.full', (['(cor.shape[0],)', '(True)'], {'dtype': 'bool'}), True, 'import numpy as np\n'), (78, 'sklearn.ensemble.RandomForestClassifier', 'RandomForestClassifier', ([], {'random_state': 'random_state'}), False, 'from sklearn.ensemble import RandomForestClassifier\n'), (80, 'time.time', 'time.tim...
fdibaldassarre/waifu2x-tensorflow
aa170c306d655047a7d6b13f588d13b6bdd28736
#!/usr/bin/env python3 import json import os from PIL import Image import numpy as np import tensorflow as tf from tensorflow.keras import Sequential from tensorflow.keras import layers from src.Places import MODELS_FOLDER OP_SCALE = 'scale' OP_NOISE = 'noise' OP_NOISE_SCALE = 'noise_scale' LEAKY_ALPHA = tf.const...
[ "tensorflow.multiply", "numpy.maximum", "tensorflow.constant", "numpy.expand_dims", "tensorflow.greater", "numpy.asarray", "tensorflow.keras.Sequential", "numpy.round" ]
src/Waifu2x.py
[(19, 'tensorflow.constant', 'tf.constant', (['(0.1)'], {}), True, 'import tensorflow as tf\n'), (29, 'PIL.Image.fromarray', 'Image.fromarray', (['data'], {}), False, 'from PIL import Image\n'), (35, 'numpy.asarray', 'np.asarray', (["config['bias']"], {'dtype': 'np.float32'}), True, 'import numpy as np\n'), (62, 'PIL.I...
dathudeptrai/rfcx-kaggle
e0d4705cd27c02142f3b2cac42083d6569a90863
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
[ "tensorflow.python.keras.applications.imagenet_utils.decode_predictions", "tensorflow.python.keras.backend.image_data_format", "tensorflow.python.keras.utils.data_utils.get_file", "tensorflow.python.keras.layers.VersionAwareLayers", "tensorflow.python.util.tf_export.keras_export", "tensorflow.python.keras...
backbones/inceptionv3.py
[(42, 'tensorflow.python.keras.layers.VersionAwareLayers', 'VersionAwareLayers', ([], {}), False, 'from tensorflow.python.keras.layers import VersionAwareLayers\n'), (45, 'tensorflow.python.util.tf_export.keras_export', 'keras_export', (['"""keras.applications.inception_v3.InceptionV3"""', '"""keras.applications.Incept...
Virinas-code/GobyChess
dc6129a4d5a5e061714714402d9cd472efc599f8
#!/usr/bin/env python3 """ Try to train evaluation in supervised fashion with engineered loss function """ import sys import chess import h5py import numpy as np import tensorflow as tf from tensorflow.math import log, sigmoid, pow model = tf.keras.Sequential([ tf.keras.layers.Dense(100, activation=tf.nn.relu, i...
[ "numpy.reshape", "tensorflow.keras.layers.Dense", "tensorflow.cast", "tensorflow.reshape", "tensorflow.math.sigmoid", "tensorflow.GradientTape", "tensorflow.math.pow", "tensorflow.keras.metrics.Mean", "tensorflow.keras.optimizers.SGD" ]
gobychess/train.py
[(24, 'h5py.File', 'h5py.File', (['"""data/data.h5"""', '"""r"""'], {}), False, 'import h5py\n'), (27, 'h5py.File', 'h5py.File', (['"""data/meta.h5"""', '"""r"""'], {}), False, 'import h5py\n'), (30, 'h5py.File', 'h5py.File', (['"""data/test_data.h5"""', '"""r"""'], {}), False, 'import h5py\n'), (33, 'h5py.File', 'h5py...