blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 4 721 | content_id stringlengths 40 40 | detected_licenses listlengths 0 57 | license_type stringclasses 2
values | repo_name stringlengths 5 91 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 321
values | visit_date timestamp[ns]date 2016-08-12 09:31:09 2023-09-06 10:45:07 | revision_date timestamp[ns]date 2010-09-28 14:01:40 2023-09-06 06:22:19 | committer_date timestamp[ns]date 2010-09-28 14:01:40 2023-09-06 06:22:19 | github_id int64 426 681M | star_events_count int64 101 243k | fork_events_count int64 0 110k | gha_license_id stringclasses 23
values | gha_event_created_at timestamp[ns]date 2012-06-28 18:51:49 2023-09-14 21:59:16 ⌀ | gha_created_at timestamp[ns]date 2008-02-11 22:55:26 2023-08-10 11:14:58 ⌀ | gha_language stringclasses 147
values | src_encoding stringclasses 26
values | language stringclasses 2
values | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10.2M | extension stringclasses 115
values | filename stringlengths 3 113 | content stringlengths 6 10.2M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
afc19e5f8c5dcb4ccd636482cd5d8b3bfc1766b3 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /DQMOffline/JetMET/python/jetMETDQMOfflineSource_cff.py | 4974943039a40e4de92a300d17bbcfb95adee478 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 6,327 | py | jetMETDQMOfflineSource_cff.py | import FWCore.ParameterSet.Config as cms
from DQMOffline.JetMET.metDQMConfig_cff import *
from DQMOffline.JetMET.jetAnalyzer_cff import *
from DQMOffline.JetMET.pfCandidateDQMConfig_cfi import *
from DQMOffline.JetMET.SUSYDQMAnalyzer_cfi import *
from DQMOffline.JetMET.goodOfflinePrimaryVerticesDQM_cfi import... |
9ce83fc4ff818af556914064f6bca3087e6b2c2f | 5917ffcb780cfcfe4e2b87b11fca1f68f387b239 | /plenum/server/request_handlers/utils.py | b528e66d6670932213891c0f7d1ceee8ce79ddc6 | [
"Apache-2.0"
] | permissive | hyperledger/indy-plenum | 6ff9f705af80dfa28d4cb92743683f78bb937aa3 | 698b9500ad3a7a15993af72a1c35a406c5673262 | refs/heads/main | 2023-08-29T01:32:26.384729 | 2023-06-20T16:42:11 | 2023-06-20T16:42:11 | 51,585,028 | 171 | 420 | Apache-2.0 | 2023-06-20T16:42:14 | 2016-02-12T12:03:16 | Python | UTF-8 | Python | false | false | 1,818 | py | utils.py | from _sha256 import sha256
from common.serializers.serialization import domain_state_serializer
from plenum.common.constants import STEWARD, ROLE, TRUSTEE, TXN_TYPE, IDENTIFIER, TARGET_NYM, VERKEY
from plenum.common.types import OPERATION
LAST_SEQ_NO = "lsn"
VALUE = "val"
LAST_UPDATE_TIME = "lut"
def is_steward(sta... |
09f155c35322eb7bdeabce3b8a935c3880d1fbb3 | b60686a2e351a756f249e0d9faab8fe154a08f11 | /tests/operation/test_dataflow.py | aadce6a35b91509250472d9d1cc1cda58a037112 | [
"MIT",
"LicenseRef-scancode-generic-export-compliance"
] | permissive | intel/dffml | 86483b47229b9b62c9f8dfef51491aa02563347e | 7d381bf67a72fe1ecb1012393d5726085564cb0e | refs/heads/main | 2023-08-28T00:35:04.219193 | 2023-06-06T18:29:16 | 2023-06-06T18:29:16 | 149,512,216 | 237 | 204 | MIT | 2023-05-05T15:39:35 | 2018-09-19T21:06:34 | Python | UTF-8 | Python | false | false | 4,629 | py | test_dataflow.py | import copy
from dffml.df.types import DataFlow, Input
from dffml.df.memory import MemoryOrchestrator
from dffml.operation.dataflow import run_dataflow, RunDataFlowConfig
from dffml.operation.output import GetSingle
from dffml.util.asynctestcase import AsyncTestCase
from ..test_df import DATAFLOW, add, mult, parse_li... |
b2b45bc55e251d5bb7317e3707052fcd785ffa02 | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /examples/docs_snippets/docs_snippets/guides/dagster/using_environment_variables_and_secrets/repository_v2.py | dc8c9f7ca2febf1e10cf4b298b4807c23f21c840 | [
"Apache-2.0"
] | permissive | dagster-io/dagster | 6adb5deee8bcf3ea1866a6a64f2ed81e1db5e73a | fe21995e0402878437a828c6a4244025eac8c43b | refs/heads/master | 2023-09-05T20:46:08.203794 | 2023-09-05T19:54:52 | 2023-09-05T19:54:52 | 131,619,646 | 8,565 | 1,154 | Apache-2.0 | 2023-09-14T21:57:37 | 2018-04-30T16:30:04 | Python | UTF-8 | Python | false | false | 2,049 | py | repository_v2.py | import os
from dagster_snowflake_pandas import (
SnowflakePandasIOManager,
snowflake_pandas_io_manager,
)
from development_to_production.assets import comments, items, stories
from dagster import Definitions, EnvVar
# start_new
# __init__.py
resources = {
"local": {
"snowflake_io_manager": Snowf... |
1d5af9e82a475cef9258caadc9ec789b592a3b53 | bed34365a9dab825fd9f4a4ff1b0863f441266ac | /neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py | 515fe9fcd8dfff82674912d4462749594212aefa | [
"Apache-2.0"
] | permissive | openstack/neutron | 0913ee3cd69d5bdb9c10aa084d4e1803abee320c | dde31aae392b80341f6440eb38db1583563d7d1f | refs/heads/master | 2023-08-31T13:09:41.831598 | 2023-08-31T11:37:30 | 2023-08-31T11:37:30 | 2,400,289 | 1,174 | 1,325 | Apache-2.0 | 2022-06-29T08:00:05 | 2011-09-16T16:04:08 | Python | UTF-8 | Python | false | false | 46,624 | py | linuxbridge_neutron_agent.py | #!/usr/bin/env python
# Copyright 2012 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... |
d1614d26c9a3939fb60dd703fb22eeee13fb07ee | 6a017c87a1c3e016de5e1704d23d1d2034fab41c | /src/coffea/lookup_tools/dense_evaluated_lookup.py | de5ab280e082986715d6cf9593e45db5cfb1198d | [
"BSD-3-Clause"
] | permissive | CoffeaTeam/coffea | 53997aefbccf583cc901718b5c639a4b4535dbcd | a33fc173f3bf2be307bac6517e624fc6ce0c4c3e | refs/heads/master | 2023-08-10T12:36:49.238010 | 2023-08-02T02:57:18 | 2023-08-02T02:57:18 | 159,673,139 | 116 | 100 | BSD-3-Clause | 2023-09-12T20:32:08 | 2018-11-29T13:47:57 | Jupyter Notebook | UTF-8 | Python | false | false | 3,714 | py | dense_evaluated_lookup.py | from copy import deepcopy
import dask
import numba
import numpy
from coffea.lookup_tools.lookup_base import lookup_base
# methods for dealing with b-tag SFs
@numba.jit(forceobj=True)
def numba_apply_1d(functions, variables):
out = numpy.empty(variables.shape)
for i in range(functions.size):
out[i] =... |
bf4c8854670337e123a74a6c895c8c6d7e4bdd5f | 07a9c358e9c03a20ddbbd16413666f1f81d603a1 | /vertica_python/tests/integration_tests/test_loadbalance.py | cb590c5ad8e5f2b7c07284bb97cf38e23cf97267 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | vertica/vertica-python | ecffe2972fc296f107a547ce408655549d14359b | 1b4d5eeb8bb7c038b57634c0951195b813cb1130 | refs/heads/master | 2023-09-01T05:46:23.987078 | 2023-08-11T03:52:08 | 2023-08-11T03:52:08 | 11,957,229 | 183 | 114 | Apache-2.0 | 2023-06-23T15:22:19 | 2013-08-07T18:25:15 | Python | UTF-8 | Python | false | false | 13,199 | py | test_loadbalance.py | # Copyright (c) 2018-2023 Open Text.
# Copyright (c) 2018 Uber Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
bad6c3a1000cf587b8df29944ff3e8a78c52f6d7 | 4d695d935dcf4337996e025f2d9e59141add7c0e | /tests/test_downloader.py | 30ddb9337a33ada61bcc9e16e49b0dced76f9927 | [
"MIT"
] | permissive | taroved/pol | f5ef9de8e6680e4ad312aa144f9a3ebd87c51189 | 1e33abcad5f6ee0581ff1f22309b1b8f81e76c33 | refs/heads/master | 2023-03-10T09:30:43.579986 | 2023-02-21T13:37:47 | 2023-02-21T13:37:47 | 64,079,843 | 381 | 99 | MIT | 2022-12-17T18:29:32 | 2016-07-24T18:32:26 | CSS | UTF-8 | Python | false | false | 1,825 | py | test_downloader.py | from __future__ import print_function
import os
from twisted.web.server import Site
from twisted.web.static import File
from twisted.internet import reactor, defer, endpoints
from twisted.logger import Logger
from pol.log import LogHandler
from pol.server import Server
class MFTests(object):
def __init__(self... |
105b648b8ec2f1fc9e7857a143be9ca13fffed5a | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-security/ranger/intg/src/main/python/apache_ranger/model/ranger_policy.py | 3cd916a31ebd30501f66a76f4a986eaabc1fc800 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"WTFPL",
"GPL-2.0-only"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 7,496 | py | ranger_policy.py | #!/usr/bin/env python
#
# 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 "Li... |
ff6dba40993fff9341efa483dca943abb0ac2fe8 | 9b1eda0abdc5dea7c6e9695ff4e1098abe0a708b | /tests/snapshot_tests/snapshot_apps/scroll_to_center.py | 7a81a9b7f11f2e62b64650d7983a5858daac859d | [
"MIT"
] | permissive | Textualize/textual | b8cf4b5d18069fccc7623b3116436f479e1ef446 | b74ac1e47fdd16133ca567390c99ea19de278c5a | refs/heads/main | 2023-08-30T21:40:21.563823 | 2023-08-30T10:18:27 | 2023-08-30T10:18:27 | 355,959,597 | 14,818 | 588 | MIT | 2023-09-14T20:22:02 | 2021-04-08T15:24:47 | Python | UTF-8 | Python | false | false | 1,091 | py | scroll_to_center.py | from textual.app import App, ComposeResult
from textual.containers import HorizontalScroll, VerticalScroll
from textual.widgets import Label
class MyApp(App[None]):
AUTO_FOCUS = ""
CSS = """
VerticalScroll {
border: round $primary;
}
#vertical {
height: 21;
}
HorizontalScro... |
f987b81f6b98aa7fcec3d72ba4892aee76ae3e4f | acf7457d3a799cb9bff12686d2d616688bcd4b5b | /packages/python/plotly/plotly/validators/layout/yaxis/__init__.py | abb416fa1675f241825970adb55db6f48695997e | [
"MIT"
] | permissive | plotly/plotly.py | f4f61639f08160f16195efc95b5901dc5a937346 | 975a704074f01c078e0fdfa32bdf17130bf89e69 | refs/heads/master | 2023-09-06T06:15:08.340035 | 2023-08-24T12:28:14 | 2023-08-24T12:28:14 | 14,579,099 | 14,751 | 2,989 | MIT | 2023-09-08T19:55:32 | 2013-11-21T05:53:08 | Python | UTF-8 | Python | false | false | 8,393 | py | __init__.py | import sys
from typing import TYPE_CHECKING
if sys.version_info < (3, 7) or TYPE_CHECKING:
from ._zerolinewidth import ZerolinewidthValidator
from ._zerolinecolor import ZerolinecolorValidator
from ._zeroline import ZerolineValidator
from ._visible import VisibleValidator
from ._uirevision import U... |
c4a401b7c363d86c174de93a19fde75984f8aebb | 1742b6719b988e5519373002305e31d28b8bd691 | /sdk/python/pulumi_aws/costexplorer/anomaly_subscription.py | 38ff862ae347a4df94419dd1408273898ddb799a | [
"MPL-2.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-aws | 4f7fdb4a816c5ea357cff2c2e3b613c006e49f1a | 42b0a0abdf6c14da248da22f8c4530af06e67b98 | refs/heads/master | 2023-08-03T23:08:34.520280 | 2023-08-01T18:09:58 | 2023-08-01T18:09:58 | 97,484,940 | 384 | 171 | Apache-2.0 | 2023-09-14T14:48:40 | 2017-07-17T14:20:33 | Java | UTF-8 | Python | false | false | 37,086 | py | anomaly_subscription.py | # 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... |
a3a7ed3a60c88354ddb5e02d51a2e87792ffaf4d | 72f37781f43fe688ee6560c6531f0cd90e3dbc93 | /examples/ignore.py | 29ed7e5037c0c6b9a3d55855faece06e408d3e0e | [
"MIT"
] | permissive | magmax/python-inquirer | 7ea923f2fce6041fba06f5265559b8179a1ed3e2 | 50e906304ff89a2da8cdabebfad9dc7a26910dad | refs/heads/main | 2023-09-04T04:33:59.846584 | 2023-09-03T11:11:10 | 2023-09-03T11:11:18 | 19,372,146 | 901 | 131 | MIT | 2023-09-14T13:00:26 | 2014-05-02T10:23:43 | Python | UTF-8 | Python | false | false | 550 | py | ignore.py | import os
import sys
from pprint import pprint
sys.path.append(os.path.realpath("."))
import inquirer # noqa
questions = [
inquirer.Text("name", message="What's your name?"),
inquirer.Text(
"surname", message="What's your surname, {name}?", ignore=lambda x: x["name"].lower() == "anonymous"
),
... |
f179e5a9307e6461bcd7c90b368f3369d29b9bc1 | 23652304566b1869ca65b95b116ee43d16e134f3 | /h/views/main.py | 98ed5b5668cf33b4ec47ee4a6b5b9335e8a63a4a | [
"BSD-2-Clause",
"BSD-3-Clause",
"BSD-2-Clause-Views"
] | permissive | hypothesis/h | 29399a26990856c336b05022e827541dd8aeedab | 232446d776fdb906d2fb253cf0a409c6813a08d6 | refs/heads/main | 2023-08-30T16:21:33.754658 | 2023-08-30T09:26:50 | 2023-08-30T09:40:48 | 3,910,945 | 2,558 | 452 | BSD-2-Clause | 2023-09-14T11:25:06 | 2012-04-02T19:56:59 | Python | UTF-8 | Python | false | false | 3,660 | py | main.py | """
Core application views.
Important views which don't form part of any other major feature package.
"""
import logging
from pyramid import httpexceptions, response
from pyramid.view import view_config
from h.exceptions import InvalidUserId
from h.security import Permission
from h.util.user import split_user
from ... |
21ee24c330453ce83a0433e849061f327225e2ea | 0aa0c78a6fcea85cf0ccc19c9b5eed25b1f71e18 | /storm_analysis/test/test_hdf5_to_bin.py | 9ca85473effecc7c09ffea61c44467cec582827d | [] | no_license | ZhuangLab/storm-analysis | 5f61c3cb63d140fed43e64b1db0865dc0cfb2f62 | 26e4f8038180c3cf29909ed126daa9046f7cd8fc | refs/heads/master | 2023-05-02T22:35:39.392231 | 2023-04-22T17:55:35 | 2023-04-22T17:55:35 | 9,655,861 | 102 | 81 | null | 2020-05-28T17:47:43 | 2013-04-24T19:25:56 | Python | UTF-8 | Python | false | false | 2,304 | py | test_hdf5_to_bin.py | #!/usr/bin/env python
"""
Tests of the HDF5 to bin converter, which is probably going to be
important, at least for a while.
"""
import numpy
import storm_analysis
import storm_analysis.sa_library.sa_h5py as saH5Py
import storm_analysis.sa_library.readinsight3 as readinsight3
import storm_analysis.sa_utilities.hdf5_t... |
a2928d3db4dcea8848b609f88958650781812800 | e441a2f416c83f04889ecd43d6b6bdcf5172b287 | /web3/utils/caching.py | 9ba290b071b6438a3594083bdff105233cbb53c5 | [
"MIT"
] | permissive | ethereum/web3.py | f8d66eefaa84d30fa51a0978d1d1c44c6807b355 | 76da2146267fa03760f35c33ca8b9a96d9e24835 | refs/heads/main | 2023-08-31T18:34:30.144026 | 2023-08-29T15:43:25 | 2023-08-29T15:43:25 | 56,251,096 | 4,403 | 1,680 | MIT | 2023-09-14T20:46:08 | 2016-04-14T15:59:35 | Python | UTF-8 | Python | false | false | 1,662 | py | caching.py | from collections import (
OrderedDict,
)
from typing import (
Any,
Dict,
Optional,
Tuple,
)
class SimpleCache:
def __init__(self, size: int = 100):
self._size = size
self._data: OrderedDict[str, Any] = OrderedDict()
def cache(self, key: str, value: Any) -> Tuple[Any, Dict[... |
77017a0547ba854469884826a1ce1bc3e2a7a8e8 | fae16a539b7c1b0525aab40ddaeee3e451fc9b74 | /tests/integration/training/test_spacy.py | 4268240668e0784375529da6e7e1fbe293fa2a80 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | argilla-io/argilla | a6b45f7f64e9db82f6d9a61771d758ffbb3dab4a | 7c1b2368b444b7b7a281d37ad51bcb2d8e92acf5 | refs/heads/develop | 2023-09-04T03:58:05.914619 | 2023-09-01T15:58:31 | 2023-09-01T15:58:31 | 362,500,938 | 1,085 | 122 | Apache-2.0 | 2023-09-14T15:31:07 | 2021-04-28T14:37:42 | Python | UTF-8 | Python | false | false | 4,892 | py | test_spacy.py | # 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... |
f20c56af8990c87ac8cde560ae6eebfc19ba83b2 | 2142d4023bce901857ce33e9c46919bf78b06779 | /baselines/EMNLP2019/general_inputter.py | ce6e9905aa7905839a717bf5d01374c211f9363c | [
"MIT"
] | permissive | diffbot/knowledge-net | 01281e75ba24a68c22a715b39ba93e8febc4b158 | abc4ed3ebb88bfde8c1f02709371324ae6347ba0 | refs/heads/master | 2021-06-10T16:22:20.118879 | 2020-10-01T21:49:40 | 2020-10-01T21:49:40 | 179,616,035 | 260 | 38 | MIT | 2021-05-21T16:01:26 | 2019-04-05T03:55:03 | Python | UTF-8 | Python | false | false | 3,925 | py | general_inputter.py | """Define inputters reading from TFRecord files."""
import tensorflow as tf
from opennmt.inputters.inputter import Inputter
from opennmt.utils import compat
import numpy as np
from collections import defaultdict
import yaml
class Feature:
def __init__(self, name, shape, where):
self.name = name
s... |
d363389c18f337ece9025c64e385d8f2a710ef6e | beab4b9703df6c4e9bda54fada11a6d985ea2c5a | /sanic/server/async_server.py | e2cf4fa19531f956bd05ed5fd48496a2d93cb5fd | [
"MIT"
] | permissive | sanic-org/sanic | d3db62482914061a1f6a8f7d94b6127c2876cb3e | 47215d4635184bdfb1d5cff000d19390f19219ab | refs/heads/main | 2023-09-05T01:04:31.432228 | 2023-08-30T17:03:22 | 2023-08-30T17:03:22 | 59,720,190 | 3,523 | 439 | MIT | 2023-09-14T05:45:11 | 2016-05-26T04:38:22 | Python | UTF-8 | Python | false | false | 3,322 | py | async_server.py | from __future__ import annotations
import asyncio
from typing import TYPE_CHECKING
from sanic.exceptions import SanicException
if TYPE_CHECKING:
from sanic import Sanic
class AsyncioServer:
"""
Wraps an asyncio server with functionality that might be useful to
a user who needs to manage the serve... |
5be9431f813612c19ebcf04c896fcf3c286e377e | d2edafd56e3f407d0a04a7081ba48c1b0f0b8be4 | /lesson6/say_hello.py | 73eead9ae40ead939b514e1d6aa9009223404b11 | [] | no_license | kevinwlu/iot | 65ef29a0e14bb7314100c2f0262dba5ee37b278d | 10e705a46a5ee37106c798d452a5838f09f81c98 | refs/heads/master | 2023-08-18T13:56:24.427109 | 2023-08-17T01:10:10 | 2023-08-17T01:10:10 | 49,343,710 | 164 | 121 | null | 2022-03-26T00:24:46 | 2016-01-09T22:21:30 | Python | UTF-8 | Python | false | false | 541 | py | say_hello.py | # https://github.com/defunkt/pystache
import pystache
print(pystache.render('Hi {{person}}!', {'person': 'Alexa'}))
# Create dedicated view classes to hold view logic
class SayHello(object):
def to(self):
return "World"
hello = SayHello()
# Use template in say_hello.mustache
renderer = pystache.Renderer()... |
c664932c219167f4036e39d679d136ac54c1723e | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /cc/metrics/DEPS | af0091253b97ffde1660969a347711e8a55a2bfc | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 75 | DEPS | include_rules = [
"+device/base/synchronization/one_writer_seqlock.h",
]
| |
18f5126c5e76bd20e50fcc11cd0bb0139621454c | c43b5835b4499f4e6d6fa4efda9546dc67ae0767 | /sfepy/discrete/fem/mappings.py | ebe50de9c12cb5fa0b8a80c7c6c35231d950bf9d | [
"BSD-3-Clause"
] | permissive | sfepy/sfepy | 4b74e7839b5e7b5e8d90e19ab6e90a068fe33df4 | 0c2d1690e764b601b2687be1e4261b82207ca366 | refs/heads/master | 2023-09-04T22:07:28.041123 | 2023-08-28T14:47:50 | 2023-08-28T14:47:50 | 802,525 | 651 | 188 | BSD-3-Clause | 2023-09-12T07:28:19 | 2010-07-28T09:14:41 | Python | UTF-8 | Python | false | false | 8,935 | py | mappings.py | """
Finite element reference mappings.
"""
import numpy as nm
from sfepy import Config
from sfepy.base.base import get_default, output
from sfepy.base.mem_usage import raise_if_too_large
from sfepy.discrete.common.mappings import Mapping, PyCMapping
from sfepy.discrete import PolySpace
from sfepy.linalg.utils import i... |
915590da232d197a41bbaad31c95bf438155be89 | da1500e0d3040497614d5327d2461a22e934b4d8 | /cobalt/black_box_tests/tests/worker_csp_test.py | 9c988e11407e70c6ec62008ff386e70a51cbe88c | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | youtube/cobalt | 34085fc93972ebe05b988b15410e99845efd1968 | acefdaaadd3ef46f10f63d1acae2259e4024d383 | refs/heads/main | 2023-09-01T13:09:47.225174 | 2023-09-01T08:54:54 | 2023-09-01T08:54:54 | 50,049,789 | 169 | 80 | BSD-3-Clause | 2023-09-14T21:50:50 | 2016-01-20T18:11:34 | null | UTF-8 | Python | false | false | 2,732 | py | worker_csp_test.py | # Copyright 2022 The Cobalt 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 ... |
636aa082f5f02e5416edbf9678196b7866c8ccd9 | c703b8ac3b5545857f6c95efa2d61eaf7a664021 | /tests/test_models/test_networks/test_discriminators.py | 6f9523b9f1338fc1c2125b6a0d6574e0f1b57137 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | iPERDance/iPERCore | d29681d229b3098b3517b1abf4f7ea65f579de73 | fcf9a18ffd66bf3fdd3eea4153a3bc4785131848 | refs/heads/main | 2023-07-30T15:04:15.835396 | 2023-04-12T14:21:23 | 2023-04-12T14:21:23 | 313,664,064 | 2,520 | 339 | Apache-2.0 | 2023-05-12T03:26:52 | 2020-11-17T15:36:25 | Python | UTF-8 | Python | false | false | 8,593 | py | test_discriminators.py | # Copyright (c) 2020-2021 impersonator.org authors (Wen Liu and Zhixin Piao). All rights reserved.
import unittest
import torch
import toml
from easydict import EasyDict
from iPERCore.models.networks import discriminators
class TestGenerators(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
... |
206868939aa9732583537b6e110acd3e6b8cb137 | b85e5263563af92ea888ddc74c97785501e4a7bd | /python_examples/mc_chain_lj_module.py | b2ba6031e1ab6d028af501966fd033e3b04f3816 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | Allen-Tildesley/examples | 4e9a2f7bc574d1dd823caceef995d623d5b8255e | 9e71fb31b4eb6421cc1936149e882e7dd47dd927 | refs/heads/master | 2023-09-04T08:44:00.488422 | 2023-09-01T14:32:50 | 2023-09-01T14:32:50 | 32,993,797 | 255 | 109 | CC0-1.0 | 2022-08-20T14:12:51 | 2015-03-27T15:28:35 | Fortran | UTF-8 | Python | false | false | 12,779 | py | mc_chain_lj_module.py | #!/usr/bin/env python3
# mc_chain_lj_module.py
#------------------------------------------------------------------------------------------------#
# This software was written in 2016/17 #
# by Michael P. Allen <m.p.allen@warwick.ac.uk>/<m.p.allen@bristol.ac.uk> ... |
c9994b5aea9e56a98dca4c7209c6d2d99247cbfa | ae33222bcdecc375ff8800f0c6fee70d90120f60 | /tests/integration/test_greenlet.py | 4090aae27959a1b74496422e60a51b98cd1db852 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-free-unknown"
] | permissive | bloomberg/memray | 43d5296c6ff5f73b527d45468d4b28e74e92c561 | 427b60840cb406d011a650ce142845897cb542e2 | refs/heads/main | 2023-08-17T03:49:51.354674 | 2023-08-16T18:06:01 | 2023-08-16T19:43:46 | 479,491,550 | 10,817 | 343 | Apache-2.0 | 2023-09-13T20:02:39 | 2022-04-08T18:04:11 | Python | UTF-8 | Python | false | false | 5,035 | py | test_greenlet.py | import subprocess
import sys
import textwrap
from pathlib import Path
import pytest
from memray import AllocatorType
from memray import FileReader
from tests.utils import filter_relevant_allocations
pytestmark = pytest.mark.skipif(
sys.version_info >= (3, 12), reason="Greenlet does not yet support Python 3.12"
)... |
589d726c02b7728e2b8de60b9418d6237f4ba64c | e96889bdfc11b1fefe00b23ca3ef0944f6cce3e6 | /flask-backend/run.py | 7c5a0adfe4dfa449ce5c2f90173cca90f52a6799 | [
"Apache-2.0"
] | permissive | scorelab/OpenMF | d8decd210bc46336a3a9d4b74d692e32f9946e2e | f26a5d853c783029b626f558ec3b1827c3212cf7 | refs/heads/master | 2023-04-13T13:41:00.787410 | 2022-09-05T07:18:36 | 2022-09-05T07:18:36 | 126,325,350 | 118 | 101 | Apache-2.0 | 2023-07-03T13:10:08 | 2018-03-22T11:30:00 | JavaScript | UTF-8 | Python | false | false | 351 | py | run.py | """
Flask CLI/Application entry point.
"""
import sys
import os
from dotenv import load_dotenv
from api import create_app
# Load dotenv variables
sys.path.insert(0,os.getcwd())
dotenv_path = os.path.join(os.path.dirname(__file__), ".env")
if os.path.exists(dotenv_path):
load_dotenv(dotenv_path)
app = create_app(... |
d7eb2eedae67352c42d03a4c2cc3f657bd34fad9 | 2dd26e031162e75f37ecb1f7dd7f675eeb634c63 | /nemo/collections/nlp/modules/common/megatron/utils.py | ca7fcbfef9050d25494b5435d3f88fdd0dfeb035 | [
"Apache-2.0"
] | permissive | NVIDIA/NeMo | 1b001fa2ae5d14defbfd02f3fe750c5a09e89dd1 | c20a16ea8aa2a9d8e31a98eb22178ddb9d5935e7 | refs/heads/main | 2023-08-21T15:28:04.447838 | 2023-08-21T00:49:36 | 2023-08-21T00:49:36 | 200,722,670 | 7,957 | 1,986 | Apache-2.0 | 2023-09-14T18:49:54 | 2019-08-05T20:16:42 | Python | UTF-8 | Python | false | false | 14,290 | py | utils.py | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
3aa9d9bdcc219914c70e2137bbcdcd94895feb3a | 6378cf2055d043671428feed9c79a5e85e14f30c | /tests/b906.py | 648489cc94d50d865ffe2ff6a834acdbdd76e053 | [
"MIT"
] | permissive | PyCQA/flake8-bugbear | e9aa3d8f71b4a70786bc7ff14da2c6f7622dbdf5 | 954e51eb61c20ca41a1920d62845f1fc3b812fbc | refs/heads/main | 2023-09-04T19:27:18.937203 | 2023-09-02T22:56:14 | 2023-09-02T22:56:14 | 53,977,862 | 965 | 121 | MIT | 2023-09-13T03:27:29 | 2016-03-15T20:54:43 | Python | UTF-8 | Python | false | false | 1,445 | py | b906.py | import ast
# error if method name starts with `visit_`, the type is a valid `ast` type
# which has subfields, and contains no call to a method name containing `visit`
# anywhere in it's body
# error
def visit_For():
...
# has call to visit function
def visit_For():
foo_visit_bar()
# has call to visit met... |
3c4bcfa69a0cf6580fa835543a112ef0cde20871 | a81c36d350be0aeb6769fe25cf6084525841874e | /pony/flask/example/models.py | f97d5642578c497154914d11b8d8f624fb6c88f4 | [
"Apache-2.0"
] | permissive | ponyorm/pony | 6e9bb581fb87c121ab21a911b2a185e7044fd945 | 27593ffc74184bc334dd301a86fc5f40fdd3ad87 | refs/heads/main | 2023-08-29T09:50:10.246229 | 2022-12-15T14:28:13 | 2022-12-15T14:28:13 | 8,087,816 | 3,117 | 290 | Apache-2.0 | 2023-09-05T02:20:16 | 2013-02-08T04:56:00 | Python | UTF-8 | Python | false | false | 269 | py | models.py | from pony.orm import Database, Required, Optional
from flask_login import UserMixin
from datetime import datetime
db = Database()
class User(db.Entity, UserMixin):
login = Required(str, unique=True)
password = Required(str)
last_login = Optional(datetime) |
7572267edaf0abfe8aa947a7850784726a3a510b | fcc83583ed505381c7e1e2ca961a54e52552e8b4 | /scylla/_version.py | d294ca844e75ec00e6ac22824905b61ff56a656a | [
"Apache-2.0"
] | permissive | imWildCat/scylla | 959485585c5ed742ce1659f5305a46b6198c798d | 46f6f6bd2eba6e49603d263209efc59b74badf07 | refs/heads/main | 2023-09-02T23:10:23.000529 | 2023-05-22T17:48:29 | 2023-05-22T17:48:29 | 128,911,431 | 3,898 | 566 | Apache-2.0 | 2023-08-14T21:53:20 | 2018-04-10T09:55:11 | Python | UTF-8 | Python | false | false | 21 | py | _version.py | __version__ = '1.1.7' |
a2c9a2148b3c28fac70a60cf169f50372d50d3a9 | 88c4d5b462998a9c0411a0243ab95ee05ffee60a | /tests/utilities/test_value_from_ast_untyped.py | 78c4edeba7958db090a92948a3c10977de7480b9 | [
"MIT"
] | permissive | graphql-python/graphql-core | 606f3f3d479d576a4bdcd7d7995c0fddc486282f | 0c93b8452eed38d4f800c7e71cf6f3f3758cd1c6 | refs/heads/main | 2023-09-04T09:22:45.162575 | 2023-06-09T22:13:10 | 2023-06-09T22:13:10 | 143,207,933 | 259 | 101 | MIT | 2023-06-09T22:13:11 | 2018-08-01T20:57:07 | Python | UTF-8 | Python | false | false | 2,788 | py | test_value_from_ast_untyped.py | from math import nan
from typing import Any, Dict, Optional
from graphql.language import FloatValueNode, IntValueNode, parse_value
from graphql.pyutils import Undefined
from graphql.utilities import value_from_ast_untyped
def describe_value_from_ast_untyped():
def _compare_value(value: Any, expected: Any):
... |
3ccc8cce253baeb9aee99cbe508260f758aaf2b4 | a935ec8dab61675b6a3e348511fb9f8c5d490026 | /benchmark/run_benchmark.py | 3517f60be13df68b80a7b80f8bada718c808e268 | [
"MIT"
] | permissive | libAudioFlux/audioFlux | d604c54941c17d90e1ef42f04ba353ef6e244926 | 3ae59434e2c1cacb6da43562677ed4899d7047c7 | refs/heads/master | 2023-04-28T05:17:22.649299 | 2023-04-25T09:45:59 | 2023-04-25T09:45:59 | 589,514,195 | 1,701 | 85 | MIT | 2023-04-25T09:00:05 | 2023-01-16T09:53:04 | C | UTF-8 | Python | false | false | 4,625 | py | run_benchmark.py | import os
import sys
import argparse
from collections import defaultdict
import matplotlib.pyplot as plt
import numpy as np
PROJECTS = [
'audioflux',
'torchaudio',
'librosa',
'essentia',
]
FEATURES = ['mel']
def show(data, save_path=None):
show_data = {}
xticks = []
project_set = set()
... |
79558ac44411e2b05d4fc9647c209e62b362c61c | df87814cb32990ad8c27d0b13a821aabce012819 | /kolibri/plugins/pwa/root_urls.py | dd8fc8b11d68bd92d6a78d8b5f6be9063dbd6c52 | [
"MIT"
] | permissive | learningequality/kolibri | 26812d4ae771f3b389d3317a586bc032fc84866b | cc9da2a6acd139acac3cd71c4cb05c15d4465712 | refs/heads/release-v0.16.x | 2023-09-01T18:07:29.720772 | 2023-08-31T15:43:47 | 2023-08-31T15:43:47 | 49,976,939 | 689 | 682 | MIT | 2023-09-14T20:02:29 | 2016-01-19T19:22:07 | Python | UTF-8 | Python | false | false | 918 | py | root_urls.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2023 Endless OS Foundation, LLC
# SPDX-License-Identifier: MIT
from django.conf.urls import url
from .views import PwaServiceWorkerView
# The service worker has to be exposed at the root of the Kolibri app, as
# otherwise it gets a scope which is too restric... |
81160f0c85254f488dd63d04273056846c0ddc38 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/local_file/test_camera.py | d47c5fa69fa2b22bd292392ab6ad7685dc175f3c | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 5,821 | py | test_camera.py | """The tests for local file camera component."""
from http import HTTPStatus
from unittest import mock
import pytest
from homeassistant.components.local_file.const import DOMAIN, SERVICE_UPDATE_FILE_PATH
from homeassistant.core import HomeAssistant
from homeassistant.setup import async_setup_component
from tests.typ... |
43e86a249e6eb528f7dddc6561e1a6af6d2fafe0 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/data_transfer_job_in_pipeline/import_stored_database/pipeline.py | 478c39601fb760a5ef280b472e400f468c0dc5c0 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later",
"LicenseRef-scancode-python-cwi",
"PSF-2.0",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"Python-2.0",
"MPL-2.0",
"LicenseRef-scancode-other-copyleft",
... | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 1,321 | py | pipeline.py | from pathlib import Path
from azure.ai.ml import Output, dsl
from azure.ai.ml.data_transfer import import_data
from azure.ai.ml.constants._common import AssetTypes
from azure.ai.ml.constants._component import DataTransferTaskType
from azure.ai.ml.entities import PipelineJob
parent_dir = str(Path(__file__).parent)
... |
ed6e5d32427e29ca8328caacd6672a14c2385b8a | 42812c3572378d85f9d9113fa2fff645633d3c22 | /x2paddle/op_mapper/onnx2paddle/opset_legacy.py | 6dbe6f9d7186f42014ed2aa535e307584757f37c | [
"Apache-2.0"
] | permissive | PaddlePaddle/X2Paddle | 83e3fa81a869f68c6ed3f7d51b6bc38f6ad5e138 | d823b87f186abee4a2c76565346d60580550c7e9 | refs/heads/develop | 2023-09-04T08:12:36.214754 | 2023-05-08T07:25:00 | 2023-05-08T07:25:00 | 164,796,418 | 738 | 289 | Apache-2.0 | 2023-05-25T06:12:10 | 2019-01-09T05:46:03 | Python | UTF-8 | Python | false | false | 114,881 | py | opset_legacy.py | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... |
ce795e405fb3906473425ade62c2d5eeb3fddd43 | bf56f4eb9d3dabe68d0c37b118aab846bae8ed7d | /tests/oracleTest.py | b015a981f6c29f900a55b52bb3b725c29c764949 | [
"MIT"
] | permissive | PyWaves/PyWaves | 9597ea3b9b7f81622ca03d7e88495316177b6bce | 49afcd219586383c828f893059b80bd12a7ff755 | refs/heads/master | 2023-05-29T04:46:25.545148 | 2023-05-19T06:28:17 | 2023-05-19T06:28:17 | 76,631,764 | 137 | 128 | MIT | 2023-02-02T18:54:07 | 2016-12-16T07:26:33 | Python | UTF-8 | Python | false | false | 1,351 | py | oracleTest.py | import pywaves as pw
from .. import Oracle
from .helpers import Helpers
pw.setThrowOnError(True)
def test_getDataWithKey():
pw.setNode('https://nodes-testnet.wavesnodes.com', 'T')
oracle = Oracle(oracleAddress= '3MwGH6GPcq7jiGNXgS4K6buynpLZR5LAgQm', seed='muffin action girl between across budget business bid... |
572af0d048bd843a11473c443fed3c21320b3e04 | 7acfdc5720b74e757c2f0a3dce5d487fa7b67f32 | /DHT22.py | bf88278a8cc760993eb009ef06d3040167f9a1d8 | [] | no_license | yfgeek/rpi-TempRuntime | 736ed6bd85641de2e78b78dbdc80ac29a79dce21 | 11bf370d94c92020aeb64c6b95aa083bc0fcffeb | refs/heads/master | 2021-01-17T15:27:09.467691 | 2018-10-22T02:38:52 | 2018-10-22T02:38:52 | 66,533,039 | 146 | 36 | null | 2017-06-30T11:49:01 | 2016-08-25T06:52:48 | JavaScript | UTF-8 | Python | false | false | 1,794 | py | DHT22.py | #!/usr/bin/python
import sys
import Adafruit_DHT
import Adafruit_CharLCD as LCD
import time
import json,os
def jsonWrite(data,tdate,name):
pathfile = "web/data/"+ name + "/" + tdate +".json"
if os.path.exists(pathfile):
file =open(pathfile,"rb+")
file.seek(-1,os.SEEK_END)
file.truncate()
... |
939cc9043deb2d353a268be76f0339a2f73dbb61 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /12_贪心算法/经典题/5227. K 次操作后最大化顶端元素-贪心等价转换.py | 35dbef7fa056421b319abd8205f60a13d6696bc3 | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 1,124 | py | 5227. K 次操作后最大化顶端元素-贪心等价转换.py | from typing import List, Optional, Tuple
MOD = int(1e9 + 7)
# 思路: 贪心取出前 k - 1 个元素,第 k 次操作可以
# 将已经移除的最大的元素放回栈顶,或
# 取出第 k 个元素,此时栈顶为第 k + 1 个元素
# 要分类讨论的题,先把边界去除
class Solution:
def maximumTop(self, nums: List[int], k: int) -> int:
n = len(nums)
if n == 1:
return nums[0... |
19008b05bd3046aa9a4293572355306774d98322 | 45ce76f126ee8985e834d438413cccef437e0fa0 | /tests/test_app_commands_autocomplete.py | dcf7407015c705587c328caf652c1775ee8207cf | [
"MIT"
] | permissive | Rapptz/discord.py | 929437812bc9f59d78c2c43c6a9f2c4bdb3f8146 | f74eb14d722aa1bc90f9d0478199250d2eb4e81b | refs/heads/master | 2023-08-29T22:04:47.095128 | 2023-08-25T19:43:04 | 2023-08-25T19:43:04 | 41,179,827 | 15,894 | 8,049 | MIT | 2023-09-14T18:57:12 | 2015-08-21T22:19:08 | Python | UTF-8 | Python | false | false | 5,210 | py | test_app_commands_autocomplete.py | """
The MIT License (MIT)
Copyright (c) 2015-present Rapptz
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merg... |
00a07e42f8c6b5d8e975bdee1f45414c5d744c07 | 572afc77a246acb9483b47fc9e1839f47005d736 | /python/federatedml/secureprotol/oblivious_transfer/hauck_oblivious_transfer/hauck_oblivious_transfer_receiver.py | 6c589b042e3caecb7f7f81ad9b00c5c4cd9991ce | [
"Apache-2.0"
] | permissive | FederatedAI/FATE | 7c787c308cca9ff46f287d24569c68de0a1cac07 | 8767db5ec0cb93784f64b290bc39b7b545c530fb | refs/heads/master | 2023-08-17T10:13:00.302529 | 2023-06-14T07:01:38 | 2023-06-14T07:01:38 | 167,349,656 | 4,942 | 1,571 | Apache-2.0 | 2023-09-14T07:02:29 | 2019-01-24T10:32:43 | Python | UTF-8 | Python | false | false | 4,818 | py | hauck_oblivious_transfer_receiver.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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/lic... |
d5afd09b62b77d494b22d363aa55425c7b72fbc7 | 975b2d421d3661e6770b601929d5f11d981d8985 | /msgraph/generated/models/windows_mobile_m_s_i.py | e893fe351912b047d666947e51760708fdeb9b64 | [
"MIT"
] | permissive | microsoftgraph/msgraph-sdk-python | a7c551b85daadeebf76ec4ae12668664ea639b42 | 27de7ccbe688d7614b2f6bde0fdbcda4bc5cc949 | refs/heads/main | 2023-09-03T21:45:27.989672 | 2023-08-31T06:22:18 | 2023-08-31T06:22:18 | 534,665,999 | 135 | 18 | MIT | 2023-09-14T11:04:11 | 2022-09-09T14:00:17 | Python | UTF-8 | Python | false | false | 3,140 | py | windows_mobile_m_s_i.py | from __future__ import annotations
from dataclasses import dataclass, field
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
if TYPE_CHECKING:
from .mobile_lob_app import MobileLobApp
from .mobile_lob... |
34d69a6ad5fb53d3fca7bc17fdc975db078014a2 | cb4f118412a55c52d720bc79e4074606622920ac | /arcade/gl/enums.py | 08169d20f43f4f7e529b7300f53d8437324ef250 | [
"MIT"
] | permissive | pythonarcade/arcade | 3e536306f0c44f911de149b58958d8b609ffad4b | 908664efc256697d3098a347f63d217d97841782 | refs/heads/development | 2023-08-29T02:53:01.599145 | 2023-08-26T16:54:34 | 2023-08-26T16:54:34 | 49,003,082 | 786 | 215 | NOASSERTION | 2023-09-12T18:38:54 | 2016-01-04T14:46:52 | Python | UTF-8 | Python | false | false | 1,261 | py | enums.py | from __future__ import annotations
from pyglet import gl
# Texture min/mag filters
NEAREST = 0x2600
LINEAR = 0x2601
NEAREST_MIPMAP_NEAREST = 0x2700
LINEAR_MIPMAP_NEAREST = 0x2701
NEAREST_MIPMAP_LINEAR = 0x2702
LINEAR_MIPMAP_LINEAR = 0x2703
# Texture wrapping
REPEAT = gl.GL_REPEAT
CLAMP_TO_EDGE = gl.GL_CLAMP_TO_EDGE... |
9238dbb707edcc334c63fa382bc617df2fafe880 | b371b610174672ef788edda57f46219c0853f5e1 | /__init__.py | 60aca235f2bba2b54dad64d3556309d8fd1e7d59 | [
"Apache-2.0"
] | permissive | analysiscenter/pydens | 36e0f29be8e5b07353dedeefaef66be8bae6b0d1 | 748175c4e77d407a5dc593d2f104ce6edddc3126 | refs/heads/master | 2023-06-26T04:24:40.112444 | 2023-06-14T14:12:49 | 2023-06-14T14:12:49 | 197,198,102 | 269 | 66 | Apache-2.0 | 2023-06-14T14:12:50 | 2019-07-16T13:20:34 | Jupyter Notebook | UTF-8 | Python | false | false | 22 | py | __init__.py | from .pydens import *
|
eef654a6279a9160483187e30630c7823ece513a | e96889bdfc11b1fefe00b23ca3ef0944f6cce3e6 | /flask-backend/api/routes/report.py | 986b9dfe01e2e82f4608040388362478b68550ae | [
"Apache-2.0"
] | permissive | scorelab/OpenMF | d8decd210bc46336a3a9d4b74d692e32f9946e2e | f26a5d853c783029b626f558ec3b1827c3212cf7 | refs/heads/master | 2023-04-13T13:41:00.787410 | 2022-09-05T07:18:36 | 2022-09-05T07:18:36 | 126,325,350 | 118 | 101 | Apache-2.0 | 2023-07-03T13:10:08 | 2018-03-22T11:30:00 | JavaScript | UTF-8 | Python | false | false | 5,766 | py | report.py | '''
Routes related to report
'''
import os
import re
import csv
from flask import Blueprint, jsonify, request
from api.models.case import Case
from api.schema.case import CaseSchema
from api.extansions import db
ROOT_DIR = os.getcwd()
case_schema = CaseSchema()
cases_schema = CaseSchema(many=True)
report = Bluep... |
376df2f7232df769393c90fb00e2a4d6accb17dd | 069c2295076c482afadfe6351da5ae02be8e18e6 | /tests/i18n/unchanged/__init__.py | afcadcbcb7f107acf6f2163b980fd4dc3f3d12c6 | [
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"GPL-1.0-or-later",
"Python-2.0.1",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-other-permissive",
"Python-2.0"
] | permissive | django/django | 5eb557f57053631cd4f566f451e43197309dbeeb | c74a6fad5475495756a5bdb18b2cab2b68d429bc | refs/heads/main | 2023-09-01T03:43:44.033530 | 2023-08-31T08:27:32 | 2023-08-31T08:27:32 | 4,164,482 | 73,530 | 38,187 | BSD-3-Clause | 2023-09-14T20:03:48 | 2012-04-28T02:47:18 | Python | UTF-8 | Python | false | false | 149 | py | __init__.py | from django.utils.translation import gettext as _
string1 = _("This is a translatable string.")
string2 = _("This is another translatable string.")
|
e667efd7df80c44ae3b95b6d4874c7717b69a02e | d01fa1b6668c66236405b799e39e529d1492af7c | /{{cookiecutter.project_slug}}/blog/tests.py | d22b937cdca42b135d50e7e814d02d5305563526 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | chrisdev/wagtail-cookiecutter-foundation | 426ffd974aa08ab10e4b0e44d5003476c597f2e4 | e7d56ee01eb5976588129d7bd4d5fc6dab2d794a | refs/heads/master | 2023-08-31T06:05:43.999253 | 2022-03-31T18:44:37 | 2022-03-31T18:44:37 | 33,870,540 | 189 | 72 | MIT | 2023-09-14T03:30:34 | 2015-04-13T13:36:50 | Python | UTF-8 | Python | false | false | 492 | py | tests.py | from wagtail.tests.utils import WagtailPageTests
from pages.models import HomePage
from .models import BlogIndexPage, BlogPage
class BlogPageTests(WagtailPageTests):
def test_can_create_under_blog_index_page(self):
# You can create a BlogPage under BlogIndexPage
self.assertCanCreateAt(BlogIndexPa... |
93d3eedf937261eb9abccf9872408b2bc270b7e6 | 0d6e9c15edafe14b5d373f2180809b94786cdb88 | /tests/metrics/test_compute_metrics.py | ed926164cfac0459628233e3ea712167c9267b88 | [
"MIT"
] | permissive | kwotsin/mimicry | 6190e159f96418e9773a453aa17450f372767ffa | a7fda06c4aff1e6af8dc4c4a35ed6636e434c766 | refs/heads/master | 2023-08-02T21:49:54.864461 | 2022-08-07T18:28:05 | 2022-08-07T18:28:05 | 251,697,485 | 621 | 70 | MIT | 2022-08-07T18:30:23 | 2020-03-31T18:35:55 | Python | UTF-8 | Python | false | false | 7,313 | py | test_compute_metrics.py | import os
import shutil
import pytest
import torch
import torch.nn as nn
from torch_mimicry.metrics import compute_metrics
from torch_mimicry.nets.gan import gan
class ExampleGen(gan.BaseGenerator):
def __init__(self,
bottom_width=4,
nz=4,
ngf=16,
... |
7bdd689d00cd13969f9fd9e47f1517f008b90e51 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Tests/Marketplace/Tests/copy_and_upload_packs_test.py | 7ed892cf0b36ad2cf39d0a5c3bcfe8c7029e45e8 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 9,140 | py | copy_and_upload_packs_test.py | import pytest
import os
from Tests.Marketplace.marketplace_constants import CONTENT_ROOT_PATH, PACKS_FOLDER, IGNORED_FILES, GCPConfig
# disable-secrets-detection-start
class TestGetPackNames:
"""
Given:
- A csv list of pack names (ids)
When:
- Getting the pack paths
The... |
25a3b2edd32d5b08799264572afd1125f6bec9c2 | 4805a71711625735215cc1a773a85712be305b59 | /docs/examples/tutorial/pure/compiled_switch.py | a35cac2c674d7cbe07cf5c8fa3a500a785fc4106 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cython/cython | 0a75b75b7eaf19eeedaaebca9d49adb603e3e8f5 | 6ba3daf319d94058de74e8e7f53f932092b38441 | refs/heads/master | 2023-09-04T11:09:56.569277 | 2023-09-04T07:45:47 | 2023-09-04T07:45:47 | 1,099,265 | 8,352 | 1,704 | Apache-2.0 | 2023-09-14T06:33:34 | 2010-11-21T07:44:20 | Python | UTF-8 | Python | false | false | 119 | py | compiled_switch.py | import cython
if cython.compiled:
print("Yep, I'm compiled.")
else:
print("Just a lowly interpreted script.")
|
bf830297e3aed5b3b71d806488807a86119994b0 | 9fcb5164ff77e8cf48d860485fed262d36ed63e7 | /flake8_dcos_lint/setup.py | ea67f1210eb6930aa1bafea4a3528818cdd60244 | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-oracle-bcl-javase-javafx-2012",
"ErlPL-1.1",
"MPL-2.0",
"ISC",
"BSL-1.0",
"Python-2.0",
"BSD-2-Clause"
] | permissive | dcos/dcos | 2415d298979c6d6e3183aeb64c906a0959863576 | 79b9a39b4e639dc2c9435a869918399b50bfaf24 | refs/heads/master | 2023-08-09T04:16:19.696621 | 2021-07-05T06:42:39 | 2021-07-05T06:42:39 | 56,184,050 | 2,613 | 641 | Apache-2.0 | 2023-07-27T04:13:50 | 2016-04-13T20:31:58 | Python | UTF-8 | Python | false | false | 906 | py | setup.py | """
flake8 plugin for dcos code base.
This is flake8 extension that provides custom code quality checks for DCOS project. The syntax rules can be added as
Regex in check_rules.py module. New plugins can be introduced by following the flake8 extension guide
(http://flake8.pycqa.org/en/latest/plugin-development/index.ht... |
83e3e828f6c2c39ef4bb6de3badbb12373f482d7 | f1fbd69dcdc3a41de01feaced37822719e6507d1 | /devp2p/app_helper.py | ab3b2d07d7ce96b8f1471eaf5b7dbbbb1ddd129d | [
"BSD-3-Clause",
"MIT"
] | permissive | ethereum/pydevp2p | 083f29789769fba6fc20e484e95c395ad8fc44ef | b09b8a06a152f34cd7dc7950b14b04e3f01511af | refs/heads/develop | 2023-08-28T13:32:58.313309 | 2018-02-07T10:33:25 | 2018-02-07T10:33:25 | 33,431,431 | 298 | 357 | MIT | 2022-06-13T14:30:46 | 2015-04-05T05:27:20 | Python | UTF-8 | Python | false | false | 3,334 | py | app_helper.py | import random
from devp2p import peermanager
from devp2p.service import BaseService
from devp2p.discovery import NodeDiscovery
from devp2p.crypto import privtopub as privtopub_raw, sha3
from devp2p.utils import host_port_pubkey_to_uri, update_config_with_defaults
from rlp.utils import encode_hex
import gevent
import c... |
0bf5c0c68c278fbf508e1039af6bd407e0201a86 | 30112ee67896c0cf08940cb01febc0e56774e9c9 | /lib/utils/utils.py | f8d0c4e2aa755ded3441f2cd8a892b95367be1ea | [
"BSD-3-Clause",
"MIT"
] | permissive | HRNet/HRNet-Semantic-Segmentation | 543d1d9de2e9be03aa8478f515631f2c4d9292c2 | 0bbb2880446ddff2d78f8dd7e8c4c610151d5a51 | refs/heads/HRNet-OCR | 2023-05-30T23:08:16.903008 | 2021-05-04T11:21:17 | 2021-05-04T11:21:17 | 180,372,347 | 3,173 | 825 | NOASSERTION | 2022-11-17T13:07:11 | 2019-04-09T13:24:09 | Python | UTF-8 | Python | false | false | 4,377 | py | utils.py | # ------------------------------------------------------------------------------
# Copyright (c) Microsoft
# Licensed under the MIT License.
# Written by Ke Sun (sunk@mail.ustc.edu.cn)
# ------------------------------------------------------------------------------
from __future__ import absolute_import
from __future_... |
410f71179e585ca1aa3351d8b25dbec098028d61 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/ipywidgets/py3/ipywidgets/widgets/widget_templates.py | 002ee777de7fb372984e4a0ea32442c65f3c1016 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 15,507 | py | widget_templates.py | """Implement common widgets layouts as reusable components"""
import re
from collections import defaultdict
from traitlets import Instance, Bool, Unicode, CUnicode, CaselessStrEnum, Tuple
from traitlets import Integer
from traitlets import HasTraits, TraitError
from traitlets import observe, validate
from .widget im... |
4cef346b6d972e679621f9e080863ad9107a7aa0 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/SumoLogic_Cloud_SIEM/Scripts/SumoLogicLinkSignalIncidents/SumoLogicLinkSignalIncidents.py | 7034b148c306631b1d289d035acee3df1da37f07 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 3,537 | py | SumoLogicLinkSignalIncidents.py | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import traceback
from typing import Any, Dict
''' STANDALONE FUNCTION '''
def find_field_from_labels(labels: list, type_name: str) -> Any:
for entry in labels:
if entry['type'] == type_name:
return ent... |
f5bae1a8befd71df2243346a0df10f25fea43f76 | 649b0c3fda1546d933c862fa13a96684447a94c8 | /tomviz/python/ConnectedComponents.py | a76da77f05678e237e1b5b6fd4790056893872ca | [
"BSD-3-Clause"
] | permissive | OpenChemistry/tomviz | fa181db37eb5992dff6cae7a55d982495eabdba9 | dd39cc4cf43ce1ea9224602508d372e5c5a5fd66 | refs/heads/master | 2023-06-01T13:51:40.416494 | 2023-04-20T19:21:12 | 2023-04-20T19:21:12 | 17,905,329 | 330 | 85 | BSD-3-Clause | 2023-05-22T21:34:33 | 2014-03-19T13:35:20 | C++ | UTF-8 | Python | false | false | 1,027 | py | ConnectedComponents.py | import tomviz.operators
class ConnectedComponents(tomviz.operators.CancelableOperator):
def transform(self, dataset, background_value=0):
"""Converts a label map of connected components of foreground-valued
voxels in the input image to a label map where each connected component
has a uniq... |
11f45ec248cc882745c22f3603e2171181df7dab | ac235a23f22be0d6f1818bb53902177f9969813a | /ddtrace/opentracer/propagation/propagator.py | 7b71268eaf900fd68935efb41d563c53894e445d | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | DataDog/dd-trace-py | f09d6d48c4c69aea68f999fc8a458ade5c6150cf | 1e3bd6d4edef5cda5a0831a6a7ec8e4046659d17 | refs/heads/1.x | 2023-09-01T20:25:26.746324 | 2023-09-01T18:54:37 | 2023-09-01T18:54:37 | 61,572,326 | 461 | 426 | NOASSERTION | 2023-09-14T20:38:57 | 2016-06-20T18:52:23 | Python | UTF-8 | Python | false | false | 252 | py | propagator.py | import abc
import six
class Propagator(six.with_metaclass(abc.ABCMeta)):
@staticmethod
@abc.abstractmethod
def inject(span_context, carrier):
pass
@staticmethod
@abc.abstractmethod
def extract(carrier):
pass
|
7771c685618042f19b61ae0aca374a0b33a2f159 | 86cda36d8d6e75a6c7c88cd8d104781c7399bd4d | /DrissionPage/easy_set.py | 652ff44926d7b14698ebda46b3e0a74e350e82e7 | [
"BSD-3-Clause"
] | permissive | g1879/DrissionPage | 7e22afdbfb41e5add9e4f86817af1e7d7deed86d | 57e518fb0400340344ace4aa1e45ab5f85a4bb87 | refs/heads/master | 2023-08-26T21:58:43.105566 | 2023-08-20T08:26:34 | 2023-08-20T08:26:34 | 265,810,847 | 2,224 | 291 | BSD-3-Clause | 2023-07-05T03:20:04 | 2020-05-21T09:43:59 | Python | UTF-8 | Python | false | false | 13,670 | py | easy_set.py | # -*- coding:utf-8 -*-
"""
@Author : g1879
@Contact : g1879@qq.com
"""
from os import popen
from pathlib import Path
from re import search
from typing import Union
from .commons.constants import Settings
from .commons.tools import unzip
from .configs.chromium_options import ChromiumOptions
from .conf... |
059831bba83020522c53922747f325e0b9fdd0e5 | e75c5412063078c9ea3e7c71a8dc7a2026083a34 | /astropy/coordinates/polarization.py | 45d71430892e4087e063dddbb6ae100cbff8a905 | [
"BSD-3-Clause"
] | permissive | astropy/astropy | d6636f24acdf2b18fc3e413ca0c4b1162a63dd41 | 53188c39a23c33b72df5850ec59e31886f84e29d | refs/heads/main | 2023-08-27T18:16:44.061375 | 2023-08-27T16:07:35 | 2023-08-27T16:07:35 | 2,081,289 | 3,922 | 1,935 | BSD-3-Clause | 2023-09-14T09:23:26 | 2011-07-21T01:33:49 | Python | UTF-8 | Python | false | false | 8,076 | py | polarization.py | from __future__ import annotations
from contextlib import contextmanager
from typing import NamedTuple
import numpy as np
from astropy.utils import unbroadcast
from astropy.utils.data_info import MixinInfo
from astropy.utils.shapes import ShapedLikeNDArray
__all__ = ["StokesCoord", "custom_stokes_symbol_mapping", "... |
7123f873999ea3173981d1fc5e66c737d33d1176 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2016_09_01/models/__init__.py | 6ee7aaa3fd18c3218e079619cf3ff7222abb850f | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 7,843 | py | __init__.py | # 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 ... |
27595de30bc8d7bb6a6b98ce5b28fd8532d350b4 | 8de79ab1818c535dcd8ad6e0c92b5c9642ffb82a | /sphinx/addnodes.py | d51d6000b35ecf106f22be202e01432a6a53fff2 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | sphinx-doc/sphinx | 632d75bfc7bef14904f3d847e6de6d37594a13a5 | eab54533a56119c5badd5aac647c595a9adae720 | refs/heads/master | 2023-08-16T18:21:54.073511 | 2023-08-15T17:36:47 | 2023-08-15T17:36:47 | 28,710,753 | 6,138 | 2,587 | NOASSERTION | 2023-09-14T14:22:28 | 2015-01-02T10:53:28 | Python | UTF-8 | Python | false | false | 19,226 | py | addnodes.py | """Document tree nodes that Sphinx defines on top of those in Docutils."""
from __future__ import annotations
from typing import TYPE_CHECKING, Any
from docutils import nodes
if TYPE_CHECKING:
from collections.abc import Sequence
from docutils.nodes import Element
from sphinx.application import Sphinx... |
25f585a7287d1c7726f2816ed656f570684c64e2 | 3ca67d69abd4e74b7145b340cdda65532f90053b | /BOJ/1005.ACM Craft/6047198844.py | 09043338877ce4e1e5326af3af732aa5071bb402 | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 1,293 | py | 6047198844.py | import heapq
import math
import sys
from collections import defaultdict, deque
T = int(sys.stdin.readline())
for _ in range(T):
N, K = map(int, sys.stdin.readline().split())
D = [0] + list(map(lambda i: -int(i), sys.stdin.readline().split()))
# edge 를 반대로.
edges = defaultdict(list)
for _ in range(... |
d2efaf9bf8698b23872a43e4f0871e462d4401df | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/synapse/azure-synapse-spark/azure/synapse/spark/models/_spark_client_enums.py | aa70c64baf9359ac558e2ab9c42d06999613d7f1 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 2,478 | py | _spark_client_enums.py | # 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 ... |
a48ab825c1ddb38049ddefe9dd7a31d3cc15ca51 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /tests/e2e/workloads/ocp/registry/test_simple_registry_workload.py | 7c36a4c309e5d970b759d66ddf37832043ecdb99 | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 1,927 | py | test_simple_registry_workload.py | import pytest
import shlex
from subprocess import Popen, PIPE
import logging
from ocs_ci.utility.svt import (
svt_project_clone,
svt_create_venv_setup,
svt_cluster_loader,
svt_cleanup,
)
log = logging.getLogger(__name__)
@pytest.mark.skip(
reason="Skipped due to issue https://github.com/openshif... |
ec199d46c46484930e560d14e2fb5f2be0f750a5 | bb666509f2a6cf07058352f8df63cb58e46a0401 | /commands/listroles.py | 4a5b53ae907d3e95b022cb16bf19cbaf6aada9d9 | [
"MIT"
] | permissive | gregzaal/Auto-Voice-Channels | f6d1764846ee5e17f98b413e1cbfab8c7a71b05a | 17698450c6f885ae3ee3dae059754ba72931adf6 | refs/heads/master | 2023-05-25T10:10:38.320456 | 2022-10-08T09:09:44 | 2022-10-08T09:09:44 | 237,802,209 | 208 | 189 | MIT | 2023-05-22T22:41:04 | 2020-02-02T16:44:02 | Python | UTF-8 | Python | false | false | 1,556 | py | listroles.py | import utils
from functions import echo
from commands.base import Cmd
help_text = [
[
("Usage:", "<PREFIX><COMMAND>\n" "<PREFIX><COMMAND> `@USER`"),
(
"Description:",
"List all of the roles (and their IDs) in the server, or all the roles that a particular user has.",
... |
b6dd85e3627498ec8450ffd260748c57bdb14f96 | 6a85bf7c1ce6147aff87b5ad655e191c11176b1a | /setup.py | f3ead93e9fc24fd092a9b8af423f18f511197f81 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | bmc/munkres | 5eec4f49b65caa37481c87de52b7f46cee341849 | 99a5c54672ea03d0b4a1f7b168cd587325bc068e | refs/heads/master | 2023-08-06T00:08:07.843362 | 2023-05-24T20:35:50 | 2023-05-24T20:35:50 | 53,356 | 204 | 72 | NOASSERTION | 2021-09-05T16:02:58 | 2008-09-17T00:31:21 | Python | UTF-8 | Python | false | false | 3,154 | py | setup.py | #!/usr/bin/env python
#
# Distutils setup script for Munkres
# ---------------------------------------------------------------------------
from setuptools import setup
import re
import os
import sys
from distutils.cmd import Command
from abc import abstractmethod
if sys.version_info[0:2] < (3, 5):
columns = int(o... |
343968db9a6c0cd1acce4fd1505e5c15abc46c6b | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoLocalTracker/SiStripClusterizer/python/SiStripClusterToDigiProducer_cfi.py | d2be0fedbf9451ca6e2ffff18f95ba413b1403ed | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 245 | py | SiStripClusterToDigiProducer_cfi.py | import FWCore.ParameterSet.Config as cms
siStripClustersToDigis = cms.EDProducer("SiStripClusterToDigiProducer",
ClusterProducer = cms.InputTag('siStripClusters','')
)
|
71088fbc63cd92116ef379e2fa903174b4c1e59b | 2181883c8faac55bfc969a97d22d9b24a3e81ab3 | /Pythonwin/pywin/idle/AutoExpand.py | 3b302ee93def3aa4e4029915612af4af9b81f995 | [
"PSF-2.0"
] | permissive | mhammond/pywin32 | 574bf121cfeac8c7a9d28f94ee0f2069a425e8ab | 2a7137f21965013020ef9e4f27565db6dea59003 | refs/heads/main | 2023-09-02T13:16:52.307262 | 2023-08-17T19:42:26 | 2023-08-17T19:42:26 | 108,187,130 | 4,757 | 907 | null | 2023-08-23T01:45:49 | 2017-10-24T21:44:27 | C++ | UTF-8 | Python | false | false | 2,714 | py | AutoExpand.py | import re
import string
###$ event <<expand-word>>
###$ win <Alt-slash>
###$ unix <Alt-slash>
class AutoExpand:
keydefs = {
"<<expand-word>>": ["<Alt-slash>"],
}
unix_keydefs = {
"<<expand-word>>": ["<Meta-slash>"],
}
menudefs = [
(
"edit",
[
... |
e1a74015db729cdd5f0016a56e2e2540c3a848ab | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxr/tests/ShowEventManagerPolicyAvailable/cli/equal/golden_output1_expected.py | 66c3c7192f3a03bf0be78c3b39c7befba7a77a21 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 1,312 | py | golden_output1_expected.py | expected_output = {
'event_num': {
1: {
'type': 'user',
'time_created': 'Tue Sep 14 15:10:07 2021',
'eemfile_name': 'eem_cli_exec_file.tcl'
},
2: {
'type': 'user',
'time_created': 'Tue Sep 14 15:10:22 2021',
'eemfil... |
c0ece84c4dabf2245ee9e52cb9b1731493afbd55 | ce32e0e1b9568c710a3168abc3c638d6f9f6c31b | /vnpy/gateway/coinbase/__init__.py | 5b34d7bb22a6527177104ad061e8efbd9b5271e5 | [
"MIT"
] | permissive | msincenselee/vnpy | 55ae76ca32cae47369a66bd2d6589c13d7a0bdd4 | 7f4fd3cd202712b083ed7dc2f346ba4bb1bda6d7 | refs/heads/vnpy2 | 2022-05-19T10:06:55.504408 | 2022-03-19T15:26:01 | 2022-03-19T15:26:01 | 38,525,806 | 359 | 158 | MIT | 2020-09-09T00:09:12 | 2015-07-04T07:27:46 | C++ | UTF-8 | Python | false | false | 46 | py | __init__.py | from .coinbase_gateway import CoinbaseGateway
|
2c364e8b3e891c28a249830a514c411ab0e819fa | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/c9600/tests/ShowPlatformSwitchStandbyTcamUtilization/cli/equal/golden_output_expected.py | d4b26a2dba48686253d397d416f05a98a3a1d6f6 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 55,561 | py | golden_output_expected.py | expected_output={
"asic":{
"0":{
"table":{
"Mac Address Table":{
"subtype":{
"EM":{
"direction":{
"I":{
"max":"32768",
... |
da0832ec3125ffe2549be05784281fb912737889 | 52a32a93942b7923b7c0c6ca5a4d5930bbba384b | /dojo/db_migrations/0139_google_sheets_rules_framework_enable.py | 68b7bcac67f3f8a7b8c9f6988fad83762916e03d | [
"MIT-open-group",
"GCC-exception-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LGPL-3.0-only",
"GPL-3.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-3.0-or-later",
"IJG",
"Zlib",
"LicenseRef-scancode-proprietary-license",
"PSF-2.0",
"LicenseRef-scancode-python-cwi... | permissive | DefectDojo/django-DefectDojo | 43bfb1c728451335661dadc741be732a50cd2a12 | b98093dcb966ffe972f8719337de2209bf3989ec | refs/heads/master | 2023-08-21T13:42:07.238370 | 2023-08-14T18:00:34 | 2023-08-14T18:00:34 | 31,028,375 | 2,719 | 1,666 | BSD-3-Clause | 2023-09-14T19:46:49 | 2015-02-19T17:53:47 | HTML | UTF-8 | Python | false | false | 896 | py | 0139_google_sheets_rules_framework_enable.py | # Generated by Django 3.2.9 on 2021-12-10 02:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dojo', '0138_remove_authorized_users'),
]
operations = [
migrations.AddField(
model_name='system_settings',
name='en... |
b05ee8fe5207fca7890871544305bfb547fc6518 | fc5a315dfb0d9b4da24c3861a25ed3fcfc55e1e3 | /tests/test_inspector.py | 39275bf1ea1c4fc9cb45aa8f7f996b627e84dfed | [
"MIT"
] | permissive | vintasoftware/classy-django-rest-framework | 2122e4d2955ef051bc2aba30930f9f9cc416a862 | 371d43115612f4dc63d549e36475e5d2818ca8fb | refs/heads/develop | 2023-09-01T19:13:54.743014 | 2023-06-07T20:04:28 | 2023-06-07T20:04:28 | 31,614,336 | 155 | 17 | MIT | 2023-07-20T13:16:49 | 2015-03-03T18:32:57 | Python | UTF-8 | Python | false | false | 4,860 | py | test_inspector.py | import unittest
import types
from rest_framework_ccbv.inspector import Inspector, Attribute, Method
from rest_framework import generics
class TestInspector(unittest.TestCase):
def setUp(self):
self.klass = 'GenericAPIView'
self.module = 'rest_framework.generics'
self.inspector = Inspector... |
0e16cfa3dbc5ab1b60fcc641940f01480d1d65bc | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/parsimonious/parsimonious/grammar.pyi | f686df326c6504dd11d96380e6c70531269fad72 | [
"Apache-2.0",
"MIT"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 3,393 | pyi | grammar.pyi | import collections.abc
from collections import OrderedDict
from collections.abc import Callable, Mapping
from typing import Any, NoReturn
from parsimonious.expressions import _CALLABLE_TYPE, Expression, Literal, Lookahead, OneOf, Regex, Sequence, TokenMatcher
from parsimonious.nodes import Node, NodeVisitor
class Gra... |
07713a255234f7495d6b75558433ce1a85f5d2bb | fbebc09f50a6ac0749e68d5dcab20afd009de71f | /snippets/ch05/info.py | d2f5b02d2103669a38c308bcccb374d9ed40ac0a | [
"Apache-2.0"
] | permissive | foxbook/atap | 7e9adbaa1f64ff4e7a2e58a5d9b1717150f063ba | 43fd3317b641e0830905a734226afad3a0ea19f6 | refs/heads/master | 2023-08-17T06:37:34.571614 | 2022-12-01T14:41:35 | 2022-12-01T14:41:35 | 88,289,875 | 401 | 316 | Apache-2.0 | 2020-08-06T12:54:54 | 2017-04-14T17:48:37 | Python | UTF-8 | Python | false | false | 336 | py | info.py |
from reader import PickledCorpusReader
reader = PickledCorpusReader('../corpus')
for category in reader.categories():
n_docs = len(reader.fileids(categories=[category]))
n_words = sum(1 for word in reader.words(categories=[category]))
print("- '{}' contains {:,} docs and {:,} words".format(category, n_... |
2f7a4cbfe8be7ce3b3a65006a7816af4c1116278 | f062af64ce156719203b79de9c2502b265af27de | /tensorflow_datasets/datasets/duke_ultrasound/duke_ultrasound_dataset_builder_test.py | 21c46995ee699f1e939d883eb8d3a5a92104e135 | [
"Apache-2.0"
] | permissive | tensorflow/datasets | d0c58f3db7ce06347671558b9e5a41e12e6913ce | 41ae3cf1439711ed2f50f99caa0e6702082e6d37 | refs/heads/master | 2023-08-31T03:23:16.581638 | 2023-08-30T17:25:34 | 2023-08-30T17:29:38 | 148,221,325 | 4,224 | 1,738 | Apache-2.0 | 2023-09-14T14:04:22 | 2018-09-10T21:27:22 | Python | UTF-8 | Python | false | false | 1,370 | py | duke_ultrasound_dataset_builder_test.py | # coding=utf-8
# Copyright 2023 The TensorFlow Datasets 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 appl... |
fbbf5591a943ad38d59db41973ee4aa298bed41c | 278ccf2860d1bd737f5d70136e8a1c309dbea8a8 | /kubernetes_py/models/v1/NodeSelector.py | acda5809dcc87123255b1f32a6e6099eac50ce5b | [
"Apache-2.0"
] | permissive | mnubo/kubernetes-py | 3b0f9c0655bcaccb6c3aa172b1d85ce67872d53c | 5a3a365375a49ec85ed7a25fe7fce4e74f17be86 | refs/heads/master | 2021-07-16T20:21:05.161888 | 2020-04-19T15:21:12 | 2020-04-19T15:21:12 | 49,596,156 | 139 | 58 | Apache-2.0 | 2021-06-02T01:35:17 | 2016-01-13T19:22:10 | Python | UTF-8 | Python | false | false | 1,745 | py | NodeSelector.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#
from kubernetes_py.models.v1.NodeSelectorTerm import NodeSelectorTerm
from kubernetes_py.utils import is_valid_list
class NodeSelector(objec... |
7332d42db2c1989884636c66b43210c13c83a636 | 7dfc958846a98c9dc90829ace237adb0f4e79057 | /tests/assets/sample_tasks/sample.py | 59689903a94bccbc1e49340f97739a980f1d246d | [
"Apache-2.0"
] | permissive | ploomber/ploomber | b4fad542106ed85bb3a195f38ee547da111bd049 | 516b64e531b13eeda36b747a268506fa8dd4dc98 | refs/heads/master | 2023-08-08T07:18:12.419524 | 2023-08-03T04:40:19 | 2023-08-03T04:40:19 | 235,190,220 | 3,076 | 219 | Apache-2.0 | 2023-08-29T03:56:08 | 2020-01-20T20:13:06 | Python | UTF-8 | Python | false | false | 38 | py | sample.py | # + tags=["parameters"]
1 + 1
# +
42
|
fc32bb6b3ec4ff22035c439cf364e902c54dacf0 | 2bb96128322c0307742c6809f0d8c7eddb09c523 | /asyico_tutorial/demo6_asyncio.py | d0df6684a90b5fc1bbd6b4c4330be2e58301d40b | [
"MIT"
] | permissive | twtrubiks/python-notes | 2390c66d25b39f5a73968829702d4fd02ccf1b28 | 042a651aaa04c07f76c52bc52bace665d0df99d7 | refs/heads/master | 2023-08-17T11:50:13.122573 | 2023-08-05T04:14:56 | 2023-08-05T04:14:56 | 90,001,387 | 122 | 49 | MIT | 2021-12-21T07:18:06 | 2017-05-02T06:55:21 | Python | UTF-8 | Python | false | false | 336 | py | demo6_asyncio.py | import asyncio
async def nested():
return 42
async def main():
# Schedule nested() to run soon concurrently
# with "main()".
task = asyncio.create_task(nested())
# "task" can now be used to cancel "nested()", or
# can simply be awaited to wait until it is complete:
print(await task)
asy... |
0242e788ad2df7fc380383ca95502d1b06b69cd0 | d2047c37f67535df3748a38f0f5ae3b38cecabea | /examples/RemoteCtrl/script/testScript.py | b30fa4c9cfce15b71f020289b5eb7ac05f97aebd | [
"MIT"
] | permissive | faaxm/spix | 6f7ea9b948cb09da2ec83579978c0c576c7edde8 | c3b16560b5e82755af33a45706d5670896b8076b | refs/heads/master | 2023-06-29T00:29:36.438328 | 2023-04-16T08:48:32 | 2023-04-16T08:48:32 | 193,724,941 | 151 | 38 | MIT | 2023-09-10T16:55:21 | 2019-06-25T14:34:02 | C++ | UTF-8 | Python | false | false | 836 | py | testScript.py | import xmlrpc.client
s = xmlrpc.client.ServerProxy('http://localhost:9000')
print("[+] Available Methods:")
for method in s.system.listMethods():
print("\t- ","{:20s}".format(method), " : ", end="")
print(s.system.methodHelp(method))
s.mouseClick("mainWindow/Button_1")
s.wait(200)
s.mouseClick("mainWindow/But... |
8a3ab9c270788806ed832f68603264af8cc0bc2a | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/perf/core/cli_helpers.py | 76ce666bdc72a2990299baa8ccd3eb846e9f0b11 | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 6,214 | py | cli_helpers.py | # Copyright 2018 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import shlex
import subprocess
import sys
from six.moves import input # pylint: disable=redefined-builtin
COLOR_ANSI_CODE_MAP = {
'blac... |
a6633b26f7cc63ae033dc001da4b65f7f2744a82 | 90b358151d9da221b06ef059313ef607b0e66e45 | /tests/old-ui-test/source.py | d510446da03f6eb3e97685237dd0c350e66f9290 | [] | no_license | truenas/webui | 7967a33403bb718ee5bb9d72b616a9abb7bb9ba5 | 6fdbd450da688500c92e6b15710237caa5227eb4 | refs/heads/master | 2023-09-04T15:00:20.663494 | 2023-09-04T13:28:07 | 2023-09-04T13:28:07 | 90,044,084 | 176 | 173 | null | 2023-09-14T17:21:37 | 2017-05-02T14:42:01 | TypeScript | UTF-8 | Python | false | false | 654 | py | source.py | # Author: Rishabh Chauhan
# License: BSD
# Location for tests of FreeNAS new GUI
# ACCOUNTS
# username for the machine
username = "root"
password = "testing"
# new user with create primary group check
newuser = "usernas"
newuserfn = "user nas"
newuseremail = "test@ixsystems.com"
newuserpassword = "abcd1234"
newgroup ... |
df6afc5ef446866f9c39e06233edcd8478b75ad6 | 0b98732dcd3dd94a97555a8f3e8dd3524bb8ec86 | /tools/ECPB/statistics.py | b9a6beb984395ea59a19ec8931a3bfc54f81105a | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | hasanirtiza/Pedestron | e89fea2ec676f150a7266f6b65963dd6c4ec35c9 | 8ab23ec38982cfaf0ae82c77c30f10b2fff62d12 | refs/heads/master | 2023-08-06T02:53:06.368937 | 2023-04-06T13:46:27 | 2023-04-06T13:46:27 | 247,410,025 | 723 | 161 | Apache-2.0 | 2022-10-02T10:17:44 | 2020-03-15T05:52:52 | Python | UTF-8 | Python | false | false | 3,772 | py | statistics.py | import matplotlib.pyplot as plt
import numpy as np
from matplotlib.figure import Figure
class MrFppi:
def __init__(self, result):
self.result = result
self.mr = 1.0 - np.true_divide(result.tp, result.nof_gts) # 1 - recall
self.fppi = np.true_divide(result.fp, result.nof_imgs) # false p... |
45e1ea9e4533f1b2a9796df70293c20b1c85ac2a | 58cfad962e57b935e7782bb214a2008d689751d6 | /xero_python/project/models/error.py | d11c925ace0bb944e5d7903c147054eab6b9b0ff | [
"MIT"
] | permissive | XeroAPI/xero-python | ce43c060c216a42efd5f47159987468deb0e4622 | 07efa3bfc87a3bd08ba217dd2b642f6a3515ddff | refs/heads/master | 2023-07-21T04:01:27.461727 | 2023-07-11T02:35:44 | 2023-07-11T02:35:44 | 240,158,613 | 109 | 42 | MIT | 2023-07-11T02:35:45 | 2020-02-13T02:17:05 | Python | UTF-8 | Python | false | false | 2,343 | py | error.py | # coding: utf-8
"""
Xero Projects API
This is the Xero Projects API # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
from xero_python.models import BaseModel
class Error(BaseModel):
"""NOTE: This class is auto generated by OpenAPI G... |
5c69b7ef798b4101961398680d80060f94ca9bef | 1b94c7cfd66804fe8d40b5def35e4b9b18d69ba2 | /src/backend/api/api_trusted_parsers/tests/test_json_zebra_motion_parser.py | 0f4f2ea2e75e1c9ae8466b33ff20d9d99b0cdcfb | [
"MIT"
] | permissive | the-blue-alliance/the-blue-alliance | 3dc210a9611ce9b240907ffd420f78040318dcdc | 6d42f3cdb2f785d192f2871419e58aaae3445029 | refs/heads/py3 | 2023-08-22T21:02:36.398100 | 2023-08-22T19:14:01 | 2023-08-22T19:14:01 | 888,427 | 344 | 263 | MIT | 2023-09-14T18:35:20 | 2010-09-04T20:34:11 | HTML | UTF-8 | Python | false | false | 4,212 | py | test_json_zebra_motion_parser.py | import json
import unittest
from google.appengine.ext import testbed
from backend.api.api_trusted_parsers.json_zebra_motionworks_parser import (
JSONZebraMotionWorksParser,
)
from backend.common.datafeed_parsers.exceptions import ParserInputException
class TestJSONZebraMotionWorksParser(unittest.TestCase):
... |
88ea40ed22117c892a78d622447011ef617b04a0 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /chore/py/global与nonlocal区别.py | 0be834cac5e5b451ce56a0f8c93012009743ccd6 | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | global与nonlocal区别.py | # Global variables in recursion
# count=0
def foo(s):
count = 0
def bar(s):
global count # 注意此时全局变量里没有count 会报错 要用nonlocal
if len(s) != 0:
count += 1
bar(s)
print(count)
foo("as")
# !global查找比nonlocal查找快
# 参考1932. 合并多棵二叉搜索树
|
e99282db76bb1fb4d3abd8999e452a0fc44aafc6 | 3b93339109b69d1da43bbfbc17d40700594828a5 | /text2vec/bertmatching_dataset.py | 57f1ebc53dad0e9cefbdc35accf14f4493712254 | [
"Apache-2.0",
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | shibing624/text2vec | b6fda0958eddc436c936e25c1d373ab368c4e1f7 | c761ffc17b2eca0eb3795169f4d6acd4573c8f20 | refs/heads/master | 2023-07-20T01:38:21.139689 | 2023-07-17T08:31:19 | 2023-07-17T08:31:19 | 221,121,871 | 2,882 | 286 | Apache-2.0 | 2023-08-07T04:16:13 | 2019-11-12T03:27:57 | Python | UTF-8 | Python | false | false | 3,715 | py | bertmatching_dataset.py | # -*- coding: utf-8 -*-
"""
@author:XuMing(xuming624@qq.com)
@description:
"""
from datasets import load_dataset
from torch.utils.data import Dataset
from transformers import PreTrainedTokenizer
class BertMatchingTrainDataset(Dataset):
"""BERT文本匹配训练数据集, 重写__getitem__和__len__方法
return: (text, label),
... |
af6924022fa127f79fe0aa33dbf4c3e97091e313 | d7fd46dfd8aab520c4958fa065367e168b6bfee7 | /compiler_gym/envs/llvm/compute_observation.py | 3e745b3256c84af54ae3b481be487e046e25f953 | [
"MIT"
] | permissive | facebookresearch/CompilerGym | f04a79fbfdbaf8afd6920ec205db6f1b6003d073 | 9e0c0beb12da1e1ea82ae6ce920713ee28dda4c9 | refs/heads/development | 2023-08-31T09:17:48.967970 | 2023-03-10T19:29:56 | 2023-03-10T19:29:56 | 312,059,069 | 787 | 126 | MIT | 2023-03-10T19:29:58 | 2020-11-11T18:44:35 | Python | UTF-8 | Python | false | false | 3,988 | py | compute_observation.py | # 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.
"""This module defines a utility function for computing LLVM observations."""
import subprocess
from pathlib import Path
from typing import Lis... |
9f3a4950f7f91edf4bda645ad46a491e556b34c2 | 97e557d328b89adbd1459f8988a12ec3a9f4adc7 | /bind9/tests/common.py | 981a867630797495dec2c7817f390858f2a398d5 | [] | permissive | DataDog/integrations-extras | 1b9c9928af4e5a146b9611aed29db206f420710c | 1d20f8d945ef802fa6e01b41b6ba99148ac508a4 | refs/heads/master | 2023-08-31T04:01:33.555722 | 2023-08-30T18:51:09 | 2023-08-30T18:51:09 | 51,574,196 | 221 | 667 | BSD-3-Clause | 2023-09-14T16:07:56 | 2016-02-12T07:55:28 | Python | UTF-8 | Python | false | false | 198 | py | common.py | # (C) Datadog, Inc. 2019
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from datadog_checks.dev import get_here
HERE = get_here()
URL = 'http://10.10.1.101:8080'
|
971139bf92b746641e04f0fddea974a00108b3df | 3782e25b6db35d82d63bb81e398deab85ef2236e | /Autocoders/Python/src/fprime_ac/utils/EnumDictCheck.py | efd550912efbdf0e4b083b62e141b4f80f2ea568 | [
"Apache-2.0"
] | permissive | nasa/fprime | e0c8d45dfc0ff08b5ef6c42a31f47430ba92c956 | a56426adbb888ce4f5a8c6a2be3071a25b11da16 | refs/heads/devel | 2023-09-03T15:10:33.578646 | 2023-08-29T15:39:59 | 2023-08-29T15:39:59 | 95,114,723 | 10,071 | 1,426 | Apache-2.0 | 2023-09-08T14:31:00 | 2017-06-22T12:45:27 | C++ | UTF-8 | Python | false | false | 8,349 | py | EnumDictCheck.py | #!/usr/bin/env python3
import os
import sys
class EnumCheckResults:
"""
A structure used to report enumeration size errors.
"""
def __init__(self):
# Create a container to hold the overrun details. This will be
# an array. Each element of the array is a tuple containing the
... |
3b4bbf77cb34206a4f85bd9a27475008c4b06165 | 2b64c18cd4e415568039b00efaf8b633c1d7e91e | /edgedb/transaction.py | 511b8f42e51d618a22bed0f188fc4837a6cefbf0 | [
"Apache-2.0",
"Python-2.0"
] | permissive | edgedb/edgedb-python | 3181294588f2904431200967303066fe01cd3b81 | 717cd76b76c44b3d0472f2895be56fca74970e96 | refs/heads/master | 2023-08-30T18:03:43.569471 | 2023-07-25T03:14:35 | 2023-07-25T03:14:35 | 139,201,883 | 320 | 43 | Apache-2.0 | 2023-09-14T21:57:15 | 2018-06-29T22:37:25 | Python | UTF-8 | Python | false | false | 7,602 | py | transaction.py | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2016-present MagicStack Inc. and the EdgeDB 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... |
59965036ce0a2804960e143a5f50ced95488ae99 | ee327d13a6e71dd43412ab89092cf3ff5fceb132 | /larq/utils_test.py | c6ef9c0a0d00cf6cc40d7b6110d917b89625cd3f | [
"Apache-2.0"
] | permissive | larq/larq | 4150c22922efc498831d04f8a316372d30dd6348 | 5dc58e4f49c1b51554db822b87e6bf947031b990 | refs/heads/main | 2023-08-31T01:53:41.348448 | 2023-08-21T09:05:41 | 2023-08-21T09:05:41 | 176,374,098 | 615 | 76 | Apache-2.0 | 2023-09-11T18:07:34 | 2019-03-18T21:41:50 | Python | UTF-8 | Python | false | false | 1,280 | py | utils_test.py | from larq import utils
def test_memory_as_readable_str():
correct_strings = [ # 2^i bits, from i = 0 to 74
"0.12 B",
"0.25 B",
"0.50 B",
"1.00 B",
"2.00 B",
"4.00 B",
"8.00 B",
"16.00 B",
"32.00 B",
"64.00 B",
"128.00 B",
... |
8920fea270d140828e6820f05ef67c0db551d3c0 | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /src/transformers/models/dpt/convert_dpt_to_pytorch.py | cee5be88c3a250a89c3b15d329849378dbf2c110 | [
"Apache-2.0"
] | permissive | huggingface/transformers | ccd52a0d7c59e5f13205f32fd96f55743ebc8814 | 4fa0aff21ee083d0197a898cdf17ff476fae2ac3 | refs/heads/main | 2023-09-05T19:47:38.981127 | 2023-09-05T19:21:33 | 2023-09-05T19:21:33 | 155,220,641 | 102,193 | 22,284 | Apache-2.0 | 2023-09-14T20:44:49 | 2018-10-29T13:56:00 | Python | UTF-8 | Python | false | false | 11,781 | py | convert_dpt_to_pytorch.py | # coding=utf-8
# Copyright 2022 The HuggingFace Inc. 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... |
3e116b370c5b51fd70c93f61106214a25dae944b | f71ea031e1df51e8fbf20899788830ac079c7609 | /spidermon/contrib/pytest/plugins/filter_monitors.py | 8a7e783a9f3dc6bd48186b2ae01d936a927617ff | [
"BSD-3-Clause"
] | permissive | scrapinghub/spidermon | d4177399a38610f876842e1a6b6d47b19381f716 | ea21cee8f42261c99278a6b4582a19b32224ef47 | refs/heads/master | 2023-08-31T17:06:04.520859 | 2023-08-31T09:10:51 | 2023-08-31T09:10:51 | 46,345,612 | 492 | 105 | BSD-3-Clause | 2023-09-13T20:41:43 | 2015-11-17T12:27:38 | Python | UTF-8 | Python | false | false | 351 | py | filter_monitors.py | import pytest
from spidermon import Monitor
def pytest_report_header(config):
return "Spidermon monitor filtering"
@pytest.mark.trylast
def pytest_collection_modifyitems(session, config, items):
items[:] = [
item
for item in items
if hasattr(item, "cls") and not (item.cls and issubc... |
a0fc0e3675a21f72d75b14895e209d8c77f2fd52 | 8de1480d6511ac81c43ebb1fa50875adb1505c3b | /awx/main/models/unified_jobs.py | 8dcb5df84983b7b9139e416ad2ee4280c19a0a9e | [
"Apache-2.0"
] | permissive | ansible/awx | bbbb0f3f43835a37fbb3eb3dcd7cfe98116fbbba | 5e105c2cbd3fe828160540b3043cf6f605ed26be | refs/heads/devel | 2023-08-31T11:45:01.446444 | 2023-08-31T04:58:57 | 2023-08-31T04:58:57 | 91,594,105 | 13,353 | 4,186 | NOASSERTION | 2023-09-14T20:20:07 | 2017-05-17T15:50:14 | Python | UTF-8 | Python | false | false | 64,866 | py | unified_jobs.py | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
from io import StringIO
import datetime
import decimal
import codecs
import json
import logging
import os
import re
import socket
import subprocess
import tempfile
from collections import OrderedDict
# Django
from django.conf import settings
from djan... |
e60c56670e45a1cffd816632d3ad499cd4d2c74e | 9ed3b16b3da72e4c47a04f2f2e3ef395e9fd9f20 | /main/xcb-util-wm/template.py | b5f09cedb93c619234e1252aaea1dcbe955e983c | [
"BSD-2-Clause"
] | permissive | chimera-linux/cports | fdae59dc25856942be3041e10e3533dbf8f883c3 | 714680161cd719dd047452c95fbb9b447bc23a86 | refs/heads/master | 2023-09-03T19:30:40.720670 | 2023-09-03T15:07:40 | 2023-09-03T15:07:40 | 374,000,317 | 118 | 37 | BSD-2-Clause | 2023-09-14T20:31:08 | 2021-06-05T02:07:34 | Python | UTF-8 | Python | false | false | 650 | py | template.py | pkgname = "xcb-util-wm"
pkgver = "0.4.2"
pkgrel = 1
build_style = "gnu_configure"
make_cmd = "gmake"
hostmakedepends = ["pkgconf", "gmake", "xorg-util-macros"]
makedepends = ["xcb-util-devel"]
pkgdesc = "XCB utilities library - window manager helpers for ICCCM"
maintainer = "q66 <q66@chimera-linux.org>"
license = "MIT"... |
7f94bad21a09c3d71c43902a631921f218c31173 | 1e528494a929deada984822438b3ab569762e6c6 | /rx/linq/observable/throw.py | 2155b33034ee5393293cb7d94b146d89365c5d09 | [
"MIT"
] | permissive | Sprytile/Sprytile | a0233a00a243f263691921d7e1f6af05c5eb5442 | 6b68d0069aef5bfed6ab40d1d5a94a3382b41619 | refs/heads/master | 2022-07-10T06:54:01.003723 | 2020-09-26T07:25:35 | 2020-09-26T07:25:35 | 72,276,917 | 860 | 91 | MIT | 2022-07-07T23:37:19 | 2016-10-29T09:47:09 | Python | UTF-8 | Python | false | false | 1,258 | py | throw.py | from rx.core import Observable, AnonymousObservable
from rx.concurrency import immediate_scheduler
from rx.internal import extensionclassmethod
@extensionclassmethod(Observable, alias="throw_exception")
def throw(cls, exception, scheduler=None):
"""Returns an observable sequence that terminates with an exception... |
23d48b7dc3cf55b746216bd3ee982838a4be922e | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Utilities/StorageFactory/test/test_single_file_statistics_sender_cfg.py | 0576542a5e9347a45e823719e68cff54b722a139 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 371 | py | test_single_file_statistics_sender_cfg.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("TEST")
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring("file:stat_sender_first.root"))
process.add_(cms.Service("StatisticsSenderService", debug = cms.untracked.bool(True)))
process.load("FWCore.MessageService.MessageLogger_... |
808b36d3eda081f0859c0e8b75d4bedbf03fcd86 | 3256af0d6c19732bb84b256a9f792aaf7f3d901a | /f5/iworkflow/shared/authz/user.py | f7c750989b48d37e8ae39027c0cd4e19af47699d | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | F5Networks/f5-common-python | 73e33ea489d989399d205077163f24ce584d83b9 | 3050df0079c2426af99b9a1b8f93d0b512468ff4 | refs/heads/development | 2023-08-29T10:11:23.713392 | 2022-09-21T02:45:03 | 2022-09-21T02:45:03 | 45,062,555 | 286 | 180 | Apache-2.0 | 2023-05-12T23:13:03 | 2015-10-27T18:48:06 | Python | UTF-8 | Python | false | false | 1,719 | py | user.py | # coding=utf-8
#
# Copyright 2014-2016 F5 Networks 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 la... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.