id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
15,800 | create bundle | #!/usr/bin/env python
#
# ESP32 x509 certificate bundle generation utility
#
# Converts PEM and DER certificates to a custom bundle format which stores just the
# subject name and public key to reduce space
#
# The bundle will have the format: number of certificates; crt 1 subject name length; crt 1 public key length;
... |
15,801 | 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 . im... |
15,802 | object url | """Invitation models."""
import structlog
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.urls import reverse
from django.uti... |
15,803 | test login creds type | #!/usr/bin/python
import settestpath
from up2date_client import up2dateErrors
from up2date_client import config
import unittest
#Import the modules you need to test...
from up2date_client import up2dateAuth
test_up2date = "../etc-conf/up2date.config"
class TestGetSystemID(unittest.TestCase):
def setUp(self):
... |
15,804 | test subworkflow error code none | from SpiffWorkflow.task import TaskState
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
__author__ = 'michaelc'
class TransactionSubprocessTest(BpmnWorkflowTestCase):
def setUp(self):
self.spec, self.subprocesses = self... |
15,805 | launch setup | import os
import sys
import subprocess
import yaml
import launch.actions
from launch import LaunchDescription
from launch.actions import OpaqueFunction
from launch_ros.actions import Node
from launch.actions import ExecuteProcess
from ament_index_python.packages import get_package_share_directory
from industrial_moveit... |
15,806 | measure performance | import numpy
from .logging import debug
def sqdiff(template, frame) -> "tuple[int, int]":
if template.shape[:2] != frame.shape[:2]:
raise ValueError("Template and frame must be the same size")
try:
from . import libstbt
return libstbt.sqdiff(template, frame)
except (ImportError, N... |
15,807 | chordal cycle graph | """Provides explicit constructions of expander graphs.
"""
import itertools
import networkx as nx
__all__ = ["margulis_gabber_galil_graph", "chordal_cycle_graph", "paley_graph"]
# Other discrete torus expanders can be constructed by using the following edge
# sets. For more information, see Chapter 4, "Expander Gr... |
15,808 | get panda categories | """Contains the NotifyPanel class."""
__all__ = ['NotifyPanel']
class NotifyPanel:
"""NotifyPanel class: this class contains methods for creating
a panel to control direct/panda notify categories."""
def __init__(self, directNotify, tl = None):
"""
NotifyPanel class pops up a control pan... |
15,809 | can reuse epoch itr across epochs | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import numpy as np
from fairseq.data import BaseWrapperDataset, plasma_utils
logger = logging.getLogger(__name__)
class Re... |
15,810 | test remove checksum | # -*- coding: utf-8 -*-
#
# Copyright (C) 2014 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.
... |
15,811 | test hashing of device | # Data Parallel Control (dpctl)
#
# Copyright 2020-2022 Intel 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.... |
15,812 | test can finalize order without sku | from datetime import datetime, timedelta
import graphene
import pytz
from .....order import OrderStatus
from .....order.error_codes import OrderErrorCode
from .....product.models import ProductVariant
from ....tests.utils import get_graphql_content
ORDER_CAN_FINALIZE_QUERY = """
query OrderQuery($id: ID!){
... |
15,813 | check source parameter availability status code | """Step implementations for sources."""
from pathlib import Path
from asserts import assert_equal, assert_in, assert_not_equal, assert_true
from behave import then, when
from behave.runner import Context
from item import get_item
def sanitize_value(value: str) -> str | list[str]:
"""Convert the value if necess... |
15,814 | test periodic run fixed with longer task | import threading
import time
from concurrent.futures.thread import ThreadPoolExecutor
from typing import Tuple
import pytest
from localstack.utils.scheduler import ScheduledTask, Scheduler
from localstack.utils.sync import poll_condition
class DummyTask:
def __init__(self, fn=None) -> None:
super().__in... |
15,815 | test normalize | import unittest
import matplotlib.axes
import matplotlib.lines
import matplotlib.patches
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pyrolite.comp.codata import close
from pyrolite.util.plot.helpers import (
draw_vector,
init_spherical_octant,
nan_scatter,
plot_2dhull,
... |
15,816 | validate by unp | """
Clean and validate a DataFrame column containing Belarusian UNP numbers (UNPs).
"""
# pylint: disable=too-many-lines, too-many-arguments, too-many-branches
from typing import Any, Union
from operator import itemgetter
import dask.dataframe as dd
import numpy as np
import pandas as pd
from stdnum.by import unp
fro... |
15,817 | render label | from __future__ import annotations
from typing import Any, Dict, Sequence, Tuple
from django import forms
from sentry import tagstore
from sentry.eventstore.models import GroupEvent
from sentry.rules import MATCH_CHOICES, EventState, MatchType
from sentry.rules.conditions.base import EventCondition
from sentry.rules... |
15,818 | calculate group sizes | # -*- coding: utf-8 -*-
# Copyright (c) 2023 Intel 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 applicab... |
15,819 | call | # Copyright 2019 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... |
15,820 | set up module | import unittest
import numpy as np
from pyscf.lib import finger
from pyscf.pbc import gto as pbcgto
from pyscf.pbc import scf as pbcscf
from pyscf.pbc import df as pbc_df
import pyscf.cc
import pyscf.pbc.cc as pbcc
import pyscf.pbc.tools.make_test_cell as make_test_cell
from pyscf.pbc.lib import kpts_helper
import py... |
15,821 | get wrapper | # 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... |
15,822 | get asymmetric neighbor list | import networkx as nx
import numpy as np
class TopologyManager:
def __init__(
self, n, b_symmetric, undirected_neighbor_num=5, out_directed_neighbor=5
):
self.n = n
self.b_symmetric = b_symmetric
self.undirected_neighbor_num = undirected_neighbor_num
self.out_directed_n... |
15,823 | before training | """xgboost init!"""
import json
import warnings
from pathlib import Path
from typing import TYPE_CHECKING, cast
import xgboost as xgb # type: ignore
from xgboost import Booster
import wandb
from wandb.sdk.lib import telemetry as wb_telemetry
MINIMIZE_METRICS = [
"rmse",
"rmsle",
"mae",
"mape",
... |
15,824 | process message | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import torch
from pyro.distributions.distribution import Distribution
from pyro.poutine.util import is_validation_enabled
from pyro.util import ignore_jit_warnings
from .indep_messenger import CondIndepStackFrame, IndepMessenger
... |
15,825 | project | # 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
15,826 | masters | # -*- coding: utf-8 -*-
from dj.choices import Choices
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from ralph.assets.models.base import BaseObject
from ralph.assets.utils impo... |
15,827 | test compress | # Copyright 2010-2023 The pygit2 contributors
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, version 2,
# as published by the Free Software Foundation.
#
# In addition to the permissions in the GNU General Public License,
# the authors give ... |
15,828 | is item | """The glotaran registry module."""
from __future__ import annotations
from collections.abc import Callable
from collections.abc import Iterable
from collections.abc import Iterator
from collections.abc import Mapping
from pathlib import Path
from typing import Any
from warnings import warn
from glotaran.utils.ipytho... |
15,829 | switch data | # 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
import numpy as np
from itertools ... |
15,830 | get models and paths | # Copyright 2018 DeepMind Technologies Limited. 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 ... |
15,831 | sim800l disconnect to code | import esphome.codegen as cg
import esphome.config_validation as cv
from esphome import automation
from esphome.const import (
CONF_ID,
CONF_TRIGGER_ID,
)
from esphome.components import uart
DEPENDENCIES = ["uart"]
CODEOWNERS = ["@glmnet"]
MULTI_CONF = True
sim800l_ns = cg.esphome_ns.namespace("sim800l")
Sim8... |
15,832 | test dft mft | """Tests for SFA utilities."""
import sys
import numpy as np
import pytest
from sktime.datasets import load_gunpoint
from sktime.datatypes._panel._convert import from_nested_to_2d_array
from sktime.tests.test_switch import run_test_for_class
from sktime.transformations.panel.dictionary_based._sfa import SFA
@pytes... |
15,833 | test augmentation with no instances | import numpy as np
import tensorflow as tf
import sleap
from sleap.nn.system import use_cpu_only
use_cpu_only() # hide GPUs for test
from sleap.nn.data import providers
from sleap.nn.data import augmentation
def test_augmentation(min_labels):
labels_reader = providers.LabelsReader.from_user_instances(min_label... |
15,834 | cpio send | #!/usr/bin/python3
import optparse, os, subprocess, socket, threading, stat, sys
from manifest_common import add_var, expand, unsymlink, read_manifest, defines, strip_file
from contextlib import closing
import io
StringIO = io.StringIO
host_arch = os.uname().machine
def find_free_port():
with closing(socket.soc... |
15,835 | test from json file errors | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import io
import os
import unittest
import unittest.mock
from uuid import UUID
from antlir.btrfsutil import subvolum... |
15,836 | hide | # Copyright (c) 2020-21, Matt Colligan. All rights reserved.
#
# 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, mod... |
15,837 | test07 close db before sequence | """TestCases for checking that it does not segfault when a DBEnv object
is closed before its DB objects.
"""
import os, sys
import unittest
from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path
# We're going to get warnings in this module about trying to close the db when
# ... |
15,838 | get nodes | from _typeshed import Incomplete
from collections.abc import Awaitable, Callable, Mapping
from types import TracebackType
from typing import Any, Generic
from typing_extensions import Self
from redis.asyncio.client import ResponseCallbackT
from redis.asyncio.connection import BaseParser, Connection, Encoder
from redis... |
15,839 | to dict | # coding: utf-8
"""
KAMONOHASHI API
A platform for deep learning # noqa: E501
OpenAPI spec version: v2
Contact: kamonohashi-support@jp.nssol.nipponsteel.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class DataSetApi... |
15,840 | do start thread | import logging
import os
import threading
from localstack import config
from localstack.aws.connect import connect_externally_to
from localstack.config import is_env_true
from localstack.services.dynamodb.packages import dynamodblocal_package
from localstack.utils.common import TMP_THREADS, ShellCommandThread, get_fre... |
15,841 | feedback kwargs | from operator import attrgetter
from django.contrib.auth import get_user_model
from django.core.management.base import CommandError
from adjfeedback.models import AdjudicatorFeedback
from draw.models import Debate
from utils.management.base import RoundCommand
from ...dbutils import add_feedback, add_feedback_to_rou... |
15,842 | guest | #
# Copyright 2019 The FATE 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 appli... |
15,843 | test hydro share o auth2 | import unittest
from unittest import mock
from tethys_services.backends.hydroshare import HydroShareOAuth2
class HydroShareBackendTest(unittest.TestCase):
def setUp(self):
self.auth_server_hostname = "www.hydroshare.org"
self.http_scheme = "https"
self.auth_server_full_url = "{0}://{1}".fo... |
15,844 | collect gpdb logs | from qautils.gppylib.commands.base import Command, REMOTE
from qautils.gppylib.commands.gp import GpLogFilter
import inspect, math, os, time
import logging, sys
from time import localtime, strftime
import tinctest
from tinctest.main import TINCException
CURRENT_TIME_STRING = strftime('%Y%m%d_%H%M%S', localtime())
d... |
15,845 | test raising stopserve | import os
import warnings
import eventlet
from eventlet import convenience, debug
from eventlet.green import socket
import six
import tests
import tests.mock
certificate_file = os.path.join(os.path.dirname(__file__), 'test_server.crt')
private_key_file = os.path.join(os.path.dirname(__file__), 'test_server.key')
c... |
15,846 | weaviate server older than 1 14 | import warnings
from importlib.metadata import version, PackageNotFoundError
from typing import Optional
try:
__version__ = version("weaviate-client")
except PackageNotFoundError:
__version__ = "unknown version"
class _Warnings:
@staticmethod
def auth_with_anon_weaviate() -> None:
warnings.wa... |
15,847 | generate sprites | import random
import arcade
from arcade.experimental import Shadertoy
# Do the math to figure out our screen dimensions
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
SCREEN_TITLE = "Ray-casting Demo"
SPRITE_SCALING = 0.25
# How fast the camera pans to the player. 1.0 is instant.
CAMERA_SPEED = 0.1
PLAYER_MOVEMENT_SPEED =... |
15,848 | url | # --------------------------------------------------------------------------------------------
# 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
# --------------------------------... |
15,849 | test count | # This file is a part of the AnyBlok project
#
# Copyright (C) 2015 Jean-Sebastien SUZANNE <jssuzanne@anybox.fr>
# Copyright (C) 2018 Denis VIVIÈS <dvivies@geoblink.com>
#
# 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 fi... |
15,850 | clean | import os
from django.core.exceptions import ValidationError
from django.forms import (
formset_factory,
BaseFormSet,
Form,
CharField,
ModelForm,
modelformset_factory,
)
from django_file_form.forms import (
UploadedFileField,
MultipleUploadedFileField,
FileFormMixin,
)
from .model... |
15,851 | check viscosity | '''
Calculate the completeness of the data contained in an oil record.
The top-level interface is a single function:
completeness(pyjson_of_an_oil_record)
(pyjson is a python dict that is a match for the JSON)
It performs calculations that were designed by RobertJ, and returns a value
wit... |
15,852 | test dr vctk train path | from pathlib import Path
import pytest
from torchaudio.datasets import dr_vctk
from torchaudio_unittest.common_utils import get_whitenoise, save_wav, TempDirMixin, TorchaudioTestCase
_SUBSETS = ["train", "test"]
_CONDITIONS = ["clean", "device-recorded"]
_SOURCES = ["DR-VCTK_Office1_ClosedWindow", "DR-VCTK_Office1_O... |
15,853 | calculate tax rate | from decimal import Decimal
from typing import TYPE_CHECKING, Iterable, Optional, Tuple
from prices import TaxedMoney
from ..core.utils.country import get_active_country
from . import TaxCalculationStrategy
if TYPE_CHECKING:
from ..checkout.fetch import CheckoutInfo, CheckoutLineInfo
from ..order.models impo... |
15,854 | 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... |
15,855 | test no ellipsoid | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""Unit tests for the `iris.experimental.raster.export_geotiff` function."""
# Import iris.tests first so that some things can... |
15,856 | test maybe component | import pytest
from tribler.core.components.component import Component
from tribler.core.components.exceptions import MissedDependency, MultipleComponentsFound, NoneComponent
from tribler.core.components.session import Session
from tribler.core.config.tribler_config import TriblerConfig
class ComponentTestException(E... |
15,857 | test delete config subproc basic | from __future__ import annotations
import pytest
from exo.new_eff import *
from exo import proc, config, DRAM, SchedulingError
from exo.stdlib.scheduling import *
from exo.platforms.x86 import *
print()
print("Dev Tests for new_eff.py")
def test_debug_let_and_mod():
N = AInt(Sym("N"))
j = AInt(Sym("j"))
... |
15,858 | test user agent | # Copyright 2015 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, s... |
15,859 | pack | """
This file defines the required data structures for the bandwidth accounting mechanism.
Note that we define two different class types of BandwidthTransaction: one for the object that resides outside the
Pony database and another one that represents the class inside Pony.
We make this separation to workaround the fac... |
15,860 | tag class only | # pylint: disable=redefined-outer-name
import itertools
import pytest
import slash
from sentinels import NOTHING
from slash.core.tagging import NO_TAGS, Tags, get_tags
from slash.exceptions import TaggingConflict
from slash.loader import Loader
from .utils.suite_writer.method_test import MethodTest
def test_setting... |
15,861 | get results | """
Copyright 2015 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... |
15,862 | unlock | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from getpass import getuser
from urlparse import urlparse
import boto3
import requests
import logging
import os
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
logging.getLogger('botocore').setLevel(logging.... |
15,863 | query 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
# --------------------------------... |
15,864 | use tensorflow for gpu memory | import contextlib
import threading
from contextvars import ContextVar
from typing import Any, Callable, Dict, Optional, Type, cast
from .. import registry
from ..compat import cupy, has_cupy
from ..util import (
assert_pytorch_installed,
assert_tensorflow_installed,
get_torch_default_device,
is_cupy_ar... |
15,865 | is yeb format | # #
# Copyright 2013-2023 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... |
15,866 | transform | # Copyright 2019 IBM 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 applicable law or agreed to in writing, ... |
15,867 | test import chart | # 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... |
15,868 | validate spec | """SageMakerComponentSpec for defining inputs/outputs for
SageMakerComponents."""
# 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 requi... |
15,869 | get location | # -*- coding: utf-8 -*-
# Authors:
# Chris Procter <cprocter@redhat.com>
# Thomas Woerner <twoerner@redhat.com>
#
# Copyright (C) 2021-2022 Red Hat
# see file 'COPYING' for use and warranty information
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General P... |
15,870 | test pot fragment | # vim: ts=4:sw=4:expandtab
# BleachBit
# Copyright (C) 2008-2023 Andrew Ziem
# https://www.bleachbit.org
#
# 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
# ... |
15,871 | hours and minutes | from collections import namedtuple
from django.forms import TypedChoiceField
from django.template import Library
from django.utils.translation import gettext_lazy as _
from evap.evaluation.models import BASE_UNIPOLAR_CHOICES, Contribution, Evaluation
from evap.rewards.tools import can_reward_points_be_used_by
from ev... |
15,872 | unlock | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... |
15,873 | send login link | # Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
# For license information, please see license.txt
import frappe
from frappe.geo.country_info import get_country_timezone_info
from frappe.core.utils import find
from press.api.account import get_account_request_from_key
from press.press.doctype.site... |
15,874 | create accumulator | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
15,875 | invalidate body | # mako/cache.py
# Copyright 2006-2022 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from docassemble.base.mako import util
_cache_plugins = util.PluginLoader("docassemble.base.mako.cache"... |
15,876 | test regression synthetic signal | #!/usr/bin/env python
# Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia is free software: you can redistribute it and/or modify it under
# the terms of the GNU Afextentro General Public License as published by the Free
# Software Foundation (FSF... |
15,877 | test time coord only in some cubes | # Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""Test function :func:`iris.util.array_equal`."""
# import iris tests first so that some things can be initialised before
# i... |
15,878 | mock create github | import string
import os
import json
import subprocess
import random
import pytest
import fakeredis
from falcon import testing
import requests
import datalad_service.common.s3
import datalad_service.common.github
from datalad.api import Dataset
from datalad_service.app import create_app
from datalad_service.datalad im... |
15,879 | is integral | # -*- coding: utf-8 -*-
# This file provides the class Sammple_Class which describes
# a sample of a collection of Sıegel modular forms.
#
# Author: Nils Skoruppa <nils.skoruppa@gmail.com>
from sage.structure.sage_object import SageObject
from sage.all import ZZ, QQ, NumberField, PolynomialRing
from ast import literal... |
15,880 | last modified | # 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 copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
15,881 | find executable | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Matt Martz <matt@sivel.net>
# Copyright (C) 2015 Rackspace US, 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 ... |
15,882 | test parse pdf good | # Copyright 2022 Camptocamp SA
# @author: Simone Orsi <simahawk@gmail.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import base64
import mock
from lxml import etree
from odoo import exceptions
from odoo.tests.common import Form
from .common import TestCommon
class TestParsingValidation(Test... |
15,883 | on er c1155 batch received | # Code generated by moonworm : https://github.com/bugout-dev/moonworm
# Moonworm version : 0.2.4
import json
import os
from typing import Any, Dict, Union
from eth_typing.evm import Address, ChecksumAddress
from web3 import Web3
from web3.contract import ContractFunction
from .web3_util import *
abi_path = os.path.j... |
15,884 | apply grad | # Copyright 2018-2021 Xanadu Quantum 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 applicable law or... |
15,885 | initialize | # coding=utf-8
import threading
from flask_babel import lazy_gettext
from mycodo.utils.functions import parse_function_information
from mycodo.config_translations import TRANSLATIONS
from mycodo.databases.models import Actions
from mycodo.databases.models import CustomController
from mycodo.actions.base_action import ... |
15,886 | test simple setting registration | # Copyright (c) 2017 Ansible, Inc.
# All Rights Reserved.
from uuid import uuid4
from django.conf import LazySettings
from django.core.cache.backends.locmem import LocMemCache
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import gettext_lazy as _
from rest_framework.fields impo... |
15,887 | test repaint | # coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
15,888 | requires config | import pytest
from dagster import (
DagsterInvalidDefinitionError,
DependencyDefinition,
GraphDefinition,
In,
Int,
Out,
Output,
graph,
in_process_executor,
job,
op,
usable_as_dagster_type,
validate_run_config,
)
def builder(graph):
return graph.add_one(graph.ret... |
15,889 | test job not scheduled return one call | # Platform Imports
from Products.ZenTestCase.BaseTestCase import BaseTestCase
from Products.ZenEvents.Event import Event
from Products.ZenModel.DataRoot import DataRoot
from Products.ZenEvents.MySqlEventManager import MySqlEventManager
from Products.Jobber.manager import JobManager
from Products.ZenRelations.ToOneRelat... |
15,890 | apply bundle | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy 2008-2018 (ita)
"""
MacOSX related tools
"""
import os, shutil, platform
from waflib import Task, Utils
from waflib.TaskGen import taskgen_method, feature, after_method, before_method
app_info = '''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "f... |
15,891 | convert to column | # copyright 2016 Camptocamp
# license lgpl-3.0 or later (http://www.gnu.org/licenses/lgpl.html)
import json
from datetime import date, datetime
import dateutil
import lxml
from odoo import fields, models
from odoo.tools.func import lazy
class JobSerialized(fields.Field):
"""Provide the storage for job fields s... |
15,892 | repr html | # 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 https://mozilla.org/MPL/2.0/.
import pandas as pd
import numpy as np
import re
try:
from IPython.core.display import HTML
except:
HTML = None... |
15,893 | enabled | """Provide the query runner for SPARQL Endpoints.
seeAlso: https://www.w3.org/TR/rdf-sparql-query/
"""
import json
import logging
from os import environ
from redash.query_runner import BaseQueryRunner
from redash.utils import json_dumps, json_loads
from . import register
try:
import requests
from cmem.cmem... |
15,894 | state key | # Copyright The Lightning AI team.
#
# 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 wri... |
15,895 | kind | # 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__ =... |
15,896 | test automatic creator | from datetime import datetime
from unittest.mock import Mock, patch
from actstream.actions import follow
from actstream.models import Action, Follow
from actstream.signals import action
from django.contrib.contenttypes.models import ContentType
from rest_framework.test import APIClient
from kitsune.notifications impo... |
15,897 | four branch | """
Non parametric Adaptive Importance Sampling (NAIS)
==================================================
"""
# %%
#
# The objective is to evaluate a probability from the Non parametric Adaptive Importance Sampling (NAIS) technique.
#
# We consider the four-branch function :math:`g : \mathbb{R}^2 \rightarrow \mathbb{R}... |
15,898 | post 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
# --------------------------------... |
15,899 | summary frame | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 19 11:29:18 2014
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
from scipy import stats
import pandas as pd
# this is similar to ContrastResults after t_test, copied and adjusted
class PredictionResults:
"""
Results class for predictions.
Pa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.