repo_name stringlengths 6 130 | hexsha list | file_path list | code list | apis list |
|---|---|---|---|---|
yangliuy/bert_hae | [
"5c8eeed4cd7be6b11c42a743fddc461f69011469"
] | [
"hae.py"
] | [
"\n# coding: utf-8\n\n# In[1]:\n\n\n# A BERT model with history answer embedding (HAE)\n\n\n# In[2]:\n\n\n# import os\n# os.environ[\"CUDA_DEVICE_ORDER\"]=\"PCI_BUS_ID\"\n# os.environ[\"CUDA_VISIBLE_DEVICES\"]=\"3\"\n\n\n# In[3]:\n\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __f... | [
[
"tensorflow.nn.log_softmax",
"tensorflow.reduce_sum",
"tensorflow.train.init_from_checkpoint",
"tensorflow.gfile.MakeDirs",
"tensorflow.get_default_graph",
"tensorflow.summary.scalar",
"tensorflow.logging.set_verbosity",
"tensorflow.Session",
"tensorflow.trainable_variables",
... |
sander-adam/four-in-a-row-competition | [
"6a35d0375ce079ba94662d9fc9d2d54669a5725c"
] | [
"game.py"
] | [
"'''\nWe are playing the classic 'four in a row' game. Two players (1/2, blue/red) play against each other. Player 1/blue start.\nChips can only be placed on the bottom of each column. First player to get four in a row (horizontally, vertically or \ndiagonal) wins. \n\nInterface:\n\nRules:\n'''\nimport pandas as pd... | [
[
"pandas.DataFrame"
]
] |
gaozhihan/gluon-ts | [
"a28bd7f044a9a1641d8eb5b6cada8c9aa8ce5cc9"
] | [
"src/gluonts/model/deepstate/issm.py"
] | [
"# Copyright 2018 Amazon.com, Inc. or its affiliates. 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# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# or ... | [
[
"pandas.tseries.frequencies.to_offset",
"numpy.zeros"
]
] |
loiccoyle/dtaidistance | [
"5316fad44513db745c2447abe3e9e0f0c22dd308"
] | [
"tests/test_cython.py"
] | [
"import pytest\nimport numpy as np\nimport sys\nimport os\nimport math\nsys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))\nfrom dtaidistance import dtw, dtw_c\n\n\ndef test_numpymatrix():\n \"\"\"Passing a matrix instead of a list failed because the array is now a\n view in... | [
[
"numpy.testing.assert_almost_equal",
"numpy.array",
"numpy.full"
]
] |
cl-tohoku/showcase | [
"c3b1e16cb6c9ae0945abadd7c734260e32216983"
] | [
"showcase/convert_word2vec_to_npz.py"
] | [
"# -*- coding: utf-8 -*-\n\"\"\"\n入力: word2vecから獲得した単語ベクトルファイル(.txt) & 品詞細分類を含めた全語彙ファイル(1行1vocab)\n出力: 単語ベクトルファイルをnpyファイルにしたもの.全語彙ファイルに登場しないものについては適当に初期化.\n\"\"\"\nimport argparse\nimport os\nfrom itertools import islice\nfrom pathlib import Path\n\nimport numpy as np\n\n\ndef main(args):\n # load vocabulary fil... | [
[
"numpy.asarray",
"numpy.savez_compressed"
]
] |
alessandrostranieri/icns_adhd_fmri | [
"10ba36b45b8c805cde8dd1c61a9f1879be39eb8e"
] | [
"display_diagnosis_by_institutes.py"
] | [
"import logging\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\n\nfrom icns import common\nfrom icns.common import DataScope\n\ninstitute_diagnosis = dict()\nfor institute in common.Institute.get_directories():\n phenotype_file_path: str = common.create_phenotype_path(institute, DataScope.TRAIN)\n lo... | [
[
"matplotlib.pyplot.legend",
"pandas.read_csv",
"matplotlib.pyplot.show",
"matplotlib.pyplot.subplots"
]
] |
derek14/models | [
"ef972951ebae395fcb52877a3b267cf89ffd0642"
] | [
"research/delf/delf/python/training/datasets/googlelandmarks.py"
] | [
"# Lint as: python3\n# Copyright 2020 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... | [
[
"tensorflow.constant",
"tensorflow.image.random_flip_left_right",
"tensorflow.shape",
"tensorflow.slice",
"tensorflow.io.decode_jpeg",
"tensorflow.data.TFRecordDataset",
"tensorflow.cast",
"tensorflow.io.parse_single_example",
"tensorflow.subtract",
"tensorflow.io.FixedLenF... |
HousedHorse/COMP4906 | [
"a2ca3990797342fbf3b51564bc6c0eea686e856f"
] | [
"data/analyze-bpfbench.py"
] | [
"#! /usr/bin/env python3\n\nimport os, sys\nimport argparse\n\nimport numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nparser = argparse.ArgumentParser()\nparser.add_argument('-b', '--base', type=str, nargs='+', required=1, help='base data')\nparser.add_argument('-e', '--e... | [
[
"pandas.merge",
"pandas.read_csv",
"pandas.concat",
"numpy.abs",
"numpy.isnan"
]
] |
SafronovNikita/hough-plane-python | [
"abdd3e941d44ec758c202116c97dd13f0830c3cd"
] | [
"vizualization.py"
] | [
"import numpy as np\nimport math\nfrom plotly.offline import iplot\nfrom plotly import graph_objs as go\n\ndef _show_data(data, show_zero=True, is_hough_space=False):\n if show_zero:\n data.append(\n go.Scatter3d(\n x=[0],\n y=[0],\n z=[0],\n ... | [
[
"numpy.array",
"numpy.cross"
]
] |
evanphilip/vedo | [
"e8504fb1a7d2cb667a776180d69bb17cad634e1e"
] | [
"examples/pyplot/earthquake_browser.py"
] | [
"\"\"\"Browse earthquakes of magnitude 2.5+ in the past 30 days\"\"\"\nimport pandas, numpy as np\nfrom vedo import *\n\nnum = 50 # nr of earthquakes to be visualized in the time window\n\nprintc(\"..downloading USGS data.. please wait..\", invert=True)\npath = download(\"https://earthquake.usgs.gov/earthquakes/fe... | [
[
"numpy.deg2rad",
"pandas.read_csv",
"numpy.linspace"
]
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.