code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from dataclasses import dataclass from datetime import date, datetime import mysql.connector from mock import call from mysql.connector import DatabaseError, Error, InterfaceError from pytest import fixture, mark, raises from nova_api.entity import Entity from nova_api.persistence.mysql_helper import MySQLHelper @d...
[ "mock.call.connect", "mock.call.get_instance", "pytest.mark.parametrize", "pytest.raises", "nova_api.persistence.mysql_helper.MySQLHelper" ]
[((5170, 5249), 'pytest.mark.parametrize', 'mark.parametrize', (['"""results, returned"""', '[([], None), ([[1, 2, 3]], [[1, 2, 3]])]'], {}), "('results, returned', [([], None), ([[1, 2, 3]], [[1, 2, 3]])])\n", (5186, 5249), False, 'from pytest import fixture, mark, raises\n'), ((5871, 5935), 'pytest.mark.parametrize',...
#when name.py is run __name__ should equal to __main__ assert __name__ == "__main__" from import_name import import_func #__name__ should be set to import_func import_func() assert __name__ == "__main__"
[ "import_name.import_func" ]
[((162, 175), 'import_name.import_func', 'import_func', ([], {}), '()\n', (173, 175), False, 'from import_name import import_func\n')]
# -*- coding: utf-8 -*- from pythainlp.transliterate import romanize, transliterate print(romanize("แมว")) print(transliterate("แมว"))
[ "pythainlp.transliterate.transliterate", "pythainlp.transliterate.romanize" ]
[((92, 107), 'pythainlp.transliterate.romanize', 'romanize', (['"""แมว"""'], {}), "('แมว')\n", (100, 107), False, 'from pythainlp.transliterate import romanize, transliterate\n'), ((115, 135), 'pythainlp.transliterate.transliterate', 'transliterate', (['"""แมว"""'], {}), "('แมว')\n", (128, 135), False, 'from pythainlp....
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys, time import signal import random import datetime from threading import Timer debug_mode = False if debug_mode: SECS_PER_DAY = 120 SECS_PER_WEEK = 120 FULL_SECS_PER_DAY = 120 else: SECS_PER_DAY = 9 * 60 * 60 SECS_PER_WEEK = 5 * SECS_PER_DA...
[ "datetime.datetime", "signal.signal", "datetime.datetime.fromtimestamp", "threading.Timer", "time.strftime", "time.sleep", "datetime.datetime.now", "sys.exit", "time.weekday", "random.randint" ]
[((4595, 4618), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (4616, 4618), False, 'import datetime\n'), ((4803, 4826), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (4824, 4826), False, 'import datetime\n'), ((4982, 4992), 'sys.exit', 'sys.exit', ([], {}), '()\n', (4990, 499...
import unittest import chainer import chainer.functions as F import numpy as np from chainer import testing import onnx_chainer @testing.parameterize( {'ops': 'cast', 'input_shape': (1, 5), 'input_argname': 'x', 'args': {'typ': np.float16}}, {'ops': 'cast', 'input_shape': (1, 5), 'input_argna...
[ "numpy.ones", "chainer.testing.parameterize", "chainer.functions.concat", "numpy.zeros", "onnx_chainer.export" ]
[((133, 1787), 'chainer.testing.parameterize', 'testing.parameterize', (["{'ops': 'cast', 'input_shape': (1, 5), 'input_argname': 'x', 'args': {'typ':\n np.float16}}", "{'ops': 'cast', 'input_shape': (1, 5), 'input_argname': 'x', 'args': {'typ':\n np.float64}}", "{'ops': 'depth2space', 'input_shape': (1, 12, 6, 6...
import os import math from wand.api import library import wand.color import wand.image def create_inner_bbox( box_height=200, box_width=200, box_x=1, box_y=1, box_stroke_width=2, bbox_stroke_width=2, bbox_color="#232666", bbox_r=2, xml_id="", ): stroke_tot...
[ "os.makedirs", "os.path.splitext", "os.path.join", "wand.api.library.MagickSetBackgroundColor", "os.path.expanduser" ]
[((1005, 1028), 'os.path.expanduser', 'os.path.expanduser', (['"""~"""'], {}), "('~')\n", (1023, 1028), False, 'import os\n'), ((3231, 3265), 'os.path.join', 'os.path.join', (['save_path', 'file_name'], {}), '(save_path, file_name)\n', (3243, 3265), False, 'import os\n'), ((4176, 4213), 'os.makedirs', 'os.makedirs', ([...
import xml.etree.ElementTree as ET import sys import numpy as np import scipy.sparse.csgraph from argparse import ArgumentParser from collections import defaultdict import wknml def flatten(l): return [x for y in l for x in y] def find(pred, l): return next(x for x in l if pred(x)) parser = ArgumentParse...
[ "wknml.Tree", "wknml.parse_nml", "argparse.ArgumentParser", "numpy.where", "wknml.Group", "collections.defaultdict", "wknml.write_nml" ]
[((307, 381), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""Splits trees in order to fix unlinked nodes."""'}), "(description='Splits trees in order to fix unlinked nodes.')\n", (321, 381), False, 'from argparse import ArgumentParser\n'), ((1197, 1214), 'collections.defaultdict', 'defaultdict', ...
# Copyright 2006-2007 Virtutech AB import sim_commands def checkbit(a, bit): if a & (1 << bit): return 1 else: return 0 def get_info(obj): return [ (None, [ ("PHY object", obj.phy), ] ) ] + sim_commands.get_pci_info(obj) def get_status(obj): csr0 = obj.csr_csr0 cs...
[ "sim_commands.new_pci_header_command", "sim_commands.get_pci_info", "sim_commands.new_info_command", "sim_commands.new_status_command", "sim_commands.get_pci_status" ]
[((1303, 1356), 'sim_commands.new_pci_header_command', 'sim_commands.new_pci_header_command', (['"""AM79C973"""', 'None'], {}), "('AM79C973', None)\n", (1338, 1356), False, 'import sim_commands\n'), ((1357, 1408), 'sim_commands.new_info_command', 'sim_commands.new_info_command', (['"""AM79C973"""', 'get_info'], {}), "(...
from maya.app.general.mayaMixin import MayaQWidgetDockableMixin import pymel.core as pm import PySide2.QtCore as QtCore import PySide2.QtUiTools as QtUiTools import PySide2.QtWidgets as QtWidgets class FlottiWindow(QtWidgets.QDialog): window_title = "FlottiTools Window" object_name = None def __init__(se...
[ "PySide2.QtWidgets.QStyleOptionButton", "PySide2.QtUiTools.QUiLoader", "PySide2.QtWidgets.QStylePainter", "PySide2.QtCore.QFile", "PySide2.QtWidgets.QLabel", "PySide2.QtWidgets.QVBoxLayout", "pymel.core.refresh" ]
[((550, 573), 'PySide2.QtWidgets.QVBoxLayout', 'QtWidgets.QVBoxLayout', ([], {}), '()\n', (571, 573), True, 'import PySide2.QtWidgets as QtWidgets\n'), ((1242, 1263), 'PySide2.QtUiTools.QUiLoader', 'QtUiTools.QUiLoader', ([], {}), '()\n', (1261, 1263), True, 'import PySide2.QtUiTools as QtUiTools\n'), ((1281, 1321), 'P...
import numpy as np import matplotlib.pyplot as plt import ibllib.dsp.fourier as ft def lp(ts, fac, pad=0.2): """ Smooth the data in frequency domain (assumes a uniform sampling rate), using edge padding ibllib.dsp.smooth.lp(ts, [.1, .15]) :param ts: input signal to be smoothed :param fac: 2 elem...
[ "numpy.ceil", "matplotlib.pyplot.title", "numpy.ones", "matplotlib.pyplot.plot", "numpy.array", "numpy.linspace", "numpy.sin", "matplotlib.pyplot.axis", "numpy.pad", "matplotlib.pyplot.subplot", "matplotlib.pyplot.legend", "matplotlib.pyplot.ion" ]
[((702, 731), 'numpy.pad', 'np.pad', (['ts', 'lpad'], {'mode': '"""edge"""'}), "(ts, lpad, mode='edge')\n", (708, 731), True, 'import numpy as np\n'), ((3002, 3025), 'numpy.linspace', 'np.linspace', (['(-4)', '(4)', '(100)'], {}), '(-4, 4, 100)\n', (3013, 3025), True, 'import numpy as np\n'), ((3034, 3043), 'numpy.sin'...
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn.preprocessing import LabelEncoder if __name__ == '__main__': df = pd.read_csv('datasets/50_Startups.csv') X = df.iloc[:, :-1].values Y = df.iloc[:, -1]...
[ "sklearn.model_selection.train_test_split", "sklearn.preprocessing.LabelEncoder", "sklearn.linear_model.LinearRegression", "pandas.read_csv" ]
[((227, 266), 'pandas.read_csv', 'pd.read_csv', (['"""datasets/50_Startups.csv"""'], {}), "('datasets/50_Startups.csv')\n", (238, 266), True, 'import pandas as pd\n'), ((348, 362), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (360, 362), False, 'from sklearn.preprocessing import LabelEncoder\...
from hparams import * from sklearn.externals import joblib from keras.optimizers import Adam from sklearn.externals import joblib from model.tacotron_model import get_tacotron_model # import prepared data decoder_input_training = joblib.load('data/decoder_input_training.pkl') mel_spectro_training = joblib.load('data/m...
[ "keras.optimizers.Adam", "model.tacotron_model.get_tacotron_model", "sklearn.externals.joblib.load", "sklearn.externals.joblib.dump" ]
[((231, 277), 'sklearn.externals.joblib.load', 'joblib.load', (['"""data/decoder_input_training.pkl"""'], {}), "('data/decoder_input_training.pkl')\n", (242, 277), False, 'from sklearn.externals import joblib\n'), ((301, 345), 'sklearn.externals.joblib.load', 'joblib.load', (['"""data/mel_spectro_training.pkl"""'], {})...
import os import sys from px import px def test_run_on_pid(capfd): """ Just run px on a PID. The only verification done here is that it doesn't crash, there is room for improvement... """ argv = [ sys.argv[0], "--no-pager", # Paging causes problems on Travis CI # Not...
[ "os.getppid", "px.px._main" ]
[((581, 595), 'px.px._main', 'px._main', (['argv'], {}), '(argv)\n', (589, 595), False, 'from px import px\n'), ((425, 437), 'os.getppid', 'os.getppid', ([], {}), '()\n', (435, 437), False, 'import os\n')]
import jwe from cryptography.exceptions import InvalidTag from django.db import models from website import settings from osf.exceptions import NaiveDatetimeException SENSITIVE_DATA_KEY = jwe.kdf(settings.SENSITIVE_DATA_SECRET.encode('utf-8'), settings.SENSITIVE_DATA_SALT.encode('utf-8')) ...
[ "osf.exceptions.NaiveDatetimeException", "website.settings.SENSITIVE_DATA_SECRET.encode", "website.settings.SENSITIVE_DATA_SALT.encode" ]
[((197, 243), 'website.settings.SENSITIVE_DATA_SECRET.encode', 'settings.SENSITIVE_DATA_SECRET.encode', (['"""utf-8"""'], {}), "('utf-8')\n", (234, 243), False, 'from website import settings\n'), ((274, 318), 'website.settings.SENSITIVE_DATA_SALT.encode', 'settings.SENSITIVE_DATA_SALT.encode', (['"""utf-8"""'], {}), "(...
#!/usr/bin/python3 import re import lib.db as DB import logging import time import json from datetime import datetime, timedelta from dateutil import parser as dt_parser from lxml import etree # Everything is presumed to be weekly and on the minute # scale. We use this to do wrap around when necessary MINUTES_PER_WEEK...
[ "dateutil.parser.parse", "time.strptime", "datetime.datetime.fromtimestamp", "re.compile", "datetime.datetime.utcnow", "lib.db.get", "time.strftime", "re.match", "lib.db.set", "lxml.etree.fromstring", "re.sub", "datetime.timedelta", "time.time", "urllib.request.urlopen" ]
[((856, 867), 'time.time', 'time.time', ([], {}), '()\n', (865, 867), False, 'import time\n'), ((1960, 1988), 're.sub', 're.sub', (['"""[+_-]"""', '""" """', 'in_str'], {}), "('[+_-]', ' ', in_str)\n", (1966, 1988), False, 'import re\n'), ((2057, 2085), 're.sub', 're.sub', (['"""[+_-]"""', '""" """', 'in_str'], {}), "(...
import falcon import jinja2 from .base import BaseResource from .html import read class LoginResource(BaseResource): '''Falcon resource for user authentication''' auth_required = False def __init__(self, *args, **kwargs): super(LoginResource, self).__init__(*args, **kwargs) def on_get(self,...
[ "jinja2.Template" ]
[((450, 471), 'jinja2.Template', 'jinja2.Template', (['file'], {}), '(file)\n', (465, 471), False, 'import jinja2\n'), ((1697, 1718), 'jinja2.Template', 'jinja2.Template', (['file'], {}), '(file)\n', (1712, 1718), False, 'import jinja2\n')]
import datetime import uuid import urllib import asyncio import websockets import json import hmac import base64 import hashlib import gzip import traceback def generate_signature(host, method, params, request_path, secret_key): """Generate signature of huobi future. Args: host: api doma...
[ "hmac.new", "urllib.parse.urlparse", "datetime.datetime.utcnow", "base64.b64encode", "json.dumps", "gzip.decompress", "uuid.uuid1", "traceback.print_exc", "websockets.connect", "urllib.parse.urlencode", "asyncio.get_event_loop" ]
[((739, 776), 'urllib.parse.urlencode', 'urllib.parse.urlencode', (['sorted_params'], {}), '(sorted_params)\n', (761, 776), False, 'import urllib\n'), ((1064, 1088), 'base64.b64encode', 'base64.b64encode', (['digest'], {}), '(digest)\n', (1080, 1088), False, 'import base64\n'), ((1607, 1630), 'websockets.connect', 'web...
# Generated by Django 2.0.2 on 2018-02-28 13:15 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('articles', '0015_auto_20180228_1400'), ] operations = [ migrations.AlterField( model_name='article', name='slug', ...
[ "django.db.models.SlugField" ]
[((336, 364), 'django.db.models.SlugField', 'models.SlugField', ([], {'blank': '(True)'}), '(blank=True)\n', (352, 364), False, 'from django.db import migrations, models\n'), ((486, 514), 'django.db.models.SlugField', 'models.SlugField', ([], {'blank': '(True)'}), '(blank=True)\n', (502, 514), False, 'from django.db im...
# This sample tests that type aliases can consist of # partially-specialized classes that can be further # specialized. # pyright: strict from typing import Tuple, Optional, TypeVar T = TypeVar('T') ValidationResult = Tuple[bool, Optional[T]] def foo() -> ValidationResult[str]: return False, 'valid'
[ "typing.TypeVar" ]
[((189, 201), 'typing.TypeVar', 'TypeVar', (['"""T"""'], {}), "('T')\n", (196, 201), False, 'from typing import Tuple, Optional, TypeVar\n')]
from django.forms.utils import flatatt from django.utils.html import format_html, format_html_join from wagtailmedia.blocks import AbstractMediaChooserBlock class GEMediaBlock(AbstractMediaChooserBlock): def render_basic(self, value, context=None): if not value: return "" if value.typ...
[ "django.forms.utils.flatatt" ]
[((960, 970), 'django.forms.utils.flatatt', 'flatatt', (['s'], {}), '(s)\n', (967, 970), False, 'from django.forms.utils import flatatt\n')]
# -*- coding:utf-8 -*- import argparse # 3.2新出命令行解析模块 https://docs.python.org/3/howto/argparse.html#introducing-positional-arguments import subprocess import os import sys from datetime import datetime # 可用于multipart/form-data格式请求 import requests_toolbelt import requests import json from script import ShellCommand de...
[ "subprocess.getoutput", "json.loads", "os.path.exists", "argparse.ArgumentParser", "script.ShellCommand.excute_shell", "sys.exit", "datetime.datetime.today", "os.system", "subprocess.getstatusoutput" ]
[((350, 375), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (373, 375), False, 'import argparse\n'), ((1884, 1909), 'json.loads', 'json.loads', (['response.text'], {}), '(response.text)\n', (1894, 1909), False, 'import json\n'), ((2139, 2171), 'subprocess.getoutput', 'subprocess.getoutput', ([...
# Generated by Django 2.2.10 on 2020-09-12 15:10 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('app', '0002_auto_20200912_2309'), ] operations = [ migrations.AlterModelOptions( name='face', options={'ordering': ['-time'...
[ "django.db.migrations.AlterModelOptions" ]
[((224, 298), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""face"""', 'options': "{'ordering': ['-time']}"}), "(name='face', options={'ordering': ['-time']})\n", (252, 298), False, 'from django.db import migrations\n')]
from typing import Dict, Tuple import networkx as nx from networkx.classes import graph import numpy as np from functools import partial from bokeh.plotting import from_networkx,figure from bokeh.models import Circle from bokeh.models import HoverTool from bokeh.models import MultiLine from bokeh.models import NodesAnd...
[ "bokeh.models.MultiLine", "networkx.classes.graph.edges", "bokeh.models.Range1d", "networkx.set_edge_attributes", "networkx.classes.graph.copy", "matplotlib.lines.Line2D", "networkx.relabel_nodes", "bokeh.models.Circle", "bokeh.plotting.from_networkx", "networkx.spring_layout", "matplotlib.pyplo...
[((567, 599), 'matplotlib.pyplot.style.use', 'plt.style.use', (['"""fivethirtyeight"""'], {}), "('fivethirtyeight')\n", (580, 599), True, 'import matplotlib.pyplot as plt\n'), ((653, 696), 'matplotlib.lines.Line2D', 'Line2D', (['[0, 1]', '[0, 1]'], {'color': 'clr'}), '([0, 1], [0, 1], color=clr, **kwargs)\n', (659, 696...
import os, sys from flask import Flask, request from pymessenger import Bot app = Flask(__name__) PAGE_ACCESS_TOKEN = "your-access-token-here" bot = Bot(PAGE_ACCESS_TOKEN) @app.route('/', methods=['GET']) def verify(): # Webhook verification if request.args.get("hub.mode") == "subscribe" and request.args.ge...
[ "flask.request.args.get", "flask.Flask", "pymessenger.Bot", "flask.request.get_json", "sys.stdout.flush" ]
[((83, 98), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (88, 98), False, 'from flask import Flask, request\n'), ((152, 174), 'pymessenger.Bot', 'Bot', (['PAGE_ACCESS_TOKEN'], {}), '(PAGE_ACCESS_TOKEN)\n', (155, 174), False, 'from pymessenger import Bot\n'), ((616, 634), 'flask.request.get_json', 'reques...
import sys import types import textwrap from collections import OrderedDict from .bits import * __all__ = ["bitstruct"] class _bitstruct: __slots__ = () @staticmethod def _check_bits_(action, expected_width, value): assert isinstance(value, bits) if len(value) != expected_width: ...
[ "textwrap.dedent", "collections.OrderedDict", "sys._getframe" ]
[((1748, 1761), 'collections.OrderedDict', 'OrderedDict', ([], {}), '()\n', (1759, 1761), False, 'from collections import OrderedDict\n'), ((3207, 3667), 'textwrap.dedent', 'textwrap.dedent', (['f"""\n @property\n def {field}(self):\n return self._{field}\n\n @{field}.set...
#!/usr/bin/env vpython # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tool to move Blink source from third_party/WebKit to third_party/blink. See https://docs.google.com/document/d/1l3aPv1Wx__SpRkdOhv...
[ "logging.getLogger", "logging.basicConfig", "re.escape", "blinkpy.common.path_finder.get_blink_tools_dir", "argparse.ArgumentParser", "re.compile", "blinkpy.common.checkout.git.Git", "blinkpy.common.system.filesystem.FileSystem", "os.path.split", "os.path.dirname", "blinkpy.common.path_finder.ge...
[((1188, 1226), 'logging.getLogger', 'logging.getLogger', (['"""move_blink_source"""'], {}), "('move_blink_source')\n", (1205, 1226), False, 'import logging\n'), ((32581, 32704), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': '"""[%(asctime)s %(levelname)s %(name)s] %(message)s""...
from configparser import RawConfigParser import os import sys class Config(RawConfigParser): """ Class for easy config file usage. """ def __init__(self): """ Initialize Class. """ # Parameter self.filename = 'config.ini' # Call parent constructor ...
[ "os.path.join" ]
[((506, 546), 'os.path.join', 'os.path.join', (['sys.path[0]', 'self.filename'], {}), '(sys.path[0], self.filename)\n', (518, 546), False, 'import os\n')]
import numpy as np from time import sleep from math import exp import matplotlib.pyplot as plt from scipy.integrate import trapz from os import path import struct import spectrabuster.functions as sbf from importlib import import_module from datetime import date, datetime from functools import partial class Spectrum(...
[ "os.path.exists", "numpy.abs", "spectrabuster.functions.get_backend", "numpy.isclose", "numpy.copy", "scipy.integrate.trapz", "numpy.array", "numpy.negative", "functools.partial", "math.exp", "numpy.amax" ]
[((4551, 4625), 'functools.partial', 'partial', (['self.device.measure'], {'correct_dc': 'correct_dc', 'correct_nl': 'correct_nl'}), '(self.device.measure, correct_dc=correct_dc, correct_nl=correct_nl)\n', (4558, 4625), False, 'from functools import partial\n'), ((5163, 5185), 'os.path.exists', 'path.exists', (['file_p...
import os.path as op from pylama.check_async import check_async from pylama.config import parse_options from pylama.core import filter_errors, parse_modeline, run from pylama.errors import Error, remove_duplicates from pylama.hook import git_hook, hg_hook from pylama.main import shell, check_path def test_filter_err...
[ "pylama.main.check_path", "pylama.errors.Error", "pylama.check_async.check_async", "pylama.config.parse_options", "pylama.hook.git_hook", "pylama.core.parse_modeline", "pylama.main.shell", "pylama.errors.remove_duplicates", "os.path.abspath", "pylama.core.run" ]
[((829, 849), 'pylama.core.parse_modeline', 'parse_modeline', (['code'], {}), '(code)\n', (843, 849), False, 'from pylama.core import filter_errors, parse_modeline, run\n'), ((951, 973), 'os.path.abspath', 'op.abspath', (['"""dummy.py"""'], {}), "('dummy.py')\n", (961, 973), True, 'import os.path as op\n'), ((988, 1009...
#!./bin/python3 from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.utils import is_request_type, is_intent_name, get_slot_value from ask_sdk_core.handler_input import HandlerInput from ask_sdk_core.serialize import DefaultSerializer as DZ from ask_sdk_model import Response from ask_sdk_model.ui impo...
[ "ask_sdk_core.serialize.DefaultSerializer.serialize", "functools.reduce", "ask_sdk_core.utils.get_slot_value", "ask_sdk_model.ui.SimpleCard", "ask_sdk_core.serialize.DefaultSerializer.deserialize", "ask_sdk_core.skill_builder.SkillBuilder", "ask_sdk_core.utils.is_request_type", "ask_sdk_core.utils.is_...
[((400, 414), 'ask_sdk_core.skill_builder.SkillBuilder', 'SkillBuilder', ([], {}), '()\n', (412, 414), False, 'from ask_sdk_core.skill_builder import SkillBuilder\n'), ((504, 525), 'functools.reduce', 'reduce', (['mul', 'stack', '(1)'], {}), '(mul, stack, 1)\n', (510, 525), False, 'from functools import reduce\n'), ((5...
from django.db import models from university_structure.models import Faculties, EducationalPrograms # Create your models here. class Departments(models.Model): id = models.AutoField(primary_key=True) faculty_id = models.ForeignKey(Faculties, on_delete=models.CASCADE, null=False) name = models.CharField(m...
[ "django.db.models.ManyToManyField", "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((172, 206), 'django.db.models.AutoField', 'models.AutoField', ([], {'primary_key': '(True)'}), '(primary_key=True)\n', (188, 206), False, 'from django.db import models\n'), ((224, 290), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Faculties'], {'on_delete': 'models.CASCADE', 'null': '(False)'}), '(Faculties...
"""meeting Revision ID: 2351e1d04612 Revises: 21232f2d<PASSWORD> Create Date: 2014-05-21 22:20:28.964038 """ # revision identifiers, used by Alembic. revision = '2351e1d04612' down_revision = '21232f2<PASSWORD>' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade()...
[ "sqlalchemy.ForeignKeyConstraint", "alembic.op.drop_table", "alembic.op.f", "sqlalchemy.Text", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Date", "sqlalchemy.Integer", "sqlalchemy.dialects.postgresql.JSON" ]
[((2824, 2857), 'alembic.op.drop_table', 'op.drop_table', (['"""meeting_attendee"""'], {}), "('meeting_attendee')\n", (2837, 2857), False, 'from alembic import op\n'), ((3011, 3037), 'alembic.op.drop_table', 'op.drop_table', (['"""statement"""'], {}), "('statement')\n", (3024, 3037), False, 'from alembic import op\n'),...
import argparse import gc from os.path import join import cv2 import dlib import torch from torch.utils.data import DataLoader from torchvision.transforms import transforms from tqdm import tqdm import numpy as np from detect_from_video import get_boundingbox, predict_with_model from src.data.basic_dataset import Basi...
[ "torchvision.transforms.transforms.ToPILImage", "argparse.ArgumentParser", "torch.utils.data.DataLoader", "torch.load", "tqdm.tqdm", "os.path.join", "src.util.validate.save_pred_to_csv", "src.util.validate.calc_scores", "dlib.get_frontal_face_detector", "src.model.transforms.transform_builder.crea...
[((607, 646), 'cv2.cvtColor', 'cv2.cvtColor', (['image', 'cv2.COLOR_BGR2GRAY'], {}), '(image, cv2.COLOR_BGR2GRAY)\n', (619, 646), False, 'import cv2\n'), ((1241, 1253), 'gc.collect', 'gc.collect', ([], {}), '()\n', (1251, 1253), False, 'import gc\n'), ((1258, 1282), 'torch.cuda.empty_cache', 'torch.cuda.empty_cache', (...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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 o...
[ "google.appengine.ext.webapp.WSGIApplication", "google.appengine.ext.db.TextProperty", "google.appengine.ext.db.IntegerProperty", "google.appengine.ext.db.DateTimeProperty", "os.path.dirname", "google.appengine.ext.webapp.util.run_wsgi_app", "google.appengine.ext.webapp.template.render" ]
[((2353, 2426), 'google.appengine.ext.webapp.WSGIApplication', 'webapp.WSGIApplication', (["[('/', MainPage), ('/r', RPCHandler)]"], {'debug': '(True)'}), "([('/', MainPage), ('/r', RPCHandler)], debug=True)\n", (2375, 2426), False, 'from google.appengine.ext import webapp\n'), ((1022, 1055), 'google.appengine.ext.db.I...
#!/usr/bin/python # Copyright (c) 2018 Cohesity Inc # Apache License Version 2.0 from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import os import shutil import time from ansible.module_utils.basic import AnsibleModule from ansible.module_utils._text import to_bytes...
[ "ansible.module_utils.storage.cohesity.cohesity_utilities.cohesity_common_argument_spec", "os.path.exists", "ansible.module_utils.basic.AnsibleModule", "ansible.module_utils.urls.open_url", "os.path.isabs", "json.dumps", "ansible.module_utils.storage.cohesity.cohesity_auth.get__cohesity_auth__token", ...
[((20092, 20125), 'ansible.module_utils.storage.cohesity.cohesity_auth.get__cohesity_auth__token', 'get__cohesity_auth__token', (['module'], {}), '(module)\n', (20117, 20125), False, 'from ansible.module_utils.storage.cohesity.cohesity_auth import get__cohesity_auth__token\n'), ((21966, 21999), 'ansible.module_utils.st...
#!/usr/bin/python3 # -*- coding: utf-8 -*- import argparse import json import logging import logging.handlers import sys from enum import Enum, unique import numpy from alphazero.mcts import MCTS from gomoku.env import GomokuEnv, ChessType from gomoku.nnet import GomokuNNet from gomoku.rl import GomokuRL @unique ...
[ "logging.getLogger", "json.loads", "gomoku.nnet.GomokuNNet", "logging.StreamHandler", "gomoku.rl.GomokuRL", "argparse.ArgumentParser", "logging.Formatter", "gomoku.env.GomokuEnv", "sys.stdin.readline", "logging.FileHandler", "logging.info", "alphazero.mcts.MCTS" ]
[((2103, 2128), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (2126, 2128), False, 'import argparse\n'), ((3440, 3458), 'logging.info', 'logging.info', (['args'], {}), '(args)\n', (3452, 3458), False, 'import logging\n'), ((3470, 3485), 'gomoku.env.GomokuEnv', 'GomokuEnv', (['args'], {}), '(ar...
import re # https://developer.mozilla.org/en-US/docs/Web/HTML/Inline_elements#Elements INLINE_TAGS = { 'a', 'abbr', 'acronym', 'b', 'bdo', 'big', 'br', 'button', 'cite', 'code', 'dfn', 'em', 'i', 'img', 'input', 'kbd', 'label', 'map', 'object', 'q', 'samp', 'script', 'select', 'small', 'span', 'strong', ...
[ "re.compile" ]
[((499, 534), 're.compile', 're.compile', (["u'[ \\t\\x0c\\u200b\\n\\r]+'"], {}), "(u'[ \\t\\x0c\\u200b\\n\\r]+')\n", (509, 534), False, 'import re\n')]
# Copyright 2018 Akretion (http://www.akretion.com). # @author <NAME> <<EMAIL>> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields, models class ProductCategory(models.Model): _inherit = "product.category" media_ids = fields.Many2many("storage.media")
[ "odoo.fields.Many2many" ]
[((268, 301), 'odoo.fields.Many2many', 'fields.Many2many', (['"""storage.media"""'], {}), "('storage.media')\n", (284, 301), False, 'from odoo import fields, models\n')]
#!/usr/bin/python # vim: tabstop=4 shiftwidth=4 softtabstop=4 """ Name : smgr_edit.py Author : <NAME> Description : This program is a simple cli interface to edit server manager configuration objects. Objects can be cluster or server. """ import logging import pdb import sys import ast from itertools im...
[ "logging.getLogger", "json.loads", "smgr_client_utils.SmgrClientUtils", "smgr_client_utils.SmgrClientUtils.print_rest_response", "itertools.izip", "sys.exit", "smgr_client_utils.SmgrClientUtils.send_REST_request" ]
[((573, 600), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (590, 600), False, 'import logging\n'), ((814, 825), 'smgr_client_utils.SmgrClientUtils', 'smgrutils', ([], {}), '()\n', (823, 825), True, 'from smgr_client_utils import SmgrClientUtils as smgrutils\n'), ((4614, 4714), 'smgr_cli...
'''Testing for particle_data.py ''' import copy from mock import patch, sentinel import numpy as np import numpy.testing as npt import unittest import galaxy_dive.analyze_data.simulation_data as simulation_data ######################################################################## default_kwargs = { 'data_dir...
[ "mock.patch", "numpy.random.rand", "numpy.testing.assert_allclose", "copy.copy", "numpy.array", "galaxy_dive.analyze_data.simulation_data.SnapshotData", "numpy.random.uniform", "mock.patch.multiple" ]
[((3202, 3296), 'mock.patch', 'patch', (['"""galaxy_dive.analyze_data.simulation_data.SnapshotData.handle_data_key_error"""'], {}), "(\n 'galaxy_dive.analyze_data.simulation_data.SnapshotData.handle_data_key_error'\n )\n", (3207, 3296), False, 'from mock import patch, sentinel\n'), ((5282, 5666), 'mock.patch.mult...
from flask import jsonify, request import json import requests import os def find_energy(name): yandex_translate_api_string = "https://translate.yandex.net/api/v1.5/tr.json/translate?key=" + os.environ.get( "YANDEX_API_KEY", None) + "&text=" + name + "&lang=en" usda_api_search_request_string = "https:...
[ "requests.post", "os.environ.get", "requests.get" ]
[((365, 401), 'os.environ.get', 'os.environ.get', (['"""USDA_API_KEY"""', 'None'], {}), "('USDA_API_KEY', None)\n", (379, 401), False, 'import os\n'), ((960, 996), 'os.environ.get', 'os.environ.get', (['"""USDA_API_KEY"""', 'None'], {}), "('USDA_API_KEY', None)\n", (974, 996), False, 'import os\n'), ((1048, 1086), 'req...
#coding:utf-8 # # id: functional.tabloid.optimizer_index_navigation # title: Check that optimizer takes in account presense of index and does navigation instead of external sort. # decription: # Verified commit: https://github.com/FirebirdSQL/firebird/actions/runs/176006556 # ...
[ "pytest.mark.version", "firebird.qa.db_factory", "firebird.qa.isql_act" ]
[((762, 807), 'firebird.qa.db_factory', 'db_factory', ([], {'sql_dialect': '(3)', 'init': 'init_script_1'}), '(sql_dialect=3, init=init_script_1)\n', (772, 807), False, 'from firebird.qa import db_factory, isql_act, Action\n'), ((1543, 1605), 'firebird.qa.isql_act', 'isql_act', (['"""db_1"""', 'test_script_1'], {'subst...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys from django.core.management import execute_from_command_line def main(): os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{package}.settings".format(package=__package__)) execute_from_command_line(sys.argv) if __na...
[ "django.core.management.execute_from_command_line" ]
[((275, 310), 'django.core.management.execute_from_command_line', 'execute_from_command_line', (['sys.argv'], {}), '(sys.argv)\n', (300, 310), False, 'from django.core.management import execute_from_command_line\n')]
# -*- coding: utf-8 -*- """ Driver for the Keithley instruments Manual for the KT2400 found in 'http://research.physics.illinois.edu/bezryadin/ labprotocol/Keithley2400Manual.pdf' @author: <EMAIL> """ import numpy as np from .generic_instruments import Instrument, INTF_PROLOGIX def fake_iv_relation( src_type, ...
[ "numpy.where", "numpy.random.random", "numpy.size", "numpy.log", "numpy.exp", "numpy.array" ]
[((743, 759), 'numpy.size', 'np.size', (['src_val'], {}), '(src_val)\n', (750, 759), True, 'import numpy as np\n'), ((872, 896), 'numpy.where', 'np.where', (['(src_val < i_sc)'], {}), '(src_val < i_sc)\n', (880, 896), True, 'import numpy as np\n'), ((637, 649), 'numpy.array', 'np.array', (['[]'], {}), '([])\n', (645, 6...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ make_long_soundfiles.py Create mylist.txt and run ffmpeg -f concat for each (particpant + condition). Authors: – <NAME>, 2016 (<EMAIL>) – <NAME>, 2016 (<EMAIL>) © 2016, Child Mind Institute, Apache v2.0 License Created on Tue Nov 29 15:52:30 2016 @author:...
[ "os.listdir", "subprocess.run", "os.path.join" ]
[((1260, 1301), 'subprocess.run', 'subprocess.run', (['shell_command'], {'shell': '(True)'}), '(shell_command, shell=True)\n', (1274, 1301), False, 'import os, subprocess\n'), ((2120, 2158), 'os.path.join', 'os.path.join', (['topdir', 'ursi', '"""no_beeps"""'], {}), "(topdir, ursi, 'no_beeps')\n", (2132, 2158), False, ...
from typing import Tuple, List, Any from Crypto.Cipher import AES from zkay.config import cfg from zkay.transaction.crypto.ecdh_base import EcdhBase class EcdhAesCrypto(EcdhBase): def _enc(self, plain: int, my_sk: int, target_pk: int) -> Tuple[List[int], None]: key = self._ecdh_sha256(target_pk, my_sk) ...
[ "Crypto.Cipher.AES.new" ]
[((429, 455), 'Crypto.Cipher.AES.new', 'AES.new', (['key', 'AES.MODE_CBC'], {}), '(key, AES.MODE_CBC)\n', (436, 455), False, 'from Crypto.Cipher import AES\n'), ((1277, 1310), 'Crypto.Cipher.AES.new', 'AES.new', (['key', 'AES.MODE_CBC'], {'iv': 'iv'}), '(key, AES.MODE_CBC, iv=iv)\n', (1284, 1310), False, 'from Crypto.C...
############################################################### # Simple implementation of a two-player Rock, Paper, Scissors # # game, using the getch module for keyboard inputs. # ############################################################### import getch, sys, time class go: # Defines an object ...
[ "getch.getch", "time.sleep", "sys.exit" ]
[((3072, 3085), 'getch.getch', 'getch.getch', ([], {}), '()\n', (3083, 3085), False, 'import getch, sys, time\n'), ((3123, 3136), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (3133, 3136), False, 'import getch, sys, time\n'), ((3150, 3163), 'time.sleep', 'time.sleep', (['(1)'], {}), '(1)\n', (3160, 3163), False,...
# Generated by Django 2.1.9 on 2019-09-03 12:11 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0022_auto_20190903_1410'), ] operations = [ migrations.AlterField( model_name='reservee', name='allergies'...
[ "django.db.models.CharField" ]
[((340, 426), 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(200)', 'null': '(True)', 'verbose_name': '"""allergier"""'}), "(blank=True, max_length=200, null=True, verbose_name=\n 'allergier')\n", (356, 426), False, 'from django.db import migrations, models\n')]
from setuptools import setup, find_packages setup( name='pypolycontain', author='<NAME>', description='A python package for polytopic objects, operations, and containment encodings', author_email='<EMAIL>', version='1.3', packages=['pypolycontain'], #fix long_description='A python package ...
[ "setuptools.setup" ]
[((46, 558), 'setuptools.setup', 'setup', ([], {'name': '"""pypolycontain"""', 'author': '"""<NAME>"""', 'description': '"""A python package for polytopic objects, operations, and containment encodings"""', 'author_email': '"""<EMAIL>"""', 'version': '"""1.3"""', 'packages': "['pypolycontain']", 'long_description': '(\...
# local imports from dnppy import raster from modis_metadata import modis_metadata import os # arcpy imports import arcpy if arcpy.CheckExtension('Spatial')=='Available': arcpy.CheckOutExtension('Spatial') arcpy.env.overwriteOutput = True def mosaic(filelist, outdir = None, pixel_type = None, bands = "1", ...
[ "arcpy.CheckExtension", "os.makedirs", "arcpy.CheckOutExtension", "os.path.join", "os.path.split", "os.path.isdir", "dnppy.raster.enf_rastlist", "arcpy.MosaicToNewRaster_management", "modis_metadata.modis_metadata" ]
[((128, 159), 'arcpy.CheckExtension', 'arcpy.CheckExtension', (['"""Spatial"""'], {}), "('Spatial')\n", (148, 159), False, 'import arcpy\n'), ((178, 212), 'arcpy.CheckOutExtension', 'arcpy.CheckOutExtension', (['"""Spatial"""'], {}), "('Spatial')\n", (201, 212), False, 'import arcpy\n'), ((2201, 2230), 'dnppy.raster.en...
import datetime import validators from google.appengine.api import datastore_errors from google.appengine.ext import ndb def domain_validator(prop, value): if validators.domain(value) is not True: raise datastore_errors.BadValueError(prop._name) return value.lower() class CustomDomain(ndb.Model): ...
[ "google.appengine.ext.ndb.KeyProperty", "google.appengine.api.datastore_errors.BadValueError", "google.appengine.ext.ndb.StructuredProperty", "validators.domain", "google.appengine.ext.ndb.BooleanProperty", "google.appengine.ext.ndb.TextProperty", "google.appengine.ext.ndb.JsonProperty", "google.appen...
[((332, 378), 'google.appengine.ext.ndb.StringProperty', 'ndb.StringProperty', ([], {'validator': 'domain_validator'}), '(validator=domain_validator)\n', (350, 378), False, 'from google.appengine.ext import ndb\n'), ((394, 428), 'google.appengine.ext.ndb.BooleanProperty', 'ndb.BooleanProperty', ([], {'default': '(False...
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
[ "AccessControl.SecurityInfo.ClassSecurityInfo", "AccessControl.class_init.InitializeClass" ]
[((3251, 3272), 'AccessControl.class_init.InitializeClass', 'InitializeClass', (['Test'], {}), '(Test)\n', (3266, 3272), False, 'from AccessControl.class_init import InitializeClass\n'), ((2187, 2206), 'AccessControl.SecurityInfo.ClassSecurityInfo', 'ClassSecurityInfo', ([], {}), '()\n', (2204, 2206), False, 'from Acce...
import numpy as np import tensorflow as tf from sklearn.model_selection import StratifiedKFold class Apply: class StratifiedMinibatch: def __init__(self, batch_size, ds_size): self.batch_size, self.ds_size = batch_size, ds_size # max number of splits self.n_splits = se...
[ "tensorflow.py_function", "tensorflow.data.Dataset.from_generator", "tensorflow.reduce_max", "sklearn.model_selection.StratifiedKFold", "numpy.array", "tensorflow.concat", "tensorflow.where", "tensorflow.gather", "numpy.concatenate", "tensorflow.cast", "numpy.arange", "tensorflow.random.Genera...
[((426, 479), 'sklearn.model_selection.StratifiedKFold', 'StratifiedKFold', ([], {'n_splits': 'self.n_splits', 'shuffle': '(True)'}), '(n_splits=self.n_splits, shuffle=True)\n', (441, 479), False, 'from sklearn.model_selection import StratifiedKFold\n'), ((948, 1146), 'tensorflow.data.Dataset.from_generator', 'tf.data....
################################################################################ # 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...
[ "pyflink.datastream.connectors.RollingPolicy.default_rolling_policy", "argparse.ArgumentParser", "pyflink.common.Types.INT", "pyflink.datastream.connectors.OutputFileConfig.builder", "pyflink.datastream.StreamExecutionEnvironment.get_execution_environment", "pyflink.common.Time.milliseconds", "pyflink.c...
[((1936, 1961), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1959, 1961), False, 'import argparse\n'), ((2225, 2279), 'pyflink.datastream.StreamExecutionEnvironment.get_execution_environment', 'StreamExecutionEnvironment.get_execution_environment', ([], {}), '()\n', (2277, 2279), False, 'fro...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
[ "tensorflow.equal", "tensorflow.shape", "tensorflow.boolean_mask", "tensorflow.strings.join", "tensorflow.cast", "tf3d.utils.projections.to_world_frame", "tensorflow.concat", "tensorflow.less", "tensorflow.zeros_like", "tensorflow.random.uniform", "tensorflow.range", "tensorflow_datasets.featu...
[((1538, 1569), 'tensorflow.strings.join', 'tf.strings.join', (['string_tensors'], {}), '(string_tensors)\n', (1553, 1569), True, 'import tensorflow as tf\n'), ((6652, 6823), 'tf3d.utils.projections.to_world_frame', 'projections.to_world_frame', ([], {'camera_frame_points': 'point_positions', 'rotate_world_to_camera': ...
import json from PIL import Image import torch from torchvision.transforms import ToTensor from codes.datasets.MVM3D import * import warnings from codes.EX_CONST import Const warnings.filterwarnings("ignore") class MVM3D_loader(VisionDataset): def __init__(self, base, train=True, transform=ToTensor(), target_tra...
[ "PIL.Image.open", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "torch.stack", "torch.from_numpy", "torch.tensor", "matplotlib.pyplot.figure", "matplotlib.pyplot.bar", "torch.utils.data.DataLoader", "json.load", "matplotlib.pyplot.title", "torchvision.transforms.ToTensor", "warning...
[((176, 209), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (199, 209), False, 'import warnings\n'), ((16992, 17109), 'torch.utils.data.DataLoader', 'torch.utils.data.DataLoader', (['dataset'], {'batch_size': '(1)', 'shuffle': '(False)', 'num_workers': '(8)', 'pin_memory'...
import os import time import logger import random import tensorflow as tf import gym import numpy as np from collections import deque from config import args from utils import set_global_seeds, sf01, explained_variance from agent import PPO from env_wrapper import make_env def main(): env = make_env() set_gl...
[ "numpy.mean", "collections.deque", "agent.PPO", "numpy.arange", "numpy.asarray", "logger.configure", "numpy.zeros_like", "logger.dumpkvs", "utils.set_global_seeds", "numpy.zeros", "logger.logkv", "numpy.std", "utils.explained_variance", "time.time", "env_wrapper.make_env", "logger.get_...
[((299, 309), 'env_wrapper.make_env', 'make_env', ([], {}), '()\n', (307, 309), False, 'from env_wrapper import make_env\n'), ((314, 346), 'utils.set_global_seeds', 'set_global_seeds', (['env', 'args.seed'], {}), '(env, args.seed)\n', (330, 346), False, 'from utils import set_global_seeds, sf01, explained_variance\n'),...
#!/usr/bin/python import sys import traceback import os import time import socket from atlas import measure_baseclass from measure_baseclass import MeasurementBase from measure_baseclass import load_input, readkey, process_response from measure_baseclass import SLEEP_TIME class Traceroute(MeasurementBase): def __...
[ "measure_baseclass.process_response", "measure_baseclass.load_input", "time.sleep", "atlas.measure_baseclass.config_argparser", "sys.stderr.write", "measure_baseclass.readkey", "sys.exit", "traceback.print_exc" ]
[((1158, 1194), 'atlas.measure_baseclass.config_argparser', 'measure_baseclass.config_argparser', ([], {}), '()\n', (1192, 1194), False, 'from atlas import measure_baseclass\n'), ((2315, 2346), 'measure_baseclass.load_input', 'load_input', (['args.target_list[0]'], {}), '(args.target_list[0])\n', (2325, 2346), False, '...
import hashlib # import bitcoin import binascii import base58 from time import time from common import globall as G from common.ellipticcurve.privateKey import PrivateKey from common.ellipticcurve.publicKey import PublicKey from common.ellipticcurve.signature import Signature from common.ellipticcurve.ec...
[ "hashlib.sha256", "base58.b58decode_int", "binascii.b2a_hex", "common.ellipticcurve.curve.secp256k1.x2y", "binascii.a2b_hex", "common.ellipticcurve.ecdsa.Ecdsa.verify", "common.ellipticcurve.ecdsa.Ecdsa.sign", "common.ellipticcurve.privateKey.PrivateKey", "node.conf.tune.LOGGER.debug", "common.ell...
[((809, 834), 'binascii.a2b_hex', 'binascii.a2b_hex', (['num_hex'], {}), '(num_hex)\n', (825, 834), False, 'import binascii\n'), ((912, 942), 'binascii.b2a_hex', 'binascii.b2a_hex', (['binary_bytes'], {}), '(binary_bytes)\n', (928, 942), False, 'import binascii\n'), ((1641, 1672), 'base58.b58encode_int', 'base58.b58enc...
"""Module containing class `AstronomicalCalculator`.""" from pathlib import Path import datetime import pytz from skyfield import almanac from skyfield.api import Topos, load, load_file _EPHEMERIS_FILE_PATH = Path(__file__).parent / 'data' / 'de421.bsp' """ Jet Propulsion Laboratory Development Ephemeris (JPL DE) ...
[ "datetime.datetime", "pytz.timezone", "pathlib.Path", "skyfield.almanac.fraction_illuminated", "skyfield.api.load.timescale", "skyfield.api.load_file", "datetime.timedelta", "skyfield.api.Topos", "skyfield.almanac.find_discrete", "skyfield.almanac.dark_twilight_day" ]
[((1021, 1047), 'datetime.timedelta', 'datetime.timedelta', ([], {'days': '(1)'}), '(days=1)\n', (1039, 1047), False, 'import datetime\n'), ((4729, 4806), 'skyfield.api.Topos', 'Topos', ([], {'latitude_degrees': 'self._lat', 'longitude_degrees': 'self._lon', 'elevation_m': '(0)'}), '(latitude_degrees=self._lat, longitu...
"""Event manager.""" import datetime from logging import getLogger from googleapiclient.discovery import Resource, build from showroomeventscheduler.google.calendar.event import Event class EventManager: """Event manager.""" def __init__(self, creds, calendar_id, *, http=None) -> None: self.service...
[ "logging.getLogger", "googleapiclient.discovery.build", "datetime.datetime.utcnow" ]
[((456, 475), 'logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (465, 475), False, 'from logging import getLogger\n'), ((1906, 1974), 'googleapiclient.discovery.build', 'build', (['self.service_name', 'self.version'], {'credentials': 'self.credentials'}), '(self.service_name, self.version, credentia...
from cloudify.workflows import ctx, parameters ctx.logger.info(parameters.node_id) instance = [n for n in ctx.node_instances if n.node_id == parameters.node_id][0] for relationship in instance.relationships: relationship.execute_source_operation('custom_lifecycle.custom_operation')
[ "cloudify.workflows.ctx.logger.info" ]
[((50, 85), 'cloudify.workflows.ctx.logger.info', 'ctx.logger.info', (['parameters.node_id'], {}), '(parameters.node_id)\n', (65, 85), False, 'from cloudify.workflows import ctx, parameters\n')]
# Copyright 2016-present CERN – European Organization for Nuclear Research # # 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...
[ "unittest.main", "qf_lib.backtesting.fast_alpha_model_tester.scenarios_generator.ScenariosGenerator", "qf_lib.containers.series.qf_series.QFSeries" ]
[((1925, 1940), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1938, 1940), False, 'import unittest\n'), ((948, 968), 'qf_lib.backtesting.fast_alpha_model_tester.scenarios_generator.ScenariosGenerator', 'ScenariosGenerator', ([], {}), '()\n', (966, 968), False, 'from qf_lib.backtesting.fast_alpha_model_tester.sce...
# encoding: utf-8 # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # The number of lines will be reduced after 2018 update is complete and # the old stories are removed: https://crbug.com/878390. # pylint:...
[ "page_sets.login_helpers.tumblr_login.LoginDesktopAccount", "page_sets.login_helpers.facebook_login.LoginWithDesktopSite", "page_sets.login_helpers.google_login.NewLoginGoogleAccount", "page_sets.login_helpers.facebook_login.LoginWithMobileSite", "page_sets.login_helpers.pinterest_login.LoginMobileAccount",...
[((1846, 1968), 'telemetry.util.js_template.Render', 'js_template.Render', (['"""document.querySelectorAll({{ selector }})[{{ index }}]"""'], {'selector': 'self.ITEM_SELECTOR', 'index': 'index'}), "('document.querySelectorAll({{ selector }})[{{ index }}]',\n selector=self.ITEM_SELECTOR, index=index)\n", (1864, 1968)...
""" Implements diversity/similarity calculations for JEWEL """ import numpy as np from scipy.spatial.distance import pdist, squareform from utils.logger import get_logger # Global variable for logging logger = get_logger() # Note for developers: follow the example of `gaussian_similarity` to implement # additional si...
[ "numpy.exp", "scipy.spatial.distance.pdist", "numpy.median", "utils.logger.get_logger" ]
[((211, 223), 'utils.logger.get_logger', 'get_logger', ([], {}), '()\n', (221, 223), False, 'from utils.logger import get_logger\n'), ((2428, 2453), 'numpy.exp', 'np.exp', (['(-(gamma * D) ** 2)'], {}), '(-(gamma * D) ** 2)\n', (2434, 2453), True, 'import numpy as np\n'), ((2275, 2284), 'scipy.spatial.distance.pdist', ...
"""empty message Revision ID: 608a3e948c38 Revises: None Create Date: 2015-12-30 21:43:07.267116 """ # revision identifiers, used by Alembic. revision = '<KEY>' down_revision = None from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql def upgrade(): ### commands auto genera...
[ "alembic.op.drop_table", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.Integer", "sqlalchemy.String", "sqlalchemy.dialects.postgresql.JSON" ]
[((784, 808), 'alembic.op.drop_table', 'op.drop_table', (['"""results"""'], {}), "('results')\n", (797, 808), False, 'from alembic import op\n'), ((628, 657), 'sqlalchemy.PrimaryKeyConstraint', 'sa.PrimaryKeyConstraint', (['"""id"""'], {}), "('id')\n", (651, 657), True, 'import sqlalchemy as sa\n'), ((407, 419), 'sqlal...
# BSD 3-Clause License; see https://github.com/jpivarski/awkward-1.0/blob/master/LICENSE import glob import os import platform import subprocess import sys import distutils.util import multiprocessing import shutil import setuptools import setuptools.command.build_ext import setuptools.command.install from setuptool...
[ "subprocess.check_output", "os.path.exists", "os.listdir", "os.makedirs", "subprocess.check_call", "setuptools.command.install.install.run", "setuptools.find_packages", "os.environ.get", "os.path.join", "multiprocessing.cpu_count", "platform.system", "os.path.isdir", "os.path.abspath", "se...
[((3156, 3172), 'os.path.isdir', 'os.path.isdir', (['x'], {}), '(x)\n', (3169, 3172), False, 'import os\n'), ((3248, 3265), 'platform.system', 'platform.system', ([], {}), '()\n', (3263, 3265), False, 'import platform\n'), ((810, 852), 'setuptools.Extension.__init__', 'Extension.__init__', (['self', 'name'], {'sources'...
#!/usr/bin/env python """Create dataset for predicting lightning using Dataflow. Copyright Google Inc. 2018 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...
[ "numpy.sum", "numpy.arange" ]
[((1124, 1181), 'numpy.arange', 'np.arange', (['self.N15', '(ref.shape[0] - self.N15)', 'self.stride'], {}), '(self.N15, ref.shape[0] - self.N15, self.stride)\n', (1133, 1181), True, 'import numpy as np\n'), ((1191, 1248), 'numpy.arange', 'np.arange', (['self.N15', '(ref.shape[1] - self.N15)', 'self.stride'], {}), '(se...
#!/usr/bin/python3 # -*- coding: utf-8 -*- from rest_framework import serializers from pumpwood_djangoviews.serializers import ( ClassNameField, CustomNestedSerializer, DynamicFieldsModelSerializer) from photo.models import DescriptionImage ######## # List # ######## class SerializerDescriptionImage(DynamicFields...
[ "pumpwood_djangoviews.serializers.ClassNameField", "rest_framework.serializers.IntegerField" ]
[((347, 417), 'rest_framework.serializers.IntegerField', 'serializers.IntegerField', ([], {'source': '"""id"""', 'allow_null': '(True)', 'required': '(False)'}), "(source='id', allow_null=True, required=False)\n", (371, 417), False, 'from rest_framework import serializers\n'), ((436, 452), 'pumpwood_djangoviews.seriali...
# -*- coding: utf-8 -*- # # Copyright (C) 2017 <NAME> <<EMAIL>> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
[ "pickle.dumps", "pickle.loads", "pytest.raises" ]
[((2423, 2440), 'pickle.dumps', 'pickle.dumps', (['obj'], {}), '(obj)\n', (2435, 2440), False, 'import pickle\n'), ((2461, 2482), 'pickle.loads', 'pickle.loads', (['pickled'], {}), '(pickled)\n', (2473, 2482), False, 'import pickle\n'), ((2652, 2675), 'pickle.dumps', 'pickle.dumps', (['unpickled'], {}), '(unpickled)\n'...
# -*- coding: utf-8 -*- u""" Test of cymel.utils.namespace """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import unittest import maya.cmds as cmds from cymel.utils.namespace import Namespace, RelativeNS #----------------------------------...
[ "unittest.TestLoader", "maya.cmds.createNode", "maya.cmds.file", "maya.cmds.objExists", "unittest.TextTestRunner", "cymel.utils.namespace.RelativeNS", "cymel.utils.namespace.Namespace" ]
[((494, 521), 'maya.cmds.file', 'cmds.file', ([], {'f': '(True)', 'new': '(True)'}), '(f=True, new=True)\n', (503, 521), True, 'import maya.cmds as cmds\n'), ((537, 553), 'cymel.utils.namespace.Namespace', 'Namespace', (['"""boo"""'], {}), "('boo')\n", (546, 553), False, 'from cymel.utils.namespace import Namespace, Re...
# Copyright (c) 2018-2021, NVIDIA CORPORATION. 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 ...
[ "mxnet.nd.random.uniform", "math.ceil", "numpy.random.rand", "os.makedirs", "data_loading.dali_loader.get_dali_loader", "os.path.join", "numpy.argsort", "numpy.array", "numpy.zeros", "numpy.random.randint", "multiprocessing.Pool", "mxnet.nd.expand_dims", "mxnet.nd.random.randint", "numpy.a...
[((901, 911), 'numpy.load', 'np.load', (['f'], {}), '(f)\n', (908, 911), True, 'import numpy as np\n'), ((1171, 1177), 'time.time', 'time', ([], {}), '()\n', (1175, 1177), False, 'from time import time\n'), ((1186, 1203), 'multiprocessing.Pool', 'Pool', ([], {'processes': '(8)'}), '(processes=8)\n', (1190, 1203), False...
from pokemon import Pokemon from trainer import Trainer pokemon = Pokemon("Pikachu", 90) print(pokemon.pokemon_details()) trainer = Trainer("Ash") print(trainer.add_pokemon(pokemon)) second_pokemon = Pokemon("Charizard", 110) print(trainer.add_pokemon(second_pokemon)) print(trainer.add_pokemon(second_pokemon)) print(...
[ "trainer.Trainer", "pokemon.Pokemon" ]
[((68, 90), 'pokemon.Pokemon', 'Pokemon', (['"""Pikachu"""', '(90)'], {}), "('Pikachu', 90)\n", (75, 90), False, 'from pokemon import Pokemon\n'), ((134, 148), 'trainer.Trainer', 'Trainer', (['"""Ash"""'], {}), "('Ash')\n", (141, 148), False, 'from trainer import Trainer\n'), ((202, 227), 'pokemon.Pokemon', 'Pokemon', ...
import os import subprocess as sp import sys videoPath = '/Users/shariliu/Documents/HarvardLDS/Studies/DOE-lookit/stim/mp4/' videoFiles = os.listdir(videoPath) for video in videoFiles: (shortname, ext) = os.path.splitext(video) # if ["control"] in shortname: print(shortname) if ext in ['.mp4']: ...
[ "os.path.join", "os.listdir", "os.path.splitext" ]
[((140, 161), 'os.listdir', 'os.listdir', (['videoPath'], {}), '(videoPath)\n', (150, 161), False, 'import os\n'), ((211, 234), 'os.path.splitext', 'os.path.splitext', (['video'], {}), '(video)\n', (227, 234), False, 'import os\n'), ((351, 381), 'os.path.join', 'os.path.join', (['videoPath', 'video'], {}), '(videoPath,...
from datetime import date, timedelta from pathlib import Path import string import unittest from hypothesis import given, example, assume import hypothesis.strategies as st import msutils TEST_DIR = Path(__file__).parent good_names_dir = Path(TEST_DIR, 'sample-names/pass') bad_names_dir = Path(TEST_DIR, 'sample-nam...
[ "hypothesis.example", "hypothesis.strategies.sampled_from", "hypothesis.assume", "msutils.Page", "pathlib.Path", "hypothesis.strategies.integers", "msutils.Page._comparison_keys", "hypothesis.strategies.just", "hypothesis.strategies.characters", "datetime.date", "hypothesis.strategies.booleans",...
[((242, 277), 'pathlib.Path', 'Path', (['TEST_DIR', '"""sample-names/pass"""'], {}), "(TEST_DIR, 'sample-names/pass')\n", (246, 277), False, 'from pathlib import Path\n'), ((294, 329), 'pathlib.Path', 'Path', (['TEST_DIR', '"""sample-names/fail"""'], {}), "(TEST_DIR, 'sample-names/fail')\n", (298, 329), False, 'from pa...
#!/usr/bin/env python3 # # Download NYTimes front covers # https://static01.nyt.com/images/YYYY/MM/DD/nytfrontpage/scannat.pdf import sys, os, datetime, wget #Adapted from https://www.pythonprogramming.in/get-range-of-dates-between-specified-start-and-end-date.html first = datetime.datetime.strptime("2012-07-06", "%...
[ "datetime.datetime.strptime", "os.getcwd", "os.chdir", "sys.exit", "datetime.datetime.today", "datetime.timedelta" ]
[((277, 329), 'datetime.datetime.strptime', 'datetime.datetime.strptime', (['"""2012-07-06"""', '"""%Y-%m-%d"""'], {}), "('2012-07-06', '%Y-%m-%d')\n", (303, 329), False, 'import sys, os, datetime, wget\n'), ((340, 365), 'datetime.datetime.today', 'datetime.datetime.today', ([], {}), '()\n', (363, 365), False, 'import ...
""" This script computes results for the scene graph experiments using the Neural Tree (message passing on H-trees) or the vanilla architectures (message passing on original graphs) with increasing training ratio. The dataset split is generated randomly for each run with fixed random seed so that the dataset splits are...
[ "statistics.mean", "statistics.stdev", "random.seed", "datetime.datetime.now", "os.mkdir", "neural_tree.dataset_loader.StanfordDataset", "os.path.abspath", "neural_tree.utils.base_training_job.BaseTrainingJob" ]
[((728, 789), 'neural_tree.dataset_loader.StanfordDataset', 'StanfordDataset', (["(experiment_dir + '/../data/Stanford3DSG.pkl')"], {}), "(experiment_dir + '/../data/Stanford3DSG.pkl')\n", (743, 789), False, 'from neural_tree.dataset_loader import StanfordDataset\n'), ((694, 716), 'os.path.abspath', 'path.abspath', (['...
from ....app import logger from ....app import db_client from ....validators import validate_json_data from . import v1 from . import queries as q from flask import jsonify, make_response, request from flask_login import login_required, current_user from werkzeug.exceptions import BadRequest, NotFound from crontab impo...
[ "werkzeug.exceptions.NotFound", "re.compile", "crontab.CronTab", "werkzeug.exceptions.BadRequest", "flask.jsonify" ]
[((22364, 22404), 'werkzeug.exceptions.BadRequest', 'BadRequest', (['"""missing configuration item"""'], {}), "('missing configuration item')\n", (22374, 22404), False, 'from werkzeug.exceptions import BadRequest, NotFound\n'), ((22454, 22478), 'werkzeug.exceptions.BadRequest', 'BadRequest', (['"""invalid ci"""'], {}),...
from sklearn.neighbors import KNeighborsClassifier import warnings from utils import predict warnings.filterwarnings('ignore') def knn_train(): model = KNeighborsClassifier(n_neighbors=1) return model def knn_predict(model, X_train, y_train, test, metric_type): y_pred, result = predict.get_prediction...
[ "sklearn.neighbors.KNeighborsClassifier", "warnings.filterwarnings", "utils.predict.get_prediction_with_metric" ]
[((95, 128), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (118, 128), False, 'import warnings\n'), ((160, 195), 'sklearn.neighbors.KNeighborsClassifier', 'KNeighborsClassifier', ([], {'n_neighbors': '(1)'}), '(n_neighbors=1)\n', (180, 195), False, 'from sklearn.neighbors...
# Copyright 2020 Google LLC. 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 a...
[ "tfx.orchestration.portable.launcher.Launcher", "tfx.orchestration.metadata.Metadata", "tfx.utils.telemetry_utils.scoped_labels", "apache_beam.Pipeline", "apache_beam.typehints.with_output_types", "apache_beam.pvalue.AsIter", "absl.logging.info", "apache_beam.typehints.with_input_types", "apache_bea...
[((1066, 1102), 'apache_beam.typehints.with_input_types', 'beam.typehints.with_input_types', (['Any'], {}), '(Any)\n', (1097, 1102), True, 'import apache_beam as beam\n'), ((1104, 1141), 'apache_beam.typehints.with_output_types', 'beam.typehints.with_output_types', (['Any'], {}), '(Any)\n', (1136, 1141), True, 'import ...
from interface import admin_inter, common_inter from lib.common import login_auth import time user_data = {'name': None} def register(): print('注册') if user_data['name']: print('您已登录,无需注册') return while True: name = input('请输入用户名或按(q/Q)退出>>:').strip() if name == 'q' or nam...
[ "lib.common.login_auth", "interface.admin_inter.create_course_interface", "interface.common_inter.login_interface", "time.sleep", "interface.admin_inter.create_school_interface", "interface.admin_inter.register_interface", "interface.admin_inter.create_teacher_interface", "interface.common_inter.take_...
[((1299, 1328), 'lib.common.login_auth', 'login_auth', ([], {'user_type': '"""admin"""'}), "(user_type='admin')\n", (1309, 1328), False, 'from lib.common import login_auth\n'), ((1875, 1904), 'lib.common.login_auth', 'login_auth', ([], {'user_type': '"""admin"""'}), "(user_type='admin')\n", (1885, 1904), False, 'from l...
from fastapi.testclient import TestClient from app import app import json import psycopg2 import random import string import base64 from cryptography.hazmat.primitives import serialization, hashes from cryptography.hazmat.primitives.asymmetric import padding, rsa from cryptography.hazmat.backends import default_backend...
[ "psycopg2.connect", "bcrypt.gensalt" ]
[((433, 512), 'psycopg2.connect', 'psycopg2.connect', (['"""dbname=\'auth_db\' user=\'auth_db\' host=\'auth_db\' [redacted-2]"""'], {}), '("dbname=\'auth_db\' user=\'auth_db\' host=\'auth_db\' [redacted-2]")\n', (449, 512), False, 'import psycopg2\n'), ((702, 718), 'bcrypt.gensalt', 'bcrypt.gensalt', ([], {}), '()\n', ...
""" helper of plyer.battery """ __all__ = [ 'battery_status' ] import ctypes from package_making_practice.platforms.windows.libs import win_api_defs def battery_status(): """ implementation of windows API :return: """ status = win_api_defs.SYSTEM_POWER_STATUS() if not win_api_defs.GetSys...
[ "package_making_practice.platforms.windows.libs.win_api_defs.SYSTEM_POWER_STATUS", "ctypes.pointer" ]
[((255, 289), 'package_making_practice.platforms.windows.libs.win_api_defs.SYSTEM_POWER_STATUS', 'win_api_defs.SYSTEM_POWER_STATUS', ([], {}), '()\n', (287, 289), False, 'from package_making_practice.platforms.windows.libs import win_api_defs\n'), ((335, 357), 'ctypes.pointer', 'ctypes.pointer', (['status'], {}), '(sta...
#!/usr/bin/python # Copyright (c) 2020, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. """Provide Module Description """ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# __author__ = ["<NA...
[ "common.ociLogging.getLogger", "json.loads", "os.path.exists", "xml.etree.ElementTree.parse", "jinja2.Environment", "os.makedirs", "yaml.dump", "yaml.safe_dump", "json.dumps", "yaml.load", "jinja2.Template", "os.path.dirname", "yaml.safe_load", "json.load", "jinja2.FileSystemLoader", "...
[((684, 695), 'common.ociLogging.getLogger', 'getLogger', ([], {}), '()\n', (693, 695), False, 'from common.ociLogging import getLogger\n'), ((743, 762), 'yaml.dump', 'yaml.dump', (['varsyaml'], {}), '(varsyaml)\n', (752, 762), False, 'import yaml\n'), ((2724, 2749), 'os.path.dirname', 'os.path.dirname', (['filename'],...
from setuptools import setup with open('README.md') as readme_file: long_description = readme_file.read() setup( name="otto-bot", version="0.0.3", packages=['otto'], install_requires=["twilio==6.26.1", "click==7"], python_requires='>=3.6', long_description=long_description, long_desc...
[ "setuptools.setup" ]
[((114, 717), 'setuptools.setup', 'setup', ([], {'name': '"""otto-bot"""', 'version': '"""0.0.3"""', 'packages': "['otto']", 'install_requires': "['twilio==6.26.1', 'click==7']", 'python_requires': '""">=3.6"""', 'long_description': 'long_description', 'long_description_content_type': '"""text/markdown"""', 'url': '"""...
from sqlalchemy import Column, Integer, String, Boolean, Float from sqlalchemy.orm import declarative_base Base = declarative_base() class Movie(Base): __tablename__ = 'movies' id = Column(Integer, primary_key = True) pic_link = Column(String) director = Column(String) movie_name = Column(String) release_...
[ "sqlalchemy.orm.declarative_base", "sqlalchemy.Column" ]
[((115, 133), 'sqlalchemy.orm.declarative_base', 'declarative_base', ([], {}), '()\n', (131, 133), False, 'from sqlalchemy.orm import declarative_base\n'), ((188, 221), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (194, 221), False, 'from sqlalchemy import Co...
import logging import tqdm from multiprocessing import Pool import numpy as np from dsrt.config.defaults import DataConfig class Masker: def __init__(self, vectorizer, properties=None, parallel=True, config=DataConfig()): self.properties = properties self.parallel = parallel self.config = c...
[ "logging.getLogger", "dsrt.config.defaults.DataConfig", "multiprocessing.Pool" ]
[((212, 224), 'dsrt.config.defaults.DataConfig', 'DataConfig', ([], {}), '()\n', (222, 224), False, 'from dsrt.config.defaults import DataConfig\n'), ((494, 513), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (511, 513), False, 'import logging\n'), ((820, 826), 'multiprocessing.Pool', 'Pool', ([], {}), '(...
import certifi import datetime import json import logging import os import posixpath import threading import urllib.request, urllib.parse, urllib.error import urllib.parse import socket from time import mktime from email.utils import formatdate from http.server import HTTPServer from http.server import SimpleHTTPReque...
[ "logging.getLogger", "socket.socket", "io.BytesIO", "xml.etree.ElementTree.Element", "xml.etree.ElementTree.ElementTree", "datetime.datetime.now", "email.utils.formatdate", "os.path.abspath", "os.system" ]
[((814, 841), 'logging.getLogger', 'logging.getLogger', (['"""client"""'], {}), "('client')\n", (831, 841), False, 'import logging\n'), ((885, 910), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (900, 910), False, 'import os\n'), ((2909, 2931), 'xml.etree.ElementTree.Element', 'et.Element', ...
import twisted from klein import Klein from klein.resource import KleinResource from klein.test.util import TestCase from .test_resource import LeafResource, _render, requestMock class PY3KleinResourceTests(TestCase): def assertFired(self, deferred, result=None): """ Assert that the given defer...
[ "klein.Klein", "klein.resource.KleinResource" ]
[((493, 500), 'klein.Klein', 'Klein', ([], {}), '()\n', (498, 500), False, 'from klein import Klein\n'), ((520, 538), 'klein.resource.KleinResource', 'KleinResource', (['app'], {}), '(app)\n', (533, 538), False, 'from klein.resource import KleinResource\n')]
""" Common test cases for parser & evaljs """ import functools import operator def extract(expressions): """Extract expressions from multi-line strings""" return ( line for line in expressions.splitlines() if line.strip() and not line.startswith("#") ) class Bunch: """A simpl...
[ "functools.reduce" ]
[((755, 791), 'functools.reduce', 'functools.reduce', (['operator.mul', 'args'], {}), '(operator.mul, args)\n', (771, 791), False, 'import functools\n')]
import os import pusher import hashlib from dotenv import load_dotenv from flask import Blueprint, request from flask_login import login_required, current_user from models import Session project_folder = os.path.dirname(os.path.abspath(__file__)) load_dotenv(os.path.join(project_folder, os.pardir, 'app-env')) pus...
[ "os.getenv", "os.path.join", "os.path.abspath", "flask.Blueprint", "models.Session.query.filter_by" ]
[((329, 358), 'flask.Blueprint', 'Blueprint', (['"""pusher"""', '__name__'], {}), "('pusher', __name__)\n", (338, 358), False, 'from flask import Blueprint, request\n'), ((224, 249), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (239, 249), False, 'import os\n'), ((263, 313), 'os.path.join',...
# -*- coding: utf-8 -*- import numpy as np from scipy import constants def B21(A21,nu): '''Returns the Einstein B21 coefficient for stimulated emission, computed from the Einstein A21 coefficient and the frequency nu.''' return constants.c**2/(2*constants.h*nu**3)*A21 def B12(A21,nu,g1,g2): '''Einste...
[ "numpy.abs", "numpy.where", "numpy.log", "numpy.exp", "numpy.array", "numpy.errstate", "numpy.isnan", "numpy.zeros_like" ]
[((909, 920), 'numpy.array', 'np.array', (['T'], {}), '(T)\n', (917, 920), True, 'import numpy as np\n'), ((1755, 1772), 'numpy.zeros_like', 'np.zeros_like', (['nu'], {}), '(nu)\n', (1768, 1772), True, 'import numpy as np\n'), ((2325, 2338), 'numpy.abs', 'np.abs', (['(a - b)'], {}), '(a - b)\n', (2331, 2338), True, 'im...
__author__ = 'zeroonehacker' from django import forms from django.contrib.auth.models import User from .models import UserDetails1,UserDetails2 class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput(attrs={'size':'50','pattern':'.{8,}','title':'8 characters minimum','placeholder':'8...
[ "django.forms.HiddenInput", "django.forms.DateInput", "django.forms.PasswordInput", "django.forms.FileInput", "django.forms.EmailInput", "django.forms.TextInput" ]
[((216, 353), 'django.forms.PasswordInput', 'forms.PasswordInput', ([], {'attrs': "{'size': '50', 'pattern': '.{8,}', 'title': '8 characters minimum',\n 'placeholder': '8 characters minimum'}"}), "(attrs={'size': '50', 'pattern': '.{8,}', 'title':\n '8 characters minimum', 'placeholder': '8 characters minimum'})\...
"""Support functions for testing.""" import os import sys TESTDIR = os.path.abspath(os.path.dirname(__file__)) SRCDIR = os.path.join(os.path.dirname(TESTDIR), 'src') sys.path.insert(0, SRCDIR) import html5prescan.scan as scan # noqa E402 import not at the top, F401 'scan' not used del sys.path[0] DATAFILES = ( ...
[ "os.path.dirname", "sys.path.insert", "os.path.join", "os.path.basename" ]
[((169, 195), 'sys.path.insert', 'sys.path.insert', (['(0)', 'SRCDIR'], {}), '(0, SRCDIR)\n', (184, 195), False, 'import sys\n'), ((87, 112), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (102, 112), False, 'import os\n'), ((136, 160), 'os.path.dirname', 'os.path.dirname', (['TESTDIR'], {}),...
"""Removed some useless tables from tb_command Revision ID: 496dba8300a Revises: <KEY> Create Date: 2015-12-13 01:09:31.940434 """ # revision identifiers, used by Alembic. revision = '496dba8300a' down_revision = '<KEY>' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa from sqla...
[ "alembic.op.drop_column", "sqlalchemy.dialects.mysql.DATETIME" ]
[((433, 472), 'alembic.op.drop_column', 'op.drop_column', (['"""tb_command"""', '"""created"""'], {}), "('tb_command', 'created')\n", (447, 472), False, 'from alembic import op\n'), ((477, 521), 'alembic.op.drop_column', 'op.drop_column', (['"""tb_command"""', '"""last_updated"""'], {}), "('tb_command', 'last_updated')...
"""Unit test for RemoteValueString objects.""" import asyncio import unittest from xknx import XKNX from xknx.dpt import DPTArray, DPTBinary from xknx.exceptions import ConversionError, CouldNotParseTelegram from xknx.remote_value import RemoteValueString from xknx.telegram import GroupAddress, Telegram class TestRe...
[ "xknx.dpt.DPTArray", "xknx.XKNX", "asyncio.new_event_loop", "xknx.remote_value.RemoteValueString", "xknx.telegram.GroupAddress", "xknx.dpt.DPTBinary", "asyncio.set_event_loop" ]
[((483, 507), 'asyncio.new_event_loop', 'asyncio.new_event_loop', ([], {}), '()\n', (505, 507), False, 'import asyncio\n'), ((516, 549), 'asyncio.set_event_loop', 'asyncio.set_event_loop', (['self.loop'], {}), '(self.loop)\n', (538, 549), False, 'import asyncio\n'), ((738, 744), 'xknx.XKNX', 'XKNX', ([], {}), '()\n', (...
# <NAME>, <NAME> # Introduction to Data Structures and Algorithms in Python # Copyright 2005 # import unittest # this implementation of binary heap takes key value pairs, # we will assume that the keys are all comparable class PriorityQueue: def __init__(self): self.heapArray = [(0, 0)] self.cur...
[ "unittest.main" ]
[((3352, 3367), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3365, 3367), False, 'import unittest\n')]
import os import errno import logging from datetime import datetime from logging.handlers import TimedRotatingFileHandler def make_sure_path_exists(path): try: os.makedirs(path) except OSError as exception: if exception.errno != errno.EEXIST: raise def create_handlers(log_fname=...
[ "logging.getLogger", "logging.StreamHandler", "logging.debug", "os.makedirs", "logging.Formatter", "os.path.join", "logging.warning", "os.getcwd", "datetime.datetime.now", "logging.handlers.TimedRotatingFileHandler", "logging.critical", "logging.info", "logging.error" ]
[((842, 865), 'logging.StreamHandler', 'logging.StreamHandler', ([], {}), '()\n', (863, 865), False, 'import logging\n'), ((959, 1018), 'logging.Formatter', 'logging.Formatter', (['"""%(name)s - %(levelname)s - %(message)s"""'], {}), "('%(name)s - %(levelname)s - %(message)s')\n", (976, 1018), False, 'import logging\n'...
import logging import os import time import warnings from collections import OrderedDict from datetime import datetime import numpy as np from pandas import DataFrame from pandas_gbq.exceptions import AccessDenied logger = logging.getLogger(__name__) BIGQUERY_INSTALLED_VERSION = None SHOW_VERBOSE_DEPRECATION = Fa...
[ "logging.getLogger", "google.cloud.bigquery.QueryJobConfig.from_api_repr", "pandas_gbq.load.load_chunks", "google.cloud.bigquery.SchemaField.from_api_repr", "pandas_gbq.exceptions.AccessDenied", "tqdm.tqdm", "os.environ.get", "datetime.datetime.now", "pkg_resources.parse_version", "google.cloud.bi...
[((227, 254), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (244, 254), False, 'import logging\n'), ((761, 798), 'pkg_resources.parse_version', 'pkg_resources.parse_version', (['"""0.32.0"""'], {}), "('0.32.0')\n", (788, 798), False, 'import pkg_resources\n'), ((1468, 1505), 'pkg_resourc...
from pytonik.Model import Model from pytonik.Session import Session from pytonik.Functions.path import path class Users(Model, path): def __getattr__(self, item): return item def __call__(self, *args, **kwargs): return None def __init__(self, *args, **kwargs): self.Sessio...
[ "pytonik.Session.Session" ]
[((324, 333), 'pytonik.Session.Session', 'Session', ([], {}), '()\n', (331, 333), False, 'from pytonik.Session import Session\n')]