code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from textwrap import dedent from tests import check_as_expected ROOT = 'superhelp.helpers.sorting_reversing_help.' def test_misc(): test_conf = [ ( dedent("""\ pet = 'cat' """), { ROOT + 'sorting_reversing_overview': 0, ROOT ...
[ "textwrap.dedent", "tests.check_as_expected" ]
[((2666, 2713), 'tests.check_as_expected', 'check_as_expected', (['test_conf'], {'execute_code': '(True)'}), '(test_conf, execute_code=True)\n', (2683, 2713), False, 'from tests import check_as_expected\n'), ((2718, 2766), 'tests.check_as_expected', 'check_as_expected', (['test_conf'], {'execute_code': '(False)'}), '(t...
import tkinter import time import math LINES=0 TRIANGLES=1 ORTOGRAPHIC=0 PERSPECTIVE=1 EPSILON=0.0001 class BaseCamera: def __init__(self): pass def __setup_cam__(self,e): raise NotImplementedError def __update__(self,dt): raise NotImplementedError def __updated__(self): raise NotImplementedE...
[ "tkinter.Canvas", "math.sqrt", "math.sin", "time.time", "math.cos", "tkinter.Tk" ]
[((1062, 1100), 'math.sqrt', 'math.sqrt', (['(zx ** 2 + zy ** 2 + zz ** 2)'], {}), '(zx ** 2 + zy ** 2 + zz ** 2)\n', (1071, 1100), False, 'import math\n'), ((1200, 1238), 'math.sqrt', 'math.sqrt', (['(xx ** 2 + xy ** 2 + xz ** 2)'], {}), '(xx ** 2 + xy ** 2 + xz ** 2)\n', (1209, 1238), False, 'import math\n'), ((2652,...
from datetime import datetime from blog.models import Article def retrieveArticles(drafts, future, limit=-1): """ Will retrieve and filter articles according to the parameters """ latest_blog_posts = Article.objects.all() if drafts == False: # No drafts latest_blog_posts = latest_blog...
[ "blog.models.Article.objects.all", "datetime.datetime.today" ]
[((218, 239), 'blog.models.Article.objects.all', 'Article.objects.all', ([], {}), '()\n', (237, 239), False, 'from blog.models import Article\n'), ((534, 550), 'datetime.datetime.today', 'datetime.today', ([], {}), '()\n', (548, 550), False, 'from datetime import datetime\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import annotations import collections import copy import itertools import math from typing import List, Optional from .elements import elements_dict from .exceptions import * from .grid import * from .molecule import Molecule, Atom, ATOM_RADIUS from .sche...
[ "copy.deepcopy", "collections.deque" ]
[((3553, 3572), 'collections.deque', 'collections.deque', ([], {}), '()\n', (3570, 3572), False, 'import collections\n'), ((3600, 3619), 'collections.deque', 'collections.deque', ([], {}), '()\n', (3617, 3619), False, 'import collections\n'), ((9157, 9176), 'collections.deque', 'collections.deque', ([], {}), '()\n', (9...
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ "mindspore.Tensor", "pytest.raises", "mindspore.nn.probability.distribution.Geometric" ]
[((957, 972), 'mindspore.nn.probability.distribution.Geometric', 'msd.Geometric', ([], {}), '()\n', (970, 972), True, 'import mindspore.nn.probability.distribution as msd\n'), ((1024, 1078), 'mindspore.nn.probability.distribution.Geometric', 'msd.Geometric', (['[0.1, 0.3, 0.5, 0.9]'], {'dtype': 'dtype.int32'}), '([0.1,...
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from .provider import DoximityProvider urlpatterns = default_urlpatterns(DoximityProvider)
[ "allauth.socialaccount.providers.oauth2.urls.default_urlpatterns" ]
[((131, 168), 'allauth.socialaccount.providers.oauth2.urls.default_urlpatterns', 'default_urlpatterns', (['DoximityProvider'], {}), '(DoximityProvider)\n', (150, 168), False, 'from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns\n')]
from urllib.request import urlopen from bs4 import BeautifulSoup html = urlopen("http://www.pythonscraping.com/pages/warandpeace.html") bsObj = BeautifulSoup(html, "html.parser") nameList = bsObj.findAll("span", {"class":{"green", "red"}}) for name in nameList: print(name.get_text())
[ "bs4.BeautifulSoup", "urllib.request.urlopen" ]
[((73, 136), 'urllib.request.urlopen', 'urlopen', (['"""http://www.pythonscraping.com/pages/warandpeace.html"""'], {}), "('http://www.pythonscraping.com/pages/warandpeace.html')\n", (80, 136), False, 'from urllib.request import urlopen\n'), ((145, 179), 'bs4.BeautifulSoup', 'BeautifulSoup', (['html', '"""html.parser"""...
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
[ "cirq.transformers.eject_phased_paulis", "cirq._compat.deprecated_class" ]
[((723, 814), 'cirq._compat.deprecated_class', '_compat.deprecated_class', ([], {'deadline': '"""v1.0"""', 'fix': '"""Use cirq.eject_phased_paulis instead."""'}), "(deadline='v1.0', fix=\n 'Use cirq.eject_phased_paulis instead.')\n", (747, 814), False, 'from cirq import _compat, circuits, transformers\n'), ((1970, 2...
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
[ "src.retinahead.retinanetWithLossCell", "argparse.ArgumentParser", "mindspore.train.callback.ModelCheckpoint", "mindspore.train.serialization.load_checkpoint", "mindspore.train.serialization.load_param_into_net", "mindspore.context.set_context", "mindspore.train.callback.LossMonitor", "mindspore.conte...
[((1519, 1530), 'mindspore.common.set_seed', 'set_seed', (['(1)'], {}), '(1)\n', (1527, 1530), False, 'from mindspore.common import set_seed\n'), ((2104, 2161), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""retinanet training"""'}), "(description='retinanet training')\n", (2127, 2161), ...
""" flask application """ # # use to retrieve environment variable import os # import flask app from application import app # run application if __name__ == '__main__': port = os.getenv('FLASK_PORT', 5000) app.run(port=port, host='0.0.0.0', use_reloader=False)
[ "os.getenv", "application.app.run" ]
[((182, 211), 'os.getenv', 'os.getenv', (['"""FLASK_PORT"""', '(5000)'], {}), "('FLASK_PORT', 5000)\n", (191, 211), False, 'import os\n'), ((216, 270), 'application.app.run', 'app.run', ([], {'port': 'port', 'host': '"""0.0.0.0"""', 'use_reloader': '(False)'}), "(port=port, host='0.0.0.0', use_reloader=False)\n", (223,...
import logging LOG_FORMAT = "[%(asctime)s] [%(levelname)s] - %(message)s" logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) logging.info('loading dependencies') import os import numpy as np from PIL import Image import tensorflow as tf os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' tf.logging.set_verbosity(tf.logg...
[ "PIL.Image.new", "logging.basicConfig", "tensorflow.estimator.RunConfig", "os.path.dirname", "tensorflow.logging.set_verbosity", "PIL.Image.open", "logging.info", "tensorflow.ConfigProto", "tensorflow.estimator.Estimator", "database.topN", "tensorflow.data.Dataset.from_generator", "tensorflow....
[((74, 132), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.INFO', 'format': 'LOG_FORMAT'}), '(level=logging.INFO, format=LOG_FORMAT)\n', (93, 132), False, 'import logging\n'), ((134, 170), 'logging.info', 'logging.info', (['"""loading dependencies"""'], {}), "('loading dependencies')\n", (146, 1...
# coding: utf-8 """ Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
[ "six.iteritems" ]
[((8409, 8438), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (8418, 8438), False, 'from six import iteritems\n')]
from collections import OrderedDict import pytest import sys import yaml from apispec import APISpec, BasePlugin from apispec.exceptions import ( APISpecError, DuplicateComponentNameError, DuplicateParameterError, InvalidParameterError, ) from .utils import ( get_schemas, get_paths, get_p...
[ "apispec.APISpec", "pytest.fixture", "pytest.raises", "collections.OrderedDict", "pytest.mark.parametrize", "http.HTTPStatus" ]
[((689, 728), 'pytest.fixture', 'pytest.fixture', ([], {'params': "('2.0', '3.0.0')"}), "(params=('2.0', '3.0.0'))\n", (703, 728), False, 'import pytest\n'), ((1616, 1758), 'apispec.APISpec', 'APISpec', ([], {'title': '"""Swagger Petstore"""', 'version': '"""1.0.0"""', 'openapi_version': 'openapi_version', 'info': "{'d...
# -*- mode: python; coding: utf-8 -*- import sys import logging, logging.config import json LOGGER_NAME = 'pg-perfect-ticker' _logger = None def try_print(*args, **kwargs): try: return print(*args, **kwargs) except OSError: pass def log(level, msg): global _logger if _logger is...
[ "json.load", "logging.config.dictConfig", "logging.getLogger" ]
[((714, 749), 'logging.config.dictConfig', 'logging.config.dictConfig', (['log_dict'], {}), '(log_dict)\n', (739, 749), False, 'import logging, logging.config\n'), ((768, 798), 'logging.getLogger', 'logging.getLogger', (['LOGGER_NAME'], {}), '(LOGGER_NAME)\n', (785, 798), False, 'import logging, logging.config\n'), ((6...
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime import sys from sys import stdout stdout.write('Hello from cx_Freeze\n') stdout.write('The current date is %s\n\n' % datetime.today().strftime('%B %d, %Y %H:%M:%S')) stdout.write('Executable: %r\n' % sys.executable) stdout.write...
[ "sys.stdout.write", "sys.getdefaultencoding", "datetime.datetime.today", "sys.getfilesystemencoding" ]
[((112, 150), 'sys.stdout.write', 'stdout.write', (['"""Hello from cx_Freeze\n"""'], {}), "('Hello from cx_Freeze\\n')\n", (124, 150), False, 'from sys import stdout\n'), ((258, 307), 'sys.stdout.write', 'stdout.write', (["('Executable: %r\\n' % sys.executable)"], {}), "('Executable: %r\\n' % sys.executable)\n", (270, ...
import numpy as np import os from PIL import Image from torch.utils.data import Dataset EXTENSIONS = ['.jpg', '.png'] def load_image(file): return Image.open(file) def is_image(filename): return any(filename.endswith(ext) for ext in EXTENSIONS) def is_label(filename): return filename.endswith("_labelT...
[ "os.path.expanduser", "PIL.Image.open", "os.path.splitext", "os.path.join", "os.listdir" ]
[((155, 171), 'PIL.Image.open', 'Image.open', (['file'], {}), '(file)\n', (165, 171), False, 'from PIL import Image\n'), ((389, 433), 'os.path.join', 'os.path.join', (['root', 'f"""{basename}{extension}"""'], {}), "(root, f'{basename}{extension}')\n", (401, 433), False, 'import os\n'), ((479, 508), 'os.path.join', 'os....
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
[ "sys.path.append", "unittest.main", "functools.partial", "auto_scan_test.AutoScanTest.__init__", "hypothesis.strategies.sampled_from", "hypothesis.strategies.integers" ]
[((622, 644), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (637, 644), False, 'import sys\n'), ((4006, 4030), 'unittest.main', 'unittest.main', ([], {'argv': "['']"}), "(argv=[''])\n", (4019, 4030), False, 'import unittest\n'), ((1111, 1155), 'auto_scan_test.AutoScanTest.__init__', 'AutoScanT...
from flask_sqlalchemy import SQLAlchemy from sqlalchemy import Column, Integer, String, Boolean from todo.database import Base from todo import app db = SQLAlchemy(app) class Entry(db.Model): __tablename__ = "entries" id = Column(Integer, primary_key=True) title = Column(String) order = Column(Intege...
[ "flask_sqlalchemy.SQLAlchemy", "sqlalchemy.Column" ]
[((154, 169), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', (['app'], {}), '(app)\n', (164, 169), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((234, 267), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (240, 267), False, 'from sqlalchemy import Column, ...
# Copyright (c) 2015 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
[ "tchannel.TChannel", "tchannel.Response" ]
[((1439, 1462), 'tchannel.TChannel', 'TChannel', ([], {'name': '"""server"""'}), "(name='server')\n", (1447, 1462), False, 'from tchannel import TChannel, Request, Response, schemes\n'), ((1770, 1793), 'tchannel.TChannel', 'TChannel', ([], {'name': '"""client"""'}), "(name='client')\n", (1778, 1793), False, 'from tchan...
import time import os import shutil from Dataload.dataload_SST_binary import * from DataUtils.alphabet import CreateAlphabet import torch from DataUtils.batch_iterator import * from DataUtils.Embed import Embed from DataUtils.common import paddingkey from model.Text_Classification import * def get_learning_algorithm(...
[ "os.makedirs", "os.path.isdir", "os.path.exists", "time.time", "DataUtils.Embed.Embed", "shutil.rmtree", "DataUtils.alphabet.CreateAlphabet", "os.path.join" ]
[((1605, 1625), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (1619, 1625), False, 'import os\n'), ((6188, 6199), 'time.time', 'time.time', ([], {}), '()\n', (6197, 6199), False, 'import time\n'), ((6295, 6331), 'os.path.exists', 'os.path.exists', (['config.pkl_directory'], {}), '(config.pkl_directory...
from keras import backend as K def reshape2d_by_image_dim_ordering(X): """ image_dim_orderring に合わせて2D画像のshapeを変える """ if K.image_dim_ordering() == 'th': X = X.reshape(X.shape[0], 1, 96, 96) input_shape = (1, 96, 96) else: X = X.reshape(X.shape[0], 96, 96, 1) input_shape = (96, 96, 1)...
[ "keras.backend.image_dim_ordering" ]
[((131, 153), 'keras.backend.image_dim_ordering', 'K.image_dim_ordering', ([], {}), '()\n', (151, 153), True, 'from keras import backend as K\n')]
#!/usr/bin/env python """This is part of the MEA-Calendar Webex-Teams bot functionality. It overcomes the limitation of the ngrok free account limitation of tunnel expiration every 8 hours, by automatically stopping the current ngrok and botkit every 7.5 hours and then recreating a new ngrok session, getting the ne...
[ "schedule.run_pending", "threading.Thread", "subprocess.run", "subprocess.Popen", "json.loads", "time.sleep", "time.time", "requests.get", "schedule.every", "sys.exit" ]
[((1130, 1144), 'time.sleep', 'time.sleep', (['(10)'], {}), '(10)\n', (1140, 1144), False, 'import time\n'), ((1308, 1343), 'subprocess.run', 'subprocess.run', (['command'], {'shell': '(True)'}), '(command, shell=True)\n', (1322, 1343), False, 'import subprocess\n'), ((1524, 1567), 'subprocess.run', 'subprocess.run', (...
from django.conf import settings from django.http import HttpResponsePermanentRedirect from django.template import Context from django.template.exceptions import TemplateDoesNotExist from django.template.loader import get_template from django.utils.deprecation import MiddlewareMixin from django_boost.http.response imp...
[ "django.template.Context", "django.template.loader.get_template" ]
[((1414, 1437), 'django.template.loader.get_template', 'get_template', (['file_name'], {}), '(file_name)\n', (1426, 1437), False, 'from django.template.loader import get_template\n'), ((1460, 1469), 'django.template.Context', 'Context', ([], {}), '()\n', (1467, 1469), False, 'from django.template import Context\n')]
"""Space switching without constraints or extra DAG nodes. Contains functions to create a space switching network as well as seamlessly switching between spaces. Example Usage ============= :: import cmt.rig.spaceswitch as spaceswitch # Create the space switch spaceswitch.create_space_switch( p...
[ "maya.cmds.listRelatives", "maya.cmds.addAttr", "maya.cmds.deleteAttr", "cmt.shortcuts.get_dag_path2", "maya.cmds.xform" ]
[((2238, 2286), 'maya.cmds.listRelatives', 'cmds.listRelatives', (['node'], {'parent': '(True)', 'path': '(True)'}), '(node, parent=True, path=True)\n', (2256, 2286), True, 'import maya.cmds as cmds\n'), ((3215, 3304), 'maya.cmds.addAttr', 'cmds.addAttr', (['node'], {'ln': 'attribute', 'at': '"""bool"""', 'defaultValue...
########################################################################## # # MTraceCheck # Copyright 2017 The Regents of the University of Michigan # <NAME> and <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 obtai...
[ "sys.stdout.write", "sys.exit" ]
[((2695, 2728), 'sys.stdout.write', 'sys.stdout.write', (['"""Instruction: """'], {}), "('Instruction: ')\n", (2711, 2728), False, 'import sys\n'), ((2774, 2797), 'sys.stdout.write', 'sys.stdout.write', (['"""ld """'], {}), "('ld ')\n", (2790, 2797), False, 'import sys\n'), ((2810, 2849), 'sys.stdout.write', 'sys.stdou...
# -*- coding: utf-8 -*- import math """ Created on Wed Oct 9 00:51:06 2019 @author: randel """ class Calculator(object): ''' Classe Calculadora, especializada em realizar as seguintes operações matemáticas: add - adição de dois números; subtract - subtração de dois números; multiply - multiplicaç...
[ "math.sqrt" ]
[((2692, 2713), 'math.sqrt', 'math.sqrt', (['numbers[0]'], {}), '(numbers[0])\n', (2701, 2713), False, 'import math\n')]
#!/usr/bin/env python3 from migrator import run_migrations run_migrations("shared_functions")
[ "migrator.run_migrations" ]
[((61, 95), 'migrator.run_migrations', 'run_migrations', (['"""shared_functions"""'], {}), "('shared_functions')\n", (75, 95), False, 'from migrator import run_migrations\n')]
import unittest from lymph.core.monitoring.global_metrics import ProcessMetrics class GlobalMetricsTests(unittest.TestCase): def setUp(self): self.process_metrics = ProcessMetrics() def test_process_metrics(self): metric_names = [m[0] for m in self.process_metrics] self.assertIn('pr...
[ "lymph.core.monitoring.global_metrics.ProcessMetrics" ]
[((180, 196), 'lymph.core.monitoring.global_metrics.ProcessMetrics', 'ProcessMetrics', ([], {}), '()\n', (194, 196), False, 'from lymph.core.monitoring.global_metrics import ProcessMetrics\n')]
import os from dvc.exceptions import MoveNotDataSourceError, DvcException def _expand_target_path(from_path, to_path): if os.path.isdir(to_path) and not os.path.isdir(from_path): return os.path.join(to_path, os.path.basename(from_path)) return to_path def move(self, from_path, to_path): """ ...
[ "os.unlink", "os.path.basename", "os.path.isdir", "os.path.dirname", "dvc.exceptions.MoveNotDataSourceError", "dvc.stage.Stage" ]
[((1243, 1274), 'os.path.basename', 'os.path.basename', (['from_out.path'], {}), '(from_out.path)\n', (1259, 1274), False, 'import os\n'), ((129, 151), 'os.path.isdir', 'os.path.isdir', (['to_path'], {}), '(to_path)\n', (142, 151), False, 'import os\n'), ((1121, 1158), 'dvc.exceptions.MoveNotDataSourceError', 'MoveNotD...
__author__ = 'kdsouza' from Spec import * from collections import namedtuple #=========== mock Receiver ============= ## This opens a UI, which we do not need to do # receiver = load_data(filename='/Users/kdsouza/Desktop/Projects/pandas_play/weather_year.csv') weather_data = pd.read_csv("/Users/kdsouza/Desktop/Pro...
[ "pandas.util.testing.assert_series_equal", "collections.namedtuple" ]
[((378, 431), 'collections.namedtuple', 'namedtuple', (['"""DataFrameSelection"""', '"""rows, cols, items"""'], {}), "('DataFrameSelection', 'rows, cols, items')\n", (388, 431), False, 'from collections import namedtuple\n'), ((875, 918), 'pandas.util.testing.assert_series_equal', 'assert_series_equal', (['x', "weather...
from django.conf.urls import url from django.contrib import admin import web.views as web_views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', web_views.DocumentManagerView.as_view(), name='web') ]
[ "web.views.DocumentManagerView.as_view", "django.conf.urls.url" ]
[((118, 149), 'django.conf.urls.url', 'url', (['"""^admin/"""', 'admin.site.urls'], {}), "('^admin/', admin.site.urls)\n", (121, 149), False, 'from django.conf.urls import url\n'), ((167, 206), 'web.views.DocumentManagerView.as_view', 'web_views.DocumentManagerView.as_view', ([], {}), '()\n', (204, 206), True, 'import ...
import os, json from flask import render_template, url_for, flash # from ..models import EditableHTML from . import main from app import basedir @main.route('/') def index(): return render_template('main/index.html') @main.route('/resume') def resume(): # resume_data_fname = basedir + url_for('main.static',...
[ "flask.url_for", "json.load", "flask.render_template" ]
[((189, 223), 'flask.render_template', 'render_template', (['"""main/index.html"""'], {}), "('main/index.html')\n", (204, 223), False, 'from flask import render_template, url_for, flash\n'), ((545, 605), 'flask.render_template', 'render_template', (['"""main/resume.html"""'], {'resume_data': 'resume_data'}), "('main/re...
import numpy as np from numpy.testing import assert_almost_equal from numpy.testing import assert_equal from fsmpy.datasets import load_patients_diagnoses from fsmpy.sets import IntuitionisticFuzzySet from fsmpy.similarities import chen_1, hung_yang_4, hung_yang_3, hung_yang_2, hwang_yang, park_kwun_lim, ye, hung_yang...
[ "fsmpy.similarities.hung_yang_2", "fsmpy.similarities.hung_yang_3", "fsmpy.similarities.liu", "fsmpy.similarities.nguyen", "fsmpy.similarities.song_wang_lei_xue", "fsmpy.similarities.hung_yang_4", "fsmpy.similarities.ye", "fsmpy.similarities.zhang_fu", "fsmpy.similarities.dengfeng_chuntian", "fsmp...
[((1849, 1905), 'fsmpy.sets.IntuitionisticFuzzySet', 'IntuitionisticFuzzySet', (['[1.0, 0.8, 0.7]', '[0.0, 0.0, 0.1]'], {}), '([1.0, 0.8, 0.7], [0.0, 0.0, 0.1])\n', (1871, 1905), False, 'from fsmpy.sets import IntuitionisticFuzzySet\n'), ((1915, 1971), 'fsmpy.sets.IntuitionisticFuzzySet', 'IntuitionisticFuzzySet', (['[...
""" this is a test handler for the unit test - test_ham_run. """ from datacoco_core import Logger LOG = Logger() class SqlCompare(object): """ """ def __init__(self, test_conf): """ :param test_conf: :return: """ self.test_conf = test_conf def setup(self, ...
[ "datacoco_core.Logger" ]
[((106, 114), 'datacoco_core.Logger', 'Logger', ([], {}), '()\n', (112, 114), False, 'from datacoco_core import Logger\n')]
''' Copyright (C) 2020 Golagola 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 i...
[ "sys.path.append", "serial.Serial", "module.Serial.Serial.save_received_data", "module.Serial.Serial.get_received_keys", "module.Serial.Serial.get_sensings", "os.path.realpath", "module.Http.Http.request_drinks", "module.Serial.Serial.get_receive_data", "module.Speak.Gspeak", "module.Serial.Serial...
[((761, 802), 'sys.path.append', 'sys.path.append', (['f"""{CURRENT_PATH}/module"""'], {}), "(f'{CURRENT_PATH}/module')\n", (776, 802), False, 'import os, sys\n'), ((733, 759), 'os.path.realpath', 'os.path.realpath', (['__file__'], {}), '(__file__)\n', (749, 759), False, 'import os, sys\n'), ((1507, 1536), 'module.Seri...
import os import unittest import tblib # ensure installed import bigflow.testing.isolate from . import nonpure class TestIsolateMixinTestCase(unittest.TestCase): class SubTest(unittest.TestCase): failed = False @classmethod def setUpClass(cls): cls.pid = os.getpid() ...
[ "unittest.defaultTestLoader.loadTestsFromTestCase", "unittest.skip", "os.getpid", "unittest.TextTestRunner" ]
[((584, 610), 'unittest.skip', 'unittest.skip', (['"""test-skip"""'], {}), "('test-skip')\n", (597, 610), False, 'import unittest\n'), ((2190, 2229), 'unittest.TextTestRunner', 'unittest.TextTestRunner', ([], {'stream': 'devnull'}), '(stream=devnull)\n', (2213, 2229), False, 'import unittest\n'), ((2246, 2306), 'unitte...
import pytest from citrination_client.models.columns import * from citrination_client.base.errors import * class TestVectorColumn(object): @classmethod def setup_class(self): self.name = "Property Band gap" self.role = "Input" self.group_by_key = False self.units = "eV" de...
[ "pytest.raises" ]
[((576, 613), 'pytest.raises', 'pytest.raises', (['CitrinationClientError'], {}), '(CitrinationClientError)\n', (589, 613), False, 'import pytest\n')]
# Copyright 2014 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
[ "google.cloud.datastore_v1.proto.entity_pb2.Entity", "google.cloud.datastore.batch.Batch", "google.cloud.datastore.helpers._new_value_pb", "mock.patch.multiple", "google.cloud.datastore.batch.Batch.begin", "google.cloud.datastore.entity.Entity", "google.cloud.datastore.client._determine_default_project"...
[((678, 729), 'mock.Mock', 'mock.Mock', ([], {'spec': 'google.auth.credentials.Credentials'}), '(spec=google.auth.credentials.Credentials)\n', (687, 729), False, 'import mock\n'), ((942, 961), 'google.cloud.datastore_v1.proto.entity_pb2.Entity', 'entity_pb2.Entity', ([], {}), '()\n', (959, 961), False, 'from google.clo...
# -*- coding: utf-8 -*- """The CUPS IPP Control Files Parser. CUPS IPP version 1.0: * http://tools.ietf.org/html/rfc2565 * http://tools.ietf.org/html/rfc2566 * http://tools.ietf.org/html/rfc2567 * http://tools.ietf.org/html/rfc2568 * http://tools.ietf.org/html/rfc2569 * http://tools.ietf.org/html/rfc2639 CUPS IPP ver...
[ "plaso.containers.time_events.DateTimeValuesEvent", "construct.String", "dfdatetime.rfc2579_date_time.RFC2579DateTime", "construct.UBInt32", "plaso.parsers.manager.ParsersManager.RegisterParser", "construct.UBInt8", "dfdatetime.posix_time.PosixTime", "construct.UBInt16", "construct.Padding" ]
[((13647, 13699), 'plaso.parsers.manager.ParsersManager.RegisterParser', 'manager.ParsersManager.RegisterParser', (['CupsIppParser'], {}), '(CupsIppParser)\n', (13684, 13699), False, 'from plaso.parsers import manager\n'), ((4163, 4190), 'construct.UBInt8', 'construct.UBInt8', (['"""integer"""'], {}), "('integer')\n", ...
from django_visipedia import client, PersistentStorage from django_visipedia.models import VisipediaUser from django.contrib.auth import authenticate, login, logout class VisipediaMiddleware(object): @staticmethod def process_request(request): assert hasattr(request, ...
[ "django.contrib.auth.login", "django.contrib.auth.logout", "django_visipedia.PersistentStorage", "django.contrib.auth.authenticate" ]
[((626, 660), 'django_visipedia.PersistentStorage', 'PersistentStorage', (['request.session'], {}), '(request.session)\n', (643, 660), False, 'from django_visipedia import client, PersistentStorage\n'), ((1344, 1359), 'django.contrib.auth.logout', 'logout', (['request'], {}), '(request)\n', (1350, 1359), False, 'from d...
''' selenium 软件测试工具, 功能测试, 单元测试, 性能测试, 压力测试, 安全性测试 1) 安装 selenium pip install selenium 2) 浏览器的驱动 下载驱动程序, 版本 查看Chrome浏览器的版本 3) 将驱动程序拷贝到项目目录下 注意: 驱动一般直接放到项目目录下, 如果不行, 放到Anaconda下的Scripts文件夹下 ''' from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait from selenium....
[ "selenium.webdriver.support.expected_conditions.presence_of_element_located", "time.sleep", "selenium.webdriver.Chrome", "selenium.webdriver.support.wait.WebDriverWait" ]
[((457, 475), 'selenium.webdriver.Chrome', 'webdriver.Chrome', ([], {}), '()\n', (473, 475), False, 'from selenium import webdriver\n'), ((767, 793), 'selenium.webdriver.support.wait.WebDriverWait', 'WebDriverWait', (['browser', '(10)'], {}), '(browser, 10)\n', (780, 793), False, 'from selenium.webdriver.support.wait i...
# Enable HSM shapes (unsetup meas_extensions_shapeHSM to disable) # 'config' is a SourceMeasurementConfig. import os.path from lsst.utils import getPackageDir try: config.load(os.path.join(getPackageDir("meas_extensions_shapeHSM"), "config", "enable.py")) config.plugins["ext_shapeHSM_HsmShapeRegauss"].deblendN...
[ "lsst.utils.getPackageDir" ]
[((194, 235), 'lsst.utils.getPackageDir', 'getPackageDir', (['"""meas_extensions_shapeHSM"""'], {}), "('meas_extensions_shapeHSM')\n", (207, 235), False, 'from lsst.utils import getPackageDir\n')]
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import math import random import logging import pickle import numpy as np import sklearn from data import FaceImageIter import mxnet as mx from mxnet import ndarray as nd import argparse im...
[ "numpy.abs", "argparse.ArgumentParser", "numpy.sum", "numpy.argmax", "fresnet.get_symbol", "fmobilenet.get_symbol", "mxnet.io.PrefetchingIter", "mxnet.optimizer.SGD", "os.path.join", "mxnet.sym.BlockGrad", "mxnet.callback.Speedometer", "os.path.dirname", "os.path.exists", "mxnet.gpu", "m...
[((484, 503), 'logging.getLogger', 'logging.getLogger', ([], {}), '()\n', (501, 503), False, 'import logging\n'), ((3241, 3298), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Train face network"""'}), "(description='Train face network')\n", (3264, 3298), False, 'import argparse\n'), ((6...
from validator import Validator, DatetimeField, create_validator class V(Validator): create_at = DatetimeField() def test_ok(): data = {'create_at': 1532339910} v = V(data) assert v.is_valid() data = {'create_at': '1532339910'} v = V(data) assert v.is_valid() data = {'create_at...
[ "validator.create_validator", "validator.DatetimeField" ]
[((107, 122), 'validator.DatetimeField', 'DatetimeField', ([], {}), '()\n', (120, 122), False, 'from validator import Validator, DatetimeField, create_validator\n'), ((1140, 1162), 'validator.create_validator', 'create_validator', (['data'], {}), '(data)\n', (1156, 1162), False, 'from validator import Validator, Dateti...
from dcos_migrate.system import StorableList, Backup def create_example_list(dir: str) -> StorableList: list = StorableList(str(dir)) p = "testPlugin" b = "foobar" d = {"foo": "bar"} list.append(Backup(pluginName=p, backupName=b, data=d)) list.store() return list, ...
[ "dcos_migrate.system.Backup" ]
[((218, 260), 'dcos_migrate.system.Backup', 'Backup', ([], {'pluginName': 'p', 'backupName': 'b', 'data': 'd'}), '(pluginName=p, backupName=b, data=d)\n', (224, 260), False, 'from dcos_migrate.system import StorableList, Backup\n')]
from amaranth.hdl.mem import * from amaranth.hdl.mem import __all__ import warnings warnings.warn("instead of nmigen.hdl.mem, use amaranth.hdl.mem", DeprecationWarning, stacklevel=2)
[ "warnings.warn" ]
[((86, 188), 'warnings.warn', 'warnings.warn', (['"""instead of nmigen.hdl.mem, use amaranth.hdl.mem"""', 'DeprecationWarning'], {'stacklevel': '(2)'}), "('instead of nmigen.hdl.mem, use amaranth.hdl.mem',\n DeprecationWarning, stacklevel=2)\n", (99, 188), False, 'import warnings\n')]
#!/usr/bin/env python # SPDX-License-Identifier: Apache-2.0 # # The OpenSearch Contributors require contributions made to # this file be licensed under the Apache-2.0 license or a # compatible open source license. import logging import os import sys from git.git_repository import GitRepository from manifests.build_ma...
[ "os.path.join", "test_workflow.test_result.test_suite_results.TestSuiteResults", "test_workflow.dependency_installer.DependencyInstaller", "os.path.dirname", "test_workflow.integ_test.integ_test_suite.IntegTestSuite", "test_workflow.test_recorder.test_recorder.TestRecorder", "logging.info", "test_work...
[((894, 934), 'logging.info', 'logging.info', (['"""Pulling opensearch-build"""'], {}), "('Pulling opensearch-build')\n", (906, 934), False, 'import logging\n'), ((1176, 1186), 'test_workflow.test_args.TestArgs', 'TestArgs', ([], {}), '()\n', (1184, 1186), False, 'from test_workflow.test_args import TestArgs\n'), ((119...
# from __future__ import division import timeit import time from math import sqrt from numpy import concatenate import matplotlib.pyplot as plt from pandas import read_csv from pandas import DataFrame from pandas import concat from sklearn.metrics import mean_squared_error from sklearn import preprocessing import nump...
[ "keras.models.load_model", "pandas.read_csv", "sklearn.preprocessing.MinMaxScaler", "numpy.argsort", "os.path.isfile", "pickle.load", "pandas.DataFrame", "os.path.exists", "random.seed", "pandas.concat", "keras.callbacks.ModelCheckpoint", "keras.layers.Dropout", "numpy.min", "numpy.concate...
[((2622, 2652), 'numpy.array', 'np.array', (['data.loc[:, Ut_list]'], {}), '(data.loc[:, Ut_list])\n', (2630, 2652), True, 'import numpy as np\n'), ((2673, 2701), 'sklearn.preprocessing.MinMaxScaler', 'preprocessing.MinMaxScaler', ([], {}), '()\n', (2699, 2701), False, 'from sklearn import preprocessing\n'), ((3394, 34...
# This code is written at BigVision LLC. It is based on the OpenCV project. It is subject to the license terms in the LICENSE file found in this distribution and at http://opencv.org/license.html # Usage example: python3 object_detection_yolo.py --video=run.mp4 --device 'cpu' # python3 object_detectio...
[ "win32gui.ClientToScreen", "argparse.ArgumentParser", "cv2.dnn.NMSBoxes", "numpy.argmax", "pyautogui.screenshot", "os.path.isfile", "cv2.rectangle", "win32gui.SetForegroundWindow", "requests.post", "cv2.imshow", "telebot.TeleBot", "cv2.getTickFrequency", "cv2.dnn.blobFromImage", "datetime....
[((1220, 1285), 'telebot.TeleBot', 'telebot.TeleBot', (['"""2002045567:AAFBWxp3Fpxf9OdhRFm8HxCUMvAhuZVLwq4"""'], {}), "('2002045567:AAFBWxp3Fpxf9OdhRFm8HxCUMvAhuZVLwq4')\n", (1235, 1285), False, 'import telebot\n'), ((1418, 1474), 'ftplib.FTP', 'FTP', (['"""172.16.58.3"""'], {'user': '"""taxiuser"""', 'passwd': '"""<PA...
## Libraries imports import os import discord from discord.ext import commands from dotenv import load_dotenv from config import * ## App imports from app.settings import Settings from app.utils import guild_to_audiocontroller, guild_to_settings from app.audio_controller import AudioController from app.static import C...
[ "discord.Activity", "app.audio_controller.AudioController", "discord.ext.commands.when_mentioned_or", "discord.Embed", "app.commands.music.Music", "dotenv.load_dotenv", "app.settings.Settings", "app.commands.general.General", "app.static.COMMANDS.items", "os.getenv", "discord.Intents.all" ]
[((427, 440), 'dotenv.load_dotenv', 'load_dotenv', ([], {}), '()\n', (438, 440), False, 'from dotenv import load_dotenv\n'), ((519, 540), 'discord.Intents.all', 'discord.Intents.all', ([], {}), '()\n', (538, 540), False, 'import discord\n'), ((569, 595), 'os.getenv', 'os.getenv', (['"""DISCORD_TOKEN"""'], {}), "('DISCO...
from django.shortcuts import get_object_or_404 from rest_framework import permissions from boards.models import Board class IsAuthorOrParticipantOrAdminForCreateList(permissions.BasePermission): def has_permission(self, request, view): board = get_object_or_404(Board, id=request.data['board']) ...
[ "django.shortcuts.get_object_or_404" ]
[((260, 310), 'django.shortcuts.get_object_or_404', 'get_object_or_404', (['Board'], {'id': "request.data['board']"}), "(Board, id=request.data['board'])\n", (277, 310), False, 'from django.shortcuts import get_object_or_404\n')]
from django.db import models from django.forms.models import ModelForm from django import forms from django.contrib import admin from django.contrib.auth.models import User,Group import string, datetime from django.template.defaultfilters import slugify class List(models.Model): name = models.CharField(max_length...
[ "django.db.models.TextField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.PositiveIntegerField", "django.db.models.Manager", "django.db.models.SlugField", "django.db.models.BooleanField", "datetime.date.today", "django.template.defaultfilters.slugify", "django.db...
[((293, 324), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(60)'}), '(max_length=60)\n', (309, 324), False, 'from django.db import models\n'), ((336, 383), 'django.db.models.SlugField', 'models.SlugField', ([], {'max_length': '(60)', 'editable': '(False)'}), '(max_length=60, editable=False)\n'...
from django.http import JsonResponse from rest_framework.views import APIView from rest_framework.response import Response class TestAPIView(APIView): def get(self, request, *args, **kwargs): return self.finalize_response(request, Response({ 'data': [ {'id': 1, 'some_data': 'fo...
[ "django.http.JsonResponse" ]
[((743, 769), 'django.http.JsonResponse', 'JsonResponse', (['request.POST'], {}), '(request.POST)\n', (755, 769), False, 'from django.http import JsonResponse\n'), ((795, 861), 'django.http.JsonResponse', 'JsonResponse', (["{'field1': 'field1_value', 'field2': 'field2_value'}"], {}), "({'field1': 'field1_value', 'field...
import os import sys import subprocess from io import StringIO from typing import List from caos._internal.types import ExitCode from caos._internal.utils.yaml import get_virtual_environment_from_yaml from caos._internal.utils.working_directory import get_current_dir from caos._internal.utils.os import is_posix_os, is_...
[ "subprocess.run", "os.path.abspath", "caos._cli_commands.raise_exceptions.raise_missing_yaml_exception", "caos._internal.constants.PIP_PATH_VENV_POSIX.replace", "caos._cli_commands.raise_exceptions.raise_missing_virtual_environment_exception", "caos._internal.utils.yaml.get_virtual_environment_from_yaml",...
[((708, 725), 'caos._internal.utils.working_directory.get_current_dir', 'get_current_dir', ([], {}), '()\n', (723, 725), False, 'from caos._internal.utils.working_directory import get_current_dir\n'), ((872, 907), 'caos._internal.utils.yaml.get_virtual_environment_from_yaml', 'get_virtual_environment_from_yaml', ([], {...
import serial import time import paho.mqtt.client as mqtt import sys host = "192.168.1.11" puerto = 1883 arduino = serial.Serial('/dev/ttyACM0', 115200) time.sleep(2) Connected = False def on_connect(client, userdata, flags, rc): if rc == 0: print("Connected to broker") client.subscribe...
[ "serial.Serial", "paho.mqtt.client.Client", "time.sleep" ]
[((116, 153), 'serial.Serial', 'serial.Serial', (['"""/dev/ttyACM0"""', '(115200)'], {}), "('/dev/ttyACM0', 115200)\n", (129, 153), False, 'import serial\n'), ((154, 167), 'time.sleep', 'time.sleep', (['(2)'], {}), '(2)\n', (164, 167), False, 'import time\n'), ((783, 796), 'paho.mqtt.client.Client', 'mqtt.Client', ([],...
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-11-24 16:02 from __future__ import unicode_literals from django.db import migrations def sublists_to_children(apps, schema): TestList = apps.get_model("qa", "TestList") Sublist = apps.get_model("qa", "Sublist") for tl in TestList.objects.filt...
[ "django.db.migrations.RunPython" ]
[((938, 1002), 'django.db.migrations.RunPython', 'migrations.RunPython', (['sublists_to_children', 'children_to_sublists'], {}), '(sublists_to_children, children_to_sublists)\n', (958, 1002), False, 'from django.db import migrations\n')]
""" Code for Parsing-Reading-Predict Networks (PRPN; Shen et al., 2018) This file is a version of a class from https://github.com/yikangshen/PRPN, modified to integrate with jiant. We modified the forward function of original PRPN code. """ import torch import torch.nn as nn from .ParsingNetwork import ParsingNetwork ...
[ "torch.nn.Dropout", "torch.ones", "torch.nn.Embedding", "torch.stack" ]
[((1061, 1080), 'torch.nn.Dropout', 'nn.Dropout', (['dropout'], {}), '(dropout)\n', (1071, 1080), True, 'import torch.nn as nn\n'), ((1102, 1122), 'torch.nn.Dropout', 'nn.Dropout', (['idropout'], {}), '(idropout)\n', (1112, 1122), True, 'import torch.nn as nn\n'), ((1144, 1164), 'torch.nn.Dropout', 'nn.Dropout', (['rdr...
import netCDF4 import bisect import warnings from collections import OrderedDict import numpy as np from kid_readout.roach.tools import ntone_power_correction import kid_readout.analysis.timeseries.fftfilt from kid_readout.measurement.io.data_block import lpf import kid_readout.roach.tools class TimestreamGroup(obj...
[ "netCDF4.Dataset", "numpy.zeros_like", "numpy.flatnonzero", "numpy.zeros", "kid_readout.roach.tools.ntone_power_correction", "numpy.where", "numpy.arange", "collections.OrderedDict", "warnings.warn", "bisect.bisect_left" ]
[((5280, 5336), 'numpy.zeros', 'np.zeros', (['indexes_to_calculate.shape[0]'], {'dtype': '"""complex"""'}), "(indexes_to_calculate.shape[0], dtype='complex')\n", (5288, 5336), True, 'import numpy as np\n'), ((6564, 6599), 'netCDF4.Dataset', 'netCDF4.Dataset', (['filename'], {'mode': '"""r"""'}), "(filename, mode='r')\n...
""" File: bouncing_ball.py Name: Minny ------------------------- TODO: This program simulates a bouncing ball at (START_X, START_Y) that has VX as x velocity and 0 as y velocity. """ from campy.graphics.gobjects import GOval from campy.graphics.gwindow import GWindow from campy.gui.events.timer import ...
[ "campy.gui.events.mouse.onmouseclicked", "campy.graphics.gobjects.GOval", "campy.graphics.gwindow.GWindow", "campy.gui.events.timer.pause" ]
[((506, 545), 'campy.graphics.gobjects.GOval', 'GOval', (['SIZE', 'SIZE'], {'x': 'START_X', 'y': 'START_Y'}), '(SIZE, SIZE, x=START_X, y=START_Y)\n', (511, 545), False, 'from campy.graphics.gobjects import GOval\n'), ((605, 648), 'campy.graphics.gwindow.GWindow', 'GWindow', (['(800)', '(500)'], {'title': '"""bouncing_b...
from django.db import models from constants import APPLICATION_LABEL from project import Project class ProjectImpact(models.Model): project = models.ForeignKey(Project, blank=False, related_name='impacts') title = models.CharField(max_length=200, help_text='Title for this impact.', blank=False, null=False...
[ "django.db.models.ForeignKey", "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.CharField" ]
[((152, 215), 'django.db.models.ForeignKey', 'models.ForeignKey', (['Project'], {'blank': '(False)', 'related_name': '"""impacts"""'}), "(Project, blank=False, related_name='impacts')\n", (169, 215), False, 'from django.db import models\n'), ((228, 338), 'django.db.models.CharField', 'models.CharField', ([], {'max_leng...
import pandas as pd import itertools as it import numpy as np global CACHE CACHE = {} COLS = ['FlightDate', 'CRSDepTime', 'Tail_Number', 'ArrDelay', 'DepDelay', 'AirTime', 'DistanceGroup', 'Distance', 'Origin', 'Dest'] def get_df(strng, source_path): global CACHE if strng not in CACHE: df = pd.read_...
[ "pandas.read_csv", "pandas.concat" ]
[((312, 367), 'pandas.read_csv', 'pd.read_csv', (["(source_path + strng + '.csv')"], {'usecols': 'COLS'}), "(source_path + strng + '.csv', usecols=COLS)\n", (323, 367), True, 'import pandas as pd\n'), ((1410, 1440), 'pandas.concat', 'pd.concat', (['[flights, flights2]'], {}), '([flights, flights2])\n', (1419, 1440), Tr...
from collections import Counter from autonmt.bundle.utils import read_file_lines, write_file_lines, flatten from autonmt.vocabularies.base_vocab import BaseVocabulary class Vocabulary(BaseVocabulary): def __init__(self, unk_id=0, sos_id=1, eos_id=2, pad_id=3, unk_piece="<unk>",...
[ "autonmt.bundle.utils.read_file_lines", "autonmt.bundle.utils.write_file_lines" ]
[((4566, 4638), 'autonmt.bundle.utils.write_file_lines', 'write_file_lines', ([], {'lines': 'lines', 'filename': 'filename', 'insert_break_line': '(True)'}), '(lines=lines, filename=filename, insert_break_line=True)\n', (4582, 4638), False, 'from autonmt.bundle.utils import read_file_lines, write_file_lines, flatten\n'...
import os import csv from PIL import Image import numpy as np import torch import torch.utils.data as data from torchvision import datasets, transforms import params class COVID19_Dataset(Dataset): """ COVID-19 image data collection Dataset: https://github.com/ieee8023/covid-chestxray-dataset ...
[ "numpy.random.seed", "numpy.asarray", "os.path.join" ]
[((422, 481), 'os.path.join', 'os.path.join', (['thispath', '"""covid-chestxray-dataset"""', '"""images"""'], {}), "(thispath, 'covid-chestxray-dataset', 'images')\n", (434, 481), False, 'import os\n'), ((509, 574), 'os.path.join', 'os.path.join', (['thispath', '"""covid-chestxray-dataset"""', '"""metadata.csv"""'], {}...
"""Combine for flow artifact mitigated average (composite) image.""" import os import numpy as np import nibabel as nb NII_NAMES = [ '/home/faruk/data/DATA_MRI_NIFTI/derived/sub-23/T2s/09_average/sub-23_ses-T2s_dir-Mx_part-mag_MEGRE_crop_ups2X_prepped_avg.nii.gz', '/home/faruk/data/DATA_MRI_NIFTI/derived/sub-...
[ "nibabel.Nifti1Image", "os.path.exists", "os.makedirs", "nibabel.load" ]
[((816, 837), 'nibabel.load', 'nb.load', (['NII_NAMES[0]'], {}), '(NII_NAMES[0])\n', (823, 837), True, 'import nibabel as nb\n'), ((845, 866), 'nibabel.load', 'nb.load', (['NII_NAMES[1]'], {}), '(NII_NAMES[1])\n', (852, 866), True, 'import nibabel as nb\n'), ((1347, 1388), 'nibabel.Nifti1Image', 'nb.Nifti1Image', (['da...
#!/usr/bin/env python ''' parse a MAVLink protocol XML file and generate an Objective-C implementation Copyright <NAME> 2013 Released under GNU GPL version 3 or later ''' from __future__ import print_function import os from . import mavparse, mavtemplate t = mavtemplate.MAVTemplate() def generate_mavlink(directory,...
[ "os.path.join" ]
[((10172, 10208), 'os.path.join', 'os.path.join', (['basename', 'xml.basename'], {}), '(basename, xml.basename)\n', (10184, 10208), False, 'import os\n'), ((395, 433), 'os.path.join', 'os.path.join', (['directory', '"""MVMavlink.h"""'], {}), "(directory, 'MVMavlink.h')\n", (407, 433), False, 'import os\n'), ((2395, 243...
from matplotlib import pyplot as plt import sys m = 10000000000 ''' for name in sys.argv[1:]: with open(name, "r") as f: r = f.read() m = min(m,len( r.split("\n"))) ''' for name in sys.argv[1:]: with open(name, "r") as f: r = f.read() l = [a for a in r.split("\n") if a != ""] ...
[ "matplotlib.pyplot.legend", "matplotlib.pyplot.savefig" ]
[((525, 537), 'matplotlib.pyplot.legend', 'plt.legend', ([], {}), '()\n', (535, 537), True, 'from matplotlib import pyplot as plt\n'), ((538, 572), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""band_comparison.png"""'], {}), "('band_comparison.png')\n", (549, 572), True, 'from matplotlib import pyplot as plt\n')]
''' Created on Mar 13, 2012 .. codeauthor:: jhkwakkel <j.h.kwakkel (at) tudelft (dot) nl> ''' import unittest import numpy as np import pandas as pd from ema_workbench.analysis import prim from ema_workbench.analysis.prim import PrimBox from test import utilities from ema_workbench.analysis.scenario_discovery_util i...
[ "test.utilities.load_flu_data", "numpy.abs", "numpy.ones", "ema_workbench.analysis.prim.PrimBox", "numpy.random.randint", "numpy.arange", "unittest.main", "pandas.DataFrame", "ema_workbench.analysis.prim.Prim", "numpy.max", "ema_workbench.analysis.prim.setup_prim", "numpy.min", "pandas.Serie...
[((546, 571), 'numpy.zeros', 'np.zeros', (['result.shape[0]'], {}), '(result.shape[0])\n', (554, 571), True, 'import numpy as np\n'), ((813, 854), 'numpy.abs', 'np.abs', (['(outcome[:, 1:] - outcome[:, 0:-1])'], {}), '(outcome[:, 1:] - outcome[:, 0:-1])\n', (819, 854), True, 'import numpy as np\n'), ((876, 898), 'numpy...
from pathlib import Path import pytest import pandas as pd import json import os import urllib import re from nidm.experiment.Utils import map_variables_to_terms import tempfile from os.path import join from nidm.core import Constants from uuid import UUID @pytest.fixture(scope="module", autouse="True") def setu...
[ "pandas.DataFrame", "json.load", "json.loads", "tempfile.gettempdir", "pytest.fixture" ]
[((265, 311), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""module"""', 'autouse': '"""True"""'}), "(scope='module', autouse='True')\n", (279, 311), False, 'import pytest\n'), ((626, 644), 'pandas.DataFrame', 'pd.DataFrame', (['temp'], {}), '(temp)\n', (638, 644), True, 'import pandas as pd\n'), ((673, 2881), ...
# -*- coding: utf-8 -*- """ Test Household model module. """ from django.test import TestCase from mspray.apps.main.models.household import Household from mspray.apps.main.models.location import Location from mspray.apps.main.tests.utils import data_setup, load_spray_data class TestHousehold(TestCase): """Test H...
[ "mspray.apps.main.models.household.Household.objects.filter", "mspray.apps.main.tests.utils.load_spray_data", "mspray.apps.main.models.location.Location.objects.get", "mspray.apps.main.tests.utils.data_setup" ]
[((413, 425), 'mspray.apps.main.tests.utils.data_setup', 'data_setup', ([], {}), '()\n', (423, 425), False, 'from mspray.apps.main.tests.utils import data_setup, load_spray_data\n'), ((434, 451), 'mspray.apps.main.tests.utils.load_spray_data', 'load_spray_data', ([], {}), '()\n', (449, 451), False, 'from mspray.apps.ma...
"""Network helpers.""" from ipaddress import ip_address from typing import cast import yarl from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import HomeAssistantError from homeassistant.loader import bind_hass from homeassistant.util.network import ( is_ip_address, is_local...
[ "yarl.URL.build", "ipaddress.ip_address", "yarl.URL" ]
[((5684, 5729), 'yarl.URL', 'yarl.URL', (['hass.config.api.deprecated_base_url'], {}), '(hass.config.api.deprecated_base_url)\n', (5692, 5729), False, 'import yarl\n'), ((2367, 2401), 'yarl.URL', 'yarl.URL', (['hass.config.internal_url'], {}), '(hass.config.internal_url)\n', (2375, 2401), False, 'import yarl\n'), ((316...
from souschef.jinja_expression import ( get_global_jinja_var, is_jinja_expression, set_global_jinja_var, ) def test_add_jinja_var(pure_yaml_with_comments): set_global_jinja_var(pure_yaml_with_comments, "version", "10.9.8") assert get_global_jinja_var(pure_yaml_with_comments, "version") == "10.9.8"...
[ "souschef.jinja_expression.get_global_jinja_var", "souschef.jinja_expression.set_global_jinja_var", "souschef.jinja_expression.is_jinja_expression" ]
[((174, 240), 'souschef.jinja_expression.set_global_jinja_var', 'set_global_jinja_var', (['pure_yaml_with_comments', '"""version"""', '"""10.9.8"""'], {}), "(pure_yaml_with_comments, 'version', '10.9.8')\n", (194, 240), False, 'from souschef.jinja_expression import get_global_jinja_var, is_jinja_expression, set_global_...
import sys, os, glob import pandas as pd, numpy as np import ujson import datetime from ast import literal_eval from get_workflow_info import get_workflow_info, get_class_cols, translate_non_alphanumerics, get_short_slug ################################################################################ # Jailbreak ...
[ "pandas.DataFrame", "numpy.zeros_like", "get_workflow_info.get_class_cols", "numpy.ones_like", "get_workflow_info.translate_non_alphanumerics", "pandas.Series", "ast.literal_eval", "datetime.datetime.now" ]
[((2197, 2216), 'pandas.Series', 'pd.Series', (['theclass'], {}), '(theclass)\n', (2206, 2216), True, 'import pandas as pd, numpy as np\n'), ((6722, 6744), 'pandas.DataFrame', 'pd.DataFrame', (['subj_ans'], {}), '(subj_ans)\n', (6734, 6744), True, 'import pandas as pd, numpy as np\n'), ((9013, 9030), 'pandas.DataFrame'...
import json from flask import Flask, render_template, request from app.index import Index app = Flask(__name__) @app.route('/', methods=['GET']) def index(): template_name = 'index.html' return render_template(template_name) @app.route('/search/', methods=['POST']) def search(): word = request.form['co...
[ "flask.Flask", "app.index.Index.check_comapny_name", "flask.render_template", "json.dumps" ]
[((97, 112), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (102, 112), False, 'from flask import Flask, render_template, request\n'), ((205, 235), 'flask.render_template', 'render_template', (['template_name'], {}), '(template_name)\n', (220, 235), False, 'from flask import Flask, render_template, request...
""" Provide tests for atomic swap handler initialization method implementation. """ import datetime import time import pytest from sawtooth_sdk.processor.exceptions import InvalidTransaction from sawtooth_sdk.protobuf.processor_pb2 import TpProcessRequest from sawtooth_sdk.protobuf.setting_pb2 import Setting from sawt...
[ "remme.protos.block_info_pb2.BlockInfoConfig", "remme.tp.atomic_swap.AtomicSwapHandler", "testing.mocks.stub.StubContext", "remme.protos.block_info_pb2.BlockInfo", "remme.shared.utils.hash512", "sawtooth_sdk.protobuf.setting_pb2.Setting", "datetime.datetime.now", "time.time", "remme.protos.atomic_sw...
[((1956, 2000), 'remme.settings.helper._make_settings_key', '_make_settings_key', (['SETTINGS_SWAP_COMMISSION'], {}), '(SETTINGS_SWAP_COMMISSION)\n', (1974, 2000), False, 'from remme.settings.helper import _make_settings_key\n'), ((2047, 2099), 'remme.settings.helper._make_settings_key', '_make_settings_key', (['SETTIN...
import logging from nmigen.compat import * from nmigen.compat.genlib.cdc import MultiReg from nmigen.compat.genlib.fifo import _FIFOInterface from ..gateware.analyzer import * __all__ = ["GlasgowAnalyzer"] class GlasgowAnalyzer(Module): logger = logging.getLogger(__name__) def __init__(self, registers, mu...
[ "logging.getLogger", "nmigen.compat.genlib.cdc.MultiReg" ]
[((255, 282), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (272, 282), False, 'import logging\n'), ((2695, 2721), 'nmigen.compat.genlib.cdc.MultiReg', 'MultiReg', (['triple.i', 'sync_i'], {}), '(triple.i, sync_i)\n', (2703, 2721), False, 'from nmigen.compat.genlib.cdc import MultiReg\n'...
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "unittest.main", "jax.numpy.dot", "objax.zoo.dnnet.DNNet", "numpy.zeros", "numpy.ones", "objax.nn.Conv2D", "objax.nn.BatchNorm2D", "jax.numpy.ones", "jax.numpy.zeros", "objax.functional.loss.cross_entropy_logits_sparse", "objax.util.find_used_variables" ]
[((758, 769), 'jax.numpy.zeros', 'jn.zeros', (['(5)'], {}), '(5)\n', (766, 769), True, 'import jax.numpy as jn\n'), ((797, 808), 'jax.numpy.zeros', 'jn.zeros', (['(1)'], {}), '(1)\n', (805, 808), True, 'import jax.numpy as jn\n'), ((5718, 5733), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5731, 5733), False, '...
import binascii import os import struct # https://github.com/Yelp/py_zipkin/blob/ # 7937ca859f8ae1f1009ab69fd1ddcd8fc33f1dad/py_zipkin/util.py#L1-L54 def generate_random_64bit_string() -> str: """Returns a 64 bit UTF-8 encoded string. In the interests of simplicity, this is always cast to a `str` instead of (...
[ "os.urandom", "struct.pack" ]
[((512, 525), 'os.urandom', 'os.urandom', (['(8)'], {}), '(8)\n', (522, 525), False, 'import os\n'), ((787, 801), 'os.urandom', 'os.urandom', (['(16)'], {}), '(16)\n', (797, 801), False, 'import os\n'), ((1668, 1696), 'struct.pack', 'struct.pack', (['"""q"""', 'signed_int'], {}), "('q', signed_int)\n", (1679, 1696), Fa...
# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot) # Copyright (c) 2021 Drakkar-Software, All rights reserved. # # OctoBot is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either ...
[ "octobot_services.api.create_service_feed_factory", "octobot_backtesting.api.is_backtesting_enabled", "octobot_services.api.stop_service_feed" ]
[((1494, 1553), 'octobot_backtesting.api.is_backtesting_enabled', 'backtesting_api.is_backtesting_enabled', (['self.octobot.config'], {}), '(self.octobot.config)\n', (1532, 1553), True, 'import octobot_backtesting.api as backtesting_api\n'), ((1585, 1696), 'octobot_services.api.create_service_feed_factory', 'service_ap...
# -*- coding: utf-8 -*- from BaseOperator import BaseOperator import yaml import os class BaseFPGAOperator(BaseOperator): def __init__(self, name, kernel_conf_file): super().__init__(name) self.kernel_interfaces = {} home = os.environ['MYSTR_HOME'] conf_file_path = home + '/conf...
[ "yaml.load", "os.path.exists" ]
[((353, 383), 'os.path.exists', 'os.path.exists', (['conf_file_path'], {}), '(conf_file_path)\n', (367, 383), False, 'import os\n'), ((478, 490), 'yaml.load', 'yaml.load', (['f'], {}), '(f)\n', (487, 490), False, 'import yaml\n')]
import os import random import shlex import string import sys from subprocess import call, Popen, PIPE class PersistentSSHConnection(object) : '''This class wraps a master ssh process and allows repeated command execution on the same ssh connection without reentering a passphrase. The master connection is...
[ "os.mkdir", "subprocess.Popen", "os.remove", "random.sample", "shlex.split", "os.path.exists", "subprocess.call", "sys.stderr.write" ]
[((1209, 1231), 'subprocess.Popen', 'Popen', (['cmd'], {'stdin': 'PIPE'}), '(cmd, stdin=PIPE)\n', (1214, 1231), False, 'from subprocess import call, Popen, PIPE\n'), ((1892, 1932), 'subprocess.Popen', 'Popen', (['ssh_cmd'], {'stdout': 'PIPE', 'stderr': 'PIPE'}), '(ssh_cmd, stdout=PIPE, stderr=PIPE)\n', (1897, 1932), Fa...
import json import sys import os from tqdm import tqdm from mdf_refinery.parsers.tab_parser import parse_tab from mdf_refinery.validator import Validator # VERSION 0.3.0 # This is the converter for: Dataset for "Canopy uptake dominates nighttime carbonyl sulfide fluxes in a boreal forest" # Arguments: # input_path ...
[ "mdf_refinery.validator.Validator", "json.load", "json.loads", "json.dumps", "os.path.join", "sys.exit" ]
[((6955, 6982), 'mdf_refinery.validator.Validator', 'Validator', (['dataset_metadata'], {}), '(dataset_metadata)\n', (6964, 6982), False, 'from mdf_refinery.validator import Validator\n'), ((7305, 7371), 'os.path.join', 'os.path.join', (['input_path', '"""Kooijmans_et_al_2017_ACPD_20170516.txt"""'], {}), "(input_path, ...
import numpy as np from ..testing_utils import DummyConverter, DummyLoad, DummyNoise, DummyOdeSolver, DummyVoltageSupply, DummyElectricMotor,\ mock_instantiate, instantiate_dict from gym_electric_motor.physical_systems import physical_systems as ps, converters as cv, electric_motors as em,\ mechanical_loads as ...
[ "numpy.zeros_like", "numpy.concatenate", "numpy.zeros", "numpy.array", "numpy.arange", "numpy.random.rand", "numpy.all" ]
[((2433, 2464), 'numpy.all', 'np.all', (['(initial_state == target)'], {}), '(initial_state == target)\n', (2439, 2464), True, 'import numpy as np\n'), ((3391, 3408), 'numpy.random.rand', 'np.random.rand', (['(4)'], {}), '(4)\n', (3405, 3408), True, 'import numpy as np\n'), ((3520, 3537), 'numpy.random.rand', 'np.rando...
# -*- coding: utf-8 -*- # Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest import sqlparse import frappe import frappe.recorder from frappe.utils import set_request from frappe.website.render import render_pag...
[ "frappe.recorder.do_not_record", "frappe.utils.set_request", "frappe.recorder.start", "frappe.recorder.record", "frappe.db.sql", "frappe.website.render.render_page", "frappe.recorder.delete", "frappe.recorder.get", "frappe.recorder.stop", "frappe.recorder.dump", "frappe.get_all" ]
[((383, 405), 'frappe.recorder.stop', 'frappe.recorder.stop', ([], {}), '()\n', (403, 405), False, 'import frappe\n'), ((408, 432), 'frappe.recorder.delete', 'frappe.recorder.delete', ([], {}), '()\n', (430, 432), False, 'import frappe\n'), ((435, 448), 'frappe.utils.set_request', 'set_request', ([], {}), '()\n', (446,...
import os.path as op import random import time from keras.callbacks import TensorBoard, ModelCheckpoint, LearningRateScheduler import tensorflow as tf from tensorflow_addons.callbacks import TQDMProgressBar from fastmri_recon.data.sequences.oasis_sequences import Masked2DSequence, KIKISequence from fastmri_recon.mode...
[ "fastmri_recon.data.sequences.oasis_sequences.Masked2DSequence", "fastmri_recon.models.functional_models.kiki_sep.kiki_sep_net", "random.sample", "keras.callbacks.ModelCheckpoint", "time.time", "keras.callbacks.TensorBoard", "random.seed", "tensorflow_addons.callbacks.TQDMProgressBar", "fastmri_reco...
[((503, 517), 'random.seed', 'random.seed', (['(0)'], {}), '(0)\n', (514, 517), False, 'import random\n'), ((645, 754), 'fastmri_recon.data.sequences.oasis_sequences.Masked2DSequence', 'Masked2DSequence', (['train_path'], {'af': 'AF', 'inner_slices': '(32)', 'rand': '(True)', 'scale_factor': '(0.01)', 'seed': '(0)', 'v...
# MIT License # # Copyright (c) 2017 Changsung # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, pu...
[ "datetime.datetime" ]
[((2144, 2164), 'datetime.datetime', 'datetime', (['year', '(5)', '(1)'], {}), '(year, 5, 1)\n', (2152, 2164), False, 'from datetime import datetime\n'), ((2198, 2218), 'datetime.datetime', 'datetime', (['year', '(8)', '(1)'], {}), '(year, 8, 1)\n', (2206, 2218), False, 'from datetime import datetime\n'), ((2252, 2273)...
# Author: <NAME> # An abstract type for resources types that are encapsulated by a d3m remote dataset import logging from ls_dataset.dataset_resource import DatasetResource from ls_dataset.dsr_table import DSRTable logger = logging.getLogger(__name__) class DatasetResourceFactory(object): """ Factory clas...
[ "ls_dataset.dataset_resource.DatasetResource", "ls_dataset.dsr_table.DSRTable", "logging.getLogger" ]
[((229, 256), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (246, 256), False, 'import logging\n'), ((915, 933), 'ls_dataset.dsr_table.DSRTable', 'DSRTable', (['metadata'], {}), '(metadata)\n', (923, 933), False, 'from ls_dataset.dsr_table import DSRTable\n'), ((967, 992), 'ls_dataset.da...
from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from model_utils.models import TimeStampedModel from semantic_version.django_fields import VersionField from ..game_catalog.utils import AbstractUUIDModel # Create your models here. class ReleaseNot...
[ "django.db.models.ForeignKey", "django.db.models.OneToOneField", "django.utils.translation.ugettext_lazy" ]
[((473, 545), 'django.db.models.OneToOneField', 'models.OneToOneField', (['settings.AUTH_USER_MODEL'], {'on_delete': 'models.CASCADE'}), '(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)\n', (493, 545), False, 'from django.db import models\n'), ((573, 659), 'django.db.models.ForeignKey', 'models.ForeignKey', (['"""...
import torch from torch import nn from torch.nn import functional as F __all__ = ["FeatureNet", "PointSectorScatter"] class Conv1x1(nn.Module): def __init__(self, in_channels=160, out_channels=32): super(Conv1x1, self).__init__() self.conv = nn.Conv1d(in_channels, out_channels, kernel_siz...
[ "torch.nn.ReLU", "torch.stack", "torch.nn.BatchNorm1d", "torch.nn.Conv1d", "torch.cat", "torch.nn.Linear", "torch.max", "torch.nn.functional.relu", "torch.zeros" ]
[((273, 324), 'torch.nn.Conv1d', 'nn.Conv1d', (['in_channels', 'out_channels'], {'kernel_size': '(1)'}), '(in_channels, out_channels, kernel_size=1)\n', (282, 324), False, 'from torch import nn\n'), ((344, 372), 'torch.nn.BatchNorm1d', 'nn.BatchNorm1d', (['out_channels'], {}), '(out_channels)\n', (358, 372), False, 'fr...
# vim: sw=4:ts=4:et:cc=120 import base64 import datetime import functools import io import json import logging import os, os.path import re import shutil import sqlite3 import tempfile import threading import zipfile import requests from urllib.parse import urlparse import saq from saq.constants import * from saq.c...
[ "os.mkdir", "os.remove", "shutil.rmtree", "os.path.join", "logging.error", "logging.warning", "saq.util.local_time", "os.path.exists", "datetime.timedelta", "datetime.datetime.now", "threading.Thread", "json.dump", "datetime.datetime.strptime", "sqlite3.connect", "saq.error.report_except...
[((1522, 1581), 'os.path.join', 'os.path.join', (['self.persistence_dir', '"""fireeye_alert_uuid.db"""'], {}), "(self.persistence_dir, 'fireeye_alert_uuid.db')\n", (1534, 1581), False, 'import os, os.path\n'), ((2938, 2997), 'os.path.join', 'os.path.join', (['self.persistence_dir', '"""fireeye_last_api_call"""'], {}), ...
from cfgm_common.exceptions import NoIdError from schema_transformer.resources._resource_base import ResourceBaseST class VirtualPortGroupST(ResourceBaseST): _dict = {} obj_type = 'virtual_port_group' ref_fields = ['virtual_machine_interface'] prop_fields = ['annotations'] @classmethod def r...
[ "schema_transformer.resources._resource_base.ResourceBaseST.get_obj_type_map" ]
[((1219, 1252), 'schema_transformer.resources._resource_base.ResourceBaseST.get_obj_type_map', 'ResourceBaseST.get_obj_type_map', ([], {}), '()\n', (1250, 1252), False, 'from schema_transformer.resources._resource_base import ResourceBaseST\n'), ((2007, 2040), 'schema_transformer.resources._resource_base.ResourceBaseST...
import inspect from collections import namedtuple ValueFinder = namedtuple("ValueFinder", ["locator", "key", "value"]) def get_attribute_paths_containing_string(target_object, target_str, search_exact_word=False): """ :param target_object: object to inspect during runtime :param target_str: :type str: st...
[ "inspect.currentframe", "traceback.print_last", "collections.namedtuple", "inspect.getmembers" ]
[((65, 119), 'collections.namedtuple', 'namedtuple', (['"""ValueFinder"""', "['locator', 'key', 'value']"], {}), "('ValueFinder', ['locator', 'key', 'value'])\n", (75, 119), False, 'from collections import namedtuple\n'), ((691, 724), 'inspect.getmembers', 'inspect.getmembers', (['target_object'], {}), '(target_object)...
""" """ from dataclasses import dataclass, field import itertools from OpenGL.GL.shaders import compileProgram, compileShader from OpenGL.raw.GL.VERSION.GL_1_0 import glColor3f, glPointSize from OpenGL.raw.GL.VERSION.GL_1_1 import GL_POINTS, GL_LINES from OpenGL.raw.GL.VERSION.GL_2_0 import ( GL_VERTEX_SHADER, GL_F...
[ "pymunk.PivotJoint", "OpenGL.raw.GL.VERSION.GL_1_0.glPointSize", "warp_grid.flag.Flag3D", "pymunk.DampedSpring", "OpenGL.raw.GL.VERSION.GL_1_0.glColor3f", "pymunk.Vec2d", "dataclasses.field", "pathlib.Path", "pymunk.Circle", "OpenGL.raw.GL.VERSION.GL_2_0.glUseProgram", "OpenGL.GL.shaders.compile...
[((593, 620), 'dataclasses.field', 'field', ([], {'default_factory': 'list'}), '(default_factory=list)\n', (598, 620), False, 'from dataclasses import dataclass, field\n'), ((643, 670), 'dataclasses.field', 'field', ([], {'default_factory': 'list'}), '(default_factory=list)\n', (648, 670), False, 'from dataclasses impo...
# # Copyright (c) 2015 Autodesk Inc. # All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
[ "uuid.uuid4", "ochopod.core.fsm.shutdown", "kazoo.client.KazooClient", "ochopod.core.fsm.Aborted", "json.dumps", "time.time", "pykka.ThreadingFuture", "threading.Event", "logging.getLogger" ]
[((1044, 1072), 'logging.getLogger', 'logging.getLogger', (['"""ochopod"""'], {}), "('ochopod')\n", (1061, 1072), False, 'import logging\n'), ((2208, 2220), 'uuid.uuid4', 'uuid.uuid4', ([], {}), '()\n', (2218, 2220), False, 'import uuid\n'), ((3430, 3504), 'kazoo.client.KazooClient', 'KazooClient', ([], {'hosts': 'cnx_...
#coding=utf-8 ''' Created on 2016年9月27日 @author: dengdan ''' import numpy as np import time import random rng = np.random.RandomState(int(time.time())) rand = np.random.rand """ Create an array of the given shape and populate it with random samples from a uniform distribution over [0, 1) """ def normal(shape, mu =...
[ "random.sample", "random.shuffle", "time.time", "numpy.array", "numpy.sqrt" ]
[((433, 462), 'numpy.array', 'np.array', (['tensor'], {'dtype': 'dtype'}), '(tensor, dtype=dtype)\n', (441, 462), True, 'import numpy as np\n'), ((799, 818), 'random.shuffle', 'random.shuffle', (['lst'], {}), '(lst)\n', (813, 818), False, 'import random\n'), ((851, 872), 'random.sample', 'random.sample', (['lst', 'n'],...
# Import the libraries we need for this lab import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from torch.utils.data import Dataset, DataLoader # Plot the data def plot_decision_regions_2class(model,data...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "torch.nn.BCELoss", "matplotlib.pyplot.plot", "torch.utils.data.DataLoader", "matplotlib.pyplot.legend", "torch.randn", "matplotlib.pyplot.subplots", "torch.Tensor", "numpy.arange", "matplotlib.pyplot.pcolormesh", "torch.nn.Linear", "torch...
[((4111, 4123), 'torch.nn.BCELoss', 'nn.BCELoss', ([], {}), '()\n', (4121, 4123), True, 'import torch.nn as nn\n'), ((4206, 4248), 'torch.utils.data.DataLoader', 'DataLoader', ([], {'dataset': 'data_set', 'batch_size': '(1)'}), '(dataset=data_set, batch_size=1)\n', (4216, 4248), False, 'from torch.utils.data import Dat...
import pandas as pd from collections import namedtuple from xbbg.core import timezone from xbbg.io import files, logs, param Futures = dict( Jan='F', Feb='G', Mar='H', Apr='J', May='K', Jun='M', Jul='N', Aug='Q', Sep='U', Oct='V', Nov='X', Dec='Z', ) CurrencyPair = namedtuple('CurrencyPair', ['ticker', 'facto...
[ "pandas.DataFrame", "xbbg.io.files.modified_time", "xbbg.io.files.abspath", "xbbg.io.logs.get_logger", "xbbg.io.files.create_folder", "xbbg.io.param.config_files", "xbbg.io.param.load_yaml", "xbbg.io.param.load_config", "xbbg.io.files.exists", "collections.namedtuple", "pandas.Series", "pandas...
[((276, 333), 'collections.namedtuple', 'namedtuple', (['"""CurrencyPair"""', "['ticker', 'factor', 'power']"], {}), "('CurrencyPair', ['ticker', 'factor', 'power'])\n", (286, 333), False, 'from collections import namedtuple\n'), ((416, 442), 'xbbg.io.files.abspath', 'files.abspath', (['__file__', '(0)'], {}), '(__file...
import miner_globals import m.common as common import base def p_source_statement(p): '''statement : SOURCE FILENAME''' p.lexer.begin("INITIAL") p[0] = SourceStatement(p[2]) def p_once_statement(p): '''statement : ONCE relative_import_name''' p.lexer.begin("INITIAL") p[0] = OnceStatement(p[2])...
[ "miner_globals.addKeyWord", "base.StatementBase.__init__", "miner_globals.addHelpClass", "miner_globals.callScript", "miner_globals.evalExpression" ]
[((3266, 3309), 'miner_globals.addHelpClass', 'miner_globals.addHelpClass', (['SourceStatement'], {}), '(SourceStatement)\n', (3292, 3309), False, 'import miner_globals\n'), ((3310, 3379), 'miner_globals.addKeyWord', 'miner_globals.addKeyWord', ([], {'statement': '"""SOURCE"""', 'switchesToFileMode': '(True)'}), "(stat...
from financial_canvas.figures.CustomFigure import CustomFigure from bokeh.models import RangeTool class PreviewSlider(CustomFigure): ''' Creates preview slider at the bottom of the main figure. The first df should always contain close column. Args: target_figure (figures.CustomFigure): (opti...
[ "bokeh.models.RangeTool" ]
[((936, 978), 'bokeh.models.RangeTool', 'RangeTool', ([], {'x_range': 'target_figure.p.x_range'}), '(x_range=target_figure.p.x_range)\n', (945, 978), False, 'from bokeh.models import RangeTool\n')]
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # Copyright 2020 The Matrix.org Foundation C.I.C. # # 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/l...
[ "synapse.http.servlet.parse_json_object_from_request", "synapse.api.errors.NotFoundError", "synapse.http.servlet.assert_params_in_dict", "synapse.api.errors.SynapseError", "logging.getLogger" ]
[((940, 967), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (957, 967), False, 'import logging\n'), ((2590, 2630), 'synapse.http.servlet.assert_params_in_dict', 'assert_params_in_dict', (['body', "['devices']"], {}), "(body, ['devices'])\n", (2611, 2630), False, 'from synapse.http.servle...
""" Convert an EO3 metadata doc to a Stac Item. (BETA/Incomplete) """ import math import mimetypes from pathlib import Path from typing import Dict, List, Optional, Callable from urllib.parse import urljoin import jsonschema import rapidjson from datacube.utils.geometry import Geometry, CRS from requests_cache.core im...
[ "jsonschema.validate", "datacube.utils.geometry.CRS", "urllib.parse.urljoin", "requests_cache.core.CachedSession", "mimetypes.guess_type", "pathlib.Path", "rapidjson.dumps" ]
[((1614, 1645), 'mimetypes.guess_type', 'mimetypes.guess_type', (['path.name'], {}), '(path.name)\n', (1634, 1645), False, 'import mimetypes\n'), ((4918, 4934), 'datacube.utils.geometry.CRS', 'CRS', (['dataset.crs'], {}), '(dataset.crs)\n', (4921, 4934), False, 'from datacube.utils.geometry import Geometry, CRS\n'), ((...