content stringlengths 0 1.55M |
|---|
# Built-in
<import_stmt>copy<import_stmt>logging<import_stmt>time<line_sep># External
<import_from_stmt>Qt.QtWidgets QUndoCommand<line_sep># Internal
<import_from_stmt>nxt_editor colors<import_from_stmt>nxt_editor user_dir<import_from_stmt>nxt nxt_path<import_from_stmt>nxt.nxt_layer LAYERS SAVE_KEY<import_from_stmt>nxt... |
<import_from_stmt>datetime timedelta<import_from_stmt>django.contrib.auth get_user_model<import_from_stmt>drf_spectacular.utils extend_schema<import_from_stmt>rest_framework.response Response<import_from_stmt>rest_framework.permissions IsAdminUser<import_from_stmt>rest_framework.views APIView<import_from_stmt>baserow.a... |
# --------------------------------------------------------
# TFFRCNN - Resnet50
# Copyright (c) 2016
# Licensed under The MIT License [see LICENSE for details]
# Written by miraclebiu
# --------------------------------------------------------
<import_stmt>tensorflow<as>tf<import_from_stmt>.network Network<import_from_s... |
<import_stmt>re<import_stmt>numbers<import_stmt>collections<import_stmt>logging<import_from_stmt>collections.abc Iterable<import_stmt>itertools<import_stmt>aws_error_utils<import_from_stmt>.lookup Ids lookup_accounts_for_ou<import_from_stmt>.format format_account_id<line_sep>LOGGER=logging.getLogger(__name__)<line_sep>... |
<import_from_stmt>pathlib PosixPath<import_stmt>configparser<import_from_stmt>typing Dict Optional Any List<import_from_stmt>inspect cleandoc<import_stmt>shutil<import_stmt>tensorhive<import_stmt>os<import_stmt>logging<line_sep>log=logging.getLogger(__name__)<class_stmt>CONFIG_FILES# Where to copy files
# (TensorHive t... |
<import_stmt>torch<import_stmt>torch.nn<as>nn<import_stmt>torch.optim<as>optim<import_from_stmt>torchtext.datasets Multi30k<import_from_stmt>torchtext.data Field BucketIterator<import_stmt>numpy<as>np<import_stmt>spacy<import_stmt>random<import_from_stmt>torch.utils.tensorboard SummaryWriter# to print to tensorboard
<i... |
#//
#// -------------------------------------------------------------
#// Copyright 2011 Synopsys, Inc.
#// Copyright 2019-2020 <NAME> (tpoikela)
#// All Rights Reserved Worldwide
#//
#// Licensed under the Apache License, Version 2.0 (the
#// "License"); you may not use this file except in
#// comp... |
<import_from_stmt>django.template loader RequestContext<import_from_stmt>django.http Http404 HttpResponse<import_from_stmt>django.core.xheaders populate_xheaders<import_from_stmt>django.core.paginator ObjectPaginator InvalidPage<import_from_stmt>django.core.exceptions ObjectDoesNotExist<def_stmt>object_list request que... |
"""This contains the configuration of the Rolodex application."""<line_sep># Django Imports
<import_from_stmt>django.apps AppConfig<class_stmt>RolodexConfig(AppConfig)<block_start>name="ghostwriter.rolodex"<def_stmt>ready self<block_start><try_stmt><block_start><import_stmt>ghostwriter.rolodex.signals# noqa F401 isort:... |
"""Spinnaker validate functions."""<import_stmt>logging<import_from_stmt>.consts API_URL<import_from_stmt>.utils.credentials get_env_credential<line_sep>LOG=logging.getLogger(__name__)<def_stmt>validate_gate <block_start>"""Check Gate connection."""<try_stmt><block_start>credentials=get_env_credential()<line_sep>LOG.de... |
<import_stmt>typing# noqa
<import_from_stmt>google.protobuf descriptor<import_from_stmt>google.protobuf.json_format _IsMapEntry _Printer<import_from_stmt>google.protobuf.message Message# noqa
<import_from_stmt>clarifai.rest.grpc.proto.clarifai.api.utils extensions_pb2<def_stmt>protobuf_to_dict object_protobuf use_integ... |
# Copyright (c) OpenMMLab. All rights reserved.
<import_stmt>torch<import_from_stmt>mmedit.models.backbones ContextualAttentionNeck DeepFillEncoder<import_from_stmt>mmedit.models.common SimpleGatedConvModule<def_stmt>test_deepfill_enc <block_start>encoder=DeepFillEncoder()<line_sep>x=torch.randn((2 5 256 256))<line_sep... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
<import_stmt>warnings<import_stmt>pulumi<import_stmt>pulumi.runtime<import_from_stmt>typing Any Mapping Optional Sequence Union overload... |
<import_from_stmt>..dojo_test_case DojoTestCase<import_from_stmt>dojo.models Test<import_from_stmt>dojo.tools.intsights.parser IntSightsParser<class_stmt>TestIntSightsParser(DojoTestCase)<block_start><def_stmt>test_intsights_parser_with_one_critical_vuln_has_one_findings_json self<block_start>testfile=open("unittests/s... |
"""
Test the lldb disassemble command on each call frame when stopped on C's ctor.
"""<import_from_future_stmt> print_function<import_stmt>os<import_stmt>time<import_stmt>lldb<import_from_stmt>lldbsuite.test.decorators *<import_from_stmt>lldbsuite.test.lldbtest *<import_from_stmt>lldbsuite.test lldbutil<class_stmt>Iter... |
<import_stmt>unittest<import_from_stmt>unittest TestCase<import_from_stmt>misc verify<class_stmt>TestVerify(TestCase)<block_start>"""Tests misc.py verifies function."""<def_stmt>test_verify__with_zero_threshold_and_expected_succeeds self<block_start>"""Test passes when expected rate, actual rate and threshold are all z... |
#
# Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
# Use of this file is governed by the BSD 3-clause license that
# can be found in the LICENSE.txt file in the project root.
#/
# A DFA walker that knows how to dump them to serialized strings.#/
<import_from_stmt>io StringIO<import_from_stmt>antlr4 DFA... |
# coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
<import_from_stmt>braintree.configuration Configuration<import_from_stmt>braintree.resource Resource<class_stmt>AccountUpdaterDailyReport(Resource)<block_start><def_stmt>__init__ self gateway attributes<block_start>Resource.__init__(self gateway attributes)<if_stmt>"report_url"<in>attributes<block_start>self.report_url... |
""" Other useful structs """<import_from_future_stmt> absolute_import<import_from_stmt>collections namedtuple<line_sep>"""A topic and partition tuple
Keyword Arguments:
topic (str): A topic name
partition (int): A partition id
"""<line_sep>TopicPartition=namedtuple("TopicPartition" ["topic" "partition"])<line_... |
# pylint: disable-msg=C0103
"""
SentinelAnomalyLookup: This package is developed for Azure Sentinel Anomaly lookup
"""<line_sep># __init__.py
<import_from_stmt>.anomaly_lookup_view_helper AnomalyLookupViewHelper<import_from_stmt>.anomaly_finder AnomalyQueries AnomalyFinder<line_sep> |
<import_stmt>html<import_from_stmt>collections namedtuple<import_from_stmt>pathlib Path<import_from_stmt>typing List Dict<import_stmt>requests<import_from_stmt>bs4 BeautifulSoup<import_from_stmt>lxml etree<import_from_stmt>lxml.etree XPath<line_sep>Emoji=namedtuple('Emoji' 'char name')<class_stmt>EmojiExtractor(object)... |
<import_stmt>FWCore.ParameterSet.Config<as>cms<line_sep>patPFParticles=cms.EDProducer("PATPFParticleProducer" # General configurables
pfCandidateSource=cms.InputTag("noJet") # MC matching configurables
addGenMatch=cms.bool(<false>) genParticleMatch=cms.InputTag("") ## particles source to be used for the MC matching
## ... |
# coding: utf8
<import_from_future_stmt> unicode_literals<import_stmt>pytest<import_stmt>spacy<import_stmt>json<import_from_stmt>api.server parse doc2json load_model<line_sep>@pytest.fixture(scope="session")<def_stmt>model <block_start><return>"en_core_web_sm"<block_end>@pytest.fixture(scope="session")<def_stmt>text <b... |
<import_stmt>os<import_stmt>shutil<import_stmt>codecs<import_stmt>json<import_from_stmt>cuddlefish.runner run_app<import_from_stmt>cuddlefish.rdf RDFManifest<def_stmt>run <block_start>original_harness_options=os.path.join('development' 'firefox' 'harness-options.json')<line_sep>backup_harness_options=os.path.join('deve... |
# coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... |
# Copyright (c) OpenMMLab. All rights reserved.
<import_stmt>mmcv<import_stmt>torch.nn<as>nn<import_from_stmt>mmcv.cnn ConvModule<import_from_stmt>mmcv.runner BaseModule<import_from_stmt>.make_divisible make_divisible<class_stmt>SELayer(BaseModule)<block_start>"""Squeeze-and-Excitation Module.
Args:
channe... |
"""
recognize face landmark
"""<import_stmt>json<import_stmt>os<import_stmt>requests<import_stmt>numpy<as>np<line_sep>FACE_POINTS=list(range(0 83))<line_sep>JAW_POINTS=list(range(0 19))<line_sep>LEFT_EYE_POINTS=list(range(19 29))<line_sep>LEFT_BROW_POINTS=list(range(29 37))<line_sep>MOUTH_POINTS=list(range(37 55))<line... |
'''
Uses [[https://github.com/fabianonline/telegram_backup#readme][telegram_backup]] database for messages data
'''<import_from_stmt>pathlib Path<import_from_stmt>textwrap dedent<import_from_stmt>typing Optional Union TypeVar<import_from_stmt>urllib.parse unquote# TODO mm, make it easier to rememember to use...
<import... |
#
# slice paddle model generator
#
<import_stmt>numpy<as>np<import_from_stmt>save_model saveModel<import_stmt>paddle<as>pdpd<import_stmt>sys<line_sep>data_type='float32'<def_stmt>slice name:str x axes:list start:list end:list<block_start>pdpd.enable_static()<with_stmt>pdpd.static.program_guard(pdpd.static.Program() pdp... |
# Copyright (C) 2021 Nippon Telegraph and Telephone Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICE... |
<import_stmt>re<import_stmt>unittest2<import_from_stmt>google.appengine.ext ndb<import_from_stmt>google.appengine.ext testbed<import_from_stmt>consts.notification_type NotificationType<import_from_stmt>helpers.event.event_test_creator EventTestCreator<import_from_stmt>models.team Team<import_from_stmt>models.notificati... |
<import_stmt>torch<import_stmt>argparse<import_stmt>os<import_stmt>sys<import_stmt>cv2<import_stmt>time<class_stmt>Configuration()<block_start><def_stmt>__init__ self<block_start>self.EXP_NAME='mobilenetv2_cfbi'<line_sep>self.DIR_ROOT='./'<line_sep>self.DIR_DATA=os.path.join(self.DIR_ROOT 'datasets')<line_sep>self.DIR_... |
# Copyright 2020 The Bazel 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 applicable la... |
# Copyright 2016 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... |
<import_from_stmt>rlp.sedes CountableList <import_from_stmt>eth.rlp.headers BlockHeader <import_from_stmt>eth.vm.forks.byzantium.blocks ByzantiumBlock <import_from_stmt>.transactions PetersburgTransaction <class_stmt>PetersburgBlock(ByzantiumBlock)<block_start>transaction_builder=PetersburgTransaction<line_sep>fields=[... |
#
# Copyright (c) 2017 Intel Corporation
# SPDX-License-Identifier: BSD-2-Clause
#
<import_stmt>copy<import_stmt>numpy<as>np<import_from_stmt>llvmlite ir<as>lir<import_from_stmt>numba.core types typing utils ir config ir_utils registry<import_from_stmt>numba.core.typing.templates CallableTemplate signature infer_global... |
"""Runway providers."""<line_sep> |
# -*-encoding:utf-8-*-
<import_stmt>os<import_from_stmt>karlooper.web.application Application<import_from_stmt>karlooper.web.request Request<class_stmt>UsersHandler(Request)<block_start><def_stmt>get self<block_start><return>self.render("/user-page.html")<block_end><block_end><class_stmt>UserInfoHandler(Request)<block_... |
<import_from_stmt>conans.server.launcher ServerLauncher<import_from_stmt>conans.util.env_reader get_env<line_sep>launcher=ServerLauncher(server_dir=get_env("CONAN_SERVER_HOME"))<line_sep>app=launcher.server.root_app<def_stmt>main *args<block_start>launcher.launch()<block_end><if_stmt>__name__<eq>"__main__"<block_start>... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
<import_from_stmt>functools partial<import_from_stmt>selenium.webdriver Firefox<import_from_stmt>selenium.webdriver.support.ui WebDriverWait <def_stmt>esperar_elemento elemento webdriver<block_start>print(f'Tentando encontrar "{elemento}"')<if_stmt>webdriver.find_elements_by_css_selector(elemento)<block_start><return><... |
# -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 <NAME>, European Environment Agency
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your op... |
<import_stmt>os<import_stmt>shutil<import_from_stmt>.ZipFileManager ZipFileManager<import_from_stmt>.DiskFileManager DiskFileManager<import_from_stmt>.Directory Directory<import_stmt>string<line_sep>printable=set(string.printable)-set("\x0b\x0c")<def_stmt>is_hex s<block_start><return>any(c<not><in>printable<for>c s)<bl... |
#
# Blowfish encrypt - Encrypt selected region with Blowfish
#
# Copyright (c) 2019, <NAME>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must reta... |
<import_from_stmt>llvmlite ir<import_stmt>xml.etree.ElementTree<as>et<line_sep>int32=ir.IntType(32)<line_sep>int64=ir.IntType(64)<line_sep>int1=ir.IntType(1)<line_sep>void_type=ir.VoidType()<line_sep>function_names=[]<line_sep>registers,functions,uniques,extracts={} {} {} {}<line_sep>internal_functions={}<line_sep>memo... |
<import_from_stmt>shovel task<line_sep>@task<def_stmt>hello name='Foo'<block_start>'''Prints "Hello, " followed by the provided name.
Examples:
shovel bar.hello
shovel bar.hello --name=Erin
http://localhost:3000/bar.hello?Erin'''<line_sep>print('Hello, %s'%name)<block_end>@task<def_stmt... |
# This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) <NAME> <<EMAIL>>
# This program is published under a GPLv2 license
"""
Implementation of the configuration object.
"""<import_from_future_stmt> absolute_import<import_from_future_stmt> print_function<import_stmt... |
<import_from_stmt>datetime datetime<with_stmt>open('/home/neo4j/neo4j-community-3.5.1/logs/debug.log' 'r')<as>log<block_start>begin=[]<line_sep>end=[]<for_stmt>line log<block_start><if_stmt>'Index population started'<in>line<block_start>begin.append(line[:23])<block_end><elif_stmt>'Index creation finished'<in>line<bloc... |
"""Generates a random terrain at Minitaur gym environment reset."""<import_from_future_stmt> absolute_import<import_from_future_stmt> division<import_from_future_stmt> print_function<import_stmt>os inspect<line_sep>currentdir=os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))<line_sep>parentdir=o... |
"""
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
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, merg... |
<import_stmt>numpy<as>np<import_stmt>random<import_stmt>torch<import_from_stmt>torch.utils.data DataLoader<import_from_stmt>torch.utils.data.sampler Sampler<import_stmt>torchvision.transforms<as>transforms<import_from_stmt>dataset Omniglot MNIST<line_sep>'''
Helpers for loading class-balanced few-shot tasks
from datase... |
# -*- coding: utf-8 -*-
<import_from_future_stmt> absolute_import<import_from_future_stmt> division<import_from_future_stmt> print_function<import_stmt>csv<import_stmt>numpy<as>np<import_stmt>os<import_stmt>sys<import_from_stmt>observations.util maybe_download_and_extract<def_stmt>bomsoi path<block_start>"""Southern Os... |
# coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
"""
Created on Thu Oct 26 14:19:44 2017
@author: <NAME> - github.com/utkuozbulak
"""<import_stmt>os<import_stmt>numpy<as>np<import_stmt>torch<import_from_stmt>torch.optim SGD<import_from_stmt>torchvision models<import_from_stmt>misc_functions preprocess_image recreate_image save_image<class_stmt>ClassSpecificImageGene... |
# encoding: utf-8
"""
Step implementations for section-related features
"""<import_from_future_stmt> absolute_import print_function unicode_literals<import_from_stmt>behave given then when<import_from_stmt>docx Document<import_from_stmt>docx.enum.section WD_ORIENT WD_SECTION<import_from_stmt>docx.section Section<import... |
# coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
# Copyright 2021-present Kensho Technologies, LLC.
<import_from_stmt>.alphabet Alphabet# noqa
<import_from_stmt>.decoder BeamSearchDecoderCTC build_ctcdecoder# noqa
<import_from_stmt>.language_model LanguageModel# noqa
__package_name__="pyctcdecode"<line_sep>__version__="0.3.0"<line_sep> |
<import_stmt>array<import_stmt>struct<import_stmt>time<import_from_stmt>fcntl ioctl<import_from_stmt>typing IO<import_from_stmt>platypush.backend Backend<import_from_stmt>platypush.message.event.joystick JoystickConnectedEvent JoystickDisconnectedEvent JoystickButtonPressedEvent JoystickButtonReleasedEvent JoystickAxis... |
<import_stmt>idna<class_stmt>AddressMismatch(ValueError)<block_start>'''
In order to set up reverse resolution correctly, the ENS name should first
point to the address. This exception is raised if the name does
not currently point to the address.
'''<line_sep><pass><block_end><class_stmt>InvalidName(id... |
<import_from_stmt>typing List<import_from_stmt>typing Optional<import_from_stmt>typing Union<import_from_stmt>models.vps VpsStatus<import_from_stmt>schemas.base APIModel<import_from_stmt>schemas.base BasePagination<import_from_stmt>schemas.base BaseSchema<import_from_stmt>schemas.base BaseSuccessfulResponseModel<class_... |
# -*- coding: utf-8 -*-
<import_from_stmt>zvt.contract.api df_to_db<import_from_stmt>zvt.contract.recorder Recorder<import_from_stmt>zvt.domain.meta.stockhk_meta Stockhk<import_from_stmt>zvt.recorders.em em_api<class_stmt>EMStockhkRecorder(Recorder)<block_start>provider="em"<line_sep>data_schema=Stockhk<def_stmt>run se... |
"""
Registry general data files
"""<import_from_stmt>typing Any<import_from_stmt>moderngl_window.resources.base BaseRegistry<import_from_stmt>moderngl_window.meta DataDescription<class_stmt>DataFiles(BaseRegistry)<block_start>"""Registry for requested data files"""<line_sep>settings_attr="DATA_LOADERS"<def_stmt>load se... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
"""Model-related utilities.
"""<import_from_future_stmt> absolute_import<import_from_future_stmt> division<import_from_future_stmt> print_function<import_from_stmt>. backend<as>K<import_from_stmt>.utils.generic_utils has_arg<import_from_stmt>.utils.generic_utils to_list<import_from_stmt>.engine.input_layer Input<import... |
# Copyright 2020, Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Author: <NAME> <<EMAIL>>
#
# 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
#
#... |
"""Tests camera and system functions."""<import_stmt>unittest<import_from_stmt>unittest mock<import_from_stmt>blinkpy.blinkpy Blink<import_from_stmt>blinkpy.helpers.util BlinkURLHandler<import_from_stmt>blinkpy.sync_module BlinkSyncModule BlinkOwl<import_from_stmt>blinkpy.camera BlinkCamera BlinkCameraMini<line_sep>@mo... |
# ProgramB.py
print('Hello World')<line_sep> |
<import_stmt>warnings<import_from_stmt>collections Counter Mapping Sequence<import_from_stmt>numbers Number<import_from_stmt>typing Dict List<import_stmt>numpy<as>np<import_stmt>torch<import_from_stmt>mmdet.core.mask.structures BitmapMasks<import_from_stmt>torch.nn functional<as>F<line_sep>_step_counter=Counter()<def_s... |
#! /usr/bin/env python
# encoding: utf-8
# harald at klimachs.de
<import_stmt>re<import_from_stmt>waflib Utils Errors<import_from_stmt>waflib.Tools fc fc_config fc_scan<import_from_stmt>waflib.Configure conf<import_from_stmt>waflib.Tools.compiler_fc fc_compiler<line_sep>fc_compiler['aix'].insert(0 'fc_xlf')<line_sep>@c... |
# -*- coding: utf-8 -*-
# @Time: 2020/11/8 23:47
# @Author: GraceKoo
# @File: test.py
# @Desc:
<import_from_stmt>threading Thread<import_stmt>time<def_stmt>print_numbers <block_start>time.sleep(0.2)<line_sep>print("子线程结束")<block_end><if_stmt>__name__<eq>"__main__"<block_start>t1=Thread(target=print_numbers)<line_sep>t1... |
<import_stmt>torch<import_stmt>torch.nn<as>nn<import_stmt>torch.nn.functional<as>F<import_stmt>dgl.function<as>fn<line_sep>"""
GIN: Graph Isomorphism Networks
HOW POWERFUL ARE GRAPH NEURAL NETWORKS? (<NAME>, <NAME>, <NAME> and <NAME>, ICLR 2019)
https://arxiv.org/pdf/1810.00826.pdf
"""<class_stmt>GINLayer(n... |
<import_from_stmt>django.contrib admin<import_from_stmt>wouso.core.security.models Report<line_sep>admin.site.register(Report)<line_sep> |
<import_stmt>time<import_stmt>Queue<import_stmt>random<import_stmt>socket<import_stmt>struct<import_stmt>logging<import_stmt>threading<import_from_stmt>convert *<import_from_stmt>protocol ethernet ip tcp udp<line_sep>ETH_P_IP=0x0800# IP protocol
ETH_P_ALL=0x0003# Every packet
NSCRIPT_PATH='nscript'# NSCRIPT PATH
PAYLOA... |
"""
path_util contains helpers for working with local filesystem paths.
There are a few classes of methods provided here:
Functions to normalize paths and check that they are in normal form:
normalize, check_isvalid, check_isdir, check_isfile, path_is_url
Functions to list directories and to deal with subpath... |
<import_from_stmt>ssg.utils parse_template_boolean_value<def_stmt>preprocess data lang<block_start>data["arg_negate"]=parse_template_boolean_value(data parameter="arg_negate" default_value=<false>)<line_sep>data["arg_is_regex"]=parse_template_boolean_value(data parameter="arg_is_regex" default_value=<false>)<line_sep><... |
# Copyright 2015 Google 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 applicable law or a... |
<import_stmt>logging<class_stmt>CallbackHandler(logging.Handler)<block_start><def_stmt>__init__ self typestr default_tags callback override_tags<block_start>"""
Initialize the handler.
"""<line_sep>super().__init__()<line_sep>self.callback=callback<line_sep>self.tags=default_tags<line_sep>self.update_ta... |
<import_stmt>sys<import_stmt>unittest<import_stmt>os<import_stmt>tempfile<import_from_stmt>netCDF4 Dataset<import_stmt>numpy<as>np<import_from_stmt>numpy.testing assert_array_equal<line_sep>FILE_NAME=tempfile.NamedTemporaryFile(suffix='.nc' delete=<false>).name<line_sep>VL_NAME='vlen_type'<line_sep>VL_BASETYPE=np.int16... |
# Copyright 2019 The Sonnet 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 applicable l... |
<import_stmt>os glob<import_stmt>subprocess<import_from_stmt>subprocess DEVNULL STDOUT<line_sep>abspath=os.path.abspath(__file__)<line_sep>dir_=os.path.dirname(abspath)<line_sep>files=glob.glob(dir_+"/_progress_board_tests/_test_progress_board_*.py")<for_stmt>file_path files<block_start>file_name=str(file_path.rsplit("... |
<import_stmt>uuid<import_stmt>pickle<import_stmt>pytest<import_stmt>argparse<import_from_stmt>collections namedtuple<import_from_stmt>six text_type<import_from_stmt>allure.common AllureImpl StepContext<import_from_stmt>allure.constants Status AttachmentType Severity FAILED_STATUSES Label SKIPPED_STATUSES<import_from_st... |
<import_from_stmt>matplotlib.colors ListedColormap<line_sep>cm3=ListedColormap(['#0000aa' '#ff2020' '#50ff50'])<line_sep>cm2=ListedColormap(['#0000aa' '#ff2020'])<line_sep> |
<import_from_stmt>sympy.tensor.functions TensorProduct<import_from_stmt>sympy MatrixSymbol Matrix Array<import_from_stmt>sympy.abc x y z<import_from_stmt>sympy.abc i j k l<line_sep>A=MatrixSymbol("A" 3 3)<line_sep>B=MatrixSymbol("B" 3 3)<line_sep>C=MatrixSymbol("C" 3 3)<def_stmt>test_TensorProduct_construction <block_s... |
<import_stmt>sys<line_sep>sys.path.append('../../')<import_stmt>constants<as>cnst<import_stmt>os<line_sep>os.environ['PYTHONHASHSEED']='2'<import_stmt>tqdm<import_from_stmt>model.stg2_generator StyledGenerator<import_stmt>numpy<as>np<import_from_stmt>my_utils.visualize_flame_overlay OverLayViz<import_from_stmt>my_utils... |
<import_stmt>unittest<import_stmt>numpy<as>np<import_from_stmt>numpy.testing assert_almost_equal<import_from_stmt>dymos.utils.hermite hermite_matrices<class_stmt>TestHermiteMatrices(unittest.TestCase)<block_start><def_stmt>test_quadratic self# Interpolate with values and rates provided at [-1, 1] in tau space
<block_st... |
# -*- coding: utf-8 -*-
<import_from_future_stmt> absolute_import<import_from_future_stmt> division<import_from_future_stmt> print_function<import_stmt>csv<import_stmt>numpy<as>np<import_stmt>os<import_stmt>sys<import_from_stmt>observations.util maybe_download_and_extract<def_stmt>zea_mays path<block_start>"""Darwin's ... |
<import_from_stmt>conans ConanFile AutoToolsBuildEnvironment MSBuild tools<import_from_stmt>conans.errors ConanInvalidConfiguration<import_stmt>os<import_stmt>shutil<line_sep>required_conan_version=">=1.33.0"<class_stmt>LibStudXmlConan(ConanFile)<block_start>name="libstudxml"<line_sep>description="A streaming XML pull ... |
# -*- coding: utf-8 -*-
"""This file contains the event formatters interface classes.
The l2t_csv and other formats are dependent on a message field,
referred to as description_long and description_short in l2t_csv.
Plaso no longer stores these field explicitly.
A formatter, with a format string definition, is used ... |
<import_stmt>collections<import_stmt>copy<import_stmt>intervaltree<import_from_stmt>.label Label<class_stmt>LabelList<block_start>"""
Represents a list of labels which describe an utterance.
An utterance can have multiple label-lists.
Args:
idx (str): An unique identifier for the label-list
... |
# Licensed under a 3-clause BSD style license - see PYFITS.rst
<import_stmt>gzip<import_stmt>os<import_from_stmt>.base _BaseHDU BITPIX2DTYPE<import_from_stmt>.hdulist HDUList<import_from_stmt>.image PrimaryHDU<import_from_stmt>astropy.io.fits.file _File<import_from_stmt>astropy.io.fits.header _pad_length<import_from_st... |
<import_stmt>asyncio<import_stmt>functools<import_stmt>time<import_stmt>weakref<import_from_stmt>collections defaultdict<import_from_stmt>typing AsyncIterable<import_from_stmt>typing Awaitable<import_from_stmt>typing Callable<import_from_stmt>typing Dict<import_from_stmt>typing List<import_from_stmt>typing Optional<imp... |
'''Load image/class/box from a annotation file.
The annotation file is organized as:
image_name #obj xmin ymin xmax ymax class_index ..
'''<import_from_future_stmt> print_function<import_stmt>os<import_stmt>sys<import_stmt>os.path<import_stmt>random<import_stmt>numpy<as>np<import_stmt>torch<import_stmt>torch.utils... |
# Lint as: python3
# Copyright 2020 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 ... |
<import_stmt>time<import_from_stmt>http HTTPStatus<import_from_stmt>itertools count<import_from_stmt>typing Sequence<import_stmt>gevent<import_stmt>grequests<import_stmt>pytest<import_stmt>structlog<import_from_stmt>eth_utils to_canonical_address<import_from_stmt>flask url_for<import_from_stmt>raiden.api.python RaidenA... |
<import_stmt>os<import_stmt>sys<import_stmt>bpy<line_sep>script_dir=os.path.dirname(os.path.abspath(__file__))<line_sep>utils_dir=os.path.join(script_dir "../../blender_utils")<line_sep>sys.path.append(utils_dir)<import_from_stmt>utils bake_model clean_unused export_ig_object import_obj_folder<line_sep>################... |
<import_from_stmt>mushroom_rl.utils.plots PlotItemBuffer DataBuffer<import_from_stmt>mushroom_rl.utils.plots.plot_item_buffer PlotItemBufferLimited<class_stmt>RewardPerStep(PlotItemBuffer)<block_start>"""
Class that represents a plot for the reward at every step.
"""<def_stmt>__init__ self plot_buffer<block_st... |
# Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... |
<import_stmt>os<import_stmt>sys<import_stmt>unittest<import_stmt>torch<import_stmt>torch._C<import_from_stmt>pathlib Path<import_from_stmt>test_nnapi TestNNAPI<import_from_stmt>torch.testing._internal.common_utils TEST_WITH_ASAN<line_sep># Make the helper files in test/ importable
pytorch_test_dir=os.path.dirname(os.pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.