code
stringlengths
22
1.05M
apis
listlengths
1
3.31k
extract_api
stringlengths
75
3.25M
""" Downloads tweets between two dates. """ from __future__ import annotations import datetime import sys from argparse import ArgumentParser, Namespace, RawDescriptionHelpFormatter from pathlib import Path from py_executable_checklist.workflow import run_workflow from twitter_utils import setup_logging from twitter...
[ "twitter_utils.setup_logging", "twitter_utils.browser_session.BrowserSession", "argparse.ArgumentParser" ]
[((594, 679), 'argparse.ArgumentParser', 'ArgumentParser', ([], {'description': '__doc__', 'formatter_class': 'RawDescriptionHelpFormatter'}), '(description=__doc__, formatter_class=RawDescriptionHelpFormatter\n )\n', (608, 679), False, 'from argparse import ArgumentParser, Namespace, RawDescriptionHelpFormatter\n')...
# # Copyright 2017-2018 Amazon.com, Inc. and its affiliates. All Rights Reserved. # # Licensed under the MIT License. See the LICENSE accompanying this file # for the specific language governing permissions and limitations under # the License. # import mount_efs from .. import utils from botocore.exceptions import Cl...
[ "mount_efs.bootstrap_cloudwatch_logging", "mount_efs.check_if_cloudwatch_log_enabled", "mount_efs.create_cloudwatch_log_group", "botocore.exceptions.ClientError", "mount_efs.create_cloudwatch_log_stream", "mount_efs.get_cloudwatchlog_config", "mount_efs.get_botocore_client", "botocore.exceptions.NoCre...
[((1609, 1620), 'mock.MagicMock', 'MagicMock', ([], {}), '()\n', (1618, 1620), False, 'from mock import MagicMock\n'), ((2014, 2063), 'mount_efs.check_if_cloudwatch_log_enabled', 'mount_efs.check_if_cloudwatch_log_enabled', (['config'], {}), '(config)\n', (2055, 2063), False, 'import mount_efs\n'), ((2221, 2263), 'moun...
import unittest from unittest.case import expectedFailure import spydrnet as sdn from spydrnet_physical.util.get_names import get_names class TestDefinition(unittest.TestCase): def setUp(self): self.netlist = sdn.Netlist("test_netlist") self.library = self.netlist.create_library("test_lib") ...
[ "spydrnet.Netlist", "spydrnet.Cable" ]
[((224, 251), 'spydrnet.Netlist', 'sdn.Netlist', (['"""test_netlist"""'], {}), "('test_netlist')\n", (235, 251), True, 'import spydrnet as sdn\n'), ((484, 503), 'spydrnet.Cable', 'sdn.Cable', (['"""cable1"""'], {}), "('cable1')\n", (493, 503), True, 'import spydrnet as sdn\n'), ((1121, 1140), 'spydrnet.Cable', 'sdn.Cab...
#!/usr/bin/env python import os import sys import django from memory_profiler import profile @profile(precision=8) def no_cache(): from hashid_field.hashid import Hashid instances = [Hashid(i, salt="asdf", min_length=7) for i in range(1, 10_000)] return instances @profile(precision=8) def with_cache():...
[ "django.setup", "memory_profiler.profile", "hashids.Hashids", "hashid_field.hashid.Hashid", "django.get_version" ]
[((97, 117), 'memory_profiler.profile', 'profile', ([], {'precision': '(8)'}), '(precision=8)\n', (104, 117), False, 'from memory_profiler import profile\n'), ((282, 302), 'memory_profiler.profile', 'profile', ([], {'precision': '(8)'}), '(precision=8)\n', (289, 302), False, 'from memory_profiler import profile\n'), ((...
import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer EcalPi0MonDQM = DQMEDAnalyzer('DQMSourcePi0', prescaleFactor = cms.untracked.int32(1), FolderName = cms.untracked.string('AlCaReco/EcalPi0'), AlCaStreamEBpi0Tag = cms.untracked.InputTag("hltAlCaPi0RegRecHits"...
[ "FWCore.ParameterSet.Config.untracked.int32", "FWCore.ParameterSet.Config.double", "FWCore.ParameterSet.Config.untracked.string", "FWCore.ParameterSet.Config.untracked.bool", "FWCore.ParameterSet.Config.int32", "FWCore.ParameterSet.Config.bool", "FWCore.ParameterSet.Config.untracked.InputTag" ]
[((166, 188), 'FWCore.ParameterSet.Config.untracked.int32', 'cms.untracked.int32', (['(1)'], {}), '(1)\n', (185, 188), True, 'import FWCore.ParameterSet.Config as cms\n'), ((207, 247), 'FWCore.ParameterSet.Config.untracked.string', 'cms.untracked.string', (['"""AlCaReco/EcalPi0"""'], {}), "('AlCaReco/EcalPi0')\n", (227...
import datetime class SimpleLogger: log_file = None @staticmethod def instance(): if '_instance' not in SimpleLogger.__dict__: SimpleLogger._instance = SimpleLogger() return SimpleLogger._instance def open_log(self, path): self.log_file = open(path, 'w') def ...
[ "datetime.datetime.now" ]
[((367, 390), 'datetime.datetime.now', 'datetime.datetime.now', ([], {}), '()\n', (388, 390), False, 'import datetime\n')]
import discord from .vars import ban, feedback, support, unban, warns def perms_dict(ctx): admin_roles = [ role for role in ctx.guild.roles if role.permissions.manage_guild and not role.managed ] overwrite_dict = {} for i in admin_roles: overwrite_dict[i] = discord.PermissionOverwrite...
[ "discord.utils.get", "discord.PermissionOverwrite" ]
[((839, 897), 'discord.utils.get', 'discord.utils.get', (['ctx.guild.text_channels'], {'topic': 'feedback'}), '(ctx.guild.text_channels, topic=feedback)\n', (856, 897), False, 'import discord\n'), ((1072, 1125), 'discord.utils.get', 'discord.utils.get', (['ctx.guild.text_channels'], {'topic': 'ban'}), '(ctx.guild.text_...
import subprocess from pathlib import Path import pytest from bldr.bldr import BLDR from ..testutil import copytree, extract_deb @pytest.fixture def quilt_project_path(tmp_path: Path, asset_dir: Path) -> Path: quilt_project_dir = tmp_path.joinpath('quilt_project') quilt_project_dir.mkdir() subprocess.ch...
[ "bldr.bldr.BLDR", "subprocess.check_call" ]
[((307, 368), 'subprocess.check_call', 'subprocess.check_call', (["['git', 'init']"], {'cwd': 'quilt_project_dir'}), "(['git', 'init'], cwd=quilt_project_dir)\n", (328, 368), False, 'import subprocess\n'), ((373, 461), 'subprocess.check_call', 'subprocess.check_call', (["['git', 'checkout', '-b', 'upstream']"], {'cwd':...
import numpy as np import tensorflow as tf from tensorflow.keras import layers import matplotlib.pyplot as plt def many2many(n_gestures=2, n_frames=300, n_features=21, rnn_units=32): """Model for predicting labels for a sequence of multiple gestures Arguments: n_gestures -- int, size of gesture vocabulary...
[ "matplotlib.pyplot.title", "matplotlib.pyplot.plot", "tensorflow.keras.layers.Dense", "tensorflow.keras.Input", "matplotlib.pyplot.legend", "tensorflow.keras.Model", "tensorflow.keras.layers.LSTM", "numpy.squeeze", "matplotlib.pyplot.ylabel", "matplotlib.pyplot.xlabel" ]
[((526, 570), 'tensorflow.keras.Input', 'tf.keras.Input', ([], {'shape': '(n_frames, n_features)'}), '(shape=(n_frames, n_features))\n', (540, 570), True, 'import tensorflow as tf\n'), ((847, 910), 'tensorflow.keras.Model', 'tf.keras.Model', ([], {'inputs': 'inputs', 'outputs': 'outputs', 'name': '"""many2one"""'}), "(...
# Generated by Django 3.2.10 on 2021-12-20 03:53 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('referral', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='clearance', options={'ordering': ['-pk']},...
[ "django.db.migrations.AlterModelOptions" ]
[((218, 295), 'django.db.migrations.AlterModelOptions', 'migrations.AlterModelOptions', ([], {'name': '"""clearance"""', 'options': "{'ordering': ['-pk']}"}), "(name='clearance', options={'ordering': ['-pk']})\n", (246, 295), False, 'from django.db import migrations\n')]
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on 26/04/2016 Versão 1.0 @author: Ricieri (ELP) Python 3.4.4 """ """ Reviewed on 15/10/2020 Versão 1.0 rev.A - rounded printing values to 3 decimal places and displays '°C' instead of 'ºC'. @author: Marcelo (ELP) Python 3.8.6 """ """ Reviewed on 06/05/2021 Versão 1...
[ "serial.Serial", "siriuspy.magnet.util.get_default_ramp_waveform", "math.isnan", "csv.reader", "csv.writer", "numpy.float32", "struct.unpack", "struct.pack", "time.sleep", "matplotlib.pyplot.figure", "os.path.join", "os.listdir" ]
[((31867, 31882), 'serial.Serial', 'serial.Serial', ([], {}), '()\n', (31880, 31882), False, 'import serial\n'), ((34022, 34045), 'struct.pack', 'struct.pack', (['"""f"""', 'value'], {}), "('f', value)\n", (34033, 34045), False, 'import struct\n'), ((34679, 34702), 'struct.pack', 'struct.pack', (['"""H"""', 'value'], {...
# -*- coding: utf-8 -*- from __future__ import print_function import pytest import irispy.iris_tools as iris_tools import numpy as np import numpy.testing as np_test source_data = np.array([[ 0.563, 1.132, -1.343], [-0.719, 1.441, 1.566]]) source_data1 = np.array([[1, 2, 3], [4, 5, 6]]) def test_conver...
[ "irispy.iris_tools.calculate_intensity_fractional_uncertainty", "pytest.raises", "irispy.iris_tools.convert_DN_to_photons", "numpy.array", "irispy.iris_tools.convert_photons_to_DN", "numpy.testing.assert_allclose" ]
[((181, 239), 'numpy.array', 'np.array', (['[[0.563, 1.132, -1.343], [-0.719, 1.441, 1.566]]'], {}), '([[0.563, 1.132, -1.343], [-0.719, 1.441, 1.566]])\n', (189, 239), True, 'import numpy as np\n'), ((265, 297), 'numpy.array', 'np.array', (['[[1, 2, 3], [4, 5, 6]]'], {}), '([[1, 2, 3], [4, 5, 6]])\n', (273, 297), True...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette import expected from marionette import Wait from marionette.by import By from gaiatest.apps.base import ...
[ "marionette.Wait", "gaiatest.apps.contacts.app.Contacts", "gaiatest.apps.contacts.regions.gmail.GmailLogin", "marionette.expected.element_present", "marionette.expected.element_not_displayed", "gaiatest.apps.base.Base.__init__", "marionette.expected.element_displayed" ]
[((1633, 1664), 'gaiatest.apps.base.Base.__init__', 'Base.__init__', (['self', 'marionette'], {}), '(self, marionette)\n', (1646, 1664), False, 'from gaiatest.apps.base import Base\n'), ((4244, 4271), 'gaiatest.apps.contacts.regions.gmail.GmailLogin', 'GmailLogin', (['self.marionette'], {}), '(self.marionette)\n', (425...
import random import pytz import json from django.dispatch import receiver from django.db.models.signals import pre_save from django_celery_beat.models import CrontabSchedule, PeriodicTask from .models import Agent days = { "sun": 0, "mon": 1, "tue": 2, "wed": 3, "thu": 4, "fri": 5, "sat...
[ "random.randint", "django.dispatch.receiver", "json.dumps", "django_celery_beat.models.PeriodicTask.objects.filter", "pytz.timezone" ]
[((331, 363), 'django.dispatch.receiver', 'receiver', (['pre_save'], {'sender': 'Agent'}), '(pre_save, sender=Agent)\n', (339, 363), False, 'from django.dispatch import receiver\n'), ((2024, 2118), 'django_celery_beat.models.PeriodicTask.objects.filter', 'PeriodicTask.objects.filter', ([], {'name__startswith': 'f"""{in...
#!/usr/bin/env python ''' Copyright 2017 <NAME> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law o...
[ "yaml.load", "theia.TheiaProxy", "time.sleep", "theia.TheiaSniffer", "sys.exit" ]
[((1066, 1082), 'theia.TheiaProxy', 'TheiaProxy', (['conf'], {}), '(conf)\n', (1076, 1082), False, 'from theia import TheiaSniffer, TheiaEncryptedSender, TheiaProxy\n'), ((807, 819), 'yaml.load', 'yaml.load', (['c'], {}), '(c)\n', (816, 819), False, 'import yaml\n'), ((1041, 1052), 'sys.exit', 'sys.exit', (['(1)'], {})...
# -*- coding: utf-8 -*- import abc import six from . import tracing YDB_AUTH_TICKET_HEADER = "x-ydb-auth-ticket" @six.add_metaclass(abc.ABCMeta) class AbstractCredentials(object): """ An abstract class that provides auth metadata """ @six.add_metaclass(abc.ABCMeta) class Credentials(object): def __...
[ "six.add_metaclass" ]
[((117, 147), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (134, 147), False, 'import six\n'), ((252, 282), 'six.add_metaclass', 'six.add_metaclass', (['abc.ABCMeta'], {}), '(abc.ABCMeta)\n', (269, 282), False, 'import six\n')]
from RLTest import Env def test_ts_del_uncompressed(): # total samples = 101 sample_len = 101 with Env().getClusterConnectionIfNeeded() as r: r.execute_command("ts.create", 'test_key', 'uncompressed') for i in range(sample_len): assert i == r.execute_command("ts.add", 'test_ke...
[ "RLTest.Env" ]
[((113, 118), 'RLTest.Env', 'Env', ([], {}), '()\n', (116, 118), False, 'from RLTest import Env\n'), ((733, 738), 'RLTest.Env', 'Env', ([], {}), '()\n', (736, 738), False, 'from RLTest import Env\n'), ((1371, 1376), 'RLTest.Env', 'Env', ([], {}), '()\n', (1374, 1376), False, 'from RLTest import Env\n'), ((1977, 1982), ...
""" Copyright (C) 2020, <NAME>, https://www.gagolewski.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,...
[ "numpy.median", "numpy.loadtxt" ]
[((1269, 1295), 'numpy.loadtxt', 'np.loadtxt', (['fname'], {'ndmin': '(2)'}), '(fname, ndmin=2)\n', (1279, 1295), True, 'import numpy as np\n'), ((1840, 1860), 'numpy.median', 'np.median', (['X'], {'axis': '(0)'}), '(X, axis=0)\n', (1849, 1860), True, 'import numpy as np\n'), ((1675, 1695), 'numpy.median', 'np.median',...
import numpy as np import random class ExperienceMemory(object): def __init__(self, capacity, stateLength): self.__capacity = capacity self.__usedCapacity = 0 self.__stateLength = stateLength self.__writePosition = 0 self.__writePositionReseted = False self.__ids = ...
[ "numpy.zeros" ]
[((320, 361), 'numpy.zeros', 'np.zeros', (['self.__capacity'], {'dtype': '"""uint64"""'}), "(self.__capacity, dtype='uint64')\n", (328, 361), True, 'import numpy as np\n'), ((388, 452), 'numpy.zeros', 'np.zeros', (['(self.__capacity, self.__stateLength)'], {'dtype': '"""float32"""'}), "((self.__capacity, self.__stateLe...
# coding=utf-8 u""" Description: Generate new basic template from the result and add it to data base. User: Jerry.Fang Date: 13-12-12 """ from xlrd import open_workbook from model.session import * from template.match_rule import MatchRule from template.logger import logger from model.basic_element import ...
[ "template.match_rule.MatchRule.replace_special_word", "template.logger.logger.debug", "template.basic_template_generator.BasicTemplate.store_attr_rule_to_ele_list", "model.basic_element.BasicElement", "xlrd.open_workbook", "template.basic_template_generator.BasicTemplate.clean_attr_rule_by_class_id", "t...
[((823, 882), 'template.logger.logger.info', 'logger.info', (["('Set input result file path: %s .' % file_path)"], {}), "('Set input result file path: %s .' % file_path)\n", (834, 882), False, 'from template.logger import logger\n'), ((2643, 2694), 'template.basic_template_generator.BasicTemplate.clean_attr_rule_by_cla...
import torch import torch.nn as nn import torch.nn.functional as F class Gating(nn.Module): ''' FCN architecture for large scale scene coordiante regression. ''' def __init__(self, num_experts, capacity=1): ''' Constructor. ''' super(Gating, self).__init__() self.capacity = capacity self.conv1 = nn...
[ "torch.nn.Conv2d", "torch.nn.functional.log_softmax", "torch.tanh" ]
[((318, 342), 'torch.nn.Conv2d', 'nn.Conv2d', (['(3)', '(8)', '(3)', '(1)', '(1)'], {}), '(3, 8, 3, 1, 1)\n', (327, 342), True, 'import torch.nn as nn\n'), ((358, 383), 'torch.nn.Conv2d', 'nn.Conv2d', (['(8)', '(16)', '(3)', '(2)', '(1)'], {}), '(8, 16, 3, 2, 1)\n', (367, 383), True, 'import torch.nn as nn\n'), ((399, ...
#!/usr/bin/env python import argparse import sys from typing import List, Optional import bdfparser import numpy as np DRAWING_CHARS = "8,10,176-223" def main(): args = parse_args() font = bdfparser.Font(args.bdf_file) # Choose glyphs from font and convert them to bitmaps bitmaps = [get_bitmap_for_...
[ "argparse.ArgumentParser", "numpy.resize", "numpy.zeros", "numpy.rot90", "bdfparser.Font", "numpy.array_equal", "numpy.concatenate" ]
[((201, 230), 'bdfparser.Font', 'bdfparser.Font', (['args.bdf_file'], {}), '(args.bdf_file)\n', (215, 230), False, 'import bdfparser\n'), ((604, 641), 'numpy.zeros', 'np.zeros', (['(height, 8)'], {'dtype': 'np.uint8'}), '((height, 8), dtype=np.uint8)\n', (612, 641), True, 'import numpy as np\n'), ((1128, 1224), 'argpar...
""" Various functions for inspecting and restructuring effects. """ from __future__ import print_function import sys from characteristic import attributes from . import Effect, guard, ParallelEffects import six @attributes(['intent'], apply_with_init=False) class StubIntent(object): """ An intent which w...
[ "six.reraise", "sys.exc_info", "characteristic.attributes" ]
[((219, 264), 'characteristic.attributes', 'attributes', (["['intent']"], {'apply_with_init': '(False)'}), "(['intent'], apply_with_init=False)\n", (229, 264), False, 'from characteristic import attributes\n'), ((2067, 2087), 'six.reraise', 'six.reraise', (['*result'], {}), '(*result)\n', (2078, 2087), False, 'import s...
import argparse from athene.utils.config import Config if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('output', help='/path/to/file/to/save/config') args = parser.parse_args() Config.save_config(args.output)
[ "athene.utils.config.Config.save_config", "argparse.ArgumentParser" ]
[((97, 122), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {}), '()\n', (120, 122), False, 'import argparse\n'), ((229, 260), 'athene.utils.config.Config.save_config', 'Config.save_config', (['args.output'], {}), '(args.output)\n', (247, 260), False, 'from athene.utils.config import Config\n')]
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI from toontown.cogdominium import CogdoBarrelRoomConsts import random class DistributedCogdoBarrelAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory("DistributedCogdoB...
[ "direct.directnotify.DirectNotifyGlobal.directNotify.newCategory", "random.randint", "direct.distributed.DistributedObjectAI.DistributedObjectAI.__init__" ]
[((258, 329), 'direct.directnotify.DirectNotifyGlobal.directNotify.newCategory', 'DirectNotifyGlobal.directNotify.newCategory', (['"""DistributedCogdoBarrelAI"""'], {}), "('DistributedCogdoBarrelAI')\n", (301, 329), False, 'from direct.directnotify import DirectNotifyGlobal\n'), ((375, 414), 'direct.distributed.Distrib...
import sys h, a = map(int, sys.stdin.readline().split()) def main(): return (h + a - 1) // a if __name__ == '__main__': ans = main() print(ans)
[ "sys.stdin.readline" ]
[((30, 50), 'sys.stdin.readline', 'sys.stdin.readline', ([], {}), '()\n', (48, 50), False, 'import sys\n')]
# Copyright (c) 2016-2017, the ElectrumX authors # # All rights reserved. # # See the file "LICENCE" for information about the copyright # and warranty status of this software. '''Backend database abstraction. The abstraction needs to be improved to not heavily penalise LMDB. ''' import os from functools import part...
[ "functools.partial", "os.path.exists", "gc.collect", "lib.util.subclasses", "lib.util.increment_byte_string" ]
[((458, 477), 'lib.util.subclasses', 'subclasses', (['Storage'], {}), '(Storage)\n', (468, 477), False, 'from lib.util import subclasses, increment_byte_string\n'), ((2551, 2608), 'functools.partial', 'partial', (['self.db.write_batch'], {'transaction': '(True)', 'sync': '(True)'}), '(self.db.write_batch, transaction=T...
from sqlalchemy import select from sqlalchemy.sql.functions import count from sqlutil.sqlalchemy_methods import ( get_sqlalchemy_base_engine, get_rows, get_tables_by_reflection, count_rows, ) from tqdm import tqdm from util import data_io, util_methods if __name__ == "__main__": # file = "sqlite://...
[ "sqlutil.sqlalchemy_methods.count_rows", "sqlutil.sqlalchemy_methods.get_sqlalchemy_base_engine", "sqlalchemy.select", "sqlutil.sqlalchemy_methods.get_tables_by_reflection" ]
[((461, 493), 'sqlutil.sqlalchemy_methods.get_sqlalchemy_base_engine', 'get_sqlalchemy_base_engine', (['file'], {}), '(file)\n', (487, 493), False, 'from sqlutil.sqlalchemy_methods import get_sqlalchemy_base_engine, get_rows, get_tables_by_reflection, count_rows\n'), ((507, 554), 'sqlutil.sqlalchemy_methods.get_tables_...
import tensorflow as tf import numpy as np import math class Position_Encoder(object): def __init__(self, emb_size, max_len=5000): self.emb_size = emb_size self.max_len = max_len pe = np.zeros([max_len, emb_size], np.float32) position = np.expand_dims(np.arange(0, max_len), 1).astyp...
[ "tensorflow.contrib.layers.xavier_initializer", "tensorflow.reduce_all", "tensorflow.Variable", "numpy.sin", "numpy.arange", "tensorflow.greater_equal", "tensorflow.get_variable", "tensorflow.nn.softmax", "tensorflow.variable_scope", "tensorflow.concat", "tensorflow.nn.selu", "math.log", "te...
[((213, 254), 'numpy.zeros', 'np.zeros', (['[max_len, emb_size]', 'np.float32'], {}), '([max_len, emb_size], np.float32)\n', (221, 254), True, 'import numpy as np\n'), ((462, 489), 'numpy.sin', 'np.sin', (['(position * div_term)'], {}), '(position * div_term)\n', (468, 489), True, 'import numpy as np\n'), ((512, 539), ...
# Copyright 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # 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....
[ "oslo.i18n._translate.translate", "logging.handlers.MemoryHandler.__init__", "oslo.i18n._translate.translate_args" ]
[((2307, 2371), 'logging.handlers.MemoryHandler.__init__', 'handlers.MemoryHandler.__init__', (['self'], {'capacity': '(0)', 'target': 'target'}), '(self, capacity=0, target=target)\n', (2338, 2371), False, 'from logging import handlers\n'), ((2944, 2989), 'oslo.i18n._translate.translate', '_translate.translate', (['re...
# Copyright 2016 Battelle Energy Alliance, 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 agr...
[ "django.utils.timezone.now", "django.contrib.humanize.templatetags.humanize.naturaltime", "datetime.datetime.fromtimestamp" ]
[((926, 940), 'django.contrib.humanize.templatetags.humanize.naturaltime', 'naturaltime', (['d'], {}), '(d)\n', (937, 940), False, 'from django.contrib.humanize.templatetags.humanize import naturaltime\n'), ((1020, 1034), 'django.contrib.humanize.templatetags.humanize.naturaltime', 'naturaltime', (['d'], {}), '(d)\n', ...
# General Module imports----------------------------------- from datetime import datetime, date, time import yaml import json # General Django Imports---------------------------------- from django.shortcuts import render_to_response from django.http import Http404, HttpResponse, HttpResponseRedirect from django.templa...
[ "patient.models.PatientDetail.objects.get", "yaml.load", "django.http.HttpResponse", "AuShadha.core.views.dijit_tree.DijitTree", "django.http.Http404", "AuShadha.core.views.dijit_tree.DijitTreeNode", "django.template.Template", "django.template.RequestContext" ]
[((1400, 1436), 'django.template.RequestContext', 'RequestContext', (['self.request', 'kwargs'], {}), '(self.request, kwargs)\n', (1414, 1436), False, 'from django.template import RequestContext\n'), ((2223, 2234), 'AuShadha.core.views.dijit_tree.DijitTree', 'DijitTree', ([], {}), '()\n', (2232, 2234), False, 'from AuS...
import os import unittest import numpy as np import numpy.random as rnd import tensorflow as tf from pymanopt.function import TensorFlow from . import _backend_tests os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" class TestUnaryFunction(_backend_tests.TestUnaryFunction): def setUp(self): super().setUp() ...
[ "tensorflow.reduce_sum", "numpy.random.randn", "pymanopt.function.TensorFlow", "tensorflow.zeros", "tensorflow.tensordot" ]
[((397, 410), 'pymanopt.function.TensorFlow', 'TensorFlow', (['x'], {}), '(x)\n', (407, 410), False, 'from pymanopt.function import TensorFlow\n'), ((764, 780), 'pymanopt.function.TensorFlow', 'TensorFlow', (['x', 'y'], {}), '(x, y)\n', (774, 780), False, 'from pymanopt.function import TensorFlow\n'), ((1225, 1244), 'p...
""" ios.py Handle arguments, configuration file @author: K.Edeline """ import sys import argparse import configparser import logging import logging.config import os class IOManager(): """ extend me """ def __init__(self, child=None, parse_args=True): self.child = child self.parse_args...
[ "os.path.abspath", "argparse.ArgumentParser", "logging.Formatter", "sys.exit", "configparser.ConfigParser", "logging.getLogger" ]
[((1175, 1238), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Diagnostic Agent web app"""'}), "(description='Diagnostic Agent web app')\n", (1198, 1238), False, 'import argparse\n'), ((2126, 2193), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Diagnostic...
import unittest import os import names import uuid import requests import json class TestDeleteUser(unittest.TestCase): BASE_URL = 'http://localhost:5000' def setUp(self): self.API_URL = self.BASE_URL + '/user' def tearDown(self): pass def test_delete_user_sunny_day(self): # ...
[ "unittest.main", "uuid.uuid4", "requests.delete", "requests.post", "names.get_full_name" ]
[((1459, 1474), 'unittest.main', 'unittest.main', ([], {}), '()\n', (1472, 1474), False, 'import unittest\n'), ((352, 373), 'names.get_full_name', 'names.get_full_name', ([], {}), '()\n', (371, 373), False, 'import names\n'), ((455, 496), 'requests.post', 'requests.post', (['self.API_URL'], {'json': 'payload'}), '(self...
import torch class Stitcher: def __init__(self, stitching_config, sr=16000): self.eval_win = stitching_config["eval_win"] self.eval_hop = stitching_config["eval_hop"] self.fft_hop = stitching_config["hop_size"] self.sr = sr self.stitch_margin = int( (self.eval_w...
[ "torch.stack", "torch.zeros", "torch.amax", "torch.abs", "torch.tensor" ]
[((3009, 3032), 'torch.zeros', 'torch.zeros', (['(F, all_L)'], {}), '((F, all_L))\n', (3020, 3032), False, 'import torch\n'), ((3049, 3072), 'torch.zeros', 'torch.zeros', (['(F, all_L)'], {}), '((F, all_L))\n', (3060, 3072), False, 'import torch\n'), ((3093, 3116), 'torch.zeros', 'torch.zeros', (['(F, all_L)'], {}), '(...
# This file contains content licensed by https://github.com/chaiyujin/glow-pytorch/blob/master/LICENSE import torch import torch.nn as nn from models.modules import thops from models.modules.layers import Conv2d, Conv2dZeros class AffineCoupling(nn.Module): def __init__(self, in_channels, out_channels, hidden_c...
[ "torch.nn.ReLU", "models.modules.thops.cat_feature", "models.modules.thops.split_feature", "torch.sigmoid", "models.modules.layers.Conv2d", "models.modules.layers.Conv2dZeros", "torch.log" ]
[((818, 851), 'models.modules.thops.split_feature', 'thops.split_feature', (['inp', '"""split"""'], {}), "(inp, 'split')\n", (837, 851), False, 'from models.modules import thops\n'), ((898, 929), 'models.modules.thops.split_feature', 'thops.split_feature', (['h', '"""cross"""'], {}), "(h, 'cross')\n", (917, 929), False...
''' merge_sort는 길이 n이 1이 될 때까지 2로 나누어주는 BST와 마찬가지로 divide하여 merge하므로 BST와 같은원리로 (logn)만큼 divide 해주고 merge하면서 값을 비교하여 정렬 하므로 최대 n번 정도의 복잡도로 동작하므로 안좋아도 nlogn의 성능을 갖게 됩니다. quick_sort pivot값 잘 골랐을 때와 같은 성능을 나타내고 임시로 저장할 공간을 못쓸 때는 quick_sort를 사용합니다. time complexity : O(nlogn) 백준에서 compile했을 때 에러남 ''' import sys from sys...
[ "sys.setrecursionlimit" ]
[((334, 361), 'sys.setrecursionlimit', 'sys.setrecursionlimit', (['(1500)'], {}), '(1500)\n', (355, 361), False, 'import sys\n')]
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Data pipeline utilities.""" # pylint: disable=invalid-name,dangerous-default-value # pylint: disable=too-many-arguments from typing import Dict, List, Tuple import pandas as pd import pandera as pa import prefect from prefect import task import src.aggregate_data ...
[ "src.trips.load_trips_data", "pandera.check_output", "src.aggregate_data.combine_neigh_stats", "src.city_pub_data.get_poi_data", "src.city_pub_data.get_public_transit_locations", "src.city_pub_data.get_coll_univ_locations", "src.city_neighbourhoods.get_neighbourhood_profile_data", "src.city_pub_data.g...
[((4022, 4034), 'prefect.task', 'task', ([], {'nout': '(6)'}), '(nout=6)\n', (4026, 4034), False, 'from prefect import task\n'), ((836, 865), 'prefect.context.get', 'prefect.context.get', (['"""logger"""'], {}), "('logger')\n", (855, 865), False, 'import prefect\n'), ((875, 932), 'src.stations_metadata.get_stations_met...
# For using stack in python # https://www.geeksforgeeks.org/stack-in-python/ # https://www.youtube.com/watch?v=zwb3GmNAtFk&ab_channel=codebasics << NOTE good resource from Abstract_Data_Type.StackADT import StackADT def insert_into_sorted_stack(stack, element) -> None: # Edge case if stack is None: ...
[ "Abstract_Data_Type.StackADT.StackADT" ]
[((987, 1009), 'Abstract_Data_Type.StackADT.StackADT', 'StackADT', (['[5, 1, 0, 2]'], {}), '([5, 1, 0, 2])\n', (995, 1009), False, 'from Abstract_Data_Type.StackADT import StackADT\n')]
import KratosMultiphysics import KratosMultiphysics.GeoMechanicsApplication as KratosGeo def Factory(settings, Model): if(type(settings) != KratosMultiphysics.Parameters): raise Exception("expected input shall be a Parameters object, encapsulating a json string") return GapClosureInterfaceActivationPro...
[ "KratosMultiphysics.Parameters", "KratosMultiphysics.Process.__init__", "KratosMultiphysics.GeoMechanicsApplication.GapClosureInterfaceProcess" ]
[((548, 589), 'KratosMultiphysics.Process.__init__', 'KratosMultiphysics.Process.__init__', (['self'], {}), '(self)\n', (583, 589), False, 'import KratosMultiphysics\n'), ((677, 712), 'KratosMultiphysics.Parameters', 'KratosMultiphysics.Parameters', (['"""{}"""'], {}), "('{}')\n", (706, 712), False, 'import KratosMulti...
import numpy as np import robodk import time import queue from scipy.spatial.transform import Rotation, Slerp from PIL import Image from robolink import * from matplotlib import pyplot as plt import multiprocessing from constants import BELT_VELOCITY BOX_RANDOM_ANGLE = np.pi / 8.0 BOX_X_RANDOM = 50.0 GRAVITY = -9.81 ...
[ "numpy.random.uniform", "multiprocessing.Lock", "numpy.ones", "time.sleep", "numpy.array", "multiprocessing.Queue", "multiprocessing.Process" ]
[((504, 540), 'numpy.array', 'np.array', (['[0.0, -BELT_VELOCITY, 0.0]'], {}), '([0.0, -BELT_VELOCITY, 0.0])\n', (512, 540), True, 'import numpy as np\n'), ((3787, 3810), 'multiprocessing.Queue', 'multiprocessing.Queue', ([], {}), '()\n', (3808, 3810), False, 'import multiprocessing\n'), ((3837, 3859), 'multiprocessing...
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Vesting tokens.""" from test_framework.test_framework import BitcoinTestFramework from test_frame...
[ "os.path.join" ]
[((960, 1021), 'os.path.join', 'os.path.join', (["(self.options.tmpdir + '/node0')", '"""litecoin.conf"""'], {}), "(self.options.tmpdir + '/node0', 'litecoin.conf')\n", (972, 1021), False, 'import os\n')]
# # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file accompanyi...
[ "subprocess.Popen", "uuid.uuid4", "multiprocessing.pool.ThreadPool", "argparse.ArgumentParser", "os.popen", "os.environ.get", "sys.stdout.isatty", "multiprocessing.cpu_count" ]
[((6792, 6865), 'subprocess.Popen', 'subprocess.Popen', (['s2nd_cmd'], {'stdin': 'subprocess.PIPE', 'stdout': 'subprocess.PIPE'}), '(s2nd_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)\n', (6808, 6865), False, 'import subprocess\n'), ((7341, 7449), 'subprocess.Popen', 'subprocess.Popen', (['s_client_cmd'], {'stdin...
import codecs import json import markdownify strSourcePath = 'd:\\工作\\b2t\\' strMDPath = 'd:\\工作\\b2t\\markdown\\' def readjson(strFileName): try: jsonfin = codecs.open('d:\\工作\\b2t\\thoughts.json', 'r', 'utf-8') objthoughts = json.load(jsonfin) except Exception as e: pri...
[ "json.load", "codecs.open", "markdownify.markdownify", "json.loads" ]
[((1903, 1963), 'markdownify.markdownify', 'markdownify.markdownify', (['strContentHTML'], {'heading_style': '"""ATX"""'}), "(strContentHTML, heading_style='ATX')\n", (1926, 1963), False, 'import markdownify\n'), ((1977, 2035), 'codecs.open', 'codecs.open', (["(strMDPath + strFileName + '.md')", '"""a"""', '"""utf-8"""...
import pytest from calculator.calculator import Calculator def test_add(): calculator = Calculator() result = calculator.add(15) assert result == 15 def test_subtract(): calculator = Calculator(20) result = calculator.subtract(15) assert result == 5 def test_multiply(): ...
[ "calculator.calculator.Calculator" ]
[((99, 111), 'calculator.calculator.Calculator', 'Calculator', ([], {}), '()\n', (109, 111), False, 'from calculator.calculator import Calculator\n'), ((214, 228), 'calculator.calculator.Calculator', 'Calculator', (['(20)'], {}), '(20)\n', (224, 228), False, 'from calculator.calculator import Calculator\n'), ((335, 348...
#!/usr/bin/env python3 # Copyright (C) 2015 <NAME> <<EMAIL>> # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Generates the simdpp/dispatch/collect_macros_generated.h file # Use as $ ./tools/gen_d...
[ "gen_common.output_template" ]
[((5743, 5786), 'gen_common.output_template', 'output_template', (['single_arch_template', 'vars'], {}), '(single_arch_template, vars)\n', (5758, 5786), False, 'from gen_common import output_template\n'), ((5948, 5997), 'gen_common.output_template', 'output_template', (['single_fn_declare_template', 'vars'], {}), '(sin...
import datetime from django.template import Library from django.utils.html import format_html, format_html_join register = Library() @register.simple_tag def stars(score): if score is None: return '' if isinstance(score, float): score = int(score) html_tags = format_html_join( ...
[ "django.template.Library", "datetime.timedelta", "datetime.datetime.now" ]
[((125, 134), 'django.template.Library', 'Library', ([], {}), '()\n', (132, 134), False, 'from django.template import Library\n'), ((605, 634), 'datetime.timedelta', 'datetime.timedelta', ([], {'days': 'days'}), '(days=days)\n', (623, 634), False, 'import datetime\n'), ((672, 699), 'datetime.timedelta', 'datetime.timed...
import markdown import Famcy import json class displayTag(Famcy.FamcyBlock): """ Represents the block to display paragraph. """ def __init__(self): self.value = displayTag.generate_template_content() super(displayTag, self).__init__() self.init_block() @classmethod ...
[ "Famcy.h3", "Famcy.h4", "Famcy.div" ]
[((511, 522), 'Famcy.div', 'Famcy.div', ([], {}), '()\n', (520, 522), False, 'import Famcy\n'), ((622, 632), 'Famcy.h3', 'Famcy.h3', ([], {}), '()\n', (630, 632), False, 'import Famcy\n'), ((651, 661), 'Famcy.h4', 'Famcy.h4', ([], {}), '()\n', (659, 661), False, 'import Famcy\n')]
import pandas as pd from pybaseball.statcast_batter import statcast_batter, statcast_batter_exitvelo_barrels def test_statcast_batter_exitvelo_barrels() -> None: result: pd.DataFrame = statcast_batter_exitvelo_barrels(2019) assert result is not None assert not result.empty assert len(result.columns...
[ "pybaseball.statcast_batter.statcast_batter_exitvelo_barrels", "pybaseball.statcast_batter.statcast_batter" ]
[((192, 230), 'pybaseball.statcast_batter.statcast_batter_exitvelo_barrels', 'statcast_batter_exitvelo_barrels', (['(2019)'], {}), '(2019)\n', (224, 230), False, 'from pybaseball.statcast_batter import statcast_batter, statcast_batter_exitvelo_barrels\n'), ((422, 473), 'pybaseball.statcast_batter.statcast_batter', 'sta...
# =============================================================================== # Copyright 2015 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
[ "traitsui.api.HGroup", "traitsui.api.EnumEditor", "traitsui.api.VGroup", "traitsui.api.UItem", "pychron.envisage.icon_button_editor.icon_button_editor" ]
[((2827, 2859), 'traitsui.api.UItem', 'UItem', (['"""subview"""'], {'style': '"""custom"""'}), "('subview', style='custom')\n", (2832, 2859), False, 'from traitsui.api import UItem, Item, HGroup, VGroup, EnumEditor\n'), ((2888, 2906), 'traitsui.api.HGroup', 'HGroup', (['sgrp', 'ogrp'], {}), '(sgrp, ogrp)\n', (2894, 290...
import os.path import muninn.util as util class StorageBackend(object): def __init__(self): self.supports_symlinks = False self.global_prefix = '' def get_tmp_root(self, product): if self._tmp_root: tmp_root = os.path.join(self._tmp_root, product.core.archive_path) ...
[ "muninn.util.TemporaryDirectory", "muninn.util.make_path" ]
[((326, 350), 'muninn.util.make_path', 'util.make_path', (['tmp_root'], {}), '(tmp_root)\n', (340, 350), True, 'import muninn.util as util\n'), ((558, 666), 'muninn.util.TemporaryDirectory', 'util.TemporaryDirectory', ([], {'dir': 'tmp_root', 'prefix': '""".run_for_product-"""', 'suffix': "('-%s' % product.core.uuid.he...
# Lint as: python3 # Copyright 2021 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 r...
[ "os.path.join" ]
[((1571, 1601), 'os.path.join', 'os.path.join', (['root', 'image_path'], {}), '(root, image_path)\n', (1583, 1601), False, 'import os\n')]
#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import import threading from soma import aims import os import sys from optparse import OptionParser import threading import tempfile import shutil import soma.subprocess import time import six from six.moves import zip def ...
[ "soma.qt_gui.qt_backend.QtGui.QApplication", "os.mkdir", "soma.aims.typeCode", "soma.aims.Finder", "optparse.OptionParser", "shutil.rmtree", "threading.RLock", "os.path.exists", "soma.aims.carto.PluginLoader.load", "soma.aims.Finder.extensions", "time.time", "soma.aims.write", "soma.aims.rea...
[((954, 984), 'soma.aims.carto.PluginLoader.load', 'aims.carto.PluginLoader.load', ([], {}), '()\n', (982, 984), False, 'from soma import aims\n'), ((1045, 1062), 'threading.RLock', 'threading.RLock', ([], {}), '()\n', (1060, 1062), False, 'import threading\n'), ((1222, 1233), 'time.time', 'time.time', ([], {}), '()\n'...
from vistautils.iter_utils import only from adam.language import TokenSequenceLinguisticDescription from adam.learner import LearningExample, MemorizingLanguageLearner from adam.perception import ( BagOfFeaturesPerceptualRepresentationFrame, PerceptualRepresentation, ) def test_pipeline(): curriculum = [...
[ "vistautils.iter_utils.only", "adam.language.TokenSequenceLinguisticDescription", "adam.perception.BagOfFeaturesPerceptualRepresentationFrame", "adam.learner.MemorizingLanguageLearner" ]
[((730, 757), 'adam.learner.MemorizingLanguageLearner', 'MemorizingLanguageLearner', ([], {}), '()\n', (755, 757), False, 'from adam.learner import LearningExample, MemorizingLanguageLearner\n'), ((1434, 1462), 'vistautils.iter_utils.only', 'only', (['red_truck_descriptions'], {}), '(red_truck_descriptions)\n', (1438, ...
# python import lx, lxifc, lxu.command, modo, tagger, random CMD_NAME = tagger.CMD_PTAG_SELECTION_FCL global_tags = None global_poly_count = 0 def list_commands(): timer = tagger.DebugTimer() global global_tags global global_poly_count fcl = [] global_tags = [ set(), set(), ...
[ "tagger.DebugTimer", "tagger.selection.get_mode", "lx.bless", "lx.object.StringTag" ]
[((2404, 2436), 'lx.bless', 'lx.bless', (['CommandClass', 'CMD_NAME'], {}), '(CommandClass, CMD_NAME)\n', (2412, 2436), False, 'import lx, lxifc, lxu.command, modo, tagger, random\n'), ((180, 199), 'tagger.DebugTimer', 'tagger.DebugTimer', ([], {}), '()\n', (197, 199), False, 'import lx, lxifc, lxu.command, modo, tagge...
# noinspection PyPep8Naming from controls.composite import CompositeControl class SizeControl(CompositeControl): @classmethod def get_fields(cls): from functions import ParameterTemplate fields = [ ParameterTemplate("Width", "int", default=3), ParameterTemplate("Height"...
[ "functions.ParameterTemplate" ]
[((236, 280), 'functions.ParameterTemplate', 'ParameterTemplate', (['"""Width"""', '"""int"""'], {'default': '(3)'}), "('Width', 'int', default=3)\n", (253, 280), False, 'from functions import ParameterTemplate\n'), ((294, 339), 'functions.ParameterTemplate', 'ParameterTemplate', (['"""Height"""', '"""int"""'], {'defau...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Author: <NAME> @Contact: <EMAIL> @File: model.py @Time: 2018/10/13 6:35 PM Modified by @Author: <NAME> @Contact: <EMAIL> @Time: 2020/3/9 9:32 PM """ import os import sys import copy import math import numpy as np import torch import torch.nn as nn import torch.nn.in...
[ "torch.nn.Conv1d", "torch.nn.BatchNorm1d", "torch.cat", "torch.nn.Conv2d", "torch.nn.BatchNorm2d", "torch.arange", "torch.nn.LeakyReLU", "torch.sum" ]
[((438, 476), 'torch.sum', 'torch.sum', (['(x ** 2)'], {'dim': '(1)', 'keepdim': '(True)'}), '(x ** 2, dim=1, keepdim=True)\n', (447, 476), False, 'import torch\n'), ((1869, 1887), 'torch.nn.BatchNorm2d', 'nn.BatchNorm2d', (['(64)'], {}), '(64)\n', (1883, 1887), True, 'import torch.nn as nn\n'), ((1907, 1925), 'torch.n...
import os fileDirectoryRoot = 'root' localfilelist=[] def generateList(): del localfilelist[:] for root, dirs, files in os.walk(fileDirectoryRoot): #localfilelist.append(os.path.relpath(root,fileDirectoryRoot)) prefx = os.path.relpath(root,fileDirectoryRoot) if (prefx != '.'): prefx = '/'+prefx else: p...
[ "os.walk", "os.path.relpath" ]
[((123, 149), 'os.walk', 'os.walk', (['fileDirectoryRoot'], {}), '(fileDirectoryRoot)\n', (130, 149), False, 'import os\n'), ((226, 266), 'os.path.relpath', 'os.path.relpath', (['root', 'fileDirectoryRoot'], {}), '(root, fileDirectoryRoot)\n', (241, 266), False, 'import os\n')]
import idautils import idaapi import idc def instructions(start_ea, end_ea): """ Returns the list of instruction addresses in the given address range (including). """ return list(idautils.Heads(start_ea, end_ea)) def basic_blocks(func_addr): """ Generator that yields tuples of start and end ...
[ "idautils.Heads", "idaapi.FlowChart", "idc.GetMnem", "idaapi.get_func" ]
[((389, 415), 'idaapi.get_func', 'idaapi.get_func', (['func_addr'], {}), '(func_addr)\n', (404, 415), False, 'import idaapi\n'), ((427, 446), 'idaapi.FlowChart', 'idaapi.FlowChart', (['f'], {}), '(f)\n', (443, 446), False, 'import idaapi\n'), ((197, 229), 'idautils.Heads', 'idautils.Heads', (['start_ea', 'end_ea'], {})...
# coding=utf-8 # Copyright 2021 RigL 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 applicable law or agree...
[ "absl.testing.absltest.main", "rigl.experimental.jax.prune.main", "absl.testing.flagsaver.flagsaver", "os.path.exists", "glob.glob", "os.path.join" ]
[((2509, 2524), 'absl.testing.absltest.main', 'absltest.main', ([], {}), '()\n', (2522, 2524), False, 'from absl.testing import absltest\n'), ((1118, 1151), 'absl.testing.flagsaver.flagsaver', 'flagsaver.flagsaver', ([], {}), '(**eval_flags)\n', (1137, 1151), False, 'from absl.testing import flagsaver\n'), ((1159, 1173...
import pytest from streamsets.testframework.decorators import stub @stub def test_buffer_size_in_bytes(sdc_builder, sdc_executor): pass @stub @pytest.mark.parametrize('stage_attributes', [{'job_type': 'AVRO_PARQUET'}]) def test_compression_codec(sdc_builder, sdc_executor, stage_attributes): pass @stub de...
[ "pytest.mark.parametrize" ]
[((152, 227), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""stage_attributes"""', "[{'job_type': 'AVRO_PARQUET'}]"], {}), "('stage_attributes', [{'job_type': 'AVRO_PARQUET'}])\n", (175, 227), False, 'import pytest\n'), ((388, 463), 'pytest.mark.parametrize', 'pytest.mark.parametrize', (['"""stage_attribut...
from django.views.decorators.csrf import csrf_exempt import string import random import json import os import datetime import time from random import randint from django.http import HttpResponseBadRequest from .base_simulator import handle_request from scripts.dblog import append_log, db_log first_db_record = 0 def...
[ "random.randint", "json.loads", "django.http.HttpResponseBadRequest", "random.choice", "json.dumps", "time.time", "datetime.datetime.now", "time.sleep", "scripts.dblog.append_log", "random.seed", "os.path.join", "scripts.dblog.db_log" ]
[((1597, 1610), 'random.randint', 'randint', (['(2)', '(6)'], {}), '(2, 6)\n', (1604, 1610), False, 'from random import randint\n'), ((3411, 3517), 'random.seed', 'random.seed', (['(((t & 4278190080) >> 24) + ((t & 16711680) >> 8) + ((t & 65280) << 8) + ((\n t & 255) << 24))'], {}), '(((t & 4278190080) >> 24) + ((t ...
"""Generator for modifications and modifications lists. The objects in this module are generator used to generate the `Mod` and the `ModList` based on precise parametrization. The `ModOption`-derived classes are used to generates 1 option (e.g. an integer, a string, ...) based on a type of option (e.g. a sequence, a ...
[ "inflection.underscore", "fragscapy.modlist.ModList", "importlib.import_module", "os.path.dirname", "os.path.join", "inflection.camelize" ]
[((27649, 27674), 'os.path.dirname', 'os.path.dirname', (['__file__'], {}), '(__file__)\n', (27664, 27674), False, 'import os\n'), ((28760, 28789), 'inflection.camelize', 'inflection.camelize', (['mod_name'], {}), '(mod_name)\n', (28779, 28789), False, 'import inflection\n'), ((28801, 28834), 'importlib.import_module',...
#Copyright (C) 2021 <NAME>, <NAME>, University of California, Berkeley #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 applic...
[ "functools.partial", "tensorflow.sparse_tensor_to_dense", "tensorflow.reshape", "tensorflow.data.Dataset.from_tensor_slices", "tensorflow.stack", "tensorflow.parse_single_example", "tensorflow.cast", "tensorflow.contrib.data.parallel_interleave", "tensorflow.shape", "tensorflow.data.Dataset.zip", ...
[((1026, 1074), 'tensorflow.parse_single_example', 'tf.parse_single_example', (['example_proto', 'features'], {}), '(example_proto, features)\n', (1049, 1074), True, 'import tensorflow as tf\n'), ((1084, 1131), 'tensorflow.sparse_tensor_to_dense', 'tf.sparse_tensor_to_dense', (["parsed_features['X']"], {}), "(parsed_fe...
''' Date: 2021-08-04 22:49:53 LastEditors: <NAME>,<EMAIL> LastEditTime: 2021-09-18 12:46:46 FilePath: \Python\listcom.py ''' import serial #导入模块 import serial.tools.list_ports port_list = list(serial.tools.list_ports.comports()) print(port_list) if len(port_list) == 0: print('无可用串口') else: ...
[ "serial.tools.list_ports.comports" ]
[((208, 242), 'serial.tools.list_ports.comports', 'serial.tools.list_ports.comports', ([], {}), '()\n', (240, 242), False, 'import serial\n')]
"""Implementation of TA 836 Record""" from datetime import datetime, timedelta from itertools import combinations from typing import Tuple from schwifty import BIC, IBAN from swissdta.constants import ChargesRule, IdentificationBankAddress, IdentificationPurpose, FillSide, PaymentType from swissdta.fields import Alph...
[ "swissdta.fields.Numeric", "swissdta.fields.Iban", "swissdta.util.is_swiss_iban", "schwifty.BIC", "swissdta.util.remove_whitespace", "swissdta.fields.Currency", "datetime.datetime.now", "swissdta.fields.Amount", "schwifty.IBAN", "datetime.datetime.strptime", "datetime.timedelta", "itertools.co...
[((4669, 4730), 'swissdta.fields.AlphaNumeric', 'AlphaNumeric', ([], {'length': '(11)', 'fillchar': '"""0"""', 'fillside': 'FillSide.LEFT'}), "(length=11, fillchar='0', fillside=FillSide.LEFT)\n", (4681, 4730), False, 'from swissdta.fields import AlphaNumeric, Amount, Currency, Date, Iban, Numeric\n'), ((4752, 4767), '...
import matplotlib.pyplot as plt import seaborn as sea sea.set(style = 'whitegrid') iris = sea.load_dataset('iris') ax = sea.stripplot(x = 'species', y = 'sepal_length', data = iris) plt.title('Graph') plt.show()
[ "matplotlib.pyplot.title", "matplotlib.pyplot.show", "seaborn.load_dataset", "seaborn.stripplot", "seaborn.set" ]
[((55, 81), 'seaborn.set', 'sea.set', ([], {'style': '"""whitegrid"""'}), "(style='whitegrid')\n", (62, 81), True, 'import seaborn as sea\n'), ((91, 115), 'seaborn.load_dataset', 'sea.load_dataset', (['"""iris"""'], {}), "('iris')\n", (107, 115), True, 'import seaborn as sea\n'), ((121, 176), 'seaborn.stripplot', 'sea....
from django.urls import path from User import admin, views urlpatterns = [ path('wxlogin', views.wxLogin), path('githublogin', views.githubLogin), path('repo_search', views.repo_search), path('repo_request', views.repo_request), path('reply_request', views.reply_request), path('request_info', v...
[ "django.urls.path" ]
[((80, 110), 'django.urls.path', 'path', (['"""wxlogin"""', 'views.wxLogin'], {}), "('wxlogin', views.wxLogin)\n", (84, 110), False, 'from django.urls import path\n'), ((116, 154), 'django.urls.path', 'path', (['"""githublogin"""', 'views.githubLogin'], {}), "('githublogin', views.githubLogin)\n", (120, 154), False, 'f...
import torch import torch.nn as nn from ltr.models.layers.blocks import conv_block class ConvGRUCell(nn.Module): def __init__(self, input_dim, hidden_dim, kernel_size, padding_mode='zeros'): " Referenced from https://github.com/happyjin/ConvGRU-pytorch" super(ConvGRUCell, self).__init__() ...
[ "torch.nn.Conv2d", "torch.cat" ]
[((1848, 1884), 'torch.cat', 'torch.cat', (['[input, state_cur]'], {'dim': '(1)'}), '([input, state_cur], dim=1)\n', (1857, 1884), False, 'import torch\n'), ((2059, 2108), 'torch.cat', 'torch.cat', (['[input, reset_gate * state_cur]'], {'dim': '(1)'}), '([input, reset_gate * state_cur], dim=1)\n', (2068, 2108), False, ...
from flask import Blueprint home_blueprint = Blueprint('home_blueprint', __name__) from . import views
[ "flask.Blueprint" ]
[((46, 83), 'flask.Blueprint', 'Blueprint', (['"""home_blueprint"""', '__name__'], {}), "('home_blueprint', __name__)\n", (55, 83), False, 'from flask import Blueprint\n')]
# # 为 GUI 封装的函数 不可直接运行 # Author: Xiaohei # Updatetime: 2021-12-01 # import cv2 import os import numpy import pickle from enhance import image_enhance def get_descriptors(img): clahe = cv2.createCLAHE(clipLimit=2.0, tileGridSize=(8, 8)) img = clahe.apply(img) img = image_enhance.image_enhance(img) img...
[ "os.listdir", "pickle.dump", "enhance.image_enhance.image_enhance", "cv2.threshold", "cv2.BFMatcher", "cv2.normalize", "cv2.imread", "pickle.load", "numpy.array", "cv2.ORB_create", "cv2.KeyPoint", "cv2.createCLAHE", "os.path.join", "cv2.cornerHarris", "cv2.resize" ]
[((191, 242), 'cv2.createCLAHE', 'cv2.createCLAHE', ([], {'clipLimit': '(2.0)', 'tileGridSize': '(8, 8)'}), '(clipLimit=2.0, tileGridSize=(8, 8))\n', (206, 242), False, 'import cv2\n'), ((280, 312), 'enhance.image_enhance.image_enhance', 'image_enhance.image_enhance', (['img'], {}), '(img)\n', (307, 312), False, 'from ...
from django.db import models from json_field import JSONField class Service(models.Model): name = models.CharField(max_length=64) secret = models.CharField(max_length=128) service_id = models.CharField(max_length=128) ips = JSONField(default=[]) validate_ip = models.BooleanField(default=True) ...
[ "django.db.models.OneToOneField", "django.db.models.CharField", "django.db.models.ForeignKey", "django.db.models.FloatField", "django.db.models.BooleanField", "json_field.JSONField" ]
[((104, 135), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(64)'}), '(max_length=64)\n', (120, 135), False, 'from django.db import models\n'), ((149, 181), 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(128)'}), '(max_length=128)\n', (165, 181), False, 'from django.db ...
from decimal import Decimal from flask import render_template, url_for, abort from flask_classy import FlaskView, route from flask_login import login_required from sqlalchemy import and_ from werkzeug.utils import redirect from OrderSystem import db, sentry from OrderSystem import forms from OrderSystem.routing.CRUDBa...
[ "OrderSystem.utilities.ServerLogger.log_event", "OrderSystem.sql.ORM.Budget", "decimal.Decimal", "sqlalchemy.and_", "OrderSystem.db.session.query", "flask.abort", "OrderSystem.db.session.commit", "flask_classy.route", "OrderSystem.utilities.Helpers.flash_errors", "OrderSystem.sentry.captureExcepti...
[((1056, 1083), 'flask_classy.route', 'route', (['"""/<int:fiscal_year>"""'], {}), "('/<int:fiscal_year>')\n", (1061, 1083), False, 'from flask_classy import FlaskView, route\n'), ((3650, 3723), 'flask_classy.route', 'route', (['"""/<int:fiscal_year>/<int:subteam_id>/set"""'], {'methods': "['GET', 'POST']"}), "('/<int:...
""" Test colorings for edgeless graphs. Copyright 2020. <NAME>. """ from pytest import mark from common import create_edgeless, parameters, len_iter, check_surjective @mark.parametrize('vertices,colors', parameters(7, 8)) def test_edgeless(vertices: int, colors: int): """Test edgeless graph colorings.""" gra...
[ "common.create_edgeless", "common.parameters", "common.check_surjective", "common.len_iter" ]
[((325, 350), 'common.create_edgeless', 'create_edgeless', (['vertices'], {}), '(vertices)\n', (340, 350), False, 'from common import create_edgeless, parameters, len_iter, check_surjective\n'), ((411, 430), 'common.len_iter', 'len_iter', (['colorings'], {}), '(colorings)\n', (419, 430), False, 'from common import crea...
import os ls=["python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_0_GridDistortion.yml", "python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_1_GridDistortion.yml", "python main.py --configs configs/eval_ricord1a_unetplusplus_timm-regnetx_002_2_GridDistortion.yml", "p...
[ "os.system" ]
[((538, 550), 'os.system', 'os.system', (['l'], {}), '(l)\n', (547, 550), False, 'import os\n')]
""" Django settings for pirauber_project project. Generated by 'django-admin startproject' using Django 2.2.4. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ imp...
[ "os.path.abspath", "os.path.join", "environ.Env.read_env", "environ.Env" ]
[((535, 548), 'environ.Env', 'environ.Env', ([], {}), '()\n', (546, 548), False, 'import environ\n'), ((549, 571), 'environ.Env.read_env', 'environ.Env.read_env', ([], {}), '()\n', (569, 571), False, 'import environ\n'), ((3677, 3714), 'os.path.join', 'os.path.join', (['BASE_DIR', '"""staticfiles"""'], {}), "(BASE_DIR,...
""" Registering all the views in flask. Includes both html and json end points. """ import flask from geo.db import connection import geo.views.form as form import geo.views.resources as resources import geo.views.new_resources as new_resources import geo.views.moderation as moderation import geo.views.moderation_subm...
[ "flask.Flask", "geo.db.connection.Db" ]
[((989, 1010), 'flask.Flask', 'flask.Flask', (['__name__'], {}), '(__name__)\n', (1000, 1010), False, 'import flask\n'), ((1404, 1419), 'geo.db.connection.Db', 'connection.Db', ([], {}), '()\n', (1417, 1419), False, 'from geo.db import connection\n')]
__author__ = 'aymgal' # implementations of proximal operators adapted to sparsity import numpy as np from slitronomy.Util import util def prox_sparsity_wavelets(coeffs_input, step, level_const=None, level_pixels=None, l_norm=1): """ Apply soft or hard threshold on all wavelets scales excepts the last one (t...
[ "slitronomy.Util.util.soft_threshold", "slitronomy.Util.util.hard_threshold", "numpy.ones", "numpy.copy" ]
[((526, 547), 'numpy.copy', 'np.copy', (['coeffs_input'], {}), '(coeffs_input)\n', (533, 547), True, 'import numpy as np\n'), ((1118, 1138), 'numpy.copy', 'np.copy', (['image_input'], {}), '(image_input)\n', (1125, 1138), True, 'import numpy as np\n'), ((1599, 1616), 'numpy.ones', 'np.ones', (['n_scales'], {}), '(n_sca...
import unittest import jsonmask fixture = { "kind": "plus#activity", "etag": "\"DOKFJGXi7L9ogpHc3dzouWOBEEg/ZiaatWNPRL3cQ-I-WbeQPR_yVa0\"", "title": "Congratulations! You have successfully fetched an explicit public activity. The attached video is your...", "published": "2011-09-08T21:17:41.232Z", ...
[ "unittest.main", "jsonmask.compile_mask", "jsonmask.Mask", "jsonmask.apply_mask" ]
[((7481, 7496), 'unittest.main', 'unittest.main', ([], {}), '()\n', (7494, 7496), False, 'import unittest\n'), ((6597, 6663), 'jsonmask.apply_mask', 'jsonmask.apply_mask', (['filter_test_object', 'filter_test_compiled_mask'], {}), '(filter_test_object, filter_test_compiled_mask)\n', (6616, 6663), False, 'import jsonmas...
# python 3 import sys import os from java import jclass from inspect import isfunction from venv import logger class CompileMixin: @staticmethod def _compile(code, funcName): ns = {} try: exec(code, ns) except Exception as e: logger.error("code: `{0}` 编译时出错,exc...
[ "inspect.isfunction", "java.jclass" ]
[((988, 1037), 'java.jclass', 'jclass', (['"""com.mrl.communicate.middle.ResultOfCall"""'], {}), "('com.mrl.communicate.middle.ResultOfCall')\n", (994, 1037), False, 'from java import jclass\n'), ((441, 468), 'inspect.isfunction', 'isfunction', (['may_be_function'], {}), '(may_be_function)\n', (451, 468), False, 'from ...
from abc import ABC from copy import copy from typing import List, Iterable, Optional, Union from cardbuilder.common import Language from cardbuilder.input.word import Word, WordForm class WordList(ABC): """The base class for all word lists; all word lists inherit from this class. Behaves like a Python list by ...
[ "copy.copy", "cardbuilder.input.word.Word" ]
[((856, 900), 'cardbuilder.input.word.Word', 'Word', (['input_form', 'language', 'additional_forms'], {}), '(input_form, language, additional_forms)\n', (860, 900), False, 'from cardbuilder.input.word import Word, WordForm\n'), ((1175, 1185), 'copy.copy', 'copy', (['self'], {}), '(self)\n', (1179, 1185), False, 'from c...
import os import pickle EXTENSION = ".citygraph" def _fix_path(path): # if path is None: set it to current directory # then check that path is an existing directory # (raises a FileNotFoundError if not) if path is None: path = os.getcwd() if not os.path.isdir(path): raise FileNotF...
[ "pickle.dump", "os.getcwd", "os.path.isdir", "os.path.exists", "os.path.isfile", "pickle.load", "os.sep.join" ]
[((1309, 1329), 'os.path.isfile', 'os.path.isfile', (['path'], {}), '(path)\n', (1323, 1329), False, 'import os\n'), ((2197, 2217), 'os.path.exists', 'os.path.exists', (['path'], {}), '(path)\n', (2211, 2217), False, 'import os\n'), ((254, 265), 'os.getcwd', 'os.getcwd', ([], {}), '()\n', (263, 265), False, 'import os\...
import factory import random from faker import Faker from titlecase import titlecase from django.contrib.auth import get_user_model from django.utils.text import slugify from django.utils.timezone import get_current_timezone from .models import Category, Post, RelatedLinkGroup, RelatedLink, Blog, Comment, AuthorPage ...
[ "factory.Faker", "django.utils.timezone.get_current_timezone", "random.randint", "faker.Faker", "django.contrib.auth.get_user_model", "django.utils.text.slugify", "factory.LazyAttribute" ]
[((458, 465), 'faker.Faker', 'Faker', ([], {}), '()\n', (463, 465), False, 'from faker import Faker\n'), ((650, 657), 'faker.Faker', 'Faker', ([], {}), '()\n', (655, 657), False, 'from faker import Faker\n'), ((903, 910), 'faker.Faker', 'Faker', ([], {}), '()\n', (908, 910), False, 'from faker import Faker\n'), ((1564,...
from __future__ import print_function import argparse import httplib import json import re # VERSION 0.1 # FROM https://github.com/jongho/kafka-burrow-telegraf-reporter # This code was written with inspiration from kafka_jolokia_reporter.py (https://github.com/paksu/kafka-jolokia-telegraf-collector) def get_http_r...
[ "httplib.HTTPConnection", "argparse.ArgumentParser" ]
[((1299, 1333), 'httplib.HTTPConnection', 'httplib.HTTPConnection', (['host', 'port'], {}), '(host, port)\n', (1321, 1333), False, 'import httplib\n'), ((4514, 4574), 'argparse.ArgumentParser', 'argparse.ArgumentParser', ([], {'description': '"""Kafka Burrow Reporter"""'}), "(description='Kafka Burrow Reporter')\n", (4...
import os import uuid import paramiko import requests def random_filename(filename): ext = os.path.splitext(filename)[1] new_filename = uuid.uuid4().hex + ext return new_filename def sftp_upload(host, port, username, password, local, remote): sf = paramiko.Transport(host, port) sf.connect(usern...
[ "os.listdir", "uuid.uuid4", "os.path.isdir", "paramiko.Transport", "os.path.splitext", "os.path.join", "paramiko.SFTPClient.from_transport" ]
[((269, 299), 'paramiko.Transport', 'paramiko.Transport', (['host', 'port'], {}), '(host, port)\n', (287, 299), False, 'import paramiko\n'), ((364, 402), 'paramiko.SFTPClient.from_transport', 'paramiko.SFTPClient.from_transport', (['sf'], {}), '(sf)\n', (398, 402), False, 'import paramiko\n'), ((98, 124), 'os.path.spli...
# # キャプチャー画像を推定する # キャプチャー画像を100x100にリサイズする # #--------------------------------------------------------- #import keras import tensorflow as tf from tensorflow.python.keras.models import Model from tensorflow.python.keras.layers import * from tensorflow.python.keras.models import load_model import numpy as np import os...
[ "tensorflow.python.keras.models.load_model", "cv2.waitKey", "numpy.asarray", "cv2.imshow", "PIL.Image.open", "cv2.VideoCapture", "numpy.array", "PIL.Image.fromarray", "cv2.destroyAllWindows", "cv2.resize" ]
[((405, 436), 'tensorflow.python.keras.models.load_model', 'load_model', (['"""./original_img.h5"""'], {}), "('./original_img.h5')\n", (415, 436), False, 'from tensorflow.python.keras.models import load_model\n'), ((520, 547), 'PIL.Image.open', 'Image.open', (['"""./img/g/0.png"""'], {}), "('./img/g/0.png')\n", (530, 5...
import os import logging os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' logging.getLogger('tensorflow').disabled = True import numpy as np import tensorflow as tf import tensorflow_addons as tfa from tqdm import tqdm, tqdm_notebook from augment import CTAugment from tensorflow.python.framework import constant_op from tens...
[ "tensorflow.python.framework.constant_op.constant", "tensorflow.keras.losses.CategoricalCrossentropy", "numpy.arange", "error.test_error", "tensorflow.keras.losses.SparseCategoricalCrossentropy", "tensorflow.nn.softmax", "tensorflow.one_hot", "tensorflow.random.uniform", "tensorflow.python.ops.math_...
[((67, 98), 'logging.getLogger', 'logging.getLogger', (['"""tensorflow"""'], {}), "('tensorflow')\n", (84, 98), False, 'import logging\n'), ((3844, 3959), 'tensorflow_addons.optimizers.SGDW', 'tfa.optimizers.SGDW', (["hparams['weight_decay']", 'schedule'], {'momentum': "hparams['beta']", 'nesterov': "hparams['nesterov'...
import cv2 import numpy def colorDetection(image): #Converts image HSV type image hsvImage = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) testImage = image #Ranges for color detection lowerYellow = numpy.array([20, 100, 100]) upperYellow = numpy.array([30,255, 255]) lowerBlue = numpy.array([85,1...
[ "cv2.contourArea", "numpy.argmax", "cv2.cvtColor", "cv2.waitKey", "cv2.imshow", "cv2.VideoCapture", "numpy.array", "cv2.rectangle", "cv2.boundingRect", "cv2.inRange", "cv2.findContours" ]
[((103, 141), 'cv2.cvtColor', 'cv2.cvtColor', (['image', 'cv2.COLOR_BGR2HSV'], {}), '(image, cv2.COLOR_BGR2HSV)\n', (115, 141), False, 'import cv2\n'), ((214, 241), 'numpy.array', 'numpy.array', (['[20, 100, 100]'], {}), '([20, 100, 100])\n', (225, 241), False, 'import numpy\n'), ((260, 287), 'numpy.array', 'numpy.arra...
#!/usr/bin/env python3 import requests from pprint import pprint as pp # part of the standard library from datetime import date # import webbrowser ## define some constants NASAAPI = 'https://api.nasa.gov/planetary/apod?' with open('nasa_api_key', 'r') as file: MYKEY = "&api_key=" + file.read().replace('\n', '') ...
[ "pprint.pprint", "datetime.date.today", "requests.get" ]
[((408, 420), 'datetime.date.today', 'date.today', ([], {}), '()\n', (418, 420), False, 'from datetime import date\n'), ((720, 753), 'requests.get', 'requests.get', (['(NASAAPI + MYKEY + d)'], {}), '(NASAAPI + MYKEY + d)\n', (732, 753), False, 'import requests\n'), ((1040, 1052), 'pprint.pprint', 'pp', (['nasaread'], {...
from model.contact import Contact from model.group import Group import random def test_delete_contact_in_group(app, orm): if len(orm.get_group_list()) == 0: app.group.create(Group(name="test")) if len(orm.get_contact_list()) == 0: app.contact.add_contact(Contact(firstname="asdfg", middlename="a...
[ "model.contact.Contact", "random.choice", "model.group.Group" ]
[((1074, 1116), 'random.choice', 'random.choice', (['groups_this_contacts_before'], {}), '(groups_this_contacts_before)\n', (1087, 1116), False, 'import random\n'), ((187, 205), 'model.group.Group', 'Group', ([], {'name': '"""test"""'}), "(name='test')\n", (192, 205), False, 'from model.group import Group\n'), ((280, 6...
import torch import torch.nn as nn from torch import Tensor class Displacement(nn.Module): r""" Displacement Layer computes the displacement vector for each point in the source image, with its corresponding point (or points) in target image. The output is a displacement matrix constructed from all di...
[ "torch.matmul", "torch.zeros_like" ]
[((1993, 2016), 'torch.zeros_like', 'torch.zeros_like', (['P_src'], {}), '(P_src)\n', (2009, 2016), False, 'import torch\n'), ((2110, 2132), 'torch.matmul', 'torch.matmul', (['s', 'P_tgt'], {}), '(s, P_tgt)\n', (2122, 2132), False, 'import torch\n')]
# Copyright 2019-2021 Wingify Software Pvt. Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
[ "vwo.services.segmentor.segment_evaluator.SegmentEvaluator", "json.load" ]
[((796, 816), 'json.load', 'json.load', (['json_file'], {}), '(json_file)\n', (805, 816), False, 'import json\n'), ((921, 939), 'vwo.services.segmentor.segment_evaluator.SegmentEvaluator', 'SegmentEvaluator', ([], {}), '()\n', (937, 939), False, 'from vwo.services.segmentor.segment_evaluator import SegmentEvaluator\n')...
# Django imports from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.urls import reverse # Internal imports from .models import Book, Chapter # External imports from django.utils import timezone # * Function to list the five latest books def index(request...
[ "django.shortcuts.render", "django.urls.reverse", "django.http.Http404", "django.utils.timezone.now" ]
[((652, 698), 'django.shortcuts.render', 'render', (['request', '"""catalog/index.html"""', 'context'], {}), "(request, 'catalog/index.html', context)\n", (658, 698), False, 'from django.shortcuts import render\n'), ((1336, 1384), 'django.shortcuts.render', 'render', (['request', '"""catalog/details.html"""', 'context'...
from app import create_app from config import Config app = create_app(Config)
[ "app.create_app" ]
[((61, 79), 'app.create_app', 'create_app', (['Config'], {}), '(Config)\n', (71, 79), False, 'from app import create_app\n')]
# -*- coding: utf-8 -*- __all__ = ["KeplerOp"] import theano import theano.tensor as tt from theano import gof from ..build_utils import get_cache_version, get_compile_args, get_header_dirs class KeplerOp(gof.COp): __props__ = () func_file = "./kepler.cc" func_name = "APPLY_SPECIFIC(kepler)" def _...
[ "theano.tensor.zeros_like", "theano.tensor.as_tensor_variable" ]
[((1187, 1203), 'theano.tensor.zeros_like', 'tt.zeros_like', (['M'], {}), '(M)\n', (1200, 1203), True, 'import theano.tensor as tt\n'), ((1217, 1233), 'theano.tensor.zeros_like', 'tt.zeros_like', (['M'], {}), '(M)\n', (1230, 1233), True, 'import theano.tensor as tt\n'), ((835, 867), 'theano.tensor.as_tensor_variable', ...
import unittest from jmilkfansblog.controllers import admin from jmilkfansblog.controllers import rest_api from jmilkfansblog import create_app from jmilkfansblog.models import db class TestURLs(unittest.TestCase): """Unit test for route functions.""" def setUp(self): # Destroy the Flask-Admin and F...
[ "unittest.main", "jmilkfansblog.models.db.create_all", "jmilkfansblog.create_app", "jmilkfansblog.models.db.session.remove", "jmilkfansblog.models.db.drop_all" ]
[((716, 731), 'unittest.main', 'unittest.main', ([], {}), '()\n', (729, 731), False, 'import unittest\n'), ((445, 490), 'jmilkfansblog.create_app', 'create_app', (['"""jmilkfansblog.config.TestConfig"""'], {}), "('jmilkfansblog.config.TestConfig')\n", (455, 490), False, 'from jmilkfansblog import create_app\n'), ((593,...
"""melive URL Configuration See: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to ...
[ "graphene_django.views.GraphQLView.as_view", "django.views.generic.TemplateView.as_view", "django.urls.path", "django.urls.include" ]
[((1048, 1079), 'django.urls.path', 'path', (['"""admin/"""', 'admin.site.urls'], {}), "('admin/', admin.site.urls)\n", (1052, 1079), False, 'from django.urls import include, path\n'), ((1368, 1471), 'django.urls.path', 'path', (['"""sitemap.xml"""', 'sitemap', "{'sitemaps': sitemaps}"], {'name': '"""django.contrib.sit...
from flask import Blueprint from .constants import GET, COUNTER RESOURCE = 'health' PATH = f'/api/v1/{RESOURCE}' api = Blueprint(RESOURCE, __name__, url_prefix=PATH) @api.route('/', methods=[GET]) def get(): COUNTER.labels(GET, PATH).inc() return {'status': 'ok'}
[ "flask.Blueprint" ]
[((121, 167), 'flask.Blueprint', 'Blueprint', (['RESOURCE', '__name__'], {'url_prefix': 'PATH'}), '(RESOURCE, __name__, url_prefix=PATH)\n', (130, 167), False, 'from flask import Blueprint\n')]
""" client.py """ # Standard library import socket import re import pickle import sys # Third party import pygame # Local source import game_functions as gf import square # Server port, IPv4 will be prompted PORT = 26256 # Server data constraints HEADER_SIZE = 16 FORMAT_TYPE = 'utf-8' def main(): server_ip = i...
[ "pickle.loads", "pygame.quit", "pygame.display.set_mode", "socket.socket", "game_functions.update_screen", "pygame.init", "square.PlayerSquare", "game_functions.check_events", "pygame.display.set_caption", "pygame.time.Clock", "re.search", "sys.exit", "pickle.dumps" ]
[((383, 432), 'socket.socket', 'socket.socket', (['socket.AF_INET', 'socket.SOCK_STREAM'], {}), '(socket.AF_INET, socket.SOCK_STREAM)\n', (396, 432), False, 'import socket\n'), ((708, 721), 'pygame.init', 'pygame.init', ([], {}), '()\n', (719, 721), False, 'import pygame\n'), ((726, 770), 'pygame.display.set_caption', ...