code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from functools import wraps import json from django.http.response import HttpResponse def ajax_login_required(view_func): @wraps(view_func) def wrapper(request, *args, **kwargs): if request.user.is_authenticated(): return view_func(request, *args, **kwargs) resp = json.dumps({'not_...
[ "django.http.response.HttpResponse", "json.dumps", "functools.wraps" ]
[((129, 145), 'functools.wraps', 'wraps', (['view_func'], {}), '(view_func)\n', (134, 145), False, 'from functools import wraps\n'), ((488, 504), 'functools.wraps', 'wraps', (['view_func'], {}), '(view_func)\n', (493, 504), False, 'from functools import wraps\n'), ((837, 853), 'functools.wraps', 'wraps', (['view_func']...
# -*- coding: utf-8 -*- # Copyright 2016-2021 CERN # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
[ "logging.getLogger", "rucio.core.quarantined_replica.list_quarantined_replicas", "rucio.rse.rsemanager.lfns2pfns", "rucio.core.rse.list_rses", "logging.info", "logging.error", "rucio.common.utils.daemon_sleep", "rucio.rse.rsemanager.create_protocol", "rucio.core.vo.list_vos", "rucio.common.logging...
[((2138, 2155), 'threading.Event', 'threading.Event', ([], {}), '()\n', (2153, 2155), False, 'import threading\n'), ((2884, 2895), 'os.getpid', 'os.getpid', ([], {}), '()\n', (2893, 2895), False, 'import os\n'), ((2909, 2935), 'threading.current_thread', 'threading.current_thread', ([], {}), '()\n', (2933, 2935), False...
"""Unit tests for method module.""" import os import tempfile import unittest import relentless from .test_objective import QuadraticObjective class test_LineSearch(unittest.TestCase): """Unit tests for relentless.optimize.LineSearch""" def setUp(self): self.directory = tempfile.TemporaryDirectory()...
[ "tempfile.TemporaryDirectory", "relentless.data.Directory", "relentless.optimize.FixedStepDescent", "relentless.variable.DesignVariable", "relentless.optimize.GradientTest", "os.path.join", "relentless.optimize.LineSearch", "relentless.optimize.SteepestDescent", "unittest.main" ]
[((11391, 11406), 'unittest.main', 'unittest.main', ([], {}), '()\n', (11404, 11406), False, 'import unittest\n'), ((291, 320), 'tempfile.TemporaryDirectory', 'tempfile.TemporaryDirectory', ([], {}), '()\n', (318, 320), False, 'import tempfile\n'), ((398, 443), 'relentless.variable.DesignVariable', 'relentless.variable...
#!/usr/bin/env python3 import os import numpy as np import matplotlib.pyplot as plt from scipy import signal fs = 1000 # sampling frequency fc = 6 # cut-off frequency t = np.arange(1000)/fs sga = np.sin(2*np.pi*2*t) # signal with f = 2 sgb = np.sin(2*np.pi*10*t) # signal with f = 10 sgo = sga + sgb #+ (np.rando...
[ "numpy.arange", "scipy.signal.filtfilt", "matplotlib.pyplot.plot", "scipy.signal.butter", "scipy.signal.lfilter", "numpy.sin", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((201, 226), 'numpy.sin', 'np.sin', (['(2 * np.pi * 2 * t)'], {}), '(2 * np.pi * 2 * t)\n', (207, 226), True, 'import numpy as np\n'), ((249, 275), 'numpy.sin', 'np.sin', (['(2 * np.pi * 10 * t)'], {}), '(2 * np.pi * 10 * t)\n', (255, 275), True, 'import numpy as np\n'), ((360, 386), 'scipy.signal.butter', 'signal.but...
""" Contains classes that implement the vectorization transformation. """ from dace import data, dtypes, symbolic from dace.graph import nodes, nxutil from dace.transformation import pattern_matching from dace.properties import Property, make_properties @make_properties class Vectorization(pattern_matching.Transforma...
[ "dace.properties.Property", "dace.graph.nodes.Map", "dace.transformation.pattern_matching.Transformation.register_pattern", "dace.graph.nxutil.node_path_graph", "dace.graph.nodes.Tasklet", "dace.symbolic.pystr_to_symbolic" ]
[((4997, 5060), 'dace.transformation.pattern_matching.Transformation.register_pattern', 'pattern_matching.Transformation.register_pattern', (['Vectorization'], {}), '(Vectorization)\n', (5045, 5060), False, 'from dace.transformation import pattern_matching\n'), ((712, 764), 'dace.properties.Property', 'Property', ([], ...
# -*- coding: utf-8 -*- # Tests for module mosaic.immutable_model #----------------------------------------------------------------------------- # Copyright (C) 2013 The Mosaic Development Team # # Distributed under the terms of the BSD License. The full license is in # the file LICENSE.txt, distributed as p...
[ "mosaic.immutable_model.SiteLabel", "numpy.array", "unittest.main", "numpy.arange", "unittest.TestSuite", "mosaic.immutable_model.FragmentRef", "numpy.float64", "mosaic.immutable_model.fragment", "mosaic.immutable_model.TemplateSiteLabel", "mosaic.immutable_model.polymer", "mosaic.immutable_mode...
[((23536, 23557), 'unittest.TestLoader', 'unittest.TestLoader', ([], {}), '()\n', (23555, 23557), False, 'import unittest\n'), ((23566, 23586), 'unittest.TestSuite', 'unittest.TestSuite', ([], {}), '()\n', (23584, 23586), False, 'import unittest\n'), ((23982, 23997), 'unittest.main', 'unittest.main', ([], {}), '()\n', ...
# Django from django.db import models # Models from ...utils import PRMModel class Mood(PRMModel): """ User feeling or mood during a day, serve as a log on how the user have been feeling lately. """ owner = models.ForeignKey('users.User', on_delete=models.CASCADE) HAPPY = 5 GOOD = 4 ...
[ "django.db.models.DateField", "django.db.models.TextField", "django.db.models.ForeignKey", "django.db.models.SmallIntegerField", "django.db.models.CharField" ]
[((231, 288), 'django.db.models.ForeignKey', 'models.ForeignKey', (['"""users.User"""'], {'on_delete': 'models.CASCADE'}), "('users.User', on_delete=models.CASCADE)\n", (248, 288), False, 'from django.db import models\n'), ((525, 569), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(200)', 'blan...
from collections import OrderedDict class rbac: ''' Class for Creating RBAC for CIC ''' def __init__(self): self.name = "citrix" def createRbac(self): ''' Function to create RBAC for CIC ''' self.clusterRole = self.createClusterRole() self.c...
[ "collections.OrderedDict" ]
[((707, 2254), 'collections.OrderedDict', 'OrderedDict', (["[('apiVersion', 'rbac.authorization.k8s.io/v1'), ('kind', 'ClusterRole'), (\n 'metadata', {'name': '%s' % self.name}), ('rules', [{'apiGroups': [''],\n 'resources': ['endpoints', 'ingresses', 'pods', 'secrets', 'nodes',\n 'routes', 'namespaces', 'conf...
#!/usr/bin/env python3 """ RRT Algo Reference: rrt.py written by <NAME> in May 2011 Authors: <NAME> (<EMAIL>) Graduate Student pursuing Masters in Robotics, University of Maryland, College Park """ import random, math import utils import numpy as np XDIM = 10 YDIM = 10 EPSILON = 0.2 NUMNODES = 5000 RADIUS = 0.5 plu...
[ "random.choice", "utils.check_node", "math.sqrt", "math.cos", "math.atan2", "random.random", "math.sin" ]
[((1368, 1422), 'math.sqrt', 'math.sqrt', (['((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2)'], {}), '((p1[0] - p2[0]) ** 2 + (p1[1] - p2[1]) ** 2)\n', (1377, 1422), False, 'import random, math\n'), ((2055, 2095), 'math.atan2', 'math.atan2', (['(p2[1] - p1[1])', '(p2[0] - p1[0])'], {}), '(p2[1] - p1[1], p2[0] - p1[0])\n'...
import datetime as dt import json from typing import List, Optional from uuid import UUID from fastapi.encoders import jsonable_encoder from injector import singleton, inject from common.cache import fail_silently, hash_cache_key from common.injection import Cache from database.utils import map_to from post.models im...
[ "json.loads", "common.cache.hash_cache_key", "datetime.timedelta", "fastapi.encoders.jsonable_encoder", "common.cache.fail_silently" ]
[((510, 525), 'common.cache.fail_silently', 'fail_silently', ([], {}), '()\n', (523, 525), False, 'from common.cache import fail_silently, hash_cache_key\n'), ((1283, 1298), 'common.cache.fail_silently', 'fail_silently', ([], {}), '()\n', (1296, 1298), False, 'from common.cache import fail_silently, hash_cache_key\n'),...
#! /usr/bin/env python3 """ ONTAP REST API Python Sample Scripts This script was developed by NetApp to help demonstrate NetApp technologies. This script is not officially supported as a standard NetApp product. Purpose: THE FOLLOWING SCRIPT SHOWS WORKFLOW OF QTREE, QUOTA CREATION, Show METRICS of QTREE u...
[ "utils.get_key_volumes", "texttable.Texttable", "utils.show_volume", "requests.post", "utils.setup_logging", "requests.get", "utils.parse_args", "urllib3.disable_warnings", "utils.Argument", "utils.setup_connection", "utils.show_qtree", "sys.exit", "utils.show_svm" ]
[((958, 979), 'urllib3.disable_warnings', 'ur.disable_warnings', ([], {}), '()\n', (977, 979), True, 'import urllib3 as ur\n'), ((2085, 2115), 'utils.show_svm', 'show_svm', (['cluster', 'headers_inc'], {}), '(cluster, headers_inc)\n', (2093, 2115), False, 'from utils import show_qtree, show_svm, show_volume, get_key_vo...
# -*- coding: utf-8 -*- # # Copyright ยฉ 2014, Emutex Ltd. # All rights reserved. # http://www.emutex.com # # Author: <NAME> <<EMAIL>> # Author: <NAME> <<EMAIL>> # # See license in LICENSE.txt file. # # Wiring-x86 is a Python module that lets you use Arduino like functionality # on # Intelยฎ Gaileo # Intelยฎ Gaileo Gen2...
[ "os.system", "datetime.datetime.now" ]
[((11253, 11271), 'os.system', 'os.system', (['command'], {}), '(command)\n', (11262, 11271), False, 'import os\n'), ((11042, 11065), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (11063, 11065), False, 'import datetime\n')]
""" Tests basic actions that dont use any of the ObjectAction or ObjectsAction interfaces. """ import arg from django import forms from django.core import exceptions import daf.actions import daf.rest_framework import daf.views def list_error(username): """Helps test strange error messages that are raised in the...
[ "arg.validators", "arg.val", "django.core.exceptions.ValidationError", "django.forms.CharField" ]
[((494, 520), 'arg.validators', 'arg.validators', (['list_error'], {}), '(list_error)\n', (508, 520), False, 'import arg\n'), ((797, 814), 'django.forms.CharField', 'forms.CharField', ([], {}), '()\n', (812, 814), False, 'from django import forms\n'), ((382, 427), 'django.core.exceptions.ValidationError', 'exceptions.V...
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for Apple System Log file parser.""" import unittest from plaso.formatters import asl as _ # pylint: disable=unused-import from plaso.lib import timelib from plaso.parsers import asl from tests.parsers import test_lib class ASLParserTest(test_lib.ParserTestCase):...
[ "unittest.main", "plaso.parsers.asl.ASLParser", "plaso.lib.timelib.Timestamp.CopyFromString" ]
[((2805, 2820), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2818, 2820), False, 'import unittest\n'), ((472, 487), 'plaso.parsers.asl.ASLParser', 'asl.ASLParser', ([], {}), '()\n', (485, 487), False, 'from plaso.parsers import asl\n'), ((860, 923), 'plaso.lib.timelib.Timestamp.CopyFromString', 'timelib.Timesta...
import logging import re import pytest from .common import dict_read, dict_compare_keys logger = logging.getLogger(__name__) @pytest.fixture def contacts_view_id(fs): views = fs.contacts.get_views() for v in views: if re.match('all', v['name'].lower()): return v['id'] assert False, 'Co...
[ "logging.getLogger" ]
[((98, 125), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (115, 125), False, 'import logging\n')]
# Code from Chapter 3 of Machine Learning: An Algorithmic Perspective (2nd Edition) # by <NAME> (http://stephenmonika.net) # You are free to use, change, or redistribute the code in any way you wish for # non-commercial purposes, but please maintain the name of the original author. # This code comes with no warranty ...
[ "numpy.zeros", "pcn.pcn", "cPickle.load", "gzip.open" ]
[((470, 501), 'gzip.open', 'gzip.open', (['"""mnist.pkl.gz"""', '"""rb"""'], {}), "('mnist.pkl.gz', 'rb')\n", (479, 501), False, 'import cPickle, gzip\n'), ((521, 536), 'cPickle.load', 'cPickle.load', (['f'], {}), '(f)\n', (533, 536), False, 'import cPickle, gzip\n'), ((726, 747), 'numpy.zeros', 'np.zeros', (['(nread, ...
""" Word count benchmark. """ import os import time import itertools import argparse import pandas as pd import bodo @bodo.jit def bodo_read_csv(fname): """ Paralellized version of pandas read_csv by only adding @bodo.jit decorator :param fname: file name in csv format :return: distributed pandas dat...
[ "bodo.get_rank", "bodo.gatherv", "time.time", "argparse.ArgumentParser" ]
[((389, 400), 'time.time', 'time.time', ([], {}), '()\n', (398, 400), False, 'import time\n'), ((1188, 1199), 'time.time', 'time.time', ([], {}), '()\n', (1197, 1199), False, 'import time\n'), ((1565, 1589), 'bodo.gatherv', 'bodo.gatherv', (['word_count'], {}), '(word_count)\n', (1577, 1589), False, 'import bodo\n'), (...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' FISCO BCOS/Python-SDK is a python client for FISCO BCOS2.0 (https://github.com/FISCO-BCOS/) FISCO BCOS/Python-SDK is free software: you can redistribute it and/or modify it under the terms of the MIT License as published by the Free Software Foundation. This ...
[ "client.common.common.print_output_and_input", "client.contractnote.ContractNote.get_address_history", "eth_utils.to_checksum_address", "client.common.common.check_param_num", "client.common.common.parse_input", "client.common.common.check_hash", "client.bcosclient.BcosClient", "client.common.common.p...
[((1380, 1417), 'client.common.common.print_info', 'common.print_info', (['""""""', '"""RPC commands"""'], {}), "('', 'RPC commands')\n", (1397, 1417), False, 'from client.common import common\n'), ((6078, 6118), 'client.common.common.check_param_num', 'common.check_param_num', (['params', '(1)', '(False)'], {}), '(par...
import sys import numpy as np from cv2 import BRISK_create from cv2.xfeatures2d import FREAK_create from numpy import histogramdd from skimage.color import rgb2lab, rgb2hsv from skimage.feature import local_binary_pattern, greycoprops, greycomatrix from sklearn.base import TransformerMixin from sklearn.cluster import ...
[ "skimage.feature.local_binary_pattern", "sys.path.append", "numpy.divide", "numpy.mean", "numpy.histogram", "numpy.reshape", "helpers.img_utils.tif_to_grayscale", "skimage.color.rgb2lab", "numpy.concatenate", "sklearn.preprocessing.MinMaxScaler", "cv2.xfeatures2d.FREAK_create", "helpers.img_ut...
[((392, 414), 'sys.path.append', 'sys.path.append', (['"""../"""'], {}), "('../')\n", (407, 414), False, 'import sys\n'), ((1451, 1487), 'numpy.mean', 'np.mean', (['imgs'], {'axis': 'self.pixels_axis'}), '(imgs, axis=self.pixels_axis)\n', (1458, 1487), True, 'import numpy as np\n'), ((1502, 1537), 'numpy.std', 'np.std'...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Eny sample Blink GPIO LED on Raspberry PI """ from __future__ import print_function import argparse import serial import sys import time import RPi.GPIO as GPIO import eny from gpiozero import LED global flag, flag2, flag3 flag = flag2 = flag3 = 0 def main(): """m...
[ "RPi.GPIO.cleanup", "argparse.ArgumentParser", "eny.get_port_names", "RPi.GPIO.setup", "RPi.GPIO.output", "sys.platform.startswith", "gpiozero.LED", "time.sleep", "eny.handle_double_click", "serial.Serial", "RPi.GPIO.setmode" ]
[((446, 497), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Samlle blink"""'}), "(description='Samlle blink')\n", (469, 497), False, 'import argparse\n'), ((684, 735), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Samlle blink"""'}), "(description='Samll...
# Inference should use the config with parameters that are used in training # cfg now already contains everything we've set previously. We changed it a little bit for inference: from detectron2.engine import DefaultPredictor from detectron2.utils.visualizer import ColorMode, Visualizer from detectron2.evaluation import...
[ "detectron2.utils.visualizer.Visualizer", "detectron2.evaluation.inference_on_dataset", "detectron2.data.build_detection_test_loader", "detectron2.engine.DefaultPredictor", "detectron2.evaluation.COCOEvaluator" ]
[((611, 632), 'detectron2.engine.DefaultPredictor', 'DefaultPredictor', (['cfg'], {}), '(cfg)\n', (627, 632), False, 'from detectron2.engine import DefaultPredictor\n'), ((1294, 1371), 'detectron2.evaluation.COCOEvaluator', 'COCOEvaluator', (['"""balloon_val"""', "('bbox', 'segm')", '(False)'], {'output_dir': '"""./out...
# Copyright 2018-2021 <NAME>, alvarobartt @ GitHub # See LICENSE for details. import requests from unidecode import unidecode from .utils.constant import COUNTRY_FILTERS, FLAG_FILTERS, PAIR_FILTERS, PRODUCT_FILTERS from .utils.extra import random_user_agent from .utils.search_obj import SearchObj def search_quotes(...
[ "requests.post" ]
[((6630, 6678), 'requests.post', 'requests.post', (['url'], {'headers': 'headers', 'data': 'params'}), '(url, headers=headers, data=params)\n', (6643, 6678), False, 'import requests\n'), ((10559, 10607), 'requests.post', 'requests.post', (['url'], {'data': 'params', 'headers': 'headers'}), '(url, data=params, headers=h...
#!/usr/bin/env python3 # Set this to True to enable building extensions using Cython. # Set it to False to build extensions from the C file (that # was previously created using Cython). # Set it to 'auto' to build with Cython if available, otherwise # from the C file. import sys from setuptools import find_packages, ...
[ "setuptools.find_packages" ]
[((765, 791), 'setuptools.find_packages', 'find_packages', ([], {'where': '"""src"""'}), "(where='src')\n", (778, 791), False, 'from setuptools import find_packages, setup\n')]
from typing import Type import warnings from base64 import b64encode from html import escape import json import pandas as pd import numpy as np from rdkit import Chem from rdkit.Chem import Draw from .utils import (env, requires, tooltip_formatter, mol_to_reco...
[ "warnings.filterwarnings", "IPython.display.Javascript", "rdkit.Chem.Draw.MolDrawOptions", "base64.b64encode", "pandas.DataFrame", "warnings.warn", "IPython.display.HTML", "html.escape", "rdkit.Chem.Draw.rdDepictor.SetPreferCoordGen" ]
[((567, 653), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""', '"""Consider using IPython.display.IFrame instead"""'], {}), "('ignore',\n 'Consider using IPython.display.IFrame instead')\n", (590, 653), False, 'import warnings\n'), ((3035, 3078), 'rdkit.Chem.Draw.rdDepictor.SetPreferCoordGen',...
from allennlp.common.testing import AllenNlpTestCase from allennlp.data.tokenizers.letters_digits_tokenizer import LettersDigitsTokenizer from allennlp.data.tokenizers.token import Token class TestLettersDigitsTokenizer(AllenNlpTestCase): def setup_method(self): super().setup_method() self.word_to...
[ "allennlp.data.tokenizers.token.Token", "allennlp.data.tokenizers.letters_digits_tokenizer.LettersDigitsTokenizer" ]
[((330, 354), 'allennlp.data.tokenizers.letters_digits_tokenizer.LettersDigitsTokenizer', 'LettersDigitsTokenizer', ([], {}), '()\n', (352, 354), False, 'from allennlp.data.tokenizers.letters_digits_tokenizer import LettersDigitsTokenizer\n'), ((1003, 1018), 'allennlp.data.tokenizers.token.Token', 'Token', (['"""HAL"""...
#! /usr/bin/env python # from distutils.core import setup from ginga.version import version import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name = "ginga", version = version, author = "<NAME>", author_email = "<EMAIL>", description = ("An as...
[ "os.path.dirname" ]
[((149, 174), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (164, 174), False, 'import os\n')]
import requests import os import json import string url = 'http://localhost:5000/automated_testing' fin = open('sample.txt', 'r') files = {'file': fin} try: r = requests.post(url, files=files) print("Returned Values:\n"+str(r.json())) finally: fin.close()
[ "requests.post" ]
[((168, 199), 'requests.post', 'requests.post', (['url'], {'files': 'files'}), '(url, files=files)\n', (181, 199), False, 'import requests\n')]
"""Build novel module.""" # Official Libraries from enum import auto, Enum from dataclasses import dataclass, field from typing import Any import re # My Modules from sms.commons.format import get_br, get_indent from sms.commons.format import join_descs from sms.commons.format import markdown_comment_style_of from sm...
[ "sms.utils.strtranslate.translate_tags_str", "enum.auto", "sms.syss.messages.PROC_SUCCESS.format", "sms.utils.dicts.dict_sorted", "sms.syss.messages.PROC_START.format", "sms.commons.format.get_br", "sms.db.outputsdata.OutputsData", "sms.commons.format.get_indent", "sms.syss.messages.PROC_MESSAGE.for...
[((1023, 1029), 'enum.auto', 'auto', ([], {}), '()\n', (1027, 1029), False, 'from enum import auto, Enum\n'), ((1048, 1054), 'enum.auto', 'auto', ([], {}), '()\n', (1052, 1054), False, 'from enum import auto, Enum\n'), ((1070, 1076), 'enum.auto', 'auto', ([], {}), '()\n', (1074, 1076), False, 'from enum import auto, En...
#!/usr/bin/env python # # Copyright (C) 2013-2016 DNAnexus, Inc. # # This file is part of dx-toolkit (DNAnexus platform client libraries). # # 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 a...
[ "setuptools.find_packages", "os.path.join", "os.path.dirname", "platform.system", "os.walk" ]
[((3392, 3428), 'os.walk', 'os.walk', (['"""dxpy/templating/templates"""'], {}), "('dxpy/templating/templates')\n", (3399, 3428), False, 'import os, sys, glob, platform\n'), ((2344, 2361), 'platform.system', 'platform.system', ([], {}), '()\n', (2359, 2361), False, 'import os, sys, glob, platform\n'), ((2752, 2769), 'p...
#!/usr/bin/python # coding: utf-8 # Copyright (c) 2013 Mountainstorm # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use,...
[ "os.read" ]
[((2057, 2078), 'os.read', 'os.read', (['self.s', '(1024)'], {}), '(self.s, 1024)\n', (2064, 2078), False, 'import os\n')]
from guardlib import check as t def Executor(t): return t.ExecuteCommand("p2p status") def ResultHandler(t, result): if result[0] == 0: t.MarkAsSucceed() else: t.MarkAsFailed() def Check(): c = t.Check(0, "p2p", "status") c.SetExecutor(Executor) c.SetHandler(ResultHandler) ...
[ "guardlib.check.MarkAsFailed", "guardlib.check.Check", "guardlib.check.ExecuteCommand", "guardlib.check.MarkAsSucceed" ]
[((61, 91), 'guardlib.check.ExecuteCommand', 't.ExecuteCommand', (['"""p2p status"""'], {}), "('p2p status')\n", (77, 91), True, 'from guardlib import check as t\n'), ((231, 258), 'guardlib.check.Check', 't.Check', (['(0)', '"""p2p"""', '"""status"""'], {}), "(0, 'p2p', 'status')\n", (238, 258), True, 'from guardlib im...
import os from re import sub import subprocess from distutils import spawn class ActionList: def __init__(self): self.normal_types = [ "generate_network", "generate_hybrid_model", "simulate", "simulate_ode", "simulate_ssa", "simulate_...
[ "distutils.spawn.find_executable", "subprocess.Popen", "subprocess.run", "os.path.join", "os.path.split" ]
[((12026, 12058), 'os.path.join', 'os.path.join', (['BNGPATH', '"""BNG2.pl"""'], {}), "(BNGPATH, 'BNG2.pl')\n", (12038, 12058), False, 'import os\n'), ((12705, 12766), 'subprocess.run', 'subprocess.run', (['command'], {'timeout': 'timeout', 'capture_output': '(True)'}), '(command, timeout=timeout, capture_output=True)\...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (c) 2019, <NAME> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
[ "os.chdir", "instaloader.Instaloader" ]
[((771, 786), 'os.chdir', 'chdir', (['MAINPATH'], {}), '(MAINPATH)\n', (776, 786), False, 'from os import chdir\n'), ((796, 984), 'instaloader.Instaloader', 'instaloader.Instaloader', ([], {'download_videos': '(False)', 'download_video_thumbnails': '(False)', 'download_geotags': '(False)', 'download_comments': '(False)...
from glob import glob import xarray as xr import datetime import pytz import sys from timezonefinder import TimezoneFinder from tqdm import tqdm def get_timezone(lat, lon, str_first_day): tf = TimezoneFinder(in_memory=True) timezone_str = tf.closest_timezone_at(lng=lon, lat=lat) timezone = pytz.timezone(t...
[ "pytz.timezone", "xarray.open_dataset", "timezonefinder.TimezoneFinder", "sys.exit" ]
[((199, 229), 'timezonefinder.TimezoneFinder', 'TimezoneFinder', ([], {'in_memory': '(True)'}), '(in_memory=True)\n', (213, 229), False, 'from timezonefinder import TimezoneFinder\n'), ((305, 332), 'pytz.timezone', 'pytz.timezone', (['timezone_str'], {}), '(timezone_str)\n', (318, 332), False, 'import pytz\n'), ((1037,...
from datetime import datetime import os import shutil import subprocess import tempfile import werkzeug import mosaix from climate_simulation_platform import create_app from climate_simulation_platform.db import get_file_path, save_file_to_db, upload_file def calculate_weights(body): print(f"{datetime.now()} Ca...
[ "climate_simulation_platform.db.upload_file", "subprocess.Popen", "climate_simulation_platform.db.get_file_path", "os.path.join", "climate_simulation_platform.db.save_file_to_db", "mosaix.MosaixRunner", "werkzeug.datastructures.FileStorage", "datetime.datetime.now", "climate_simulation_platform.crea...
[((370, 382), 'climate_simulation_platform.create_app', 'create_app', ([], {}), '()\n', (380, 382), False, 'from climate_simulation_platform import create_app\n'), ((586, 630), 'mosaix.MosaixRunner', 'mosaix.MosaixRunner', (['bathy_file', 'coords_file'], {}), '(bathy_file, coords_file)\n', (605, 630), False, 'import mo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.ScenicTrafficUserInfo import ScenicTrafficUserInfo from alipay.aop.api.domain.ScenicExtInfo import ScenicExtInfo from alipay.aop.api.domain.ScenicTrafficTicketInfo import ScenicTraf...
[ "alipay.aop.api.domain.ScenicTrafficTicketInfo.ScenicTrafficTicketInfo.from_alipay_dict", "alipay.aop.api.domain.ScenicExtInfo.ScenicExtInfo.from_alipay_dict", "alipay.aop.api.domain.ScenicTrafficUserInfo.ScenicTrafficUserInfo.from_alipay_dict" ]
[((1857, 1902), 'alipay.aop.api.domain.ScenicTrafficUserInfo.ScenicTrafficUserInfo.from_alipay_dict', 'ScenicTrafficUserInfo.from_alipay_dict', (['value'], {}), '(value)\n', (1895, 1902), False, 'from alipay.aop.api.domain.ScenicTrafficUserInfo import ScenicTrafficUserInfo\n'), ((2334, 2371), 'alipay.aop.api.domain.Sce...
# encoding: utf-8 """ Application related tasks for Invoke. """ from invoke import Collection from . import dependencies, env, db, run from config import BaseConfig namespace = Collection( dependencies, env, db, run, ) namespace.configure({ 'app': { 'static_root': BaseConfig.STATIC_ROOT...
[ "invoke.Collection" ]
[((181, 219), 'invoke.Collection', 'Collection', (['dependencies', 'env', 'db', 'run'], {}), '(dependencies, env, db, run)\n', (191, 219), False, 'from invoke import Collection\n')]
"""Stage ImageNet data onto local SSDs.""" import argparse import os import os.path import subprocess import time parser = argparse.ArgumentParser( description='Stage ImageNet to SSDs.') parser.add_argument( 'basedir', type=str, help='Base directory containing {train,val}.tar') def get_num_nodes(): ...
[ "os.path.join", "time.perf_counter", "argparse.ArgumentParser" ]
[((125, 187), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Stage ImageNet to SSDs."""'}), "(description='Stage ImageNet to SSDs.')\n", (148, 187), False, 'import argparse\n'), ((1386, 1405), 'time.perf_counter', 'time.perf_counter', ([], {}), '()\n', (1403, 1405), False, 'import time\n...
from anet.tasks.mnist.envs.mnist_env import MNISTEnv class MNISTEnvBinary(MNISTEnv): def __init__(self, procs=0, proc_id=-1, train=True): MNISTEnv.__init__(self, 2, procs=procs, proc_id=proc_id, train=train)
[ "anet.tasks.mnist.envs.mnist_env.MNISTEnv.__init__" ]
[((151, 220), 'anet.tasks.mnist.envs.mnist_env.MNISTEnv.__init__', 'MNISTEnv.__init__', (['self', '(2)'], {'procs': 'procs', 'proc_id': 'proc_id', 'train': 'train'}), '(self, 2, procs=procs, proc_id=proc_id, train=train)\n', (168, 220), False, 'from anet.tasks.mnist.envs.mnist_env import MNISTEnv\n')]
import logging import pandas as pd import plotly.graph_objects as go from bots import imps from gamestonk_terminal.decorators import log_start_end from gamestonk_terminal.stocks.options import yfinance_model logger = logging.getLogger(__name__) @log_start_end(log=logger) def vol_command( ticker: str = None, ...
[ "logging.getLogger", "gamestonk_terminal.stocks.options.yfinance_model.option_expirations", "gamestonk_terminal.decorators.log_start_end", "gamestonk_terminal.stocks.options.yfinance_model.get_option_chain", "pandas.merge", "plotly.graph_objects.Figure", "bots.imps.image_border", "bots.imps.inter_char...
[((220, 247), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (237, 247), False, 'import logging\n'), ((251, 276), 'gamestonk_terminal.decorators.log_start_end', 'log_start_end', ([], {'log': 'logger'}), '(log=logger)\n', (264, 276), False, 'from gamestonk_terminal.decorators import log_st...
import gzip import os import sys import torch import torch.nn as nn from torch.autograd import Variable import math import torch.nn.functional as F import numpy as np from torchtext.utils import download_from_url from pytorch_pretrained_bert import BertTokenizer, BertModel, BertForMaskedLM ## Make the the multiple att...
[ "torch.cuda.LongTensor", "pytorch_pretrained_bert.BertTokenizer.from_pretrained", "pytorch_pretrained_bert.BertModel.from_pretrained", "torch.nn.Tanh", "torch.nn.LSTM", "torch.mean", "torch.stack", "torch.cat", "torch.zeros", "torch.tensor", "torch.sum", "torch.no_grad", "torch.nn.Linear", ...
[((17846, 17871), 'torch.nn.functional.softmax', 'F.softmax', (['logits_reshape'], {}), '(logits_reshape)\n', (17855, 17871), True, 'import torch.nn.functional as F\n'), ((1132, 1167), 'torch.nn.Embedding', 'nn.Embedding', (['vocab_size', 'embedsize'], {}), '(vocab_size, embedsize)\n', (1144, 1167), True, 'import torch...
# -*- coding: utf-8 -*- #from __future__ import print_function #import pixy #from ctypes import * #from pixy import * import math as ma import numpy as np test_data = 120,100 #test input #hight = 495-114 #mm #ball parameter r_ball = 114.8 #mm 'PIXY Parameter' #pixy-cam image size in pixy-coordination delta_X_pixy =...
[ "numpy.eye", "numpy.median", "math.tan", "math.radians", "math.cos", "numpy.array", "numpy.zeros", "numpy.dot", "numpy.linalg.inv", "math.sin", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((368, 382), 'math.radians', 'ma.radians', (['(33)'], {}), '(33)\n', (378, 382), True, 'import math as ma\n'), ((449, 463), 'math.radians', 'ma.radians', (['(47)'], {}), '(47)\n', (459, 463), True, 'import math as ma\n'), ((507, 521), 'math.radians', 'ma.radians', (['(75)'], {}), '(75)\n', (517, 521), True, 'import ma...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Image conversion functionality for trivector""" from enum import Enum import numpy as np import svgwrite import cv2 import progressbar def upper_tri_sum(d3array: np.ndarray) -> np.ndarray: """Get a 3D image array's upper diagonal's pixel color average :par...
[ "numpy.sum", "cv2.imread", "svgwrite.rgb", "numpy.rot90" ]
[((3986, 4008), 'cv2.imread', 'cv2.imread', (['image_path'], {}), '(image_path)\n', (3996, 4008), False, 'import cv2\n'), ((797, 816), 'numpy.sum', 'np.sum', (['tri'], {'axis': '(0)'}), '(tri, axis=0)\n', (803, 816), True, 'import numpy as np\n'), ((1712, 1731), 'numpy.sum', 'np.sum', (['tri'], {'axis': '(0)'}), '(tri,...
from unittest.mock import patch from urllib.parse import urlencode import pytest from pyinaturalist.constants import API_V1_BASE_URL from pyinaturalist.v1 import get_taxa, get_taxa_autocomplete, get_taxa_by_id, get_taxa_map_layers from test.conftest import load_sample_data CLASS_AND_HIGHER = ['class', 'superclass', ...
[ "test.conftest.load_sample_data", "pyinaturalist.v1.get_taxa", "pyinaturalist.v1.get_taxa_autocomplete", "pytest.mark.parametrize", "pytest.raises", "pyinaturalist.v1.get_taxa_by_id", "urllib.parse.urlencode", "unittest.mock.patch", "pyinaturalist.v1.get_taxa_map_layers" ]
[((1187, 1510), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""params, expected_ranks"""', "[({'rank': 'genus'}, 'genus'), ({'min_rank': 'class'}, CLASS_AND_HIGHER), (\n {'max_rank': 'species'}, SPECIES_AND_LOWER), ({'min_rank': 'class',\n 'max_rank': 'phylum'}, CLASS_THOUGH_PHYLUM), ({'max_rank': 's...
#!/usr/bin/env python import os import sys import subprocess def make_env(merge_env={}, env=None): if env is None: env = os.environ env = env.copy() for key in merge_env.keys(): env[key] = merge_env[key] return env def run(args, quiet=False, input=None, cwd=None, env=None, merge_env={...
[ "os.path.normpath", "subprocess.Popen", "sys.exit" ]
[((338, 363), 'os.path.normpath', 'os.path.normpath', (['args[0]'], {}), '(args[0])\n', (354, 363), False, 'import os\n'), ((560, 636), 'subprocess.Popen', 'subprocess.Popen', (['args'], {'stdin': 'subprocess.PIPE', 'shell': 'shell', 'cwd': 'cwd', 'env': 'env'}), '(args, stdin=subprocess.PIPE, shell=shell, cwd=cwd, env...
import pathlib from textwrap import dedent from click.testing import CliRunner import wily.__main__ as main def test_diff_no_cache(tmpdir): runner = CliRunner() result = runner.invoke(main.cli, ["--path", tmpdir, "diff", "src/test.py"]) assert result.exit_code == 1, result.stdout def test_diff_no_path...
[ "textwrap.dedent", "click.testing.CliRunner", "pathlib.Path" ]
[((157, 168), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (166, 168), False, 'from click.testing import CliRunner\n'), ((343, 354), 'click.testing.CliRunner', 'CliRunner', ([], {}), '()\n', (352, 354), False, 'from click.testing import CliRunner\n'), ((565, 576), 'click.testing.CliRunner', 'CliRunner', ([...
from __future__ import absolute_import, division, print_function import math import os import sys import h5py import numpy as np from cctbx import factor_ev_angstrom from cctbx.eltbx import attenuation_coefficient from scitbx import matrix from scitbx.array_family import flex from dxtbx.format.FormatHDF5 import For...
[ "cctbx.eltbx.attenuation_coefficient.get_table", "scitbx.array_family.flex.bool", "numpy.logical_not", "scitbx.array_family.flex.int", "dxtbx.model.ParallaxCorrectedPxMmStrategy", "h5py.File", "numpy.ascontiguousarray", "math.cos", "scitbx.matrix.col", "numpy.empty", "dxtbx.model.detector.Detect...
[((4656, 4691), 'h5py.File', 'h5py.File', (['self.image_filename', '"""r"""'], {}), "(self.image_filename, 'r')\n", (4665, 4691), False, 'import h5py\n'), ((4897, 4932), 'h5py.File', 'h5py.File', (['self.image_filename', '"""r"""'], {}), "(self.image_filename, 'r')\n", (4906, 4932), False, 'import h5py\n'), ((6279, 631...
# -*- coding: UTF-8 -*- """ @author: auhjin @file:views.py @time:2021/06/17 """ import json import random import re from datetime import datetime from flask import request, current_app, make_response, jsonify, session from info import redis_store, constants, db from info.constants import IMAGE_CODE_REDIS_EXPIRES # fro...
[ "flask.request.args.get", "info.redis_store.get", "flask.session.pop", "flask.jsonify", "info.utils.captcha.captcha.captcha.generate_captcha", "info.redis_store.delete", "info.modules.passport.passport_blue.route", "random.randint", "flask.current_app.logger.error", "json.loads", "info.models.Us...
[((594, 642), 'info.modules.passport.passport_blue.route', 'passport_blue.route', (['"""/logout"""'], {'methods': "['POST']"}), "('/logout', methods=['POST'])\n", (613, 642), False, 'from info.modules.passport import passport_blue\n'), ((769, 816), 'info.modules.passport.passport_blue.route', 'passport_blue.route', (['...
#!/usr/bin/env python """ NAME C_stringCore DESCRIPTION 'C_stringCore' is a wrapper about a python cStringIO class. It provides a thins wrapper abstracting some simple methods to write/read to and from a StringIO object. NOTES HISTORY 06 Feb...
[ "io.StringIO" ]
[((2085, 2095), 'io.StringIO', 'StringIO', ([], {}), '()\n', (2093, 2095), False, 'from io import StringIO\n'), ((3269, 3279), 'io.StringIO', 'StringIO', ([], {}), '()\n', (3277, 3279), False, 'from io import StringIO\n')]
#!/usr/bin/env python # coding: utf-8 # In[ ]: # code to plot charts and visualize results of the chosen strategy # use plotly # In[1]: import pandas as pd import plotly.graph_objs as go from plotly.subplots import make_subplots from datetime import timedelta, datetime # In[2]: def get_breaks(df): # get ...
[ "plotly.subplots.make_subplots", "plotly.graph_objs.Indicator", "datetime.datetime.strptime", "plotly.graph_objs.Scatter", "datetime.timedelta", "plotly.graph_objs.Figure", "plotly.graph_objs.Candlestick", "plotly.graph_objs.FigureWidget" ]
[((457, 505), 'datetime.datetime.strptime', 'datetime.strptime', (['str_date', '"""%Y-%m-%d %H:%M:%S"""'], {}), "(str_date, '%Y-%m-%d %H:%M:%S')\n", (474, 505), False, 'from datetime import timedelta, datetime\n'), ((521, 569), 'datetime.datetime.strptime', 'datetime.strptime', (['end_date', '"""%Y-%m-%d %H:%M:%S"""'],...
DATA = """ { "DU1ZrX0rAncEYwLyWlwqgdEfjqA2": { "COV": { "event_code": "COV", "name": "<NAME>", "course": "FY", "registration_id": "DU1ZrX0rAncEYwLyWlwqgdEfjqA2-COV-1645969638818", "team": "", "transaction_status": "PAID", "e...
[ "json.loads", "pathlib.Path" ]
[((2998, 3014), 'json.loads', 'json.loads', (['DATA'], {}), '(DATA)\n', (3008, 3014), False, 'import json\n'), ((2842, 2864), 'pathlib.Path', 'pathlib.Path', (['__file__'], {}), '(__file__)\n', (2854, 2864), False, 'import pathlib\n')]
# # Copyright 2019 The FATE 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...
[ "fate_flow.utils.proto_compatibility.basic_meta_pb2.Endpoint", "fate_flow.utils.proto_compatibility.proxy_pb2.Conf", "grpc.server", "fate_flow.tests.grpc.xthread.ThreadPoolExecutor", "fate_flow.utils.proto_compatibility.proxy_pb2.Command", "fate_flow.settings.stat_logger.info", "fate_flow.utils.proto_co...
[((3486, 3519), 'fate_flow.tests.grpc.xthread.ThreadPoolExecutor', 'ThreadPoolExecutor', ([], {'max_workers': '(5)'}), '(max_workers=5)\n', (3504, 3519), False, 'from fate_flow.tests.grpc.xthread import ThreadPoolExecutor\n'), ((3613, 3773), 'grpc.server', 'grpc.server', (['thread_pool_executor'], {'options': '[(cygrpc...
from misc import dp, bot from features.mainFunctions import getCurrentTime from resources.links import foxLogoPreview from aiogram.types import \ InlineQuery, inline_keyboard, \ InlineQueryResultArticle, ChosenInlineResult, \ InputTextMessageContent, Cal...
[ "aiogram.dispatcher.filters.Text", "aiogram.utils.markdown.underline", "aiogram.types.inline_keyboard.InlineKeyboardMarkup", "misc.bot.answer_inline_query", "features.mainFunctions.getCurrentTime", "misc.bot.edit_message_reply_markup", "misc.bot.edit_message_text", "aiogram.types.InputTextMessageConte...
[((875, 947), 'misc.dp.inline_handler', 'dp.inline_handler', ([], {'regexp': '"""(?i)timer\\\\s*(\\\\(.+\\\\))?\\\\s*(\\\\d+[smh]){1,3}"""'}), "(regexp='(?i)timer\\\\s*(\\\\(.+\\\\))?\\\\s*(\\\\d+[smh]){1,3}')\n", (892, 947), False, 'from misc import dp, bot\n'), ((1228, 1305), 'aiogram.types.inline_keyboard.InlineKeyb...
import numpy as np import numba as nb import matplotlib.pyplot as plt from scipy import interpolate class Similarity(object): """ Class to compute the similarity between two diffraction patterns """ def __init__(self, f, g, N = None, x_range = None, l = 2.0, weight = 'cosine'): """ ...
[ "numpy.abs", "numpy.sqrt", "numba.f8", "matplotlib.pyplot.plot", "scipy.interpolate.interp1d", "numpy.max", "numpy.linspace", "matplotlib.pyplot.figure", "numpy.zeros", "numpy.cos", "numpy.min", "matplotlib.pyplot.legend", "matplotlib.pyplot.show" ]
[((1095, 1131), 'numpy.linspace', 'np.linspace', (['(-self.l)', 'self.l', 'self.N'], {}), '(-self.l, self.l, self.N)\n', (1106, 1131), True, 'import numpy as np\n'), ((1606, 1665), 'numba.f8', 'nb.f8', (['nb.f8[:]', 'nb.f8[:]', 'nb.f8', 'nb.i8', 'nb.f8[:]', 'nb.f8[:]'], {}), '(nb.f8[:], nb.f8[:], nb.f8, nb.i8, nb.f8[:]...
# Embedded file name: c:\Jenkins\live\output\win_32_static\Release\midi-remote-scripts\Push\Settings.py from Setting import OnOffSetting, EnumerableSetting from PadSensitivity import PadParameters import consts def make_pad_parameters(curve_value, threshold_value): """ Creates a valid PadParameters object merg...
[ "PadSensitivity.PadParameters", "Setting.EnumerableSetting", "Setting.OnOffSetting" ]
[((776, 872), 'PadSensitivity.PadParameters', 'PadParameters', ([], {'off_threshold': '(190)', 'on_threshold': '(210)', 'gain': '(85000)', 'curve1': '(120000)', 'curve2': '(60000)'}), '(off_threshold=190, on_threshold=210, gain=85000, curve1=\n 120000, curve2=60000)\n', (789, 872), False, 'from PadSensitivity import...
# -*- coding: utf-8 -*- # Copyright: (c) 2021, <NAME> <<EMAIL>> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.errors import AnsibleError, AnsibleFilterError from ansible.m...
[ "ansible.module_utils.common.text.converters.to_bytes", "ansible.utils.display.Display", "ansible.module_utils.common.text.converters.to_native" ]
[((2199, 2213), 'ansible.module_utils.common.text.converters.to_bytes', 'to_bytes', (['data'], {}), '(data)\n', (2207, 2213), False, 'from ansible.module_utils.common.text.converters import to_bytes, to_native\n'), ((2294, 2303), 'ansible.utils.display.Display', 'Display', ([], {}), '()\n', (2301, 2303), False, 'from a...
import datetime import logging import json import hashlib import hmac import base64 import aiohttp import asyncio from collections import deque class AzureSentinelConnectorAsync: def __init__(self, session: aiohttp.ClientSession, log_analytics_uri, workspace_id, shared_key, log_type, queue_size=1000, queue_size_b...
[ "hmac.new", "collections.deque", "logging.debug", "datetime.datetime.utcnow", "json.dumps", "asyncio.Lock", "base64.b64decode", "asyncio.sleep", "logging.info" ]
[((610, 617), 'collections.deque', 'deque', ([], {}), '()\n', (615, 617), False, 'from collections import deque\n'), ((729, 743), 'asyncio.Lock', 'asyncio.Lock', ([], {}), '()\n', (741, 743), False, 'import asyncio\n'), ((1761, 1789), 'base64.b64decode', 'base64.b64decode', (['shared_key'], {}), '(shared_key)\n', (1777...
import numpy as np import pandas as pd import tensorflow as tf import tensorflow.keras as keras from tensorflow.keras.optimizers import Adam from tensorflow.keras.metrics import categorical_crossentropy from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.callbacks import ModelCheck...
[ "numpy.unique", "pandas.read_csv", "tensorflow.keras.preprocessing.image.ImageDataGenerator", "tensorflow.keras.optimizers.Adam", "numpy.array", "tensorflow.keras.callbacks.ModelCheckpoint", "tensorflow.keras.applications.MobileNetV2" ]
[((530, 581), 'pandas.read_csv', 'pd.read_csv', (['"""Manually_CSV/training.csv"""'], {'dtype': 'str'}), "('Manually_CSV/training.csv', dtype=str)\n", (541, 581), True, 'import pandas as pd\n'), ((598, 651), 'pandas.read_csv', 'pd.read_csv', (['"""Manually_CSV/validation.csv"""'], {'dtype': 'str'}), "('Manually_CSV/val...
import argparse import logging import os import bhamon_development_toolkit.artifacts.filesets as artifact_filesets import bhamon_development_toolkit.workspace from bhamon_development_toolkit.artifacts.repository import ArtifactRepository from bhamon_development_toolkit.artifacts.server_client import create_artifact_s...
[ "logging.getLogger", "bhamon_development_toolkit.artifacts.filesets.list_files", "bhamon_development_toolkit.artifacts.filesets.check_files", "os.path.join", "bhamon_development_toolkit.artifacts.filesets.map_files", "argparse.ArgumentTypeError", "bhamon_development_toolkit.artifacts.server_client.creat...
[((344, 369), 'logging.getLogger', 'logging.getLogger', (['"""Main"""'], {}), "('Main')\n", (361, 369), False, 'import logging\n'), ((2594, 2657), 'os.path.join', 'os.path.join', (["configuration['artifact_directory']", '"""repository"""'], {}), "(configuration['artifact_directory'], 'repository')\n", (2606, 2657), Fal...
import copy import math import sys import pandas from glideinwms.frontend import glideinFrontendConfig, glideinFrontendInterface, glideinFrontendPlugins from glideinwms.lib import pubCrypto from decisionengine_modules.glideinwms import classads from decisionengine_modules.glideinwms.security import Credential, Crede...
[ "decisionengine_modules.glideinwms.security.Credential", "glideinwms.frontend.glideinFrontendConfig.ParamsDescript", "pandas.merge", "decisionengine_modules.glideinwms.classads.GlideClientClassad", "decisionengine_modules.glideinwms.classads.GlideClientGlobalClassad", "glideinwms.frontend.glideinFrontendI...
[((96704, 96722), 'pandas.DataFrame', 'pandas.DataFrame', ([], {}), '()\n', (96720, 96722), False, 'import pandas\n'), ((1713, 1730), 'decisionengine_modules.glideinwms.security.CredentialCache', 'CredentialCache', ([], {}), '()\n', (1728, 1730), False, 'from decisionengine_modules.glideinwms.security import Credential...
import datetime import inspect from io import BytesIO import os import pickle import shutil import tempfile import unittest from unittest.mock import patch import asdf import numpy from numpy.testing import assert_array_equal from scipy.sparse import csr_matrix from modelforge import configuration, storage_backend fr...
[ "modelforge.meta.generate_new_meta", "pickle.dumps", "io.BytesIO", "numpy.array", "asdf.open", "unittest.main", "pickle.loads", "unittest.mock.patch", "numpy.arange", "datetime.datetime", "os.path.exists", "modelforge.model.disassemble_sparse_matrix", "modelforge.models.GenericModel", "num...
[((2991, 3050), 'modelforge.meta.generate_new_meta', 'generate_new_meta', (['name', '"""test"""', '"""source{d}"""', '"""Proprietary"""'], {}), "(name, 'test', 'source{d}', 'Proprietary')\n", (3008, 3050), False, 'from modelforge.meta import generate_new_meta\n'), ((20727, 20742), 'unittest.main', 'unittest.main', ([],...
import unittest from nemex.similarities import EditSimilarity class TestEditSimilarity(unittest.TestCase): def setUp(self) -> None: self.sim = EditSimilarity() return None def test_OST(self): self.assertEqual(-2, self.sim.find_tau_min_overlap(1, 1, 0.2, 2)) self.assertEqual(...
[ "unittest.main", "nemex.similarities.EditSimilarity" ]
[((4002, 4017), 'unittest.main', 'unittest.main', ([], {}), '()\n', (4015, 4017), False, 'import unittest\n'), ((159, 175), 'nemex.similarities.EditSimilarity', 'EditSimilarity', ([], {}), '()\n', (173, 175), False, 'from nemex.similarities import EditSimilarity\n')]
# coding=utf-8 # Copyright 2020 The HuggingFace Team 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 clone of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
[ "torch.manual_seed", "torch.ones_like", "transformers.generation_logits_process.TopPLogitsWarper", "transformers.generation_logits_process.NoBadWordsLogitsProcessor", "transformers.generation_logits_process.MinLengthLogitsProcessor", "transformers.generation_logits_process.NoRepeatNGramLogitsProcessor", ...
[((740, 760), 'transformers.is_torch_available', 'is_torch_available', ([], {}), '()\n', (758, 760), False, 'from transformers import is_torch_available\n'), ((1519, 1545), 'torch.ones_like', 'torch.ones_like', (['input_ids'], {}), '(input_ids)\n', (1534, 1545), False, 'import torch\n'), ((3948, 4221), 'transformers.ge...
import os def connect(func): def auth(**kwargs): user = kwargs['user'] if kwargs.get('user') else os.environ.get('RBMQ_USER') password = kwargs['pass'] if kwargs.get('pass') else os.environ.get('RBMQ_PASS') host = kwargs['host'] if kwargs.get('host') else os.environ.get('RBMQ_HOST') ...
[ "os.environ.get" ]
[((112, 139), 'os.environ.get', 'os.environ.get', (['"""RBMQ_USER"""'], {}), "('RBMQ_USER')\n", (126, 139), False, 'import os\n'), ((201, 228), 'os.environ.get', 'os.environ.get', (['"""RBMQ_PASS"""'], {}), "('RBMQ_PASS')\n", (215, 228), False, 'import os\n'), ((286, 313), 'os.environ.get', 'os.environ.get', (['"""RBMQ...
import typing import cv2 import numpy as np from numpy.lib.polynomial import poly import streamlit as st import plotly.express as px import plotly.graph_objects as go from utils.configs import IMAGES, DetectionConfig, RunningModes from utils.configs import default_config from utils.configs import birds_config from ut...
[ "streamlit.image", "numpy.array", "cv2.imdecode", "utils.configs.DetectionConfig", "cv2.threshold", "streamlit.warning", "streamlit.sidebar.header", "streamlit.sidebar.checkbox", "streamlit.sidebar.markdown", "streamlit.sidebar.slider", "streamlit.set_page_config", "streamlit.markdown", "cv2...
[((551, 567), 'cv2.imread', 'cv2.imread', (['path'], {}), '(path)\n', (561, 567), False, 'import cv2\n'), ((663, 699), 'cv2.cvtColor', 'cv2.cvtColor', (['img', 'cv2.COLOR_BGR2RGB'], {}), '(img, cv2.COLOR_BGR2RGB)\n', (675, 699), False, 'import cv2\n'), ((819, 856), 'cv2.cvtColor', 'cv2.cvtColor', (['img', 'cv2.COLOR_RG...
import os from Omnipresent import len_ from Downloader.VisualizeHistory import loadHistory from ResultsGraphing.custom import finally_show, plot_2x2_detailed, count_averages, save_plot, boxplots_in_row, boxplots_in_row_custom611, plot_two_together, plot_together dir_folder = os.path.dirname(os.path.abspath(__file__)) ...
[ "ResultsGraphing.custom.count_averages", "ResultsGraphing.custom.save_plot", "ResultsGraphing.custom.finally_show", "Downloader.VisualizeHistory.loadHistory", "os.path.abspath", "ResultsGraphing.custom.boxplots_in_row_custom611", "ResultsGraphing.custom.plot_together" ]
[((2679, 2749), 'ResultsGraphing.custom.plot_together', 'plot_together', (['special_histories', 'names_to_print', 'colors', 'custom_title'], {}), '(special_histories, names_to_print, colors, custom_title)\n', (2692, 2749), False, 'from ResultsGraphing.custom import finally_show, plot_2x2_detailed, count_averages, save_...
import asyncio import time from pathlib import Path import idom from idom.testing import ServerMountPoint from tests.driver_utils import send_keys JS_DIR = Path(__file__).parent / "js" def test_automatic_reconnect(create_driver): # we need to wait longer here because the automatic reconnect is not instance ...
[ "pathlib.Path", "idom.Ref", "tests.driver_utils.send_keys", "idom.html.p", "idom.testing.ServerMountPoint", "asyncio.sleep", "idom.hooks.use_state", "idom.html.input" ]
[((515, 533), 'idom.testing.ServerMountPoint', 'ServerMountPoint', ([], {}), '()\n', (531, 533), False, 'from idom.testing import ServerMountPoint\n'), ((892, 906), 'idom.Ref', 'idom.Ref', (['None'], {}), '(None)\n', (900, 906), False, 'import idom\n'), ((3533, 3553), 'tests.driver_utils.send_keys', 'send_keys', (['inp...
import sys import yaml class Config: def __init__(self, cfg=None): self.cfg = {} if cfg is not None: self.update(cfg) def __getattribute__(self, name): cfg = object.__getattribute__(self, 'cfg') if name not in cfg: return object.__getattribute__(self, n...
[ "yaml.load" ]
[((1575, 1607), 'yaml.load', 'yaml.load', (['f'], {'Loader': 'yaml.Loader'}), '(f, Loader=yaml.Loader)\n', (1584, 1607), False, 'import yaml\n')]
""" Copyright (c) 2021, WSO2 Inc. (http://www.wso2.com). All Rights Reserved. This software is the property of WSO2 Inc. and its suppliers, if any. Dissemination of any information or reproduction of any material contained herein is strictly forbidden, unless permitted by WSO2 in accordance with the WSO2 Comme...
[ "numpy.abs", "sklearn.preprocessing.LabelEncoder", "numpy.copy", "pymc3.find_MAP", "pandas.read_csv", "pymc3.gp.Marginal", "pymc3.sample_posterior_predictive", "sklearn.utils.shuffle", "pymc3.gp.cov.Polynomial", "csv.writer", "sklearn.metrics.mean_squared_error", "numpy.square", "numpy.array...
[((3210, 3244), 'pandas.read_csv', 'pd.read_csv', (['"""dataset/dataset.csv"""'], {}), "('dataset/dataset.csv')\n", (3221, 3244), True, 'import pandas as pd\n'), ((3477, 3491), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (3489, 3491), False, 'from sklearn.preprocessing import LabelEncoder\n'...
# Copyright 2016 United States Government as represented by the Administrator # of the National Aeronautics and Space Administration. All Rights Reserved. # # Portion of this code is Copyright Geoscience Australia, Licensed under the # Apache License, Version 2.0 (the "License"); you may not use this file # except in c...
[ "os.environ.setdefault", "celery.Celery" ]
[((1142, 1214), 'os.environ.setdefault', 'os.environ.setdefault', (['"""DJANGO_SETTINGS_MODULE"""', '"""data_cube_ui.settings"""'], {}), "('DJANGO_SETTINGS_MODULE', 'data_cube_ui.settings')\n", (1163, 1214), False, 'import os\n'), ((1221, 1323), 'celery.Celery', 'Celery', (['"""data_cube_ui"""'], {'broker': 'settings.C...
# Generated by Django 4.0 on 2021-12-23 18:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tutoriais', '0001_initial'), ] operations = [ migrations.AddField( model_name='tutorial', name='nome', fie...
[ "django.db.models.CharField" ]
[((323, 366), 'django.db.models.CharField', 'models.CharField', ([], {'default': '(1)', 'max_length': '(254)'}), '(default=1, max_length=254)\n', (339, 366), False, 'from django.db import migrations, models\n'), ((527, 559), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(254)'}), '(max_length=2...
from django.core.management.base import BaseCommand, CommandError from events.models import Event class Command(BaseCommand): help = "Copies talk title and descriptions from the application." def add_arguments(self, parser): parser.add_argument('event_id', type=int) def handle(self, *args, **op...
[ "events.models.Event.objects.filter", "django.core.management.base.CommandError" ]
[((783, 829), 'django.core.management.base.CommandError', 'CommandError', (['"""No talks or workshops matched."""'], {}), "('No talks or workshops matched.')\n", (795, 829), False, 'from django.core.management.base import BaseCommand, CommandError\n'), ((384, 417), 'events.models.Event.objects.filter', 'Event.objects.f...
# Copyright 2020 ByteDance 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...
[ "neurst.utils.compat.get_distributed_worker_setting", "absl.logging.info", "tensorflow.data.Dataset.list_files", "tensorflow.sparse.to_dense", "tensorflow.train.Example", "tensorflow.io.gfile.glob", "tensorflow.data.Options", "tensorflow.less", "tensorflow.size", "tensorflow.io.gfile.exists", "t...
[((3557, 3604), 'tensorflow.constant', 'tf.constant', (['bucket_batch_sizes'], {'dtype': 'tf.int64'}), '(bucket_batch_sizes, dtype=tf.int64)\n', (3568, 3604), True, 'import tensorflow as tf\n'), ((7693, 7753), 'tensorflow.data.Dataset.list_files', 'tf.data.Dataset.list_files', (['_features_files'], {'shuffle': 'shuffle...
"""Provides the `MonopileDesign` class.""" __author__ = "<NAME>" __copyright__ = "Copyright 2020, National Renewable Energy Laboratory" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" from math import pi, log from scipy.optimize import fsolve from ORBIT.core.defaults import common_costs from ORBIT.phases.design im...
[ "scipy.optimize.fsolve", "math.log" ]
[((5404, 5450), 'scipy.optimize.fsolve', 'fsolve', (['self.pile_diam_equation', '(10)'], {'args': 'data'}), '(self.pile_diam_equation, 10, args=data)\n', (5410, 5450), False, 'from scipy.optimize import fsolve\n'), ((17039, 17067), 'math.log', 'log', (['(1 - 0.98 ** (1 / 52596))'], {}), '(1 - 0.98 ** (1 / 52596))\n', (...
import os import cv2 import copy import numpy as np import torch import matplotlib.pyplot as plt from tqdm import tqdm from config import system_configs import math import external.nms as nms def _rescale_points(dets, ratios, borders, sizes): xs, ys = dets[:, :, 0], dets[:, :, 1] xs += borders[0, 2] ys ...
[ "numpy.clip", "cv2.imwrite", "matplotlib.pyplot.savefig", "math.ceil", "cv2.resize", "math.floor", "matplotlib.pyplot.Axes", "torch.from_numpy", "matplotlib.pyplot.close", "numpy.array", "matplotlib.pyplot.figure", "numpy.zeros", "torch.cuda.is_available", "copy.deepcopy", "torch.no_grad...
[((390, 425), 'numpy.clip', 'np.clip', (['xs', '(0)', 'sizes[0, 1]'], {'out': 'xs'}), '(xs, 0, sizes[0, 1], out=xs)\n', (397, 425), True, 'import numpy as np\n'), ((430, 465), 'numpy.clip', 'np.clip', (['ys', '(0)', 'sizes[0, 0]'], {'out': 'ys'}), '(ys, 0, sizes[0, 0], out=ys)\n', (437, 465), True, 'import numpy as np\...
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from swagger_server.models.base_model_ import Model from swagger_server import util class CookieEncoded(Model): """NOTE: This class is auto generated by the swagg...
[ "swagger_server.util.deserialize_model" ]
[((1371, 1404), 'swagger_server.util.deserialize_model', 'util.deserialize_model', (['dikt', 'cls'], {}), '(dikt, cls)\n', (1393, 1404), False, 'from swagger_server import util\n')]
import numpy as np from scipy.signal import iirnotch, firwin, filtfilt, lfilter, freqz from matplotlib import pyplot as plt import nibabel as nb import subprocess import math def add_afni_prefix(tpattern): if tpattern: if ".txt" in tpattern: tpattern = "@{0}".format(tpattern) return tpatte...
[ "subprocess.check_output", "numpy.mean", "matplotlib.pyplot.savefig", "nibabel.load", "scipy.signal.firwin", "scipy.signal.iirnotch", "numpy.floor", "numpy.diff", "numpy.loadtxt", "scipy.signal.lfilter", "numpy.savetxt", "scipy.signal.freqz", "matplotlib.pyplot.subplots", "numpy.divide" ]
[((590, 608), 'nibabel.load', 'nb.load', (['func_file'], {}), '(func_file)\n', (597, 608), True, 'import nibabel as nb\n'), ((3832, 3857), 'numpy.loadtxt', 'np.loadtxt', (['motion_params'], {}), '(motion_params)\n', (3842, 3857), True, 'import numpy as np\n'), ((5890, 5918), 'scipy.signal.freqz', 'freqz', (['b_filt', '...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.auth.models import django.utils.timezone from django.conf import settings import django.core.validators import forum.models class Migration(migrations.Migration): dependencies = [ ...
[ "django.db.models.EmailField", "django.db.models.ForeignKey", "django.db.models.IntegerField", "django.db.models.ManyToManyField", "django.db.models.BooleanField", "django.db.models.SlugField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.URLField", "django.db....
[((10876, 10934), 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'blank': '(True)', 'to': '"""forum.Topic"""', 'null': '(True)'}), "(blank=True, to='forum.Topic', null=True)\n", (10893, 10934), False, 'from django.db import models, migrations\n'), ((11068, 11159), 'django.db.models.ForeignKey', 'models.Forei...
__author__ = 'shikun' import math from common import log def phone_avg_use_cpu(cpu): result = "0%" if len(cpu) > 0: result = "%.1f" % (sum(cpu) / len(cpu)) + "%" return result def phone_avg_use_raw(men): result = "0M" if len(men) > 0: result = str(math.ceil(sum(men) / len(men) / ...
[ "math.ceil" ]
[((698, 712), 'math.ceil', 'math.ceil', (['raw'], {}), '(raw)\n', (707, 712), False, 'import math\n')]
""" Veritabanฤฑ Nedir? Veri setlerinin saklanฤฑp tutulduฤŸu ve ihtiyaรง duyulduฤŸunda veriye ulaลŸฤฑlฤฑp kullanฤฑlan yapฤฑlardฤฑr. Piyasada รงoฤŸunlukla iliลŸkisel veritabanlarฤฑ kullanฤฑlฤฑr. Bu sayede id'lerle birรงok tabloyu ilลŸkilendirebiliyoruz. Birรงok veritabanฤฑ sistemi vardฤฑr. Bunlardan birkaรง tanesi: ...
[ "sqlite3.connect" ]
[((636, 671), 'sqlite3.connect', 'sqlite3.connect', (['"""files/chinook.db"""'], {}), "('files/chinook.db')\n", (651, 671), False, 'import sqlite3\n')]
############################################################################ # Copyright(c) Open Law Library. All rights reserved. # # See ThirdPartyNotices.txt in the project root for additional notices. # # # # Licensed u...
[ "pygls.lsp.types.DocumentLinkOptions", "pygls.lsp.types.ExecuteCommandOptions", "pygls.lsp.types.TypeDefinitionOptions", "pygls.lsp.types.TextDocumentSyncOptionsServerCapabilities", "pygls.lsp.types.CodeLensOptions", "pygls.lsp.types.WorkspaceFoldersServerCapabilities", "pygls.lsp.types.CompletionOption...
[((3069, 3089), 'pygls.lsp.types.ServerCapabilities', 'ServerCapabilities', ([], {}), '()\n', (3087, 3089), False, 'from pygls.lsp.types import CodeLensOptions, CompletionOptions, DocumentLinkOptions, ExecuteCommandOptions, ImplementationOptions, SaveOptions, ServerCapabilities, SignatureHelpOptions, TextDocumentSyncOp...
from operator import ior from functools import reduce from decimal import Decimal from urllib.parse import urlparse from django.conf import settings from django.urls import reverse from django.db import models from django.db.models import Q from django.db.models.signals import post_save, pre_delete from django.dispat...
[ "mezzanine.generic.fields.CommentsField", "django.db.models.OneToOneField", "django.db.models.TextField", "urllib.parse.urlparse", "mezzanine.generic.fields.RatingField", "django.db.models.IntegerField", "mezzanine.generic.models.Keyword.objects.filter", "django.db.models.F", "mezzanine.utils.import...
[((3421, 3455), 'django.dispatch.receiver', 'receiver', (['post_save'], {'sender': 'Rating'}), '(post_save, sender=Rating)\n', (3429, 3455), False, 'from django.dispatch import receiver\n'), ((3457, 3492), 'django.dispatch.receiver', 'receiver', (['pre_delete'], {'sender': 'Rating'}), '(pre_delete, sender=Rating)\n', (...
import os import copy import json import logging import torch from torch.utils.data import TensorDataset logger = logging.getLogger(__name__) class InputExample(object): """ A single training/test example for simple sequence classification. Args: guid: Unique id for the example. text_a...
[ "logging.getLogger", "os.path.exists", "torch.load", "os.path.join", "torch.utils.data.TensorDataset", "torch.tensor", "torch.save", "copy.deepcopy" ]
[((117, 144), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (134, 144), False, 'import logging\n'), ((6659, 6704), 'os.path.join', 'os.path.join', (['args.data_dir', 'cached_file_name'], {}), '(args.data_dir, cached_file_name)\n', (6671, 6704), False, 'import os\n'), ((6712, 6748), 'os.p...
""" Tests for tool parameters, more tests exist in test_data_parameters.py and test_select_parameters.py. """ from galaxy import model from galaxy.util import bunch from tools_support import datatypes_registry from .test_parameter_parsing import BaseParameterTestCase class DataColumnParameterTestCase(BaseParameterT...
[ "tools_support.datatypes_registry.get_datatype_by_extension", "galaxy.model.HistoryDatasetAssociation", "galaxy.util.bunch.Bunch", "galaxy.model.History" ]
[((2475, 2490), 'galaxy.model.History', 'model.History', ([], {}), '()\n', (2488, 2490), False, 'from galaxy import model\n'), ((3085, 3100), 'galaxy.model.History', 'model.History', ([], {}), '()\n', (3098, 3100), False, 'from galaxy import model\n'), ((3179, 3292), 'galaxy.model.HistoryDatasetAssociation', 'model.His...
import time import logging from typing import Tuple from argparse import ArgumentParser from pathlib import Path from jinja2 import Environment, PackageLoader from .log import initialize_log from .mirror import download_pkgs, platform_tarballs from .pool import upload_files _logger = logging.getLogger(__file__) def...
[ "logging.getLogger", "argparse.ArgumentParser", "pathlib.Path", "time.strftime", "jinja2.PackageLoader" ]
[((287, 314), 'logging.getLogger', 'logging.getLogger', (['__file__'], {}), '(__file__)\n', (304, 314), False, 'import logging\n'), ((1051, 1120), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '"""create airgap archive of conda channels"""'}), "(description='create airgap archive of conda channels')...
# Carl is free software; you can redistribute it and/or modify it # under the terms of the Revised BSD License; see LICENSE file for # more details. import numpy as np import theano.tensor as T import theano.sandbox.linalg as linalg from sklearn.utils import check_random_state from . import TheanoDistribution from ....
[ "theano.tensor.exp", "sklearn.utils.check_random_state", "numpy.sqrt", "theano.sandbox.linalg.matrix_inverse", "theano.sandbox.linalg.det", "theano.tensor.abs_", "theano.tensor.erfinv", "theano.sandbox.linalg.cholesky", "theano.tensor.log", "theano.tensor.dot" ]
[((2187, 2214), 'theano.sandbox.linalg.cholesky', 'linalg.cholesky', (['self.sigma'], {}), '(self.sigma)\n', (2202, 2214), True, 'import theano.sandbox.linalg as linalg\n'), ((2235, 2257), 'theano.sandbox.linalg.det', 'linalg.det', (['self.sigma'], {}), '(self.sigma)\n', (2245, 2257), True, 'import theano.sandbox.linal...
import requests def main(): ## we define a request object that is equal to requests.get('API') req = requests.get('http://10.132.16.56:8000/sendjson') 'http://192.168.1.61:8080/api/call' ## we then print out the http status_code that was returned on making this request ## you should see a successf...
[ "requests.get" ]
[((110, 159), 'requests.get', 'requests.get', (['"""http://10.132.16.56:8000/sendjson"""'], {}), "('http://10.132.16.56:8000/sendjson')\n", (122, 159), False, 'import requests\n')]
import ssl, random, smtplib from db import session from fastapi import status, APIRouter, Depends from datetime import timedelta, datetime from pydantic import EmailStr from session_token import SECRET_KEY, ALGORITHM from jose import jwt from email.header import Header from email.utils import formataddr from email.mime...
[ "starlette.responses.RedirectResponse", "config.OriginSettings", "random.randrange", "datetime.datetime.utcnow", "ssl.create_default_context", "smtplib.SMTP_SSL", "jose.jwt.decode", "jose.jwt.encode", "fastapi.APIRouter", "email.mime.multipart.MIMEMultipart", "config.EmailSettings", "email.hea...
[((616, 627), 'fastapi.APIRouter', 'APIRouter', ([], {}), '()\n', (625, 627), False, 'from fastapi import status, APIRouter, Depends\n'), ((631, 642), 'functools.lru_cache', 'lru_cache', ([], {}), '()\n', (640, 642), False, 'from functools import lru_cache\n'), ((691, 702), 'functools.lru_cache', 'lru_cache', ([], {}),...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import collections import ctypes import numpy import warnings from nidaqmx._lib import ( lib_importer, wrapped_ndpointer, ctypes_byte_str, c_bool32) from nidaqmx.err...
[ "nidaqmx.errors.check_for_error", "nidaqmx.utils.flatten_channel_string", "ctypes.byref", "ctypes.POINTER", "nidaqmx.errors.is_string_buffer_too_small", "nidaqmx.system._watchdog_modules.expiration_state.ExpirationState", "numpy.float64", "nidaqmx._lib.wrapped_ndpointer", "nidaqmx.constants.Edge", ...
[((2444, 2471), 'nidaqmx._lib.lib_importer.task_handle', 'lib_importer.task_handle', (['(0)'], {}), '(0)\n', (2468, 2471), False, 'from nidaqmx._lib import lib_importer, wrapped_ndpointer, ctypes_byte_str, c_bool32\n'), ((2964, 2991), 'nidaqmx.errors.check_for_error', 'check_for_error', (['error_code'], {}), '(error_co...
import numpy as np import scipy.sparse as ssp import torch from beta_rec.models.torch_engine import ModelEngine from beta_rec.utils.common_util import timeit def top_k(values, k, exclude=[]): """Return the indices of the k items with the highest value in the list of values. Exclude the ids from the list "ex...
[ "torch.tensor", "numpy.zeros", "numpy.ones" ]
[((3752, 3772), 'torch.tensor', 'torch.tensor', (['scores'], {}), '(scores)\n', (3764, 3772), False, 'import torch\n'), ((716, 726), 'numpy.ones', 'np.ones', (['n'], {}), '(n)\n', (723, 726), True, 'import numpy as np\n'), ((734, 745), 'numpy.zeros', 'np.zeros', (['n'], {}), '(n)\n', (742, 745), True, 'import numpy as ...
# Project Quex (http://quex.sourceforge.net); License: MIT; # (C) 2005-2020 <NAME>; #_______________________________________________________________________________ from quex.engine.operations.operation_list import Op, OpList from quex.engine.analyzer.state.entry_action import TransitionID, Tra...
[ "quex.engine.misc.tools.typed", "quex.engine.analyzer.state.entry_action.TransitionAction", "quex.engine.analyzer.door_id_address_label.DoorID.state_machine_entry", "quex.engine.misc.tools.TypedDict", "quex.engine.analyzer.state.entry_action.TransitionID", "quex.engine.operations.operation_list.Op.StoreIn...
[((4740, 4756), 'quex.engine.misc.tools.typed', 'typed', ([], {'Cl': 'OpList'}), '(Cl=OpList)\n', (4745, 4756), False, 'from quex.engine.misc.tools import typed, TypedDict\n'), ((4903, 4936), 'quex.engine.misc.tools.typed', 'typed', ([], {'TheAction': 'TransitionAction'}), '(TheAction=TransitionAction)\n', (4908, 4936)...
"""Second stage: Composition""" # Third party imports import panel as pn import param import pyplugs # Geo:N:G imports from app import config from app.assets import panes from app.assets import state from geong_common import config as geong_config from geong_common import readers from geong_common.data import net_gro...
[ "app.assets.panes.headline", "panel.layout.Spacer", "app.assets.panes.previous_stage_button", "param.Dict", "panel.pane.Alert", "param.Integer", "panel.indicators.Number.from_param", "param.output", "app.assets.state.get_user_state", "geong_common.readers.read_model", "param.depends", "app.ass...
[((776, 788), 'param.Dict', 'param.Dict', ([], {}), '()\n', (786, 788), False, 'import param\n'), ((814, 826), 'param.Dict', 'param.Dict', ([], {}), '()\n', (824, 826), False, 'import param\n'), ((1856, 1896), 'param.depends', 'param.depends', (['*ALL_ELEMENTS'], {'watch': '(True)'}), '(*ALL_ELEMENTS, watch=True)\n', (...
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
[ "future.standard_library.install_aliases", "moldesign.utils.Alias", "os.path.join", "moldesign.utils.CompressedJsonDbm" ]
[((131, 165), 'future.standard_library.install_aliases', 'standard_library.install_aliases', ([], {}), '()\n', (163, 165), False, 'from future import standard_library\n'), ((1892, 1956), 'os.path.join', 'os.path.join', (['PACKAGEPATH', '"""_static_data"""', '"""chemical_components"""'], {}), "(PACKAGEPATH, '_static_dat...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: robot_states.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.protobuf import reflection as _...
[ "google.protobuf.symbol_database.Default", "google.protobuf.descriptor.FieldDescriptor" ]
[((485, 511), 'google.protobuf.symbol_database.Default', '_symbol_database.Default', ([], {}), '()\n', (509, 511), True, 'from google.protobuf import symbol_database as _symbol_database\n'), ((1504, 1803), 'google.protobuf.descriptor.FieldDescriptor', '_descriptor.FieldDescriptor', ([], {'name': '"""id"""', 'full_name'...
# 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 app...
[ "labeling.LabelingNet", "paddle.metric.Accuracy", "paddle.Model", "paddle.vision.transforms.Normalize", "paddle.vision.datasets.MNIST", "paddle.nn.CrossEntropyLoss", "rounding.RoundingNet", "paddle.to_tensor", "paddle.nn.Linear", "topk.TopKNet" ]
[((1550, 1613), 'paddle.vision.datasets.MNIST', 'paddle.vision.datasets.MNIST', ([], {'mode': '"""train"""', 'transform': 'transform'}), "(mode='train', transform=transform)\n", (1578, 1613), False, 'import paddle\n'), ((1633, 1695), 'paddle.vision.datasets.MNIST', 'paddle.vision.datasets.MNIST', ([], {'mode': '"""test...
# -*- coding: utf-8 -*- """ bromelia.messages ~~~~~~~~~~~~~~~~~ This module contains the Diameter protocol base messages. :copyright: (c) 2020-present <NAME>. :license: MIT, see LICENSE for more details. """ import platform import socket from .avps import * from .base import DiameterAnswer, Diam...
[ "platform.node", "socket.getfqdn" ]
[((1695, 1710), 'platform.node', 'platform.node', ([], {}), '()\n', (1708, 1710), False, 'import platform\n'), ((1742, 1758), 'socket.getfqdn', 'socket.getfqdn', ([], {}), '()\n', (1756, 1758), False, 'import socket\n'), ((3979, 3994), 'platform.node', 'platform.node', ([], {}), '()\n', (3992, 3994), False, 'import pla...
"""Module for launching MAPDL locally or connecting to a remote instance with gRPC.""" import platform from glob import glob import re import warnings import os import appdirs import tempfile import socket import time import subprocess from ansys.mapdl import core as pymapdl from ansys.mapdl.core.misc import is_float...
[ "appdirs.user_data_dir", "time.sleep", "ansys.mapdl.core.mapdl_corba.MapdlCorba", "os.remove", "os.listdir", "subprocess.Popen", "ansys.mapdl.core.licensing.LicenseChecker", "ansys.mapdl.core.mapdl_console.MapdlConsole", "platform.platform", "os.path.isdir", "os.mkdir", "warnings.warn", "ans...
[((684, 725), 'appdirs.user_data_dir', 'appdirs.user_data_dir', (['"""ansys_mapdl_core"""'], {}), "('ansys_mapdl_core')\n", (705, 725), False, 'import appdirs\n'), ((984, 1024), 'os.path.join', 'os.path.join', (['SETTINGS_DIR', '"""config.txt"""'], {}), "(SETTINGS_DIR, 'config.txt')\n", (996, 1024), False, 'import os\n...
from rknn.api import RKNN class RKNN_model_container(): def __init__(self, model_path, target=None, device_id=None) -> None: rknn = RKNN() # Direct Load RKNN Model rknn.load_rknn(model_path) print('--> Init runtime environment') if target==None: ret = rknn.ini...
[ "rknn.api.RKNN" ]
[((146, 152), 'rknn.api.RKNN', 'RKNN', ([], {}), '()\n', (150, 152), False, 'from rknn.api import RKNN\n')]
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import types import sys from mecabwrap.api import tokenize, str_token, mecab_batch, mecab_batch_iter, Token, MecabTokenizer class TestTokenize(unittest.TestCase): def test_tokenize(self): tokens = tokenize(u'ใ™ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใฎใ†ใก') words = [a.s...
[ "mecabwrap.api.mecab_batch_iter", "mecabwrap.api.tokenize", "mecabwrap.api.mecab_batch", "mecabwrap.api.MecabTokenizer", "unittest.main" ]
[((3479, 3494), 'unittest.main', 'unittest.main', ([], {}), '()\n', (3492, 3494), False, 'import unittest\n'), ((274, 299), 'mecabwrap.api.tokenize', 'tokenize', (['u"""ใ™ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใฎใ†ใก"""'], {}), "(u'ใ™ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใ‚‚ใฎใ†ใก')\n", (282, 299), False, 'from mecabwrap.api import tokenize, str_token, mecab_batch, mecab_batch_iter, Token,...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'res/ItemWidget.ui', # licensing of 'res/ItemWidget.ui' applies. # # Created: Wed Jul 24 14:22:57 2019 # by: pyside2-uic running on PySide2 5.13.0 # # WARNING! All changes made in this file will be lost! from PySide2 import QtCore, QtG...
[ "PySide2.QtWidgets.QApplication.translate", "PySide2.QtWidgets.QProgressBar", "PySide2.QtCore.QMetaObject.connectSlotsByName", "PySide2.QtWidgets.QHBoxLayout", "PySide2.QtWidgets.QLabel", "PySide2.QtWidgets.QVBoxLayout" ]
[((514, 547), 'PySide2.QtWidgets.QHBoxLayout', 'QtWidgets.QHBoxLayout', (['ItemWidget'], {}), '(ItemWidget)\n', (535, 547), False, 'from PySide2 import QtCore, QtGui, QtWidgets\n'), ((642, 670), 'PySide2.QtWidgets.QLabel', 'QtWidgets.QLabel', (['ItemWidget'], {}), '(ItemWidget)\n', (658, 670), False, 'from PySide2 impo...