id int64 0 300k | label stringlengths 1 74 ⌀ | text stringlengths 4k 8k |
|---|---|---|
8,500 | sample placeholder | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
"""
functions for sampling from hidden state
"""
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
from .util import fc
class Pd:
"""
A particular probability distribution
"""
def flatparam(self):
raise NotImp... |
8,501 | load func callsites | # Copyright 2022 Fuzz Introspector Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
8,502 | test model | #!/usr/bin/env python3
#
# Copyright (c) 2022, NVIDIA CORPORATION. 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
# t... |
8,503 | qapp | import pytest
import logging
import os
from io import BytesIO
import h5py
logger = logging.getLogger(__name__)
def _set_qt_binding(binding):
if binding is not None:
binding = binding.lower()
if binding == "pyqt5":
logger.info("Force using PyQt5")
import PyQt5.QtCore # n... |
8,504 | print base scalar | #* This file is part of the MOOSE framework
#* https://www.mooseframework.org
#*
#* All rights reserved, see COPYRIGHT for full restrictions
#* https://github.com/idaholab/moose/blob/master/COPYRIGHT
#*
#* Licensed under LGPL 2.1, please see LICENSE for details
#* https://www.gnu.org/licenses/lgpl-2.1.html
"""
FParser... |
8,505 | sample | #
# Simple egg-box toy LogPDF.
#
# This file is part of PINTS (https://github.com/pints-team/pints/) which is
# released under the BSD 3-clause license. See accompanying LICENSE.md for
# copyright notice and full license details.
#
import numpy as np
import scipy.stats
from . import ToyLogPDF
class SimpleEggBoxLogPD... |
8,506 | beat | """Same as the table_movie.py but uses Live to update"""
import time
from contextlib import contextmanager
from rich import box
from rich.align import Align
from rich.console import Console
from rich.live import Live
from rich.table import Table
from rich.text import Text
TABLE_DATA = [
[
"May 25, 1977",
... |
8,507 | test episode to timestep batch no return | # 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 ... |
8,508 | set object index |
# 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.
# --------------------------------------------------------------------... |
8,509 | on toggle filter | from typing import Callable, Optional
from PyQt5.QtCore import pyqtSignal, Qt
from PyQt5.QtGui import QCursor
from PyQt5.QtWidgets import QHBoxLayout, QToolButton, QWidget
from electrumsv.i18n import _
from .util import KeyEventLineEdit, read_QIcon
class TableTopButtonLayout(QHBoxLayout):
refresh_signal = pyqt... |
8,510 | 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 . im... |
8,511 | apply | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
from dace import data as dt, symbolic, SDFG
from dace.sdfg import nodes, utils as sdutil
from dace.sdfg.state import SDFGState
from dace.transformation import transformation
import copy
import itertools
class MapUnroll(transformation.SingleSt... |
8,512 | wipe | from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Callable, Optional
import pytest
import ue.hierarchy
from ark.discovery import initialise_hierarchy
from ark.types import DCSC_CLS
from automate.ark import ArkSteamManager
from config import HIERARCHY_FILENAME, ConfigFile, get_global_... |
8,513 | normalize occupancy type | # !/usr/bin/env python
# encoding: utf-8
"""
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors.
See also https://github.com/seed-platform/seed/main/LICENSE.md
"""
import re
import usaddress
# from past.builtins import basestring
from streetaddress import StreetAddressFormat... |
8,514 | as geojson object | # -*- coding: utf-8 -*-
# Copyright 2018, CS GROUP - France, https://www.csgroup.eu/
#
# This file is part of EODAG project
# https://www.github.com/CS-SI/EODAG
#
# 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 c... |
8,515 | plot results | # kincar-flatsys.py - differentially flat systems example
# RMM, 3 Jul 2019
#
# This example demonstrates the use of the `flatsys` module for generating
# trajectories for differnetially flat systems by computing a trajectory for a
# kinematic (bicycle) model of a car changing lanes.
import os
import numpy as np
impor... |
8,516 | is team linked to channel | from __future__ import annotations
from rest_framework import status
from rest_framework.request import Request
from rest_framework.response import Response
from sentry.api.api_publish_status import ApiPublishStatus
from sentry.api.base import region_silo_endpoint
from sentry.integrations.slack.message_builder.discon... |
8,517 | does disjoint intersect coordinates | # (C) Copyright 2005-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... |
8,518 | do search | #!/usr/bin/env python
# Copyright 2000 by Thomas Sicheritz-Ponten.
# Copyright 2016 by Markus Piotrowski.
# All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
# Created: Sun Dec 3 ... |
8,519 | gen | #! /usr/bin/env python3
# Generate test-avx.h from x86.csv
import csv
import sys
from fnmatch import fnmatch
ignore = set(["EMMS", "FEMMS", "FISTTP",
"LDMXCSR", "VLDMXCSR", "STMXCSR", "VSTMXCSR"])
imask = {
'PALIGNR': 0x3f,
'PEXTRB': 0x0f,
'PEXTRW': 0x07,
'PEXTRD': 0x03,
'PEXTRQ': 0x01,
... |
8,520 | rename columns in dct | """CoinGecko helpers"""
__docformat__ = "numpy"
import datetime as dt
import json
import logging
import math
import textwrap
from datetime import timezone
from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
import pandas as pd
import requests
from bs4 import BeautifulSoup
from dateutil import parser
... |
8,521 | test ext get account by name ext | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
8,522 | check library list | """distutils.command.build_clib
Implements the Distutils 'build_clib' command, to build a C/C++ library
that is included in the module distribution and needed by an extension
module."""
# XXX this module has *lots* of code ripped-off quite transparently from
# build_ext.py -- not surprisingly really, as the work req... |
8,523 | test unbinned nll | from iminuit.cost import UnbinnedNLL
from iminuit import Minuit
import numpy as np
import numba as nb
from numba_stats import norm, truncexpon
import pytest
from numpy.testing import assert_allclose
N = [int(x) for x in np.geomspace(10, 1e6, 11)]
N = N[:-1]
def make_data(size, seed=1):
rng = np.random.default_rn... |
8,524 | load shader | 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 =... |
8,525 | generate config | from django.core.management.base import BaseCommand
import sys
import os
from django.conf import settings
from django.template.loader import get_template
from django.core.management import call_command
from django.core.management.utils import get_random_secret_key
from django.utils import timezone
from django.contrib.a... |
8,526 | test security warnings vulnerabilities only | """Unit tests for the SonarQube source."""
from .base import SonarQubeTestCase
class SonarQubeSecurityWarningsTest(SonarQubeTestCase):
"""Unit tests for the SonarQube security warnings collector."""
METRIC_TYPE = "security_warnings"
def setUp(self):
"""Extend to set up SonarQube security warnin... |
8,527 | scores | import json
import logging
from typing import List
from django.contrib.auth.models import User
from django.db.models import QuerySet
from django.shortcuts import get_object_or_404
from rest_framework import viewsets
from rest_framework.decorators import action
from rest_framework.response import Response
from rest_fra... |
8,528 | all archs | from __future__ import annotations
import functools
import platform as platform_module
import re
import sys
from collections.abc import Set
from enum import Enum
from typing import Final, Literal
from ._compat.typing import assert_never
from .typing import PlatformName
PRETTY_NAMES: Final[dict[PlatformName, str]] = ... |
8,529 | get parser | # Copyright (c) Facebook, Inc. and its affiliates.
import argparse
import hashlib
import os
import subprocess
import warnings
import zipfile
from mmf.utils.configuration import Configuration
from mmf.utils.download import copy, decompress, move
from mmf.utils.file_io import PathManager
class HMConverter:
IMAGE_... |
8,530 | test converts dict with primitive values | #!/usr/bin/env python
"""Tests for export converters."""
from absl import app
from grr_response_core.lib.rdfvalues import protodict as rdf_protodict
from grr_response_server.export_converters import rdf_dict
from grr.test_lib import export_test_lib
from grr.test_lib import test_lib
class DictToExportedDictItemsConv... |
8,531 | create post processor input | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
8,532 | test s3 read parquet table | import logging
from typing import Any, Dict
import pyarrow as pa
import pytest
import awswrangler as wr
import awswrangler.pandas as pd
from .._utils import assert_pandas_equals, get_df_dtype_backend, is_pandas_2_x
logging.getLogger("awswrangler").setLevel(logging.DEBUG)
pytestmark = [
pytest.mark.distributed,... |
8,533 | delighted dataset config | from typing import Any, Dict, Generator
import pydash
import pytest
import requests
from requests import Response
from sqlalchemy.orm import Session
from fides.api.cryptography import cryptographic_util
from fides.api.models.connectionconfig import (
AccessLevel,
ConnectionConfig,
ConnectionType,
)
from f... |
8,534 | generic object add attr | # --- BEGIN COPYRIGHT BLOCK ---
# Copyright (C) 2019 Red Hat, Inc.
# All rights reserved.
#
# License: GPL (version 3 or any later version).
# See LICENSE for details.
# --- END COPYRIGHT BLOCK ---
import ldap
from lib389 import ensure_list_str
def _args_to_attrs(args, arg_to_attr):
attrs = {}
for arg in vars... |
8,535 | gen 2d sbp | """
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... |
8,536 | close | import array
import ustruct as struct
import errno as errno_
import stat as stat_
import ffilib
import uos
R_OK = const(4)
W_OK = const(2)
X_OK = const(1)
F_OK = const(0)
O_ACCMODE = 0o0000003
O_RDONLY = 0o0000000
O_WRONLY = 0o0000001
O_RDWR = 0o0000002
O_CREAT = 0o0000100
O_EXCL = 0o0000200
O_NOCTTY = 0o0000400
O_TR... |
8,537 | read line | # 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... |
8,538 | get absolute url | # This file is part of wger Workout Manager <https://github.com/wger-project>.
# Copyright (C) 2013 - 2021 wger Team
#
# wger Workout Manager is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either ... |
8,539 | validate phone number | # Copyright 2023 Google LLC 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 applicabl... |
8,540 | dirac | """ Unit tests for the Dirac interface module
"""
# pylint: disable=no-member, protected-access, missing-docstring
import logging
from pprint import pformat
import pytest
from unittest.mock import MagicMock, call
from DIRAC.Interfaces.API.Dirac import Dirac
from DIRAC import S_OK
logging.basicConfig()
LOG = logging.... |
8,541 | error | # Copyright 2019 Xilinx 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, ... |
8,542 | test get wallet no redirect | import pytest
@pytest.mark.asyncio
async def test_core_views_generic(client):
response = await client.get("/")
assert response.status_code == 200, f"{response.url} {response.status_code}"
# check GET /wallet: wallet info
@pytest.mark.asyncio
async def test_get_wallet(client):
response = await client.get... |
8,543 | switch off traffic lights | #!/usr/bin/env python
# Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
""" This module is responsible for the management of the carla simulation. """... |
8,544 | watch | import aiohttp.web
import copy
import fnmatch
import datetime
from .openmetric import metric_to_openmetric
from ..web.rest import json_response
from ..web.auth import noauth
class MetricWebHandler(object):
def __init__(self, metrics_svc, webapp):
self.MetricsService = metrics_svc
self.App = self.MetricsService... |
8,545 | remove | """Load a model asset in Blender."""
from pathlib import Path
from pprint import pformat
from typing import Dict, List, Optional
import os
import json
import bpy
from openpype.pipeline import get_representation_path
from openpype.hosts.blender.api import plugin
from openpype.hosts.blender.api.pipeline import (
c... |
8,546 | test init sets base url and timeout | ##############################################################################
# Copyright 2016-2021 Rigetti Computing
#
# 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... |
8,547 | test envi msp430 setz | import binascii
import unittest
import vivisect
from envi.tests.msp430 import iadc, iadd, iaddc, iand, ibic, ibis, ibit, ibr
from envi.tests.msp430 import icall, iclr, iclrc, iclrn, iclrz, icmp, idadc
from envi.tests.msp430 import idadd, idec, idecd, iinc, iincd, iinv, ijumps
from envi.tests.msp430 import imov, inop, ... |
8,548 | uses systemd | # 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
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be usefu... |
8,549 | test warning with env special chars | from python.lib.testcase import KphpServerAutoTestCase
class TestJsonLogsWarnings(KphpServerAutoTestCase):
@classmethod
def extra_class_setup(cls):
cls.kphp_server.ignore_log_errors()
def test_warning_no_context(self):
resp = self.kphp_server.http_post(
json=[
... |
8,550 | with process exit teardown | # MIT License
#
# Copyright (c) 2015-2022 Iakiv Kramarenko
#
# 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, modif... |
8,551 | data sources | """
convertnum_bcs_to_nod
=====================
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 PinSp... |
8,552 | create slots | # 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... |
8,553 | test montage grid custom gray | from skimage._shared import testing
from skimage._shared.testing import assert_equal, assert_array_equal
import numpy as np
from skimage.util import montage
def test_montage_simple_gray():
n_images, n_rows, n_cols = 3, 2, 3
arr_in = np.arange(n_images * n_rows * n_cols, dtype=float)
arr_in = arr_in.resha... |
8,554 | get image | from castle.cms import defaults
from castle.cms.tiles.base import BaseTile
from castle.cms.widgets import FocalPointSelectFieldWidget
from castle.cms.widgets import ImageRelatedItemFieldWidget
from castle.cms.widgets import RelatedItemFieldWidget
from plone.autoform import directives as form
from plone.registry.interfa... |
8,555 | setup | # Copyright 2018 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... |
8,556 | validate dataset settings | # Copyright 2021-present, the Recognai S.L. 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 la... |
8,557 | stop listener | '''
setup a listening TCP socket for forwarding u-center connections to a GPS
via MAVLink serial-control
'''
from MAVProxy.modules.lib import mp_module
from MAVProxy.modules.lib import mp_settings
from pymavlink import mavutil
import socket
import time
import errno
class UcenterModule(mp_module.MPModule):
def __... |
8,558 | test search xmlresolving | """Module grouping tests for the sondering search module."""
import datetime
import pandas as pd
from owslib.fes2 import PropertyIsEqualTo
from pydov.search.sondering import SonderingSearch
from pydov.types.fields import ReturnFieldList
from pydov.types.sondering import Sondering
from tests.abstract import AbstractTe... |
8,559 | test map replace | import os
import tempfile
from django.core.management import call_command
from django.test import TestCase
from kolibri_content import models as kolibri_content_models
from kolibri_content.router import cleanup_content_database_connection
from kolibri_content.router import get_active_content_database
from kolibri_cont... |
8,560 | test simple job no warnings | import warnings
from datetime import datetime
import pytest
from dagster import (
DagsterInvariantViolationError,
Field,
StringSource,
execute_job,
graph,
job,
op,
reconstructable,
static_partitioned_config,
)
from dagster._core.storage.tags import PARTITION_NAME_TAG
from dagster._c... |
8,561 | test path when unsupported | from typing import Any
import pytest
from aiohttp import web
def test_entry_func_empty(mocker: Any) -> None:
error = mocker.patch("aiohttp.web.ArgumentParser.error", side_effect=SystemExit)
argv = [""]
with pytest.raises(SystemExit):
web.main(argv)
error.assert_called_with("'entry-func' no... |
8,562 | test verified course user already upgraded | """
Tests for course verification sock
"""
from unittest import mock
import ddt
from django.urls import reverse
from edx_toggles.toggles.testutils import override_waffle_flag
from common.djangoapps.course_modes.models import CourseMode
from lms.djangoapps.commerce.models import CommerceConfiguration
from lms.django... |
8,563 | container name error | # -*- coding: utf-8 -*-
"""
LxcInfo command module.
"""
__author__ = 'Piotr Frydrych, Marcin Usielski'
__copyright__ = 'Copyright (C) 2019-2020, Nokia'
__email__ = 'piotr.frydrych@nokia.com, marcin.usielski@nokia.com'
from moler.cmd.unix.genericunix import GenericUnixCommand
from moler.exceptions import CommandFailu... |
8,564 | total unique users | from . import db
from openlibrary.utils.dateutil import DATE_ONE_MONTH_AGO, DATE_ONE_WEEK_AGO
class Booknotes(db.CommonExtras):
TABLENAME = "booknotes"
PRIMARY_KEY = ["username", "work_id", "edition_id"]
NULL_EDITION_VALUE = -1
ALLOW_DELETE_ON_CONFLICT = False
@classmethod
def summary(cls) -... |
8,565 | firefox 67 0 build1 | import json
from copy import deepcopy
from pathlib import Path
import pytest
from hypothesis import settings
from auslib.global_state import dbo
from auslib.util.data_structures import deep_dict, infinite_defaultdict
# Disable hypothesis testing deadlines
settings.register_profile("ci", deadline=None)
settings.load_... |
8,566 | change to repo root dir | ############################################################################################################################################
# This script is used to sync 3rd party dependencies from `.\sdk\spring\spring_boot_SPRING_BOOT_VERSION_managed_external_dependencies.txt`
# to `eng/versioning/external_dependenci... |
8,567 | test deterministic gradients case | # 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... |
8,568 | names | # 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... |
8,569 | test add line | import numpy
from UM.Math.Color import Color
from UM.Math.Vector import Vector
from UM.Mesh.MeshBuilder import MeshBuilder
from UM.Mesh.MeshData import MeshType
def test_addVertexWithNormal():
builder = MeshBuilder()
builder.addVertexWithNormal(10, 20, 30, -1, -2, -3)
assert builder.getVertex(0)[0] == 1... |
8,570 | test api delegate | import unittest
from unittest.mock import patch
import requests_mock
from xcube.core.gen2.request import CubeGeneratorRequest
from xcube.core.gen2.progress import ApiProgressCallbackObserver
from xcube.core.gen2.progress import TerminalProgressCallbackObserver
from xcube.core.gen2.progress import _ThreadedProgressObs... |
8,571 | test callcenter fixture format | from collections import OrderedDict
from datetime import date, datetime, time, timedelta
from xml.etree import cElementTree as ElementTree
from django.test import SimpleTestCase
from casexml.apps.case.tests.util import check_xml_line_by_line
from casexml.apps.phone.models import (
OTARestoreCommCareUser,
OTAR... |
8,572 | devel | pkgname = "ffmpeg"
pkgver = "6.0"
pkgrel = 3
build_style = "configure"
configure_args = [
"--prefix=/usr",
"--enable-shared",
"--enable-static",
"--enable-gpl",
"--enable-version3",
"--enable-runtime-cpudetect",
"--enable-openssl",
"--enable-librtmp",
"--enable-postproc",
"--enab... |
8,573 | cleanup | #
# lisp-join.py
#
# This proggram is part of the lispers.net apps release. It is not built
# with the lispers.net LISP subsystem and the source is provided publicly.
#
# Open a socket to join a multicast group. There is no I/O that happens on
# the socket used in this program. This is meant to be used with multicast
#... |
8,574 | test abs complex | # Data Parallel Control (dpctl)
#
# Copyright 2020-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/LICE... |
8,575 | validate jobs | import json
import os
import sys
from pathlib import Path
import requests
import yaml
from shapely.geometry import MultiPolygon, Polygon, shape
from hyp3_api import CMR_URL
from hyp3_api.util import get_granules
DEM_COVERAGE = None
DEM_COVERAGE_LEGACY = None
class GranuleValidationError(Exception):
pass
with... |
8,576 | handle threshold form | #
# Copyright 2011 Uninett AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope tha... |
8,577 | get workspace by legacy id | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from ..uac import UACService_pb2 as uac_dot_UACService__pb2
from ..uac import Workspace_pb2 as uac_dot_Workspace__pb2
class WorkspaceServiceStub(object):
# missing associated documentation comment in .proto file
pass
def __init_... |
8,578 | str upper | from __future__ import annotations
import abc
from collections.abc import Callable # noqa: PDF001
import re
from typing import TYPE_CHECKING
import numpy as np
from pandas._typing import Scalar
if TYPE_CHECKING:
from pandas import Series
class BaseStringArrayMethods(abc.ABC):
"""
Base class for exten... |
8,579 | test libref examples | # test_getopt.py
# David Goodger <dgoodger@bigfoot.com> 2000-08-19
from test.test_support import verbose, run_doctest, run_unittest, EnvironmentVarGuard
import unittest
import getopt
sentinel = object()
class GetoptTests(unittest.TestCase):
def setUp(self):
self.env = EnvironmentVarGuard()
if "P... |
8,580 | hitag2 init | #!/usr/bin/env python3
"""
HITAG2 cipher
Implemented by Aram Verstegen
"""
import random
def i4(x, a, b, c, d):
return (((x >> a) & 1)*8)+((x >> b) & 1)*4+((x >> c) & 1)*2+((x >> d) & 1)
def f20_4(state):
return ((0x3c65 >> i4(state,34,43,44,46)) & 1)
def f20_3(state):
return (( 0xee5 >> i4(state,28,29... |
8,581 | internal init | # 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... |
8,582 | toys repository | import warnings
from dagster import ExperimentalWarning
# squelch experimental warnings since we often include experimental things in toys for development
warnings.filterwarnings("ignore", category=ExperimentalWarning)
import pendulum
from dagster import AssetMaterialization, Output, graph, load_assets_from_modules,... |
8,583 | modify postdata | import random
import string
from typing import TYPE_CHECKING, Any, cast
from django.conf import settings
from django.http import HttpRequest, HttpResponse, HttpResponseRedirect
from django.views.decorators.csrf import csrf_exempt
from confirmation.models import Confirmation, create_confirmation_link
from zerver.conte... |
8,584 | test component data pprint | # ___________________________________________________________________________
#
# Pyomo: Python Optimization Modeling Objects
# Copyright (c) 2008-2022
# National Technology and Engineering Solutions of Sandia, LLC
# Under the terms of Contract DE-NA0003525 with National Technology and
# Engineering Solutions of ... |
8,585 | to dict | # coding: utf-8
"""
Bacalhau API
This page is the reference of the Bacalhau REST API. Project docs are available at https://docs.bacalhau.org/. Find more information about Bacalhau at https://github.com/bacalhau-project/bacalhau. # noqa: E501
OpenAPI spec version: ${PYPI_VERSION}
Contact: team@bacal... |
8,586 | fetch new apple id | """
Management command to exchange apple transfer identifiers with Apple ID of the
user for new migrated team.
"""
import logging
import requests
import time
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from django.db.models import Q
import jwt
from social_djang... |
8,587 | test init | """Tests for pymatgen.io.wannier90."""
from __future__ import annotations
import numpy as np
import pytest
from numpy.testing import assert_allclose
from pytest import approx
from pymatgen.io.wannier90 import Unk
from pymatgen.util.testing import TEST_FILES_DIR, PymatgenTest
class TestUnk(PymatgenTest):
_multi... |
8,588 | all filenames | """Pytest configuration."""
from __future__ import annotations
from pathlib import Path
from typing import Callable
import numpy as np
import pytest
_dirnames = (
"cubic",
"hexagonal",
"monoclinic",
"orthorhombic",
"tetragonal",
"triclinic",
"trigonal",
"distorted",
"virtual_struc... |
8,589 | test create update resources | import json
import mock
import pytest
import ckan.tests.factories as factories
import ckan.model as model
import ckan.plugins.toolkit as tk
from ckanext.hdx_org_group.helpers.static_lists import ORGANIZATION_TYPE_LIST
_get_action = tk.get_action
ValidationError = tk.ValidationError
SYSADMIN_USER = 'some_sysadmin_us... |
8,590 | region | # 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... |
8,591 | gcc preprocess | # Copyright 2017 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
'''
This module provides classes which implement header file preprocessing.
'''
import logging
import ntpath
import os
import subprocess
import tempfile
imp... |
8,592 | get log session id | import collections
import contextlib
import functools
import logging
import logging.handlers
import os
import sys
import threading
import uuid
import warnings
from typing import Callable, Deque, Iterator, List, Optional, Union
import loguru
from loguru import logger
from flexget import __version__
# A level more det... |
8,593 | test bib | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
from numpy.testing import assert_allclose
import astropy.units as u
from astropy.time import Time
import warnings
from ..orbit import Orbit, QueryError
from ..names import TargetNameParseError
from ... import bib
try:
import pyoorb
ex... |
8,594 | point inside polygon | from __future__ import print_function
from __future__ import division
# Code to determine what facet a source is in
from builtins import range
from builtins import object
from past.utils import old_div
from astropy.io import fits
from astropy.table import Table
from astropy import units as u
from astropy.coordinates i... |
8,595 | mutual information | #!/usr/bin/python
##################
# correlationCoeffs.py
#
# Copyright David Baddeley, 2010
# d.baddeley@auckland.ac.nz
#
# 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 ... |
8,596 | subprocess cluster | from __future__ import annotations
import abc
import asyncio
import copy
import json
import logging
import math
from typing import Any
import psutil
import toolz
from dask.system import CPU_COUNT
from distributed.compatibility import WINDOWS
from distributed.deploy.spec import ProcessInterface, SpecCluster
from dis... |
8,597 | ws main | import json
import threading
import time
from . import get_suitable_downloader
from .common import FileDownloader
from .external import FFmpegFD
from ..networking import Request
from ..utils import DownloadError, WebSocketsWrapper, str_or_none, try_get
class NiconicoDmcFD(FileDownloader):
""" Downloading niconic... |
8,598 | get u edge | import numpy as nm
import pytest
from sfepy import data_dir
from sfepy.base.base import assert_
import sfepy.base.testing as tst
filename_mesh = data_dir + '/meshes/2d/square_unit_tri.mesh'
def get_pars(ts, coors, mode=None, extra_arg=None,
equations=None, term=None, problem=None, **kwargs):
if mode... |
8,599 | test sqrtbathtub | # bluemira is an integrated inter-disciplinary design tool for future fusion
# reactors. It incorporates several modules, some of which rely on other
# codes, to carry out a range of typical conceptual fusion reactor design
# activities.
#
# Copyright (C) 2021-2023 M. Coleman, J. Cook, F. Franza, I.A. Maione, S. McInto... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.