id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
19,500
chunk iterator
__author__ = 'maartenbreddels' import os import mmap import collections import logging import numpy as np import numpy.ma import threading import vaex import vaex.dataset import vaex.file from vaex.expression import Expression from vaex.file.column import ColumnFile import struct from vaex.multithreading import get_ma...
19,501
test for ii
# RUN: python %s | filecheck %s from xdsl.frontend.context import CodeContext from xdsl.frontend.dialects.builtin import f32, i1, i32, index from xdsl.frontend.exception import CodeGenerationException from xdsl.frontend.program import FrontendProgram p = FrontendProgram() with CodeContext(p): # CHECK: func.f...
19,502
add arguments
# -*- coding: utf-8 -*- # Debug discovery code on actual resources. from django.core.management.base import BaseCommand from hs_core.models import BaseResource from hs_core.hydroshare.utils import get_resource_by_shortkey def check_displayed(resource, isreplacedby, replaces): """ create a depiction of what is di...
19,503
end section
import os import sys import re import traceback import mimetypes import difflib import shutil from . import util class TestFailureException(Exception): def __init__(self, message, *args): self.message = message self.files = [] for a in args: self.files.append(str(a)) def _...
19,504
combine two overlapping dataframes
from pathlib import Path from typing import List import pandas as pd from owid import catalog CURRENT_DIR = Path(__file__).parent VERSION = CURRENT_DIR.name def gather_sources_from_tables( tables: List[catalog.Table], ) -> List[catalog.meta.Source]: """Gather unique sources from the metadata.dataset of each...
19,505
test iter
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # The Universal Permissive License (UPL), Version 1.0 # # Subject to the condition set forth below, permission is hereby granted to any # person obtaining a copy of this softw...
19,506
vdk exception
# Copyright 2021-2023 VMware, Inc. # SPDX-License-Identifier: Apache-2.0 import json import os import pathlib from typing import Dict from unittest import mock import pytest from click.testing import Result from functional.run import util from vdk.api.plugin.hook_markers import hookimpl from vdk.api.plugin.plugin_inpu...
19,507
sklearn dataset to loaders
import argparse import random from typing import Optional import captum._utils.models.linear_model.model as pytorch_model_module import numpy as np import sklearn.datasets as datasets import torch from tests.utils.test_linear_model import _evaluate from torch.utils.data import DataLoader, TensorDataset def METHOD_NA...
19,508
test02 ray intersect transform
import pytest import drjit as dr import mitsuba as mi from mitsuba.scalar_rgb.test.util import fresolver_append_path @fresolver_append_path def example_scene(shape, scale=1.0, translate=[0, 0, 0], angle=0.0): from mitsuba import ScalarTransform4f as T to_world = T.translate(translate) @ T.rotate([0, 1, 0], ...
19,509
make bytes
""" php_ini - file ``/etc/php.ini`` =============================== This module provides the ``PHPConfig`` class parser, for reading the options in the ``/etc/php.ini`` file. Typical content of ``/etc/php.ini`` file is:: [PHP] engine = On short_open_tag = Off precision = 14 output_buffering = 409...
19,510
trim empty lines
from typing import Optional from robot.api.parsing import CommentSection, EmptyLine, Token try: from robot.api.parsing import Config # from RF 6.0 except ImportError: Config = None from robotidy.disablers import skip_section_if_disabled from robotidy.skip import Skip from robotidy.transformers import Transf...
19,511
reload
#!/usr/bin/env python3 # vim: sts=4 sw=4 et # GladeVcp Macro widget # # Based on hal MDI history widget # Copyright (c) 2011 Pavel Shramov <shramov@mexmat.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
19,512
build mlp
from typing import Union, Sequence, Callable, Optional import torch import torch.nn as nn import torch.nn.functional as F import schnetpack.nn as snn __all__ = ["build_mlp", "build_gated_equivariant_mlp"] def METHOD_NAME( n_in: int, n_out: int, n_hidden: Optional[Union[int, Sequence[int]]] = None, n...
19,513
setup analog voltage out
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2023 PyMeasure Developers # # 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 limit...
19,514
has wid hdl
# # auto-pts - The Bluetooth PTS Automation Framework # # Copyright (c) 2023, Oticon. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed...
19,515
check universal
from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from typing import TYPE_CHECKING, Iterable import rich.repr from ._help_renderables import HelpText from .styles import Styles from .tokenize import Token from .types import Specificity3 if TYPE_CHECKING: from ..do...
19,516
consumer site
""" Models for the markdown app of the Marsha project. In this base model, we activate generic behaviours that apply to all our models and enforce checks and validation that go further than what Django is doing. """ import logging from django.db import models from django.utils.translation import gettext_lazy as _ f...
19,517
get chassis byname
def get_counter_name(mode, tg_type, comp_type, direction): from spytest.tgen import tgen_utils return tgen_utils.get_counter_name(mode, tg_type, comp_type, direction) def get_latest_log_msg(): from spytest.tgen import tgen_utils return tgen_utils.get_latest_log_msg() def validate_tgen_traffic(**kwa...
19,518
test conv2 d1x1 filter
# Copyright 2015 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...
19,519
add recipe
# Bob build tool # Copyright (C) 2022 Jan Klötzke # # SPDX-License-Identifier: GPL-3.0-or-later from ...archive import JenkinsArchive from ...intermediate import StepIR, PackageIR, RecipeIR, ToolIR, SandboxIR, RecipeSetIR from ...scm import auditFromData from ...utils import runInEventLoop def getJenkinsVariantId(st...
19,520
eval impl
import copy import logging import torch import wandb from torch import nn class CentralizedTrainer(object): """ This class is used to train federated non-IID dataset in a centralized way """ def __init__(self, dataset, model, device, args): self.device = device self.args = args ...
19,521
set up
import re import threading import unittest import pytest import cupy from cupy import cuda from cupy import testing class TestDeviceComparison(unittest.TestCase): def check_eq(self, result, obj1, obj2): if result: assert obj1 == obj2 assert obj2 == obj1 assert not (o...
19,522
window menu
import wx from meerk40t.gui.wxutils import ScrolledPanel from ..icons import icons8_vector_50 from ..mwindow import MWindow from .attributes import ColorPanel, IdPanel, PositionSizePanel, PreventChangePanel _ = wx.GetTranslation class PointPropertyPanel(ScrolledPanel): def __init__(self, *args, context=None, n...
19,523
download subtitle
# coding=utf-8 from __future__ import absolute_import import logging from subliminal.providers.napiprojekt import NapiProjektProvider as _NapiProjektProvider, \ NapiProjektSubtitle as _NapiProjektSubtitle, get_subhash from subzero.language import Language from subliminal.subtitle import guess_matches from sublimin...
19,524
set mocked audit info
from unittest.mock import patch import botocore from boto3 import session from prowler.providers.aws.lib.audit_info.audit_info import AWS_Audit_Info from prowler.providers.aws.services.networkfirewall.networkfirewall_service import ( NetworkFirewall, ) from prowler.providers.common.models import Audit_Metadata #...
19,525
entrypoint
import os from dataclasses import dataclass from pathlib import Path from typing import Tuple import cv2 import numpy as np import tyro from nuscenes.nuscenes import NuScenes as NuScenesDatabase from nuscenes.utils.data_classes import Box from nuscenes.utils.geometry_utils import BoxVisibility, view_points from tqdm i...
19,526
test get for organisation
from opencodelists.tests.assertions import assert_difference, assert_no_difference from ..helpers import csv_builder from .assertions import ( assert_get_unauthenticated, assert_get_unauthorised, assert_post_unauthenticated, assert_post_unauthorised, ) from .helpers import force_login def test_get_un...
19,527
catchall
import json from httmock import all_requests, HTTMock # from oauth2_provider.compat import parse_qs, urlparse from urllib.parse import parse_qs, urlparse from oauth2_provider.models import AccessToken from apps.capabilities.models import ProtectedCapability from apps.authorization.models import DataAccessGrant from a...
19,528
pre operations
# -------------------------------------------------------------------------------------------- # 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 aaz-dev-tools # --------------------------------...
19,529
register
# coding: utf-8 """tornado IOLoop API with zmq compatibility If you have tornado ≥ 3.0, this is a subclass of tornado's IOLoop, otherwise we ship a minimal subset of tornado in zmq.eventloop.minitornado. The minimal shipped version of tornado's IOLoop does not include support for concurrent futures - this will only b...
19,530
test spider
import logging import unittest import matplotlib.colors import matplotlib.pyplot as plt import mpltern.ternary import numpy as np import pandas as pd from numpy.random import multivariate_normal from pyrolite.geochem import REE from pyrolite.plot import density, pyroplot, spider from pyrolite.util.synthetic import no...
19,531
daskify
from __future__ import annotations import concurrent.futures as concurrent import functools import gzip import inspect import os import pickle import warnings from collections.abc import Awaitable, Iterator, Sequence from contextlib import contextmanager from functools import wraps from itertools import product from t...
19,532
type
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . imp...
19,533
name
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
19,534
with tempdir
#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2018-2023 Blender Authors # # SPDX-License-Identifier: GPL-2.0-or-later """ Call as follows: python collada_mesh_simple.py --blender PATH_TO_BLENDER_EXE --testdir PATH_TO_SVN/lib/tests/collada/mesh """ import sys import bpy import argparse import functools import shuti...
19,535
main
import argparse import sys import time from MassEmailSender.utils import register, sendMail version = "1.0.0" def intro(): print("------+------+-------+-------+------+------+------+------+------+------") print(" Mass-Email-Sender") print("------+------+-------+-------+------+------...
19,536
test potentials df
# coding: utf-8 # Copyright (c) Max-Planck-Institut für Eisenforschung GmbH - Computational Materials Design (CM) Department # Distributed under the terms of "New BSD License", see the LICENSE file. import os import unittest import shutil import pandas as pd from pyiron_atomistics.project import Project from pyiron_a...
19,537
test async event hooks
import pytest import httpx def app(request: httpx.Request) -> httpx.Response: if request.url.path == "/redirect": return httpx.Response(303, headers={"server": "testserver", "location": "/"}) elif request.url.path.startswith("/status/"): status_code = int(request.url.path[-3:]) return...
19,538
parse file
import codecs import configparser import logging import os try: import tomllib # python>=3.11 except ImportError: import tomli as tomllib # backport from . import data, schema # The name of the environment variable that can be used to ovewrite the path # to the bugwarriorrc file BUGWARRIORRC = "BUGWARRIORR...
19,539
test catch negative crop
import unittest import numpy as np import random import caffe from caffe import layers as L from caffe import params as P from caffe.coord_map import coord_map_from_to, crop def coord_net_spec(ks=3, stride=1, pad=0, pool=2, dstride=2, dpad=0): """ Define net spec for simple conv-pool-deconv pattern common t...
19,540
parse arguments
# -*- coding: utf-8 -*- ''' command line tool to convert fields from mni space to subject space This program is part of the SimNIBS package. Please check on www.simnibs.org how to cite our work in publications. Copyright (C) 2018 Guilherme B Saturnino, Kristoffer H Madsen, Axel Thieslcher, Jesper ...
19,541
test dependency inference
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from textwrap import dedent import pytest from pants.backend.codegen.thrift import dependency_inference from pants.backend.codegen.thrift.dependency_inference import ( InferThriftDep...
19,542
test spectrum at spaxel with 2d
import pytest from astropy.nddata import CCDData from echo import delay_callback from regions import RectanglePixelRegion @pytest.mark.filterwarnings('ignore:No observer defined on WCS') def test_spectrum_at_spaxel(cubeviz_helper, spectrum1d_cube): cubeviz_helper.load_data(spectrum1d_cube, data_label='test') ...
19,543
instance to data
import io import json import logging import copy from django.core.files import File from django.core.serializers.json import DjangoJSONEncoder from django.db.models.base import ModelState from django.db.models.fields.files import FieldFile from wagtail.core.models import Page from wagtail.core.blocks import StreamVal...
19,544
forward
#! /usr/bin/env python # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
19,545
retranslate ui
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'GUI.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtWidgets ...
19,546
test render skip root
#!/usr/bin/env python3 ############################################################### # Copyright 2022 Lawrence Livermore National Security, LLC # (c.f. AUTHORS, NOTICE.LLNS, COPYING) # # This file is part of the Flux resource manager framework. # For details, see https://github.com/flux-framework. # # SPDX-License-Id...
19,547
wait
# Copyright (c) 2017 The University of Manchester # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
19,548
get command
# -*- coding: utf-8 -*- # # Copyright (C) 2016 GNS3 Technologies Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
19,549
save
import numpy as np from PySDM_examples.utils import BasicSimulation from PySDM import Builder from PySDM.backends import CPU from PySDM.backends.impl_numba.test_helpers import scipy_ode_condensation_solver from PySDM.dynamics import AmbientThermodynamics, Condensation from PySDM.environments import Parcel from PySDM.i...
19,550
name
# coding=utf-8 # *** WARNING: this file was generated by pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import copy import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities from . im...
19,551
set default stock cards
#!/usr/bin/env python # coding=utf-8 # Copyright 2017 the Isard-vdi project authors: # Josep Maria Viñolas Auquer # Alberto Larraz Dalmases # License: AGPLv3 import os import traceback from rethinkdb import RethinkDB from api import app from .._common.api_exceptions import Error r = RethinkDB() import lo...
19,552
on flag drop
""" Babel: reach the heavens by building a tower Derived from onectf.py by Yourself Release thread: http://www.buildandshoot.com/viewtopic.php?t=2586 """ from pyspades.constants import CTF_MODE from pyspades.collision import vector_collision FLAG_SPAWN_POS = (256, 256) HIDE_POS = (0, 0, 63) DISABLED, ONE_CTF, REV...
19,553
move regex
import re from visidata import vd, VisiData, BaseSheet, Sheet, Column, Progress, asyncthread, rotateRange VisiData.init('searchContext', dict) # [(regex, columns, backward)] -> kwargs from previous search @VisiData.api @asyncthread def METHOD_NAME(vd, sheet, *args, **kwargs): list(vd.searchRegex(sheet, *args, mov...
19,554
close
# SPDX-License-Identifier: GPL-2.0-or-later import struct import configparser import glob import os import shutil SPECS = {os.path.splitext(os.path.basename(spec_file))[0]: spec_file for spec_file in glob.glob(os.path.join(os.path.dirname(__file__), '*.cfg'))} EVENT_FORMAT = '@llHHI' EV_KEY = 0x01 KEY_ACTION = { ...
19,555
dpbssd
from __future__ import annotations from exo import instr, DRAM from exo.libs.memories import AMX_TILE # ---------------------------------------------------------------------------- # # Config # # ----------------------------------------------------...
19,556
test with nonexistent id
from django.test import TestCase from rest_framework import status from usaspending_api.idvs.tests.data.idv_test_data import create_idv_test_data from model_bakery import baker class IDVFundingTestCase(TestCase): # Need to set this so that data for TestCase (and inheritors like SimpleTestCase) flush these DBs at ...
19,557
test bf16 compute legalize
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
19,558
time
import METHOD_NAME from collections.abc import Iterable from random import randrange from string import ascii_uppercase from typing import NamedTuple, TypedDict DEFAULT_QUESTION_POINTS = 10 DEFAULT_QUESTION_TIME = 20 class QuestionData(TypedDict): """Representing the different 'keys' of the question taken from t...
19,559
get dims list
""" Utils Summary """ from __future__ import division, unicode_literals, print_function, absolute_import import os from collections import OrderedDict import numpy as np from podpac.core.coordinates import Coordinates, StackedCoordinates, ArrayCoordinates1d def METHOD_NAME(): return [ ("lat",), ...
19,560
nano to milli
from __future__ import print_function from __future__ import division import argparse from enum import Enum import xml.etree.ElementTree as ET from collections import OrderedDict class BenchmarkResult: """BenchmarkResult class to hold perf numbers""" def __init__(self, name, mean_value, mean_lower_bound, mea...
19,561
timed
#! /usr/bin/env python # -*- coding: utf-8 -*- # flake8: noqa T001 """Measure performances of a basic tax-benefit system to compare to other OpenFisca implementations.""" import argparse import logging import sys import time import numpy as np from numpy.core.defchararray import startswith from openfisca_core impor...
19,562
test parse wrong url
# coding=utf-8 from mock import patch, Mock from unittest import TestCase from monitorrent.plugins.trackers import CloudflareChallengeSolverSettings from monitorrent.plugins.trackers.rutracker import RutrackerTracker, RutrackerLoginFailedException from tests import use_vcr from tests.plugins.trackers import TrackerSet...
19,563
check by page
#!/usr/bin/env python import time import click from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support.ui import WebDriverWait from selenium.webdr...
19,564
test singleton
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES). # # Copyright (c) 2018-2023 by the software own...
19,565
get tenant list
# -*- coding: UTF-8 from globaleaks import models from globaleaks.db.appdata import load_appdata, db_load_defaults from globaleaks.handlers.base import BaseHandler from globaleaks.handlers.wizard import db_wizard from globaleaks.models import serializers from globaleaks.models.config import db_get_config_variable, \ ...
19,566
sparql query read
from SPARQLWrapper import SPARQLWrapper, JSON, POST from datetime import datetime import re import time import sys from test_surrogate_model import run_surrogate_model def METHOD_NAME(queryString): sparql = SPARQLWrapper("http://localhost:8081/fuseki/test/sparql") sparql.setQuery(queryString) sparql.setRe...
19,567
get tournaments
from bs4 import BeautifulSoup import requests class ESPN: """ Create an instance of the `ESPN` class to fetch football scoreboards, tournaments, and teams. :Example: ```python espn = ESPN() scores = espn.get_scoreboard(date="20230721") tournaments = espn.get_tournaments() teams = espn...
19,568
name
import json import textwrap import uuid from collections import defaultdict from typing import DefaultDict, Dict, List, Optional, Union from aqueduct.error import InvalidUserArgumentException from aqueduct.flow_run import FlowRun from aqueduct.models.response_models import ( GetWorkflowV1Response, SavedObjectU...
19,569
set acknowledge
import json import cv2 import base64 import threading import time from datetime import datetime from websocket_server import WebsocketServer import logging from interfaces.pose3d import ListenerPose3d from map import Map # Graphical User Interface Class class GUI: # Initialization function # The actual ini...
19,570
get response for head request
# coding: utf-8 from datetime import datetime try: from zoneinfo import ZoneInfo except ImportError: from backports.zoneinfo import ZoneInfo from django.conf import settings from django.http import Http404 from django.shortcuts import get_object_or_404 from rest_framework import permissions, status, viewsets f...
19,571
display warning
# encoding: utf-8 # # Copyright 2009-2023 Greg Neagle. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
19,572
force level
# Xlib.ext.dpms -- X Display Power Management Signaling # # Copyright (C) 2020 Thiago Kenji Okada <thiagokokada@gmail.com> # # 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 vers...
19,573
test acos
""" Copyright 2020 The OneFlow 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 law or agr...
19,574
round decimal
# testing/util.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from ..util import jython, pypy, defaultdict, decorator, py2k import decimal import ...
19,575
always dict
import sys, os from glob import glob from shutil import copyfile import fnmatch import yaml, pprint import subprocess import jinja2 from itertools import * import concurrent.futures def ParseAruments() -> (dict, dict): import argparse parser = argparse.ArgumentParser() parser.add_argument('configPath') ...
19,576
compute giou
# Copyright 2022 The KerasCV 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
19,577
parse row
# -*- coding: utf-8 -*- """Parser for McAfee Anti-Virus Logs. McAfee AV uses 4 logs to track when scans were run, when virus databases were updated, and when files match the virus database. """ from dfdatetime import time_elements as dfdatetime_time_elements from plaso.containers import events from plaso.lib import...
19,578
download builds
#!/usr/bin/env python3 import os import json import logging import sys import time from typing import Optional import requests # type: ignore from ci_config import CI_CONFIG DOWNLOAD_RETRIES_COUNT = 5 def get_with_retries( url: str, retries: int = DOWNLOAD_RETRIES_COUNT, sleep: int = 3, **kwargs,...
19,579
test channel data dirty propagation
########################################################################## # # Copyright (c) 2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
19,580
get module name
""" Utilities for the EVM tools """ import json import logging import sys from typing import Any, Callable, Dict, Optional, Tuple, TypeVar import coincurve from ethereum.base_types import U64, U256, Uint from ethereum.crypto.hash import Hash32 from ..forks import Hardfork W = TypeVar("W", Uint, U64, U256) EXCEPTI...
19,581
get current url
""" :mod: GFAL2_XROOTStorage ================= .. module: python :synopsis: XROOT module based on the GFAL2_StorageBase class. """ import os # from DIRAC from DIRAC import gLogger from DIRAC.Resources.Storage.GFAL2_StorageBase import GFAL2_StorageBase from DIRAC.Core.Utilities.Pfn import pfnparse, pfnun...
19,582
apply filters
import os import logging from uuid import uuid4 from typing import TYPE_CHECKING, Any, Dict, Generator, List, Optional, Union, cast from banal import ensure_list, is_listish, keys_values from sqlalchemy import MetaData, func from sqlalchemy.future import select from sqlalchemy.engine import Engine, create_engine from s...
19,583
dispose
# (C) Copyright 2004-2023 Enthought, Inc., Austin, TX # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in LICENSE.txt and may be redistributed only under # the conditions described in the aforementioned license. The license # is also available online at...
19,584
main
#!/usr/bin/env python3 """ Example XML entry: <entry id="UniRef100_Q6GZX2" updated="2017-10-25"> <name>Cluster: Uncharacterized protein 3R</name> <property type="member count" value="3"/> <property type="common taxon" value="Ranavirus"/> <property type="common taxon ID" value="10492"/> <representativeMember> <dbRef...
19,585
get key self
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import hashlib from typing import ( Iterator, List, Optional, ) from databuilder.models.graph_node import GraphNode from databuilder.models.graph_relationship import GraphRelationship from databuilder.models.query.base import ...
19,586
test cache warm date stability
from backup.model import DestinationPrecache, Model, Coordinator from backup.config import Config, Setting from tests.faketime import FakeTime from dev.request_interceptor import RequestInterceptor from dev.simulated_google import URL_MATCH_DRIVE_API from backup.drive import DriveSource from datetime import timedelta...
19,587
underline
import sys try: import click except ImportError: sys.exit("You have to manually install the 'click' package to run this file.") import json from heltour.tournament.teamgen import make_league, \ total_happiness, team_rating_range, team_rating_variance, reduce_variance from itertools import combinations fr...
19,588
interfaces
''' Wifi Facade. ============= The :class:`Wifi` is to provide access to the wifi of your mobile/ desktop devices. It currently supports `connecting`, `disconnecting`, `scanning`, `getting available wifi network list` and `getting network information`. Simple examples --------------- To enable/ turn on wifi scannin...
19,589
get info
import os from .mparts.deploy import ModelDeploy from .mparts.undeploy import ModelUndeploy from .mparts.predict import ModelPredict from .mparts.actual import ModelActual from .mparts.delete_actual import ModelDeleteActual from a2ml.api.model_review.model_review import ModelReview from .exceptions import AugerExcepti...
19,590
blockwise
from __future__ import annotations from collections.abc import Iterable, Sequence from typing import TYPE_CHECKING, Any, Callable import numpy as np from packaging.version import Version from xarray.core.duck_array_ops import dask_available from xarray.core.indexing import ImplicitToExplicitIndexingAdapter from xarr...
19,591
test number input widget display
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022) # # 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 appl...
19,592
check forward equal with pytorch float
# ------------------------------------------------------------------------------------------------ # Deformable DETR # Copyright (c) 2020 SenseTime. All Rights Reserved. # Licensed under the Apache License, Version 2.0 [see LICENSE for details] # -------------------------------------------------------------------------...
19,593
real extract
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, try_get, unified_strdate, ) class WatIE(InfoExtractor): _VALID_URL = r'(?:wat:|https?://(?:www\.)?wat\.tv/video/.*-)(?P<id>[...
19,594
test validate schema allow
from datetime import timedelta import hypothesis import pytest from jsonschema import ValidationError from tests.strategies import generate_object, generate_another_object from verta.registry import validate_schema, verify_io class TestValidateSchema: @hypothesis.settings( suppress_health_check=[hypothe...
19,595
test create comment from plugins
''' Faraday Penetration Test IDE Copyright (C) 2013 Infobyte LLC (http://www.infobytesec.com/) See the file 'doc/LICENSE' for the license information ''' from faraday.server.api.modules.comments import CommentView from faraday.server.models import Comment from tests.factories import ServiceFactory from tests.test_ap...
19,596
network model update facade
from ipaddress import IPv4Address, IPv4Interface from unittest.mock import MagicMock from uuid import UUID import pytest from common import OperatingSystem from common.agent_events import FingerprintingEvent from common.types import ( DiscoveredService, NetworkPort, NetworkProtocol, NetworkService, ...
19,597
create checkboxes field
from collections import OrderedDict import django.forms from django.conf import settings from django.utils.html import conditional_escape from django.utils.translation import gettext_lazy as _ from wagtail.admin.forms import WagtailAdminPageForm class BaseForm(django.forms.Form): def __init__(self, *args, **kwa...
19,598
stopped
import contextlib import importlib import os import sys import threading import time from concurrent.futures import ThreadPoolExecutor, as_completed, thread class ProviderRunner(object): """Runner executes provider jobs on threads.""" class SpinningCursorThread(threading.Thread): def __init__(self, ...
19,599
latex
""" Root system data for (untwisted) type A affine """ #***************************************************************************** # Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>, # # Distributed under the terms of the GNU General Public License (GPL) # http://www.gnu.or...