id
int64
0
300k
label
stringlengths
1
74
text
stringlengths
4k
8k
6,300
dot product
# This file is part of project Sverchok. It's copyrighted by the contributors # recorded in the version control history of the file, available from # its original location https://github.com/nortikin/sverchok/commit/master # # SPDX-License-Identifier: GPL3 # License-Filename: LICENSE """ This module is for geometry fu...
6,301
test grid from radars gates to grid
""" Unit Tests for Py-ART's map/gates_to_grid.py. """ import numpy as np import pytest from numpy.testing import assert_almost_equal import pyart EXPECTED_CENTER_SLICE = [40, 30, 20, 10, 0, 0, 10, 20, 30, 40] COMMON_MAP_TO_GRID_ARGS = { "grid_shape": (3, 9, 10), "grid_limits": ((-400.0, 400.0), (-900.0, 900...
6,302
test text to cell py2
import pytest from nbformat.v4.nbbase import new_markdown_cell from jupytext.cell_reader import ( LightScriptCellReader, RMarkdownCellReader, paragraph_is_fully_commented, uncomment, ) from jupytext.cell_to_text import RMarkdownCellExporter @pytest.mark.parametrize( "lines", [ "# text...
6,303
get cpuinfo item
import sys, platform, re, pytest from numpy.core._multiarray_umath import __cpu_features__ def assert_features_equal(actual, desired, fname): __tracebackhide__ = True # Hide traceback for py.test actual, desired = str(actual), str(desired) if actual == desired: return detected = str(__cpu_feat...
6,304
test create bom
# 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 pathlib import Path from string import Template from unittest.mock import patch import mozpack.pkg import mozunit ...
6,305
sample pose func
import blenderproc as bproc import argparse import os import numpy as np parser = argparse.ArgumentParser() parser.add_argument('bop_parent_path', help="Path to the bop datasets parent directory") parser.add_argument('cc_textures_path', default="resources/cctextures", help="Path to downloaded cc textures") parser.add_...
6,306
process raw response
from __future__ import annotations from datetime import datetime from typing import Any, List, Optional from rest_framework.exceptions import ParseError from rest_framework.request import Request from rest_framework.response import Response from snuba_sdk import ( Column, Condition, Direction, Entity,...
6,307
send message
import uuid import time import os import json import logging import socket import sys import platform from parsl.utils import setproctitle from parsl.multiprocessing import ForkProcess from parsl.dataflow.states import States from parsl.version import VERSION as PARSL_VERSION logger = logging.getLogger(__name__) de...
6,308
run
import numpy as np from scipy.constants import epsilon_0 from scipy.constants import mu_0 from SimPEG.electromagnetics.utils import k, omega __all__ = ["MT_LayeredEarth"] # Evaluate Impedance Z of a layer def _ImpZ(f, mu, k): return omega(f) * mu / k # Complex Cole-Cole Conductivity - EM utils def _PCC(siginf,...
6,309
open
""" Smart object module. """ from __future__ import absolute_import, unicode_literals import contextlib import logging import io import os from psd_tools.constants import Tag logger = logging.getLogger(__name__) class SmartObject(object): """ Smart object that represents embedded or external file. Smar...
6,310
shared pkgs dirs
import copy import os import pathlib import platform from typing import Any, Generator, Mapping import pytest from . import helpers #################### # Config options # #################### def pytest_addoption(parser): """Add command line argument to pytest.""" parser.addoption( "--mamba-pkgs...
6,311
get root as int16 encoded xfb array
# automatically generated by the FlatBuffers compiler, do not modify # namespace: NetEncoding import flatbuffers from flatbuffers.compat import import_numpy np = import_numpy() class Int16EncodedXFBArray(object): __slots__ = ["_tab"] @classmethod def GetRootAs(cls, buf, offset=0): n = flatbuff...
6,312
relabel
#!/usr/bin/env python # Copyright 2021-2022 NVIDIA Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
6,313
editions
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import subprocess import sys import llnl.util.tty as tty from spack.package import * class Catalyst(CMakePac...
6,314
narrow jsonpath node
import logging from functools import ( lru_cache, reduce, ) from itertools import zip_longest from typing import Optional import jsonpath_ng import jsonpath_ng.ext.filter @lru_cache(maxsize=256) def parse_jsonpath(jsonpath_expression: str) -> jsonpath_ng.JSONPath: """ parses a JSONPath expression and...
6,315
combine std
# Copyright 1999-2021 Alibaba Group Holding 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 a...
6,316
epidemics prefetch
import logging import datetime import json import requests from databank.models import PastCrisesEvent, PastEpidemic, Month from .utils import catch_error, get_country_by_iso3 logger = logging.getLogger(__name__) DISASTER_API = 'https://api.reliefweb.int/v1/disasters/' RELIEFWEB_DATETIME_FORMAT = '%Y-%m-%d' def pa...
6,317
set preferences
"""User preference service. Notes: - Preferences are user-specific. - For application settings use :class:`abilian.services.settings.SettingsService`. """ from __future__ import annotations from typing import TYPE_CHECKING, Any, Dict, List, Optional from flask import Blueprint, Flask, g, redirect, request, url_fo...
6,318
test deserialize vocab seen entries
import pickle import pytest from thinc.api import get_current_ops import spacy from spacy.lang.en import English from spacy.strings import StringStore from spacy.tokens import Doc from spacy.util import ensure_path, load_model from spacy.vectors import Vectors from spacy.vocab import Vocab from ..util import make_te...
6,319
system data
# 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...
6,320
url parameters
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
6,321
forget email in request teardown
"""Miscellaneous background jobs.""" from __future__ import annotations from collections import defaultdict from functools import wraps from typing import Callable from typing_extensions import Protocol import requests from flask import g from baseframe import statsd from .. import app, rq from ..extapi.boxoffice ...
6,322
stream content
from __future__ import annotations import asyncio import ssl from typing import ( TYPE_CHECKING, Any, AsyncGenerator, AsyncIterator, Dict, Iterable, List, Optional, Tuple, Type, Union, cast, ) import certifi from aiohttp import BasicAuth, ClientError, ClientSession, For...
6,323
write packages
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/pylint-dev/pylint/blob/main/LICENSE # Copyright (c) https://github.com/pylint-dev/pylint/blob/main/CONTRIBUTORS.txt """Utilities for creating diagrams.""" from __future__ import annotations import argpa...
6,324
post
import logging from app_analytics.analytics_db_service import ( get_total_events_count, get_usage_data, ) from app_analytics.tasks import track_feature_evaluation from app_analytics.track import track_feature_evaluation_influxdb from django.conf import settings from drf_yasg.utils import swagger_auto_schema fr...
6,325
field
""" amplitude ========= Autogenerated DPF operator classes. """ from warnings import warn from ansys.dpf.core.dpf_operator import Operator from ansys.dpf.core.inputs import Input, _Inputs from ansys.dpf.core.outputs import Output, _Outputs from ansys.dpf.core.operators.specification import PinSpecification, Specificati...
6,326
into orig type
# noqa E501: Ported from https://github.com/BUTSpeechFIT/speakerbeam/blob/main/src/models/adapt_layers.py # Copyright (c) 2021 Brno University of Technology # Copyright (c) 2021 Nippon Telegraph and Telephone corporation (NTT). # All rights reserved # By Katerina Zmolikova, August 2021. from functools import partial ...
6,327
failed
# ----------------------------------------------------------------------------- # Copyright (c) 2012 - 2023, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. # -----------------------------------------------------------------...
6,328
select tui
import os import sys import termios import tty from typing import Callable, List, Optional, Tuple def buffered_print() -> Tuple[Callable, Callable]: buffer = [] def __print(*args): for arg in args: buffer.append(arg) def __show(): nonlocal buffer print("".join(buffer)...
6,329
test omp props
# Copyright 2019-2022 ETH Zurich and the DaCe authors. All rights reserved. import dace from dace import dtypes, nodes from typing import Any, Dict, List, Union import numpy as np N = dace.symbol("N") @dace.program def arrayop(inp: dace.float32[N], out: dace.float32[N]): for i in dace.map[0:N]: out[i] = ...
6,330
train
#!/usr/bin/env python # coding=utf-8 # BSD 3-Clause License # # Copyright (c) 2017, # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above ...
6,331
set state
# Copyright 2009-2015 Jaap Karssenberg <jaap.karssenberg@gmail.com> # Tests: search gui.TestDialogs.testSearchDialog from gi.repository import Gtk from gi.repository import GObject import logging from zim.notebook import Path from zim.gui.widgets import Dialog, BrowserTreeView, InputEntry, ErrorDialog, ScrolledWind...
6,332
test list array nbytes
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE import numpy as np import pytest # noqa: F401 import awkward as ak def test(): np_data = np.random.random(size=(4, 100 * 1024 * 1024 // 8 // 4)) array = ak.operations.from_numpy(np_data, regulararray=False) assert ...
6,333
setup
""" ShadowPlacer.py places a shadow. It traces a line from a light source to the opposing surface. Or it may do that later, right now it puts a node on the surface under the its parent node. """ __all__ = ['ShadowPlacer'] from direct.controls.ControlManager import CollisionHandlerRayStart from direct.directnotify im...
6,334
clear
import numpy as np from PyQt5.QtCore import QRectF, QLineF, QPointF, Qt from PyQt5.QtGui import QPainter, QFont, QFontMetrics, QPen, QTransform, QBrush from urh import settings from urh.ui.painting.ZoomableScene import ZoomableScene from urh.util import util from urh.util.Formatter import Formatter class GridScene(Z...
6,335
get begidx
import os.path import sys from warnings import warn try: _console = sys._jy_console _reader = _console.reader except AttributeError: raise ImportError("Cannot access JLine2 setup") try: # jarjar-ed version from org.python.jline.console.history import MemoryHistory except ImportError: # dev ver...
6,336
read log file
#!/usr/bin/env python3 # # Copyright (c) 2021 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 """ Log Parser for Dictionary-based Logging This uses the JSON database file to decode the input binary log data and print the log messages. """ import argparse import binascii import logging import sys import di...
6,337
backward shape
# 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...
6,338
source
from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import cross_building from conan.tools.env import VirtualBuildEnv, VirtualRunEnv from conan.tools.files import copy, get, rm, rmdir from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain, PkgConfigDep...
6,339
reset parameters
from typing import Union import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch import FloatTensor from torch.nn.modules.module import Module from torch.nn.parameter import Parameter class Discriminator(nn.Module): """Module that learns associations between graph embeddi...
6,340
test failover to second master
import logging import os import shutil import time import pytest pytestmark = [ pytest.mark.core_test, pytest.mark.skip_on_freebsd(reason="Processes are not properly killed on FreeBSD"), ] log = logging.getLogger(__name__) def test_pki(salt_mm_failover_master_1, salt_mm_failover_master_2, caplog): """ ...
6,341
onlyaml script
#!/usr/bin/python2 ############################################################ # # Extended YAML Support # # Supports include files and variable interpolations. # ############################################################ import yaml import os import pprint import tempfile from string import Template class OnlYamlE...
6,342
test fan modes
from homeassistant.components.climate.const import ClimateEntityFeature, HVACMode from homeassistant.const import UnitOfTemperature from ..const import BECA_BHP6000_PAYLOAD from ..helpers import assert_device_properties_set from ..mixins.climate import TargetTemperatureTests from ..mixins.light import BasicLightTests ...
6,343
delete synapse scope
# -*- coding: utf-8 -*- # # symbol_table.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 2 of the License, o...
6,344
test error raised when private key file
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
6,345
interleave pattern
import os from itertools import cycle, islice, chain from align.cell_fabric import transformation from .canvas import CanvasPDK from .gen_transistor import mos from align.schema.transistor import Transistor, TransistorArray class MOSGenerator(CanvasPDK): def __init__(self, *args, **kwargs): super().__ini...
6,346
someprog
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved. """ Tests dace.program as class methods """ import dace import numpy as np import sys import time class MyTestClass: """ Test class with various values, lifetimes, and call types. """ classvalue = 2 def __init__(self, n=5) -> Non...
6,347
get routes view
import io import logging from typing import Any, Callable, Generic, Literal, TypeAlias, TypeVar from aiohttp import web from aiohttp.web_exceptions import HTTPError, HTTPException from aiohttp.web_routedef import RouteDef, RouteTableDef from models_library.generics import Envelope from pydantic import BaseModel, Field...
6,348
method
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
6,349
start
# Licensed to Elasticsearch B.V. under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch B.V. licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this f...
6,350
is transparent
"""A matplotlib backend for publishing figures via display_data""" # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from __future__ import print_function import matplotlib from matplotlib.backends.backend_agg import new_figure_manager, FigureCanvasAgg # analysis: i...
6,351
do get
import os import sys import webbrowser from base64 import b64encode from datetime import datetime from http.server import BaseHTTPRequestHandler, HTTPServer from jinja2 import Environment, FileSystemLoader from pygments import highlight from pygments.formatters import HtmlFormatter from pygments.lexers import PythonLe...
6,352
gettz
# -*- coding: utf-8 -*- import warnings import json from tarfile import TarFile from pkgutil import get_data from io import BytesIO from dateutil.tz import tzfile as _tzfile __all__ = ["get_zonefile_instance", "gettz", "gettz_db_metadata"] ZONEFILENAME = "dateutil-zoneinfo.tar.gz" METADATA_FN = 'METADATA' class t...
6,353
test proxy from env http without port
# # 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 us...
6,354
test create model tiny conv training
# Copyright 2017 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...
6,355
test merge cube attributes 1 cube
"""Tests for :mod:`esmvalcore.iris_helpers`.""" import datetime from copy import deepcopy from itertools import permutations from unittest import mock import numpy as np import pytest from cf_units import Unit from iris.coords import ( AncillaryVariable, AuxCoord, CellMeasure, CellMethod, DimCoord,...
6,356
build arguments schema
# -------------------------------------------------------------------------------------------- # 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 # --------------------------------...
6,357
test module hash
import datetime as dt import io import pathlib import time import numpy as np import pandas as pd import param import pytest try: import diskcache except Exception: diskcache = None diskcache_available = pytest.mark.skipif(diskcache is None, reason="requires diskcache") from panel.io.cache import _find_hash_...
6,358
inactive subscription
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
6,359
query iterate collection with offset
import numpy as np import random from pymilvus import ( connections, utility, FieldSchema, CollectionSchema, DataType, Collection, ) HOST = "localhost" PORT = "19530" COLLECTION_NAME = "test_iterator" USER_ID = "id" MAX_LENGTH = 65535 AGE = "age" DEPOSIT = "deposit" PICTURE = "picture" CONSISTENCY_LEVE...
6,360
close
# 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 ...
6,361
gen string table
"""Benchmarks for Python's regex engine. These are some of the original benchmarks used to tune Python's regex engine in 2000 written by Fredrik Lundh. Retreived from http://mail.python.org/pipermail/python-dev/2000-August/007797.html and integrated into Unladen Swallow's pyperf.py in 2009 by David Laing. These bench...
6,362
post
# -*- coding: utf-8 -*- """ Helper module which exposes abstractions to write webservers easily """ from abc import ABC, abstractmethod import socket import http.server as http from http import HTTPStatus from urllib.parse import parse_qs, urlparse import json class Response(): """ Represents a HTTP `Respon...
6,363
create
''' Plugin Rules ============ Methods described in this section relate to the plugin rules API. These methods can be accessed at ``Nessus.plugin_rules``. .. rst-class:: hide-signature .. autoclass:: PluginRulesAPI :members: ''' from typing import List, Dict, Optional from typing_extensions import Literal from res...
6,364
test publication upgrade 7 8
import pytest def test_publication_upgrade(upgrader, publication_1): value = upgrader.upgrade('publication', publication_1, target_version='2') assert value['schema_version'] == '2' assert 'references' not in value assert value['identifiers'] == ['PMID:25409824'] assert value['lab'] == "cb0ef1f6-3...
6,365
replace
# A part of NonVisual Desktop Access (NVDA) # This file is covered by the GNU General Public License. # See the file COPYING for more details. # Copyright (C) 2020-2022 NV Access Limited, Cyrille Bougot """Unit tests for the characterProcessing module. """ import unittest import re from characterProcessing import Spe...
6,366
id
# 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...
6,367
location name from url
#!/usr/bin/env python3 ############################################################################ # # MODULE: g.download.location # AUTHOR(S): Vaclav Petras <wenzeslaus gmail com> # PURPOSE: Download and extract location from web # COPYRIGHT: (C) 2017 by the GRASS Development Team # # This program is free sof...
6,368
refresh tags
import os import tap_tester.connections as connections import tap_tester.menagerie as menagerie import tap_tester.runner as runner from functools import reduce # TODO fix setup.py? so zenpy module is availalble on dev_vm without manually running pip install from zenpy import Zenpy from zenpy.lib.api_objects imp...
6,369
test adds env when enabled
#!/usr/bin/env python # -*- coding: utf-8 # Copyright 2017-2019 The FIAAS 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 # # Unle...
6,370
set last used time
from __future__ import annotations import dataclasses import logging import math from collections import deque from datetime import datetime from typing import Optional, List, Dict, Deque, Set from .config import Config from .operator_resource_info import OpResIdent from ..statistic.data import NeonOpResStatData fr...
6,371
clean prompt
import json import re from pydantic.types import List from superagi.helper.token_counter import TokenCounter from superagi.tools.base_tool import BaseTool FINISH_NAME = "finish" class AgentPromptBuilder: """Agent prompt builder for LLM agent.""" @staticmethod def add_list_items_to_string(items: List[s...
6,372
test connection is allowed
import pytest from gaphor import UML from gaphor.diagram.connectors import Connector from gaphor.diagram.tests.fixtures import allow, connect, disconnect from gaphor.SysML import sysml from gaphor.SysML.blocks.block import BlockItem from gaphor.SysML.blocks.connectors import BlockProperyProxyPortConnector from gaphor....
6,373
instantiate urban observatory wind data
########################################### # Authors: Toby Latcham (tjl47@cam.ac.uk) # # Sophie Hall (sh2000@cam.ac.uk) # # Date: 11 Feb 2022 # ########################################### import uuid from owlready2 import * # Data Reader and data retrieval modules from Utils.data_re...
6,374
to phone
# Copyright (c) Alibaba, Inc. and its affiliates. import os import random from pathlib import Path from typing import Any, Dict import librosa import soundfile as sf import torch from fairseq.data.audio.feature_transforms import \ CompositeAudioFeatureTransform from fairseq.data.audio.speech_to_text_dataset impor...
6,375
merge dict
#!/usr/bin/env python3 from __future__ import print_function import argparse import boto3 import botocore import glob import os import requests import yaml import io from shutil import copyfile try: from collections.abc import Mapping except ImportError: from collections import Mapping def METHOD_NAME(source,...
6,376
print free text
from enum import Enum from typing import Optional from strictdoc.backend.sdoc.models.anchor import Anchor from strictdoc.backend.sdoc.models.document import Document from strictdoc.backend.sdoc.models.inline_link import InlineLink from strictdoc.backend.sdoc.models.requirement import Requirement from strictdoc.backend...
6,377
on value decode error
import abc import asyncio import typing from typing import Any, AsyncIterator, Awaitable, Generic, Optional, Set, TypeVar from mode import Seconds from mode.utils.futures import stampede from mode.utils.queues import ThrowableQueue from .codecs import CodecArg from .core import HeadersArg, K, V from .tuples import TP...
6,378
execute
import triton_python_backend_utils as pb_utils from torch.utils.dlpack import to_dlpack import torch import numpy as np import kaldifeat import _kaldifeat from typing import List import json class Fbank(torch.nn.Module): def __init__(self, opts): super(Fbank, self).__init__() self.fbank = kaldifeat...
6,379
sort
# cython: language_level=3 # distutils: language = c++ # -*- coding: utf-8 -*- # ***************************************************************************** # Copyright (c) 2016-2023, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are pe...
6,380
test equality
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2023 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
6,381
test it works with puerto rico
import json from project.util.geojson import FeatureGeometry import pytest from django.core.management import call_command import urllib.parse from project.justfix_environment import BASE_DIR from project.mapbox import ( _encode_query_for_places_request, mapbox_places_request, find_city, get_mapbox_sta...
6,382
set test params
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 running bitcoind with the -rpcbind and -rpcallowip options.""" import sys from test_framework.ne...
6,383
delete
# # This file is part of pretix (Community Edition). # # Copyright (C) 2014-2020 Raphael Michel and contributors # Copyright (C) 2020-2021 rami.io GmbH and contributors # # This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General # Public License as published by ...
6,384
sample
# Copyright 2018 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://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
6,385
command id
from __future__ import annotations import abc import copy import gettext import typing _ = gettext.gettext class UndoableCommand(abc.ABC): def __init__(self, title: str, *, METHOD_NAME: typing.Optional[str] = None, is_mergeable: bool = False) -> None: self.__old_modified_state = None self.__ne...
6,386
verify elemwise sum
# 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...
6,387
import outline
#!/usr/bin/python # coding=utf8 import os import argparse import mysql.connector import sys class Config: pass g_config = Config() class Stat: def reset(self): self.db_count = 0 self.outline_count = 0 def __init__(self): self.reset() g_stat = Stat() class ImportStat: def reset(self): self...
6,388
iterable to batches
"""Utility functions.""" import contextlib import hashlib import re import time import urllib from collections.abc import Collection, Generator, Iterable from decimal import ROUND_HALF_UP, Decimal from itertools import islice from typing import cast from xml.etree.ElementTree import Element # nosec # Element is not a...
6,389
get veff
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
6,390
test model identifiers set globally
# # Copyright (C) 2022 # Smithsonian Astrophysical Observatory # # # 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....
6,391
ingest
from typing import Dict, List, Any, Callable, Optional, Union import numpy as np import deeplake from deeplake.core.dataset import Dataset as DeepLakeDataset from deeplake.core.vectorstore.vector_search import utils from deeplake.util.exceptions import ( TransformError, FailedIngestionError, IncorrectEmbe...
6,392
list workspace subscription secrets
# 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 __all__ ...
6,393
run single test
from __future__ import print_function import http_utils import time # note: run once with moov cache enabled and once with moov cache disabled # it's recommended to disable debug logs since this test generates a lot of log lines ''' nginx.conf location /local/content/ { vod none; vod_mode local; alias /pa...
6,394
set up base
from __future__ import absolute_import from builtins import str from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.core.management import call_command from django.db import connection from django.db.migrations.executor import MigrationExecutor from django.test i...
6,395
plot mcse
"""Bokeh mcseplot.""" import numpy as np from bokeh.models import ColumnDataSource, Span from bokeh.models.glyphs import Scatter from bokeh.models.annotations import Title from scipy.stats import rankdata from ....stats.stats_utils import quantile as _quantile from ...plot_utils import _scale_fig_size from .. import s...
6,396
tear down
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
6,397
get web app domain ownership identifier
# 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 __all__ ...
6,398
test process custom event
import unittest from unittest import mock from queue import Queue from flumine.controls.loggingcontrols import LoggingControl, EventType class TestLoggingControl(unittest.TestCase): def setUp(self): self.logging_control = LoggingControl() def test_init(self): self.assertIsInstance(self.loggi...
6,399
package info
import os import conan.tools.files from conans import CMake, ConanFile, tools from conans.errors import ConanInvalidConfiguration import textwrap required_conan_version = ">=1.29.1" class IgnitionMathConan(ConanFile): name = "ignition-math" license = "Apache-2.0" url = "https://github.com/conan-io/conan-...