code
stringlengths
20
1.04M
apis
list
extract_api
stringlengths
75
9.94M
import pickle import warnings from abc import abstractmethod from typing import Dict, Iterable, List, Set, Tuple, Type import numpy as np import pandas from spacy.tokens import Doc, Span # type: ignore from . import utils from .base import AbstractAnnotator warnings.simplefilter(action='ignore', category=FutureWar...
[ "pandas.DataFrame", "pickle.dump", "warnings.simplefilter", "spacy.tokens.Span", "numpy.apply_along_axis", "pickle.load", "numpy.where", "numpy.prod" ]
[((263, 325), 'warnings.simplefilter', 'warnings.simplefilter', ([], {'action': '"""ignore"""', 'category': 'FutureWarning'}), "(action='ignore', category=FutureWarning)\n", (284, 325), False, 'import warnings\n'), ((10419, 10440), 'pickle.dump', 'pickle.dump', (['self', 'fd'], {}), '(self, fd)\n', (10430, 10440), Fals...
from slim import Application, CORSOptions from slim.base.session import MemoryHeaderKeySession import config app = Application( cookies_secret=config.COOKIES_SECRET, session_cls=MemoryHeaderKeySession, log_level=config.DEBUG_LEVEL, cors_options=config.CORS_OPTIONS )
[ "slim.Application" ]
[((116, 275), 'slim.Application', 'Application', ([], {'cookies_secret': 'config.COOKIES_SECRET', 'session_cls': 'MemoryHeaderKeySession', 'log_level': 'config.DEBUG_LEVEL', 'cors_options': 'config.CORS_OPTIONS'}), '(cookies_secret=config.COOKIES_SECRET, session_cls=\n MemoryHeaderKeySession, log_level=config.DEBUG_...
import os import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams['figure.dpi'] = 300 from matplotlib.lines import Line2D from tqdm.auto import tqdm sns.set(style='ticks', palette='Set2') sns.despine() sns.set_context("talk") def sort_key(row...
[ "matplotlib.pyplot.suptitle", "pandas.read_csv", "numpy.arange", "matplotlib.pyplot.tight_layout", "os.path.join", "pandas.DataFrame", "matplotlib.lines.Line2D", "matplotlib.pyplot.close", "os.path.exists", "seaborn.algorithms.bootstrap", "seaborn.set", "seaborn.set_context", "matplotlib.pyp...
[((226, 264), 'seaborn.set', 'sns.set', ([], {'style': '"""ticks"""', 'palette': '"""Set2"""'}), "(style='ticks', palette='Set2')\n", (233, 264), True, 'import seaborn as sns\n'), ((265, 278), 'seaborn.despine', 'sns.despine', ([], {}), '()\n', (276, 278), True, 'import seaborn as sns\n'), ((279, 302), 'seaborn.set_con...
# -*- coding: utf-8 -*- from stalker.config import Config as ConfigBase class Config(ConfigBase): """configurator """ extra_config_values = dict( # stalker_server_internal_address= # defaults.stalker_server_internal_address # if 'stalker_server_internal_address' in defaults else ...
[ "stalker.StatusList.query.filter", "stalker.db.session.DBSession.query", "anima.utils.do_db_setup", "stalker.Group.name.in_" ]
[((2344, 2357), 'anima.utils.do_db_setup', 'do_db_setup', ([], {}), '()\n', (2355, 2357), False, 'from anima.utils import do_db_setup\n'), ((2972, 2985), 'anima.utils.do_db_setup', 'do_db_setup', ([], {}), '()\n', (2983, 2985), False, 'from anima.utils import do_db_setup\n'), ((2450, 2514), 'stalker.StatusList.query.fi...
""" Code to generate the ONCdb from Robberto et al. (2013) data """ # from astrodbkit import astrodb from astropy.io import ascii import astropy.coordinates as coord import astropy.table as at import astropy.units as q import numpy as np from astrodbkit import astrodb, astrocat import pandas as pd path = '/Users/jfilip...
[ "astrodbkit.astrodb.create_database", "astrodbkit.astrodb.Database", "astropy.table.Table", "astrodbkit.astrocat.Catalog", "astropy.table.Table.from_pandas", "numpy.array", "astropy.table.Column", "astropy.coordinates.SkyCoord" ]
[((1465, 1509), 'astropy.coordinates.SkyCoord', 'coord.SkyCoord', ([], {'ra': 'ra', 'dec': 'dec', 'frame': '"""icrs"""'}), "(ra=ra, dec=dec, frame='icrs')\n", (1479, 1509), True, 'import astropy.coordinates as coord\n'), ((1522, 1622), 'astropy.coordinates.SkyCoord', 'coord.SkyCoord', ([], {'ra': "onc.sources['ra']", '...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
[ "hbase.api.HbaseApi", "desktop.lib.paths.get_apps_root", "datetime.timedelta", "useradmin.models.install_sample_user", "datetime.datetime.now", "logging.getLogger" ]
[((1182, 1209), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (1199, 1209), False, 'import logging\n'), ((1468, 1487), 'hbase.api.HbaseApi', 'HbaseApi', ([], {'user': 'user'}), '(user=user)\n', (1476, 1487), False, 'from hbase.api import HbaseApi\n'), ((1435, 1456), 'useradmin.models.ins...
""" Various functions useful for energy transfer calculations """ import numpy # <NAME> def troe_lj_collision_frequency(eps, sig, red_mass, temp): """ Collision Frequency formula from Troe that uses Lennard-Jones epsilons and sigma parameters :param eps: Target+Bath Lennard-Jones epsilon value...
[ "numpy.log", "numpy.sqrt" ]
[((743, 804), 'numpy.sqrt', 'numpy.sqrt', (['(8.0 * 1.380603e-23 * temp / (numpy.pi * red_mass))'], {}), '(8.0 * 1.380603e-23 * temp / (numpy.pi * red_mass))\n', (753, 804), False, 'import numpy\n'), ((847, 878), 'numpy.log', 'numpy.log', (['(0.69502 * temp / eps)'], {}), '(0.69502 * temp / eps)\n', (856, 878), False, ...
import unittest from find_path_in_graph import Node, connect, Graph, find_path_in_graph class TestFindPathInGraph(unittest.TestCase): def test_find_path_in_graph(self): nodes = [ Node(), Node(), Node() ] connect(nodes[0], nodes[1]) connect(nodes...
[ "unittest.main", "find_path_in_graph.find_path_in_graph", "find_path_in_graph.Node", "find_path_in_graph.Graph", "find_path_in_graph.connect" ]
[((1071, 1086), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1084, 1086), False, 'import unittest\n'), ((271, 298), 'find_path_in_graph.connect', 'connect', (['nodes[0]', 'nodes[1]'], {}), '(nodes[0], nodes[1])\n', (278, 298), False, 'from find_path_in_graph import Node, connect, Graph, find_path_in_graph\n'), ...
from SpacyToolKit import spans_to_words def IoU(model, data): """ Intersection by union is a scoring metric used to measure the accuracy of an object detector on a particular dataset, but let's use it for nlp! """ scores = [] for text, annotations in data: y_pred = set([(ent.text) f...
[ "SpacyToolKit.spans_to_words" ]
[((370, 405), 'SpacyToolKit.spans_to_words', 'spans_to_words', (['(text, annotations)'], {}), '((text, annotations))\n', (384, 405), False, 'from SpacyToolKit import spans_to_words\n')]
from os import path class JSSnippet(object): # private def _execute_js(self, function_name, *args): filepath = path.abspath(path.join(path.dirname(__file__), 'js_snippets', '{}.js'.format(function_name))) if n...
[ "os.path.isfile", "os.path.dirname" ]
[((323, 344), 'os.path.isfile', 'path.isfile', (['filepath'], {}), '(filepath)\n', (334, 344), False, 'from os import path\n'), ((153, 175), 'os.path.dirname', 'path.dirname', (['__file__'], {}), '(__file__)\n', (165, 175), False, 'from os import path\n')]
"""connections Revision ID: 401bc82cc255 Revises: <PASSWORD> Create Date: 2015-09-26 15:54:20.521485 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = '2289<PASSWORD>0<PASSWORD>' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic ...
[ "alembic.op.drop_table", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.ForeignKeyConstraint", "sqlalchemy.String", "sqlalchemy.Integer" ]
[((1226, 1253), 'alembic.op.drop_table', 'op.drop_table', (['"""connection"""'], {}), "('connection')\n", (1239, 1253), False, 'from alembic import op\n'), ((1013, 1062), 'sqlalchemy.ForeignKeyConstraint', 'sa.ForeignKeyConstraint', (["['user_id']", "['user.id']"], {}), "(['user_id'], ['user.id'])\n", (1036, 1062), Tru...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Nov 19 12:07:21 2018 @author: <NAME> @email : <EMAIL> """ #%% import numpy as np import sys sys.path.insert(0, '../../') sys.path.insert(0, '../thermal_block') print(sys.path) import pyorb_core.tpl_managers.external_engine_manager as mee library_pa...
[ "pyorb_core.tpl_managers.external_engine_manager.external_engine_manager", "sys.path.insert", "numpy.array", "numpy.linalg.norm", "pyorb_core.pde_problem.parameter_handler.Parameter_handler", "thermal_block_problem.thermal_block_problem" ]
[((162, 190), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../../"""'], {}), "(0, '../../')\n", (177, 190), False, 'import sys\n'), ((191, 229), 'sys.path.insert', 'sys.path.insert', (['(0)', '"""../thermal_block"""'], {}), "(0, '../thermal_block')\n", (206, 229), False, 'import sys\n'), ((432, 480), 'pyorb_core....
from flask import Flask, render_template, redirect, url_for, request from flask_bootstrap import Bootstrap from flask_sqlalchemy import SQLAlchemy from flask_wtf import FlaskForm from wtforms import StringField, SubmitField, DecimalField from wtforms.validators import DataRequired import requests app = Flask(__name__)...
[ "flask.request.args.get", "flask.Flask", "wtforms.SubmitField", "flask.url_for", "flask_sqlalchemy.SQLAlchemy", "flask.render_template", "requests.get", "flask_bootstrap.Bootstrap", "wtforms.validators.DataRequired" ]
[((305, 320), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (310, 320), False, 'from flask import Flask, render_template, redirect, url_for, request\n'), ((356, 370), 'flask_bootstrap.Bootstrap', 'Bootstrap', (['app'], {}), '(app)\n', (365, 370), False, 'from flask_bootstrap import Bootstrap\n'), ((448, 4...
from django.contrib import admin from django.contrib.admin import TabularInline from .models import Gallery, Image from ajaximage.admin import AjaxImageUploadMixin class ParameterImageInline(TabularInline): model = Image ajax_image_upload_field = 'file' ajax_image_max_width = 500 ajax_image_max_heigh...
[ "django.contrib.admin.register" ]
[((397, 420), 'django.contrib.admin.register', 'admin.register', (['Gallery'], {}), '(Gallery)\n', (411, 420), False, 'from django.contrib import admin\n')]
import re def format_values_to_str(values): v = [] for x in values: for x2 in x: v.append(x2) return "\n".join(v) def format_value(value_str): if re.match(r'^[-+]?([0-9]*\.[0-9]+)$', value_str): return float(value_str) elif re.match(r'^\d+$', value_str): retur...
[ "re.match" ]
[((186, 233), 're.match', 're.match', (['"""^[-+]?([0-9]*\\\\.[0-9]+)$"""', 'value_str'], {}), "('^[-+]?([0-9]*\\\\.[0-9]+)$', value_str)\n", (194, 233), False, 'import re\n'), ((276, 305), 're.match', 're.match', (['"""^\\\\d+$"""', 'value_str'], {}), "('^\\\\d+$', value_str)\n", (284, 305), False, 'import re\n')]
from django.urls import path from . import views urlpatterns = [ path("", views.index, name="index"), path("selection", views.select_programme_create, name="selection"), path("bailleur/<convention_uuid>", views.bailleur, name="bailleur"), path("programme/<convention_uuid>", views.programme, name="progr...
[ "django.urls.path" ]
[((70, 105), 'django.urls.path', 'path', (['""""""', 'views.index'], {'name': '"""index"""'}), "('', views.index, name='index')\n", (74, 105), False, 'from django.urls import path\n'), ((111, 177), 'django.urls.path', 'path', (['"""selection"""', 'views.select_programme_create'], {'name': '"""selection"""'}), "('select...
import logging from hamper.interfaces import IPlugin, Command, ChatCommandPlugin import twisted log = logging.getLogger('hamper.plugins.plugin_utils') class PluginUtils(ChatCommandPlugin): name = 'plugins' priority = 0 @classmethod def get_plugins(cls, bot): all_plugins = set() f...
[ "twisted.plugin.retrieve_named_plugins", "logging.getLogger" ]
[((106, 154), 'logging.getLogger', 'logging.getLogger', (['"""hamper.plugins.plugin_utils"""'], {}), "('hamper.plugins.plugin_utils')\n", (123, 154), False, 'import logging\n'), ((1770, 1864), 'twisted.plugin.retrieve_named_plugins', 'twisted.plugin.retrieve_named_plugins', (['IPlugin', '[name]', '"""hamper.plugins"""'...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('fluent_contents', '0001_initial'), ] operations = [ migrations.Cr...
[ "django.db.models.ForeignKey", "django.db.models.OneToOneField" ]
[((427, 557), 'django.db.models.OneToOneField', 'models.OneToOneField', ([], {'serialize': '(False)', 'to': '"""fluent_contents.ContentItem"""', 'parent_link': '(True)', 'primary_key': '(True)', 'auto_created': '(True)'}), "(serialize=False, to='fluent_contents.ContentItem',\n parent_link=True, primary_key=True, aut...
from setuptools import setup setup(name='trustly', version='0.1', description='Trustly API Python client', url='http://github.com/trustly/trustly-client-python', author='<NAME>', license='The MIT License (MIT)', packages=['trustly', 'trustly.data', 'trustly.api'], ...
[ "setuptools.setup" ]
[((30, 403), 'setuptools.setup', 'setup', ([], {'name': '"""trustly"""', 'version': '"""0.1"""', 'description': '"""Trustly API Python client"""', 'url': '"""http://github.com/trustly/trustly-client-python"""', 'author': '"""<NAME>"""', 'license': '"""The MIT License (MIT)"""', 'packages': "['trustly', 'trustly.data', ...
import configparser import click import sys import pur import os from ._folder import TmpDir def _standardize_requirements(req): req = req.strip() req = req.replace(";", "\n").strip() r = req.replace("\n\n", "\n") while len(r) < len(req): req = r r = req.replace("\n\n", "\n") req =...
[ "click.version_option", "pur.update_requirements", "click.argument", "os.path.exists", "click.command", "configparser.ConfigParser", "os.path.join", "sys.exit" ]
[((2141, 2156), 'click.command', 'click.command', ([], {}), '()\n', (2154, 2156), False, 'import click\n'), ((2158, 2184), 'click.argument', 'click.argument', (['"""filepath"""'], {}), "('filepath')\n", (2172, 2184), False, 'import click\n'), ((2186, 2208), 'click.version_option', 'click.version_option', ([], {}), '()\...
import requests import json credentials = json.load(open('config.json', 'r')) token = credentials['BOT_TOKEN'] # Your Bot token from config.json chat_id = credentials['chat_id'] # Message you want to send to a specific chat! def sendMessage(message): url = f'https://api.telegram.org/bot{token}/sendMessage' p...
[ "requests.get" ]
[((404, 429), 'requests.get', 'requests.get', (['request_url'], {}), '(request_url)\n', (416, 429), False, 'import requests\n'), ((481, 544), 'requests.get', 'requests.get', (['f"""https://api.telegram.org/bot{token}/getUpdates"""'], {}), "(f'https://api.telegram.org/bot{token}/getUpdates')\n", (493, 544), False, 'impo...
# -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # # License: BSD 3 clause from machlearn import model_evaluation as me me.demo()
[ "machlearn.model_evaluation.demo" ]
[((127, 136), 'machlearn.model_evaluation.demo', 'me.demo', ([], {}), '()\n', (134, 136), True, 'from machlearn import model_evaluation as me\n')]
# author: <NAME>, Early January # version: 2.2 import PySimpleGUI as sg import cx_Oracle from input_checker import check_string from input_checker import check_expectation from input_checker import check_mark def run_program(student_id, mark): # the function that runs everything, requires student number and name of...
[ "PySimpleGUI.Checkbox", "PySimpleGUI.Button", "PySimpleGUI.InputText", "input_checker.check_mark", "input_checker.check_expectation", "PySimpleGUI.Text", "PySimpleGUI.Window", "PySimpleGUI.Column", "input_checker.check_string", "cx_Oracle.connect", "PySimpleGUI.Popup" ]
[((352, 393), 'cx_Oracle.connect', 'cx_Oracle.connect', (['"""EOM/EOM@127.0.0.1/xe"""'], {}), "('EOM/EOM@127.0.0.1/xe')\n", (369, 393), False, 'import cx_Oracle\n'), ((3733, 3774), 'cx_Oracle.connect', 'cx_Oracle.connect', (['"""EOM/EOM@127.0.0.1/xe"""'], {}), "('EOM/EOM@127.0.0.1/xe')\n", (3750, 3774), False, 'import ...
# -*- coding: utf-8 -*- # ====================================================================================================================== # Copyright (©) 2015-2021 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. = # CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful...
[ "numpy.testing.assert_allclose", "spectrochempy.core.analysis.svd.SVD" ]
[((769, 781), 'spectrochempy.core.analysis.svd.SVD', 'SVD', (['dataset'], {}), '(dataset)\n', (772, 781), False, 'from spectrochempy.core.analysis.svd import SVD\n'), ((787, 857), 'numpy.testing.assert_allclose', 'assert_allclose', (['svd.ev_ratio[0].data', '(94.539)'], {'rtol': '(1e-05)', 'atol': '(0.0001)'}), '(svd.e...
from setuptools import setup setup( name="py_to_rpy", version="0.9", description="Convert Python files to Ren'Py files", url="https://github.com/jsfehler/py_to_rpy", author="<NAME>", author_email="<EMAIL>", license="MIT", packages=['py_to_rpy'], zip_safe=False, entry_points={ ...
[ "setuptools.setup" ]
[((30, 350), 'setuptools.setup', 'setup', ([], {'name': '"""py_to_rpy"""', 'version': '"""0.9"""', 'description': '"""Convert Python files to Ren\'Py files"""', 'url': '"""https://github.com/jsfehler/py_to_rpy"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'license': '"""MIT"""', 'packages': "['py_to_r...
""" @author: CoilingDragon # https://chromedriver.chromium.org/downloads # my chrome driver version is 94 beautifulsoup4==4.9.0 selenium==3.141.0 """ from bs4 import BeautifulSoup import time import json import re from selenium import webdriver from selenium.webdri...
[ "selenium.webdriver.support.expected_conditions.presence_of_element_located", "selenium.webdriver.chrome.options.Options", "json.dumps", "time.sleep", "re.findall", "selenium.webdriver.Chrome", "bs4.BeautifulSoup", "selenium.webdriver.support.ui.WebDriverWait" ]
[((1079, 1088), 'selenium.webdriver.chrome.options.Options', 'Options', ([], {}), '()\n', (1086, 1088), False, 'from selenium.webdriver.chrome.options import Options\n'), ((1144, 1220), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'executable_path': '"""chromedriver.exe"""', 'options': 'chrome_options'}), "(e...
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt ACTIVATION = tf.nn.tanh N_LAYERS = 7 N_HIDDEN_UNITS = 30 def fix_seed(seed=1): np.random.seed(seed) tf.set_random_seed(seed) def plot_his(inputs, inputs_norm): # plot histogram for the inputs of every layer for j, all_inputs ...
[ "matplotlib.pyplot.title", "tensorflow.nn.batch_normalization", "numpy.random.seed", "tensorflow.identity", "tensorflow.matmul", "matplotlib.pyplot.figure", "numpy.random.normal", "matplotlib.pyplot.gca", "tensorflow.train.ExponentialMovingAverage", "tensorflow.nn.moments", "matplotlib.pyplot.yt...
[((161, 181), 'numpy.random.seed', 'np.random.seed', (['seed'], {}), '(seed)\n', (175, 181), True, 'import numpy as np\n'), ((186, 210), 'tensorflow.set_random_seed', 'tf.set_random_seed', (['seed'], {}), '(seed)\n', (204, 210), True, 'import tensorflow as tf\n'), ((1024, 1034), 'matplotlib.pyplot.draw', 'plt.draw', ([...
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. from math import exp import dace import numpy as np def test_for_loop_detection(): N = dace.symbol('N') @dace.program def looptest(A: dace.float64[N]): for i in range(N): A[i] += 5 sdfg: dace.SDFG = loopt...
[ "numpy.array_equal", "dace.Config.get_bool", "numpy.allclose", "dace.ndarray", "numpy.array", "numpy.random.rand", "dace.SDFG", "dace.Memlet", "dace.symbol", "dace.InterstateEdge" ]
[((169, 185), 'dace.symbol', 'dace.symbol', (['"""N"""'], {}), "('N')\n", (180, 185), False, 'import dace\n'), ((341, 397), 'dace.Config.get_bool', 'dace.Config.get_bool', (['"""optimizer"""', '"""detect_control_flow"""'], {}), "('optimizer', 'detect_control_flow')\n", (361, 397), False, 'import dace\n'), ((463, 481), ...
""" Package for ANDES analysis routines. """ from collections import OrderedDict from andes.utils.func import list_flatten # all_routines: file name: class name all_routines = OrderedDict([('pflow', ['PFlow']), ('tds', ['TDS']), ('eig', ['EIG']), ...
[ "collections.OrderedDict" ]
[((179, 250), 'collections.OrderedDict', 'OrderedDict', (["[('pflow', ['PFlow']), ('tds', ['TDS']), ('eig', ['EIG'])]"], {}), "([('pflow', ['PFlow']), ('tds', ['TDS']), ('eig', ['EIG'])])\n", (190, 250), False, 'from collections import OrderedDict\n')]
""" monitoring tool-kit example ------- import os try: def app(): something app() except Exception as e: error_log = montk.make_error_log() montk.send_error_log_email(to=os.environ['EMAIL_ADDRESS']) """ import smtplib import os from email.message import EmailMessage import sys import trace...
[ "smtplib.SMTP_SSL", "email.message.EmailMessage", "pathlib.Path", "sys.exc_info", "traceback.extract_tb" ]
[((586, 600), 'email.message.EmailMessage', 'EmailMessage', ([], {}), '()\n', (598, 600), False, 'from email.message import EmailMessage\n'), ((1155, 1169), 'sys.exc_info', 'sys.exc_info', ([], {}), '()\n', (1167, 1169), False, 'import sys\n'), ((1187, 1221), 'traceback.extract_tb', 'traceback.extract_tb', (['ex_traceb...
# encoding: utf-8 """Shapes based on the `p:pic` element, including Picture and Movie.""" from __future__ import absolute_import, division, print_function, unicode_literals from pptx.dml.line import LineFormat from pptx.enum.shapes import MSO_SHAPE, MSO_SHAPE_TYPE, PP_MEDIA_TYPE from pptx.shapes.base import BaseShap...
[ "pptx.enum.shapes.MSO_SHAPE.validate", "pptx.dml.line.LineFormat" ]
[((2444, 2460), 'pptx.dml.line.LineFormat', 'LineFormat', (['self'], {}), '(self)\n', (2454, 2460), False, 'from pptx.dml.line import LineFormat\n'), ((5618, 5644), 'pptx.enum.shapes.MSO_SHAPE.validate', 'MSO_SHAPE.validate', (['member'], {}), '(member)\n', (5636, 5644), False, 'from pptx.enum.shapes import MSO_SHAPE, ...
############################ ############################ # Import libraries import numpy as np import pandas as pd import pickle as pkl import operator import warnings import csv warnings.filterwarnings('ignore') # Import a ProgressBar from progressbar import ProgressBar pbar = ProgressBar() #####################...
[ "csv.writer", "warnings.filterwarnings", "pandas.read_csv", "progressbar.ProgressBar", "operator.itemgetter" ]
[((182, 215), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (205, 215), False, 'import warnings\n'), ((284, 297), 'progressbar.ProgressBar', 'ProgressBar', ([], {}), '()\n', (295, 297), False, 'from progressbar import ProgressBar\n'), ((426, 514), 'pandas.read_csv', 'pd.r...
from datetime import datetime from .attack import Attack from .units import UnitsVelocity from .village import Village v_michal = Village(471, 451, 'michal ') v_czarny = Village(476, 456, 'czarny') v_kinia = Village(465, 451, 'kinia') v_bogu = Village(467, 447, 'djbogu') v_kacper = Village(477, 461, 'kacper') v_att...
[ "datetime.datetime" ]
[((436, 466), 'datetime.datetime', 'datetime', (['(2019)', '(2)', '(11)', '(7)', '(0)', '(1)'], {}), '(2019, 2, 11, 7, 0, 1)\n', (444, 466), False, 'from datetime import datetime\n'), ((539, 577), 'datetime.datetime', 'datetime', (['(2019)', '(2)', '(11)', '(7)', '(0)', '(1)', '(500000)'], {}), '(2019, 2, 11, 7, 0, 1, ...
import collections, functools, itertools from math import prod # Part one with open('input.txt') as f: packet_hex = f.read().strip() int2 = functools.partial(int, base=2) def hex_to_bin(packet_hex): packet_int = int(packet_hex, base=16) packet = bin(packet_int)[2:] packet = '0'*(4*len(packet_hex) - len...
[ "functools.partial", "math.prod", "collections.namedtuple", "itertools.islice" ]
[((145, 175), 'functools.partial', 'functools.partial', (['int'], {'base': '(2)'}), '(int, base=2)\n', (162, 175), False, 'import collections, functools, itertools\n'), ((2662, 2723), 'collections.namedtuple', 'collections.namedtuple', (['"""Operation"""', "('ID', 'symbol', 'func')"], {}), "('Operation', ('ID', 'symbol...
from pathlib import Path from .serial_sampler import SerialSampler class MultiChainSerialSampler(SerialSampler): """ Serial MCMC Sampler with multiple chains""" def __init__(self, counter): super().__init__(counter=counter) def default_indicator(self): return 0 def get_model(self, id...
[ "pathlib.Path.cwd" ]
[((1545, 1555), 'pathlib.Path.cwd', 'Path.cwd', ([], {}), '()\n', (1553, 1555), False, 'from pathlib import Path\n')]
import math from typing import Any import torch import torch.nn as nn from .. import BaseModel, register_model from cogdl.utils import get_activation, spmm from cogdl.trainers.ppr_trainer import PPRGoTrainer class LinearLayer(nn.Module): def __init__(self, in_features, out_features, bias=True): super(Li...
[ "torch.nn.init._calculate_fan_in_and_fan_out", "math.sqrt", "cogdl.utils.get_activation", "torch.nn.ModuleList", "torch.nn.init.uniform_", "torch.nn.math.sqrt", "torch.nn.functional.dropout", "torch.cat", "torch.nn.functional.linear", "cogdl.utils.spmm", "torch.Tensor", "torch.nn.Linear", "t...
[((1048, 1105), 'torch.nn.functional.linear', 'torch.nn.functional.linear', (['input', 'self.weight', 'self.bias'], {}), '(input, self.weight, self.bias)\n', (1074, 1105), False, 'import torch\n'), ((1425, 1440), 'torch.nn.ModuleList', 'nn.ModuleList', ([], {}), '()\n', (1438, 1440), True, 'import torch.nn as nn\n'), (...
from qtpy import QtCore, QtWidgets import qdarkstyle from pygments import styles class StyleWidget(QtWidgets.QWidget): app_style_changed = QtCore.Signal(str) highlight_style_changed = QtCore.Signal(str) def __init__(self, parent=None): super().__init__(parent) self.setup() def setup...
[ "pygments.styles.get_all_styles", "qtpy.QtWidgets.QStyledItemDelegate", "qtpy.QtWidgets.QStyleFactory.keys", "qtpy.QtWidgets.QApplication.instance", "qdarkstyle.load_stylesheet", "qtpy.QtWidgets.QFormLayout", "qtpy.QtCore.Signal", "qtpy.QtWidgets.QComboBox" ]
[((145, 163), 'qtpy.QtCore.Signal', 'QtCore.Signal', (['str'], {}), '(str)\n', (158, 163), False, 'from qtpy import QtCore, QtWidgets\n'), ((194, 212), 'qtpy.QtCore.Signal', 'QtCore.Signal', (['str'], {}), '(str)\n', (207, 212), False, 'from qtpy import QtCore, QtWidgets\n'), ((350, 373), 'qtpy.QtWidgets.QFormLayout', ...
#!/usr/bin/env python # encoding: utf-8 import pytest from tbone.db.models import create_collection from tbone.resources import verbs, Resource from tbone.testing.clients import * from tbone.testing.fixtures import * from .resources import * @pytest.mark.asyncio @pytest.fixture(scope='function') async def load_accou...
[ "tbone.db.models.create_collection", "pytest.raises", "pytest.fixture" ]
[((267, 299), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (281, 299), False, 'import pytest\n'), ((767, 799), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""'}), "(scope='function')\n", (781, 799), False, 'import pytest\n'), ((582, 639), 'tbone.db.mo...
# Copyright 2016 Google Inc. 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 applicable law or ...
[ "common.get_files_with_suffix", "os.makedirs", "os.path.dirname", "os.path.exists", "string.Template", "os.path.isfile", "collections.namedtuple", "common.cd_to_firebaseui_root", "os.path.splitext", "re.search" ]
[((983, 1026), 'collections.namedtuple', 'namedtuple', (['"""RelatedPaths"""', "['html', 'dom']"], {}), "('RelatedPaths', ['html', 'dom'])\n", (993, 1026), False, 'from collections import namedtuple\n'), ((1142, 1172), 'common.cd_to_firebaseui_root', 'common.cd_to_firebaseui_root', ([], {}), '()\n', (1170, 1172), False...
from selenium import webdriver class CrawService: def craw_html(self, url): option = webdriver.ChromeOptions() option.add_argument('headless') browser = webdriver.Chrome(executable_path='chromedriver.exe', options=option) browser.get(url) return browser
[ "selenium.webdriver.ChromeOptions", "selenium.webdriver.Chrome" ]
[((98, 123), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (121, 123), False, 'from selenium import webdriver\n'), ((182, 250), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'executable_path': '"""chromedriver.exe"""', 'options': 'option'}), "(executable_path='chromedriver.ex...
import matplotlib.pyplot as plt import numpy as np def polyfit(dates, levels, p): return np.poly1d(np.polyfit(np.array(dates)-min(dates), levels,p)),min(dates)
[ "numpy.array" ]
[((119, 134), 'numpy.array', 'np.array', (['dates'], {}), '(dates)\n', (127, 134), True, 'import numpy as np\n')]
import pygame from Entity import Entity class Player(Entity): # load in character sprite images left_list = [pygame.image.load("assets/character/walk/L1.png"), pygame.image.load("assets/character/walk/L2.png"),\ pygame.image.load("assets/character/walk/L3.png"), pygame.image.load("assets/chara...
[ "pygame.image.load" ]
[((119, 168), 'pygame.image.load', 'pygame.image.load', (['"""assets/character/walk/L1.png"""'], {}), "('assets/character/walk/L1.png')\n", (136, 168), False, 'import pygame\n'), ((170, 219), 'pygame.image.load', 'pygame.image.load', (['"""assets/character/walk/L2.png"""'], {}), "('assets/character/walk/L2.png')\n", (1...
"""Default Actions Class.""" from fmcapi.api_objects.apiclasstemplate import APIClassTemplate from .accesspolicies import AccessPolicies import logging class DefaultActions(APIClassTemplate): """The DefaultActions Object in the FMC.""" VALID_JSON_DATA = [] VALID_FOR_KWARGS = VALID_JSON_DATA + [ ...
[ "logging.warning", "logging.info", "logging.error", "logging.debug" ]
[((1005, 1061), 'logging.debug', 'logging.debug', (['"""In __init__() for DefaultActions class."""'], {}), "('In __init__() for DefaultActions class.')\n", (1018, 1061), False, 'import logging\n'), ((1521, 1580), 'logging.debug', 'logging.debug', (['"""In format_data() for DefaultActions class."""'], {}), "('In format_...
from Statistics.Mean import mean from Statistics.StdDev import stdDev import math def confidenceInterval(nums): length = len(nums) numsMean = mean(nums) stanDev = stdDev(nums) lowerBound = numsMean + 1.96 * (stanDev / math.sqrt(length)) upperBound = numsMean - 1.96 * (stanDev / math.sqrt(length)) ...
[ "Statistics.Mean.mean", "Statistics.StdDev.stdDev", "math.sqrt" ]
[((152, 162), 'Statistics.Mean.mean', 'mean', (['nums'], {}), '(nums)\n', (156, 162), False, 'from Statistics.Mean import mean\n'), ((177, 189), 'Statistics.StdDev.stdDev', 'stdDev', (['nums'], {}), '(nums)\n', (183, 189), False, 'from Statistics.StdDev import stdDev\n'), ((236, 253), 'math.sqrt', 'math.sqrt', (['lengt...
import torch import torch.nn as nn import numpy as np import pickle import os import argparse class LabelSmoothing(nn.Module): """ NLL loss with label smoothing. """ def __init__(self, smoothing=0.0): """ Constructor for the LabelSmoothing module. :param smoothing: label smoot...
[ "torch.mean", "pickle.dump", "torch.nn.BCEWithLogitsLoss", "os.makedirs", "os.path.isdir", "numpy.asarray", "os.path.exists", "transformers.AutoTokenizer.from_pretrained", "transformers.AutoModelForMaskedLM.from_pretrained", "torch.nn.functional.log_softmax", "torch.no_grad", "os.path.join", ...
[((2276, 2312), 'os.path.join', 'os.path.join', (['word_embeds', 'embed_pth'], {}), '(word_embeds, embed_pth)\n', (2288, 2312), False, 'import os\n'), ((2320, 2345), 'os.path.exists', 'os.path.exists', (['embed_pth'], {}), '(embed_pth)\n', (2334, 2345), False, 'import os\n'), ((3612, 3637), 'os.path.exists', 'os.path.e...
#!/usr/bin/env python import json from skimage.color import deltaE_ciede2000 # For reducing the colourset # requires scikit-image def rgb2one(r): return (float(r[0]/256),float(r[1]/256),float(r[2]/256)) ##with open("dmc.json") as w: #with open("limited.json") as w: with open("raw/color.json") as w: DMC ...
[ "json.load", "skimage.color.deltaE_ciede2000" ]
[((322, 334), 'json.load', 'json.load', (['w'], {}), '(w)\n', (331, 334), False, 'import json\n'), ((941, 965), 'skimage.color.deltaE_ciede2000', 'deltaE_ciede2000', (['io', 'jo'], {}), '(io, jo)\n', (957, 965), False, 'from skimage.color import deltaE_ciede2000\n')]
import nox nox.options.reuse_existing_virtualenvs = True nox.options.sessions = [] @nox.session(venv_backend="virtualenv", python="3.8") def dev(session): session.install("nox>=2021.6.12") # Dev dep, no upper bound session.install("-e", ".")
[ "nox.session" ]
[((86, 138), 'nox.session', 'nox.session', ([], {'venv_backend': '"""virtualenv"""', 'python': '"""3.8"""'}), "(venv_backend='virtualenv', python='3.8')\n", (97, 138), False, 'import nox\n')]
#!/usr/bin/python3 import json import falcon from database import Database class Travels: def on_get(self, req, resp): db = Database() travels = db.fetchall('travel') resp.body = json.dumps(travels) resp.content_type = 'application/json' resp.status = falcon.HTTP_200 ...
[ "database.Database", "json.dumps" ]
[((140, 150), 'database.Database', 'Database', ([], {}), '()\n', (148, 150), False, 'from database import Database\n'), ((213, 232), 'json.dumps', 'json.dumps', (['travels'], {}), '(travels)\n', (223, 232), False, 'import json\n'), ((508, 518), 'database.Database', 'Database', ([], {}), '()\n', (516, 518), False, 'from...
import dash import plotly.graph_objs as go from dash.dependencies import Input, Output import dash_table import dash_core_components as dcc import dash_html_components as html import pandas as pd import numpy as np def plot_parallel_coord_interactive(names, stdnames, means, std, col): names = ["x1", "x2", "x3"] ...
[ "pandas.DataFrame", "dash.Dash", "dash_html_components.Div", "dash.dependencies.Input", "dash_core_components.Graph", "numpy.random.rand", "plotly.graph_objs.Figure", "dash.dependencies.Output" ]
[((537, 556), 'dash.Dash', 'dash.Dash', (['__name__'], {}), '(__name__)\n', (546, 556), False, 'import dash\n'), ((393, 414), 'numpy.random.rand', 'np.random.rand', (['(10)', '(3)'], {}), '(10, 3)\n', (407, 414), True, 'import numpy as np\n'), ((1440, 1499), 'dash.dependencies.Output', 'Output', (['"""datatable-interac...
import urllib.parse from flask import render_template from common.dictionary import tonenum_pinyin, toneless_pinyin, variant_simp from common.hsk import hsk_words, get_hsk_level from common.pinyin import pinyin_numbers_to_tone_marks from common.util import create_context, identity, frequency_ordered_words, dictionary...
[ "common.util.frequency_ordered_words", "common.util.truncated_definition", "common.util.dictionary_link", "common.hsk.get_hsk_level", "flask.render_template" ]
[((1552, 1597), 'flask.render_template', 'render_template', (['"""homophones.html"""'], {}), "('homophones.html', **context)\n", (1567, 1597), False, 'from flask import render_template\n'), ((2885, 2907), 'common.util.dictionary_link', 'dictionary_link', (['hanzi'], {}), '(hanzi)\n', (2900, 2907), False, 'from common.u...
# Generated by Django 3.2.7 on 2021-09-05 12:30 import books.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0001_initial'), ] operations = [ migrations.AddField( model_name='books', name='image',...
[ "django.db.models.ImageField" ]
[((339, 426), 'django.db.models.ImageField', 'models.ImageField', ([], {'blank': '(True)', 'null': '(True)', 'upload_to': 'books.models.upload_image_book'}), '(blank=True, null=True, upload_to=books.models.\n upload_image_book)\n', (356, 426), False, 'from django.db import migrations, models\n')]
from django.urls import path from user import views app_name = 'user' urlpatterns = [ path('create/', views.CreateUserView.as_view(), name='create'), path('authenticate/', views.CreateTokenView.as_view(), name='authenticate'), path('my_account/', views.ManageUserView.as_view(), name='my_account') ]
[ "user.views.CreateTokenView.as_view", "user.views.ManageUserView.as_view", "user.views.CreateUserView.as_view" ]
[((109, 139), 'user.views.CreateUserView.as_view', 'views.CreateUserView.as_view', ([], {}), '()\n', (137, 139), False, 'from user import views\n'), ((183, 214), 'user.views.CreateTokenView.as_view', 'views.CreateTokenView.as_view', ([], {}), '()\n', (212, 214), False, 'from user import views\n'), ((262, 292), 'user.vi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('census_paleo', '0002_auto_20160817_1334'), ] operations = [ migrations.RenameField( model_name='taxonomy', ...
[ "django.db.models.CharField", "django.db.migrations.RenameField" ]
[((256, 345), 'django.db.migrations.RenameField', 'migrations.RenameField', ([], {'model_name': '"""taxonomy"""', 'old_name': '"""genusName"""', 'new_name': '"""genus"""'}), "(model_name='taxonomy', old_name='genusName',\n new_name='genus')\n", (278, 345), False, 'from django.db import models, migrations\n'), ((398,...
# This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2019 DataONE # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
[ "copy.deepcopy" ]
[((8028, 8051), 'copy.deepcopy', 'copy.deepcopy', (['url_dict'], {}), '(url_dict)\n', (8041, 8051), False, 'import copy\n')]
from setuptools import setup, find_packages setup(name='bjointsp', version='2.4.1', license='Apache 2.0', description='B-JointSP provides algorithms for joint scaling and placement of uni- or bidirectional network services', url='https://github.com/CN-UPB/B-JointSP', author='<NAME>', author_ema...
[ "setuptools.find_packages" ]
[((375, 395), 'setuptools.find_packages', 'find_packages', (['"""src"""'], {}), "('src')\n", (388, 395), False, 'from setuptools import setup, find_packages\n')]
# coding: utf-8 """ ThingsBoard REST API ThingsBoard Professional Edition IoT platform REST API documentation. # noqa: E501 OpenAPI spec version: 3.3.3PAAS-RC1 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
[ "six.iteritems" ]
[((14556, 14589), 'six.iteritems', 'six.iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (14569, 14589), False, 'import six\n')]
from typing import List import dash_bootstrap_components as dbc import plotly.graph_objs as go from dash import dcc def create_graph_card_vertical( titles: List[str], graphs: List[go.Figure] ) -> dbc.Container: """Create a List of graphs in Cards, places vertically. Parameters ---------- titles ...
[ "dash.dcc.Graph", "dash_bootstrap_components.CardHeader", "dash_bootstrap_components.Container" ]
[((1120, 1142), 'dash_bootstrap_components.Container', 'dbc.Container', (['content'], {}), '(content)\n', (1133, 1142), True, 'import dash_bootstrap_components as dbc\n'), ((778, 799), 'dash_bootstrap_components.CardHeader', 'dbc.CardHeader', (['title'], {}), '(title)\n', (792, 799), True, 'import dash_bootstrap_compon...
import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from kgextension.endpoints import DBpedia from kgextension.linking import pattern_linker, dbpedia_spotlight_linker, dbpedia_lookup_linker, label_linker, sameas_linker class PatternLinker(BaseEstimator, TransformerMixin): ...
[ "kgextension.linking.label_linker", "kgextension.linking.dbpedia_lookup_linker", "kgextension.linking.sameas_linker", "kgextension.linking.dbpedia_spotlight_linker", "kgextension.linking.pattern_linker" ]
[((842, 1063), 'kgextension.linking.pattern_linker', 'pattern_linker', (['X'], {'column': 'self.column', 'new_attribute_name': 'self.new_attribute_name', 'progress': 'self.progress', 'base_url': 'self.base_url', 'url_encoding': 'self.url_encoding', 'DBpedia_link_format': 'self.DBpedia_link_format'}), '(X, column=self.c...
# -*- coding: utf-8 -*- import re from ..base.simple_decrypter import SimpleDecrypter class CloudzillaToFolder(SimpleDecrypter): __name__ = "CloudzillaToFolder" __type__ = "decrypter" __version__ = "0.11" __status__ = "testing" __pyload_version__ = "0.5" __pattern__ = r"http://(?:www\.)?cl...
[ "re.search" ]
[((1143, 1186), 're.search', 're.search', (['self.PASSWORD_PATTERN', 'self.data'], {}), '(self.PASSWORD_PATTERN, self.data)\n', (1152, 1186), False, 'import re\n'), ((1310, 1353), 're.search', 're.search', (['self.PASSWORD_PATTERN', 'self.data'], {}), '(self.PASSWORD_PATTERN, self.data)\n', (1319, 1353), False, 'import...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def set_user_tz_null(apps, schema_editor): UserProfile = apps.get_model('dcbase', 'UserProfile') for profile in UserProfile.objects.all(): profile.timezone = None profile.save() class Mig...
[ "django.db.migrations.RunPython" ]
[((459, 497), 'django.db.migrations.RunPython', 'migrations.RunPython', (['set_user_tz_null'], {}), '(set_user_tz_null)\n', (479, 497), False, 'from django.db import models, migrations\n')]
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
[ "unittest.main", "pandas.DataFrame", "io.StringIO", "skbio.util.get_data_path", "skbio.io.format.ordination._ordination_sniffer", "skbio.util.assert_ordination_results_equal", "skbio.OrdinationResults", "pandas.Series", "numpy.testing.assert_equal", "skbio.io.format.ordination._ordination_to_ordin...
[((11780, 11786), 'unittest.main', 'main', ([], {}), '()\n', (11784, 11786), False, 'from unittest import TestCase, main\n'), ((3726, 3781), 'pandas.Series', 'pd.Series', (['[0.0961330159181, 0.0409418140138]', 'axes_ids'], {}), '([0.0961330159181, 0.0409418140138], axes_ids)\n', (3735, 3781), True, 'import pandas as p...
from pathlib import Path import numpy as np import pandas as pd import pytest import xarray as xr from xclim.core import missing from xclim.core.calendar import convert_calendar from xclim.testing import open_dataset K2C = 273.15 class TestMissingAnyFills: def test_missing_days(self, tas_series): a = n...
[ "pandas.date_range", "xclim.core.missing.at_least_n_valid", "numpy.testing.assert_array_equal", "numpy.zeros", "xclim.core.calendar.convert_calendar", "xclim.core.missing.missing_wmo", "numpy.ones", "xclim.core.missing.missing_pct", "pathlib.Path", "xclim.core.missing.missing_any", "numpy.arange...
[((2546, 2615), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""calendar"""', "('default', 'noleap', '360_day')"], {}), "('calendar', ('default', 'noleap', '360_day'))\n", (2569, 2615), False, 'import pytest\n'), ((319, 335), 'numpy.arange', 'np.arange', (['(360.0)'], {}), '(360.0)\n', (328, 335), True, 'im...
import sys from argparse import ArgumentParser, Namespace from typing import * import pyperclip # type: ignore from astroid import AstroidSyntaxError from pygolf.pygolfer import Pygolfer def statistics(old_code: str, new_code: str) -> str: return f"""----- Saved {len(old_code) - len(new_code)} characters The r...
[ "pyperclip.copy", "pygolf.pygolfer.Pygolfer", "argparse.ArgumentParser", "pyperclip.paste" ]
[((424, 434), 'pygolf.pygolfer.Pygolfer', 'Pygolfer', ([], {}), '()\n', (432, 434), False, 'from pygolf.pygolfer import Pygolfer\n'), ((1884, 1943), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""PyGolf shortens a Python code"""'}), "(description='PyGolf shortens a Python code')\n", (1898, 1943),...
import os import sys import json import time import random import argparse import numpy as np import copy import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Variable from torchvision import datasets, transforms import torchvision.models as mode...
[ "dataset.poisoned_cifar10.PoisonedCIFAR10", "torchvision.models.resnet18", "models.adv_resnet.resnet20s", "dataset.poisoned_rimagenet.RestrictedImageNet", "numpy.random.seed", "argparse.ArgumentParser", "torch.utils.data.DataLoader", "torch.manual_seed", "torch.load", "dataset.poisoned_cifar100.Po...
[((919, 984), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""PyTorch pyhessian analysis"""'}), "(description='PyTorch pyhessian analysis')\n", (942, 984), False, 'import argparse\n'), ((8275, 8296), 'torch.nn.CrossEntropyLoss', 'nn.CrossEntropyLoss', ([], {}), '()\n', (8294, 8296), True,...
import unittest from vessel.parser import DICOMParser class TestParser(unittest.TestCase): def test_dicom_parser(self): dicom_parser = DICOMParser() self.assertEqual(dicom_parser.Pixel('data/dicoms/SCD0000201/126.dcm')['width'], 256) #print(dicom_parser.Coords('data/contourfiles/SC-HF-I-...
[ "unittest.main", "vessel.parser.DICOMParser" ]
[((402, 417), 'unittest.main', 'unittest.main', ([], {}), '()\n', (415, 417), False, 'import unittest\n'), ((151, 164), 'vessel.parser.DICOMParser', 'DICOMParser', ([], {}), '()\n', (162, 164), False, 'from vessel.parser import DICOMParser\n')]
""" Copyright 2020 The OneFlow 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 applicable law or agr...
[ "oneflow.python.framework.distribute.broadcast", "oneflow.scope.namespace", "oneflow.constant_initializer", "oneflow.get_variable", "oneflow.user_op_builder", "oneflow.python.oneflow_export.oneflow_export" ]
[((934, 964), 'oneflow.python.oneflow_export.oneflow_export', 'oneflow_export', (['"""layers.prelu"""'], {}), "('layers.prelu')\n", (948, 964), False, 'from oneflow.python.oneflow_export import oneflow_export\n'), ((1307, 1334), 'oneflow.python.framework.distribute.broadcast', 'distribute_util.broadcast', ([], {}), '()...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may...
[ "pandas.DataFrame" ]
[((1538, 1559), 'pandas.DataFrame', 'DataFrame', (['table.data'], {}), '(table.data)\n', (1547, 1559), False, 'from pandas import DataFrame\n')]
import datetime import logging import numpy as np from django.utils import timezone from plotly.offline import plot from plotly.graph_objs import Layout, Histogram, Histogram2d, Scatter from plotly.graph_objs.layout import XAxis, Margin import plotly.figure_factory as ff logger = logging.getLogger(__name__) COLOR_...
[ "plotly.graph_objs.layout.Margin", "numpy.poly1d", "numpy.polyfit", "plotly.graph_objs.Scatter", "django.utils.timezone.now", "plotly.graph_objs.layout.XAxis", "plotly.offline.plot", "numpy.histogram", "datetime.timedelta", "numpy.linspace", "datetime.datetime.fromtimestamp", "plotly.figure_fa...
[((285, 312), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (302, 312), False, 'import logging\n'), ((533, 570), 'numpy.convolve', 'np.convolve', (['values', 'weights', '"""valid"""'], {}), "(values, weights, 'valid')\n", (544, 570), True, 'import numpy as np\n'), ((1258, 1329), 'numpy.l...
# -*- coding: utf-8 -*- """Methods suggested to move in psychrolib (TEMPORALLY HERE).""" from psychrolib import isIP, MIN_HUM_RATIO, R_DA_IP, R_DA_SI # TODO Remove these when psychrolib 2.3.0 is released: # Zero degree Fahrenheit (°F) expressed as degree Rankine (°R) ZERO_FAHRENHEIT_AS_RANKINE = 459.67 # Zero degree C...
[ "psychrolib.isIP" ]
[((2269, 2275), 'psychrolib.isIP', 'isIP', ([], {}), '()\n', (2273, 2275), False, 'from psychrolib import isIP, MIN_HUM_RATIO, R_DA_IP, R_DA_SI\n')]
import requests import requests,time,os.path from PIL import Image from io import BytesIO url = 'https://www.forofosdelrunning.com/fotosdecarreraspopulares/wp-content/gallery/fotos-carrera-popular-villa-de-aranjuez-2018/Fotos-Carrera-Popular-Villa-de-Aranjuez-2018_0005.jpg' #840 url = 'http://www.forofosdelrunning.com...
[ "io.BytesIO", "requests.get", "time.sleep" ]
[((1430, 1447), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (1442, 1447), False, 'import requests, time, os.path\n'), ((1547, 1562), 'time.sleep', 'time.sleep', (['(300)'], {}), '(300)\n', (1557, 1562), False, 'import requests, time, os.path\n'), ((1477, 1502), 'io.BytesIO', 'BytesIO', (['response.content...
import json from ipaddress import IPv4Address, IPv4Network from django.shortcuts import redirect from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.conf import settings as project_settings from .base import BackendBase class CoinbaseBackend(BackendBase):...
[ "django.core.urlresolvers.reverse", "coinbase.wallet.client.Client", "ipaddress.IPv4Address", "django.utils.translation.ugettext_lazy", "ipaddress.IPv4Network" ]
[((376, 389), 'django.utils.translation.ugettext_lazy', '_', (['"""Coinbase"""'], {}), "('Coinbase')\n", (377, 389), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((417, 443), 'django.utils.translation.ugettext_lazy', '_', (['"""Bitcoin with CoinBase"""'], {}), "('Bitcoin with CoinBase')\n", (418,...
#!/usr/bin/python3 import os import time import subprocess from pydbus import SystemBus bus = SystemBus() sensor_proxy = bus.get('net.hadess.SensorProxy') def get_pointer_devices(): devices = subprocess.check_output("xinput --list --name-only", shell=True, ...
[ "subprocess.check_output", "pydbus.SystemBus", "time.sleep" ]
[((96, 107), 'pydbus.SystemBus', 'SystemBus', ([], {}), '()\n', (105, 107), False, 'from pydbus import SystemBus\n'), ((200, 291), 'subprocess.check_output', 'subprocess.check_output', (['"""xinput --list --name-only"""'], {'shell': '(True)', 'executable': '"""/bin/sh"""'}), "('xinput --list --name-only', shell=True, e...
from psycopg2.extensions import AsIs import psycopg2.extras import numpy as np from sklearn import svm # Connect to Postgres connection = psycopg2.connect(dbname='ocr-classify', user='john', host='localhost', port='5432') #cursor = connection.cursor(cursor_factory=psycopg2.extras.RealDictCursor) cursor = connection.cu...
[ "numpy.array", "sklearn.svm.SVC" ]
[((1805, 1835), 'numpy.array', 'np.array', (['[d[3] for d in data]'], {}), '([d[3] for d in data])\n', (1813, 1835), True, 'import numpy as np\n'), ((1998, 2069), 'sklearn.svm.SVC', 'svm.SVC', ([], {'gamma': '(1)', 'C': '(100)', 'probability': '(True)', 'cache_size': '(500)', 'kernel': '"""rbf"""'}), "(gamma=1, C=100, ...
from nose_focus import focus # enable with @focus import unittest from core.arboreal_tree import ArborealTree from core.dataset import Metadata, Dataset from loguru import logger logger.disable("core") # Toggle to enable/disable logging in core module class TestArborealTree(unittest.TestCase): def setUp(self...
[ "core.arboreal_tree.ArborealTree", "loguru.logger.disable" ]
[((183, 205), 'loguru.logger.disable', 'logger.disable', (['"""core"""'], {}), "('core')\n", (197, 205), False, 'from loguru import logger\n'), ((1048, 1062), 'core.arboreal_tree.ArborealTree', 'ArborealTree', ([], {}), '()\n', (1060, 1062), False, 'from core.arboreal_tree import ArborealTree\n'), ((1616, 1630), 'core....
#CIRC04 control a servo Version two import board import pulseio import adafruit_motor.servo pwm = pulseio.PWMOut(board.D6, frequency=50) servo = adafruit_motor.servo.Servo(pwm, min_pulse=750, max_pulse=2250) while True: for angle in range(0, 180, 45): # 0 - 180 degrees, 5 degrees at a time. print(angle) ...
[ "pulseio.PWMOut" ]
[((101, 139), 'pulseio.PWMOut', 'pulseio.PWMOut', (['board.D6'], {'frequency': '(50)'}), '(board.D6, frequency=50)\n', (115, 139), False, 'import pulseio\n')]
# -*- coding:utf-8 -*- import os import time import random from django.core.files.storage import FileSystemStorage from django.conf import settings class ImageStorage(FileSystemStorage): """ 自定义文件储存 修改文件名字 """ def __init__(self, location=settings.MEDIA_ROOT, base_url=settings.MEDIA_URL): ...
[ "random.randint", "os.path.dirname", "time.strftime", "os.path.splitext", "os.path.join" ]
[((568, 589), 'os.path.dirname', 'os.path.dirname', (['name'], {}), '(name)\n', (583, 589), False, 'import os\n'), ((638, 665), 'time.strftime', 'time.strftime', (['"""%Y%m%H%M%S"""'], {}), "('%Y%m%H%M%S')\n", (651, 665), False, 'import time\n'), ((788, 825), 'os.path.join', 'os.path.join', (['d', '(file_name + file_ex...
"""Object that deals with the model learning.""" import os import time import hjson import pickle import numpy as np import tensorflow as tf from typing import List, Dict from c3.optimizers.optimizer import Optimizer from c3.utils.utils import log_setup from c3.libraries.algorithms import algorithms as alg_lib from c...
[ "time.asctime", "os.path.abspath", "tensorflow.constant", "c3.utils.utils.log_setup", "tensorflow.stack", "pickle.load", "numpy.array", "tensorflow.GradientTape", "c3.libraries.estimators.dv_g_LL_prime", "c3.libraries.estimators.g_LL_prime_combined" ]
[((3932, 3968), 'c3.utils.utils.log_setup', 'log_setup', (['self.__dir_path', 'run_name'], {}), '(self.__dir_path, run_name)\n', (3941, 3968), False, 'from c3.utils.utils import log_setup\n'), ((7880, 7923), 'numpy.array', 'np.array', (["data_set['result_stds'][:seqs_pp]"], {}), "(data_set['result_stds'][:seqs_pp])\n",...
""" Code is generated by ucloud-model, DO NOT EDIT IT. """ import typing from ucloud.core.client import Client from ucloud.services.udpn.schemas import apis class UDPNClient(Client): def __init__( self, config: dict, transport=None, middleware=None, logger=None ): super(UDPNClient, self).__...
[ "ucloud.services.udpn.schemas.apis.GetUDPNUpgradePriceRequestSchema", "ucloud.services.udpn.schemas.apis.DescribeUDPNRequestSchema", "ucloud.services.udpn.schemas.apis.AllocateUDPNResponseSchema", "ucloud.services.udpn.schemas.apis.AllocateUDPNRequestSchema", "ucloud.services.udpn.schemas.apis.ReleaseUDPNRe...
[((1683, 1715), 'ucloud.services.udpn.schemas.apis.AllocateUDPNRequestSchema', 'apis.AllocateUDPNRequestSchema', ([], {}), '()\n', (1713, 1715), False, 'from ucloud.services.udpn.schemas import apis\n'), ((1899, 1932), 'ucloud.services.udpn.schemas.apis.AllocateUDPNResponseSchema', 'apis.AllocateUDPNResponseSchema', ([...
''' Tests Repeats analysis class. ''' from nose.tools import assert_equal from coral import analysis, DNA def test_find_repeats(): input_sequence = DNA('atgatgccccgatagtagtagtag') expected = [('ATG', 2), ('GTA', 3), ('GAT', 2), ('AGT', 3), ('CCC', 2), ('TAG', 4)] output = analysis.repea...
[ "coral.DNA", "nose.tools.assert_equal", "coral.analysis.repeats" ]
[((156, 187), 'coral.DNA', 'DNA', (['"""atgatgccccgatagtagtagtag"""'], {}), "('atgatgccccgatagtagtagtag')\n", (159, 187), False, 'from coral import analysis, DNA\n'), ((306, 341), 'coral.analysis.repeats', 'analysis.repeats', (['input_sequence', '(3)'], {}), '(input_sequence, 3)\n', (322, 341), False, 'from coral impor...
import argparse import json import math import random import string import pandas as pd from faker import Faker def main(): parser = argparse.ArgumentParser() parser.add_argument('--config', help='Path to json config file', dest='config_file_path', required=True) parser.add_argument('--output', ...
[ "pandas.DataFrame", "json.load", "argparse.ArgumentParser", "faker.Faker", "random.choice" ]
[((147, 172), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (170, 172), False, 'import argparse\n'), ((733, 762), 'faker.Faker', 'Faker', (["config['localization']"], {}), "(config['localization'])\n", (738, 762), False, 'from faker import Faker\n'), ((790, 804), 'pandas.DataFrame', 'pd.DataFr...
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function from __future__ import division import torch import math from torch import nn from torch.nn.modules.utils import _pair from functions.deform_psroi_pooling_func import DeformRoIPoolingFunction class DeformRoIPooling(nn....
[ "torch.chunk", "torch.nn.ReLU", "torch.cat", "torch.sigmoid", "torch.nn.Linear", "functions.deform_psroi_pooling_func.DeformRoIPoolingFunction.apply" ]
[((1164, 1365), 'functions.deform_psroi_pooling_func.DeformRoIPoolingFunction.apply', 'DeformRoIPoolingFunction.apply', (['input', 'rois', 'offset', 'self.spatial_scale', 'self.pooled_size', 'self.output_dim', 'self.no_trans', 'self.group_size', 'self.part_size', 'self.sample_per_part', 'self.trans_std'], {}), '(input,...
#!/usr/bin/env python import setuptools setuptools.setup( name="fmtlatex", url="https://github.com/goerz/fmtlatex", author="<NAME>", author_email="<EMAIL>", description="Format LaTeX source code", install_requires=[ 'Click', ], extras_require={'dev': ['pytest',]}, py_module...
[ "setuptools.setup" ]
[((42, 714), 'setuptools.setup', 'setuptools.setup', ([], {'name': '"""fmtlatex"""', 'url': '"""https://github.com/goerz/fmtlatex"""', 'author': '"""<NAME>"""', 'author_email': '"""<EMAIL>"""', 'description': '"""Format LaTeX source code"""', 'install_requires': "['Click']", 'extras_require': "{'dev': ['pytest']}", 'py...
# Copyright 2021 Google LLC # # 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 applicable law or agreed to in writing, ...
[ "six.add_metaclass" ]
[((861, 891), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (878, 891), False, 'import six\n'), ((1442, 1472), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (1459, 1472), False, 'import six\n')]
from js9 import j j.tools.prefab.local.bash.locale_check() import click @click.command() @click.option('--influx-host', default='127.0.0.1', help='address of the influxdb server') @click.option('--influx-port', default=8086, help='port of the http interface of influxdb server') @click.option('--influx-login', default=...
[ "js9.j.clients.influxdb.get", "click.option", "click.command", "js9.j.tools.realityprocess.influxpump", "js9.j.tools.prefab.local.bash.locale_check" ]
[((18, 58), 'js9.j.tools.prefab.local.bash.locale_check', 'j.tools.prefab.local.bash.locale_check', ([], {}), '()\n', (56, 58), False, 'from js9 import j\n'), ((74, 89), 'click.command', 'click.command', ([], {}), '()\n', (87, 89), False, 'import click\n'), ((91, 185), 'click.option', 'click.option', (['"""--influx-hos...
from __future__ import unicode_literals import random import string from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) birthday = models.DateTimeField(auto_now_add=True) ...
[ "django.db.models.ManyToManyField", "django.db.models.TimeField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.EmailField", "django.db.models.DecimalField", "django.db.models.DateField", "django.db.models.DateTimeField" ]
[((230, 262), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (246, 262), False, 'from django.db import models\n'), ((278, 317), 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), '(auto_now_add=True)\n', (298, 317), False, ...
from turtle import TNavigator, TPen from argparse import ArgumentError class PdfTurtle(TNavigator, TPen): """ Helper class to include turtle graphics within a PDF document. """ class _Screen(object): def __init__(self, canvas): self.cv = canvas def __init__(self, canva...
[ "turtle.TPen.__init__", "turtle.TNavigator.__init__", "argparse.ArgumentError" ]
[((427, 452), 'turtle.TNavigator.__init__', 'TNavigator.__init__', (['self'], {}), '(self)\n', (446, 452), False, 'from turtle import TNavigator, TPen\n'), ((461, 480), 'turtle.TPen.__init__', 'TPen.__init__', (['self'], {}), '(self)\n', (474, 480), False, 'from turtle import TNavigator, TPen\n'), ((3180, 3232), 'argpa...
from CTFd import create_app app = create_app() app.run(debug=False, threaded=True, host="0.0.0.0", port=4000)
[ "CTFd.create_app" ]
[((35, 47), 'CTFd.create_app', 'create_app', ([], {}), '()\n', (45, 47), False, 'from CTFd import create_app\n')]
import pyensembl import re from itertools import product import pandas as pd import numpy as np class GFTranscript(pyensembl.Transcript): def __init__(self, transcript_id: object = None, transcript_name: object = None, contig: object = None, star...
[ "pandas.DataFrame", "numpy.log2", "numpy.full", "itertools.product" ]
[((3520, 3547), 'numpy.log2', 'np.log2', (['df_codon_frequency'], {}), '(df_codon_frequency)\n', (3527, 3547), True, 'import numpy as np\n'), ((6750, 6779), 'pandas.DataFrame', 'pd.DataFrame', ([], {'data': 'dict_Kozak'}), '(data=dict_Kozak)\n', (6762, 6779), True, 'import pandas as pd\n'), ((9163, 9205), 'pandas.DataF...
""" This script concurrently builds and migrates instances. This can be useful when troubleshooting race-conditions in virt-layer code. Expects: novarc to be sourced in the environment Helper Script for Xen Dom0: # cat /tmp/destroy_cache_vdis #!/bin/bash xe vdi-list | grep "Glance Image" -C1 | grep ...
[ "subprocess.Popen", "argparse.ArgumentParser", "time.time", "subprocess.call", "multiprocessing.Pool", "sys.stderr.write", "sys.exit" ]
[((572, 604), 'subprocess.call', 'subprocess.call', (['cmd'], {'shell': '(True)'}), '(cmd, shell=True)\n', (587, 604), False, 'import subprocess\n'), ((1432, 1489), 'subprocess.Popen', 'subprocess.Popen', (['cmd'], {'stdout': 'subprocess.PIPE', 'shell': '(True)'}), '(cmd, stdout=subprocess.PIPE, shell=True)\n', (1448, ...
import asyncio from .packet import Packet class Socket: """A socket class with asyncio.""" def __init__(self, host, port, loop=None): self.loop = loop or asyncio.get_event_loop() self.__socket = asyncio.open_connection(host, port, loop=self.loop) self._reader:asyncio.StreamReader = None self._writer:asynci...
[ "asyncio.open_connection", "asyncio.get_event_loop" ]
[((204, 255), 'asyncio.open_connection', 'asyncio.open_connection', (['host', 'port'], {'loop': 'self.loop'}), '(host, port, loop=self.loop)\n', (227, 255), False, 'import asyncio\n'), ((160, 184), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (182, 184), False, 'import asyncio\n')]
from enum import Enum from queue import Queue import sys import sched import time import requests from app.common.cluster_service import ClusterService from app.project_type.project_type import SetupFailureError from app.slave.subjob_executor import SubjobExecutor from app.util import analytics, log, util from app.ut...
[ "app.util.network.Network", "app.util.safe_thread.SafeThread", "app.slave.subjob_executor.SubjobExecutor", "app.util.secret.Secret.get", "app.util.analytics.record_event", "app.util.exceptions.BadRequestError", "time.sleep", "app.util.util.create_project_type", "sched.scheduler", "app.util.unhandl...
[((1439, 1463), 'app.util.log.get_logger', 'log.get_logger', (['__name__'], {}), '(__name__)\n', (1453, 1463), False, 'from app.util import analytics, log, util\n'), ((1496, 1524), 'queue.Queue', 'Queue', ([], {'maxsize': 'num_executors'}), '(maxsize=num_executors)\n', (1501, 1524), False, 'from queue import Queue\n'),...
# Copyright 1999-2018 Alibaba Group Holding Ltd. # # 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 applicable law or a...
[ "logging.debug", "json.loads", "requests.adapters.HTTPAdapter", "requests.Session", "base64.b64decode", "time.time", "time.sleep", "json.dumps", "logging.getLogger" ]
[((813, 840), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (830, 840), False, 'import logging\n'), ((1039, 1057), 'requests.Session', 'requests.Session', ([], {}), '()\n', (1055, 1057), False, 'import requests\n'), ((1663, 1684), 'json.loads', 'json.loads', (['resp.text'], {}), '(resp.t...
import httpretty import re from stream_django.feed_manager import feed_manager from stream_django.tests import Tweet import unittest api_url = re.compile(r'(us-east-api.)?stream-io-api.com(/api)?/*.') class ManagerTestCase(unittest.TestCase): def setUp(self): feed_manager.enable_model_tracking() d...
[ "stream_django.feed_manager.feed_manager.get_news_feeds", "stream_django.feed_manager.feed_manager.follow_user", "httpretty.register_uri", "re.compile", "stream_django.feed_manager.feed_manager.enable_model_tracking", "httpretty.last_request", "stream_django.feed_manager.feed_manager.get_actor_feed", ...
[((145, 201), 're.compile', 're.compile', (['"""(us-east-api.)?stream-io-api.com(/api)?/*."""'], {}), "('(us-east-api.)?stream-io-api.com(/api)?/*.')\n", (155, 201), False, 'import re\n'), ((277, 313), 'stream_django.feed_manager.feed_manager.enable_model_tracking', 'feed_manager.enable_model_tracking', ([], {}), '()\n...
""" Controller para fornecer respostas a classificações de modelos treinados """ from flask_restful_swagger_2 import swagger from flask_restful import Resource from flask import request from model.mlmodel.supervisionado.classificacao import Classificacao # pylint: disable=R0903 class ClassificacaoResource(Resource): ...
[ "flask_restful_swagger_2.swagger.doc", "model.mlmodel.supervisionado.classificacao.Classificacao" ]
[((473, 1364), 'flask_restful_swagger_2.swagger.doc', 'swagger.doc', (["{'tags': ['classe_predicao'], 'description':\n 'Obtém a classificação de um ou mais registros enviados no body',\n 'parameters': [{'name': 'model_id', 'description':\n 'ID do modelo treinado', 'required': True, 'type': 'string', 'in':\n ...
from flask import Flask from config import Config from flask_mail import Mail from flask_bootstrap import Bootstrap from flask_login import LoginManager, login_user, login_required, logout_user,current_user from flask_sqlalchemy import SQLAlchemy # from flask_bootstraps import Bootstrap bootstrap = Bootstrap() app = ...
[ "flask.Flask", "flask_mail.Mail", "flask_sqlalchemy.SQLAlchemy", "flask_login.LoginManager", "flask_bootstrap.Bootstrap" ]
[((301, 312), 'flask_bootstrap.Bootstrap', 'Bootstrap', ([], {}), '()\n', (310, 312), False, 'from flask_bootstrap import Bootstrap\n'), ((320, 335), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (325, 335), False, 'from flask import Flask\n'), ((375, 392), 'flask_login.LoginManager', 'LoginManager', (['a...
# Copyright 2019 <NAME> # # 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 applicable law or agreed to in writin...
[ "setuptools.find_packages" ]
[((1184, 1210), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (1208, 1210), False, 'import setuptools\n')]
import wrapt import functools from collections import defaultdict import logging log = logging.getLogger(__name__) DEFAULT_REGISTRATION_NAME = 'base' MIXIN_CLASSS = defaultdict(list) def register_proxy_mixin(cls=None, *, name=DEFAULT_REGISTRATION_NAME): if cls == None: return functools.partial(register...
[ "collections.defaultdict", "functools.partial", "functools.lru_cache", "logging.getLogger" ]
[((88, 115), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (105, 115), False, 'import logging\n'), ((168, 185), 'collections.defaultdict', 'defaultdict', (['list'], {}), '(list)\n', (179, 185), False, 'from collections import defaultdict\n'), ((471, 492), 'functools.lru_cache', 'functool...
import asyncio import pytest @pytest.mark.asyncio async def test_set_key_can_be_get(cache): await cache.set("test", "Ok!") assert await cache.get("test") == "Ok!" @pytest.mark.asyncio async def test_set_key_can_be_dict(cache): await cache.set("test", {"hello": "world"}) assert await cache.get("test...
[ "pytest.raises", "asyncio.sleep" ]
[((1072, 1088), 'asyncio.sleep', 'asyncio.sleep', (['(2)'], {}), '(2)\n', (1085, 1088), False, 'import asyncio\n'), ((1575, 1591), 'asyncio.sleep', 'asyncio.sleep', (['(2)'], {}), '(2)\n', (1588, 1591), False, 'import asyncio\n'), ((2308, 2324), 'asyncio.sleep', 'asyncio.sleep', (['(2)'], {}), '(2)\n', (2321, 2324), Fa...
# Generated by Django 3.0.4 on 2021-02-02 21:12 import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
[ "django.db.migrations.swappable_dependency", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.AutoField", "django.db.models.DateTimeField" ]
[((256, 313), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (287, 313), False, 'from django.db import migrations, models\n'), ((543, 636), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
##################### # IMPORT STATEMENTS # ##################### import pygame assert pygame.init() == (6, 0) from pygame.locals import * from random import random, randint import webbrowser from time import sleep ########## # IMAGES # ########## load = pygame.image.load screen1 = load("img/screen1.png") instru...
[ "webbrowser.open", "pygame.event.get", "pygame.display.set_mode", "pygame.draw.rect", "pygame.init", "pygame.display.flip", "pygame.mouse.get_pos", "pygame.font.Font", "pygame.display.quit", "pygame.display.set_caption", "pygame.event.clear" ]
[((959, 1011), 'pygame.font.Font', 'pygame.font.Font', (['"""img/PressStart2P-Regular.ttf"""', '(30)'], {}), "('img/PressStart2P-Regular.ttf', 30)\n", (975, 1011), False, 'import pygame\n'), ((1162, 1198), 'pygame.display.set_mode', 'pygame.display.set_mode', (['(1000, 500)'], {}), '((1000, 500))\n', (1185, 1198), Fals...