code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
"""Classes and functions for testing the behavior of both and VisualNFAs.""" from visual_automata.fa.nfa import VisualNFA class TestFA(object): """A test class for testing all finite automata.""" def setup(self): """Reset test automata before every test function.""" # NFA which matches stri...
[ "visual_automata.fa.nfa.VisualNFA" ]
[((425, 627), 'visual_automata.fa.nfa.VisualNFA', 'VisualNFA', ([], {'states': "{'q0', 'q1', 'q2'}", 'input_symbols': "{'a', 'b'}", 'transitions': "{'q0': {'a': {'q1'}}, 'q1': {'a': {'q1'}, '': {'q2'}}, 'q2': {'b': {'q0'}}}", 'initial_state': '"""q0"""', 'final_states': "{'q1'}"}), "(states={'q0', 'q1', 'q2'}, input_sy...
import open3d as o3d import numpy as np import sys, os import matplotlib.pyplot as plt import cv2 import torch import glob import copy import mathutils from PIL import Image from pytorch3d.loss import chamfer_distance from tk3dv.nocstools.aligning import estimateSimilarityUmeyama import math from tqdm import tqdm def ...
[ "mathutils.Matrix", "numpy.arccos", "cv2.imshow", "numpy.array", "cv2.destroyAllWindows", "numpy.linalg.norm", "copy.deepcopy", "numpy.mean", "numpy.reshape", "open3d.utility.Vector2iVector", "numpy.asarray", "numpy.concatenate", "open3d.geometry.TriangleMesh.create_coordinate_frame", "num...
[((396, 417), 'copy.deepcopy', 'copy.deepcopy', (['source'], {}), '(source)\n', (409, 417), False, 'import copy\n'), ((436, 457), 'copy.deepcopy', 'copy.deepcopy', (['target'], {}), '(target)\n', (449, 457), False, 'import copy\n'), ((610, 671), 'open3d.visualization.draw_geometries', 'o3d.visualization.draw_geometries...
""" examine performance of image collection for 3 cameras. it is implied that data for all 3 cameras is available. input: dataset name 'black level all', 'black level analog', 'black level digital', 'exposure time', 'frameIDs', 'gain', 'image height', 'image width', 'images', 'temperature' , 'time', 'timestamps_came...
[ "matplotlib.pyplot.plot", "numpy.diff", "h5py.File", "os.path.split", "matplotlib.pyplot.figure", "matplotlib.pyplot.ion" ]
[((521, 552), 'os.path.split', 'os.path.split', (['dataset_filename'], {}), '(dataset_filename)\n', (534, 552), False, 'import os\n'), ((818, 827), 'matplotlib.pyplot.ion', 'plt.ion', ([], {}), '()\n', (825, 827), True, 'from matplotlib import pyplot as plt\n'), ((828, 840), 'matplotlib.pyplot.figure', 'plt.figure', ([...
# -*- coding: utf-8 -*- """ serve.py :copyright: (c) 2017 by <NAME>. :license: see LICENSE for details. """ import cherrypy from nse_scraper.app import App from nse_scraper.utils import fp if __name__ == '__main__': app = App() config = { '/static': { 'tools.staticdir.on': Tr...
[ "cherrypy.tree.mount", "cherrypy.engine.block", "cherrypy.engine.start", "nse_scraper.app.App", "nse_scraper.utils.fp" ]
[((242, 247), 'nse_scraper.app.App', 'App', ([], {}), '()\n', (245, 247), False, 'from nse_scraper.app import App\n'), ((393, 454), 'cherrypy.tree.mount', 'cherrypy.tree.mount', ([], {'root': 'app', 'script_name': '"""/"""', 'config': 'config'}), "(root=app, script_name='/', config=config)\n", (412, 454), False, 'impor...
import unittest import os.path import numpy as np import numpy.lib.recfunctions as rfn from geodepy.convert import (hp2dec, dec2hp, rect2polar, polar2rect, grid2geo, llh2xyz, DMSAngle) from geodepy.geodesy import vincinv, vincdir, vincinv_utm, vincdir_utm, enu2xyz, xyz2enu class TestGeode...
[ "geodepy.convert.DMSAngle", "geodepy.convert.polar2rect", "geodepy.geodesy.vincdir_utm", "geodepy.geodesy.xyz2enu", "numpy.roll", "geodepy.convert.llh2xyz", "geodepy.convert.grid2geo", "geodepy.geodesy.enu2xyz", "geodepy.geodesy.vincinv_utm", "geodepy.convert.rect2polar", "numpy.lib.recfunctions...
[((11049, 11064), 'unittest.main', 'unittest.main', ([], {}), '()\n', (11062, 11064), False, 'import unittest\n'), ((588, 647), 'geodepy.convert.grid2geo', 'grid2geo', (['MOBS_MGA2020[0]', 'MOBS_MGA2020[1]', 'MOBS_MGA2020[2]'], {}), '(MOBS_MGA2020[0], MOBS_MGA2020[1], MOBS_MGA2020[2])\n', (596, 647), False, 'from geode...
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\careers\missions\mission_objective_data.py # Compiled at: 2020-08-11 00:03:52 # Size of source mod 2...
[ "distributor.rollback.ProtocolBufferRollback", "sims4.tuning.tunable.TunableLotDescription", "services.current_zone_id", "world.lot.get_lot_id_from_instance_id", "situations.situation_guest_list.SituationGuestList", "situations.situation.Situation.TunableReference", "services.get_zone_situation_manager"...
[((1301, 1606), 'event_testing.weighted_objectives.WeightedObjectives', 'WeightedObjectives', ([], {'description': '"""\n A list of tested, weighted objectives. A set of tests are run against \n the active Sim. If the tests pass, this objective and the weight are \n added to a list for ...
from datetime import datetime from typing import TYPE_CHECKING from sqlalchemy.sql.schema import PrimaryKeyConstraint, UniqueConstraint from app.db.base_class import Base from sqlalchemy import Column, DateTime, ForeignKey, Integer, Boolean, String, Text from sqlalchemy.orm import relationship if TYPE_CHECKING: ...
[ "sqlalchemy.orm.relationship", "datetime.datetime.utcnow", "sqlalchemy.Boolean", "sqlalchemy.ForeignKey", "sqlalchemy.Column" ]
[((487, 532), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)', 'index': '(True)'}), '(Integer, primary_key=True, index=True)\n', (493, 532), False, 'from sqlalchemy import Column, DateTime, ForeignKey, Integer, Boolean, String, Text\n'), ((545, 571), 'sqlalchemy.Column', 'Column', (['String'], {'i...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' @File : add_config.py @Author: <NAME> @Date : 2020/8/30 21:50 @E-mail : <EMAIL> or <EMAIL> ''' from fastreid.config import CfgNode as CN def add_interpretation_config(cfg): _C = cfg _C.DATALOADER.ATT_RESAMPLE = False _C.VISUAL = CN() _C.VISU...
[ "fastreid.config.CfgNode" ]
[((304, 308), 'fastreid.config.CfgNode', 'CN', ([], {}), '()\n', (306, 308), True, 'from fastreid.config import CfgNode as CN\n'), ((391, 395), 'fastreid.config.CfgNode', 'CN', ([], {}), '()\n', (393, 395), True, 'from fastreid.config import CfgNode as CN\n'), ((595, 599), 'fastreid.config.CfgNode', 'CN', ([], {}), '()...
import numpy import math from mta.dataset import Dataset from copy import copy class Profile: @classmethod def rating_dist(self, dataset, stacks=11, stack_range=1000): rating_list = numpy.array(dataset.ratings.to_list())[:,2].flat dist = self._make_dist(rating_list, stacks, stack_range...
[ "numpy.zeros", "math.floor" ]
[((578, 613), 'numpy.zeros', 'numpy.zeros', (['item_size'], {'dtype': 'float'}), '(item_size, dtype=float)\n', (589, 613), False, 'import numpy\n'), ((1224, 1257), 'numpy.zeros', 'numpy.zeros', (['user_size'], {'dtype': 'int'}), '(user_size, dtype=int)\n', (1235, 1257), False, 'import numpy\n'), ((1861, 1910), 'numpy.z...
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: ...
[ "os.path.join", "os.path.dirname", "setuptools.setup" ]
[((352, 982), 'setuptools.setup', 'setup', ([], {'name': '"""pullyou"""', 'version': '"""1.0.2"""', 'description': '"""A tool for opening the PR associated with a given commit"""', 'long_description': 'long_description', 'url': '"""https://github.com/macrael/pullyou"""', 'author': '"""<NAME>"""', 'author_email': '"""<E...
from flask import g from flask_httpauth import HTTPBasicAuth, HTTPTokenAuth from app import ApiException from app.models import ApiToken, User basic_auth = HTTPBasicAuth() token_auth = HTTPTokenAuth() @basic_auth.verify_password def verify_password(email, password): user = User.query.filter_by(email=email).firs...
[ "flask_httpauth.HTTPBasicAuth", "app.models.ApiToken.query.filter_by", "flask_httpauth.HTTPTokenAuth", "app.models.User.query.filter_by", "app.ApiException" ]
[((158, 173), 'flask_httpauth.HTTPBasicAuth', 'HTTPBasicAuth', ([], {}), '()\n', (171, 173), False, 'from flask_httpauth import HTTPBasicAuth, HTTPTokenAuth\n'), ((187, 202), 'flask_httpauth.HTTPTokenAuth', 'HTTPTokenAuth', ([], {}), '()\n', (200, 202), False, 'from flask_httpauth import HTTPBasicAuth, HTTPTokenAuth\n'...
# coding: utf-8 import errno import socketserver import os # Copyright 2022 <NAME>, <NAME>, <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
[ "os.path.isfile", "socketserver.TCPServer", "os.path.isdir", "os.getcwd" ]
[((6295, 6344), 'socketserver.TCPServer', 'socketserver.TCPServer', (['(HOST, PORT)', 'MyWebServer'], {}), '((HOST, PORT), MyWebServer)\n', (6317, 6344), False, 'import socketserver\n'), ((1922, 1933), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (1931, 1933), False, 'import os\n'), ((2337, 2356), 'os.path.isdir', 'os.p...
import os.path as osp import pytest from run import load_config def test_runner(): dir = osp.dirname(__file__) cfg_path = osp.join(dir, 'configs', 'config_for_test.py') with pytest.raises(ValueError): load_config(cfg_path, []) cfg = load_config(cfg_path, ['--b', "123"]) assert cfg.a ==...
[ "run.load_config", "os.path.dirname", "os.path.join", "pytest.raises" ]
[((97, 118), 'os.path.dirname', 'osp.dirname', (['__file__'], {}), '(__file__)\n', (108, 118), True, 'import os.path as osp\n'), ((134, 180), 'os.path.join', 'osp.join', (['dir', '"""configs"""', '"""config_for_test.py"""'], {}), "(dir, 'configs', 'config_for_test.py')\n", (142, 180), True, 'import os.path as osp\n'), ...
# ----------------------------------------------------------- # This example presents the code used in the advanced example # guide in the pyWATTS documentation. # ----------------------------------------------------------- import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.preprocessin...
[ "pywatts.modules.LinearInterpolater", "pywatts.core.pipeline.Pipeline", "pandas.read_csv", "pywatts.callbacks.LinePlotCallback", "pandas.Timedelta", "pywatts.callbacks.CSVCallback", "pywatts.modules.RmseCalculator", "sklearn.preprocessing.StandardScaler", "pywatts.core.pipeline.Pipeline.from_folder"...
[((1040, 1081), 'pywatts.core.pipeline.Pipeline', 'Pipeline', ([], {'path': '"""../results/preprocessing"""'}), "(path='../results/preprocessing')\n", (1048, 1081), False, 'from pywatts.core.pipeline import Pipeline\n'), ((3557, 3676), 'pandas.read_csv', 'pd.read_csv', (['"""../data/getting_started_data.csv"""'], {'par...
import json import os import argparse from object_detection.utils import label_map_util def get_args(): parser = argparse.ArgumentParser(description='Removes all annotations from source file, which are not listed in labels file') parser.add_argument('-s', '--source', required=True, ...
[ "argparse.ArgumentParser", "os.path.isfile", "json.load", "object_detection.utils.label_map_util.get_label_map_dict", "json.dump" ]
[((118, 244), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Removes all annotations from source file, which are not listed in labels file"""'}), "(description=\n 'Removes all annotations from source file, which are not listed in labels file'\n )\n", (141, 244), False, 'import argp...
from codewars.parentheses import valid_parentheses def test_valid_parentheses() -> None: assert not valid_parentheses(" (") assert not valid_parentheses(")test") assert valid_parentheses("") assert not valid_parentheses("hi())(") assert valid_parentheses("hi(hi)()")
[ "codewars.parentheses.valid_parentheses" ]
[((184, 205), 'codewars.parentheses.valid_parentheses', 'valid_parentheses', (['""""""'], {}), "('')\n", (201, 205), False, 'from codewars.parentheses import valid_parentheses\n'), ((260, 289), 'codewars.parentheses.valid_parentheses', 'valid_parentheses', (['"""hi(hi)()"""'], {}), "('hi(hi)()')\n", (277, 289), False, ...
import unittest import warnings from gmplot.utility import StringIO, _format_LatLng from gmplot.writer import _Writer from gmplot.drawables.route import _Route from gmplot.google_map_plotter import GoogleMapPlotter class GMPlotTest(unittest.TestCase): def test_format_LatLng(self): self.assertEqual(_format_...
[ "gmplot.utility.StringIO", "warnings.catch_warnings", "gmplot.google_map_plotter.GoogleMapPlotter", "gmplot.utility._format_LatLng", "gmplot.writer._Writer", "warnings.simplefilter", "gmplot.drawables.route._Route" ]
[((875, 936), 'gmplot.drawables.route._Route', '_Route', (['(37.770776, -122.461689)', '(37.780776, -122.461689)', '(6)'], {}), '((37.770776, -122.461689), (37.780776, -122.461689), 6)\n', (881, 936), False, 'from gmplot.drawables.route import _Route\n'), ((1094, 1198), 'gmplot.drawables.route._Route', '_Route', (['(37...
from app.api.helpers import Service from app.models import DomainCriteria from app import db from sqlalchemy.orm import raiseload class DomainCriteriaService(Service): __model__ = DomainCriteria def __init__(self, *args, **kwargs): super(DomainCriteriaService, self).__init__(*args, **kwargs) def...
[ "sqlalchemy.orm.raiseload", "app.models.DomainCriteria.id.asc" ]
[((535, 558), 'app.models.DomainCriteria.id.asc', 'DomainCriteria.id.asc', ([], {}), '()\n', (556, 558), False, 'from app.models import DomainCriteria\n'), ((484, 498), 'sqlalchemy.orm.raiseload', 'raiseload', (['"""*"""'], {}), "('*')\n", (493, 498), False, 'from sqlalchemy.orm import raiseload\n')]
import argparse from pathlib import Path import shutil def parse_path(path_string: str) -> Path: path_string = Path(path_string).resolve() return path_string if __name__ == '__main__': save_help = 'File path to store the augmented training data and the '\ 'original validation and test data...
[ "shutil.copy", "argparse.ArgumentParser", "pathlib.Path" ]
[((335, 360), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (358, 360), False, 'import argparse\n'), ((866, 897), 'pathlib.Path', 'Path', (['save_folder', '"""train.json"""'], {}), "(save_folder, 'train.json')\n", (870, 897), False, 'from pathlib import Path\n'), ((902, 951), 'shutil.copy', 's...
import pandas as pd df = pd.read_csv('/Users/dyuwan/Desktop/ARDOS Datasets/songdata.csv') check= df['mood']==0 df_0=df[check] df_0.to_csv('/Users/dyuwan/Downloads/happysongs.csv') def song(): k=df.sample(1)[['artist','song', 'link']] s=k.to_dict('list') return s
[ "pandas.read_csv" ]
[((25, 89), 'pandas.read_csv', 'pd.read_csv', (['"""/Users/dyuwan/Desktop/ARDOS Datasets/songdata.csv"""'], {}), "('/Users/dyuwan/Desktop/ARDOS Datasets/songdata.csv')\n", (36, 89), True, 'import pandas as pd\n')]
import json from datetime import datetime from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker import financespy.account as account from financespy.memory_backend import MemoryBackend from financespy.sql_backend import SQLBackend from fin...
[ "financespy.sql_backend.transaction_class", "sqlalchemy.orm.sessionmaker", "financespy.sql_backend.account_class", "datetime.datetime.strptime", "sqlalchemy.create_engine", "json.dumps", "financespy.account.Account", "financespy.sql_backend.read_account_metadata", "financespy.sql_backend.SQLBackend"...
[((898, 916), 'sqlalchemy.ext.declarative.declarative_base', 'declarative_base', ([], {}), '()\n', (914, 916), False, 'from sqlalchemy.ext.declarative import declarative_base\n'), ((922, 937), 'financespy.sql_backend.db_object', 'db_object', (['base'], {}), '(base)\n', (931, 937), False, 'from financespy.sql_backend im...
from setuptools import setup setup(name='jtnn', version='0.1.1', url='https://github.com/maxmed/icml18-jtnn', license='MIT', packages=['jtnn', 'jtnn.bo', 'jtnn.jtnn', 'jtnn.molvae', 'jtnn.molopt'], install_requires=[ 'joblib==0.12.5', 'numpy==1.15.2', 'torch=...
[ "setuptools.setup" ]
[((30, 430), 'setuptools.setup', 'setup', ([], {'name': '"""jtnn"""', 'version': '"""0.1.1"""', 'url': '"""https://github.com/maxmed/icml18-jtnn"""', 'license': '"""MIT"""', 'packages': "['jtnn', 'jtnn.bo', 'jtnn.jtnn', 'jtnn.molvae', 'jtnn.molopt']", 'install_requires': "['joblib==0.12.5', 'numpy==1.15.2', 'torch==0.3...
import os import sys import argparse import itertools import numpy as np import pandas as pd import nipype from nipype import logging from nipype.pipeline.engine import Workflow, Node, MapNode from nipype.interfaces import fsl, spm, freesurfer from nipype.interfaces.io import SelectFiles, DataSink from nipype.interfac...
[ "nipype.pipeline.engine.Workflow", "nipype.interfaces.spm.EstimateModel", "nipype.interfaces.spm.EstimateContrast", "pandas.read_csv", "nipype.interfaces.spm.Level1Design", "nipype.algorithms.modelgen.SpecifySPMModel", "os.path.join", "nipype.interfaces.utility.IdentityInterface", "nipype.interfaces...
[((723, 744), 'pandas.read_csv', 'pd.read_csv', (['protocol'], {}), '(protocol)\n', (734, 744), True, 'import pandas as pd\n'), ((4376, 4396), 'nipype.pipeline.engine.Workflow', 'Workflow', ([], {'name': '"""glm"""'}), "(name='glm')\n", (4384, 4396), False, 'from nipype.pipeline.engine import Workflow, Node, MapNode\n'...
#!/usr/bin/python3 # -*- mode: python; coding: utf-8 -*- """Sync from origin.""" import logging import re from dsapy import app from jflow import branch from jflow import config from jflow import git from jflow import green from jflow import run _logger = logging.getLogger(__name__) class Error(Exception): ...
[ "logging.getLogger" ]
[((262, 289), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (279, 289), False, 'import logging\n')]
from setuptools import setup setup( name='bigmuddy', version='0.1', description='Big Muddy Railroad IO Utilities', author='<NAME>', # packages=['bigmuddy'], include_package_data=True, install_requires=[ 'click', 'RPi.GPIO', ], )
[ "setuptools.setup" ]
[((30, 207), 'setuptools.setup', 'setup', ([], {'name': '"""bigmuddy"""', 'version': '"""0.1"""', 'description': '"""Big Muddy Railroad IO Utilities"""', 'author': '"""<NAME>"""', 'include_package_data': '(True)', 'install_requires': "['click', 'RPi.GPIO']"}), "(name='bigmuddy', version='0.1', description=\n 'Big Mu...
import graphene from django.contrib.auth import get_user_model from graphene_django import DjangoObjectType from graphql_extensions.auth.decorators import (login_required, staff_member_required) from ..models import Analysis, Dataset, File, User from .dataset import Data...
[ "graphene.Field", "graphene.Int", "graphene.List", "graphene.String" ]
[((437, 464), 'graphene.List', 'graphene.List', (['NotebookType'], {}), '(NotebookType)\n', (450, 464), False, 'import graphene\n'), ((648, 675), 'graphene.List', 'graphene.List', (['AnalysisType'], {}), '(AnalysisType)\n', (661, 675), False, 'import graphene\n'), ((1440, 1468), 'graphene.Field', 'graphene.Field', (['A...
# -*- coding: utf-8 -*- """ Plot the effective index and group index curves for a given waveguide CML. @author: <NAME> """ import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np #mpl.style.use('ggplot') # set plotting style fname = 'wg_strip_o_mm_2000' # data to be loaded npts = 10 # number ...
[ "numpy.poly1d", "numpy.linspace", "matplotlib.pyplot.figure" ]
[((509, 537), 'numpy.poly1d', 'np.poly1d', (['coefficients_neff'], {}), '(coefficients_neff)\n', (518, 537), True, 'import numpy as np\n'), ((594, 620), 'numpy.poly1d', 'np.poly1d', (['coefficients_ng'], {}), '(coefficients_ng)\n', (603, 620), True, 'import numpy as np\n'), ((629, 676), 'numpy.linspace', 'np.linspace',...
# Generated by Django 2.1.7 on 2020-02-19 12:17 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('roboPortal', '0004_auto_20200219_1745'), ] operations = [ migrations.AlterField( model_name='problem_statement', nam...
[ "django.db.models.TextField" ]
[((355, 401), 'django.db.models.TextField', 'models.TextField', ([], {'default': '""""""', 'max_length': '(10000)'}), "(default='', max_length=10000)\n", (371, 401), False, 'from django.db import migrations, models\n'), ((540, 574), 'django.db.models.TextField', 'models.TextField', ([], {'max_length': '(10000)'}), '(ma...
import argparse import json import math import matplotlib.pyplot import numpy import os import pandas import re import skimage.io import skimage.transform import torch import torch.utils.data import torch.utils.model_zoo import tqdm blurb = 'Fashion Brain: Library of trained deep learning models (D2.5)' def conv3x...
[ "torch.nn.ReLU", "torch.nn.init.constant_", "torch.nn.Sequential", "torch.LongTensor", "torch.utils.model_zoo.load_url", "torch.cuda.is_available", "torch.nn.AvgPool2d", "torch.nn.Module.__init__", "re.search", "torch.nn.BatchNorm2d", "numpy.mean", "argparse.ArgumentParser", "torch.nn.init.k...
[((406, 501), 'torch.nn.Conv2d', 'torch.nn.Conv2d', (['in_planes', 'out_planes'], {'kernel_size': '(3)', 'stride': 'stride', 'padding': '(1)', 'bias': '(False)'}), '(in_planes, out_planes, kernel_size=3, stride=stride,\n padding=1, bias=False)\n', (421, 501), False, 'import torch\n'), ((12610, 12636), 'pandas.concat...
"""Handle sending a read request for ALDB records.""" import logging from ...address import Address from ...topics import EXTENDED_GET_SET_2 from .. import ack_handler from .direct_command import DirectCommandHandlerBase _LOGGER = logging.getLogger(__name__) class ExtendedSet2Command(DirectCommandHandlerBase): ...
[ "logging.getLogger" ]
[((233, 260), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (250, 260), False, 'import logging\n')]
import numpy as np import theano.tensor as T from pylearn2.utils import wraps from pylearn2.utils import sharedX from pylearn2.models.mlp import Linear from pylearn2.models.mlp import Layer from theano.compat.python2x import OrderedDict class RandomfiedLinear(Linear): """ Like ReLU, only with randomized lower ...
[ "theano.tensor.gt", "pylearn2.utils.wraps", "theano.compat.python2x.OrderedDict", "pylearn2.utils.sharedX" ]
[((605, 623), 'pylearn2.utils.wraps', 'wraps', (['Layer.fprop'], {}), '(Layer.fprop)\n', (610, 623), False, 'from pylearn2.utils import wraps\n'), ((823, 840), 'pylearn2.utils.wraps', 'wraps', (['Layer.cost'], {}), '(Layer.cost)\n', (828, 840), False, 'from pylearn2.utils import wraps\n'), ((920, 948), 'pylearn2.utils....
#!/usr/bin/env python # Copyright 2020 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Reports binary size metrics for LaCrOS build artifacts. More information at //docs/speed/binary_size/metrics.md. """ import argpars...
[ "os.path.exists", "os.path.getsize", "sys.path.insert", "argparse.ArgumentParser", "os.makedirs", "subprocess.Popen", "os.walk", "os.path.join", "os.path.isfile", "sys.path.pop", "os.path.dirname", "os.path.isdir", "tracing.value.convert_chart_json.ConvertChartJson", "logging.critical", ...
[((909, 972), 'os.path.join', 'os.path.join', (['DIR_SOURCE_ROOT', '"""build"""', '"""util"""', '"""lib"""', '"""common"""'], {}), "(DIR_SOURCE_ROOT, 'build', 'util', 'lib', 'common')\n", (921, 972), False, 'import os\n'), ((1022, 1089), 'os.path.join', 'os.path.join', (['DIR_SOURCE_ROOT', '"""third_party"""', '"""cata...
# coding: utf-8 # # ### CREATED BY KARMAZ # ### FUNCTIONS # # 1. CHECK IF X-Original-Url AND X-Rewrite-Url IS HANDLED BY THE SERVER # ### import sys, getopt, requests, urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) from tqdm import tqdm ### OPTIONS --- argument_list = sys.argv[1:] short_o...
[ "urllib3.disable_warnings", "getopt.getopt", "tqdm.tqdm", "sys.exit" ]
[((177, 244), 'urllib3.disable_warnings', 'urllib3.disable_warnings', (['urllib3.exceptions.InsecureRequestWarning'], {}), '(urllib3.exceptions.InsecureRequestWarning)\n', (201, 244), False, 'import sys, getopt, requests, urllib3\n'), ((437, 494), 'getopt.getopt', 'getopt.getopt', (['argument_list', 'short_options', 'l...
"""Load an existing vtkStructuredGrid and draw the streamlines of the velocity field""" from vedo import * ######################## vtk import vtk # Read the data and specify which scalars and vectors to read. pl3d = vtk.vtkMultiBlockPLOT3DReader() fpath = download(dataurl+"combxyz.bin") pl3d.SetXYZFileName(fpath) fpa...
[ "vtk.vtkMultiBlockPLOT3DReader" ]
[((218, 249), 'vtk.vtkMultiBlockPLOT3DReader', 'vtk.vtkMultiBlockPLOT3DReader', ([], {}), '()\n', (247, 249), False, 'import vtk\n')]
import numpy as np from mlflow import log_metric, log_param, set_experiment, active_run, log_metrics from yaaf import mkdir, flatten_dict class MLFlowLogger: def __init__(self, params, metrics=None, experiment_name=None): if experiment_name is not None: set_experiment(f"{experiment_name}") self...
[ "yaaf.flatten_dict", "mlflow.active_run", "mlflow.log_metric", "mlflow.set_experiment", "mlflow.log_param", "yaaf.mkdir", "mlflow.log_metrics" ]
[((482, 494), 'mlflow.active_run', 'active_run', ([], {}), '()\n', (492, 494), False, 'from mlflow import log_metric, log_param, set_experiment, active_run, log_metrics\n'), ((770, 821), 'mlflow.log_metric', 'log_metric', (['"""timestep"""', 'self._step'], {'step': 'self._step'}), "('timestep', self._step, step=self._s...
from typing import List, Dict, Tuple from aocpy import BaseChallenge, foldl Point = Tuple[int, int] Cave = Dict[Point, int] Basin = List[Point] def parse(instr: str) -> Cave: o = {} for y, line in enumerate(instr.strip().splitlines()): for x, digit in enumerate(line): o[(x, y)] = int(dig...
[ "os.makedirs", "PIL.Image.new", "aocpy.vis.SaveManager", "os.path.join", "shutil.rmtree", "os.system" ]
[((3498, 3557), 'PIL.Image.new', 'Image.new', (['"""RGB"""', '(max_x + 1, max_y + 1)', 'COLOUR_BACKGROUND'], {}), "('RGB', (max_x + 1, max_y + 1), COLOUR_BACKGROUND)\n", (3507, 3557), False, 'from PIL import Image, ImageDraw\n'), ((3578, 3613), 'os.path.join', 'os.path.join', (['outputDir', '"""vis-temp"""'], {}), "(ou...
import logging from django.core.management.base import BaseCommand, CommandError from classroom.tasks import create_issues class Command (BaseCommand): help = 'Create Github Issues for Assignment' def add_arguments(self, parser): parser.add_argument('ass_id', nargs='+', type=int) def handle(self, *args,...
[ "logging.getLogger", "classroom.tasks.create_issues" ]
[((351, 372), 'logging.getLogger', 'logging.getLogger', (['""""""'], {}), "('')\n", (368, 372), False, 'import logging\n'), ((461, 482), 'classroom.tasks.create_issues', 'create_issues', (['ass_id'], {}), '(ass_id)\n', (474, 482), False, 'from classroom.tasks import create_issues\n')]
#!/usr/bin/python3 # raspberry pi nrf24l01 hub # more details at http://blog.riyas.org # Credits to python port of nrf24l01, <NAME> & maniacbugs original c library import time from time import gmtime, strftime, sleep import paho.mqtt.client as mqtt import threading import queue import logging import os, struct, anyco...
[ "logging.basicConfig", "anyconfig.load", "threading.Thread.__init__", "logging.debug", "argparse.ArgumentParser", "paho.mqtt.client.Client", "os.path.isfile", "anyconfig.container", "struct.unpack", "nrf24_serial.Proxy", "queue.Queue", "logging.error" ]
[((638, 701), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""My simple Python service"""'}), "(description='My simple Python service')\n", (661, 701), False, 'import argparse\n'), ((1498, 1516), 'nrf24_serial.Proxy', 'Proxy', (['args.serial'], {}), '(args.serial)\n', (1503, 1516), False,...
import json from panini import app as panini_app app = panini_app.App( service_name="request_for_location_history", host="127.0.0.1", port=4222, ) log = app.logger def _process(subject, message): print(f'processed {subject}: {message}') @app.listen('process_aircraft_location_history') async def proc...
[ "panini.app.App" ]
[((56, 149), 'panini.app.App', 'panini_app.App', ([], {'service_name': '"""request_for_location_history"""', 'host': '"""127.0.0.1"""', 'port': '(4222)'}), "(service_name='request_for_location_history', host=\n '127.0.0.1', port=4222)\n", (70, 149), True, 'from panini import app as panini_app\n')]
#!/usr/bin/env python3 import argparse from os import path import httplib2 from oauth2client.file import Storage from oauth2client.client import flow_from_clientsecrets from oauth2client import tools print("""This script takes a Google OAuth Client file `client_secret.json`, and uses it to generate an OAuth Credenti...
[ "argparse.ArgumentParser", "oauth2client.client.flow_from_clientsecrets", "os.path.realpath", "oauth2client.file.Storage", "oauth2client.tools.run_flow" ]
[((1529, 1567), 'oauth2client.file.Storage', 'Storage', (['OUTPUT_OAUTH_CREDENTIALS_FILE'], {}), '(OUTPUT_OAUTH_CREDENTIALS_FILE)\n', (1536, 1567), False, 'from oauth2client.file import Storage\n'), ((1648, 1705), 'oauth2client.client.flow_from_clientsecrets', 'flow_from_clientsecrets', (['INPUT_CLIENT_SECRET_FILE', 'S...
import unittest import os import logging from flask_testing import LiveServerTestCase from selenium import webdriver from selenium.webdriver.common.keys import Keys import selenium.webdriver.support.ui as ui from webapp.routes import create_app class TestBase(LiveServerTestCase): def create_app(self): ...
[ "logging.basicConfig", "selenium.webdriver.support.ui.WebDriverWait", "webapp.routes.create_app", "selenium.webdriver.Firefox", "os.path.join", "os.path.realpath", "unittest.main" ]
[((2296, 2311), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2309, 2311), False, 'import unittest\n'), ((320, 360), 'logging.basicConfig', 'logging.basicConfig', ([], {'level': 'logging.ERROR'}), '(level=logging.ERROR)\n', (339, 360), False, 'import logging\n'), ((628, 651), 'webapp.routes.create_app', 'create_...
"""Common verification functions for ARP""" # Python import logging import operator # Genie from genie.utils.timeout import Timeout from genie.metaparser.util.exceptions import SchemaEmptyParserError from genie.utils import Dq log = logging.getLogger(__name__) def verify_arp_interface_exists(device, expected_inter...
[ "logging.getLogger", "genie.utils.timeout.Timeout", "operator.truth" ]
[((236, 263), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (253, 263), False, 'import logging\n'), ((883, 916), 'genie.utils.timeout.Timeout', 'Timeout', (['max_time', 'check_interval'], {}), '(max_time, check_interval)\n', (890, 916), False, 'from genie.utils.timeout import Timeout\n')...
import codecs import csv import logging from io import StringIO logger = logging.getLogger(__name__) class CsvUnicodeWriter(object): def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds): """ CSV writer. Which will write rows to CSV file "f", which is encoded in the given en...
[ "logging.getLogger", "codecs.getreader", "csv.writer", "codecs.getincrementalencoder", "io.StringIO", "csv.reader" ]
[((74, 101), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (91, 101), False, 'import logging\n'), ((398, 408), 'io.StringIO', 'StringIO', ([], {}), '()\n', (406, 408), False, 'from io import StringIO\n'), ((431, 478), 'csv.writer', 'csv.writer', (['self.queue'], {'dialect': 'dialect'}), ...
"""Simple functions to draw RRT in pygame """ from ..space import EmptySpace, WallSpace import pygame as pg def intify(vect): return list(map(int, vect)) """Helper functions to draw the space and tree""" def draw_space(surface, space, goal_color=pg.Color('green'), wall_color=pg.Color('black')...
[ "pygame.draw.circle", "pygame.event.pump", "pygame.draw.lines", "pygame.event.get", "pygame.display.flip", "pygame.Color", "pygame.Rect" ]
[((258, 275), 'pygame.Color', 'pg.Color', (['"""green"""'], {}), "('green')\n", (266, 275), True, 'import pygame as pg\n'), ((303, 320), 'pygame.Color', 'pg.Color', (['"""black"""'], {}), "('black')\n", (311, 320), True, 'import pygame as pg\n'), ((1031, 1051), 'pygame.Color', 'pg.Color', (['"""darkgrey"""'], {}), "('d...
import json import boto3 import tempfile import zipfile import uuid import time sc = boto3.client("servicecatalog") code_pipeline = boto3.client('codepipeline') s3 = boto3.client("s3") sts = boto3.client("sts") ssm = boto3.client("ssm") def get_file(artifact, f_name): bucket = artifact["location"]["s3Location"]["...
[ "json.loads", "boto3.client", "zipfile.ZipFile", "uuid.uuid4", "tempfile.NamedTemporaryFile" ]
[((86, 116), 'boto3.client', 'boto3.client', (['"""servicecatalog"""'], {}), "('servicecatalog')\n", (98, 116), False, 'import boto3\n'), ((133, 161), 'boto3.client', 'boto3.client', (['"""codepipeline"""'], {}), "('codepipeline')\n", (145, 161), False, 'import boto3\n'), ((167, 185), 'boto3.client', 'boto3.client', ([...
import pytest from django.core.cache import cache from rest_framework.test import APIClient from environments.identities.models import Identity from environments.identities.traits.models import Trait from environments.models import Environment from features.feature_types import MULTIVARIATE from features.models import...
[ "segments.models.Condition.objects.create", "django.core.cache.cache.clear", "users.models.FFAdminUser.objects.make_random_password", "environments.identities.models.Identity.objects.create", "environments.models.Environment.objects.create", "segments.models.Segment.objects.create", "rest_framework.test...
[((686, 702), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (700, 702), False, 'import pytest\n'), ((826, 842), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (840, 842), False, 'import pytest\n'), ((1016, 1032), 'pytest.fixture', 'pytest.fixture', ([], {}), '()\n', (1030, 1032), False, 'import pytest\n'...
# -*- coding: utf-8 -*- from __future__ import print_function import logging if __name__ == '__main__': logging.basicConfig() _log = logging.getLogger(__name__) import unittest import qq0196 as qq import qu0196 as qu import uq0196 as uq import uu0196 as uu import mix from pyxb.utils.domutils import BindingDOMSuppo...
[ "logging.getLogger", "logging.basicConfig", "mix.uue", "pyxb.utils.six.iteritems", "uu0196.elt", "qq0196.elt", "pyxb.utils.domutils.BindingDOMSupport.DeclareNamespace", "mix.elt", "qu0196.elt", "uq0196.elt", "unittest.main", "pyxb.utils.domutils.BindingDOMSupport" ]
[((137, 164), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (154, 164), False, 'import logging\n'), ((351, 405), 'pyxb.utils.domutils.BindingDOMSupport.DeclareNamespace', 'BindingDOMSupport.DeclareNamespace', (['qq.Namespace', '"""qq"""'], {}), "(qq.Namespace, 'qq')\n", (385, 405), False...
# Generated by Django 3.2 on 2022-02-02 11:03 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('finance', '0036_auto_20220202_1101'), ] operations = [ migrations.AlterField( model_name='eventim...
[ "django.db.models.ForeignKey" ]
[((383, 517), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'null': '(True)', 'on_delete': 'django.db.models.deletion.SET_NULL', 'related_name': '"""event_records"""', 'to': '"""finance.transaction"""'}), "(null=True, on_delete=django.db.models.deletion.SET_NULL,\n related_name='event_records', to='finan...
from __future__ import unicode_literals from calendar import monthrange import datetime try: from django.core.urlresolvers import reverse except ImportError: from django.urls import reverse from django.utils.six.moves import xrange from .event_factory import create_event, SetMeUp class BiweeklyRepeatingChu...
[ "datetime.date", "django.urls.reverse" ]
[((7168, 7193), 'datetime.date', 'datetime.date', (['(2014)', '(6)', '(9)'], {}), '(2014, 6, 9)\n', (7181, 7193), False, 'import datetime\n'), ((611, 674), 'django.urls.reverse', 'reverse', (['"""calendar:list"""'], {'kwargs': "{'year': year, 'month': month}"}), "('calendar:list', kwargs={'year': year, 'month': month})...
import fix_paths import common from sqlalchemy import Column, ForeignKey, Integer, String from sqlalchemy.orm import relationship, backref class Hunk(common.Base): __tablename__ = 'hunks' id = Column(Integer, primary_key=True) lines_added = Column(Integer) lines_removed = Column(Integer) file_diff_id = Co...
[ "sqlalchemy.orm.relationship", "sqlalchemy.ForeignKey", "sqlalchemy.Column" ]
[((201, 234), 'sqlalchemy.Column', 'Column', (['Integer'], {'primary_key': '(True)'}), '(Integer, primary_key=True)\n', (207, 234), False, 'from sqlalchemy import Column, ForeignKey, Integer, String\n'), ((251, 266), 'sqlalchemy.Column', 'Column', (['Integer'], {}), '(Integer)\n', (257, 266), False, 'from sqlalchemy im...
# Copyright 2017 Citrix Systems # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
[ "mock.MagicMock", "os_xenapi.client.image.vdi_handler.VdisToTarStream", "mock.Mock", "mock.patch.object", "os_xenapi.client.image.vdi_handler.GenerateImageStream", "mock.call", "os_xenapi.client.image.vdi_handler.AddVhdToTar", "os_xenapi.client.image.vdi_handler.ImageStreamToVDIs" ]
[((1265, 1299), 'mock.patch.object', 'mock.patch.object', (['tarfile', '"""open"""'], {}), "(tarfile, 'open')\n", (1282, 1299), False, 'import mock\n'), ((1305, 1350), 'mock.patch.object', 'mock.patch.object', (['vhd_utils', '"""VHDFileParser"""'], {}), "(vhd_utils, 'VHDFileParser')\n", (1322, 1350), False, 'import moc...
import time from imutils import resize from imutils.video import VideoStream from imutils.video import FPS import cv2 from tqdm import tqdm from app.infrastructure.repositories.detector import HaarcascadeDetector class CameraCapture: def __init__(self) -> None: self.__haarcascade_detector = Haarcascade...
[ "imutils.video.VideoStream", "time.sleep", "imutils.video.FPS", "imutils.resize", "cv2.waitKey", "app.infrastructure.repositories.detector.HaarcascadeDetector" ]
[((309, 330), 'app.infrastructure.repositories.detector.HaarcascadeDetector', 'HaarcascadeDetector', ([], {}), '()\n', (328, 330), False, 'from app.infrastructure.repositories.detector import HaarcascadeDetector\n'), ((434, 450), 'time.sleep', 'time.sleep', (['(0.02)'], {}), '(0.02)\n', (444, 450), False, 'import time\...
from django.http import HttpResponse from django.middleware.csrf import get_token from django.template import Context, RequestContext, Template from django.template.context_processors import csrf from django.views.decorators.csrf import ensure_csrf_cookie def post_form_view(request): """Return a POST form (withou...
[ "django.middleware.csrf.get_token", "django.template.Template", "django.http.HttpResponse", "django.template.RequestContext", "django.template.Context" ]
[((346, 493), 'django.http.HttpResponse', 'HttpResponse', ([], {'content': '"""\n<html><body><h1>¡Unicode!<form method="post"><input type="text"></form></body></html>\n"""', 'mimetype': '"""text/html"""'}), '(content=\n """\n<html><body><h1>¡Unicode!<form method="post"><input type="text"></form></body></html>\n"""\n...
"""Here you can setup and find all needed configurations""" import os from pathlib import Path from dotenv import load_dotenv ENV_PATH = Path("./.env") load_dotenv(dotenv_path=ENV_PATH) class Setting: """ Contains all Settings - Loads from the os env Warning: Do not create your own instance! Im...
[ "dotenv.load_dotenv", "os.getenv", "pathlib.Path" ]
[((139, 153), 'pathlib.Path', 'Path', (['"""./.env"""'], {}), "('./.env')\n", (143, 153), False, 'from pathlib import Path\n'), ((154, 187), 'dotenv.load_dotenv', 'load_dotenv', ([], {'dotenv_path': 'ENV_PATH'}), '(dotenv_path=ENV_PATH)\n', (165, 187), False, 'from dotenv import load_dotenv\n'), ((1060, 1087), 'os.gete...
""" Designed and Developed by- <NAME> https://github.com/Udayraj123 """ import glob import cv2 # 1: View without saving, 2: Save files without showing review=1; dir_glob ='*/*/*.jpg' u_width=800 def waitQ(): while(0xFF & cv2.waitKey(1) != ord('q')):pass cv2.destroyAllWindows() show_count=0 def show(img,t...
[ "cv2.imwrite", "glob.iglob", "cv2.imshow", "cv2.waitKey", "cv2.destroyAllWindows", "cv2.imread" ]
[((494, 514), 'glob.iglob', 'glob.iglob', (['dir_glob'], {}), '(dir_glob)\n', (504, 514), False, 'import glob\n'), ((268, 291), 'cv2.destroyAllWindows', 'cv2.destroyAllWindows', ([], {}), '()\n', (289, 291), False, 'import cv2\n'), ((450, 472), 'cv2.imshow', 'cv2.imshow', (['title', 'img'], {}), '(title, img)\n', (460,...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "silk.node.fifteen_four_dev_board.ThreadDevBoard", "silk.tools.wpan_util.verify_within", "silk.utils.process_cleanup.ps_cleanup", "silk.hw.hw_resource.global_instance", "silk.tools.wpan_util.is_associated", "unittest.main", "random.randint", "silk.tools.wpan_util.verify_channel" ]
[((949, 970), 'silk.hw.hw_resource.global_instance', 'hwr.global_instance', ([], {}), '()\n', (968, 970), True, 'import silk.hw.hw_resource as hwr\n'), ((4772, 4787), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4785, 4787), False, 'import unittest\n'), ((1208, 1229), 'silk.node.fifteen_four_dev_board.ThreadDev...
import re import json import datetime from decimal import Decimal import requests from bs4 import BeautifulSoup from user_agent import generate_user_agent AVAILAIBLE_CURRENCIES = [ 'usd', 'eur', 'rub100', ] CITY = 'minsk' class ExchangeRate: def __init__(self, buy, sell): self.buy = buy ...
[ "json.loads", "datetime.datetime.strptime", "user_agent.generate_user_agent", "requests.get", "bs4.BeautifulSoup", "datetime.date", "decimal.Decimal", "re.search" ]
[((754, 788), 'requests.get', 'requests.get', (['url'], {'headers': 'headers'}), '(url, headers=headers)\n', (766, 788), False, 'import requests\n'), ((804, 840), 'bs4.BeautifulSoup', 'BeautifulSoup', (['response.text', '"""lxml"""'], {}), "(response.text, 'lxml')\n", (817, 840), False, 'from bs4 import BeautifulSoup\n...
import json from os.path import join from tarfile import TarFile from enot.action import action_factory from enot.action.release import Release from enot.compiler.compiler_type import Compiler from enot.packages.config.config import ConfigFile, get_dep_info_from_hex from enot.packages.dep import Dep from enot.utils.fi...
[ "os.path.join", "enot.action.action_factory.get_action", "json.loads", "enot.packages.config.config.get_dep_info_from_hex" ]
[((502, 541), 'enot.packages.config.config.get_dep_info_from_hex', 'get_dep_info_from_hex', (['name', "dep['tag']"], {}), "(name, dep['tag'])\n", (523, 541), False, 'from enot.packages.config.config import ConfigFile, get_dep_info_from_hex\n'), ((2403, 2433), 'os.path.join', 'join', (['path', '"""enot_config.json"""'],...
# -*- coding: utf-8 -*- """ @created: Aug 13 2020 @modified: Oct 30 2020 @author: <NAME> CentraleSupelec MICS laboratory 9 rue <NAME>, Gif-Sur-Yvette, 91190 France Python wrapper around vcf2maf perl script. """ import os def run_vcf2maf_annotator(vep_data: str, vep_n_fork: int, vcf_path: str, out_path: s...
[ "os.system", "os.path.exists", "os.path.join", "os.remove" ]
[((1456, 1490), 'os.path.join', 'os.path.join', (['tmp_folder', 'tmp_file'], {}), '(tmp_folder, tmp_file)\n', (1468, 1490), False, 'import os\n'), ((1184, 1240), 'os.path.join', 'os.path.join', (['__file__', '"""../../tools/vcf2maf/vcf2maf.pl"""'], {}), "(__file__, '../../tools/vcf2maf/vcf2maf.pl')\n", (1196, 1240), Fa...
""" Question 2) Take a pair of dice, one of them is loaded and the other fair and roll them say 100000 times. The loaded dice gives a particular outcome more frequently, i.e., say the number 3 occurs with a probability of 1/4 rather than 1/6. The fair dice, on the other hand, outputs the number 4 with the probabili...
[ "matplotlib.pyplot.grid", "math.ceil", "random.randint", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.style.use", "matplotlib.pyplot.bar", "matplotlib.pyplot.figure", "matplotlib.pyplot.scatter", "matplotlib.pyplot.title", "matplotlib.pyp...
[((2440, 2457), 'math.ceil', 'math.ceil', (['(n / 36)'], {}), '(n / 36)\n', (2449, 2457), False, 'import math\n'), ((3600, 3614), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (3612, 3614), True, 'import matplotlib.pyplot as plt\n'), ((3701, 3801), 'matplotlib.pyplot.title', 'plt.title', (['"""Bar Gra...
import json import pytest from custom_components.hacs.validate.brands import Validator from tests.sample_data import response_rate_limit_header @pytest.mark.asyncio async def test_added_to_brands(repository, aresponses): aresponses.add( "brands.home-assistant.io", "/domains.json", "get"...
[ "json.dumps", "custom_components.hacs.validate.brands.Validator" ]
[((515, 536), 'custom_components.hacs.validate.brands.Validator', 'Validator', (['repository'], {}), '(repository)\n', (524, 536), False, 'from custom_components.hacs.validate.brands import Validator\n'), ((968, 989), 'custom_components.hacs.validate.brands.Validator', 'Validator', (['repository'], {}), '(repository)\n...
import time import datetime from time import timezone import calendar sss = ['Monday', 'March', '16', '22', '30', 'PM'] dt = datetime.datetime(2015, 3, 16, 22, 30, 0) s = time.mktime(dt.timetuple()) print(s)
[ "datetime.datetime" ]
[((132, 173), 'datetime.datetime', 'datetime.datetime', (['(2015)', '(3)', '(16)', '(22)', '(30)', '(0)'], {}), '(2015, 3, 16, 22, 30, 0)\n', (149, 173), False, 'import datetime\n')]
#!/usr/bin/env python from __future__ import print_function import sys import rospy from robotican_demos_upgrade.srv import * def pick_unknown_client(): rospy.wait_for_service('pick_unknown') try: pick_unknown_req = rospy.ServiceProxy('pick_unknown', pick_unknown) resp1 = pick_unknown_req("a...
[ "rospy.ServiceProxy", "sys.exit", "rospy.wait_for_service" ]
[((160, 198), 'rospy.wait_for_service', 'rospy.wait_for_service', (['"""pick_unknown"""'], {}), "('pick_unknown')\n", (182, 198), False, 'import rospy\n'), ((235, 283), 'rospy.ServiceProxy', 'rospy.ServiceProxy', (['"""pick_unknown"""', 'pick_unknown'], {}), "('pick_unknown', pick_unknown)\n", (253, 283), False, 'impor...
import re with open("input.txt", "r") as input_file: input = input_file.read().split("\n") rules = [] def parse_rule(rule_string): [bag_name, children_string] = rule_string.split("contain") bag_name = bag_name.replace(" bags ", "") if "no other bags" in children_string: children = None e...
[ "re.sub" ]
[((375, 404), 're.sub', 're.sub', (['""" bag(s)?"""', '""""""', 'child'], {}), "(' bag(s)?', '', child)\n", (381, 404), False, 'import re\n')]
import sys from math import ceil, log2 from bitstring import BitArray BLOCK_SIZE = 4096 # standard block size def position_size(d: dict): '''Number of bits required to represent position of D.''' return ceil(log2(len(d))) def unpad(block: bytes): '''Removes padding from input.''' block = BitArray(block) w...
[ "bitstring.BitArray" ]
[((301, 316), 'bitstring.BitArray', 'BitArray', (['block'], {}), '(block)\n', (309, 316), False, 'from bitstring import BitArray\n'), ((672, 682), 'bitstring.BitArray', 'BitArray', ([], {}), '()\n', (680, 682), False, 'from bitstring import BitArray\n'), ((630, 640), 'bitstring.BitArray', 'BitArray', ([], {}), '()\n', ...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from numpy import * import sys prime_file = sys.argv[1] eratostene_file = sys.argv[2] data1 = loadtxt("./" + prime_file) data2 = loadtxt("./" + eratostene_file) # prime NUM1=data1[:,0] TIME1=data1[:,1] # eratostene NUM2=data2[:,0] TIME2=data2...
[ "matplotlib.pyplot.subplots_adjust", "matplotlib.pyplot.grid", "matplotlib.pyplot.savefig", "matplotlib.pyplot.xscale", "matplotlib.pyplot.ylabel", "matplotlib.use", "matplotlib.pyplot.xlabel", "matplotlib.pyplot.plot", "matplotlib.pyplot.title", "matplotlib.pyplot.legend" ]
[((18, 39), 'matplotlib.use', 'matplotlib.use', (['"""Agg"""'], {}), "('Agg')\n", (32, 39), False, 'import matplotlib\n'), ((442, 452), 'matplotlib.pyplot.grid', 'plt.grid', ([], {}), '()\n', (450, 452), True, 'import matplotlib.pyplot as plt\n'), ((453, 488), 'matplotlib.pyplot.title', 'plt.title', (['"""Crivello di E...
# Generated by Django 3.2a1 on 2021-03-02 20:17 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('geodata', '0003_auto_20210301_1639'), ] operations = [ migrations.RemoveField( model_name='imageentry', name='failure_reason...
[ "django.db.migrations.DeleteModel", "django.db.migrations.RemoveField" ]
[((227, 297), 'django.db.migrations.RemoveField', 'migrations.RemoveField', ([], {'model_name': '"""imageentry"""', 'name': '"""failure_reason"""'}), "(model_name='imageentry', name='failure_reason')\n", (249, 297), False, 'from django.db import migrations\n'), ((342, 406), 'django.db.migrations.RemoveField', 'migratio...
# Problem: # Given a list of numbers and a number k, return whether any two numbers from the list add up to k. # # For example, given [10, 15, 3, 7] and k of 17, return true since 10 + 7 is 17. # # Bonus: Can you do this in one pass? import collections def can_two_sum(arr, k): nums = collections.defaultdict(int) ...
[ "collections.defaultdict" ]
[((291, 319), 'collections.defaultdict', 'collections.defaultdict', (['int'], {}), '(int)\n', (314, 319), False, 'import collections\n')]
from environment.ImbalanceEnvironment import ImbalanceEnvironment from environment.NetworkEnvironment import NetworkEnvironment from environment.TotalNetworkCapacityTracker import TotalNetworkCapacityTracker from evolutionary_algorithm.Fitness import Fitness from evolutionary_algorithm.individuals.StrategyIndividual im...
[ "network_objects.Battery.Battery", "network_objects.control_strategies.StrategyWithLimitedChargeCapacityControlTower.StrategyWithLimitedChargeCapacityControlTower", "environment.NetworkEnvironment.NetworkEnvironment", "evolutionary_algorithm.individuals.StrategyIndividual.StrategyIndividual", "network_objec...
[((2869, 2924), 'evolutionary_algorithm.individuals.StrategyIndividual.StrategyIndividual', 'StrategyIndividual', ([], {'init_params': "{'number_of_points': 4}"}), "(init_params={'number_of_points': 4})\n", (2887, 2924), False, 'from evolutionary_algorithm.individuals.StrategyIndividual import StrategyIndividual\n'), (...
import os import sys import pickle from tqdm import tqdm import numpy as np import cv2 from fsgan.utils.bbox_utils import scale_bbox, crop_img from fsgan.utils.video_utils import Sequence def main(input_path, output_dir=None, cache_path=None, seq_postfix='_dsfd_seq.pkl', resolution=256, crop_scale=2.0, selec...
[ "pickle.dump", "cv2.resize", "argparse.ArgumentParser", "fsgan.utils.bbox_utils.crop_img", "pickle.load", "os.path.join", "fsgan.utils.video_utils.Sequence", "os.path.splitext", "os.path.isfile", "numpy.array", "cv2.VideoWriter", "os.path.isdir", "cv2.VideoCapture", "cv2.VideoWriter_fourcc...
[((1442, 1470), 'cv2.VideoCapture', 'cv2.VideoCapture', (['input_path'], {}), '(input_path)\n', (1458, 1470), False, 'import cv2\n'), ((1867, 1905), 'cv2.VideoWriter_fourcc', 'cv2.VideoWriter_fourcc', (['*encoder_codec'], {}), '(*encoder_codec)\n', (1889, 1905), False, 'import cv2\n'), ((4967, 5014), 'argparse.Argument...
import click from picomc.cli.utils import pass_global_config @click.group() def config_cli(): """Configure picomc.""" pass @config_cli.command() @pass_global_config def show(cfg): """Print the current config.""" for k, v in cfg.bottom.items(): if k not in cfg: print("[default] ...
[ "click.group", "click.argument" ]
[((65, 78), 'click.group', 'click.group', ([], {}), '()\n', (76, 78), False, 'import click\n'), ((438, 459), 'click.argument', 'click.argument', (['"""key"""'], {}), "('key')\n", (452, 459), False, 'import click\n'), ((461, 484), 'click.argument', 'click.argument', (['"""value"""'], {}), "('value')\n", (475, 484), Fals...
import os def init(): """ Load IDs of all available batteries and their capacity :return: battery_config (Dict containing the battery id and its size """ battery_config = {} for item in os.listdir('/sys/class/power_supply/'): if os.path.isdir(os.path.join('/sys/class/power_supply/', i...
[ "os.listdir", "os.path.join" ]
[((213, 251), 'os.listdir', 'os.listdir', (['"""/sys/class/power_supply/"""'], {}), "('/sys/class/power_supply/')\n", (223, 251), False, 'import os\n'), ((278, 324), 'os.path.join', 'os.path.join', (['"""/sys/class/power_supply/"""', 'item'], {}), "('/sys/class/power_supply/', item)\n", (290, 324), False, 'import os\n'...
# Copyright 2017 ProjectQ-Framework (www.projectq.ch) # # 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 app...
[ "projectq.cengines.BasicEngine.__init__" ]
[((1486, 1512), 'projectq.cengines.BasicEngine.__init__', 'BasicEngine.__init__', (['self'], {}), '(self)\n', (1506, 1512), False, 'from projectq.cengines import BasicEngine\n')]
# -*- coding: utf-8 -*- ''' * finance4py * Based on Python Data Analysis Library. * 2016/03/22 by <NAME> <<EMAIL>> * Copyright (c) 2016, finance4py team * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ...
[ "pandas.Series", "pandas.isnull", "matplotlib.patches.Rectangle", "matplotlib.dates.WeekdayLocator", "matplotlib.pyplot.gca", "matplotlib.dates.DateFormatter", "matplotlib.dates.YearLocator", "matplotlib.lines.Line2D", "pandas_datareader.data.get_data_yahoo" ]
[((4094, 4117), 'pandas.Series', 'Series', (['K', 'df_RSV.index'], {}), '(K, df_RSV.index)\n', (4100, 4117), False, 'from pandas import Series\n'), ((4357, 4380), 'pandas.Series', 'Series', (['D', 'df_RSV.index'], {}), '(D, df_RSV.index)\n', (4363, 4380), False, 'from pandas import Series\n'), ((2658, 2717), 'pandas_da...
import os import requests import json import discord from discord.ext import commands client = commands.Bot(command_prefix=commands.when_mentioned_or("d/","D/"),help_command=None) #api key references my_secret = os.environ['TOKEN'] apiSecret = os.environ['apexApi'] #notify me when bot has come online @client.event...
[ "discord.ext.commands.when_mentioned_or", "requests.get" ]
[((125, 163), 'discord.ext.commands.when_mentioned_or', 'commands.when_mentioned_or', (['"""d/"""', '"""D/"""'], {}), "('d/', 'D/')\n", (151, 163), False, 'from discord.ext import commands\n'), ((573, 661), 'requests.get', 'requests.get', (['f"""https://api.mozambiquehe.re/maprotation?version=2&auth={apiSecret}"""'], {...
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- from os import path from collections import namedtuple class linux_os_release(object): 'Parse /etc/os-release' OS_RELEASE = '/etc/os-release' _parse_result = namedtuple('_parse_result', 'distro, version_major, version...
[ "os.path.exists", "collections.namedtuple" ]
[((261, 336), 'collections.namedtuple', 'namedtuple', (['"""_parse_result"""', '"""distro, version_major, version_minor, family"""'], {}), "('_parse_result', 'distro, version_major, version_minor, family')\n", (271, 336), False, 'from collections import namedtuple\n'), ((1256, 1285), 'os.path.exists', 'path.exists', ([...
from Processing import ProcessWeeksExcel1 as PWE1, ProcessWeeksExcel2 as PWE2 from FileGather.FileSeeker import get_files import time root_dir_path = "Z:\\Informacion de estudiante en practica\\Archivos para indicadores de mantto\\MTTO CORRECTIVO - DMS\\2020\\SEMANAS" def procesar1(): """La siguiente expresión h...
[ "time.sleep", "FileGather.FileSeeker.get_files" ]
[((799, 839), 'FileGather.FileSeeker.get_files', 'get_files', (['root_dir_path', 'file_pattern_1'], {}), '(root_dir_path, file_pattern_1)\n', (808, 839), False, 'from FileGather.FileSeeker import get_files\n'), ((1471, 1511), 'FileGather.FileSeeker.get_files', 'get_files', (['root_dir_path', 'file_pattern_1'], {}), '(r...
from django.urls import path from .views import SubscriptionCreateView, SubscriptionDeleteView, SubscriptionDetailView, \ ControlServerView, ChangeServerView, GetBrokenSubscriptionsView, UpdateServiceDetail, Initialized app_name = 'cloud' from . import views urlpatterns = [ path('byp/setapprovedsubscriptions/'...
[ "django.urls.path" ]
[((598, 639), 'django.urls.path', 'path', (['"""tasks/"""', 'views.tasks'], {'name': '"""tasks"""'}), "('tasks/', views.tasks, name='tasks')\n", (602, 639), False, 'from django.urls import path\n')]
from __future__ import (absolute_import, division, print_function, unicode_literals) import pty, os, tty, termios, time, sys, base64, struct, signal from fcntl import fcntl, F_GETFL, F_SETFL, ioctl class TerminalServer: def __init__(self): self.closed = False self.pid, self...
[ "pty.fork", "os.execvp", "os.kill", "fcntl.ioctl", "base64.b64encode", "base64.b64decode", "struct.pack", "fcntl.fcntl", "os.fdopen", "os.read", "tty.setraw" ]
[((326, 336), 'pty.fork', 'pty.fork', ([], {}), '()\n', (334, 336), False, 'import pty, os, tty, termios, time, sys, base64, struct, signal\n'), ((1585, 1622), 'struct.pack', 'struct.pack', (['"""HHHH"""', 'rows', 'cols', '(0)', '(0)'], {}), "('HHHH', rows, cols, 0, 0)\n", (1596, 1622), False, 'import pty, os, tty, ter...
""" Tests for second order centrality. """ import networkx as nx from nose import SkipTest from nose.tools import raises, assert_almost_equal class TestSecondOrderCentrality(object): numpy = 1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): glo...
[ "networkx.second_order_centrality", "nose.tools.assert_almost_equal", "networkx.empty_graph", "networkx.Graph", "nose.SkipTest", "networkx.complete_graph", "networkx.cycle_graph", "nose.tools.raises", "networkx.path_graph" ]
[((481, 509), 'nose.tools.raises', 'raises', (['nx.NetworkXException'], {}), '(nx.NetworkXException)\n', (487, 509), False, 'from nose.tools import raises, assert_almost_equal\n'), ((609, 637), 'nose.tools.raises', 'raises', (['nx.NetworkXException'], {}), '(nx.NetworkXException)\n', (615, 637), False, 'from nose.tools...
import itertools import wx import wx.lib.agw.shapedbutton as wxsb ################################################################################ ################################################################################ defaultValue = 75 timeFrameChoices = ("All", "Season", "3Months", "1Month") outcomeChoic...
[ "wx.BoxSizer", "wx.BitmapButton", "wx.Image", "wx.StaticText", "wx.Slider", "wx.lib.agw.shapedbutton.SBitmapButton", "wx.Font", "wx.App", "wx.Panel" ]
[((10450, 10458), 'wx.App', 'wx.App', ([], {}), '()\n', (10456, 10458), False, 'import wx\n'), ((701, 715), 'wx.Panel', 'wx.Panel', (['self'], {}), '(self)\n', (709, 715), False, 'import wx\n'), ((742, 766), 'wx.BoxSizer', 'wx.BoxSizer', (['wx.VERTICAL'], {}), '(wx.VERTICAL)\n', (753, 766), False, 'import wx\n'), ((793...
#!/usr/bin/env python ############################################################### # # # D I S P E R S I O N . P Y # # # #########################################...
[ "numpy.sqrt", "numpy.arccos", "matplotlib.collections.LineCollection", "numpy.array", "matplotlib.ticker.MaxNLocator", "matplotlib.rc", "sys.exit", "numpy.linalg.norm", "matplotlib.lines.Line2D", "numpy.mean", "numpy.cross", "argparse.ArgumentParser", "numpy.where", "numpy.delete", "matp...
[((933, 989), 'numpy.array', 'np.array', (['[0.5, 0.0, 0.25, 0.75, 0.33333333, 0.66666667]'], {}), '([0.5, 0.0, 0.25, 0.75, 0.33333333, 0.66666667])\n', (941, 989), True, 'import numpy as np\n'), ((1080, 1114), 'scipy.io.FortranFile', 'FF', (["(seed + '.pdos_bin')", '"""r"""', '""">u4"""'], {}), "(seed + '.pdos_bin', '...
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2018 <NAME> # # 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 right...
[ "logging.basicConfig", "logging.getLogger", "argparse.ArgumentParser", "pdb.post_mortem", "traceback.print_exc", "fileinput.input" ]
[((1423, 1481), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""latex2text"""', 'add_help': '(False)'}), "(prog='latex2text', add_help=False)\n", (1446, 1481), False, 'import argparse\n'), ((6983, 7004), 'logging.basicConfig', 'logging.basicConfig', ([], {}), '()\n', (7002, 7004), False, 'import...
from django.db import models from django.contrib.auth.models import User # Create your models here. class AuthUser(models.Model): user = models.OneToOneField(User,on_delete=models.CASCADE) password = models.CharField(max_length=128) last_login = models.DateTimeField(blank=True, null=True) is_superuse...
[ "django.db.models.DateTimeField", "django.db.models.OneToOneField", "django.db.models.CharField", "django.db.models.IntegerField" ]
[((144, 196), 'django.db.models.OneToOneField', 'models.OneToOneField', (['User'], {'on_delete': 'models.CASCADE'}), '(User, on_delete=models.CASCADE)\n', (164, 196), False, 'from django.db import models\n'), ((211, 243), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)'}), '(max_length=128)...
#!/usr/bin/python3 import robin_stocks2 as robin_stocks import os import configparser config = configparser.ConfigParser() def get_creds(): if os.path.isfile('/home/ec2-user/.saver.cfg') is False: prompt_creds() data = config.read('/home/ec2-user/.saver.cfg') if config.has_section('ROBINHOOD') is False: ...
[ "os.path.isfile", "robin_stocks2.orders.get_stock_order_info", "configparser.ConfigParser", "robin_stocks2.login" ]
[((96, 123), 'configparser.ConfigParser', 'configparser.ConfigParser', ([], {}), '()\n', (121, 123), False, 'import configparser\n'), ((643, 681), 'robin_stocks2.login', 'robin_stocks.login', (['username', 'password'], {}), '(username, password)\n', (661, 681), True, 'import robin_stocks2 as robin_stocks\n'), ((737, 78...
# -*- coding: utf-8 -*- """ Created on Mon Dec 23 10:49:26 2019 @author: fg010 """ #%% from __future__ import print_function,absolute_import, division, print_function, unicode_literals import keras from keras.layers import Dense, Conv2D, BatchNormalization, Activation from keras.layers import AveragePooling2...
[ "os.path.exists", "numpy.fromfile", "keras.models.load_model", "random.shuffle", "os.path.join", "numpy.asanyarray", "numpy.array" ]
[((933, 1034), 'keras.models.load_model', 'load_model', (['"""D:\\\\OneDrive\\\\工作\\\\富港万嘉\\\\TensorFlow\\\\saved_models\\\\TL_0_%s_model.036_0.8795.h5"""'], {}), "(\n 'D:\\\\OneDrive\\\\工作\\\\富港万嘉\\\\TensorFlow\\\\saved_models\\\\TL_0_%s_model.036_0.8795.h5'\n )\n", (943, 1034), False, 'from keras.models import ...
#!/usr/bin/env python # coding=utf-8 import os from PIL import Image def process_image(filename, mwidth=640, mheight=1136): image = Image.open(filename) w, h = image.size if w <= mwidth and h <= mheight: print(filename, 'is OK.') return if 1.0 * w / mwidth > 1.0 * h / mheight: ...
[ "os.listdir", "PIL.Image.open" ]
[((139, 159), 'PIL.Image.open', 'Image.open', (['filename'], {}), '(filename)\n', (149, 159), False, 'from PIL import Image\n'), ((689, 704), 'os.listdir', 'os.listdir', (['"""."""'], {}), "('.')\n", (699, 704), False, 'import os\n')]
import asyncio, discord try: from _command import Command except: from coms._command import Command class Com(Command): def __init__(self): self.usage = "!info" self.description = "Gives info about mcskewl" self.keys = ["!info", ".info"] self.permissions = ["*"] asy...
[ "discord.Embed" ]
[((382, 769), 'discord.Embed', 'discord.Embed', ([], {'title': '"""mcskewls"""', 'description': '(\'the man, the myth, the mlg MCer\\n\' +\n """**Age:**\t\t18\n**Favourite Food:**\t\tPizza\n**Steam profile:**\t\t""" +\n """https://steamcommunity.com/id/minecraftintheschooltoilets\n**Favourite game:**\t\t"""\n ...
#%% import tensorflow as tf import tensorflow.keras as K from tensorflow.keras import layers #%% class ConvLayer(K.layers.Layer): def __init__(self, filter_size, kernel_size, strides, name="ConvLayer", **kwargs): super(ConvLayer, self).__init__(name=name, **kwargs) self.conv2d = layers.Conv2D(filter...
[ "tensorflow.math.pow", "tensorflow.shape", "tensorflow.math.log", "tensorflow.reduce_sum", "tensorflow.keras.layers.BatchNormalization", "tensorflow.keras.layers.Dense", "tensorflow.math.exp", "tensorflow.keras.layers.Input", "tensorflow.keras.layers.Reshape", "tensorflow.keras.layers.Conv2D", "...
[((1882, 1916), 'tensorflow.keras.layers.Input', 'layers.Input', (["PARAMS['latent_dim']"], {}), "(PARAMS['latent_dim'])\n", (1894, 1916), False, 'from tensorflow.keras import layers\n'), ((1925, 1958), 'tensorflow.keras.layers.Input', 'layers.Input', (["PARAMS['class_num']"], {}), "(PARAMS['class_num'])\n", (1937, 195...
import logging import sys class Configuration(dict): def __getattr__(self, name): if name in self: return self[name] else: raise AttributeError("No such config attribute get: " + name) def __setattr__(self, name, value): self[name] = value def __delattr__(...
[ "logging.getLogger", "logging.basicConfig", "logging.Formatter", "sys.stdout.isatty", "logging.FileHandler" ]
[((1371, 1390), 'sys.stdout.isatty', 'sys.stdout.isatty', ([], {}), '()\n', (1388, 1390), False, 'import sys\n'), ((667, 709), 'logging.getLogger', 'logging.getLogger', (['self.__class__.__name__'], {}), '(self.__class__.__name__)\n', (684, 709), False, 'import logging\n'), ((1027, 1112), 'logging.basicConfig', 'loggin...
from sqlalchemy import (create_engine, Column, Integer, String, DateTime, Boolean, BigInteger) from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker, scoped_session from datetime import datetime import os """A cache for storing account details as they a...
[ "sqlalchemy.orm.sessionmaker", "os.environ.get", "sqlalchemy.String", "sqlalchemy.ext.declarative.declarative_base", "sqlalchemy.orm.scoped_session", "sqlalchemy.Column" ]
[((447, 465), 'sqlalchemy.ext.declarative.declarative_base', 'declarative_base', ([], {}), '()\n', (463, 465), False, 'from sqlalchemy.ext.declarative import declarative_base\n'), ((484, 509), 'sqlalchemy.orm.sessionmaker', 'sessionmaker', ([], {'bind': 'engine'}), '(bind=engine)\n', (496, 509), False, 'from sqlalchemy...
# -*- coding:utf-8 -*- import re from itertools import groupby def validate_card_number(card_number): """Validation credit card number.""" if not card_number: return "Invalid" card_number = card_number.strip() start_numbers = [4, 5, 6] try: only_digits = re.sub('[^0-9]', '', card...
[ "re.sub", "itertools.groupby" ]
[((295, 328), 're.sub', 're.sub', (['"""[^0-9]"""', '""""""', 'card_number'], {}), "('[^0-9]', '', card_number)\n", (301, 328), False, 'import re\n'), ((507, 527), 'itertools.groupby', 'groupby', (['only_digits'], {}), '(only_digits)\n', (514, 527), False, 'from itertools import groupby\n'), ((407, 442), 're.sub', 're....
#!/usr/bin/env python from . import node, rpclib class FrovedisServer(object): "A singleton implementation to store Frovedis server information" __instance = None __cmd = "mpirun -np 1 /opt/nec/nosupport/frovedis/ve/bin/frovedis_server" #default command def __new__(cls): if FrovedisServer.__instan...
[ "atexit.register" ]
[((2316, 2357), 'atexit.register', 'atexit.register', (['FrovedisServer.shut_down'], {}), '(FrovedisServer.shut_down)\n', (2331, 2357), False, 'import atexit\n')]
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """End-to-end tests for traffic control library.""" import os import re import sys import unittest import traffic_control class...
[ "re.search", "traffic_control._ConfigureClass", "traffic_control._AddFilter", "sys.exit", "traffic_control._DeleteFilter", "os.getuid", "traffic_control._AddSubQdisc", "traffic_control._GetFilterHandleId", "traffic_control._Exec", "unittest.main", "traffic_control._AddRootQdisc" ]
[((5927, 5942), 'unittest.main', 'unittest.main', ([], {}), '()\n', (5940, 5942), False, 'import unittest\n'), ((860, 951), 'traffic_control._Exec', 'traffic_control._Exec', (['command', "('Error creating dummy interface %s.' % self._INTERFACE)"], {}), "(command, 'Error creating dummy interface %s.' % self.\n _INTER...
import unittest from mcapi.app import mc_api # UnitTest function, used to test whether or not the API will return suggested results. class TestApp(unittest.TestCase): def setUp(self): self.mc_api = mc_api.test_client() def tearDown(self): pass def test_predict_route(self): paylo...
[ "unittest.main", "mcapi.app.mc_api.test_client" ]
[((1631, 1646), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1644, 1646), False, 'import unittest\n'), ((213, 233), 'mcapi.app.mc_api.test_client', 'mc_api.test_client', ([], {}), '()\n', (231, 233), False, 'from mcapi.app import mc_api\n')]
try: from typing import Awaitable except ImportError: from typing import Generic, TypeVar from abc import ABCMeta, abstractmethod T_co = TypeVar('T_co', covariant=True) class _Awaitable(metaclass=ABCMeta): __slots__ = () @abstractmethod def __await__(self): yi...
[ "typing.TypeVar" ]
[((154, 185), 'typing.TypeVar', 'TypeVar', (['"""T_co"""'], {'covariant': '(True)'}), "('T_co', covariant=True)\n", (161, 185), False, 'from typing import Generic, TypeVar\n')]
import sys import numpy as np import pandas as pd from sklearn.cluster import KMeans from sklearn.linear_model import LinearRegression from sklearn.model_selection import train_test_split from sklearn.utils import check_random_state from sklearn.decomposition import PCA import keras class LIMESimpleModel...
[ "sklearn.utils.check_random_state", "pandas.read_csv", "keras.Model", "numpy.where", "sklearn.model_selection.train_test_split", "sklearn.decomposition.PCA", "numpy.argmax", "keras.Input", "numpy.zeros", "numpy.dot", "keras.layers.Dense", "keras.layers.BatchNormalization", "sklearn.linear_mo...
[((2194, 2219), 'keras.Input', 'keras.Input', ([], {'shape': '(143,)'}), '(shape=(143,))\n', (2205, 2219), False, 'import keras\n'), ((2636, 2683), 'keras.Model', 'keras.Model', ([], {'inputs': 'in_layer', 'outputs': 'out_layer'}), '(inputs=in_layer, outputs=out_layer)\n', (2647, 2683), False, 'import keras\n'), ((2737...
from flask import Flask, request from pymessenger.bot import Bot from utils import wit_response bot = Bot("<KEY>") app = Flask(__name__) @app.route("/", methods=["GET"]) def verify(): if request.args.get("hub.challenge"): return request.args.get("hub.challenge") else: return "Please run in Fac...
[ "flask.request.args.get", "flask.Flask", "flask.request.get_json", "utils.wit_response", "pymessenger.bot.Bot" ]
[((103, 115), 'pymessenger.bot.Bot', 'Bot', (['"""<KEY>"""'], {}), "('<KEY>')\n", (106, 115), False, 'from pymessenger.bot import Bot\n'), ((122, 137), 'flask.Flask', 'Flask', (['__name__'], {}), '(__name__)\n', (127, 137), False, 'from flask import Flask, request\n'), ((193, 226), 'flask.request.args.get', 'request.ar...
#!/usr/bin/env python import os import sys import rospy import threading import numpy as np from geometry_msgs import msg as gmsg from aist_depth_filter import DepthFilterClient from tf import TransformBroadcaster, transformations as tfs ######################################################################### # glo...
[ "geometry_msgs.msg.TransformStamped", "tf.TransformBroadcaster", "aist_depth_filter.DepthFilterClient", "sys.exit", "numpy.cross", "rospy.is_shutdown", "rospy.init_node", "rospy.Time.now", "numpy.array", "rospy.Rate", "numpy.linalg.norm", "threading.Thread" ]
[((565, 588), 'geometry_msgs.msg.TransformStamped', 'gmsg.TransformStamped', ([], {}), '()\n', (586, 588), True, 'from geometry_msgs import msg as gmsg\n'), ((707, 783), 'numpy.array', 'np.array', (['[plane.plane.normal.x, plane.plane.normal.y, plane.plane.normal.z]'], {}), '([plane.plane.normal.x, plane.plane.normal.y...
""" Create a ClearML Monitoring Service that posts alerts on Slack Channel groups based on some logic Creating a new Slack Bot (Allegro ClearML Bot): 1. Login to your Slack account 2. Go to https://api.slack.com/apps/new 3. Give the new App a name (For example "Allegro Train Bot") and select your workspace 4. Press Cr...
[ "argparse.ArgumentParser", "clearml.Task.init", "os.environ.get", "time.sleep", "slack_sdk.WebClient", "clearml.Task._get_default_session" ]
[((8116, 8209), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""ClearML monitor experiments and post Slack Alerts"""'}), "(description=\n 'ClearML monitor experiments and post Slack Alerts')\n", (8139, 8209), False, 'import argparse\n'), ((12068, 12165), 'clearml.Task.init', 'Task.init...