code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from socket import create_connection from django.db import models from django.utils import timezone class Slave(models.Model): def __str__(self): return self.ip + str(self.port) ip = models.GenericIPAddressField() port = models.IntegerField() busy = models.BooleanField(default=False) def...
[ "socket.create_connection", "django.db.models.CharField", "django.db.models.BooleanField", "django.db.models.GenericIPAddressField", "django.db.models.IntegerField", "django.db.models.DateTimeField" ]
[((202, 232), 'django.db.models.GenericIPAddressField', 'models.GenericIPAddressField', ([], {}), '()\n', (230, 232), False, 'from django.db import models\n'), ((244, 265), 'django.db.models.IntegerField', 'models.IntegerField', ([], {}), '()\n', (263, 265), False, 'from django.db import models\n'), ((277, 311), 'djang...
import numpy as np from numpy import vectorize import scipy.optimize as so @vectorize def U(c, h, kappa, nu): if c<=0: u = -np.inf elif c>0: u = np.log(c) - (kappa*h**(1+1/nu))/((1+1/nu)) return u class rep_ag: def __init__(self, theta, beta, delta, kappa, nu, kmin, kmax, ...
[ "scipy.optimize.minimize", "numpy.vectorize", "numpy.flip", "numpy.log", "numpy.abs", "numpy.arange", "numpy.array", "numpy.cos", "numpy.linalg.inv", "numpy.vstack" ]
[((732, 757), 'numpy.vectorize', 'np.vectorize', (['(lambda x: 1)'], {}), '(lambda x: 1)\n', (744, 757), True, 'import numpy as np\n'), ((774, 799), 'numpy.vectorize', 'np.vectorize', (['(lambda x: x)'], {}), '(lambda x: x)\n', (786, 799), True, 'import numpy as np\n'), ((1378, 1395), 'numpy.arange', 'np.arange', (['(0...
# Copyright 2021 Zilliz. 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 agree...
[ "unittest.main", "pathlib.Path.home", "towhee.engine.engine.EngineConfig", "towhee._get_pipeline_cache", "pathlib.Path" ]
[((2512, 2527), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2525, 2527), False, 'import unittest\n'), ((969, 983), 'towhee.engine.engine.EngineConfig', 'EngineConfig', ([], {}), '()\n', (981, 983), False, 'from towhee.engine.engine import EngineConfig\n'), ((2155, 2180), 'towhee._get_pipeline_cache', '_get_pip...
import tensorflow as tf import platform def os_info(): return { 'machine': platform.machine(), 'node': platform.node(), 'os': platform.platform(), 'cuda': tf.test.is_built_with_cuda() }
[ "tensorflow.test.is_built_with_cuda", "platform.machine", "platform.node", "platform.platform" ]
[((88, 106), 'platform.machine', 'platform.machine', ([], {}), '()\n', (104, 106), False, 'import platform\n'), ((124, 139), 'platform.node', 'platform.node', ([], {}), '()\n', (137, 139), False, 'import platform\n'), ((155, 174), 'platform.platform', 'platform.platform', ([], {}), '()\n', (172, 174), False, 'import pl...
import unittest import nwcpp class VariablesTestCase(unittest.TestCase): def test_variable_declarations(self): dag = nwcpp.Dataflow() a = dag.declare_variable('a') with self.assertRaises(RuntimeError): # duplicate name dag.declare_variable('a') b = dag.decl...
[ "unittest.main", "nwcpp.Dataflow" ]
[((2571, 2586), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2584, 2586), False, 'import unittest\n'), ((132, 148), 'nwcpp.Dataflow', 'nwcpp.Dataflow', ([], {}), '()\n', (146, 148), False, 'import nwcpp\n'), ((393, 409), 'nwcpp.Dataflow', 'nwcpp.Dataflow', ([], {}), '()\n', (407, 409), False, 'import nwcpp\n'),...
### tf-nightly-2.2.0.dev20200418 import tensorflow as tf # Weight Quantization - Input/Output=float32 converter = tf.lite.TFLiteConverter.from_saved_model('./saved_model') converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE] converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS,tf.lite.OpsSe...
[ "tensorflow.lite.TFLiteConverter.from_saved_model" ]
[((116, 173), 'tensorflow.lite.TFLiteConverter.from_saved_model', 'tf.lite.TFLiteConverter.from_saved_model', (['"""./saved_model"""'], {}), "('./saved_model')\n", (156, 173), True, 'import tensorflow as tf\n')]
# vim: expandtab tabstop=4 shiftwidth=4 from numpy import ndarray import matplotlib.pyplot as plt def plot_complex(*args, **kwargs): ''' Plots complex data in the complex plane. Parameters ---------- args: array_like The complex arrays to plot kwargs: dict Parameters passed t...
[ "matplotlib.pyplot.plot" ]
[((562, 591), 'matplotlib.pyplot.plot', 'plt.plot', (['*plotargs'], {}), '(*plotargs, **kwargs)\n', (570, 591), True, 'import matplotlib.pyplot as plt\n')]
"""Implements sauce lab login checkout first step.""" from enum import Enum from selenium.webdriver.remote.webdriver import WebDriver from module_06.src.elements.base_page_element import BasePageElement from module_06.src.elements.header import Header from module_06.src.elements.inventory_items import InventoryItems fr...
[ "module_06.src.elements.checkout_info.ContactCheckout", "module_06.src.pages.cart.CartPage", "module_06.src.elements.header.Header" ]
[((1117, 1144), 'module_06.src.elements.checkout_info.ContactCheckout', 'ContactCheckout', (['self._wait'], {}), '(self._wait)\n', (1132, 1144), False, 'from module_06.src.elements.checkout_info import ContactCheckout\n'), ((1167, 1185), 'module_06.src.elements.header.Header', 'Header', (['self._wait'], {}), '(self._wa...
#!/usr/bin/env python """Author: <NAME>""" import math import cgi from pyiem.util import ssw def createCircleAroundWithRadius(lat, lon, radiusMiles): """Create circle.""" latArray = [] lonArray = [] for brng in range(0, 360): lat2, lon2 = getLocation(lat, lon, brng, radiusMiles) latA...
[ "pyiem.util.ssw", "cgi.FieldStorage", "math.cos", "math.sin" ]
[((1189, 1207), 'cgi.FieldStorage', 'cgi.FieldStorage', ([], {}), '()\n', (1205, 1207), False, 'import cgi\n'), ((1212, 1259), 'pyiem.util.ssw', 'ssw', (['"""Content-type: application/octet-stream\n"""'], {}), "('Content-type: application/octet-stream\\n')\n", (1215, 1259), False, 'from pyiem.util import ssw\n'), ((126...
from random import randint as rint from sys import stderr, exit wordlist = [] GREEN, YELLOW, GRAY = ('0', '1', '2') def info(): """ Wordle Game Solver https://www.nytimes.com/games/wordle/index.html Created by Leo (<NAME>), 2022 Any sugg...
[ "sys.stderr.write", "sys.exit" ]
[((2750, 2783), 'sys.stderr.write', 'stderr.write', (['"""Invalid result!\n"""'], {}), "('Invalid result!\\n')\n", (2762, 2783), False, 'from sys import stderr, exit\n'), ((2792, 2800), 'sys.exit', 'exit', (['(-1)'], {}), '(-1)\n', (2796, 2800), False, 'from sys import stderr, exit\n')]
import pandas as pd from .ols_estimator import OLSEstimator ols = OLSEstimator(pd.read_csv("./data/listings_summary.csv")) ols.clean_data() ols.calculate_models() ols.output_latex()
[ "pandas.read_csv" ]
[((81, 123), 'pandas.read_csv', 'pd.read_csv', (['"""./data/listings_summary.csv"""'], {}), "('./data/listings_summary.csv')\n", (92, 123), True, 'import pandas as pd\n')]
import dataparser as dp import sqlite3 import os.path import re from datetime import date ''' { "boardName1":{ "post1_SN":[SN,board,title,author,date,content] "post2_SN":[SN,board,title,author,date,content] } "boardName2":{ "post1_SN":[SN,boar...
[ "dataparser.Data_Parser.__init__", "dataparser.CommandListener", "sqlite3.connect", "datetime.date.today" ]
[((1558, 1582), 'sqlite3.connect', 'sqlite3.connect', (['db_path'], {}), '(db_path)\n', (1573, 1582), False, 'import sqlite3\n'), ((1938, 1962), 'sqlite3.connect', 'sqlite3.connect', (['db_path'], {}), '(db_path)\n', (1953, 1962), False, 'import sqlite3\n'), ((2222, 2246), 'sqlite3.connect', 'sqlite3.connect', (['db_pa...
from PySide.QtCore import QObject, Signal, Slot from string import Template import os EVENT_TEMPLATE = Template(""" py_${func} = function() { py_ace_editor.${func}(${args}); } editor.${target}.on("${event_name}", py_${func}); """) BINDING_TEMPLATE = Template(""" py_ace_editor.${signal}.connect...
[ "PySide.QtCore.Slot", "PySide.QtCore.Signal", "string.Template" ]
[((104, 261), 'string.Template', 'Template', (['"""\n py_${func} = function() {\n py_ace_editor.${func}(${args});\n }\n editor.${target}.on("${event_name}", py_${func});\n"""'], {}), '(\n """\n py_${func} = function() {\n py_ace_editor.${func}(${args});\n }\n editor.${target}.on("${ev...
import logging import nodes from .. import exceptions from ..lexer import tokens import traceback import sys class SyntaxTree(object): def _debug(self, text, *args): if type(text) != str: text = repr(text) logging.debug(("<Line %d, Token %d> " % (self.line_num, self.token_counter)) + t...
[ "nodes.BooleanNode", "nodes.ReturnNode", "logging.error", "logging.debug", "nodes.ListNode", "nodes.DictionaryNode", "nodes.VariableNode", "nodes.Branch", "nodes.IfNode", "nodes.NumberNode", "nodes.InvocationNode", "nodes.NopNode", "nodes.ForNode", "nodes.FunctionNode", "nodes.WhileNode"...
[((240, 333), 'logging.debug', 'logging.debug', (["('<Line %d, Token %d> ' % (self.line_num, self.token_counter) + text)", '*args'], {}), "('<Line %d, Token %d> ' % (self.line_num, self.token_counter) +\n text, *args)\n", (253, 333), False, 'import logging\n'), ((1370, 1386), 'nodes.Branch', 'nodes.Branch', (['[]'],...
import Colour import Font import OutputFunctions from Definitions import * from graphics.cairo import Draw from math import ceil from graphics.cairo.Draw import FillStyle, TextStyle class Paper: def __init__(self, width=63*mm, height=39*mm, marker=None): self.width = width self.height = height ...
[ "graphics.cairo.Draw.FillStyle", "math.ceil", "graphics.cairo.Draw.load_image", "OutputFunctions.draw_centered_lines", "graphics.cairo.Draw.TextStyle", "graphics.cairo.Draw.Canvas" ]
[((340, 374), 'graphics.cairo.Draw.Canvas', 'Draw.Canvas', (['(0, 0)', 'width', 'height'], {}), '((0, 0), width, height)\n', (351, 374), False, 'from graphics.cairo import Draw\n'), ((743, 762), 'math.ceil', 'ceil', (['(large / small)'], {}), '(large / small)\n', (747, 762), False, 'from math import ceil\n'), ((2133, 2...
import cacheL1 import cacheL1Controller import clock import threading import random from time import sleep class core: isa = ['read', 'write', 'calc'] state = 'awake' class processor(threading.Thread): countInstructions = 1 processTime = 1 def __init__(self, coreID, chipID, clock...
[ "threading.Thread.__init__", "threading.Condition", "random.randrange", "time.sleep" ]
[((573, 594), 'threading.Condition', 'threading.Condition', ([], {}), '()\n', (592, 594), False, 'import threading\n'), ((698, 729), 'threading.Thread.__init__', 'threading.Thread.__init__', (['self'], {}), '(self)\n', (723, 729), False, 'import threading\n'), ((770, 793), 'time.sleep', 'sleep', (['self.processTime'], ...
import os import sqlite3 import pandas as pd import numpy as np from .pybash import get_file_info def connect_to_db(path): """ Interact with a SQLite database Parameters ---------- path: str Location of the SQLite database Returns ------- conn: Connector The SQLite co...
[ "pandas.read_csv", "sqlite3.connect", "os.path.exists", "numpy.ceil" ]
[((1773, 1801), 'os.path.exists', 'os.path.exists', (['path_to_file'], {}), '(path_to_file)\n', (1787, 1801), False, 'import os\n'), ((486, 506), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (500, 506), False, 'import os\n'), ((574, 595), 'sqlite3.connect', 'sqlite3.connect', (['path'], {}), '(path)\...
import json from collections import namedtuple def _json_object_hook(d): return namedtuple('X', d.keys())(*d.values()) def json2obj(data): a = json.dumps(data) return json.loads(a, object_hook=_json_object_hook)
[ "json.loads", "json.dumps" ]
[((149, 165), 'json.dumps', 'json.dumps', (['data'], {}), '(data)\n', (159, 165), False, 'import json\n'), ((175, 219), 'json.loads', 'json.loads', (['a'], {'object_hook': '_json_object_hook'}), '(a, object_hook=_json_object_hook)\n', (185, 219), False, 'import json\n')]
""" script to matrix normalization """ from functools import reduce import math as m import numpy as np def minmax_normalization(x, type): """ :param x: column of matrix data :param type: type of normalization :return: min max normalized column of matrix data """ if min(x) == max(x): ...
[ "functools.reduce", "numpy.log", "numpy.ones", "math.log" ]
[((1453, 1482), 'functools.reduce', 'reduce', (['(lambda a, b: a * b)', 'x'], {}), '(lambda a, b: a * b, x)\n', (1459, 1482), False, 'from functools import reduce\n'), ((328, 344), 'numpy.ones', 'np.ones', (['x.shape'], {}), '(x.shape)\n', (335, 344), True, 'import numpy as np\n'), ((1577, 1586), 'numpy.log', 'np.log',...
""" Fix from Twisted r23970 """ from twisted.internet.task import deferLater from twisted.protocols.loopback import _loopbackAsyncBody def _loopbackAsyncContinue(ignored, server, serverToClient, client, clientToServer): # Clear the Deferred from each message queue, since it has already fired # and cannot be ...
[ "twisted.internet.task.deferLater" ]
[((707, 801), 'twisted.internet.task.deferLater', 'deferLater', (['reactor', '(0)', '_loopbackAsyncBody', 'server', 'serverToClient', 'client', 'clientToServer'], {}), '(reactor, 0, _loopbackAsyncBody, server, serverToClient, client,\n clientToServer)\n', (717, 801), False, 'from twisted.internet.task import deferLa...
# Library used to return the content of a URL from urllib.request import Request, urlopen # Library to decode text to JSON import json class SW_stops_amount: def __init__(self): pass # Decodes the consumables def calc(self, strConsumables): intHOURS_IN_YEAR = 8760 int...
[ "urllib.request.Request", "urllib.request.urlopen" ]
[((2826, 2896), 'urllib.request.Request', 'Request', (['strURL_SWAPI_STARSHIPS'], {'headers': "{'User-Agent': 'Mozilla/5.0'}"}), "(strURL_SWAPI_STARSHIPS, headers={'User-Agent': 'Mozilla/5.0'})\n", (2833, 2896), False, 'from urllib.request import Request, urlopen\n'), ((2920, 2932), 'urllib.request.urlopen', 'urlopen',...
import re from typing import List, NamedTuple, Optional, Tuple from docutils import nodes from docutils.parsers.rst import directives from docutils.statemachine import StringList from sphinx import addnodes from sphinx.application import Sphinx from sphinx.util.docutils import SphinxDirective from sphinx.util.logging ...
[ "sphinx.util.logging.getLogger", "docutils.nodes.reference", "docutils.nodes.Text", "docutils.nodes.image", "re.compile" ]
[((510, 529), 'sphinx.util.logging.getLogger', 'getLogger', (['__name__'], {}), '(__name__)\n', (519, 529), False, 'from sphinx.util.logging import getLogger\n'), ((617, 644), 're.compile', 're.compile', (['"""^\\\\^{3,}\\\\s*$"""'], {}), "('^\\\\^{3,}\\\\s*$')\n", (627, 644), False, 'import re\n'), ((659, 686), 're.co...
import os from resqueue import utils class Matlab(object): """ very preliminary, initial matlab class to support matlab computing """ def __init__(self, matfile, cmd=None): self.matfile = matfile self.cmd = cmd def _file_exists(self): if not os.path.isfile(self.matfile...
[ "os.getcwd", "os.path.isfile", "os.path.dirname" ]
[((293, 321), 'os.path.isfile', 'os.path.isfile', (['self.matfile'], {}), '(self.matfile)\n', (307, 321), False, 'import os\n'), ((830, 859), 'os.path.dirname', 'os.path.dirname', (['self.matfile'], {}), '(self.matfile)\n', (845, 859), False, 'import os\n'), ((1280, 1291), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1...
# Copyright (c) 2021 <NAME> <<EMAIL>> # This file is part of the "cgitize" project. # For details, see https://github.com/egor-tensin/cgitize. # Distributed under the MIT License. from contextlib import contextmanager import os from cgitize import utils GIT_ENV = os.environ.copy() GIT_ENV['GIT_SSH_COMMAND'] = 'ssh ...
[ "cgitize.utils.try_run", "cgitize.utils.protected_file", "os.environ.copy", "cgitize.utils.try_run_capture", "os.path.exists", "os.path.expanduser" ]
[((268, 285), 'os.environ.copy', 'os.environ.copy', ([], {}), '()\n', (283, 285), False, 'import os\n'), ((521, 546), 'os.path.exists', 'os.path.exists', (['self.path'], {}), '(self.path)\n', (535, 546), False, 'import os\n'), ((4475, 4527), 'cgitize.utils.try_run', 'utils.try_run', (['Git.EXE', '*args'], {'env': 'GIT_...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Callable, Dict, List from gym.spaces import Space from compiler_gym.service import observation2py, observation_t from comp...
[ "compiler_gym.service.proto.ObservationRequest", "compiler_gym.views.observation_space_spec.ObservationSpaceSpec.from_proto", "compiler_gym.views.observation_space_spec.ObservationSpaceSpec" ]
[((1779, 1886), 'compiler_gym.service.proto.ObservationRequest', 'ObservationRequest', ([], {'session_id': 'self.session_id', 'observation_space': 'self.spaces[observation_space].index'}), '(session_id=self.session_id, observation_space=self.\n spaces[observation_space].index)\n', (1797, 1886), False, 'from compiler...
import torch from torch.autograd import Variable import torch.nn as nn from torchvision import datasets, transforms from torch.utils.data import DataLoader import torch.optim as optim import math import numpy as np import os import torch.nn.functional as F import torch.nn.init as init import matplotlib.pyplot as plt ...
[ "torch.nn.functional.binary_cross_entropy", "torch.nn.ReLU", "torch.nn.ConvTranspose2d", "torch.utils.data.DataLoader", "warnings.filterwarnings", "torch.load", "torch.nn.Conv2d", "torch.nn.CrossEntropyLoss", "torch.randn", "torch.nn.Sigmoid", "torch.nn.init.normal", "torch.max", "torch.cuda...
[((360, 393), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {}), "('ignore')\n", (383, 393), False, 'import warnings\n'), ((3431, 3456), 'torch.cuda.is_available', 'torch.cuda.is_available', ([], {}), '()\n', (3454, 3456), False, 'import torch\n'), ((3862, 3923), 'torch.utils.data.DataLoader'...
import math from quick_sort import quick_sort import numpy import time import matplotlib.pyplot as plt def binary_search(sortedarray, key): left = 0 right = len(sortedarray) - 1 while left <= right: mid = math.floor((left + right) / 2) if key == sortedarray[mid]: return mid else: if key < sortedarray[mi...
[ "math.floor" ]
[((211, 241), 'math.floor', 'math.floor', (['((left + right) / 2)'], {}), '((left + right) / 2)\n', (221, 241), False, 'import math\n')]
# Copyright (c) 2011 - 2017, Intel Corporation. # # 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 agre...
[ "reporting.reporting_server.XMLReportingServer", "os.path.dirname", "pytest.fixture", "reporting.reporting_server.imp_plugins" ]
[((887, 907), 'reporting.reporting_server.XMLReportingServer', 'XMLReportingServer', ([], {}), '()\n', (905, 907), False, 'from reporting.reporting_server import XMLReportingServer, imp_plugins\n'), ((911, 957), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""function"""', 'autouse': '(True)'}), "(scope='functio...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' data4models.py # Sentiment Indentification for Roman Urdu ''' import numpy as np import pandas as pd class Data: # Constructor def __init__( self, config ): self.config = config def split( self, df ): ''' Sp...
[ "numpy.shape", "numpy.arange", "numpy.delete", "numpy.random.choice" ]
[((927, 947), 'numpy.arange', 'np.arange', (['n_dataset'], {}), '(n_dataset)\n', (936, 947), True, 'import numpy as np\n'), ((976, 1031), 'numpy.random.choice', 'np.random.choice', (['index_data', 'n_training'], {'replace': '(False)'}), '(index_data, n_training, replace=False)\n', (992, 1031), True, 'import numpy as np...
# -*- coding: utf-8 -*- """ Created on Wed Jul 4 22:46:11 2018 """ import BTC_P2PKH_sigvef as bv # verifying two P2PKH Bitcoin signed messages address = 'bitcoin:16vqGo3KRKE9kTsTZxKoJKLzwZGTodK3ce' signature = ('HPDs1TesA48a9up4QORIuub67VHBM37X66skAYz0Esg23gdfMu'+ 'CTYDFORc6XGpKZ2/flJ2h/DUF569FJxGoVZ50=') me...
[ "BTC_P2PKH_sigvef.sig_vef_P2PKH" ]
[((344, 389), 'BTC_P2PKH_sigvef.sig_vef_P2PKH', 'bv.sig_vef_P2PKH', (['address', 'signature', 'message'], {}), '(address, signature, message)\n', (360, 389), True, 'import BTC_P2PKH_sigvef as bv\n'), ((561, 609), 'BTC_P2PKH_sigvef.sig_vef_P2PKH', 'bv.sig_vef_P2PKH', (['address2', 'signature2', 'message2'], {}), '(addre...
''' basic blueprint routes for interacting with an AG ''' # import third party modules import re from flask import Blueprint, request, jsonify, g, url_for, flash, redirect from sqlalchemy.sql import exists, and_ from werkzeug.exceptions import BadRequest, PreconditionFailed # import database instance from app.models i...
[ "flask.flash", "werkzeug.exceptions.BadRequest", "sqlalchemy.sql.and_", "app.util.assocations.requires_mentor", "flask.url_for", "flask.jsonify", "app.models.db.session.commit", "app.util.assocations.requires_member_association", "flask.request.args.get", "app.models.db.session.query", "app.app....
[((1014, 1043), 'flask.Blueprint', 'Blueprint', (['"""ag_api"""', '__name__'], {}), "('ag_api', __name__)\n", (1023, 1043), False, 'from flask import Blueprint, request, jsonify, g, url_for, flash, redirect\n'), ((1082, 1147), 'app.app.register_blueprint', 'app.register_blueprint', (['invitations.bp'], {'url_prefix': '...
from typing import List, Optional, Tuple from framework import CardGroup, CardType, DeckList, Disruption, Manager, Card, Game class InvokedDragoonManager(Manager): # Invoked aleister = Card("Aleister the Invoker", CardType.MONSTER) invocation = Card("Invocation", CardType.SPELL) meltdown = Card("Magic...
[ "framework.DeckList", "framework.Card" ]
[((195, 241), 'framework.Card', 'Card', (['"""Aleister the Invoker"""', 'CardType.MONSTER'], {}), "('Aleister the Invoker', CardType.MONSTER)\n", (199, 241), False, 'from framework import CardGroup, CardType, DeckList, Disruption, Manager, Card, Game\n'), ((259, 293), 'framework.Card', 'Card', (['"""Invocation"""', 'Ca...
""" data.py Contains and owns the loading and in-memory storage of all of the pre-defined game data. :author: <NAME> :license: MIT, see LICENSE.txt for more details. """ import json import jsonpickle import gzip Technologies = {} Language_Map = {} def load_language_map(filepath): f = open(f...
[ "jsonpickle.decode", "json.load", "gzip.open" ]
[((429, 454), 'gzip.open', 'gzip.open', (['filepath', '"""rb"""'], {}), "(filepath, 'rb')\n", (438, 454), False, 'import gzip\n'), ((610, 644), 'gzip.open', 'gzip.open', (['tutorial_filepath', '"""rb"""'], {}), "(tutorial_filepath, 'rb')\n", (619, 644), False, 'import gzip\n'), ((695, 733), 'jsonpickle.decode', 'jsonpi...
from django.conf import settings from import_export import resources, fields from .models import Match class MatchResource(resources.ModelResource): team1 = fields.Field(attribute='team1__name', column_name='team1') team2 = fields.Field(attribute='team2__name', ...
[ "import_export.fields.Field" ]
[((165, 223), 'import_export.fields.Field', 'fields.Field', ([], {'attribute': '"""team1__name"""', 'column_name': '"""team1"""'}), "(attribute='team1__name', column_name='team1')\n", (177, 223), False, 'from import_export import resources, fields\n'), ((261, 319), 'import_export.fields.Field', 'fields.Field', ([], {'a...
import os import json BASE_DIR = r'D:\data\edgar\sampling\Archives\edgar\data' if __name__ == '__main__': index = dict() for cik in os.listdir(BASE_DIR): for accession in os.listdir(os.path.join(BASE_DIR, cik)): for fileName in os.listdir(os.path.join(BASE_DIR, cik, accession)): ...
[ "json.dump", "os.path.join", "os.listdir" ]
[((141, 161), 'os.listdir', 'os.listdir', (['BASE_DIR'], {}), '(BASE_DIR)\n', (151, 161), False, 'import os\n'), ((550, 578), 'json.dump', 'json.dump', (['index', 'index_json'], {}), '(index, index_json)\n', (559, 578), False, 'import json\n'), ((199, 226), 'os.path.join', 'os.path.join', (['BASE_DIR', 'cik'], {}), '(B...
x = 237 a = int(x / 100) x = x - 100 * a b = int(x / 10) x = x - 10 * b c = x Resultat = a + b * 10 + c * 100 print(Resultat) # >>> 732 L = [12, 8, 19, 7, 3, 10] Resultat = [20 - L[i] for i in range(len(L))] print(Resultat) ## >>> [8, 12, 1, 13, 17, 10] Resultat = 0 for i in range(5): Resultat += i + 1 print(...
[ "random.randint" ]
[((1198, 1221), 'random.randint', 'random.randint', (['(0)', '(1000)'], {}), '(0, 1000)\n', (1212, 1221), False, 'import random\n')]
import setuptools with open("README.md", "r", encoding="UTF-8") as fh: long_description = fh.read() setuptools.setup( name="file-explorer", version="0.0.0", author="WangTingZheng", author_email="<EMAIL>", description="A simple python cli file browser", long_description=long_description, ...
[ "setuptools.find_packages" ]
[((436, 462), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (460, 462), False, 'import setuptools\n')]
#Given 2 points (x1,y1) and (x2,y2), where x1, x2 are x-coordinates #and y1, y2 are y-coordinates of the points. #Your task is to compute the Euclidean distance between them. #The distance computed should be precise up to 2 decimal places. from math import sqrt def compute_distance(x1, y1, x2, y2): distance = sq...
[ "math.sqrt" ]
[((318, 355), 'math.sqrt', 'sqrt', (['((x2 - x1) ** 2 + (y2 - y1) ** 2)'], {}), '((x2 - x1) ** 2 + (y2 - y1) ** 2)\n', (322, 355), False, 'from math import sqrt\n')]
# ---------------------------------------------------------------------------- # # World Cup: Stats scanner # Ver: 0.01 # ---------------------------------------------------------------------------- # # # Code by <NAME> # # ---------------------------------------------------------------------------- # import os impor...
[ "selenium.webdriver.support.ui.WebDriverWait", "selenium.webdriver.support.expected_conditions.presence_of_element_located", "numpy.load", "numpy.save", "pandas.isnull", "time.sleep", "selenium.webdriver.Chrome", "os.chdir" ]
[((897, 1001), 'os.chdir', 'os.chdir', (['"""/mnt/aec0936f-d983-44c1-99f5-0f5b36390285/Dropbox/Python/Predictive Analytics FIFA"""'], {}), "(\n '/mnt/aec0936f-d983-44c1-99f5-0f5b36390285/Dropbox/Python/Predictive Analytics FIFA'\n )\n", (905, 1001), False, 'import os\n'), ((3265, 3308), 'selenium.webdriver.Chrome...
""" Configuration module containing pytest-specific hooks. """ import os import logging from . import helpers from _pytest.config import Config as PyTestConfig from dof_discord_bot.src.logger import Log from dof_discord_bot.src import logger def _reconfigure_logging(): """ Helper function used to redirect all...
[ "dof_discord_bot.src.logger.Log.info", "dof_discord_bot.src.logger._configure", "os._exit", "os.path.join", "os.listdir", "logging.getLogger" ]
[((494, 521), 'os.listdir', 'os.listdir', (['helpers.LOG_DIR'], {}), '(helpers.LOG_DIR)\n', (504, 521), False, 'import os\n'), ((668, 716), 'dof_discord_bot.src.logger._configure', 'logger._configure', ([], {'log_directory': 'helpers.LOG_DIR'}), '(log_directory=helpers.LOG_DIR)\n', (685, 716), False, 'from dof_discord_...
import copy import os import unittest import networkx as nx from attacksurfacemeter import utilities from attacksurfacemeter.call import Call from attacksurfacemeter.call_graph import CallGraph from attacksurfacemeter.environments import Environments from attacksurfacemeter.loaders.cflow_loader import CflowLoader fro...
[ "unittest.main", "copy.deepcopy", "attacksurfacemeter.utilities.get_node_attrs", "attacksurfacemeter.utilities.fix", "os.path.realpath", "attacksurfacemeter.call.Call", "networkx.Graph", "attacksurfacemeter.utilities.get_fragments", "networkx.DiGraph" ]
[((15798, 15813), 'unittest.main', 'unittest.main', ([], {}), '()\n', (15811, 15813), False, 'import unittest\n'), ((770, 791), 'copy.deepcopy', 'copy.deepcopy', (['target'], {}), '(target)\n', (783, 791), False, 'import copy\n'), ((1248, 1286), 'attacksurfacemeter.utilities.fix', 'utilities.fix', (['target'], {'using'...
# Generated by Django 2.2.17 on 2021-03-05 09:56 from django.db import migrations import tinymce.models class Migration(migrations.Migration): dependencies = [ ('goods', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='goodstest', options={'v...
[ "django.db.migrations.AlterModelOptions" ]
[((237, 348), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""goodstest"""', 'options': "{'verbose_name': '商品', 'verbose_name_plural': '商品'}"}), "(name='goodstest', options={'verbose_name':\n '商品', 'verbose_name_plural': '商品'})\n", (265, 348), False, 'from django.db import...
# Importing needed library and Product class import random from acme import Product # creating lists of adjectives and nouns adjectives = ['Cool', 'Flavorful', 'Shiny', 'Awsome'] nouns = ['Phone', 'PS4', 'Computer', 'Anvil'] def generate_products(num_products=30): ''' creates a list of products given the num...
[ "random.randint", "acme.Product", "random.uniform" ]
[((578, 600), 'random.randint', 'random.randint', (['(5)', '(100)'], {}), '(5, 100)\n', (592, 600), False, 'import random\n'), ((618, 640), 'random.randint', 'random.randint', (['(5)', '(100)'], {}), '(5, 100)\n', (632, 640), False, 'import random\n'), ((664, 688), 'random.uniform', 'random.uniform', (['(0.0)', '(2.5)'...
"""empty message Revision ID: 8fb490efb894 Revises: <KEY> Create Date: 2020-06-15 20:33:31.609050 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '8fb490efb894' down_revision = '<KEY>' branch_labels = None depends_on = None def upgrade(): # ### commands a...
[ "alembic.op.drop_table", "alembic.op.f", "sqlalchemy.PrimaryKeyConstraint", "sqlalchemy.ForeignKeyConstraint", "sqlalchemy.String", "sqlalchemy.Integer" ]
[((1690, 1715), 'alembic.op.drop_table', 'op.drop_table', (['"""bossteam"""'], {}), "('bossteam')\n", (1703, 1715), False, 'from alembic import op\n'), ((1862, 1888), 'alembic.op.drop_table', 'op.drop_table', (['"""boss_base"""'], {}), "('boss_base')\n", (1875, 1888), False, 'from alembic import op\n'), ((578, 607), 's...
""" Middleware and logging filter to add request ids to logs and forward request Ids in downstream requests """ import logging import re import traceback import datetime import pythonjsonlogger import pythonjsonlogger.jsonlogger import wsgi_microservice_middleware logger = logging.getLogger(__name__) REQUEST_ID_HEA...
[ "wsgi_microservice_middleware.env.bool", "traceback.walk_stack", "datetime.datetime.utcnow", "logging.LoggerAdapter", "wsgi_microservice_middleware.env.str", "logging.getLogger" ]
[((276, 303), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (293, 303), False, 'import logging\n'), ((331, 404), 'wsgi_microservice_middleware.env.str', 'wsgi_microservice_middleware.env.str', (['"""REQUEST_ID_HEADER"""', '"""X-Request-Id"""'], {}), "('REQUEST_ID_HEADER', 'X-Request-Id')...
# rattube.py # # Copyright 2020 <NAME> <<EMAIL>> # from termcolor import cprint from pyfiglet import figlet_format from pytube import YouTube import time from os import system, name import sys from colorama import init init(strip=not sys.stdout.isatty()) class RatTube: def limpiar_Pantalla(self...
[ "pytube.YouTube", "os.system", "pyfiglet.figlet_format", "time.sleep", "sys.stdout.isatty", "sys.exit" ]
[((1803, 1860), 'pytube.YouTube', 'YouTube', (['url'], {'on_progress_callback': 'self.progress_function'}), '(url, on_progress_callback=self.progress_function)\n', (1810, 1860), False, 'from pytube import YouTube\n'), ((2136, 2149), 'time.sleep', 'time.sleep', (['(3)'], {}), '(3)\n', (2146, 2149), False, 'import time\n...
# encoding: utf-8 # Copyright 2012 California Institute of Technology. ALL RIGHTS # RESERVED. U.S. Government Sponsorship acknowledged. from ipdasite.theme.testing import IPDA_SITE_THEME_INTEGRATION_TESTING from Products.Five.browser import BrowserView as View from zope.component import getMultiAdapter from zope.viewl...
[ "unittest2.defaultTestLoader.loadTestsFromName", "zope.viewlet.interfaces.IViewlet.implementedBy", "Products.Five.browser.BrowserView", "unittest2.main" ]
[((915, 969), 'unittest2.defaultTestLoader.loadTestsFromName', 'unittest.defaultTestLoader.loadTestsFromName', (['__name__'], {}), '(__name__)\n', (959, 969), True, 'import unittest2 as unittest\n'), ((1002, 1041), 'unittest2.main', 'unittest.main', ([], {'defaultTest': '"""test_suite"""'}), "(defaultTest='test_suite')...
# coding: utf-8 """ Apteco API An API to allow access to Apteco Marketing Suite resources # noqa: E501 The version of the OpenAPI document: v2 Contact: <EMAIL> Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import apteco_api from aptec...
[ "unittest.main", "apteco_api.api.user_reset_password_requests_api.UserResetPasswordRequestsApi" ]
[((1974, 1989), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1987, 1989), False, 'import unittest\n'), ((611, 689), 'apteco_api.api.user_reset_password_requests_api.UserResetPasswordRequestsApi', 'apteco_api.api.user_reset_password_requests_api.UserResetPasswordRequestsApi', ([], {}), '()\n', (687, 689), False,...
# 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 not u...
[ "tvm.tir.match_buffer", "tvm.tir.tvm_fill_fragment", "tvm.tir.scan_axis", "tvm.tir.store", "tvm.ir.assert_structural_equal", "tvm.tir.writes", "pytest.main", "pytest.raises", "tvm.tir.block", "tvm.tir.bind", "tvm.tir.serial", "tvm.tir.Schedule", "tvm.tir.alloc_buffer", "tvm.tir.where", "...
[((1135, 1176), 'tvm.tir.match_buffer', 'tir.match_buffer', (['a', '(128, 128, 128, 128)'], {}), '(a, (128, 128, 128, 128))\n', (1151, 1176), False, 'from tvm import tir\n'), ((1185, 1226), 'tvm.tir.match_buffer', 'tir.match_buffer', (['b', '(128, 128, 128, 128)'], {}), '(b, (128, 128, 128, 128))\n', (1201, 1226), Fals...
import tkinter as tk from PIL import ImageTk, Image from Pages.MusicPage.Components.TextFrame import TextFrame class Head(tk.Frame): def __init__(self, master, image, text, data, *args, **kwargs): tk.Frame.__init__(self, master, *args, *kwargs) self['background'] = 'black' self.photo = ima...
[ "PIL.ImageTk.PhotoImage", "tkinter.Canvas", "tkinter.Frame.__init__", "Pages.MusicPage.Components.TextFrame.TextFrame", "tkinter.Frame" ]
[((211, 258), 'tkinter.Frame.__init__', 'tk.Frame.__init__', (['self', 'master', '*args', '*kwargs'], {}), '(self, master, *args, *kwargs)\n', (228, 258), True, 'import tkinter as tk\n'), ((374, 402), 'tkinter.Frame', 'tk.Frame', (['self'], {'bg': '"""#000000"""'}), "(self, bg='#000000')\n", (382, 402), True, 'import t...
# coding=utf-8 # Copyright (c) DIRECT Contributors from typing import List, Optional, Tuple, Union import numpy as np from scipy.stats import multivariate_normal as normal def simulate_sensitivity_maps( shape: Union[List[int], Tuple[int]], num_coils: int, var: float = 1, seed: Optional[int] = None ) -> np.ndarr...
[ "numpy.stack", "numpy.random.uniform", "numpy.conj", "numpy.random.seed", "numpy.zeros", "numpy.ones", "scipy.stats.multivariate_normal", "numpy.sin", "numpy.linspace", "numpy.cos", "numpy.diag" ]
[((1211, 1238), 'numpy.stack', 'np.stack', (['meshgrid'], {'axis': '(-1)'}), '(meshgrid, axis=-1)\n', (1219, 1238), True, 'import numpy as np\n'), ((1262, 1291), 'numpy.zeros', 'np.zeros', (['(num_coils, *shape)'], {}), '((num_coils, *shape))\n', (1270, 1291), True, 'import numpy as np\n'), ((1405, 1417), 'numpy.diag',...
import torch def nx_to_tg(g, node_features=None, edge_features=None, convert_edges=True): node_features = node_features or [] edge_features = edge_features or [] n_nodes = g.number_of_nodes() nodes = torch.zeros(n_nodes, len(node_features), dtype=torch.float) for n, data in g.nodes(data=True): ...
[ "torch.zeros" ]
[((456, 497), 'torch.zeros', 'torch.zeros', (['n_edges', '(2)'], {'dtype': 'torch.long'}), '(n_edges, 2, dtype=torch.long)\n', (467, 497), False, 'import torch\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jul 23 13:17:41 2018 @author: laurenwalters """ import numpy as np import matplotlib.pyplot as plt import random #For saving/importing data from numpy import asarray from numpy import save from numpy import load #Created by <NAME>, 2018-2020 #Contribut...
[ "matplotlib.pyplot.subplot", "numpy.load", "numpy.save", "matplotlib.pyplot.show", "numpy.log", "numpy.asarray", "numpy.zeros", "random.random", "matplotlib.pyplot.figure", "numpy.sort", "numpy.array", "matplotlib.pyplot.gca", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "nump...
[((734, 753), 'numpy.array', 'np.array', (['[1, 1, 1]'], {}), '([1, 1, 1])\n', (742, 753), True, 'import numpy as np\n'), ((10420, 10437), 'numpy.zeros', 'np.zeros', (['(65, 8)'], {}), '((65, 8))\n', (10428, 10437), True, 'import numpy as np\n'), ((27784, 27811), 'numpy.zeros', 'np.zeros', (['(n + 1, n + 1, 4)'], {}), ...
from django.shortcuts import render from .models import Masjid, SalahTime from .serializers import MasjidSerializer, SalahTimeSerializer from rest_framework import viewsets from rest_framework.decorators import api_view from masjid.models import Masjid from rest_framework.response import Response from rest_framework im...
[ "rest_framework.response.Response", "rest_framework.decorators.api_view", "masjid.models.Masjid.objects.all", "users.models.CustomUser.objects.get" ]
[((686, 703), 'rest_framework.decorators.api_view', 'api_view', (["['GET']"], {}), "(['GET'])\n", (694, 703), False, 'from rest_framework.decorators import api_view\n'), ((493, 513), 'masjid.models.Masjid.objects.all', 'Masjid.objects.all', ([], {}), '()\n', (511, 513), False, 'from masjid.models import Masjid\n'), ((3...
# from .offscreen_context import OffscreenContext import os if os.environ.get("PYOPENGL_PLATFORM", None) == "egl": from .egl_offscreen_context import OffscreenContext else: from .glfw_offscreen_context import OffscreenContext from .fbo import Framebuffer from .renderbuffer import Renderbuffer, RenderbufferMult...
[ "os.environ.get" ]
[((64, 105), 'os.environ.get', 'os.environ.get', (['"""PYOPENGL_PLATFORM"""', 'None'], {}), "('PYOPENGL_PLATFORM', None)\n", (78, 105), False, 'import os\n')]
""" monobit.hex - Unifont Hex format (c) 2019--2021 <NAME> licence: https://opensource.org/licenses/MIT """ # HEX format documentation # http://czyborra.com/unifont/ import logging import string from ..storage import loaders, savers from ..streams import FileFormatError from ..font import Font from ..glyph import G...
[ "logging.warning" ]
[((5444, 5530), 'logging.warning', 'logging.warning', (['"""Hex format does not support multi-codepoint grapheme clusters."""'], {}), "(\n 'Hex format does not support multi-codepoint grapheme clusters.')\n", (5459, 5530), False, 'import logging\n'), ((5612, 5740), 'logging.warning', 'logging.warning', (['f"""Hex fo...
import csv def open_file_or_create(name: str, mode): try: return open(name, mode) except: f = open(name, 'a') f.close() return open(name, mode) def import_csv(words_list: list, class_name, filename = 'data.csv'): csv_file = open_file_or_create(filename, 'r') csv_reader...
[ "csv.DictReader" ]
[((323, 347), 'csv.DictReader', 'csv.DictReader', (['csv_file'], {}), '(csv_file)\n', (337, 347), False, 'import csv\n')]
import json from json.decoder import JSONDecodeError import logging import random import socket import sys from .player import Player from .summary import GameSummary MAX_PASS_ROUNDS = 8 MAX_BATTLES_PER_GAME = 10000 # obsevered maximum of 5671 over over 100k games class Game: """Instance of the game """ ...
[ "random.randint", "dicewars.ml.game.serialise_game_configuration", "random.shuffle", "socket.socket", "random.choice", "json.dumps", "dicewars.ml.game.save_game_configurations", "logging.getLogger" ]
[((859, 886), 'logging.getLogger', 'logging.getLogger', (['"""SERVER"""'], {}), "('SERVER')\n", (876, 886), False, 'import logging\n'), ((13851, 13866), 'json.dumps', 'json.dumps', (['msg'], {}), '(msg)\n', (13861, 13866), False, 'import json\n'), ((17013, 17047), 'random.shuffle', 'random.shuffle', (['self.players_ord...
# Copyright 2018 <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...
[ "json_to_object.reverse_entity.ReverseEntity", "json.loads", "os.path.realpath", "json.dumps", "object_to_json.entity.Entity" ]
[((962, 988), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (978, 988), False, 'import sys, os\n'), ((1495, 1503), 'object_to_json.entity.Entity', 'Entity', ([], {}), '()\n', (1501, 1503), False, 'from object_to_json.entity import Entity\n'), ((1982, 2006), 'json_to_object.reverse_entity.R...
#!/usr/bin/python3 import socket import requests import sys if len(sys.argv) < 3: print("Usage: ./startup_sploit <host> <my_ip>") exit(1) PORT = 3255 HOST = sys.argv[1] MYIP = sys.argv[2] MYPORT = "0" * (921-len(MYIP)) + "4000" MANIFEST = '{"links": [{"url": "http://mirror/wyjzmw.php", "checksum": "32bfce7a...
[ "socket.socket", "requests.get" ]
[((950, 965), 'socket.socket', 'socket.socket', ([], {}), '()\n', (963, 965), False, 'import socket\n'), ((1374, 1389), 'socket.socket', 'socket.socket', ([], {}), '()\n', (1387, 1389), False, 'import socket\n'), ((1715, 1766), 'requests.get', 'requests.get', (["('http://%s/JhXY.php?key=KnfSM' % HOST)"], {}), "('http:/...
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-11-07 22:29 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0039_auto_20161101_1...
[ "django.db.models.ForeignKey" ]
[((467, 621), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'null': '(True)', 'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""files"""', 'to': '"""contentcuration.AssessmentItem"""'}), "(blank=True, null=True, on_delete=django.db.models.\n deletion.CASCADE, relate...
# test bin, analyze, and plot functions # imports import os from os.path import join from os import listdir import matplotlib.pyplot as plt # imports import numpy as np import pandas as pd from scipy.optimize import curve_fit import filter import analyze from correction import correct from utils import fit, function...
[ "utils.plotting.lighten_color", "utils.functions.line", "utils.io.read_calib_coords", "utils.plotting.scatter_3d_and_spline", "matplotlib.pyplot.style.use", "matplotlib.pyplot.tight_layout", "os.path.join", "numpy.round", "utils.bin.bin_by_list", "matplotlib.pyplot.close", "utils.plotting.plot_f...
[((681, 729), 'matplotlib.pyplot.style.use', 'plt.style.use', (["['science', 'ieee', 'std-colors']"], {}), "(['science', 'ieee', 'std-colors'])\n", (694, 729), True, 'import matplotlib.pyplot as plt\n'), ((740, 754), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (752, 754), True, 'import matplotlib.py...
# # Copyright (c) 2019-2021 steelpy # # Python stdlib imports import math # # package imports #import steelpy.units.control as units #from steelpy.sectionproperty.shapes.iomodule import (find_section_dimensions, # get_dimension) # --------------------------------...
[ "math.sqrt", "math.pow", "math.radians", "math.sin", "math.gamma", "math.cos" ]
[((29284, 29304), 'math.sqrt', 'math.sqrt', (['(_Iyy / _A)'], {}), '(_Iyy / _A)\n', (29293, 29304), False, 'import math\n'), ((29315, 29335), 'math.sqrt', 'math.sqrt', (['(_Ixx / _A)'], {}), '(_Ixx / _A)\n', (29324, 29335), False, 'import math\n'), ((9265, 9295), 'math.sqrt', 'math.sqrt', (['(self.Iy / self.area)'], {}...
from django.conf.urls import url, include from rest_framework import routers from crm_inbox.flows import * # noqa from processlib.views import (ProcessViewSet) router = routers.DefaultRouter() router.register('process', ProcessViewSet) urlpatterns = [ url(r'^process/', include('processlib.urls', namespace='pr...
[ "django.conf.urls.include", "rest_framework.routers.DefaultRouter" ]
[((173, 196), 'rest_framework.routers.DefaultRouter', 'routers.DefaultRouter', ([], {}), '()\n', (194, 196), False, 'from rest_framework import routers\n'), ((280, 330), 'django.conf.urls.include', 'include', (['"""processlib.urls"""'], {'namespace': '"""processlib"""'}), "('processlib.urls', namespace='processlib')\n"...
from dynaconf import settings from app import create_app application = create_app() # runs this only when the environment is 'development' if settings.ENVIRONMENT == "development" and settings.GUNICORN is False: application.run(host="0.0.0.0", port=settings.FLASK_CONFIG.PORT, debug=True)
[ "app.create_app" ]
[((73, 85), 'app.create_app', 'create_app', ([], {}), '()\n', (83, 85), False, 'from app import create_app\n')]
# coding=utf-8 # Copyright 2021 The vMF Embeddings 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 applicabl...
[ "torch.nn.AdaptiveAvgPool2d", "torch.nn.ReLU", "torch.nn.init.kaiming_normal_", "torch.nn.Sequential", "torch.nn.Conv2d", "torchvision.models.resnet.conv1x1", "vmf_embeddings.archs.utils.Flatten", "torch.nn.init.zeros_", "vmf_embeddings.archs.utils.vmf_class_weight_init", "torch.nn.init.constant_"...
[((1083, 1108), 'logging.getLogger', 'logging.getLogger', (['"""main"""'], {}), "('main')\n", (1100, 1108), False, 'import logging\n'), ((2109, 2162), 'torch.nn.Linear', 'nn.Linear', (['self.backbone_features', 'self.embedding_dim'], {}), '(self.backbone_features, self.embedding_dim)\n', (2118, 2162), True, 'import tor...
# coding=utf-8 # !/usr/bin/python3 # Name: aioruuvitag_bleak - Bluetooth Low Energy platform Agnostic Klient by <NAME> # https://github.com/hbldh/bleak.git # Copyright: (c) 2019 TK # Licence: MIT # # sudo apt install bluez # requires bluez 5.43 # -----------------------...
[ "asyncio.sleep", "asyncio.Event", "datetime.datetime.now", "datetime.timedelta", "platform.system", "asyncio.create_subprocess_shell", "asyncio.Queue", "logging.getLogger" ]
[((400, 429), 'logging.getLogger', 'logging.getLogger', (['"""ruuvitag"""'], {}), "('ruuvitag')\n", (417, 429), False, 'import logging\n'), ((553, 570), 'platform.system', 'platform.system', ([], {}), '()\n', (568, 570), False, 'import platform\n'), ((643, 660), 'platform.system', 'platform.system', ([], {}), '()\n', (...
import os import setuptools from rex import __version__ readme_filepath = os.path.join(os.path.dirname(os.path.abspath(__file__)), "README.md") with open(readme_filepath, "r") as fh: long_description = fh.read() setuptools.setup( name="pytorch-rex", version=__version__, author="<NAME>", author_...
[ "os.path.abspath", "setuptools.find_packages" ]
[((106, 131), 'os.path.abspath', 'os.path.abspath', (['__file__'], {}), '(__file__)\n', (121, 131), False, 'import os\n'), ((548, 620), 'setuptools.find_packages', 'setuptools.find_packages', ([], {'exclude': "['tests', 'tests.*', 'docs', 'docs.*']"}), "(exclude=['tests', 'tests.*', 'docs', 'docs.*'])\n", (572, 620), F...
""" This module converts Kids First studies to FHIR kfdrc-research-study (derived from FHIR ResearchStudy). """ from kf_lib_data_ingest.common.concept_schema import CONCEPT from common.utils import make_identifier, make_select, get RESOURCE_TYPE = "ResearchStudy" def yield_kfdrc_research_studies( eng, table, tar...
[ "common.utils.make_identifier", "common.utils.make_select", "common.utils.get" ]
[((396, 605), 'common.utils.make_select', 'make_select', (['eng', 'table', 'CONCEPT.STUDY.ID', 'CONCEPT.INVESTIGATOR.INSTITUTION', 'CONCEPT.INVESTIGATOR.NAME', 'CONCEPT.STUDY.ATTRIBUTION', 'CONCEPT.STUDY.SHORT_NAME', 'CONCEPT.STUDY.AUTHORITY', 'CONCEPT.STUDY.NAME'], {}), '(eng, table, CONCEPT.STUDY.ID, CONCEPT.INVESTIG...
import pyart import pydda from matplotlib import pyplot as plt import numpy as np berr_grid = pyart.io.read_grid("berr_Darwin_hires.nc") cpol_grid = pyart.io.read_grid("cpol_Darwin_hires.nc") sounding = pyart.io.read_arm_sonde( "/home/rjackson/data/soundings/twpsondewnpnC3.b1.20060119.231600.custom.cdf") print(be...
[ "pyart.io.read_arm_sonde", "matplotlib.pyplot.clabel", "matplotlib.pyplot.show", "matplotlib.pyplot.interactive", "pyart.io.read_grid", "matplotlib.pyplot.barbs", "matplotlib.pyplot.colorbar", "pydda.retrieval.get_dd_wind_field", "matplotlib.pyplot.figure", "numpy.arange", "matplotlib.pyplot.pco...
[((95, 137), 'pyart.io.read_grid', 'pyart.io.read_grid', (['"""berr_Darwin_hires.nc"""'], {}), "('berr_Darwin_hires.nc')\n", (113, 137), False, 'import pyart\n'), ((150, 192), 'pyart.io.read_grid', 'pyart.io.read_grid', (['"""cpol_Darwin_hires.nc"""'], {}), "('cpol_Darwin_hires.nc')\n", (168, 192), False, 'import pyart...
def make_get_toks(f=None): "make iterator and next functions out of iterable of split strings" from sys import stdin from itertools import chain def sp(ln): "to split the strings with a map" return ln.split() def the_it(): "so that both results are callable in similar manne...
[ "collections.defaultdict" ]
[((577, 584), 'collections.defaultdict', 'dd', (['int'], {}), '(int)\n', (579, 584), True, 'from collections import defaultdict as dd\n')]
from flask_restx import Namespace, Resource from .parsers import survey_id_parser from .models import ( light_curve_model, detection_model, non_detection_model, ) from dependency_injector.wiring import inject, Provide from dependency_injector.providers import Factory from api.container import AppContainer f...
[ "ralidator_flask.decorators.set_permissions_decorator", "flask_restx.Namespace", "core.light_curve.domain.lightcurve_service.LightcurveServicePayload", "ralidator_flask.decorators.set_filters_decorator" ]
[((636, 704), 'flask_restx.Namespace', 'Namespace', (['"""lightcurve"""'], {'description': '"""LightCurve related operations"""'}), "('lightcurve', description='LightCurve related operations')\n", (645, 704), False, 'from flask_restx import Namespace, Resource\n'), ((1042, 1092), 'ralidator_flask.decorators.set_permiss...
#!/usr/bin/env python """Setup.py for eulxml package""" from distutils.command.build_py import build_py from distutils.command.clean import clean from distutils.command.sdist import sdist from distutils.core import Command import os import sys import shutil from setuptools import setup, find_packages import eulxml cl...
[ "distutils.command.build_py.build_py.run", "distutils.command.clean.clean.run", "os.path.exists", "distutils.command.sdist.sdist.run", "shutil.rmtree", "eulxml.catalog.generate_catalog", "setuptools.find_packages" ]
[((676, 694), 'eulxml.catalog.generate_catalog', 'generate_catalog', ([], {}), '()\n', (692, 694), False, 'from eulxml.catalog import generate_catalog\n'), ((814, 852), 'os.path.exists', 'os.path.exists', (['eulxml.XMLCATALOG_FILE'], {}), '(eulxml.XMLCATALOG_FILE)\n', (828, 852), False, 'import os\n'), ((957, 975), 'eu...
import pytest import re from pathlib import Path from time import sleep from alnitak import config from alnitak.api import cloudflare from alnitak.tests import setup from alnitak import prog as Prog from alnitak import exceptions as Except @pytest.fixture(scope="module") def cloudflare_api(request): return Path...
[ "alnitak.tests.setup.Init", "alnitak.api.cloudflare.api_delete", "alnitak.api.cloudflare.api_publish", "alnitak.tests.setup.create_tlsa_obj", "alnitak.tests.setup.create_state_obj", "pytest.fixture", "re.match", "pytest.skip", "time.sleep", "alnitak.config.read", "pathlib.Path", "pytest.raises...
[((245, 275), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""'}), "(scope='module')\n", (259, 275), False, 'import pytest\n'), ((975, 996), 'alnitak.tests.setup.Init', 'setup.Init', ([], {'keep': '(True)'}), '(keep=True)\n', (985, 996), False, 'from alnitak.tests import setup\n'), ((1064, 1108), 'alnit...
import numpy as np # use nanmean from bottleneck if it's installed, otherwise use the numpy one # bottleneck nanmean is ~2.5x faster try: import bottleneck as bn nanmean = bn.nanmean except ImportError: nanmean = np.nanmean from pytplot import get_data, store_data, options from ...utilities.tnames import tn...
[ "pytplot.store_data", "numpy.argmin", "pytplot.get_data", "numpy.isnan", "pytplot.options", "numpy.unique" ]
[((3932, 3952), 'numpy.argmin', 'np.argmin', (['time_size'], {}), '(time_size)\n', (3941, 3952), True, 'import numpy as np\n'), ((4035, 4057), 'numpy.argmin', 'np.argmin', (['energy_size'], {}), '(energy_size)\n', (4044, 4057), True, 'import numpy as np\n'), ((4408, 4443), 'pytplot.get_data', 'get_data', (['omni_vars[r...
import calendar import datetime from flask import g, jsonify, request from pytz import timezone from requests.exceptions import HTTPError from sqlalchemy import Integer, cast, exists, func from server import app, sqldb from server.auth import auth from server.base import cached_route from server.models import Laundry...
[ "flask.request.form.get", "server.models.LaundryPreference", "server.penndata.laundry.all_status", "flask.jsonify", "server.penndata.laundry.check_is_working", "server.sqldb.session.commit", "server.auth.auth", "server.penndata.laundry.hall_status", "server.app.route", "server.app.app_context", ...
[((393, 437), 'server.app.route', 'app.route', (['"""/laundry/halls"""'], {'methods': "['GET']"}), "('/laundry/halls', methods=['GET'])\n", (402, 437), False, 'from server import app, sqldb\n'), ((624, 679), 'server.app.route', 'app.route', (['"""/laundry/rooms/<hall_ids>"""'], {'methods': "['GET']"}), "('/laundry/room...
import jinja2 veg_cost = 10.00 non_veg_cost = 10.00 JINJA_ENVIRONMENT = jinja2.Environment( # templates directory is relative to app root. loader=jinja2.FileSystemLoader('templates'), extensions=['jinja2.ext.autoescape'], autoescape=True) form_template = JINJA_ENVIRONMENT.get_template('form.html') pay_templa...
[ "jinja2.FileSystemLoader" ]
[((152, 188), 'jinja2.FileSystemLoader', 'jinja2.FileSystemLoader', (['"""templates"""'], {}), "('templates')\n", (175, 188), False, 'import jinja2\n')]
# coding:utf-8 import logging from urllib import parse from copy import deepcopy import random import requests class SSTIDetector: def __init__(self, results, reports, **kwargs): self.results = results self.reports = reports self.args = kwargs self.vulnerable = [] @staticmet...
[ "copy.deepcopy", "random.randint", "urllib.parse.parse_qs", "logging.info", "requests.get", "urllib.parse.urlparse" ]
[((518, 546), 'random.randint', 'random.randint', (['(32768)', '(65536)'], {}), '(32768, 65536)\n', (532, 546), False, 'import random\n'), ((566, 594), 'random.randint', 'random.randint', (['(16384)', '(32768)'], {}), '(16384, 32768)\n', (580, 594), False, 'import random\n'), ((2999, 3034), 'logging.info', 'logging.inf...
import torch from torch import nn import os ############################################ ############################################ class MLP(nn.Module): def __init__(self, input_size, output_size, n_layers, size, activation=torch.tanh, output_activation=None): super(MLP, self).__init__() self.a...
[ "torch.nn.Linear", "torch.nn.ModuleList" ]
[((416, 431), 'torch.nn.ModuleList', 'nn.ModuleList', ([], {}), '()\n', (429, 431), False, 'from torch import nn\n'), ((595, 623), 'torch.nn.Linear', 'nn.Linear', (['size', 'output_size'], {}), '(size, output_size)\n', (604, 623), False, 'from torch import nn\n'), ((522, 542), 'torch.nn.Linear', 'nn.Linear', (['in_', '...
# # This source file is part of the EdgeDB open source project. # # Copyright 2016-present MagicStack Inc. and the EdgeDB 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...
[ "functools.partial", "edgedb.con_utils.parse_connect_arguments", "asyncio.sleep", "edgedb.protocol.protocol.CodecsRegistry", "edgedb.protocol.protocol.QueryCodecsCache", "edgedb.errors.InterfaceError", "asyncio.get_running_loop", "random.random", "time.monotonic", "edgedb.errors.ClientConnectionTi...
[((15785, 15889), 'edgedb.con_utils.parse_connect_arguments', 'con_utils.parse_connect_arguments', ([], {'command_timeout': 'None', 'server_settings': 'None'}), '(**self._connect_args, command_timeout=\n None, server_settings=None)\n', (15818, 15889), False, 'from edgedb import con_utils\n'), ((15948, 15964), 'time....
import time import bridge import json import requests from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.common.exceptions import NoSuchElementException canal_web_source = 'http://www.greatlakes-seaway.com/R2/jsp/mNiaBrdgStatus.jsp?language=E' welland_canal_api = 'https://well...
[ "requests.post", "selenium.webdriver.ChromeOptions", "bridge.Bridge", "selenium.webdriver.Chrome" ]
[((372, 397), 'selenium.webdriver.ChromeOptions', 'webdriver.ChromeOptions', ([], {}), '()\n', (395, 397), False, 'from selenium import webdriver\n'), ((555, 602), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {'chrome_options': 'chrome_options'}), '(chrome_options=chrome_options)\n', (571, 602), False, 'from s...
from datetime import datetime from peewee import ForeignKeyField, DateTimeField from wx.app import database from wx.models.station import Station class Report(database.Model): station = ForeignKeyField(Station, related_name='reports') timestamp = DateTimeField(default=datetime.now) class Meta: ...
[ "peewee.ForeignKeyField", "peewee.DateTimeField" ]
[((194, 242), 'peewee.ForeignKeyField', 'ForeignKeyField', (['Station'], {'related_name': '"""reports"""'}), "(Station, related_name='reports')\n", (209, 242), False, 'from peewee import ForeignKeyField, DateTimeField\n'), ((260, 295), 'peewee.DateTimeField', 'DateTimeField', ([], {'default': 'datetime.now'}), '(defaul...
''' tournament to rank refiners + discriminators for simgan ''' import numpy as np import pandas as pd import torch def get_graph_ratings(refiners, discriminators, validation_data, device, starting_rating=1500, ...
[ "pandas.DataFrame", "torch.ones", "numpy.sum", "numpy.array", "numpy.exp", "torch.zeros", "torch.round", "torch.tensor" ]
[((2232, 2296), 'torch.zeros', 'torch.zeros', (['samples_per_match'], {'dtype': 'torch.float', 'device': 'device'}), '(samples_per_match, dtype=torch.float, device=device)\n', (2243, 2296), False, 'import torch\n'), ((2318, 2381), 'torch.ones', 'torch.ones', (['samples_per_match'], {'dtype': 'torch.float', 'device': 'd...
import pytest def test_config_exists(): from infrastructure.config import config assert 'demo' in config['environment'] def test_config_common_dataclass(): from infrastructure.config import Common common = Common() assert common.organization_name == 'igvf-dacc' assert common.project_name == ...
[ "infrastructure.config.get_config_name_from_branch", "infrastructure.config.build_config_from_name", "infrastructure.config.Common", "infrastructure.config.Config" ]
[((226, 234), 'infrastructure.config.Common', 'Common', ([], {}), '()\n', (232, 234), False, 'from infrastructure.config import Common\n'), ((424, 489), 'infrastructure.config.Config', 'Config', ([], {'name': '"""demo"""', 'branch': '"""xyz-branch"""', 'pipeline': '"""xyz-pipeline"""'}), "(name='demo', branch='xyz-bran...
from .cube import * from .cube_animations import * try: import importlib.metadata as importlib_metadata except ModuleNotFoundError: import importlib_metadata __version__ = importlib_metadata.version(__name__)
[ "importlib_metadata.version" ]
[((182, 218), 'importlib_metadata.version', 'importlib_metadata.version', (['__name__'], {}), '(__name__)\n', (208, 218), False, 'import importlib_metadata\n')]
# Generated by Django 3.2 on 2022-01-20 21:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("auth", "0012_alter_user_first_name_max_length"), ("auth_app", "0002_businessowner_is_superuser"), ] operations = [ migrations.AddField...
[ "django.db.models.ManyToManyField" ]
[((407, 658), 'django.db.models.ManyToManyField', 'models.ManyToManyField', ([], {'blank': '(True)', 'help_text': '"""The groups this user belongs to. A user will get all permissions granted to each of their groups."""', 'related_name': '"""user_set"""', 'related_query_name': '"""user"""', 'to': '"""auth.Group"""', 've...
import csv import yaml from dixday_predictions import __version__ from dixday_predictions.eventhandler.EventHandler import EventHandler def _read_config(config_path) -> dict: with open(config_path, "r") as ymlfile: config = yaml.safe_load(ymlfile) return config def test_version(): assert __vers...
[ "yaml.safe_load" ]
[((239, 262), 'yaml.safe_load', 'yaml.safe_load', (['ymlfile'], {}), '(ymlfile)\n', (253, 262), False, 'import yaml\n')]
# Generate an all-pairs covering test suite # # (c) 2007 University of Oregon and <NAME> # All rights reserved. # License = """ (C) 2007,2017 University of Oregon and <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the followi...
[ "six.next", "csv.writer", "optparse.OptionParser", "logging.basicConfig", "random.shuffle", "sys.stdin.readline", "six.print_", "logging.getLogger" ]
[((3980, 4058), 'logging.basicConfig', 'logging.basicConfig', ([], {'format': '"""%(levelname)s:%(message)s"""', 'level': 'logging.WARNING'}), "(format='%(levelname)s:%(message)s', level=logging.WARNING)\n", (3999, 4058), False, 'import logging\n'), ((4089, 4116), 'logging.getLogger', 'logging.getLogger', (['__name__']...
from dataclasses import dataclass from typing import List, NamedTuple import numpy as np from generic_search import bfsCave, nodeToPath wall = "#" emptySpace = "." class GridLocation(NamedTuple): column: int row: int def __lt__(self, other): return self.row < other.row or \ self.row...
[ "numpy.full", "generic_search.nodeToPath" ]
[((6315, 6367), 'numpy.full', 'np.full', (['(puzzleHeight, puzzleWidth)', '"""."""'], {'dtype': 'str'}), "((puzzleHeight, puzzleWidth), '.', dtype=str)\n", (6322, 6367), True, 'import numpy as np\n'), ((4063, 4083), 'generic_search.nodeToPath', 'nodeToPath', (['solution'], {}), '(solution)\n', (4073, 4083), False, 'fro...
from datetime import time, timedelta # Will print all read events to stdout. DEBUG = False DATA_PATH = "~/.tourney" CHANNEL_NAME = "foosball" RTM_READ_DELAY = 0.5 # seconds RECONNECT_DELAY = 5.0 # seconds COMMAND_REGEX = "!(\\w+)\\s*(.*)" REACTION_REGEX = ":(.+):" SCORE_ARGS_REGEX = "(T\\d+)\\s+(\\d+)\\s+(T\\d+)\\s...
[ "datetime.time", "datetime.timedelta" ]
[((385, 392), 'datetime.time', 'time', (['(9)'], {}), '(9)\n', (389, 392), False, 'from datetime import time, timedelta\n'), ((418, 436), 'datetime.timedelta', 'timedelta', ([], {'hours': '(1)'}), '(hours=1)\n', (427, 436), False, 'from datetime import time, timedelta\n'), ((458, 466), 'datetime.time', 'time', (['(11)'...
# -*- coding: utf-8 -*- import cv2 import sys import numpy as np import argparse imagePath = "img.png" sx = sy = None previewImage = None if len(sys.argv) < 3: print(""" Usage: python mouseInteractive -i img.png """) sys.exit(-1) if sys.argv[1]=="-i": imagePath = sys.argv[2] def cre...
[ "cv2.line", "cv2.circle", "cv2.waitKey", "cv2.destroyAllWindows", "numpy.zeros", "cv2.imread", "cv2.setMouseCallback", "sys.exit", "cv2.moveWindow", "cv2.imshow", "cv2.namedWindow" ]
[((1089, 1110), 'cv2.imread', 'cv2.imread', (['imagePath'], {}), '(imagePath)\n', (1099, 1110), False, 'import cv2\n'), ((1112, 1135), 'cv2.namedWindow', 'cv2.namedWindow', (['"""demo"""'], {}), "('demo')\n", (1127, 1135), False, 'import cv2\n'), ((1136, 1162), 'cv2.namedWindow', 'cv2.namedWindow', (['"""preview"""'], ...
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # 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...
[ "collections.namedtuple", "time.time" ]
[((700, 806), 'collections.namedtuple', 'namedtuple', (['"""ChannelNameWithType"""', "['channel_id', 'channel_name', 'channel_type', 'channel_namespace']"], {}), "('ChannelNameWithType', ['channel_id', 'channel_name',\n 'channel_type', 'channel_namespace'])\n", (710, 806), False, 'from collections import namedtuple\...
# # dice_roll_parser.py # # Copyright 2021, <NAME> # from plusminus import BaseArithmeticParser # fmt: off class DiceRollParser(BaseArithmeticParser): """ Parser for evaluating expressions representing rolls of dice, as used in many board and role-playing games, such as: d20 3d20 ...
[ "random.randint" ]
[((593, 613), 'random.randint', 'random.randint', (['(1)', 'a'], {}), '(1, a)\n', (607, 613), False, 'import random\n'), ((719, 739), 'random.randint', 'random.randint', (['(1)', 'b'], {}), '(1, b)\n', (733, 739), False, 'import random\n')]
"""Synchronous CometD client""" from enum import IntEnum, unique, auto import asyncio from functools import partial from typing import Optional, Iterable, TypeVar, Awaitable, Callable, Any import concurrent.futures as futures from contextlib import suppress import aiocometd from aiocometd.typing import JsonObject # py...
[ "PyQt5.QtCore.pyqtSignal", "functools.partial", "asyncio.get_event_loop", "aiocometd_chat_demo.exceptions.InvalidStateError", "contextlib.suppress", "aiocometd.Client", "PyQt5.QtCore.pyqtProperty", "asyncio.run_coroutine_threadsafe", "enum.auto", "typing.TypeVar" ]
[((533, 564), 'typing.TypeVar', 'TypeVar', (['"""T_co"""'], {'covariant': '(True)'}), "('T_co', covariant=True)\n", (540, 564), False, 'from typing import Optional, Iterable, TypeVar, Awaitable, Callable, Any\n'), ((1279, 1323), 'asyncio.run_coroutine_threadsafe', 'asyncio.run_coroutine_threadsafe', (['coro', 'loop'], ...
from gi.repository import GObject from pychess.Players.Engine import Engine from pychess.Utils.const import NORMAL, ANALYZING, INVERSE_ANALYZING TIME_OUT_SECOND = 60 class ProtocolEngine(Engine): __gsignals__ = { "readyForOptions": (GObject.SignalFlags.RUN_FIRST, None, ()), "readyForMoves": (GO...
[ "pychess.Players.Engine.Engine.__init__" ]
[((463, 489), 'pychess.Players.Engine.Engine.__init__', 'Engine.__init__', (['self', 'md5'], {}), '(self, md5)\n', (478, 489), False, 'from pychess.Players.Engine import Engine\n')]
import numpy class channel_noise_simulator: """Class to hold usefull funktions to simulate noise in a channel""" def __init__(self): return # _____________create bits___________________ def create_random_bits_list(self, len): """create a random len bits long bitstring """ bi...
[ "numpy.random.randint", "numpy.random.random" ]
[((381, 407), 'numpy.random.randint', 'numpy.random.randint', (['(0)', '(2)'], {}), '(0, 2)\n', (401, 407), False, 'import numpy\n'), ((601, 627), 'numpy.random.randint', 'numpy.random.randint', (['(0)', '(2)'], {}), '(0, 2)\n', (621, 627), False, 'import numpy\n'), ((1019, 1040), 'numpy.random.random', 'numpy.random.r...
# Copyright 2020 Curtin University # # 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 writi...
[ "observatory.platform.cli.click_utils.indent", "observatory.platform.cli.click_utils.comment" ]
[((884, 913), 'observatory.platform.cli.click_utils.indent', 'indent', (['original_str', 'INDENT1'], {}), '(original_str, INDENT1)\n', (890, 913), False, 'from observatory.platform.cli.click_utils import INDENT1, INDENT2, INDENT3, INDENT4, comment, indent\n'), ((1005, 1034), 'observatory.platform.cli.click_utils.indent...
#!/usr/bin/env/ python # encoding: utf-8 """ Test block crypto. """ import unittest import matasano.blocks import matasano.util __author__ = 'aldur' class BlocksTestCase(unittest.TestCase): def test_split_blocks(self): f = matasano.blocks.split_blocks b = "this is a test".encode("ascii") ...
[ "unittest.main" ]
[((4893, 4908), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4906, 4908), False, 'import unittest\n')]
import pandas as pd import mysql.connector from mysql.connector import errorcode import math import sys import csv #Configuración de la conexión a Mysql try: cnx = mysql.connector.connect(user='user_taller1', password='<PASSWORD>.', host='127.0.0.1', database='taller1') except mysql.connector.Error as err: if err....
[ "pandas.DataFrame", "pandas.read_csv", "sys.exit" ]
[((816, 878), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': "['musicbrainz-artist-id', 'artist-name']"}), "(columns=['musicbrainz-artist-id', 'artist-name'])\n", (828, 878), True, 'import pandas as pd\n'), ((892, 938), 'pandas.DataFrame', 'pd.DataFrame', ([], {'columns': "['trackId', 'trackname']"}), "(columns=[...
from dogqc.code import Code # includes def getIncludes (): code = Code() code.add("#include <list>") code.add("#include <unordered_map>") code.add("#include <vector>") code.add("#include <iostream>") code.add("#include <ctime>") code.add("#include <limits.h>") code.add("#include <float....
[ "dogqc.code.Code" ]
[((71, 77), 'dogqc.code.Code', 'Code', ([], {}), '()\n', (75, 77), False, 'from dogqc.code import Code\n'), ((543, 549), 'dogqc.code.Code', 'Code', ([], {}), '()\n', (547, 549), False, 'from dogqc.code import Code\n')]