code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
from django.contrib.auth.models import User from rest_framework import serializers from rest_framework.fields import Field, CharField from .models import ChatSession, Chat, UserChatStatus, Message class UUIDFieldSerializerMixin(serializers.ModelSerializer): """ Django REST Framework does not know what to do...
[ "rest_framework.fields.CharField", "rest_framework.serializers.SerializerMethodField", "rest_framework.fields.Field" ]
[((755, 784), 'rest_framework.fields.Field', 'Field', ([], {'source': '"""user.username"""'}), "(source='user.username')\n", (760, 784), False, 'from rest_framework.fields import Field, CharField\n'), ((1061, 1108), 'rest_framework.serializers.SerializerMethodField', 'serializers.SerializerMethodField', (['"""get_statu...
# -*- coding: utf-8 -*- """ SUMMER RESEARCH 2016/2017/2018 ASSIGNMENT: Plot correlations AUTHOR: <NAME> (<EMAIL>) SUPERVISOR: <NAME> VERSION: 2019-Mar-25 PURPOSE: Plot various parameters from multiple data tables while calculating Spearman rank correlations and ...
[ "numpy.log10", "numpy.column_stack", "numpy.count_nonzero", "time.ctime", "scipy.linalg.lstsq", "numpy.where", "numpy.delete", "matplotlib.pyplot.xlabel", "numpy.asarray", "numpy.ma.compressed", "scipy.stats.spearmanr", "numpy.ones", "numpy.ma.array", "numpy.isnan", "warnings.filterwarni...
[((811, 869), 'warnings.filterwarnings', 'warnings.filterwarnings', (['"""ignore"""'], {'category': 'RuntimeWarning'}), "('ignore', category=RuntimeWarning)\n", (834, 869), False, 'import warnings\n'), ((935, 967), 'astropy.io.ascii.read', 'ascii.read', (['"""accept_catalog.csv"""'], {}), "('accept_catalog.csv')\n", (9...
import os import pandas_datareader os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' from tensorflow import keras import pandas import pandas as pd import plotly.express as px import pandas_datareader.data as web from sklearn.model_selection import train_test_split from sklearn.preprocessing import MinMaxScaler ...
[ "tensorflow.keras.layers.Input", "numpy.reshape", "tensorflow.keras.Model", "pandas_datareader.data.DataReader", "sklearn.model_selection.train_test_split", "tensorflow.keras.layers.LSTM", "plotly.express.line", "tensorflow.keras.layers.Dense", "pandas.DataFrame", "sklearn.preprocessing.MinMaxScal...
[((3244, 3278), 'sklearn.preprocessing.MinMaxScaler', 'MinMaxScaler', ([], {'feature_range': '(0, 1)'}), '(feature_range=(0, 1))\n', (3256, 3278), False, 'from sklearn.preprocessing import MinMaxScaler\n'), ((3650, 3689), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'Y'], {'train_size': '(0.65...
# coding: utf-8 """ NiFi Rest Api The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ...
[ "six.iteritems" ]
[((7815, 7844), 'six.iteritems', 'iteritems', (['self.swagger_types'], {}), '(self.swagger_types)\n', (7824, 7844), False, 'from six import iteritems\n')]
""" Ludolph: Monitoring Jabber Bot Original Library: Copyright (C) 2011 <NAME> (https://github.com/jsleetw/crontab.py) Ludolph Modification: Copyright (C) 2014-2017 Erigones, s. r. o. This file is part of Ludolph. See the LICENSE file for copying permission. """ import logging import time from datetime import datetime...
[ "logging.getLogger", "collections.namedtuple", "time.sleep", "functools.wraps", "datetime.datetime.now", "datetime.timedelta", "ludolph.message.IncomingLudolphMessage.load" ]
[((689, 716), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (706, 716), False, 'import logging\n'), ((731, 775), 'collections.namedtuple', 'namedtuple', (['"""CronJobFun"""', "('name', 'module')"], {}), "('CronJobFun', ('name', 'module'))\n", (741, 775), False, 'from collections import n...
from typing import Any, Dict from ebonite.core.objects.core import Model def create_model(model_object, input_data, model_name: str = None, params: Dict[str, Any] = None, description: str = None) -> Model: """ Creates Model instance from arbitrary model objects and sample of input data ...
[ "ebonite.core.objects.core.Model.create" ]
[((810, 881), 'ebonite.core.objects.core.Model.create', 'Model.create', (['model_object', 'input_data', 'model_name', 'params', 'description'], {}), '(model_object, input_data, model_name, params, description)\n', (822, 881), False, 'from ebonite.core.objects.core import Model\n')]
import bisect from _pydevd_bundle.pydevd_constants import dict_items, NULL class SourceMappingEntry(object): __slots__ = ['source_filename', 'line', 'end_line', 'runtime_line', 'runtime_source'] def __init__(self, line, end_line, runtime_line, runtime_source): assert isinstance(runtime_sour...
[ "_pydevd_bundle.pydevd_constants.dict_items" ]
[((3961, 3997), '_pydevd_bundle.pydevd_constants.dict_items', 'dict_items', (['self._mappings_to_server'], {}), '(self._mappings_to_server)\n', (3971, 3997), False, 'from _pydevd_bundle.pydevd_constants import dict_items, NULL\n'), ((4802, 4838), '_pydevd_bundle.pydevd_constants.dict_items', 'dict_items', (['self._mapp...
#!/usr/bin/python3 """Analyse metadynamics trajectories from xtb.""" import argparse import numpy as np import matplotlib.pyplot as plt import MDAnalysis as mda import MDAnalysis.analysis.pca as pca from MDAnalysis.lib import distances from scipy.constants import calorie from scipy.constants import kilo from scipy.c...
[ "MDAnalysis.lib.distances.calc_dihedrals", "rmsd.read_xyz", "argparse.ArgumentParser", "numpy.where", "MDAnalysis.analysis.pca.PCA", "numpy.flatnonzero", "MDAnalysis.lib.distances.calc_bonds", "MDAnalysis.lib.distances.calc_angles", "numpy.array", "numpy.isnan", "MDAnalysis.analysis.pca.cosine_c...
[((853, 897), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '__doc__'}), '(description=__doc__)\n', (876, 897), False, 'import argparse\n'), ((1409, 1427), 'numpy.array', 'np.array', (['energies'], {}), '(energies)\n', (1417, 1427), True, 'import numpy as np\n'), ((1136, 1155), 'rmsd.read_x...
from django.contrib import admin from .models import ( Exporter, InstrumentValue, DownloadedInterval, CachedItem, SourceApiActuality) admin.site.register(Exporter) admin.site.register(InstrumentValue) admin.site.register(DownloadedInterval) admin.site.register(CachedItem) admin.site.register(SourceApiActuality)
[ "django.contrib.admin.site.register" ]
[((140, 169), 'django.contrib.admin.site.register', 'admin.site.register', (['Exporter'], {}), '(Exporter)\n', (159, 169), False, 'from django.contrib import admin\n'), ((170, 206), 'django.contrib.admin.site.register', 'admin.site.register', (['InstrumentValue'], {}), '(InstrumentValue)\n', (189, 206), False, 'from dj...
# Copyright 2020 <NAME> (https://seclab.unibg.it) # # 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 ...
[ "os.path.join", "collections.namedtuple", "csv.reader", "os.path.relpath" ]
[((682, 707), 'os.path.relpath', 'os.path.relpath', (['__file__'], {}), '(__file__)\n', (697, 707), False, 'import os\n'), ((904, 939), 'csv.reader', 'csv.reader', (['csv_file'], {'delimiter': '""","""'}), "(csv_file, delimiter=',')\n", (914, 939), False, 'import csv\n'), ((1406, 1441), 'csv.reader', 'csv.reader', (['c...
import torch import torch.nn as nn import torch.nn.functional as F class ASPP(nn.Module): def __init__(self, num_classes): super(ASPP, self).__init__() self.conv_1x1_1 = nn.Conv2d(512, 256, kernel_size=1) self.bn_conv_1x1_1 = nn.BatchNorm2d(256) self.conv_3x3_1 = nn.Conv2d(512, 2...
[ "torch.nn.functional.upsample", "torch.nn.BatchNorm2d", "torch.nn.Conv2d", "torch.nn.AdaptiveAvgPool2d", "torch.cat" ]
[((193, 227), 'torch.nn.Conv2d', 'nn.Conv2d', (['(512)', '(256)'], {'kernel_size': '(1)'}), '(512, 256, kernel_size=1)\n', (202, 227), True, 'import torch.nn as nn\n'), ((257, 276), 'torch.nn.BatchNorm2d', 'nn.BatchNorm2d', (['(256)'], {}), '(256)\n', (271, 276), True, 'import torch.nn as nn\n'), ((304, 371), 'torch.nn...
# -*- coding: utf-8 -*- from unittest import TestCase from mock import patch from tests.utils import MockUtils from tests.functionnal import start_session class Update(TestCase): @classmethod def setUpClass(cls): cls.user = start_session() @classmethod def tearDownClass(cls): pass ...
[ "tests.utils.MockUtils.get_mock_parameter", "mock.patch", "tests.utils.MockUtils.create_mock_response", "tests.functionnal.start_session" ]
[((245, 260), 'tests.functionnal.start_session', 'start_session', ([], {}), '()\n', (258, 260), False, 'from tests.functionnal import start_session\n'), ((459, 517), 'tests.utils.MockUtils.create_mock_response', 'MockUtils.create_mock_response', ([], {'status_code': '(204)', 'data': 'None'}), '(status_code=204, data=No...
"""Load data into a Cheshire3 database.""" import sys import os from cheshire3.server import SimpleServer from cheshire3.session import Session from cheshire3.exceptions import ( ObjectDoesNotExistException, MissingDependencyException ) from cheshire3.commands.cmd_utils import ( Cheshire3ArgumentParse...
[ "cheshire3.server.SimpleServer", "cheshire3.session.Session", "cheshire3.exceptions.MissingDependencyException", "os.getcwd" ]
[((616, 625), 'cheshire3.session.Session', 'Session', ([], {}), '()\n', (623, 625), False, 'from cheshire3.session import Session\n'), ((639, 679), 'cheshire3.server.SimpleServer', 'SimpleServer', (['session', 'args.serverconfig'], {}), '(session, args.serverconfig)\n', (651, 679), False, 'from cheshire3.server import ...
import ast import sys filename = sys.argv[1] print('Crawling file:', filename) with open(filename, 'r') as f: source = f.read() t = ast.parse(source) print(t) shift = 3 def print_node(node, indent=0): if isinstance(node, ast.AST): print(' '*indent, "NODE", node.__class__.__name__) for fiel...
[ "ast.parse" ]
[((141, 158), 'ast.parse', 'ast.parse', (['source'], {}), '(source)\n', (150, 158), False, 'import ast\n')]
from typing import Dict, Tuple from aiohttp import BasicAuth, ClientResponse from .core import OAuth1Client, OAuth2Client, UserInfo __author__ = "<NAME>" __copyright__ = "Copyright 2017, <NAME>" __credits__ = ["<NAME>"] __license__ = "MIT" __version__ = "0.5.0" __maintainer__ = "<NAME>" __email__ = "<EMAIL>" __statu...
[ "aiohttp.BasicAuth" ]
[((5753, 5798), 'aiohttp.BasicAuth', 'BasicAuth', (['self.client_id', 'self.client_secret'], {}), '(self.client_id, self.client_secret)\n', (5762, 5798), False, 'from aiohttp import BasicAuth, ClientResponse\n')]
############################################################################### # SKA South Africa (http://ska.ac.za/) # # Author: <EMAIL> # # Copyright @ 2013 SKA SA. All rights reserved. # # ...
[ "katcorelib.testutils.NameSpace", "katcorelib.rts_session.CaptureSessionBase" ]
[((840, 868), 'katcorelib.rts_session.CaptureSessionBase', 'session.CaptureSessionBase', ([], {}), '()\n', (866, 868), True, 'import katcorelib.rts_session as session\n'), ((927, 938), 'katcorelib.testutils.NameSpace', 'NameSpace', ([], {}), '()\n', (936, 938), False, 'from katcorelib.testutils import NameSpace\n'), ((...
"""Philips Hue Sync Box integration.""" import ipaddress import homeassistant.helpers.config_validation as cv import voluptuous as vol from .const import * from . import services DEFAULT_NAME = 'Hue Sync' def coerce_ip(value): """Validate that provided value is a valid IP address.""" if not value: ...
[ "voluptuous.Required", "voluptuous.Invalid", "voluptuous.Optional", "ipaddress.IPv4Network", "voluptuous.All" ]
[((327, 367), 'voluptuous.Invalid', 'vol.Invalid', (['"""Must define an IP address"""'], {}), "('Must define an IP address')\n", (338, 367), True, 'import voluptuous as vol\n'), ((385, 413), 'ipaddress.IPv4Network', 'ipaddress.IPv4Network', (['value'], {}), '(value)\n', (406, 413), False, 'import ipaddress\n'), ((558, ...
import unittest from risk_authentication.risk_database import RiskDB # import random class TestRiskDatabase(unittest.TestCase): def setUp(self): self.db = RiskDB() self.db.knownIPList = ['10.192.2.2'] self.db.knownUserList = ['Bob'] self.db.successfulLoginDict = {'Bob': 1644151100}...
[ "risk_authentication.risk_database.RiskDB" ]
[((169, 177), 'risk_authentication.risk_database.RiskDB', 'RiskDB', ([], {}), '()\n', (175, 177), False, 'from risk_authentication.risk_database import RiskDB\n')]
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: atts_assign.py # # Tests: Behavior of assignment for attribute objects. Ensures good cases # succeed and bad cases fail with specific python exceptions. Tests variety # of types present in members of V...
[ "io.StringIO", "sys.platform.startswith", "copy.deepcopy" ]
[((6022, 6052), 'sys.platform.startswith', 'sys.platform.startswith', (['"""win"""'], {}), "('win')\n", (6045, 6052), False, 'import copy, io, sys\n'), ((18192, 18222), 'sys.platform.startswith', 'sys.platform.startswith', (['"""win"""'], {}), "('win')\n", (18215, 18222), False, 'import copy, io, sys\n'), ((24439, 2445...
import cv2 import tensorflow as tf import numpy as np OUTPUT_PATH = "../events/" NUM_FILTERS = 10 FILTER_SIZE = (3, 3) STRIDES = (1, 1) def nn(input_node): with tf.variable_scope('nn'): w = tf.get_variable( name='weight', shape=[FILTER_SIZE[0], FILTER_SIZE[1], 3, NUM_FILTERS], ...
[ "tensorflow.nn.conv2d", "tensorflow.local_variables_initializer", "tensorflow.variable_scope", "tensorflow.get_variable", "tensorflow.keras.layers.Conv2D", "tensorflow.placeholder", "tensorflow.Session", "tensorflow.global_variables_initializer", "tensorflow.layers.conv2d", "numpy.expand_dims", ...
[((645, 750), 'tensorflow.layers.conv2d', 'tf.layers.conv2d', (['input_node', 'NUM_FILTERS', 'FILTER_SIZE'], {'strides': 'STRIDES', 'padding': '"""same"""', 'name': '"""layer"""'}), "(input_node, NUM_FILTERS, FILTER_SIZE, strides=STRIDES,\n padding='same', name='layer')\n", (661, 750), True, 'import tensorflow as tf...
# Generated by Django 2.2.6 on 2020-02-19 09:16 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("order", "0008_auto_20190301_1035"), ] replaces = [ ("order", "0008_surcharge"), ] operations = [ ...
[ "django.db.models.DecimalField", "django.db.models.AutoField", "django.db.models.CharField", "django.db.models.ForeignKey" ]
[((466, 559), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (482, 559), False, 'from django.db import migrations, models\...
import csv class Characters: def getBrawlersID(): BrawlersID = [] with open('Logic/Files/assets/csv_logic/characters.csv') as csv_file: csv_reader = csv.reader(csv_file, delimiter=',') line_count = 0 for row in csv_reader: if line_count == 0 or ...
[ "csv.reader" ]
[((184, 219), 'csv.reader', 'csv.reader', (['csv_file'], {'delimiter': '""","""'}), "(csv_file, delimiter=',')\n", (194, 219), False, 'import csv\n')]
# Generated by Django 2.2.17 on 2020-12-24 17:37 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Ticket', fields=[ ('id', models.AutoField(...
[ "django.db.models.EmailField", "django.db.models.TextField", "django.db.models.BooleanField", "django.db.models.AutoField", "django.db.models.DateTimeField", "django.db.models.PositiveSmallIntegerField", "django.db.models.CharField" ]
[((303, 396), 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), "(auto_created=True, primary_key=True, serialize=False,\n verbose_name='ID')\n", (319, 396), False, 'from django.db import migrations, models\...
from django import forms from .models import Post class customForm(forms.Form): content = forms.CharField(required=False) pk = forms.IntegerField(required=False)
[ "django.forms.IntegerField", "django.forms.CharField" ]
[((95, 126), 'django.forms.CharField', 'forms.CharField', ([], {'required': '(False)'}), '(required=False)\n', (110, 126), False, 'from django import forms\n'), ((136, 170), 'django.forms.IntegerField', 'forms.IntegerField', ([], {'required': '(False)'}), '(required=False)\n', (154, 170), False, 'from django import for...
""" Add account_role table """ from yoyo import step __depends__ = {'20210524_01_9elM3-add-account-artist-subscription-table'} steps = [ step(""" INSERT INTO account (id, username, password_hash) VALUES (1, 'admin', <PASSWORD>') ON CONFLICT DO NOTHING; CREATE TABLE account_role ( id s...
[ "yoyo.step" ]
[((144, 587), 'yoyo.step', 'step', (['"""\n INSERT INTO account (id, username, password_hash) VALUES (1, \'admin\', <PASSWORD>\') ON CONFLICT DO NOTHING;\n CREATE TABLE account_role (\n id serial NOT NULL PRIMARY KEY,\n account_id int NOT NULL REFERENCES account(id),\n rol...
from io import BytesIO from PIL import Image, ImageDraw from flask import send_file from utils.endpoint import Endpoint, setup from utils.textutils import wrap, render_text_with_emoji @setup class SneakyFox(Endpoint): params = ['text'] def generate(self, avatars, text, usernames, kwargs): base = Im...
[ "io.BytesIO", "PIL.ImageDraw.Draw", "utils.textutils.render_text_with_emoji", "flask.send_file", "utils.textutils.wrap" ]
[((470, 490), 'PIL.ImageDraw.Draw', 'ImageDraw.Draw', (['base'], {}), '(base)\n', (484, 490), False, 'from PIL import Image, ImageDraw\n'), ((707, 727), 'utils.textutils.wrap', 'wrap', (['font', 'fox', '(500)'], {}), '(font, fox, 500)\n', (711, 727), False, 'from utils.textutils import wrap, render_text_with_emoji\n'),...
"""Test the nuki config flow.""" from unittest.mock import patch from pynuki.bridge import InvalidCredentialsException from requests.exceptions import RequestException from openpeerpower import config_entries, data_entry_flow, setup from openpeerpower.components.dhcp import HOSTNAME, IP_ADDRESS, MAC_ADDRESS from open...
[ "unittest.mock.patch", "openpeerpower.setup.async_setup_component" ]
[((549, 612), 'openpeerpower.setup.async_setup_component', 'setup.async_setup_component', (['opp', '"""persistent_notification"""', '{}'], {}), "(opp, 'persistent_notification', {})\n", (576, 612), False, 'from openpeerpower import config_entries, data_entry_flow, setup\n'), ((843, 937), 'unittest.mock.patch', 'patch',...
from unittest import TestCase from pypika import ( Table, functions as fn, ) import fireant as f from fireant.tests.dataset.mocks import test_database test_table = Table("test") ds = f.DataSet( table=test_table, database=test_database, fields=[ f.Field("date", definition=test_table.date, ...
[ "fireant.Pandas", "pypika.functions.Concat", "fireant.ResultSet", "pypika.functions.Sum", "fireant.Field", "pypika.Table", "fireant.Rollup", "fireant.WeekOverWeek" ]
[((175, 188), 'pypika.Table', 'Table', (['"""test"""'], {}), "('test')\n", (180, 188), False, 'from pypika import Table, functions as fn\n'), ((276, 346), 'fireant.Field', 'f.Field', (['"""date"""'], {'definition': 'test_table.date', 'data_type': 'f.DataType.date'}), "('date', definition=test_table.date, data_type=f.Da...
import gl import xml.dom.minidom class GLXML : def __init__( self ) : self.gl = gl.GL(); def parseCommands( self, commands_node ) : command_list = commands_node.getElementsByTagName( "command" ); for command_node in command_list : command = gl.Command(); self.parseCommandNode( command_node, command ...
[ "gl.Enum", "gl.Extension", "gl.GL", "gl.Param", "gl.Command", "gl.Type", "gl.Feature" ]
[((84, 91), 'gl.GL', 'gl.GL', ([], {}), '()\n', (89, 91), False, 'import gl\n'), ((419, 429), 'gl.Param', 'gl.Param', ([], {}), '()\n', (427, 429), False, 'import gl\n'), ((4748, 4762), 'gl.Extension', 'gl.Extension', ([], {}), '()\n', (4760, 4762), False, 'import gl\n'), ((5250, 5262), 'gl.Feature', 'gl.Feature', ([],...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
[ "unittest.main", "nbformat.v4.new_notebook", "nbformat.v4.new_code_cell", "importlib.import_module" ]
[((716, 751), 'importlib.import_module', 'importlib.import_module', (['"""exporter"""'], {}), "('exporter')\n", (739, 751), False, 'import importlib\n'), ((2804, 2819), 'unittest.main', 'unittest.main', ([], {}), '()\n', (2817, 2819), False, 'import unittest\n'), ((999, 1013), 'nbformat.v4.new_notebook', 'new_notebook'...
# +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# # This python file is a library of python functions which provides modular # common set-up commands for solving a problem in OpenCMISS. # Each function has a range of input options and calls the appropriate # OpenCMISS linked command...
[ "opencmiss.iron.iron.ComputationalNodeNumberGet", "opencmiss.iron.iron.GeneratedMesh", "opencmiss.iron.iron.CellMLEquations", "numpy.array", "opencmiss.iron.iron.Fields", "os.path.exists", "opencmiss.iron.iron.Equations", "opencmiss.iron.iron.Region", "opencmiss.iron.iron.Mesh", "opencmiss.iron.ir...
[((1233, 1269), 'opencmiss.iron.iron.ComputationalNumberOfNodesGet', 'iron.ComputationalNumberOfNodesGet', ([], {}), '()\n', (1267, 1269), False, 'from opencmiss.iron import iron\n'), ((1300, 1333), 'opencmiss.iron.iron.ComputationalNodeNumberGet', 'iron.ComputationalNodeNumberGet', ([], {}), '()\n', (1331, 1333), Fals...
"""Class that is responsible for writing Install Configurations Converts datamodel objects back into text files """ import datetime import os import errno import shutil from installSynApps.DataModel import * from installSynApps.IO import logger as LOG class ConfigWriter: """Class that is responsible for writing...
[ "os.path.exists", "installSynApps.IO.logger.debug", "os.path.join", "installSynApps.IO.logger.write", "datetime.datetime.now", "os.mkdir", "os.path.basename", "datetime.date.today" ]
[((2728, 2772), 'os.path.join', 'os.path.join', (['filepath', '"""customBuildScripts"""'], {}), "(filepath, 'customBuildScripts')\n", (2740, 2772), False, 'import os\n'), ((5115, 5151), 'installSynApps.IO.logger.debug', 'LOG.debug', (['"""Writing injector files."""'], {}), "('Writing injector files.')\n", (5124, 5151),...
import pandas as pd from simulate.get_parameters import get_simulation_parameters, get_scratch from itertools import product import os import yaml import argparse from shutil import copyfile def gen_data_csv(date, scratch): simulation_parameters = get_simulation_parameters() if not os.path.exists(scratch + da...
[ "simulate.get_parameters.get_simulation_parameters", "os.path.exists", "argparse.ArgumentParser", "os.makedirs", "os.path.dirname", "shutil.copyfile", "simulate.get_parameters.get_scratch", "pandas.DataFrame" ]
[((254, 281), 'simulate.get_parameters.get_simulation_parameters', 'get_simulation_parameters', ([], {}), '()\n', (279, 281), False, 'from simulate.get_parameters import get_simulation_parameters, get_scratch\n'), ((1531, 1570), 'os.makedirs', 'os.makedirs', (['data_folder'], {'exist_ok': '(True)'}), '(data_folder, exi...
from ply import lex, yacc class PyLexer(object): tokens = ( 'DOL_LBRACE', 'PERC_LBRACE', 'COLON', 'PLAINTEXT', 'RBRACE', 'PIPE', 'QUESTION', 'AT', ) def t_DOL_LBRACE(self, t): r'\${' self.nesting_depth += 1 return t ...
[ "ply.lex.lex", "ply.yacc.yacc" ]
[((1748, 1778), 'ply.lex.lex', 'lex.lex', ([], {'module': 'self'}), '(module=self, **kwargs)\n', (1755, 1778), False, 'from ply import lex, yacc\n'), ((5144, 5175), 'ply.yacc.yacc', 'yacc.yacc', ([], {'module': 'self', 'debug': '(0)'}), '(module=self, debug=0)\n', (5153, 5175), False, 'from ply import lex, yacc\n')]
from multiprocessing import cpu_count SEED = 777 PROJECT_DIR = "/vol/bitbucket/hsb20/msc-project-hanna-behnke/" TEMP_DIRECTORY = PROJECT_DIR + "CODE/temp/data" RESULT_FILE = "result.tsv" SUBMISSION_FILE = "predictions.txt" RESULT_IMAGE = "result.jpg" GOOGLE_DRIVE = False DRIVE_FILE_ID = None MODEL_TYPE = "xlmrobert...
[ "multiprocessing.cpu_count" ]
[((1522, 1533), 'multiprocessing.cpu_count', 'cpu_count', ([], {}), '()\n', (1531, 1533), False, 'from multiprocessing import cpu_count\n'), ((1503, 1514), 'multiprocessing.cpu_count', 'cpu_count', ([], {}), '()\n', (1512, 1514), False, 'from multiprocessing import cpu_count\n')]
# -*- coding: utf-8 -*- """ Created on Mon Dec 23 14:31:43 2019 @author: wenbin """ """ 给定一棵二叉树,要求逐层打印二叉树结点的数据,例如有如下二叉树: 1 2 3 4 5 6 7 对这棵二叉树层序遍历的结果为1,2,3,4,5,6,7; """ from collections import deque class BiTNode: # the node of the binary tree def __init__(self , d...
[ "collections.deque" ]
[((1183, 1190), 'collections.deque', 'deque', ([], {}), '()\n', (1188, 1190), False, 'from collections import deque\n')]
""" Django settings for djaesy project. Generated by 'django-admin startproject' using Django 3.0.1. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os fro...
[ "os.path.abspath", "os.path.join", "pathlib.Path" ]
[((5443, 5479), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""../static/"""'], {}), "(BASE_DIR, '../static/')\n", (5455, 5479), False, 'import os\n'), ((5518, 5552), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""../media"""'], {}), "(BASE_DIR, '../media')\n", (5530, 5552), False, 'import os\n'), ((380, 399), 'p...
# Copyright (C) 2017, Philsong <<EMAIL>> from .broker import Broker, TradeException import config import logging from bittrex import bittrex # python3 hydra/cli.py -m Bittrex_BCH_BTC get-balance class BrokerBittrex_BCH_BTC(Broker): def __init__(self, api_key = None, api_secret = None): super().__init__(...
[ "logging.info", "bittrex.bittrex.Bittrex" ]
[((368, 494), 'bittrex.bittrex.Bittrex', 'bittrex.Bittrex', (['(api_key if api_key else config.Bittrex_API_KEY)', '(api_secret if api_secret else config.Bittrex_SECRET_TOKEN)'], {}), '(api_key if api_key else config.Bittrex_API_KEY, api_secret if\n api_secret else config.Bittrex_SECRET_TOKEN)\n', (383, 494), False, ...
#!/usr/bin/python3 import sqlite3 from flask import Blueprint, request, abort, make_response from modules import simple_jwt from modules.database import get_db_conn from modules.utils import logged_before_request, get_role_perms from server_error import server_error route_courses_auth = Blueprint('route_courses_auth...
[ "modules.database.get_db_conn", "flask.request.get_json", "flask.make_response", "flask.abort", "server_error.server_error", "flask.Blueprint", "flask.request.headers.get" ]
[((291, 332), 'flask.Blueprint', 'Blueprint', (['"""route_courses_auth"""', '__name__'], {}), "('route_courses_auth', __name__)\n", (300, 332), False, 'from flask import Blueprint, request, abort, make_response\n'), ((719, 737), 'flask.request.get_json', 'request.get_json', ([], {}), '()\n', (735, 737), False, 'from fl...
import mnist_loader training_data, validation_data, test_data = mnist_loader.load_data_wrapper() import network2_es_avg net = network2_es_avg.Network([784, 30, 10], cost=network2_es_avg.CrossEntropyCost) net.SGD(training_data, 10, 0.5, lmbda=5.0, es=10, evaluation_d...
[ "network2_es_avg.Network", "mnist_loader.load_data_wrapper" ]
[((64, 96), 'mnist_loader.load_data_wrapper', 'mnist_loader.load_data_wrapper', ([], {}), '()\n', (94, 96), False, 'import mnist_loader\n'), ((126, 203), 'network2_es_avg.Network', 'network2_es_avg.Network', (['[784, 30, 10]'], {'cost': 'network2_es_avg.CrossEntropyCost'}), '([784, 30, 10], cost=network2_es_avg.CrossEn...
""" Main file for testing procedures """ # import backend.app as app from datetime import datetime import pytest from backend import init_app from backend.apps.user.utils import create_user # post = { # "title": "titulo1", # "description": "descrip", "public": True, # "tags": ["1", "2"] # } @pytes...
[ "backend.init_app", "datetime.datetime.utcnow" ]
[((354, 376), 'backend.init_app', 'init_app', ([], {'testing': '(True)'}), '(testing=True)\n', (362, 376), False, 'from backend import init_app\n'), ((752, 769), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (767, 769), False, 'from datetime import datetime\n')]
import structlog from strategies.strategy_utils import Utils import pandas as pd class MovingAvgConvDiv(): def __init__(self): self.logger = structlog.get_logger() self.utils = Utils() def get_12_day_EMA(self, frame): twelve_day_EMA = frame.ewm(span=12) return list(twelve_day_E...
[ "structlog.get_logger", "pandas.DataFrame", "strategies.strategy_utils.Utils" ]
[((154, 176), 'structlog.get_logger', 'structlog.get_logger', ([], {}), '()\n', (174, 176), False, 'import structlog\n'), ((198, 205), 'strategies.strategy_utils.Utils', 'Utils', ([], {}), '()\n', (203, 205), False, 'from strategies.strategy_utils import Utils\n'), ((670, 691), 'pandas.DataFrame', 'pd.DataFrame', (['em...
#!/usr/bin/env python3 # %% import logging import functools import collections ############################################################################### # # list of operations, each operation mutates cpu state in-place # def op_set(x, y, cpu, id_): try: cpu[id_][x] = int(y) except ValueError: ...
[ "logging.basicConfig", "collections.deque", "logging.debug", "time.clock", "argparse.ArgumentParser", "pprint.pformat", "collections.defaultdict", "functools.partial" ]
[((4453, 4472), 'collections.deque', 'collections.deque', ([], {}), '()\n', (4470, 4472), False, 'import collections\n'), ((4498, 4517), 'collections.deque', 'collections.deque', ([], {}), '()\n', (4515, 4517), False, 'import collections\n'), ((5928, 5987), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'d...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2018-01-31 07:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hkm', '0033_add_product_order_collection_hash'), ] operations = [ migration...
[ "django.db.models.CharField" ]
[((423, 493), 'django.db.models.CharField', 'models.CharField', ([], {'null': '(True)', 'verbose_name': '"""Postal code"""', 'max_length': '(64)'}), "(null=True, verbose_name='Postal code', max_length=64)\n", (439, 493), False, 'from django.db import migrations, models\n')]
# coding=utf-8 # Copyright 2020 The HuggingFace Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
[ "json.load", "datasets.Value", "os.path.join", "datasets.Version" ]
[((1883, 1908), 'datasets.Version', 'datasets.Version', (['"""1.0.0"""'], {}), "('1.0.0')\n", (1899, 1908), False, 'import datasets\n'), ((3228, 3284), 'os.path.join', 'os.path.join', (['extracted_path', '"""qangaroo_v1.1"""', '"""wikihop"""'], {}), "(extracted_path, 'qangaroo_v1.1', 'wikihop')\n", (3240, 3284), False,...
# Copyright 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
[ "collections.OrderedDict", "oslo_concurrency.lockutils.synchronized", "ironic.common.exception.NoValidDefaultForInterface", "ironic.common.i18n._LI", "ironic.common.exception.DriverNotFoundInEntrypoint", "collections.Counter", "ironic.common.exception.DriverNotFound", "ironic.common.exception.DriverLo...
[((987, 1010), 'oslo_log.log.getLogger', 'log.getLogger', (['__name__'], {}), '(__name__)\n', (1000, 1010), False, 'from oslo_log import log\n'), ((2902, 2926), 'ironic.drivers.base.BareDriver', 'driver_base.BareDriver', ([], {}), '()\n', (2924, 2926), True, 'from ironic.drivers import base as driver_base\n'), ((15316,...
import torch import json from os import PathLike from typing import List, Tuple, Union, Optional from allennlp.common.file_utils import cached_path from allennlp.data import Vocabulary from allennlp.data.tokenizers.tokenizer import Tokenizer def _convert_word_to_ids_tensor(word, tokenizer, vocab, namespace, all_case...
[ "json.load", "allennlp.common.file_utils.cached_path" ]
[((2055, 2067), 'json.load', 'json.load', (['f'], {}), '(f)\n', (2064, 2067), False, 'import json\n'), ((3460, 3472), 'json.load', 'json.load', (['f'], {}), '(f)\n', (3469, 3472), False, 'import json\n'), ((2013, 2031), 'allennlp.common.file_utils.cached_path', 'cached_path', (['fname'], {}), '(fname)\n', (2024, 2031),...
# (C) <NAME>, November 2013 # License: BSD 3 clause import numpy as np import os class DCG: def __init__(self, config, n_queries, split, rank=25, relevance_methods=['rougeL']): self.rank = rank self.relevance_methods = relevance_methods relevance_dir = os.path.join(config['dataset']['data'...
[ "numpy.unique", "sklearn.metrics.average_precision_score", "numpy.memmap", "numpy.asarray", "os.path.join", "numpy.take", "numpy.sum", "numpy.argsort" ]
[((2287, 2304), 'numpy.unique', 'np.unique', (['y_true'], {}), '(y_true)\n', (2296, 2304), True, 'import numpy as np\n'), ((2442, 2469), 'numpy.sum', 'np.sum', (['(y_true == pos_label)'], {}), '(y_true == pos_label)\n', (2448, 2469), True, 'import numpy as np\n'), ((2522, 2548), 'numpy.take', 'np.take', (['y_true', 'or...
#!/usr/bin/env python """Train a neural network using OpenStreetMap labels and NAIP images.""" import argparse from src.single_layer_network import train_on_cached_data def create_parser(): """Create the argparse parser.""" parser = argparse.ArgumentParser() parser.add_argument("--neural-net", ...
[ "src.single_layer_network.train_on_cached_data", "argparse.ArgumentParser" ]
[((245, 270), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (268, 270), False, 'import argparse\n'), ((1103, 1163), 'src.single_layer_network.train_on_cached_data', 'train_on_cached_data', (['args.neural_net', 'args.number_of_epochs'], {}), '(args.neural_net, args.number_of_epochs)\n', (1123, ...
""" Copyright (c) 2016, Granular, Inc. All rights reserved. License: BSD 3-Clause ("BSD New" or "BSD Simplified") Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above cop...
[ "setuptools.find_packages", "os.path.join", "os.environ.get", "os.path.dirname", "numpy.get_include" ]
[((2137, 2173), 'os.environ.get', 'os.environ.get', (['"""READTHEDOCS"""', '(False)'], {}), "('READTHEDOCS', False)\n", (2151, 2173), False, 'import os\n'), ((2378, 2403), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (2393, 2403), False, 'import os\n'), ((3047, 3062), 'setuptools.find_packa...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Feb 4 12:24:14 2018 @author: pranavjain This program uses Principal Component Analysis to view the varience in various columns """ # Importing the libraries import pandas as pd # Importing the dataset dataset = pd.read_csv('winequality-red.csv') X ...
[ "sklearn.model_selection.train_test_split", "sklearn.preprocessing.StandardScaler", "sklearn.decomposition.PCA", "pandas.read_csv" ]
[((283, 317), 'pandas.read_csv', 'pd.read_csv', (['"""winequality-red.csv"""'], {}), "('winequality-red.csv')\n", (294, 317), True, 'import pandas as pd\n'), ((470, 523), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': '(0.2)', 'random_state': '(0)'}), '(X, y, test_size=0.2, r...
"""Main CLI entry point for RFDesigner.""" import sys from rfdesigner.cli import RFcli from rfdesigner.options import entry_arguments from rfdesigner.netlist import parse_netlist, IMPLEMENTED_BLOCKS def display_implemented(): """Display implemented variables.""" implemented_string = "Available blocks for netl...
[ "rfdesigner.netlist.parse_netlist", "rfdesigner.cli.RFcli", "rfdesigner.options.entry_arguments", "sys.exit" ]
[((780, 797), 'rfdesigner.options.entry_arguments', 'entry_arguments', ([], {}), '()\n', (795, 797), False, 'from rfdesigner.options import entry_arguments\n'), ((1291, 1298), 'rfdesigner.cli.RFcli', 'RFcli', ([], {}), '()\n', (1296, 1298), False, 'from rfdesigner.cli import RFcli\n'), ((899, 910), 'sys.exit', 'sys.exi...
import math import re from typing import Optional, List, Any, Dict from nonebot import CommandSession from IAI.iai.common.aio import requests from IAI.iai.common.cache import cached from . import cg from datetime import datetime API_URL = 'https://bangumi.bilibili.com/media/web_api/search/result?season_version=-1&a...
[ "IAI.iai.common.aio.requests.get", "datetime.datetime.now", "math.ceil", "re.fullmatch" ]
[((1133, 1147), 'datetime.datetime.now', 'datetime.now', ([], {}), '()\n', (1145, 1147), False, 'from datetime import datetime\n'), ((869, 890), 'IAI.iai.common.aio.requests.get', 'requests.get', (['api_url'], {}), '(api_url)\n', (881, 890), False, 'from IAI.iai.common.aio import requests\n'), ((1959, 1997), 're.fullma...
"""A module containing functions to run MCMC using emcee.""" import numpy as np import emcee from eztao.ts import carma_fit, neg_param_ll, neg_fcoeff_ll from eztao.carma import CARMA_term from celerite import GP def mcmc(t, y, yerr, p, q, n_walkers=32, burn_in=500, n_samples=2000, init_param=None): """ A sim...
[ "eztao.ts.neg_fcoeff_ll", "numpy.median", "numpy.hstack", "celerite.GP", "numpy.log", "emcee.EnsembleSampler", "numpy.exp", "numpy.array", "numpy.random.randn", "eztao.ts.neg_param_ll", "numpy.vectorize", "eztao.ts.carma_fit" ]
[((2065, 2152), 'numpy.vectorize', 'np.vectorize', (['CARMA_term.fcoeffs2carma_log'], {'excluded': '[1]', 'signature': '"""(n)->(m),(k)"""'}), "(CARMA_term.fcoeffs2carma_log, excluded=[1], signature=\n '(n)->(m),(k)')\n", (2077, 2152), True, 'import numpy as np\n'), ((2377, 2395), 'celerite.GP', 'GP', (['kernel'], {...
#!/usr/bin/env python import asyncio import websockets filenames = [ '1鸡哥不屑.json', '2鸡哥左右看.json', '3鸡哥邪魅一笑.json', '4鸡哥不赞同的目光.json', '5鸡哥无语.json', '6鸡哥大为震撼.json', '7鸡哥眨眼.json', '8鸡哥睁大眼睛.json' ]; async def echo(websocket, path): while True: for filename in filenames: ...
[ "websockets.serve", "asyncio.get_event_loop", "asyncio.sleep" ]
[((408, 449), 'websockets.serve', 'websockets.serve', (['echo', '"""localhost"""', '(8765)'], {}), "(echo, 'localhost', 8765)\n", (424, 449), False, 'import websockets\n'), ((498, 522), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (520, 522), False, 'import asyncio\n'), ((556, 580), 'asyncio.ge...
import os import numpy as np import torch from torch.utils.data import DataLoader,TensorDataset DATA_DIR="./dataset" WALK=["35_01","35_02","35_03","35_04","35_05","35_06","35_07","35_08","35_09","35_10", "35_11","35_12","35_13","35_14","35_15","35_16"] RUN=["35_17","35_18","35_19","35_20","35_21","35_22",...
[ "numpy.ceil", "numpy.ones", "os.path.join", "torch.Tensor", "numpy.min", "numpy.max", "numpy.array", "numpy.zeros", "numpy.concatenate", "torch.utils.data.DataLoader", "numpy.transpose", "numpy.arange" ]
[((773, 793), 'numpy.array', 'np.array', (['timeseries'], {}), '(timeseries)\n', (781, 793), True, 'import numpy as np\n'), ((1318, 1365), 'os.path.join', 'os.path.join', (['DATA_DIR', '"""other"""', '"""49_02.amc.4d"""'], {}), "(DATA_DIR, 'other', '49_02.amc.4d')\n", (1330, 1365), False, 'import os\n'), ((1622, 1653),...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Dec 16 17:58:52 2018 @author: Zhaoyi.Shen """ import sys sys.path.append('/home/z1s/py/lib/') from signal_processing import lfca import numpy as np import scipy as sp from scipy import io from matplotlib import pyplot as plt filename = '/home/z1s/rese...
[ "numpy.sqrt", "scipy.io.loadmat", "numpy.nanmean", "sys.path.append", "numpy.arange", "numpy.mean", "numpy.reshape", "numpy.where", "matplotlib.pyplot.plot", "numpy.meshgrid", "numpy.abs", "numpy.ones", "numpy.size", "numpy.squeeze", "numpy.cos", "numpy.transpose", "numpy.sum", "nu...
[((125, 161), 'sys.path.append', 'sys.path.append', (['"""/home/z1s/py/lib/"""'], {}), "('/home/z1s/py/lib/')\n", (140, 161), False, 'import sys\n'), ((373, 393), 'scipy.io.loadmat', 'io.loadmat', (['filename'], {}), '(filename)\n', (383, 393), False, 'from scipy import io\n'), ((534, 568), 'numpy.arange', 'np.arange',...
# pylint: disable=protected-access import os import re import subprocess import tempfile import pytest from dagster import AssetKey, AssetMaterialization, Output, execute_pipeline, pipeline, solid from dagster.core.errors import DagsterInstanceMigrationRequired from dagster.core.instance import DagsterInstance from d...
[ "tempfile.TemporaryDirectory", "re.escape", "dagster.execute_pipeline", "sqlalchemy.create_engine", "os.path.join", "os.environ.copy", "dagster.Output", "pytest.raises", "dagster.AssetKey", "dagster.utils.file_relative_path", "dagster.core.instance.DagsterInstance.from_config" ]
[((561, 587), 'sqlalchemy.create_engine', 'create_engine', (['conn_string'], {}), '(conn_string)\n', (574, 587), False, 'from sqlalchemy import create_engine\n'), ((693, 710), 'os.environ.copy', 'os.environ.copy', ([], {}), '()\n', (708, 710), False, 'import os\n'), ((2571, 2597), 'sqlalchemy.create_engine', 'create_en...
import torch import numpy as np from onnx import numpy_helper from thop.vision.basic_hooks import zero_ops from .counter import counter_matmul, counter_zero_ops,\ counter_conv, counter_mul, counter_norm, counter_pow,\ counter_sqrt, counter_div, counter_softmax, counter_avgpool def onnx_counter_matmul(diction,...
[ "numpy.append", "numpy.prod", "numpy.array", "numpy.delete" ]
[((463, 506), 'numpy.append', 'np.append', (['input1_dim[0:-1]', 'input2_dim[-1]'], {}), '(input1_dim[0:-1], input2_dim[-1])\n', (472, 506), True, 'import numpy as np\n'), ((2135, 2161), 'numpy.append', 'np.append', (['output_size', 'hw'], {}), '(output_size, hw)\n', (2144, 2161), True, 'import numpy as np\n'), ((8204,...
""" Predicts outputs of the MySQL 'rand' function. For example, mysql> CREATE TABLE t (i INT); mysql> INSERT INTO t VALUES(1),(2),(3); mysql> SELECT i, RAND() FROM t; +------+------------------+ | i | RAND() | +------+------------------+ | 1 | 0.61914388706828 | | 2 | 0.93...
[ "ctypes.c_uint32" ]
[((1620, 1653), 'ctypes.c_uint32', 'c_uint32', (['(seed * 65537 + 55555555)'], {}), '(seed * 65537 + 55555555)\n', (1628, 1653), False, 'from ctypes import c_uint32\n'), ((1670, 1696), 'ctypes.c_uint32', 'c_uint32', (['(seed * 268435457)'], {}), '(seed * 268435457)\n', (1678, 1696), False, 'from ctypes import c_uint32\...
#!/usr/bin/env python import rclpy import sys import time from std_msgs.msg import String from om_aiv_util.socket_listener import * from om_aiv_msg.msg import Status, Location from rclpy.node import Node class LdStatePublisher(Node): def __init__(self, listener): super().__init__('ld_states_publisher_node...
[ "std_msgs.msg.String", "om_aiv_msg.msg.Status", "rclpy.spin", "om_aiv_msg.msg.Location", "rclpy.init", "rclpy.create_node" ]
[((5286, 5311), 'rclpy.init', 'rclpy.init', ([], {'args': 'sys.argv'}), '(args=sys.argv)\n', (5296, 5311), False, 'import rclpy\n'), ((5323, 5357), 'rclpy.create_node', 'rclpy.create_node', (['"""ld_param_node"""'], {}), "('ld_param_node')\n", (5340, 5357), False, 'import rclpy\n'), ((1569, 1577), 'om_aiv_msg.msg.Statu...
import copy import import_parent import test_case if __name__ == "__main__": test_scan_path: str = "../Dataset_V2/MR86.nii.gz" tc: test_case.TestCase = test_case.TestCase.from_scan_path( scan_path=test_scan_path, pcr=True, nar=1 ) axes: list = list(range(3)) for axis in axes: to_co...
[ "test_case.TestCase.from_scan_path", "copy.deepcopy" ]
[((162, 238), 'test_case.TestCase.from_scan_path', 'test_case.TestCase.from_scan_path', ([], {'scan_path': 'test_scan_path', 'pcr': '(True)', 'nar': '(1)'}), '(scan_path=test_scan_path, pcr=True, nar=1)\n', (195, 238), False, 'import test_case\n'), ((348, 365), 'copy.deepcopy', 'copy.deepcopy', (['tc'], {}), '(tc)\n', ...
from django.conf.urls import include from django.conf.urls import url from . import views from .api_urls import urlpatterns urlpatterns = [ url('^api/', include(urlpatterns)), url('^$', views.CoachView.as_view(), name='coach'), ]
[ "django.conf.urls.include" ]
[((159, 179), 'django.conf.urls.include', 'include', (['urlpatterns'], {}), '(urlpatterns)\n', (166, 179), False, 'from django.conf.urls import include\n')]
# encoding = utf-8 import os import sys import time import datetime import requests from datetime import date, timedelta from datetime import datetime from utils.webex_constant import authentication_type from utils.webex_common_functions import fetch_webex_logs from utils.access_token_functions import update_access...
[ "datetime.datetime.utcnow", "datetime.datetime.strptime", "utils.webex_common_functions.fetch_webex_logs", "utils.access_token_functions.update_access_token_with_validation", "datetime.timedelta" ]
[((3626, 3643), 'datetime.datetime.utcnow', 'datetime.utcnow', ([], {}), '()\n', (3641, 3643), False, 'from datetime import datetime\n'), ((3106, 3157), 'utils.access_token_functions.update_access_token_with_validation', 'update_access_token_with_validation', (['helper', 'params'], {}), '(helper, params)\n', (3141, 315...
from torch import nn class FeedForwardNet(nn.Module): def __init__(self, inp_dim, hidden_dim, outp_dim, n_layers, nonlinearity, dropout=0): super().__init__() layers = [] d_in = inp_dim for i in range(n_layers): module = nn.Linear(d_in, hidden_dim) self.rese...
[ "torch.nn.ReLU", "torch.nn.Dropout", "torch.nn.Tanh", "torch.nn.Sequential", "torch.nn.Linear", "torch.nn.ELU" ]
[((999, 1024), 'torch.nn.Linear', 'nn.Linear', (['d_in', 'outp_dim'], {}), '(d_in, outp_dim)\n', (1008, 1024), False, 'from torch import nn\n'), ((1117, 1139), 'torch.nn.Sequential', 'nn.Sequential', (['*layers'], {}), '(*layers)\n', (1130, 1139), False, 'from torch import nn\n'), ((271, 298), 'torch.nn.Linear', 'nn.Li...
from toga_winforms.libs import WinForms from .base import Widget class Tree(Widget): def create(self): self.native = WinForms.TreeView() def row_data(self, item): self.interface.factory.not_implemented('Tree.row_data()') def on_select(self, selection): self.interface.factory.not...
[ "toga_winforms.libs.WinForms.TreeView" ]
[((132, 151), 'toga_winforms.libs.WinForms.TreeView', 'WinForms.TreeView', ([], {}), '()\n', (149, 151), False, 'from toga_winforms.libs import WinForms\n')]
import pytest from hamcrest import ( # type: ignore # noqa: WPS235 assert_that, calling, contains_exactly, equal_to, has_entries, has_length, instance_of, is_, matches_regexp, raises, ) from django.core.files.base import ContentFile from rest_framework.exceptions import Validat...
[ "hamcrest.has_length", "hamcrest.instance_of", "moonvision.image_classification.serializers.Base64ImageField", "hamcrest.raises", "hamcrest.matches_regexp", "hamcrest.assert_that", "hamcrest.calling", "hamcrest.equal_to" ]
[((503, 533), 'moonvision.image_classification.serializers.Base64ImageField', 'serializers.Base64ImageField', ([], {}), '()\n', (531, 533), False, 'from moonvision.image_classification import serializers\n'), ((806, 836), 'moonvision.image_classification.serializers.Base64ImageField', 'serializers.Base64ImageField', ([...
# -*- coding: utf-8 -*- """ Module to simulate OH sky lines spectra. """ import numpy as np import pandas as pd from pathlib import Path from .constants import Constants as cs from .spectra import Spectra from .simSpec import SpecUtil as spec_util _PARENT_DIR = Path(__file__).resolve().parents[1] class SkyLines(ob...
[ "pandas.Series", "pandas.read_csv", "pathlib.Path", "numpy.where", "numpy.isnan", "pandas.DataFrame", "numpy.zeros_like", "numpy.arange" ]
[((977, 991), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (989, 991), True, 'import pandas as pd\n'), ((1119, 1133), 'pandas.DataFrame', 'pd.DataFrame', ([], {}), '()\n', (1131, 1133), True, 'import pandas as pd\n'), ((1405, 1468), 'pandas.read_csv', 'pd.read_csv', (['data_file_path'], {'delim_whitespace': '(...
import glob import os txtfiles = [] for file in glob.glob("/home/kingsman/Desktop/TelpoDemoSDK/app/src/main/jniLibs/arm64-v8a/*.so"): head, tail = os.path.split(file) # txtfiles.append(tail) print('<resource-file src="src/android/jnilibs/arm64-v8a/' + tail + '" target="jniLibs/arm64-v8a/' +tail + '"/>') # ...
[ "glob.glob", "os.path.split" ]
[((48, 137), 'glob.glob', 'glob.glob', (['"""/home/kingsman/Desktop/TelpoDemoSDK/app/src/main/jniLibs/arm64-v8a/*.so"""'], {}), "(\n '/home/kingsman/Desktop/TelpoDemoSDK/app/src/main/jniLibs/arm64-v8a/*.so')\n", (57, 137), False, 'import glob\n'), ((151, 170), 'os.path.split', 'os.path.split', (['file'], {}), '(file...
import asyncio import logging from aiohttp import ClientSession from .methods import Messages from .utils import json logger = logging.getLogger(__name__) API_URL = 'https://api.vk.com/method/' class VK: def __init__(self, confirmation_code=None, secret_key=None, access_token=None, loop=None): """ ...
[ "logging.getLogger", "aiohttp.ClientSession", "asyncio.get_event_loop" ]
[((130, 157), 'logging.getLogger', 'logging.getLogger', (['__name__'], {}), '(__name__)\n', (147, 157), False, 'import logging\n'), ((681, 737), 'aiohttp.ClientSession', 'ClientSession', ([], {'loop': 'self.loop', 'json_serialize': 'json.dumps'}), '(loop=self.loop, json_serialize=json.dumps)\n', (694, 737), False, 'fro...
# Copyright 2021 NREL # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distri...
[ "numpy.ones", "scipy.stats.norm.ppf", "numpy.sum", "numpy.linspace", "numpy.zeros", "scipy.stats.norm.pdf", "matplotlib.pyplot.subplots", "matplotlib.pyplot.show" ]
[((7707, 7721), 'matplotlib.pyplot.subplots', 'plt.subplots', ([], {}), '()\n', (7719, 7721), True, 'import matplotlib.pyplot as plt\n'), ((7982, 7992), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (7990, 7992), True, 'import matplotlib.pyplot as plt\n'), ((12182, 12285), 'numpy.linspace', 'np.linspace', (["...
# Copyright 2021 Foundries.io # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
[ "logging.getLogger", "aiohttp.web.run_app", "json.loads", "logging.handlers.WatchedFileHandler", "asgiref.sync.sync_to_async", "aiohttp.web.Application", "contextlib.suppress", "zmq.asyncio.Context", "aiohttp.web.get", "asyncio.get_event_loop", "aiohttp.web.WebSocketResponse" ]
[((1013, 1034), 'zmq.asyncio.Context', 'zmq.asyncio.Context', ([], {}), '()\n', (1032, 1034), False, 'import zmq\n'), ((2145, 2169), 'asyncio.get_event_loop', 'asyncio.get_event_loop', ([], {}), '()\n', (2167, 2169), False, 'import asyncio\n'), ((2829, 2879), 'aiohttp.web.WebSocketResponse', 'web.WebSocketResponse', ([...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest from numpy.testing import assert_allclose from astropy.coordinates import SkyCoord from ...utils.testing import requires_data from ...maps import WcsGeom, HpxGeom, MapAxis, WcsNDMap from ...irf import EffectiveAreaTable2D from ..exposure impo...
[ "pytest.fixture", "pytest.importorskip", "astropy.coordinates.SkyCoord" ]
[((421, 450), 'pytest.importorskip', 'pytest.importorskip', (['"""healpy"""'], {}), "('healpy')\n", (440, 450), False, 'import pytest\n'), ((454, 485), 'pytest.fixture', 'pytest.fixture', ([], {'scope': '"""session"""'}), "(scope='session')\n", (468, 485), False, 'import pytest\n'), ((1715, 1741), 'astropy.coordinates....
# -*- coding: utf-8 -*- """Falcon request argument parsing module. """ import falcon from webargs import core HTTP_422 = '422 Unprocessable entity' def parse_json_body(req): if req.content_length in (None, 0): # Nothing to do return {} content_type = req.get_header('Content-Type') if cont...
[ "webargs.core.get_value", "webargs.core.parse_json" ]
[((1309, 1348), 'webargs.core.get_value', 'core.get_value', (['req.params', 'name', 'field'], {}), '(req.params, name, field)\n', (1323, 1348), False, 'from webargs import core\n'), ((1459, 1498), 'webargs.core.get_value', 'core.get_value', (['req.params', 'name', 'field'], {}), '(req.params, name, field)\n', (1473, 14...
# Copyright 2016 The Johns Hopkins University Applied Physics Laboratory # # 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 ...
[ "boss.utils.get_access_mode", "bossutils.aws.get_session", "bosscore.request.BossRequest", "bosscore.error.BossHTTPError", "bossutils.configuration.BossConfig", "rest_framework.response.Response", "boss.throttling.BossThrottle", "spdb.project.BossResourceDjango", "spdb.spatialdb.SpatialDB" ]
[((3169, 3199), 'boss.utils.get_access_mode', 'utils.get_access_mode', (['request'], {}), '(request)\n', (3190, 3199), False, 'from boss import utils\n'), ((3250, 3286), 'spdb.project.BossResourceDjango', 'spdb.project.BossResourceDjango', (['req'], {}), '(req)\n', (3281, 3286), False, 'import spdb\n'), ((4364, 4400), ...
# ------------------------------------------------------------- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you unde...
[ "systemds.utils.converters.numpy_to_matrix_block", "systemds.operator.Scalar" ]
[((13223, 13311), 'systemds.operator.Scalar', 'Scalar', (['self.sds_context', '"""toString"""', '[self]', 'kwargs'], {'output_type': 'OutputType.STRING'}), "(self.sds_context, 'toString', [self], kwargs, output_type=OutputType\n .STRING)\n", (13229, 13311), False, 'from systemds.operator import OperationNode, Scalar...
import logging from ...util import none_or from .collection import Collection logger = logging.getLogger("mw.database.collections.pages") class Pages(Collection): def get(self, page_id=None, namespace_title=None, rev_id=None): """ Gets a single page based on a legitimate identifier of the page. ...
[ "logging.getLogger" ]
[((89, 139), 'logging.getLogger', 'logging.getLogger', (['"""mw.database.collections.pages"""'], {}), "('mw.database.collections.pages')\n", (106, 139), False, 'import logging\n')]
# pylint: disable=R0902,E1101,W0201,too-few-public-methods,W0613 import datetime from sqlalchemy_utils import UUIDType from sqlalchemy import ( Column, DateTime, Integer, Sequence, ) from codebase.utils.sqlalchemy import ORMBase class User(ORMBase): """ 用户由 AuthN 服务创建并鉴别,本处存储仅是为了关系映射方便 ...
[ "sqlalchemy.Sequence", "sqlalchemy.DateTime", "sqlalchemy_utils.UUIDType" ]
[((461, 490), 'sqlalchemy.Sequence', 'Sequence', (['"""authz_user_id_seq"""'], {}), "('authz_user_id_seq')\n", (469, 490), False, 'from sqlalchemy import Column, DateTime, Integer, Sequence\n'), ((617, 627), 'sqlalchemy_utils.UUIDType', 'UUIDType', ([], {}), '()\n', (625, 627), False, 'from sqlalchemy_utils import UUID...
#!/usr/bin/python # -*- coding: utf-8 -*- # © 2020 Nokia # Licensed under the GNU General Public License v3.0 only # SPDX-License-Identifier: GPL-3.0-only from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { "metadata_version": "1.1", "status": ["preview"...
[ "ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils.NetboxAnsibleModule", "ansible_collections.netbox.netbox.plugins.module_utils.netbox_dcim.NetboxDcimModule", "copy.deepcopy" ]
[((5560, 5585), 'copy.deepcopy', 'deepcopy', (['NETBOX_ARG_SPEC'], {}), '(NETBOX_ARG_SPEC)\n', (5568, 5585), False, 'from copy import deepcopy\n'), ((8701, 8804), 'ansible_collections.netbox.netbox.plugins.module_utils.netbox_utils.NetboxAnsibleModule', 'NetboxAnsibleModule', ([], {'argument_spec': 'argument_spec', 'su...
# -*- coding: utf-8 -*- #--------------------------------------------------------------------------- # Copyright 2019 VMware, Inc. All rights reserved. # AUTO GENERATED FILE -- DO NOT MODIFY! # # vAPI stub file for package com.vmware.nsx.cluster. #----------------------------------------------------------------------...
[ "vmware.vapi.bindings.type.StringType", "vmware.vapi.bindings.type.ReferenceType", "vmware.vapi.bindings.type.VoidType", "vmware.vapi.bindings.type.BooleanType", "vmware.vapi.bindings.type.IntegerType", "vmware.vapi.lib.rest.OperationRestMetadata", "vmware.vapi.bindings.stub.ApiInterfaceStub.__init__", ...
[((1424, 1474), 'vmware.vapi.bindings.stub.VapiInterface.__init__', 'VapiInterface.__init__', (['self', 'config', '_BackupsStub'], {}), '(self, config, _BackupsStub)\n', (1446, 1474), False, 'from vmware.vapi.bindings.stub import ApiInterfaceStub, StubFactoryBase, VapiInterface\n'), ((3220, 3267), 'vmware.vapi.bindings...
from netmiko import ConnectHandler from getpass import getpass import re from prettytable import PrettyTable import os import datetime def ssh_startup_config(username, password): start_config_device = ConnectHandler(device_type='cisco_ios', host='ios-xe-mgmt.cisco.com', port=8181, username=username, passwor...
[ "netmiko.ConnectHandler", "datetime.datetime.now" ]
[((213, 336), 'netmiko.ConnectHandler', 'ConnectHandler', ([], {'device_type': '"""cisco_ios"""', 'host': '"""ios-xe-mgmt.cisco.com"""', 'port': '(8181)', 'username': 'username', 'password': 'password'}), "(device_type='cisco_ios', host='ios-xe-mgmt.cisco.com', port=\n 8181, username=username, password=password)\n",...
#!/usr/bin/env python2 import argparse from ingredient_phrase_tagger.training import labelled_data from ingredient_phrase_tagger.training import partitioner def main(args): with open(args.label_path) as label_file, open( args.training_path, 'wb') as training_file, open( args.testing_p...
[ "ingredient_phrase_tagger.training.partitioner.split_labels", "ingredient_phrase_tagger.training.labelled_data.Writer", "argparse.ArgumentParser", "ingredient_phrase_tagger.training.labelled_data.Reader" ]
[((723, 858), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'prog': '"""ingredient-phrase-tagger: Label Partitioner"""', 'formatter_class': 'argparse.ArgumentDefaultsHelpFormatter'}), "(prog='ingredient-phrase-tagger: Label Partitioner',\n formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n", (74...
""" Copyright Astronomer, 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 writing, software di...
[ "datetime.datetime", "datetime.timedelta", "astro.sql.table.Table", "astro.sql.transform" ]
[((1147, 1204), 'astro.sql.transform', 'aql.transform', ([], {'conn_id': '"""postgres_conn"""', 'database': '"""pagila"""'}), "(conn_id='postgres_conn', database='pagila')\n", (1160, 1204), True, 'import astro.sql as aql\n'), ((941, 961), 'datetime.datetime', 'datetime', (['(2019)', '(1)', '(1)'], {}), '(2019, 1, 1)\n'...
import typing import numpy as np import numba as nb @nb.njit def tree_bfs( g: np.ndarray, edge_idx: np.ndarray, root: int, ) -> typing.Tuple[(np.ndarray, ) * 2]: n = g[:, :2].max() + 1 parent = np.full(n, -1, np.int64) depth = np.zeros(n, np.int64) fifo_que = [root] for u in fifo_que: for v in g[e...
[ "numpy.full", "numpy.zeros" ]
[((206, 230), 'numpy.full', 'np.full', (['n', '(-1)', 'np.int64'], {}), '(n, -1, np.int64)\n', (213, 230), True, 'import numpy as np\n'), ((241, 262), 'numpy.zeros', 'np.zeros', (['n', 'np.int64'], {}), '(n, np.int64)\n', (249, 262), True, 'import numpy as np\n')]
''' This demo shows how to create variable size dataset and then it creates mini-batches from this dataset so that it calculates the likelihood of each observation sequence in every batch using vmap. Author : <NAME> (@karalleyna) ''' from jax import vmap, jit from jax.random import split, randint, PRNGKey import jax....
[ "hmm_discrete_lib.hmm_loglikelihood_numpy", "jax.random.PRNGKey", "hmm_utils.hmm_sample_minibatches", "hmm_utils.pad_sequences", "numpy.allclose", "jax.numpy.array", "numpy.array", "hmm_discrete_lib.HMMJax", "hmm_utils.hmm_sample_n", "jax.vmap", "jax.random.split" ]
[((836, 873), 'jax.numpy.array', 'jnp.array', (['[[0.95, 0.05], [0.1, 0.9]]'], {}), '([[0.95, 0.05], [0.1, 0.9]])\n', (845, 873), True, 'import jax.numpy as jnp\n'), ((912, 1021), 'jax.numpy.array', 'jnp.array', (['[[1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6, 1 / 6], [1 / 10, 1 / 10, 1 / 10, 1 / \n 10, 1 / 10, 5 / 10]]'], {...
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-10-26 23:35 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('devices', '0004_auto_20160429_1044'), ] operations = [ migrations.AlterModelOptions...
[ "django.db.migrations.AlterModelOptions" ]
[((292, 499), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""template"""', 'options': "{'ordering': ['name'], 'permissions': (('read_template',\n 'Can read Template'),), 'verbose_name': 'Template',\n 'verbose_name_plural': 'Templates'}"}), "(name='template', options={'...
"""Container environment variable utilities """ from os import getenv __version__ = "0.1.0" def get_environment(variable, default=None, encoding="utf-8"): """Get value of an environment variable. Returns the value of an environment variable if it exists. If it does not exist and a {variable}_FILE varia...
[ "os.getenv" ]
[((800, 816), 'os.getenv', 'getenv', (['variable'], {}), '(variable)\n', (806, 816), False, 'from os import getenv\n'), ((854, 880), 'os.getenv', 'getenv', (['f"""{variable}_FILE"""'], {}), "(f'{variable}_FILE')\n", (860, 880), False, 'from os import getenv\n')]
# _*_ coding: utf-8 _*_ """美食 app 相关的模型""" import os import random import time from django.db import models from django.utils import timezone # Create your models here. def food_article_image_upload_path(instance, filename): """缩略图片上传路径""" return os.path.join( "food_article", instance.arti...
[ "random.sample", "django.db.models.TextField", "django.db.models.IntegerField", "django.db.models.ForeignKey", "os.path.join", "django.db.models.ManyToManyField", "django.db.models.ImageField", "django.db.models.DateTimeField", "time.time", "django.db.models.CharField" ]
[((261, 320), 'os.path.join', 'os.path.join', (['"""food_article"""', 'instance.article_id', 'filename'], {}), "('food_article', instance.article_id, filename)\n", (273, 320), False, 'import os\n'), ((444, 511), 'os.path.join', 'os.path.join', (['"""food_article"""', 'instance.article_id', '"""step"""', 'filename'], {}...
import torch # torch 1.9.0+cu111 import numpy as np from compare import * OC = 3 IN = 2 IC = 2 IH = 4 IW = 4 KH = 3 KW = 3 weight = torch.ones([OC, IC, KH, KW], dtype=torch.float32, requires_grad=False) print(weight) input_np = np.arange(1, IN * IC * IH * IW + 1).reshape(IN, IC, IH, IW) input = torch.from_numpy(inpu...
[ "numpy.fromfile", "torch.from_numpy", "torch.nn.Conv2d", "torch.nn.Parameter", "numpy.arange", "torch.ones" ]
[((134, 204), 'torch.ones', 'torch.ones', (['[OC, IC, KH, KW]'], {'dtype': 'torch.float32', 'requires_grad': '(False)'}), '([OC, IC, KH, KW], dtype=torch.float32, requires_grad=False)\n', (144, 204), False, 'import torch\n'), ((392, 452), 'torch.nn.Conv2d', 'torch.nn.Conv2d', (['IC', 'OC', '(KH, KH)'], {'stride': '(1, ...
from rxbp.flowables.controlledzipflowable import ControlledZipFlowable from rxbp.indexed.selectors.bases.numericalbase import NumericalBase from rxbp.subscriber import Subscriber from rxbp.testing.testcasebase import TestCaseBase from rxbp.testing.testflowable import TestFlowable from rxbp.testing.tobserver import TObs...
[ "rxbp.testing.tscheduler.TScheduler", "rxbp.indexed.selectors.bases.numericalbase.NumericalBase", "rxbp.testing.testflowable.TestFlowable", "rxbp.testing.tobserver.TObserver", "rxbp.subscriber.Subscriber", "rxbp.flowables.controlledzipflowable.ControlledZipFlowable" ]
[((485, 497), 'rxbp.testing.tscheduler.TScheduler', 'TScheduler', ([], {}), '()\n', (495, 497), False, 'from rxbp.testing.tscheduler import TScheduler\n'), ((518, 529), 'rxbp.testing.tobserver.TObserver', 'TObserver', ([], {}), '()\n', (527, 529), False, 'from rxbp.testing.tobserver import TObserver\n'), ((584, 600), '...
""" DIRBS REST-ful job_metadata API module. SPDX-License-Identifier: BSD-4-Clause-Clear Copyright (c) 2018-2019 Qualcomm Technologies, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provide...
[ "psycopg2.sql.SQL", "dirbs.api.common.db.get_db_connection", "dirbs.api.v1.schemas.job_metadata.JobMetadata", "psycopg2.sql.Identifier", "flask.jsonify" ]
[((3776, 3795), 'dirbs.api.common.db.get_db_connection', 'get_db_connection', ([], {}), '()\n', (3793, 3795), False, 'from dirbs.api.common.db import get_db_connection\n'), ((4621, 4658), 'psycopg2.sql.SQL', 'sql.SQL', (['"""SELECT * FROM job_metadata"""'], {}), "('SELECT * FROM job_metadata')\n", (4628, 4658), False, ...
# from cloudmesh_client.hostlist import Parameter import inspect # from abc import ABCMeta from cloudmesh_client.common.Printer import Printer from cloudmesh_client.shell.console import Console # noinspection PyBroadException,PyUnreachableCode,PyUnusedLocal class CloudProviderBase(object): # __metaclass__ = A...
[ "cloudmesh_client.db.CloudmeshDatabase.CloudmeshDatabase", "inspect.stack", "cloudmesh_client.shell.console.Console.error", "cloudmesh_client.common.Printer.Printer.attribute", "cloudmesh_client.common.Printer.Printer.write" ]
[((10839, 10858), 'cloudmesh_client.db.CloudmeshDatabase.CloudmeshDatabase', 'CloudmeshDatabase', ([], {}), '()\n', (10856, 10858), False, 'from cloudmesh_client.db.CloudmeshDatabase import CloudmeshDatabase\n'), ((11760, 11785), 'cloudmesh_client.shell.console.Console.error', 'Console.error', (['ex.message'], {}), '(e...
# This is python script for Metashape Pro. Scripts repository: https://github.com/agisoft-llc/metashape-scripts # # Based on https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/differentiable-parameterizations/style_transfer_3d.ipynb # Modifications: # 1. Taking into account cameras position...
[ "Metashape.app.getOpenFileName", "lucid.modelzoo.vision_models.InceptionV1", "lucid.optvis.style.mean_l1_loss", "lucid.misc.io.save", "OpenGL.GL.glGetString", "Metashape.app.messageBox", "io.BytesIO", "lucid.misc.tfutil.create_session", "Metashape.app.getExistingDirectory", "math.atan", "lucid.m...
[((22210, 22264), 'Metashape.app.addMenuItem', 'Metashape.app.addMenuItem', (['label', 'model_style_transfer'], {}), '(label, model_style_transfer)\n', (22235, 22264), False, 'import Metashape\n'), ((22058, 22091), 'PySide2.QtWidgets.QApplication.instance', 'QtWidgets.QApplication.instance', ([], {}), '()\n', (22089, 2...
# -*- coding: utf-8 -*- # This file is part of Viper - https://github.com/viper-framework/viper # See the file 'LICENSE' for copying permission. import os import shutil from viper.common.out import print_warning, print_error, print_info from viper.core.project import __project__ from viper.common.constants import VIP...
[ "os.path.exists", "viper.common.out.print_warning", "viper.common.out.print_error", "os.makedirs", "os.path.join", "viper.core.project.__project__.get_path", "shutil.copytree" ]
[((749, 777), 'os.path.join', 'os.path.join', (['folder', 'sha256'], {}), '(folder, sha256)\n', (761, 777), False, 'import os\n'), ((1475, 1518), 'os.path.join', 'os.path.join', (['__project__.base_path', '"""yara"""'], {}), "(__project__.base_path, 'yara')\n", (1487, 1518), False, 'import os\n'), ((1526, 1557), 'os.pa...
## # Copyright: Copyright (c) MOSEK ApS, Denmark. All rights reserved. # # File: lownerjohn_ellipsoid.py # # Purpose: # Computes the Lowner-John inner and outer ellipsoidal # approximations of a polytope. # # # Note: # To plot the solution the Python package pyx is required. # # # References: # [1] ...
[ "numpy.array", "numpy.dot", "numpy.linalg.inv", "math.log" ]
[((6568, 6583), 'numpy.array', 'numpy.array', (['Po'], {}), '(Po)\n', (6579, 6583), False, 'import numpy\n'), ((6596, 6616), 'numpy.linalg.inv', 'numpy.linalg.inv', (['Po'], {}), '(Po)\n', (6612, 6616), False, 'import numpy\n'), ((6629, 6644), 'numpy.array', 'numpy.array', (['co'], {}), '(co)\n', (6640, 6644), False, '...
from django import http from django.utils.deprecation import MiddlewareMixin from apps.recall.models import ClientInfo class AuthUser(MiddlewareMixin): def process_request(self, request): """ 用户认证 :param request: :return: """ app_id, api_key, secret_key = request.GE...
[ "apps.recall.models.ClientInfo.objects.filter", "django.http.JsonResponse" ]
[((540, 628), 'django.http.JsonResponse', 'http.JsonResponse', (["{'code': '3001', 'statement': 'Missing the necessary parameters'}"], {}), "({'code': '3001', 'statement':\n 'Missing the necessary parameters'})\n", (557, 628), False, 'from django import http\n'), ((789, 864), 'django.http.JsonResponse', 'http.JsonRe...
import tweepy # import the consumer data from consumer_data import consumer_key, consumer_secret import helpers print("=========================") print("========= twjnt =========") print("=========================") auth = tweepy.OAuthHandler(consumer_key, consumer_secret) # try first to load already gotten tokens...
[ "tweepy.API", "helpers.save_access_tokens", "helpers.load_access_tokens", "tweepy.OAuthHandler" ]
[((227, 277), 'tweepy.OAuthHandler', 'tweepy.OAuthHandler', (['consumer_key', 'consumer_secret'], {}), '(consumer_key, consumer_secret)\n', (246, 277), False, 'import tweepy\n'), ((336, 364), 'helpers.load_access_tokens', 'helpers.load_access_tokens', ([], {}), '()\n', (362, 364), False, 'import helpers\n'), ((508, 524...
from abc import ABC, abstractmethod import logging # from time import sleep log = logging.getLogger("Port") class Port(ABC): @abstractmethod def send_and_receive(self, *args, **kwargs) -> dict: raise NotImplementedError def connect(self) -> None: log.debug("connect not implemented") ...
[ "logging.getLogger" ]
[((83, 108), 'logging.getLogger', 'logging.getLogger', (['"""Port"""'], {}), "('Port')\n", (100, 108), False, 'import logging\n')]
import datetime import os import sys import traceback from os.path import expanduser from shutil import copyfile import nose.plugins.base from jinja2 import Environment, FileSystemLoader from nose.plugins.base import Plugin class MarketFeatures(Plugin): """ provide summery report of executed tests listed per...
[ "os.path.exists", "traceback.format_tb", "os.makedirs", "traceback.format_exception", "os.path.realpath", "datetime.datetime.now", "sys.exc_info", "os.path.isdir", "shutil.copyfile", "os.path.abspath", "jinja2.FileSystemLoader", "os.path.expanduser" ]
[((813, 828), 'os.path.expanduser', 'expanduser', (['"""~"""'], {}), "('~')\n", (823, 828), False, 'from os.path import expanduser\n'), ((1819, 1842), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (1840, 1842), False, 'import datetime\n'), ((1898, 1921), 'datetime.datetime.now', 'datetime.datetime...
# Copyright 2018 The TensorFlow 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 applica...
[ "tensorflow.python.ops.array_ops.placeholder", "tensorflow_model_optimization.python.core.quantization.keras.quant_ops.MovingAvgQuantize", "tensorflow.python.client.session.Session", "tensorflow_model_optimization.python.core.quantization.keras.quant_ops.LastValueQuantize", "tensorflow.python.ops.variables....
[((5668, 5685), 'tensorflow.python.platform.googletest.main', 'googletest.main', ([], {}), '()\n', (5683, 5685), False, 'from tensorflow.python.platform import googletest\n'), ((4758, 4769), 'tensorflow.python.framework.ops.Graph', 'ops.Graph', ([], {}), '()\n', (4767, 4769), False, 'from tensorflow.python.framework im...