code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
# # (C) Copyright 2020 <NAME> # # SPDX-License-Identifier: MIT # from OpenSSL import crypto import base64 import os import struct Import("env", "projenv") def sign_binary(source, target, env): # If not set we let it crash try: pkey = os.environ["FIRMWARE_SIGNING_PKEY"] except: print("No s...
[ "os.path.exists", "OpenSSL.crypto.load_privatekey", "OpenSSL.crypto.sign" ]
[((372, 392), 'os.path.exists', 'os.path.exists', (['pkey'], {}), '(pkey)\n', (386, 392), False, 'import os\n'), ((819, 850), 'OpenSSL.crypto.sign', 'crypto.sign', (['pk', 'data', '"""sha256"""'], {}), "(pk, data, 'sha256')\n", (830, 850), False, 'from OpenSSL import crypto\n'), ((585, 634), 'OpenSSL.crypto.load_privat...
from operator import itemgetter from pprint import pprint def print_header(name, account_no, balance): print("name:", name, " account:", account_no, " original balance:", "$" + str(balance)) def read_charges(charges_file): charges = list() charges_dict = dict() for charge_stri...
[ "operator.itemgetter" ]
[((2900, 2918), 'operator.itemgetter', 'itemgetter', (['"""date"""'], {}), "('date')\n", (2910, 2918), False, 'from operator import itemgetter\n')]
from django.shortcuts import render from anuncios.models import Anuncio # Create your views here. def anuncios(request): anuncios = Anuncio.objects.filter(status='publicado') return render(request,'anuncios/index.html',{'anuncios':anuncios}) def home(request): return render(request,"web/index.html")
[ "django.shortcuts.render", "anuncios.models.Anuncio.objects.filter" ]
[((136, 178), 'anuncios.models.Anuncio.objects.filter', 'Anuncio.objects.filter', ([], {'status': '"""publicado"""'}), "(status='publicado')\n", (158, 178), False, 'from anuncios.models import Anuncio\n'), ((190, 252), 'django.shortcuts.render', 'render', (['request', '"""anuncios/index.html"""', "{'anuncios': anuncios...
from __future__ import annotations import qimpy as qp import numpy as np import torch from ._davidson import Davidson from typing import Optional class CheFSI(Davidson): """Chebyshev Filter Subspace Iteration (CheFSI) diagonalization.""" __slots__ = ("filter_order", "init_threshold") filter_order: int #...
[ "qimpy.utils.CpPath", "torch.abs", "qimpy.utils.globalreduce.max" ]
[((544, 561), 'qimpy.utils.CpPath', 'qp.utils.CpPath', ([], {}), '()\n', (559, 561), True, 'import qimpy as qp\n'), ((3906, 3965), 'qimpy.utils.globalreduce.max', 'qp.utils.globalreduce.max', (['(~el.n_tilde.grad).data', 'el.comm'], {}), '((~el.n_tilde.grad).data, el.comm)\n', (3931, 3965), True, 'import qimpy as qp\n'...
# Copyright 2013 NEC Corporation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
[ "tempest.test.idempotent_id", "tempest.common.waiters.wait_for_server_status" ]
[((1208, 1266), 'tempest.test.idempotent_id', 'test.idempotent_id', (['"""77ca5cc5-9990-45e0-ab98-1de8fead201a"""'], {}), "('77ca5cc5-9990-45e0-ab98-1de8fead201a')\n", (1226, 1266), False, 'from tempest import test\n'), ((1807, 1865), 'tempest.test.idempotent_id', 'test.idempotent_id', (['"""aacc71ca-1d70-4aa5-bbf6-0ff...
from constance import config from django.conf import settings from portal.selection.models import Selection from portal.users.models import User def user_has_payment(user: User) -> bool: try: return user.selection.payment_value is not None except Selection.DoesNotExist: return False def adm...
[ "constance.config.ADMISSIONS_CODING_TEST_DURATION.total_seconds" ]
[((856, 910), 'constance.config.ADMISSIONS_CODING_TEST_DURATION.total_seconds', 'config.ADMISSIONS_CODING_TEST_DURATION.total_seconds', ([], {}), '()\n', (908, 910), False, 'from constance import config\n')]
#!/usr/bin/env python # coding=utf-8 # Filename: jpp.py # pylint: disable= """ Pump for the jpp file read through aanet interface. """ from __future__ import division, absolute_import, print_function import numpy as np from km3pipe import Pump, Blob from km3pipe.dataclasses import (EventInfo, TimesliceFrameInfo, ...
[ "km3pipe.dataclasses.TimesliceFrameInfo", "km3pipe.dataclasses.TimesliceHitSeries.from_arrays", "jppy.PyJDAQSummarysliceReader", "km3pipe.dataclasses.SummaryframeInfo", "numpy.zeros", "jppy.PyJDAQEventReader", "km3pipe.logger.logging.getLogger", "jppy.PyJDAQTimesliceReader", "km3pipe.dataclasses.Eve...
[((474, 501), 'km3pipe.logger.logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (491, 501), False, 'from km3pipe.logger import logging\n'), ((1522, 1559), 'jppy.PyJDAQEventReader', 'jppy.PyJDAQEventReader', (['self.filename'], {}), '(self.filename)\n', (1544, 1559), False, 'import jppy\n'), (...
# ---------------------------------------------------------------------------- # Gimel Studio Copyright 2019-2021 by <NAME> and contributors # # 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 # ...
[ "gimelstudio.api.XYZProp", "gimelstudio.api.RegisterNode", "gimelstudio.api.RenderImage", "OpenImageIO.ImageBufAlgo.circular_shift", "gimelstudio.api.Node.__init__", "gimelstudio.api.RenderImageParam" ]
[((2398, 2459), 'gimelstudio.api.RegisterNode', 'api.RegisterNode', (['CircularShiftNode', '"""corenode_circularshift"""'], {}), "(CircularShiftNode, 'corenode_circularshift')\n", (2414, 2459), False, 'from gimelstudio import api\n'), ((1073, 1112), 'gimelstudio.api.Node.__init__', 'api.Node.__init__', (['self', 'nodeg...
from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.urls import reverse # models, views, url should check always!! User = settings.AUTH_USER_MODEL # <-----------------------------------------------> class Post(models.Mo...
[ "django.db.models.TextField", "django.db.models.ForeignKey", "django.urls.reverse", "django.db.models.DateTimeField", "django.db.models.CharField" ]
[((335, 367), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(100)'}), '(max_length=100)\n', (351, 367), False, 'from django.db import models\n'), ((379, 411), 'django.db.models.TextField', 'models.TextField', ([], {'max_length': '(255)'}), '(max_length=255)\n', (395, 411), False, 'from django.d...
# Decimal to binary using Stack import Stack def dtob(decimal, base = 2): myStack = Stack.Stack() while decimal > 0: myStack.push(decimal % base) decimal //= base result = '' while not myStack.isEmpty(): result += str(myStack.pop()) return result if __name__ == '__main...
[ "Stack.Stack" ]
[((92, 105), 'Stack.Stack', 'Stack.Stack', ([], {}), '()\n', (103, 105), False, 'import Stack\n')]
""" The default styling. """ from prompt_toolkit.cache import memoized from .base import ANSI_COLOR_NAMES from .named_colors import NAMED_COLORS from .style import BaseStyle, Style, merge_styles __all__ = [ 'default_ui_style', 'default_pygments_style', ] #: Default styling. Mapping from classnames to their s...
[ "prompt_toolkit.cache.memoized" ]
[((10550, 10560), 'prompt_toolkit.cache.memoized', 'memoized', ([], {}), '()\n', (10558, 10560), False, 'from prompt_toolkit.cache import memoized\n'), ((10783, 10793), 'prompt_toolkit.cache.memoized', 'memoized', ([], {}), '()\n', (10791, 10793), False, 'from prompt_toolkit.cache import memoized\n')]
# -*- coding: utf-8 -*- # # Copyright (C) 2021 CERN. # # Invenio-Vocabularies is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Vocabulary names configuration.""" from flask import current_app from flask_babelex import lazy_gettext...
[ "flask_babelex.lazy_gettext", "invenio_records_resources.services.records.params.SuggestQueryParser.factory", "werkzeug.local.LocalProxy" ]
[((678, 747), 'werkzeug.local.LocalProxy', 'LocalProxy', (["(lambda : current_app.config['VOCABULARIES_NAMES_SCHEMES'])"], {}), "(lambda : current_app.config['VOCABULARIES_NAMES_SCHEMES'])\n", (688, 747), False, 'from werkzeug.local import LocalProxy\n'), ((848, 989), 'invenio_records_resources.services.records.params....
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # 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 Apach...
[ "heron.tools.cli.src.python.cliconfig.cluster_config", "heron.tools.cli.src.python.cliconfig.unset_property", "heron.tools.cli.src.python.cliconfig.is_valid_property", "heron.tools.cli.src.python.cliconfig.set_property", "heron.tools.cli.src.python.result.SimpleResult" ]
[((2516, 2549), 'heron.tools.cli.src.python.cliconfig.cluster_config', 'cliconfig.cluster_config', (['cluster'], {}), '(cluster)\n', (2540, 2549), True, 'import heron.tools.cli.src.python.cliconfig as cliconfig\n'), ((2709, 2732), 'heron.tools.cli.src.python.result.SimpleResult', 'SimpleResult', (['Status.Ok'], {}), '(...
import numpy as np import matplotlib.pyplot as plt from matplotlib.widgets import Slider, Button import math from scipy.optimize import fsolve def equations(vars, *args): x, y = vars eq1 = (args[0]-x)**2+(args[1]-y)**2-l4**2 eq2 = (args[2]-x)**2+(args[3]-y)**2-l5**2 return [eq1, eq2] #Define Link Lengths l1 ...
[ "scipy.optimize.fsolve", "math.acos", "matplotlib.pyplot.plot", "math.sqrt", "math.cos", "matplotlib.widgets.Button", "matplotlib.pyplot.axes", "matplotlib.widgets.Slider", "math.sin", "matplotlib.pyplot.subplots", "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.show" ]
[((940, 966), 'math.cos', 'math.cos', (['((E_x - C_x) / l4)'], {}), '((E_x - C_x) / l4)\n', (948, 966), False, 'import math\n'), ((1548, 1562), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (1560, 1562), True, 'import matplotlib.pyplot as plt\n'), ((1573, 1620), 'matplotlib.pyplot.plot', 'plt.plot', (...
# -*- coding: utf-8 -*- ################################################################################### # Copyright (C) 2019 SuXueFeng GNU ################################################################################### import logging import requests from odoo.http import Controller, route, json, request from...
[ "logging.getLogger", "odoo.http.request.params.copy", "requests.get", "odoo.http.route", "odoo.http.json.dumps", "logging.info", "odoo.http.json.loads" ]
[((349, 376), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (366, 376), False, 'import logging\n'), ((441, 535), 'odoo.http.route', 'route', (['"""/api/wx/openid/get"""'], {'type': '"""http"""', 'auth': '"""none"""', 'methods': "['get', 'post']", 'csrf': '(False)'}), "('/api/wx/openid/ge...
# -*- coding: utf-8 -*- import scrapy from bs4 import BeautifulSoup import logging class TelefonbuchSpider(scrapy.Spider): name = 'telefonbuch' allowed_domains = ['bundes-telefonbuch.de'] start_urls = ['http://bundes-telefonbuch.de/'] # Handle the Command line arguments def __init__(self, sector=...
[ "bs4.BeautifulSoup", "scrapy.http.Request", "scrapy.FormRequest.from_response" ]
[((676, 825), 'scrapy.FormRequest.from_response', 'scrapy.FormRequest.from_response', (['response'], {'formid': '"""searchForm"""', 'formdata': "{'what': self.sector, 'where': self.city}", 'callback': 'self.parse_results'}), "(response, formid='searchForm', formdata={\n 'what': self.sector, 'where': self.city}, call...
"""Couple of MPyC oneliners. Run with m parties to compute: - m = sum_{i=0}^{m-1} 1 = sum(1 for i in range(m)) - m**2 = sum_{i=0}^{m-1} 2i+1 = sum(2*i+1 for i in range(m)) - 2**m = prod_{i=0}^{m-1} 2 = prod(2 for i in range(m)) - m! = prod_{i=0}^{m-1} i+1 = prod(i+1 for i in range(m)) B...
[ "mpyc.runtime.mpc.shutdown", "mpyc.runtime.mpc.SecInt", "mpyc.runtime.mpc.start" ]
[((439, 450), 'mpyc.runtime.mpc.start', 'mpc.start', ([], {}), '()\n', (448, 450), False, 'from mpyc.runtime import mpc\n'), ((786, 800), 'mpyc.runtime.mpc.shutdown', 'mpc.shutdown', ([], {}), '()\n', (798, 800), False, 'from mpyc.runtime import mpc\n'), ((505, 518), 'mpyc.runtime.mpc.SecInt', 'mpc.SecInt', (['(9)'], {...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import abc import copy import datetime import math import pickle import random import signal import sys import time def round_figures(x, n): """Returns x rounded to ...
[ "pickle.dump", "sys.stderr.flush", "pickle.load", "math.log", "datetime.datetime.now", "random.random", "copy.deepcopy", "math.exp", "time.time" ]
[((6180, 6191), 'time.time', 'time.time', ([], {}), '()\n', (6189, 6191), False, 'import time\n'), ((9601, 9612), 'time.time', 'time.time', ([], {}), '()\n', (9610, 9612), False, 'import time\n'), ((1886, 1913), 'pickle.dump', 'pickle.dump', (['self.state', 'fh'], {}), '(self.state, fh)\n', (1897, 1913), False, 'import...
import numpy as np import statistics import matplotlib.pyplot as plt import seaborn as sns np_normal_dis = np.random.normal(5, 0.5, 100) print(np_normal_dis.min()) print(np_normal_dis.max()) print(np_normal_dis.mean()) # print(np_normal_dis.median()) # not working print(np_normal_dis.std()) two_dimension_array = np....
[ "matplotlib.pyplot.hist", "numpy.random.rand", "numpy.array", "numpy.mean", "numpy.repeat", "numpy.random.random", "numpy.max", "numpy.min", "numpy.random.normal", "numpy.tile", "numpy.amin", "numpy.random.choice", "numpy.std", "numpy.random.randn", "matplotlib.pyplot.show", "numpy.med...
[((109, 138), 'numpy.random.normal', 'np.random.normal', (['(5)', '(0.5)', '(100)'], {}), '(5, 0.5, 100)\n', (125, 138), True, 'import numpy as np\n'), ((317, 349), 'numpy.array', 'np.array', (['[(1, 2, 3), [4, 5, 6]]'], {}), '([(1, 2, 3), [4, 5, 6]])\n', (325, 349), True, 'import numpy as np\n'), ((767, 796), 'numpy.r...
from datetime import datetime from airflow import DAG from airflow.contrib.operators.kubernetes_pod_operator import ( KubernetesPodOperator ) IMAGE = "593291632749.dkr.ecr.eu-west-1.amazonaws.com/airflow-s3-metrics:v0.0.4" ROLE = "airflow_s3_metrics" AWS_S3_BUCKET = "alpha-s3-metrics" AIRFLOW_JOB_NAME = "s3_met...
[ "datetime.datetime", "airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator" ]
[((720, 979), 'airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator', 'KubernetesPodOperator', ([], {'dag': 'dag', 'namespace': '"""airflow"""', 'image': 'IMAGE', 'env_vars': "{'AWS_S3_BUCKET': AWS_S3_BUCKET}", 'labels': "{'app': dag.dag_id}", 'name': 'task_id', 'in_cluster': '(True)', 'task_id': 'ta...
import os import json from datetime import datetime from commons.external_call import APIInterface from sql import config from sql.utils.s3_helper import write_annotations_to_s3 from sql.utils.gcs_helper import upload_blob_string class ProjectController: def __init__(self): self.label_studio_config = conf...
[ "commons.external_call.APIInterface.get", "commons.external_call.APIInterface.delete", "json.dumps", "os.environ.get", "sql.config.get", "datetime.datetime.now", "sql.utils.s3_helper.write_annotations_to_s3", "commons.external_call.APIInterface.post" ]
[((854, 951), 'commons.external_call.APIInterface.post', 'APIInterface.post', ([], {'route': 'create_project_url', 'data': 'create_project_request', 'headers': 'self.header'}), '(route=create_project_url, data=create_project_request,\n headers=self.header)\n', (871, 951), False, 'from commons.external_call import AP...
"""Main script to train and evaluate model Launches training and evaluation according to parameters contained in file parameters.json of given directory experiment_dir. Parameters contained in parent directories are loaded recursively. Parameters are overidden by command line arguments. Final parameters are written t...
[ "os.path.exists", "ml.loading.load_experiment", "os.path.join", "argparse.ArgumentParser" ]
[((435, 521), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Train according to parameters in DIRECTORY"""'}), "(description=\n 'Train according to parameters in DIRECTORY')\n", (458, 521), False, 'import argparse\n'), ((3136, 3182), 'os.path.join', 'os.path.join', (['args.experiment_...
from django.urls import path from .views import ( EventViewSet ) from rest_framework.urlpatterns import format_suffix_patterns app_label = 'events' urlpatterns = [ path('', EventViewSet.as_view({'get': 'list', 'post': 'create'})), path('<int:pk>/', EventViewSet.as_view({ 'get': 'retrieve', 'put':...
[ "rest_framework.urlpatterns.format_suffix_patterns" ]
[((399, 434), 'rest_framework.urlpatterns.format_suffix_patterns', 'format_suffix_patterns', (['urlpatterns'], {}), '(urlpatterns)\n', (421, 434), False, 'from rest_framework.urlpatterns import format_suffix_patterns\n')]
#!/usr/bin/env python3 from my.config import codeforces as config from datetime import datetime from typing import NamedTuple from pathlib import Path import json from typing import Dict, Iterator, Any from ..common import cproperty, get_files from ..error import Res, unwrap from kython import fget from kython.konsu...
[ "kython.kdatetime.as_utc", "kython.fget", "kython.konsume.ignore" ]
[((1658, 1704), 'kython.konsume.ignore', 'ignore', (['json', '"""rank"""', '"""oldRating"""', '"""newRating"""'], {}), "(json, 'rank', 'oldRating', 'newRating')\n", (1664, 1704), False, 'from kython.konsume import zoom, ignore, wrap\n'), ((2037, 2083), 'kython.konsume.ignore', 'ignore', (['c', '"""handle"""', '"""ratin...
# Copyright 2017 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
[ "mycroft.messagebus.message.Message.deserialize", "pyee.EventEmitter", "mycroft.util.create_echo_function", "json.dumps", "mycroft.util.log.LOG.info", "websocket.WebSocketApp", "time.sleep", "multiprocessing.pool.ThreadPool", "threading.Event", "monotonic.monotonic", "mycroft.util.log.LOG.warnin...
[((1363, 1401), 'mycroft.util.validate_param', 'validate_param', (['host', '"""websocket.host"""'], {}), "(host, 'websocket.host')\n", (1377, 1401), False, 'from mycroft.util import validate_param, create_echo_function\n'), ((1410, 1448), 'mycroft.util.validate_param', 'validate_param', (['port', '"""websocket.port"""'...
from passlib.context import CryptContext import secrets pwd_context = CryptContext(schemes=["argon2"], deprecated="auto") def get_random_string(): return secrets.token_urlsafe(5)
[ "passlib.context.CryptContext", "secrets.token_urlsafe" ]
[((71, 122), 'passlib.context.CryptContext', 'CryptContext', ([], {'schemes': "['argon2']", 'deprecated': '"""auto"""'}), "(schemes=['argon2'], deprecated='auto')\n", (83, 122), False, 'from passlib.context import CryptContext\n'), ((161, 185), 'secrets.token_urlsafe', 'secrets.token_urlsafe', (['(5)'], {}), '(5)\n', (...
"""Test histomicsui endpoints""" import json import pytest from girder.exceptions import ValidationException from girder.models.collection import Collection from girder.models.folder import Folder from girder.models.group import Group from girder.models.item import Item from girder.models.setting import Setting from ...
[ "girder.models.group.Group", "json.loads", "json.dumps", "girder.utility.config.getConfig", "girder.models.setting.Setting", "girder.models.user.User", "girder.models.folder.Folder", "pytest.raises", "girder.models.item.Item", "girder.models.collection.Collection", "pytest.mark.plugin" ]
[((596, 629), 'pytest.mark.plugin', 'pytest.mark.plugin', (['"""histomicsui"""'], {}), "('histomicsui')\n", (614, 629), False, 'import pytest\n'), ((9597, 9630), 'pytest.mark.plugin', 'pytest.mark.plugin', (['"""histomicsui"""'], {}), "('histomicsui')\n", (9615, 9630), False, 'import pytest\n'), ((528, 546), 'girder.ut...
from django.contrib import admin from api.logger import logger from api.models import User import registrations.models as models from reversion_compare.admin import CompareVersionAdmin class PendingAdmin(CompareVersionAdmin): search_fields = ('user__username', 'user__email', 'admin_contact_1', 'admin_contact_2') ...
[ "django.contrib.admin.site.register", "api.models.User.objects.filter", "api.logger.logger.info" ]
[((1825, 1874), 'django.contrib.admin.site.register', 'admin.site.register', (['models.Pending', 'PendingAdmin'], {}), '(models.Pending, PendingAdmin)\n', (1844, 1874), False, 'from django.contrib import admin\n'), ((1875, 1940), 'django.contrib.admin.site.register', 'admin.site.register', (['models.DomainWhitelist', '...
"""This module contains general utility code that is used throughout the library. For users of this library, the C{L{log}} function is probably the most interesting. """ __all__ = ['log', 'appendArgs', 'toBase64', 'fromBase64', 'autoSubmitHTML', 'toUnicode'] import binascii import logging from urllib import urlencod...
[ "logging.getLogger", "binascii.b2a_base64", "logging.exception", "urllib.urlencode", "binascii.a2b_base64", "logging.error" ]
[((333, 360), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (350, 360), False, 'import logging\n'), ((3002, 3109), 'logging.error', 'logging.error', (['"""This is a legacy log message, please use the logging module. Message: %s"""', 'message'], {}), "(\n 'This is a legacy log message,...
# Copyright 2020 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "LICENSE.txt" file accom...
[ "datetime.datetime", "types.SimpleNamespace", "botocore.config.Config", "slurm_plugin.resume.SlurmResumeConfig", "unittest.mock.call", "tests.common.MockedBoto3Request", "os.path.dirname", "slurm_plugin.resume._resume", "pytest.fixture" ]
[((915, 931), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (929, 931), False, 'import pytest\n'), ((2789, 2834), 'slurm_plugin.resume.SlurmResumeConfig', 'SlurmResumeConfig', (['(test_datadir / config_file)'], {}), '(test_datadir / config_file)\n', (2806, 2834), False, 'from slurm_plugin.resume import SlurmRes...
# init.py file # file gathers all of the templates and forms to create the flask application # the function of this file is called in the exported flask app file: run.py # import os from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt from flask_login import LoginManager from...
[ "flask_mail.Mail", "flask_login.LoginManager", "flask.Flask", "flask_bcrypt.Bcrypt", "flask_sqlalchemy.SQLAlchemy" ]
[((383, 395), 'flask_sqlalchemy.SQLAlchemy', 'SQLAlchemy', ([], {}), '()\n', (393, 395), False, 'from flask_sqlalchemy import SQLAlchemy\n'), ((422, 430), 'flask_bcrypt.Bcrypt', 'Bcrypt', ([], {}), '()\n', (428, 430), False, 'from flask_bcrypt import Bcrypt\n'), ((468, 482), 'flask_login.LoginManager', 'LoginManager', ...
"""An implementation of the SMV image reader for JHSim images.""" from __future__ import absolute_import, division, print_function import calendar import sys import time from iotbx.detectors import SMVImage from dxtbx.format.FormatSMV import FormatSMV class FormatSMVJHSim(FormatSMV): """A class for reading SM...
[ "time.strptime", "iotbx.detectors.SMVImage", "dxtbx.format.FormatSMV.FormatSMV.get_smv_header" ]
[((965, 1001), 'dxtbx.format.FormatSMV.FormatSMV.get_smv_header', 'FormatSMV.get_smv_header', (['image_file'], {}), '(image_file)\n', (989, 1001), False, 'from dxtbx.format.FormatSMV import FormatSMV\n'), ((1253, 1279), 'iotbx.detectors.SMVImage', 'SMVImage', (['self._image_file'], {}), '(self._image_file)\n', (1261, 1...
import numpy as np from scipy import interpolate from progressbar import ProgressBar, Bar, Percentage class ImpulseResponseFunction(object): '''Internal bemio object to contain impulse response function (IRF) data ''' pass class WaveElevationTimeSeries(object): '''Internal bemio object to contain wave...
[ "numpy.array", "numpy.convolve", "scipy.interpolate.interp1d" ]
[((1897, 2009), 'scipy.interpolate.interp1d', 'interpolate.interp1d', ([], {'x': 'self.wave_elevation.t', 'y': 'self.wave_elevation.eta', 'bounds_error': '(False)', 'fill_value': '(0.0)'}), '(x=self.wave_elevation.t, y=self.wave_elevation.eta,\n bounds_error=False, fill_value=0.0)\n', (1917, 2009), False, 'from scip...
# 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, software # d...
[ "inspect.getmembers", "inspect.ismethod", "collections.defaultdict", "neutron.callbacks.manager.CallbacksManager", "inspect.isfunction" ]
[((871, 900), 'collections.defaultdict', 'collections.defaultdict', (['list'], {}), '(list)\n', (894, 900), False, 'import collections\n'), ((1020, 1046), 'neutron.callbacks.manager.CallbacksManager', 'manager.CallbacksManager', ([], {}), '()\n', (1044, 1046), False, 'from neutron.callbacks import manager\n'), ((3410, ...
from math import floor from ..engine.types import vec2d from ..engine.engine import Engine from .game_objects import GameObject, Damageable, ObjPlayer class Enemy(GameObject, Damageable): def __init__( self, engine: Engine, key: int, name: str, data: dict, pos: ve...
[ "math.floor" ]
[((2477, 2494), 'math.floor', 'floor', (['self.pos.x'], {}), '(self.pos.x)\n', (2482, 2494), False, 'from math import floor\n'), ((2701, 2718), 'math.floor', 'floor', (['self.pos.x'], {}), '(self.pos.x)\n', (2706, 2718), False, 'from math import floor\n')]
import requests import time from random import random class FAHClientAPI: _proto = 'http' _host = None _port = None _sid = None def __init__(self, host: str, port: int = 80, https=False): if not host: raise Exception('You must provide a Host/IP to connect to.') self._h...
[ "random.random", "time.time", "requests.get" ]
[((1051, 1068), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (1063, 1068), False, 'import requests\n'), ((1502, 1519), 'requests.get', 'requests.get', (['url'], {}), '(url)\n', (1514, 1519), False, 'import requests\n'), ((629, 637), 'random.random', 'random', ([], {}), '()\n', (635, 637), False, 'from rand...
""" A bot that collects all bullet points of a thread. Written by /u/SmBe19 """ import praw import re import sys import time # ### USER CONFIGURATION ### # # The bot's useragent. It should contain a short description of what it does and your username. e.g. "RSS Bot by /u/SmBe19" USERAGENT = "" # The time in seconds...
[ "praw.helpers.flatten_tree", "praw.Reddit", "re.compile" ]
[((486, 517), 're.compile', 're.compile', (['"""^( *)[-+*] (.*?)$"""'], {}), "('^( *)[-+*] (.*?)$')\n", (496, 517), False, 'import re\n'), ((539, 569), 're.compile', 're.compile', (['"""^( *)([-+*])( +)"""'], {}), "('^( *)([-+*])( +)')\n", (549, 569), False, 'import re\n'), ((819, 841), 'praw.Reddit', 'praw.Reddit', ([...
import setuptools with open("README.md", "r") as fh: long_description = fh.read() version = "1.2.0" setuptools.setup( name="sabersql", version=version, author="<NAME>", author_email="<EMAIL>", description="SaberSQL is a tool to scrape baseball data from various sources and import it into a My...
[ "setuptools.find_packages" ]
[((571, 597), 'setuptools.find_packages', 'setuptools.find_packages', ([], {}), '()\n', (595, 597), False, 'import setuptools\n')]
# -*- coding: utf-8 -*- from quart import Blueprint, render_template bp = Blueprint('base', __name__) @bp.route('/') async def index(): return await render_template('base/base.html.j2')
[ "quart.render_template", "quart.Blueprint" ]
[((76, 103), 'quart.Blueprint', 'Blueprint', (['"""base"""', '__name__'], {}), "('base', __name__)\n", (85, 103), False, 'from quart import Blueprint, render_template\n'), ((157, 193), 'quart.render_template', 'render_template', (['"""base/base.html.j2"""'], {}), "('base/base.html.j2')\n", (172, 193), False, 'from quar...
from util import db from util import getFilteredQuery from flask import jsonify from flask_restful import Resource from flask_restful import reqparse from urllib.parse import unquote _armorCollection = db.armor class ArmorListApi(Resource): def get(self): return jsonify(getFilteredQuery(_ar...
[ "util.getFilteredQuery", "flask_restful.reqparse.RequestParser" ]
[((817, 841), 'flask_restful.reqparse.RequestParser', 'reqparse.RequestParser', ([], {}), '()\n', (839, 841), False, 'from flask_restful import reqparse\n'), ((300, 338), 'util.getFilteredQuery', 'getFilteredQuery', (['_armorCollection', '{}'], {}), '(_armorCollection, {})\n', (316, 338), False, 'from util import getFi...
from sys import stdout from bisect import bisect_left as binl from copy import copy, deepcopy from collections import defaultdict mod = 1 def intin(): input_tuple = input().split() if len(input_tuple) <= 1: return int(input_tuple[0]) return tuple(map(int, input_tuple)) def intina(): ...
[ "sys.stdout.write" ]
[((3113, 3128), 'sys.stdout.write', 'stdout.write', (['a'], {}), '(a)\n', (3125, 3128), False, 'from sys import stdout\n')]
# -*- coding: utf-8 -*- import os import sys import signal import tempfile from mock import patch import testing.elasticsearch from elasticsearch import Elasticsearch from time import sleep from shutil import rmtree if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest class TestE...
[ "os.path.exists", "os.kill", "mock.patch", "os.path.join", "time.sleep", "shutil.rmtree", "tempfile.mkdtemp", "os.getpid", "os.wait", "os.fork" ]
[((2616, 2670), 'mock.patch', 'patch', (['"""testing.elasticsearch.find_elasticsearch_home"""'], {}), "('testing.elasticsearch.find_elasticsearch_home')\n", (2621, 2670), False, 'from mock import patch\n'), ((4913, 4967), 'mock.patch', 'patch', (['"""testing.elasticsearch.find_elasticsearch_home"""'], {}), "('testing.e...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities __a...
[ "pulumi.getter", "pulumi.set", "pulumi.ResourceOptions", "pulumi.get" ]
[((1404, 1440), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""groupIpAddress"""'}), "(name='groupIpAddress')\n", (1417, 1440), False, 'import pulumi\n'), ((1802, 1842), 'pulumi.getter', 'pulumi.getter', ([], {'name': '"""networkInterfaceId"""'}), "(name='networkInterfaceId')\n", (1815, 1842), False, 'import pulum...
from etl.loader.db.flight import Flight from etl.loader.db.base import ( engine, Session, Base ) Base.metadata.create_all(engine)
[ "etl.loader.db.base.Base.metadata.create_all" ]
[((103, 135), 'etl.loader.db.base.Base.metadata.create_all', 'Base.metadata.create_all', (['engine'], {}), '(engine)\n', (127, 135), False, 'from etl.loader.db.base import engine, Session, Base\n')]
import logging import urllib import urlparse from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponse from django.utils.translation import ugettext_lazy as _ from sentry.models import GroupMeta from sentry.plugins.base import Response from sentry.plugins.bases....
[ "django.utils.translation.ugettext_lazy", "urlparse.parse_qs", "urlparse.urlunsplit", "sentry.models.GroupMeta.objects.set_value", "django.core.urlresolvers.reverse", "logging.exception", "sentry_jira.jira.JIRAClient", "urllib.urlencode", "urlparse.urlsplit", "sentry.utils.json.dumps" ]
[((699, 708), 'django.utils.translation.ugettext_lazy', '_', (['"""JIRA"""'], {}), "('JIRA')\n", (700, 708), True, 'from django.utils.translation import ugettext_lazy as _\n'), ((1799, 1833), 'sentry_jira.jira.JIRAClient', 'JIRAClient', (['instance', 'username', 'pw'], {}), '(instance, username, pw)\n', (1809, 1833), F...
""" MODEL DRIVEN REGISTRATION for iBEAt study: quantitative renal MRI @<NAME> 2021 Test script for T1 sequence using Model driven registration Library """ import sys import glob import os import numpy as np import itk import SimpleITK as sitk import pydicom from pathlib import Path import time from PIL import Image im...
[ "os.listdir", "MDR.MDR.model_driven_registration", "importlib.import_module", "pathlib.Path", "MDR.Tools.get_sitk_image_details_from_DICOM", "MDR.Tools.read_elastix_model_parameters", "MDR.Tools.read_DICOM_files", "os.getcwd", "os.chdir", "numpy.zeros", "MDR.Tools.export_images", "numpy.shape"...
[((601, 643), 'numpy.set_printoptions', 'np.set_printoptions', ([], {'threshold': 'sys.maxsize'}), '(threshold=sys.maxsize)\n', (620, 643), True, 'import numpy as np\n'), ((1334, 1353), 'os.chdir', 'os.chdir', (['DATA_PATH'], {}), '(DATA_PATH)\n', (1342, 1353), False, 'import os\n'), ((1438, 1450), 'os.listdir', 'os.li...
__author__ = 'laiyu' import logging import json from django.http import HttpResponse from django.db import transaction from django.db.models import Max from django.db.models import Min from django.db.models import F from django.core import serializers from django.template import loader from website.models import Spri...
[ "logging.getLogger", "website.models.Env_setting.objects.order_by", "website.models.API_project_setting.objects.filter", "website.models.API_test_case_step", "website.models.API_test_case_step.objects.filter", "django.db.models.Max", "django.http.HttpResponse", "json.dumps", "django.db.models.F", ...
[((1771, 1800), 'logging.getLogger', 'logging.getLogger', (['"""mylogger"""'], {}), "('mylogger')\n", (1788, 1800), False, 'import logging\n'), ((8811, 8832), 'json.dumps', 'json.dumps', (['node_list'], {}), '(node_list)\n', (8821, 8832), False, 'import json\n'), ((8844, 8876), 'django.http.HttpResponse', 'HttpResponse...
from copy import deepcopy import pytest from conftest import ( N_EXAMPLES_PER_BATCH, SAT_HEIGHT_IN_PIXELS, SAT_N_EXPECTED_TIMESTEPS, SAT_WIDTH_IN_PIXELS, ) from power_perceiver.consts import BatchKey from power_perceiver.load_raw.raw_dataset import RawDataset def test_init(raw_dataset_with_sat_only:...
[ "pytest.mark.parametrize", "copy.deepcopy" ]
[((649, 770), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""raw_dataset_str"""', "['raw_dataset_with_sat_only', 'raw_dataset_with_sat_only_and_gsp_pv_sat']"], {}), "('raw_dataset_str', ['raw_dataset_with_sat_only',\n 'raw_dataset_with_sat_only_and_gsp_pv_sat'])\n", (672, 770), False, 'import pytest\n')...
from django.test import TestCase from django.db import IntegrityError from dbaccounting.models import AccountType,Account,Transaction # Create your tests here. class AccountTypeTest(TestCase): @classmethod def setUpTestData(cls): AccountType.objects.create(name = "Assets",bal_type = "D") Accou...
[ "dbaccounting.models.Account.objects.create", "dbaccounting.models.Account.objects.all", "dbaccounting.models.AccountType.objects.create", "dbaccounting.models.Transaction.objects.get", "dbaccounting.models.Transaction.objects.create", "dbaccounting.models.AccountType.objects.get", "dbaccounting.models....
[((248, 303), 'dbaccounting.models.AccountType.objects.create', 'AccountType.objects.create', ([], {'name': '"""Assets"""', 'bal_type': '"""D"""'}), "(name='Assets', bal_type='D')\n", (274, 303), False, 'from dbaccounting.models import AccountType, Account, Transaction\n'), ((476, 505), 'dbaccounting.models.AccountType...
# -*- coding: utf-8 -*- import unittest from openeo_udf.server.data_model.metadata_schema import MetadataModel from openeo_udf.server.data_model.data_collection_schema import DataCollectionModel, ObjectCollectionModel, TimeStampsModel from openeo_udf.server.data_model.model_example_creator import create_simple_feature_...
[ "openeo_udf.server.data_model.metadata_schema.MetadataModel", "openeo_udf.server.data_model.data_collection_schema.DataCollectionModel", "openeo_udf.server.data_model.model_example_creator.create_simple_feature_collection_model_example", "openeo_udf.server.data_model.data_collection_schema.ObjectCollectionMod...
[((1713, 1728), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1726, 1728), False, 'import unittest\n'), ((631, 954), 'openeo_udf.server.data_model.metadata_schema.MetadataModel', 'MetadataModel', ([], {'name': '"""SimpleFeatureCollection"""', 'description': '"""New collection of simple features"""', 'creator': '...
import argparse from typing import List from david.components.engine import Engine from david.config import DavidConfig # noinspection PyProtectedMember def add_subparser( subparsers: argparse._SubParsersAction, parents: List[argparse.ArgumentParser] ): train_parser = subparsers.add_parser( "train", ...
[ "david.components.engine.Engine" ]
[((692, 706), 'david.components.engine.Engine', 'Engine', (['config'], {}), '(config)\n', (698, 706), False, 'from david.components.engine import Engine\n')]
import sys import gzip import bz2 import os import time import subprocess import math import multiprocessing as mp from optparse import OptionParser from utils import * import AAF def main(): parser = OptionParser() parser.add_option("-k", dest="kLen", type=int, default=25, help="k for ...
[ "subprocess.check_output", "os.path.exists", "time.strftime", "optparse.OptionParser", "os.path.isdir", "sys.exit", "AAF.aaf_kmer_count", "os.system" ]
[((208, 222), 'optparse.OptionParser', 'OptionParser', ([], {}), '()\n', (220, 222), False, 'from optparse import OptionParser\n'), ((2298, 2339), 'os.system', 'os.system', (['"""which kmer_merge > /dev/null"""'], {}), "('which kmer_merge > /dev/null')\n", (2307, 2339), False, 'import os\n'), ((2545, 2589), 'os.system'...
import math class XpThresholds: EASY = 0 MEDIUM = 1 HARD = 2 DEADLY = 3 challenge = [ EASY, MEDIUM, HARD, DEADLY ] def __init__(self, tables): self.tables = tables def get(self, level, challenge): if level < 1 or level > 20: raise ValueError() if...
[ "math.ceil" ]
[((2799, 2822), 'math.ceil', 'math.ceil', (['(base / multi)'], {}), '(base / multi)\n', (2808, 2822), False, 'import math\n')]
import altair as alt import pandas as pd import numpy as np import sys TRUSTTSV = sys.argv[1] CELLNUM = sys.argv[2] BCRTEMP = """ <div style="width: 100%; height: 700px; position: relative; clear:both;overflow: hidden; white-space:nowrap; padding-top: 10px;clear:both;"> <div style="width: 110%, position: absolute; ...
[ "pandas.read_csv", "numpy.where", "altair.Chart", "altair.Y", "pandas.DataFrame", "altair.Bin", "pandas.concat", "altair.Scale" ]
[((979, 1038), 'pandas.read_csv', 'pd.read_csv', (['TRUSTTSV'], {'delimiter': '"""\t"""', 'index_col': '"""#barcode"""'}), "(TRUSTTSV, delimiter='\\t', index_col='#barcode')\n", (990, 1038), True, 'import pandas as pd\n'), ((1525, 1701), 'pandas.DataFrame', 'pd.DataFrame', (['[No_BCR, L_only, H_only, paired, CELLNUM]']...
# -*- coding: utf-8 -*- # Copyright 2020 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...
[ "google.cloud.servicedirectory_v1beta1.types.registration_service.ListEndpointsRequest", "google.cloud.servicedirectory_v1beta1.types.registration_service.ListNamespacesRequest", "google.cloud.servicedirectory_v1beta1.types.registration_service.ListServicesRequest" ]
[((2687, 2738), 'google.cloud.servicedirectory_v1beta1.types.registration_service.ListNamespacesRequest', 'registration_service.ListNamespacesRequest', (['request'], {}), '(request)\n', (2729, 2738), False, 'from google.cloud.servicedirectory_v1beta1.types import registration_service\n'), ((5225, 5276), 'google.cloud.s...
# Generated by Django 2.2 on 2019-04-09 05:02 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
[ "django.db.models.ForeignKey", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.DecimalField", "django.db.migrations.swappable_dependency", "django.db.models.CharField" ]
[((245, 302), 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), '(settings.AUTH_USER_MODEL)\n', (276, 302), False, 'from django.db import migrations, models\n'), ((438, 531), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)...
# Copyright (c) 2016, The Bifrost Authors. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditions a...
[ "bifrost.DataType.DataType", "bifrost.quantize.quantize", "copy.deepcopy" ]
[((2175, 2189), 'copy.deepcopy', 'deepcopy', (['ihdr'], {}), '(ihdr)\n', (2183, 2189), False, 'from copy import deepcopy\n'), ((2206, 2240), 'bifrost.DataType.DataType', 'DataType', (["ihdr['_tensor']['dtype']"], {}), "(ihdr['_tensor']['dtype'])\n", (2214, 2240), False, 'from bifrost.DataType import DataType\n'), ((264...
from copy import deepcopy from os import path from yt.frontends.amrvac import read_amrvac_namelist from yt.testing import requires_module from yt.utilities.on_demand_imports import _f90nml as f90nml test_dir = path.dirname(path.abspath(__file__)) blast_wave_parfile = path.join(test_dir, "sample_parfiles/bw_3d.par") m...
[ "os.path.join", "yt.frontends.amrvac.read_amrvac_namelist", "yt.utilities.on_demand_imports._f90nml.read", "copy.deepcopy", "os.path.abspath", "yt.testing.requires_module" ]
[((270, 318), 'os.path.join', 'path.join', (['test_dir', '"""sample_parfiles/bw_3d.par"""'], {}), "(test_dir, 'sample_parfiles/bw_3d.par')\n", (279, 318), False, 'from os import path\n'), ((338, 393), 'os.path.join', 'path.join', (['test_dir', '"""sample_parfiles/tvdlf_scheme.par"""'], {}), "(test_dir, 'sample_parfiles...
from dataclasses import dataclass, field from typing import List from apischema import serializer, deserializer from kinopoisk_unofficial.contract.response import Response from kinopoisk_unofficial.model.film_sequels_and_prequels import FilmSequelOrPrequel @dataclass(frozen=True) class FilmSequelsAndPrequelsRespons...
[ "dataclasses.dataclass", "dataclasses.field" ]
[((262, 284), 'dataclasses.dataclass', 'dataclass', ([], {'frozen': '(True)'}), '(frozen=True)\n', (271, 284), False, 'from dataclasses import dataclass, field\n'), ((372, 399), 'dataclasses.field', 'field', ([], {'default_factory': 'list'}), '(default_factory=list)\n', (377, 399), False, 'from dataclasses import datac...
from django.contrib import admin from django.conf import settings from django import forms from django_rest_webhooks.utils import get_hook_model if getattr(settings, "HOOK_EVENTS", None) is None: raise Exception("You need to define settings.HOOK_EVENTS!") HookModel = get_hook_model() class HookForm(forms.Model...
[ "django_rest_webhooks.utils.get_hook_model", "django.contrib.admin.site.register" ]
[((275, 291), 'django_rest_webhooks.utils.get_hook_model', 'get_hook_model', ([], {}), '()\n', (289, 291), False, 'from django_rest_webhooks.utils import get_hook_model\n'), ((1026, 1067), 'django.contrib.admin.site.register', 'admin.site.register', (['HookModel', 'HookAdmin'], {}), '(HookModel, HookAdmin)\n', (1045, 1...
# coding: utf-8 # Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
[ "oci.util.formatted_flat_dict", "oci.util.value_allowed_none_or_none_sentinel" ]
[((7063, 7088), 'oci.util.formatted_flat_dict', 'formatted_flat_dict', (['self'], {}), '(self)\n', (7082, 7088), False, 'from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel\n'), ((5553, 5618), 'oci.util.value_allowed_none_or_none_sentinel', 'value_allowed_none_or_none_sentinel',...
""" ======================================= Compare original and new RNA-seq data at Day14 vs. Day0 ======================================= :Author: <NAME> :Release: $Id$ :Date: |today| :Tags: Python """ # load modules from ruffus import * import CGAT.Experiment as E import logging as L import CGAT.Database as Data...
[ "CGATPipelines.Pipeline.main", "sqlite3.connect", "CGATPipelines.Pipeline.getParameters", "CGATPipelines.Pipeline.touch", "CGATPipelines.PipelineMetagenomeCommunities.testDistSignificance", "CGATPipelines.Pipeline.snip", "rpy2.robjects.r" ]
[((1170, 1203), 'CGATPipelines.Pipeline.getParameters', 'P.getParameters', (["['pipeline.ini']"], {}), "(['pipeline.ini'])\n", (1185, 1203), True, 'import CGATPipelines.Pipeline as P\n'), ((1505, 1540), 'sqlite3.connect', 'sqlite3.connect', (["PARAMS['database']"], {}), "(PARAMS['database'])\n", (1520, 1540), False, 'i...
# 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...
[ "paddlenlp.transformers.GPTLMHeadModel.from_pretrained", "paddlenlp.transformers.GPTChineseTokenizer.from_pretrained", "paddle.to_tensor" ]
[((750, 797), 'paddlenlp.transformers.GPTChineseTokenizer.from_pretrained', 'GPTChineseTokenizer.from_pretrained', (['model_name'], {}), '(model_name)\n', (785, 797), False, 'from paddlenlp.transformers import GPTLMHeadModel, GPTChineseTokenizer\n'), ((806, 848), 'paddlenlp.transformers.GPTLMHeadModel.from_pretrained',...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/inventory/applied_items.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pr...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((519, 545), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (543, 545), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1382, 1698), 'google.protobuf.descriptor.FieldDescriptor', '_descriptor.FieldDescriptor', ([], {'name': '"""item"""', 'full_nam...
from help_modules import * from motor_control import * import pyaudio import wave import numpy as np import time import matplotlib.pyplot as plt import speech_recognition as sr from scipy import signal import math import threading import multiprocessing as ms import os import cv2 from nanpy import (ArduinoApi, SerialMa...
[ "cv2.rectangle", "numpy.array", "time.sleep", "speech_recognition.Recognizer", "dlib.get_frontal_face_detector", "numpy.zeros", "cv2.waitKey", "cv2.destroyAllWindows", "cv2.VideoCapture", "pygame.mixer.music.load", "time.time", "pygame.mixer.music.play", "threading.Thread", "cv2.resize", ...
[((670, 702), 'dlib.get_frontal_face_detector', 'dlib.get_frontal_face_detector', ([], {}), '()\n', (700, 702), False, 'import dlib\n'), ((733, 752), 'cv2.VideoCapture', 'cv2.VideoCapture', (['(0)'], {}), '(0)\n', (749, 752), False, 'import cv2\n'), ((795, 810), 'speech_recognition.Recognizer', 'sr.Recognizer', ([], {}...
import os from pytest import raises from cement.utils import fs def test_abspath(tmp): path = fs.abspath('.') assert path.startswith('/') def test_join(tmp, rando): full_path = os.path.abspath(os.path.join(tmp.dir, rando)) assert fs.join(tmp.dir, rando) == full_path def test_join_exists(tmp, rand...
[ "os.path.exists", "cement.utils.fs.backup", "cement.utils.fs.join", "os.path.join", "cement.utils.fs.join_exists", "cement.utils.fs.Tmp", "pytest.raises", "os.path.basename", "cement.utils.fs.ensure_dir_exists", "cement.utils.fs.abspath" ]
[((101, 116), 'cement.utils.fs.abspath', 'fs.abspath', (['"""."""'], {}), "('.')\n", (111, 116), False, 'from cement.utils import fs\n'), ((397, 427), 'cement.utils.fs.join_exists', 'fs.join_exists', (['tmp.dir', 'rando'], {}), '(tmp.dir, rando)\n', (411, 427), False, 'from cement.utils import fs\n'), ((558, 588), 'cem...
import logging from simuvex.s_format import FormatParser l = logging.getLogger("simuvex.procedures.snprintf") ###################################### # snprintf ###################################### class snprintf(FormatParser): def run(self, dst_ptr, size): # pylint:disable=arguments-differ,unused-argument ...
[ "logging.getLogger" ]
[((62, 110), 'logging.getLogger', 'logging.getLogger', (['"""simuvex.procedures.snprintf"""'], {}), "('simuvex.procedures.snprintf')\n", (79, 110), False, 'import logging\n')]
import pandas as pd from pandas import DataFrame import numpy as np import csv import requests from bs4 import BeautifulSoup from tqdm import trange pd.set_option('display.max_columns', 999) #this entire program shoudl be rewritten using basketball refrence scraper API #nba is too slow def main(): def_rating = c...
[ "pandas.read_html", "requests.get", "pandas.set_option" ]
[((149, 190), 'pandas.set_option', 'pd.set_option', (['"""display.max_columns"""', '(999)'], {}), "('display.max_columns', 999)\n", (162, 190), True, 'import pandas as pd\n'), ((1287, 1372), 'requests.get', 'requests.get', (['"""https://www.basketball-reference.com/leaders/def_rtg_career.html"""'], {}), "('https://www....
''' Test to find out if we can determine correctly wether we are in the Transcrypt/JavaScript or the CPython environment ''' from org.transcrypt.stubs.browser import __envir__, __pragma__ if __envir__.executor_name == __envir__.transpiler_name: document.getElementById ('output') .innerHTML = 'Using Transcrypt' ...
[ "org.transcrypt.stubs.browser.__pragma__" ]
[((323, 341), 'org.transcrypt.stubs.browser.__pragma__', '__pragma__', (['"""skip"""'], {}), "('skip')\n", (333, 341), False, 'from org.transcrypt.stubs.browser import __envir__, __pragma__\n'), ((367, 387), 'org.transcrypt.stubs.browser.__pragma__', '__pragma__', (['"""noskip"""'], {}), "('noskip')\n", (377, 387), Fal...
# -*- coding: utf-8 -*- """USN change journal records.""" import os from dtformats import data_format class USNRecords(data_format.BinaryDataFile): """USN change journal records.""" # Using a class constant significantly speeds up the time required to load # the dtFabric definition file. _FABRIC = data_for...
[ "dtformats.data_format.BinaryDataFile.ReadDefinitionFile" ]
[((312, 377), 'dtformats.data_format.BinaryDataFile.ReadDefinitionFile', 'data_format.BinaryDataFile.ReadDefinitionFile', (['"""usn_journal.yaml"""'], {}), "('usn_journal.yaml')\n", (357, 377), False, 'from dtformats import data_format\n')]
from django.contrib import admin from .models import User, SellTransaction, BuyTransaction, Bookmark admin.site.register(SellTransaction) admin.site.register(BuyTransaction) admin.site.register(Bookmark) # Register your models here. from django.contrib.auth import get_user_model from django.contrib.auth.admin import U...
[ "django.contrib.admin.site.register" ]
[((101, 137), 'django.contrib.admin.site.register', 'admin.site.register', (['SellTransaction'], {}), '(SellTransaction)\n', (120, 137), False, 'from django.contrib import admin\n'), ((138, 173), 'django.contrib.admin.site.register', 'admin.site.register', (['BuyTransaction'], {}), '(BuyTransaction)\n', (157, 173), Fal...
############################################################################### ## Tool name: Generate GTFS Route Shapes ## Step 1: Generate Shapes on Map ## Creator: <NAME>, Esri ## Last updated: 4 September 2019 ############################################################################### ''' This tool genera...
[ "arcpy.management.CreateFeatureclass", "arcpy.management.CopyFeatures", "arcpy.CheckOutExtension", "arcpy.da.SearchCursor", "numpy.sin", "operator.itemgetter", "AGOLRouteHelper.generate_routes_from_AGOL_as_polylines", "arcpy.na.AddLocations", "arcpy.da.Editor", "arcpy.da.UpdateCursor", "re.searc...
[((22476, 22521), 'arcpy.AddMessage', 'arcpy.AddMessage', (['"""SQLizing the GTFS data..."""'], {}), "('SQLizing the GTFS data...')\n", (22492, 22521), False, 'import arcpy\n'), ((22527, 22597), 'arcpy.AddMessage', 'arcpy.AddMessage', (['"""(This step might take a while for large datasets.)"""'], {}), "('(This step mig...
from argparse import Namespace from typing import List, Union from yawast.external.spinner import Spinner from yawast.reporting import reporter from yawast.reporting.enums import Vulnerabilities from yawast.reporting.issue import Issue from yawast.scanner.plugins.evidence import Evidence from yawast.scanner.plugins.ht...
[ "yawast.scanner.plugins.http.servers.nginx.check_all", "yawast.reporting.reporter.register_data", "yawast.scanner.plugins.http.special_files.check_special_files", "yawast.scanner.plugins.http.http_basic.get_header_issues", "yawast.external.spinner.Spinner", "yawast.scanner.plugins.http.servers.apache_tomc...
[((738, 772), 'yawast.reporting.reporter.register_data', 'reporter.register_data', (['"""url"""', 'url'], {}), "('url', url)\n", (760, 772), False, 'from yawast.reporting import reporter\n'), ((777, 817), 'yawast.reporting.reporter.register_data', 'reporter.register_data', (['"""domain"""', 'domain'], {}), "('domain', ...
#! /usr/bin/python import cv2 from itertools import count face_cascade = cv2.CascadeClassifier('frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('eye.xml') # Load the overlay image: glasses.png imgGlasses = cv2.imread('Mask2web.png') #Check if the files opened if imgGlasses is None : exit("Could n...
[ "cv2.rectangle", "cv2.threshold", "cv2.bitwise_and", "cv2.imshow", "cv2.waitKey", "itertools.count", "cv2.destroyAllWindows", "cv2.bitwise_not", "cv2.cvtColor", "cv2.VideoCapture", "cv2.CascadeClassifier", "cv2.resize", "cv2.imread", "cv2.add" ]
[((75, 123), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""frontalface_default.xml"""'], {}), "('frontalface_default.xml')\n", (96, 123), False, 'import cv2\n'), ((138, 170), 'cv2.CascadeClassifier', 'cv2.CascadeClassifier', (['"""eye.xml"""'], {}), "('eye.xml')\n", (159, 170), False, 'import cv2\n'), ((223, ...
"""Script demonstrating the joint use of simulation and control. The simulation is run by a `CtrlAviary` or `VisionAviary` environment. The control is given by the PID implementation in `DSLPIDControl`. Example ------- In a terminal, run as: $ python fly.py Notes ----- The drones move, at different altitudes, a...
[ "argparse.ArgumentParser", "gym_pybullet_drones.control.DSLPIDControl.DSLPIDControl", "gym_pybullet_drones.envs.VisionAviary.VisionAviary", "numpy.hstack", "numpy.floor", "numpy.array", "numpy.zeros", "gym_pybullet_drones.utils.utils.sync", "gym_pybullet_drones.envs.CtrlAviary.CtrlAviary", "numpy....
[((1120, 1234), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Helix flight script using CtrlAviary or VisionAviary and DSLPIDControl"""'}), "(description=\n 'Helix flight script using CtrlAviary or VisionAviary and DSLPIDControl')\n", (1143, 1234), False, 'import argparse\n'), ((4232...
"""Constants (like hbar) related to quantum mechanics.""" from __future__ import print_function, division from sympy.core.numbers import NumberSymbol from sympy.core.singleton import Singleton from sympy.core.compatibility import u, with_metaclass from sympy.printing.pretty.stringpict import prettyForm import sympy.m...
[ "sympy.core.compatibility.u", "sympy.mpmath.libmp.from_float", "sympy.printing.pretty.stringpict.prettyForm", "sympy.core.compatibility.with_metaclass" ]
[((550, 589), 'sympy.core.compatibility.with_metaclass', 'with_metaclass', (['Singleton', 'NumberSymbol'], {}), '(Singleton, NumberSymbol)\n', (564, 589), False, 'from sympy.core.compatibility import u, with_metaclass\n'), ((1061, 1098), 'sympy.mpmath.libmp.from_float', 'mlib.from_float', (['(1.05457162e-34)', 'prec'],...
import RPi.GPIO as GPIO import time #GPIO SETUP channel = 21 GPIO.setmode(GPIO.BCM) GPIO.setup(channel, GPIO.IN) def callback(channel): if GPIO.input(channel): print ("NO Water Detected!") else: print ("Water Detected!") GPIO.add_event_detect(channel, GPIO.BOTH, bou...
[ "RPi.GPIO.add_event_detect", "RPi.GPIO.add_event_callback", "RPi.GPIO.setup", "time.sleep", "RPi.GPIO.input", "RPi.GPIO.setmode" ]
[((63, 85), 'RPi.GPIO.setmode', 'GPIO.setmode', (['GPIO.BCM'], {}), '(GPIO.BCM)\n', (75, 85), True, 'import RPi.GPIO as GPIO\n'), ((86, 114), 'RPi.GPIO.setup', 'GPIO.setup', (['channel', 'GPIO.IN'], {}), '(channel, GPIO.IN)\n', (96, 114), True, 'import RPi.GPIO as GPIO\n'), ((275, 332), 'RPi.GPIO.add_event_detect', 'GP...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import random import unittest from pymatgen.core.composition import Composition from pymatgen.core.ion import Ion from pymatgen.core.periodic_table import Element class IonTest(unittest.TestCase): def s...
[ "pymatgen.core.composition.Composition", "pymatgen.core.ion.Ion.from_dict", "pymatgen.core.ion.Ion", "pymatgen.core.ion.Ion.from_formula", "pymatgen.core.periodic_table.Element.from_Z", "unittest.main", "random.randint" ]
[((5185, 5200), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5198, 5200), False, 'import unittest\n'), ((888, 927), 'pymatgen.core.composition.Composition', 'Composition', (["{'Fe': 4, 'O': 16, 'P': 4}"], {}), "({'Fe': 4, 'O': 16, 'P': 4})\n", (899, 927), False, 'from pymatgen.core.composition import Compositio...
# 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, software # d...
[ "tempest.test.idempotent_id", "tempest_lib.common.utils.data_utils.rand_name", "tempest.test.attr", "oslo_log.log.getLogger" ]
[((806, 833), 'oslo_log.log.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (823, 833), True, 'from oslo_log import log as logging\n'), ((3376, 3399), 'tempest.test.attr', 'test.attr', ([], {'type': '"""smoke"""'}), "(type='smoke')\n", (3385, 3399), False, 'from tempest import test\n'), ((3405, 346...
#!/usr/bin/python3 from __future__ import absolute_import from __future__ import division from __future__ import print_function import os,sys import plyfile import numpy as np import argparse import h5py reduced_length_dict = {"MarketplaceFeldkirch":[10538633,"marketsquarefeldkirch4-reduced"], ...
[ "numpy.zeros", "os.listdir", "os.path.join", "argparse.ArgumentParser" ]
[((1230, 1255), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (1253, 1255), False, 'import argparse\n'), ((1776, 1854), 'os.path.join', 'os.path.join', (['args.datafolder', '"""results"""', "(length_dict[category][1] + '.labels')"], {}), "(args.datafolder, 'results', length_dict[category][1] +...
from panda3d.core import * from libotp import Nametag, NametagGroup from libotp import CFSpeech, CFThought, CFTimeout, CFPageButton, CFNoQuitButton, CFQuitButton, CFExclaim from otp.otpbase import OTPGlobals from otp.otpbase import OTPLocalizer from direct.actor.Actor import Actor from direct.directnotify import Direct...
[ "libotp.NametagGroup", "random.randint", "direct.actor.Actor.Actor.delete", "otp.otpbase.OTPRender.renderReflection", "otp.otpbase.OTPGlobals.getInterfaceFont", "direct.actor.Actor.Actor.__init__", "direct.distributed.ClockDelta.globalClockDelta.localElapsedTime", "otp.avatar.ShadowCaster.ShadowCaster...
[((544, 599), 'direct.directnotify.DirectNotifyGlobal.directNotify.newCategory', 'DirectNotifyGlobal.directNotify.newCategory', (['"""Teleport"""'], {}), "('Teleport')\n", (587, 599), False, 'from direct.directnotify import DirectNotifyGlobal\n'), ((1163, 1229), 'direct.actor.Actor.Actor.__init__', 'Actor.__init__', ([...
""" The Condor plugin. Allows submission to `HTCondor <http://research.cs.wisc.edu/htcondor/>`_. Note: Condor was renamed to HTCondor in 2012. """ from __future__ import print_function import os import sys import random import math import logging import getpass from datetime import datetime,timedelta import subproces...
[ "logging.getLogger", "subprocess.check_output", "subprocess.check_call", "os.path.join", "os.environ.copy", "os.path.dirname", "functools.partial", "getpass.getuser" ]
[((570, 597), 'logging.getLogger', 'logging.getLogger', (['"""condor"""'], {}), "('condor')\n", (587, 597), False, 'import logging\n'), ((652, 669), 'os.environ.copy', 'os.environ.copy', ([], {}), '()\n', (667, 669), False, 'import os\n'), ((736, 774), 'subprocess.check_call', 'subprocess.check_call', (['*args'], {}), ...
r"""Main loop for each swarm agent ___ _ _ / __|_ __ ____ _ _ _ _ __ /_\ __ _ ___ _ _| |_ \__ \ V V / _` | '_| ' \ / _ \/ _` / -_) ' \ _| |___/\_/\_/\__,_|_| |_|_|_| /_/ \_\__, \___|_||_\__| |___/ """ from .control.task_manager...
[ "drivers.SwarmBot" ]
[((587, 597), 'drivers.SwarmBot', 'SwarmBot', ([], {}), '()\n', (595, 597), False, 'from drivers import SwarmBot\n')]
############## # Setup Django import django django.setup() ############# # Test proper import threading import time import pytest from django.db import DatabaseError, connection, transaction from django.db.models import F, Subquery from app.models import Sock @pytest.mark.django_db def test_serializable_count_can...
[ "django.setup", "django.db.transaction.atomic", "app.models.Sock.objects.create", "django.db.connection.cursor", "app.models.Sock.objects.all", "app.models.Sock.objects.get", "threading.Thread", "threading.Barrier" ]
[((45, 59), 'django.setup', 'django.setup', ([], {}), '()\n', (57, 59), False, 'import django\n'), ((540, 571), 'threading.Thread', 'threading.Thread', ([], {'target': 'create'}), '(target=create)\n', (556, 571), False, 'import threading\n'), ((640, 660), 'threading.Barrier', 'threading.Barrier', (['(2)'], {}), '(2)\n'...
import numpy as np import tensorflow as tf class batch_norm(object): """Code modification of http://stackoverflow.com/a/33950177""" def __init__(self, epsilon=1e-5, momentum = 0.9, name="batch_norm"): with tf.variable_scope(name): self.epsilon = epsilon self.momentum = momentum ...
[ "tensorflow.nn.conv2d", "tensorflow.variable_scope", "tensorflow.nn.moments", "tensorflow.random_normal_initializer", "tensorflow.truncated_normal_initializer", "tensorflow.train.ExponentialMovingAverage", "tensorflow.control_dependencies", "tensorflow.constant_initializer", "tensorflow.nn.batch_nor...
[((1367, 1497), 'tensorflow.nn.batch_norm_with_global_normalization', 'tf.nn.batch_norm_with_global_normalization', (['x', 'mean', 'var', 'self.beta', 'self.gamma', 'self.epsilon'], {'scale_after_normalization': '(True)'}), '(x, mean, var, self.beta, self.\n gamma, self.epsilon, scale_after_normalization=True)\n', (...
from common.helpers.collections import omit_falsy from common.models import Tag from .client import SalesforceClient import json import requests import threading ''' Project model maps to the Campaign object in Salesforce ''' client = SalesforceClient() def run(request): response = SalesforceClient().send(request...
[ "threading.Thread", "json.dumps", "common.models.Tag.tags_field_descriptions", "requests.Request" ]
[((1568, 1609), 'threading.Thread', 'threading.Thread', ([], {'target': 'run', 'args': '(req,)'}), '(target=run, args=(req,))\n', (1584, 1609), False, 'import threading\n'), ((1695, 1796), 'requests.Request', 'requests.Request', ([], {'method': '"""DELETE"""', 'url': 'f"""{client.campaign_endpoint}/platform_id__c/{proj...
""" pytest fixtures that can be resued across tests. the filename needs to be conftest.py """ import logging import os import shutil # noinspection PyUnresolvedReferences import findspark # this needs to be the first import # noinspection PyUnresolvedReferences import pytest from pyspark.sql import SparkSession find...
[ "logging.getLogger", "findspark.init", "pyspark.sql.SparkSession.builder.appName", "shutil.rmtree", "pytest.fixture", "os.remove" ]
[((316, 332), 'findspark.init', 'findspark.init', ([], {}), '()\n', (330, 332), False, 'import findspark\n'), ((1318, 1349), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (1332, 1349), False, 'import pytest\n'), ((423, 448), 'logging.getLogger', 'logging.getLogger', (['"""...
""" Utility functions for generating "lorem ipsum" Latin text. """ from __future__ import unicode_literals import random COMMON_P = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco ...
[ "random.sample", "random.choice", "random.randint" ]
[((3503, 3522), 'random.choice', 'random.choice', (['"""?."""'], {}), "('?.')\n", (3516, 3522), False, 'import random\n'), ((4807, 4830), 'random.sample', 'random.sample', (['WORDS', 'c'], {}), '(WORDS, c)\n', (4820, 4830), False, 'import random\n'), ((3313, 3334), 'random.randint', 'random.randint', (['(3)', '(12)'], ...
from setuptools import setup, find_packages setup( name="commandment", version="0.1", description="Commandment is an Open Source Apple MDM server with support for managing iOS and macOS devices", packages=['commandment'], include_package_data=True, author="mosen", license="MIT", url="htt...
[ "setuptools.setup" ]
[((44, 1682), 'setuptools.setup', 'setup', ([], {'name': '"""commandment"""', 'version': '"""0.1"""', 'description': '"""Commandment is an Open Source Apple MDM server with support for managing iOS and macOS devices"""', 'packages': "['commandment']", 'include_package_data': '(True)', 'author': '"""mosen"""', 'license'...
"""ATBDs endpoint.""" import datetime from typing import List from sqlalchemy import exc from app.crud.atbds import crud_atbds from app.db.db_session import DbSession, get_db_session from app.permissions import check_atbd_permissions, filter_atbd_versions from app.schemas import atbds, users from app.search.elasticse...
[ "app.permissions.check_atbd_permissions", "app.crud.atbds.crud_atbds.get", "app.crud.atbds.crud_atbds.create", "fastapi.HTTPException", "app.crud.atbds.crud_atbds.scan", "app.crud.atbds.crud_atbds.remove", "datetime.datetime.now", "fastapi.APIRouter", "app.users.cognito.update_atbd_contributor_info"...
[((574, 585), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (583, 585), False, 'from fastapi import APIRouter, BackgroundTasks, Depends, HTTPException\n'), ((834, 851), 'fastapi.Depends', 'Depends', (['get_user'], {}), '(get_user)\n', (841, 851), False, 'from fastapi import APIRouter, BackgroundTasks, Depends, HT...
#!/usr/bin/env python3 import time from statistics import mean from litex import RemoteClient wb = RemoteClient(csr_csv="test/csr.csv") wb.open() # # # # Read frequency meter fmeter_values = [] print("Reading frequency...") for i in range(100): fmeter_value = wb.regs.fmeter_value.read() print(fmeter_value)...
[ "statistics.mean", "time.sleep", "litex.RemoteClient" ]
[((102, 138), 'litex.RemoteClient', 'RemoteClient', ([], {'csr_csv': '"""test/csr.csv"""'}), "(csr_csv='test/csr.csv')\n", (114, 138), False, 'from litex import RemoteClient\n'), ((364, 379), 'time.sleep', 'time.sleep', (['(1.0)'], {}), '(1.0)\n', (374, 379), False, 'import time\n'), ((398, 417), 'statistics.mean', 'me...
import sys import ast import wx from wx.lib.plot import PlotCanvas, PlotGraphics, PolyLine, PolyMarker import numpy as np import math class Analisis(object): def __init__(self): self.times = [] self.state_codes = [] self.estados = [] self.fechas = [] self.tiempo_promedio = 0...
[ "numpy.array", "wx.lib.plot.PlotGraphics", "wx.lib.plot.PolyLine" ]
[((1722, 1739), 'numpy.array', 'np.array', (['codigos'], {}), '(codigos)\n', (1730, 1739), True, 'import numpy as np\n'), ((1756, 1812), 'wx.lib.plot.PolyLine', 'PolyLine', (['data'], {'legend': '"""codigos de estado"""', 'colour': '"""red"""'}), "(data, legend='codigos de estado', colour='red')\n", (1764, 1812), False...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import...
[ "twilio.base.values.of", "twilio.base.serialize.map", "twilio.base.serialize.iso8601_datetime", "twilio.rest.api.v2010.account.message.feedback.FeedbackList", "twilio.rest.api.v2010.account.message.media.MediaList" ]
[((13515, 13540), 'twilio.base.values.of', 'values.of', (["{'Body': body}"], {}), "({'Body': body})\n", (13524, 13540), False, 'from twilio.base import values\n'), ((14097, 14203), 'twilio.rest.api.v2010.account.message.media.MediaList', 'MediaList', (['self._version'], {'account_sid': "self._solution['account_sid']", ...
# # Contextual optimisation # This notebook will illustrate the techniques of "contextual optimisation" available in TKET. # See the user manaul for an introduction to the concept and methods. Here we will present an example showing how we can save some gates at the beginnning and end of a circuit, making no assumpti...
[ "pytket.circuit.display.render_circuit_jupyter", "random.randrange", "pytket.circuit.Circuit", "pytket.utils.prepare_circuit", "random.seed", "pytket.extensions.qiskit.AerBackend", "random.random" ]
[((1577, 1602), 'pytket.circuit.display.render_circuit_jupyter', 'render_circuit_jupyter', (['c'], {}), '(c)\n', (1599, 1602), False, 'from pytket.circuit.display import render_circuit_jupyter\n'), ((2174, 2192), 'pytket.utils.prepare_circuit', 'prepare_circuit', (['c'], {}), '(c)\n', (2189, 2192), False, 'from pytket....
#////////////////////////////////////////////////////// #Imports / #////////////////////////////////////////////////////// from docx import Document import os #from openpyxl import load_workbook #////////////////////////////////////////////////////// #Docx Files ...
[ "os.chdir", "docx.Document", "os.getcwd" ]
[((508, 519), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (517, 519), False, 'import os\n'), ((525, 547), 'os.chdir', 'os.chdir', (['"""copiedFrom"""'], {}), "('copiedFrom')\n", (533, 547), False, 'import os\n'), ((559, 605), 'docx.Document', 'Document', (['"""medicare tracking form - Copy.docx"""'], {}), "('medicare t...
import paho.mqtt.client as mqtt from sensores import Sensores import time from datetime import datetime import json def criandoJson(info): return json.dumps(info) broker = "test.mosquitto.org" topic = "inatel/ICT/horta-inteligente" cliente = mqtt.Client("Cliente") cliente.connect(broker) se...
[ "sensores.Sensores", "paho.mqtt.client.Client", "json.dumps", "time.sleep", "datetime.datetime.now" ]
[((267, 289), 'paho.mqtt.client.Client', 'mqtt.Client', (['"""Cliente"""'], {}), "('Cliente')\n", (278, 289), True, 'import paho.mqtt.client as mqtt\n'), ((334, 373), 'sensores.Sensores', 'Sensores', ([], {'name': '"""Umidade"""', 'bounds': '(0, 1)'}), "(name='Umidade', bounds=(0, 1))\n", (342, 373), False, 'from senso...
import time import gc gc.enable() filenames = ["1MB.txt", "10MB.txt", "100MB.txt", "1GB.txt"] for j in range(0, 4): #run once for each file size in above list times = [] for i in range(0, 100): #1000 iterations #print(i) start = int(round(time.time() * 1000)) #start time in ms file = op...
[ "time.time", "gc.enable", "gc.collect" ]
[((23, 34), 'gc.enable', 'gc.enable', ([], {}), '()\n', (32, 34), False, 'import gc\n'), ((553, 565), 'gc.collect', 'gc.collect', ([], {}), '()\n', (563, 565), False, 'import gc\n'), ((264, 275), 'time.time', 'time.time', ([], {}), '()\n', (273, 275), False, 'import time\n'), ((434, 445), 'time.time', 'time.time', ([],...
from sys import stdin,stdout def dsum(n): if n//10==0:return n*(n+1)//2 count,temp=0,n while not temp//10==0:count,temp=count+1,temp//10 p=10**count mod=n%p return (dsum(mod)+temp*(mod+1)+p*temp*(temp-1)//2+(p*count*temp*45//10)) def main(): out="" a,b=map(int,stdin.readline(...
[ "sys.stdin.readline" ]
[((305, 321), 'sys.stdin.readline', 'stdin.readline', ([], {}), '()\n', (319, 321), False, 'from sys import stdin, stdout\n'), ((421, 437), 'sys.stdin.readline', 'stdin.readline', ([], {}), '()\n', (435, 437), False, 'from sys import stdin, stdout\n')]
# Copyright (c) <NAME>, 2015 # See LICENSE for details. import os from subprocess import call from textwrap import dedent from twisted.trial.unittest import TestCase from click.testing import CliRunner from ..build import _main from .._shell import cli def setup_simple_project(): with open("pyproject.toml", "w...
[ "textwrap.dedent", "os.path.exists", "os.listdir", "click.testing.CliRunner", "os.path.isfile", "subprocess.call", "os.mkdir" ]
[((391, 406), 'os.mkdir', 'os.mkdir', (['"""foo"""'], {}), "('foo')\n", (399, 406), False, 'import os\n'), ((498, 527), 'os.mkdir', 'os.mkdir', (['"""foo/newsfragments"""'], {}), "('foo/newsfragments')\n", (506, 527), False, 'import os\n'), ((630, 641), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (639, 64...
# -*- coding: utf-8 -*- # Copyright (c) 2016-2017, <NAME>, <NAME> and <NAME> # All rights reserved. # This file is part of the PyBioMed. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the PyBioMed source tree. """ The script is used f...
[ "PyBioMed.PyInteraction.PyInteraction.CalculateInteraction3", "PyBioMed.PyMolecule.moe.GetMOE", "PyBioMed.PyProtein.CTD.CalculateCTD", "rdkit.Chem.MolFromSmiles", "PyBioMed.PyInteraction.PyInteraction.CalculateInteraction1", "PyBioMed.PyDNA.PyDNAac.GetTCC", "PyBioMed.PyInteraction.PyInteraction.Calculat...
[((861, 968), 'PyBioMed.PyDNA.PyDNAac.GetTCC', 'PyDNAac.GetTCC', (['"""GACTGAACTGCACTTTGGTTTCATATTATTTGCTC"""'], {'phyche_index': "['Dnase I', 'Nucleosome', 'MW-kg']"}), "('GACTGAACTGCACTTTGGTTTCATATTATTTGCTC', phyche_index=[\n 'Dnase I', 'Nucleosome', 'MW-kg'])\n", (875, 968), False, 'from PyBioMed.PyDNA import PyD...