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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
51f8dd0fcc33da09eebeff0ed99acc61cb6159a6 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_products_operations.py | 55db1d24bfe14b1d0da005187a83aa6d8037329c | [
"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 | 39,045 | py | _products_operations.py | # pylint: disable=too-many-lines
# 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) AutoRe... |
19db7b320da4046498a26badff23e9a7401d6a00 | 2337351b228818e41be3002bd38f68f77c2aa074 | /sa/profiles/CData/xPON/get_arp.py | 9f39e0f564a8d18ef0276691e26d6f8ece1cdba4 | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 1,267 | py | get_arp.py | # ---------------------------------------------------------------------
# CData.xPON.get_arp
# ---------------------------------------------------------------------
# Copyright (C) 2007-2022 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python modul... |
00466cdcf26a7f4441642f195e233771343a21ea | d540a0d7c5e1c3676f7d765a04f119a6b270abcf | /homework/02/test.py | 99ac2458b721c71ff3540ffea0edb77b6ee42bf4 | [
"MIT"
] | permissive | mtrempoltsev/msu_cpp_lectures | 91e93b83be5d896c580a5233272a0bd687e832b7 | 81ea1003d4d365b33391696f56a93c578e6e599d | refs/heads/master | 2022-09-21T04:02:31.902777 | 2022-08-29T18:16:51 | 2022-08-29T18:16:51 | 150,443,779 | 165 | 120 | MIT | 2022-09-19T20:12:14 | 2018-09-26T14:54:58 | C++ | UTF-8 | Python | false | false | 1,431 | py | test.py | import subprocess
import time
def run(command):
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
out = process.stdout.readlines()
code = process.wait()
return code, out
def test(command, expected_code, expected_value):
print command
code, out = ... |
2ea2a3e6f52fb4b6d549ef5089f9caed4cf4352b | edca7e5d1f5247fd6807840e5f9caf2700839787 | /tests/cli/simple_mp4_parser.py | 3fd6ae5241137a0a9f8355f60fa7fd8b2c53438e | [
"BSD-2-Clause"
] | permissive | mapillary/mapillary_tools | e0e91e458e4287220e7786747c306c8f8ac8360b | 338bffd28bf501caeb29ebebbd953124922b0401 | refs/heads/main | 2023-08-31T01:16:33.130949 | 2023-08-25T07:46:13 | 2023-08-25T07:46:13 | 18,833,475 | 236 | 153 | BSD-2-Clause | 2023-09-13T12:53:04 | 2014-04-16T09:05:12 | Python | UTF-8 | Python | false | false | 7,815 | py | simple_mp4_parser.py | import argparse
import io
import logging
import pathlib
import sys
import typing as T
from mapillary_tools import utils
from mapillary_tools.geotag import (
construct_mp4_parser as cparser,
mp4_sample_parser as sample_parser,
simple_mp4_parser as parser,
)
LOG = logging.getLogger(__name__)
box_list_types... |
ca4323c702e5ce28c7f7fe679888f0794fe76c78 | 3f70e754981a941dbc3a24d15edb0a5abe3d4788 | /yotta/init.py | 3d9f78dd21edc47f1a592f9528b534794b70f3fc | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ARMmbed/yotta | 66cfa634f03a25594311a569ea369a916cff70bf | 82d854b43d391abb5a006b05e7beffe7d0d6ffbf | refs/heads/master | 2023-03-16T11:57:12.852163 | 2021-01-15T13:49:47 | 2021-01-15T13:49:47 | 16,579,440 | 184 | 87 | Apache-2.0 | 2021-01-15T13:46:43 | 2014-02-06T13:03:45 | Python | UTF-8 | Python | false | false | 7,752 | py | init.py | # Copyright 2014 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
# standard library modules, , ,
from __future__ import print_function
import os
import logging
import re
# Component, , represents an installed component, internal
from yotta.lib import component
# version,... |
bcf3cedd1ed18b7b11b941b70301e2c2c2d88052 | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /checkov/terraform/checks/resource/aws/StateMachineLoggingExecutionHistory.py | 5083984ce7333cf72cba363aa7dc409f168af37d | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 706 | py | StateMachineLoggingExecutionHistory.py | from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
from checkov.common.models.enums import CheckCategories
class StateMachineLoggingExecutionHistory(BaseResourceValueCheck):
def __init__(self):
name = "Ensure State Machine has execution history logging enabled"... |
3830cf161feebdfee907c840c906d1f6ed31270d | ec7b8378698ed9dfc5e62b94c20524bf3aefc3c3 | /tests/models/test_hovernet.py | bf77b46ba523979149e03b45274694cffb883516 | [
"BSD-3-Clause"
] | permissive | TissueImageAnalytics/tiatoolbox | 52fe15704b396a055d9b4fccc678787ef489aed8 | f26387f46f675a7b9a8a48c95dad26e819229f2f | refs/heads/develop | 2023-08-16T15:47:19.282604 | 2023-08-14T16:50:45 | 2023-08-14T16:50:45 | 267,705,904 | 222 | 44 | NOASSERTION | 2023-09-14T16:57:15 | 2020-05-28T22:02:51 | Python | UTF-8 | Python | false | false | 4,892 | py | test_hovernet.py | """Unit test package for HoVerNet."""
from typing import Callable
import numpy as np
import pytest
import torch
from torch import nn
from tiatoolbox.models import HoVerNet
from tiatoolbox.models.architecture import fetch_pretrained_weights
from tiatoolbox.models.architecture.hovernet import (
DenseBlock,
Res... |
987687fad5e07af7df82893b5bb2f7e6e1c2aa64 | a41e1498e3c080f47abd8e8e57157548df3ebbf1 | /pandas/io/sas/sas_constants.py | 62c17bd03927e5f852af708e6b9ef6cf7e74d57c | [
"BSD-3-Clause"
] | permissive | pandas-dev/pandas | e7e639454a298bebc272622e66faa9829ea393bb | c7325d7e7e77ecb4a4e57b48bc25265277c75712 | refs/heads/main | 2023-09-01T12:42:07.927176 | 2023-09-01T11:14:10 | 2023-09-01T11:14:10 | 858,127 | 36,166 | 18,728 | BSD-3-Clause | 2023-09-14T21:18:41 | 2010-08-24T01:37:33 | Python | UTF-8 | Python | false | false | 8,719 | py | sas_constants.py | from __future__ import annotations
from typing import Final
magic: Final = (
b"\x00\x00\x00\x00\x00\x00\x00\x00"
b"\x00\x00\x00\x00\xc2\xea\x81\x60"
b"\xb3\x14\x11\xcf\xbd\x92\x08\x00"
b"\x09\xc7\x31\x8c\x18\x1f\x10\x11"
)
align_1_checker_value: Final = b"3"
align_1_offset: Final = 32
align_1_length:... |
382aabb090614be5f29b7c42e1330fe4f94844e6 | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-securitycenter/google/cloud/securitycenter_v1p1beta1/types/finding.py | a5cf4156a79917d9604755218e5aa5e0055cdde5 | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 7,735 | py | finding.py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
9881e198376e0d2d2ecf00ad89d7f94d6ce022b5 | fce81b804cae23f525a5ad4370b684bf0dc531a5 | /numpy/f2py/tests/test_module_doc.py | 28822d405cc02ac2ce5cc214c27271a199612349 | [
"Zlib",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | numpy/numpy | ba2abcc1d2d46affbb6aabe5aed6407b4b57507e | dc2ff125493777a1084044e6cd6857a42ee323d4 | refs/heads/main | 2023-09-05T10:10:52.767363 | 2023-09-04T18:03:29 | 2023-09-04T18:03:29 | 908,607 | 25,725 | 11,968 | BSD-3-Clause | 2023-09-14T21:26:09 | 2010-09-13T23:02:39 | Python | UTF-8 | Python | false | false | 863 | py | test_module_doc.py | import os
import sys
import pytest
import textwrap
from . import util
from numpy.testing import IS_PYPY
class TestModuleDocString(util.F2PyTest):
sources = [
util.getpath("tests", "src", "module_data",
"module_data_docstring.f90")
]
@pytest.mark.skipif(sys.platform == "win32... |
3b92234e97f19f42db9f1484bd423c90a55289d4 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/AlipayFundScenepayAuthorizeQueryModel.py | 006a8c878eeb92662ed8a59aa2dd127a23830426 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 4,370 | py | AlipayFundScenepayAuthorizeQueryModel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.ScenePayParticipantInfoDTO import ScenePayParticipantInfoDTO
from alipay.aop.api.domain.ScenePayParticipantInfoDTO import ScenePayParticipantInfoDTO
class AlipayFundScenepayAuthor... |
e77be61109449bb7af85aaf74d29bb1dc2df8461 | f7dc806f341ef5dbb0e11252a4693003a66853d5 | /platform/web/serve.py | 6a3efcc4637f772457ec0bb89fdedd2e40f0cc6d | [
"CC-BY-3.0",
"LicenseRef-scancode-free-unknown",
"MIT",
"CC-BY-4.0",
"OFL-1.1",
"Bison-exception-2.2",
"CC0-1.0",
"LicenseRef-scancode-nvidia-2002",
"LicenseRef-scancode-other-permissive",
"GPL-3.0-only",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"BSL-1.0",
"Apache-2.0"... | permissive | godotengine/godot | 8a2419750f4851d1426a8f3bcb52cac5c86f23c2 | 970be7afdc111ccc7459d7ef3560de70e6d08c80 | refs/heads/master | 2023-08-21T14:37:00.262883 | 2023-08-21T06:26:15 | 2023-08-21T06:26:15 | 15,634,981 | 68,852 | 18,388 | MIT | 2023-09-14T21:42:16 | 2014-01-04T16:05:36 | C++ | UTF-8 | Python | false | false | 1,862 | py | serve.py | #!/usr/bin/env python3
from http.server import HTTPServer, SimpleHTTPRequestHandler, test # type: ignore
from pathlib import Path
import os
import sys
import argparse
import subprocess
class CORSRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header("Cross-Origin-Opener-Policy... |
3e8d274c4e11df1dc6493921c7340c5a60ed0174 | e441a2f416c83f04889ecd43d6b6bdcf5172b287 | /web3/middleware/__init__.py | 76fc62ed45f1ac3b75bd356455163f49da23dc7c | [
"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 | 3,848 | py | __init__.py | import functools
from typing import (
Coroutine,
TYPE_CHECKING,
Any,
Callable,
Sequence,
)
from web3.types import (
AsyncMiddleware,
Middleware,
RPCEndpoint,
RPCResponse,
)
from .abi import ( # noqa: F401
abi_middleware,
)
from .async_cache import ( # noqa: F401
_async_si... |
e67bbde4ad66835729f32d66502723ee7ed42d6f | c675ff5fcd3b13fa39352bb8cac11d75262659a8 | /tests/test_scheduler/test_timeoutscheduler.py | 2a9e119acc94dacb9392677cf16aa47418390414 | [
"MIT"
] | permissive | ReactiveX/RxPY | 469eb714996c205989e99899a6f1ab1ae2f42dd0 | af1663d35810fdcd4c25a3ed2e8f0d71b55c341d | refs/heads/master | 2023-08-14T19:27:40.086304 | 2023-01-08T10:02:08 | 2023-03-04T15:33:19 | 8,946,089 | 4,764 | 467 | MIT | 2023-09-05T02:53:16 | 2013-03-22T06:16:54 | Python | UTF-8 | Python | false | false | 2,853 | py | test_timeoutscheduler.py | import os
import threading
import unittest
from datetime import timedelta
from time import sleep
import pytest
from reactivex.internal.basic import default_now
from reactivex.scheduler import TimeoutScheduler
CI = os.getenv("CI") is not None
class TestTimeoutScheduler(unittest.TestCase):
def test_timeout_singl... |
34c5c7457869c3db3c50f87efb1a86efcdd55eee | 5290e0fa51f5bc0f5244610a2251b58aadfab938 | /vision/utils/model_book.py | b1e9d17e9c3467e3261b5f4e962887f714b5bff0 | [
"MIT"
] | permissive | qfgaohao/pytorch-ssd | ab9aa3c3d9220aa34b67e3130aa059756001d4cb | 7a839cbc8c3fb39679856b4dc42a1ab19ec07581 | refs/heads/master | 2023-07-30T02:44:24.162185 | 2023-03-11T09:50:27 | 2023-03-11T09:50:27 | 133,904,817 | 1,481 | 541 | MIT | 2023-02-21T00:56:51 | 2018-05-18T04:56:09 | Python | UTF-8 | Python | false | false | 2,390 | py | model_book.py | from collections import OrderedDict
import torch.nn as nn
class ModelBook:
"""Maintain the mapping between modules and their paths.
Example:
book = ModelBook(model_ft)
for p, m in book.conv2d_modules():
print('path:', p, 'num of filters:', m.out_channels)
assert m is b... |
f7feb81333dce676a6f9eefef54e3bd9baefc016 | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /hummingbot/strategy/spot_perpetual_arbitrage/spot_perpetual_arbitrage_config_map.py | 2c992d64819b9c031c056fdf7f80c442c1d00166 | [
"Apache-2.0"
] | permissive | CoinAlpha/hummingbot | 0d1e2bd94de1280748647108c7d7800a09546eb8 | c3f101759ab7e7a2165cd23a3a3e94c90c642a9b | refs/heads/development | 2023-09-01T11:24:43.322137 | 2023-08-31T03:08:06 | 2023-08-31T03:08:06 | 439,330,952 | 135 | 98 | Apache-2.0 | 2023-08-30T13:55:08 | 2021-12-17T12:50:42 | Python | UTF-8 | Python | false | false | 5,762 | py | spot_perpetual_arbitrage_config_map.py | from decimal import Decimal
from hummingbot.client.config.config_validators import (
validate_connector,
validate_decimal,
validate_derivative,
validate_int,
validate_market_trading_pair,
)
from hummingbot.client.config.config_var import ConfigVar
from hummingbot.client.settings import AllConnector... |
29da26c110eb7de0f24f8f8bb531220817bac7bd | ffb0b623455f22af81a03eb52889bd1bfed50566 | /src/bandersnatch/tests/test_configuration.py | 92b8d384fba0efd6c62f8810a60f9994910cd460 | [
"AFL-3.0"
] | permissive | pypa/bandersnatch | c5ba356caae55e4edb80005da625b04e7fb70500 | bf19ea547086c1b9dd997d1dc00081109b5cd626 | refs/heads/main | 2023-09-03T03:27:19.538217 | 2023-08-28T23:55:04 | 2023-08-28T23:55:04 | 133,377,409 | 405 | 157 | AFL-3.0 | 2023-09-13T10:46:33 | 2018-05-14T14:52:22 | Python | UTF-8 | Python | false | false | 6,629 | py | test_configuration.py | import configparser
import importlib.resources
import os
import unittest
from tempfile import TemporaryDirectory
from unittest import TestCase
from bandersnatch.configuration import (
BandersnatchConfig,
SetConfigValues,
Singleton,
validate_config_values,
)
from bandersnatch.simple import SimpleFormat
... |
9470d3c7fa856094752b5c35f40bc2beb8bdbc65 | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/pytests/integration/ssh/test_raw.py | 27fa31d4f1d26c986aded32b1bb10a93bd1a830d | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 505 | py | test_raw.py | import pytest
pytestmark = [
pytest.mark.slow_test,
pytest.mark.skip_on_windows(reason="salt-ssh not available on Windows"),
]
def test_ssh_raw(salt_ssh_cli):
"""
test salt-ssh with -r argument
"""
msg = "password: foo"
ret = salt_ssh_cli.run("--raw", "echo", msg, _timeout=60)
assert ... |
ab0b98a5410b575d1c4e7f91a8707632b56dcf65 | 1742b6719b988e5519373002305e31d28b8bd691 | /sdk/python/pulumi_aws/cloudwatch/get_log_groups.py | 517eb8a606c6ce4a65ae9da61dbeb2fa1c3a6549 | [
"BSD-3-Clause",
"Apache-2.0",
"MPL-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 | 4,271 | py | get_log_groups.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... |
7827fc966461437192eba9e0a48eb08f3a034ea8 | 3f55217e912141e04815bc8bcb6fbd5638d0896e | /build_utils/find_libs.py | 15762bab89b0d9797db30731ea52077d7fdc487b | [
"BSD-2-Clause"
] | permissive | NREL/Radiance | bfbb93c99d86368ad0f27052a2a5504aeced47f8 | 2fcca99ace2f2435f32a09525ad31f2b3be3c1bc | refs/heads/master | 2021-12-26T12:42:04.586614 | 2021-12-18T00:43:56 | 2021-12-18T00:43:56 | 8,210,805 | 164 | 68 | NOASSERTION | 2019-06-06T19:57:11 | 2013-02-15T00:47:56 | C | UTF-8 | Python | false | false | 3,418 | py | find_libs.py | from __future__ import division, print_function, unicode_literals
import os
from SCons.SConf import SConf # aka Configure
def find_radlib(env):
v = env.FindFile('helvet.fnt', './lib')
if not v:
print('''
Radiance auxiliary support files not found.
-> Download from radiance-online.org and extract.
''')
env.E... |
bf163b14d319e5936fc5443f8897502dcf5fa641 | e4b940707c32882d248fda5cccdf513af8f52188 | /docs/screenshots/administrator/scene_basic.py | c6f33ddcf20a43730c7c84ea574602cadcfa1e6d | [
"Apache-2.0"
] | permissive | byro/byro | 5ca0d5cd6470ee18400432e85420d5594f54d927 | 3b757a4fd567a352f34c9e6638408bc98d144d03 | refs/heads/main | 2023-09-02T04:16:12.817733 | 2023-08-01T23:45:44 | 2023-08-02T11:44:34 | 100,076,395 | 144 | 56 | Apache-2.0 | 2023-09-12T23:39:11 | 2017-08-11T23:21:34 | Python | UTF-8 | Python | false | false | 1,150 | py | scene_basic.py | import pytest
from utils import screenshot
@pytest.mark.django_db
def shot_login(client):
client.go_to("common:login")
screenshot(client, "common_login.png")
@pytest.mark.django_db
def shot_dashboard(logged_in_client, full_testdata):
logged_in_client.go_to("office:dashboard")
screenshot(logged_in_c... |
c0b818887c1aa5587dbfe88531d0f435199a2a68 | 3395a234e7c80d011607e79c49cd48bf516f256b | /dependencies/jedi/third_party/typeshed/third_party/2and3/werkzeug/script.pyi | b9db97a0051a21c594e7f74179eea4ae82ce2479 | [
"MIT",
"Apache-2.0"
] | permissive | srusskih/SublimeJEDI | 67329b72e184bc9584843968dcc534a002c797a1 | 95c185d778425c04536d53517b0e3fe6dedf8e59 | refs/heads/master | 2023-08-24T11:30:37.801834 | 2022-08-30T09:04:17 | 2022-08-30T09:04:17 | 6,241,108 | 669 | 125 | MIT | 2022-08-30T09:04:18 | 2012-10-16T08:23:57 | Python | UTF-8 | Python | false | false | 759 | pyi | script.pyi | from typing import Any, Optional
argument_types: Any
converters: Any
def run(namespace: Optional[Any] = ..., action_prefix: str = ..., args: Optional[Any] = ...): ...
def fail(message, code: int = ...): ...
def find_actions(namespace, action_prefix): ...
def print_usage(actions): ...
def analyse_action(func): ...
def... |
69d3e4e8ad27a582d8b610081651c82184119c95 | 686177a1034cee76ad040c62e3d3e49d44a9ee7a | /src/collectors/http/http.py | 1f5c73e4a13b71e7b21a4a743abf99dd3810a812 | [
"MIT"
] | permissive | python-diamond/Diamond | 8fce83a3d883dfa05b664fdd5cb6064f34c4ac41 | 461caf29e84db8cbf46f9fc4c895f56353e10c61 | refs/heads/master | 2023-07-20T01:44:18.504408 | 2023-01-29T19:46:36 | 2023-01-29T19:46:36 | 13,512,018 | 1,874 | 824 | MIT | 2023-07-10T11:06:38 | 2013-10-11T23:32:13 | Python | UTF-8 | Python | false | false | 3,124 | py | http.py | # coding=utf-8
"""
Collect statistics from a HTTP or HTTPS connexion
#### Dependencies
* urllib2
#### Usage
Add the collector config as :
enabled = True
ttl_multiplier = 2
path_suffix = ""
measure_collector_time = False
byte_unit = byte,
req_vhost = www.my_server.com
req_url = https://www.my_server.com/, https://... |
b02b3f9175530465cabb2c9e48d19df4343fbaf8 | 8a85eb9b50864626cd2674f15b07df3d5dbe0b73 | /neo/rawio/neuroscoperawio.py | 80f2ec22b439e903651c16bdc174d0890141e99b | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | NeuralEnsemble/python-neo | 287d3457a44c45f4dcbee0e9f9a2a5d83142de69 | 354c8d9d5fbc4daad3547773d2f281f8c163d208 | refs/heads/master | 2023-09-06T03:29:34.835053 | 2023-09-01T09:17:14 | 2023-09-01T09:17:14 | 3,949,530 | 265 | 213 | BSD-3-Clause | 2023-09-14T19:09:24 | 2012-04-06T12:48:48 | Python | UTF-8 | Python | false | false | 7,669 | py | neuroscoperawio.py | """
Reading from neuroscope format files.
Ref: http://neuroscope.sourceforge.net/
It is an old format from Buzsaki's lab
Some old open datasets from spike sorting
are still using this format.
This only the signals.
This should be done (but maybe never will):
* SpikeTrain file '.clu' '.res'
* Event '.ext.evt'... |
7ae9ec30ea3c9bcd92e4338b81b27296e822078d | 1742b6719b988e5519373002305e31d28b8bd691 | /sdk/python/pulumi_aws/lex/get_bot.py | 0931ec2da951118aa586a38d54f4a882b46885d9 | [
"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 | 11,890 | py | get_bot.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... |
1982d18d2655c6d9240c14fa3db6843c26726bc5 | 5396a46275e52bfc972f05097e925742d5bbf2d1 | /_2017/eoc/chapter1.py | 0f3d18e6a17e6ad0b137819d06f285b96dc4641d | [
"MIT"
] | permissive | 3b1b/videos | 6ab0e4fe0fb07d15b5455f8726131a880437c42c | e841b1410fdda2d3bddb7cfa12ce070a3b66a026 | refs/heads/master | 2023-08-29T01:37:23.424512 | 2023-08-16T03:35:03 | 2023-08-16T03:35:03 | 325,873,493 | 4,601 | 1,868 | null | 2023-03-30T08:15:37 | 2020-12-31T21:07:33 | Python | UTF-8 | Python | false | false | 87,436 | py | chapter1.py | from manim_imports_ext import *
from _2017.eoc.chapter2 import Car, MoveCar
class Eoc1Thumbnail(GraphScene):
CONFIG = {
}
def construct(self):
title = OldTexText(
"The Essence of\\\\Calculus",
tex_to_color_map={
"\\emph{you}": YELLOW,
},
... |
f4927c9553c38f14487d78826735581a144b93fc | 85373d45a83e4096affafa4f4e5b400787413e57 | /test/programytest/parser/template/node_tests/test_conditiontype2.py | a3134463aacf75f9c96e19a3dd309c5e230a483c | [
"MIT"
] | permissive | keiffster/program-y | a02bb9d8278835547cc875f4f9cd668d5b1f44da | fc7b0a3afa4fa6ed683e0c817a9aa89f9543bb20 | refs/heads/master | 2023-08-23T13:55:39.255535 | 2022-12-13T09:51:57 | 2022-12-13T09:51:57 | 74,462,571 | 379 | 173 | NOASSERTION | 2023-05-23T00:51:21 | 2016-11-22T10:43:41 | Python | UTF-8 | Python | false | false | 10,368 | py | test_conditiontype2.py | from unittest.mock import patch
import xml.etree.ElementTree as ET
from programy.dialog.question import Question
from programy.parser.template.nodes.base import TemplateNode
from programy.parser.template.nodes.condition import TemplateConditionListItemNode
from programy.parser.template.nodes.condition import TemplateCo... |
6b88effd63d4a4407b81c0f1d0ea6e4c92dc887d | e2e34d01afc5b6bc6923a721ef92e8ffa8884f86 | /tests/endtoend/eventgrid_functions/eventgrid_output_binding/__init__.py | 817e3139616bfa262e702273aabc197b3771dc67 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-functions-python-worker | 094340eeb0c4728e3202749027f01ab75e908bd8 | d4bdf7edc544b6c15e541930f890da790b180ebd | refs/heads/dev | 2023-08-22T22:48:01.645722 | 2023-08-14T14:52:42 | 2023-08-14T14:52:42 | 117,730,503 | 329 | 122 | MIT | 2023-09-01T16:54:58 | 2018-01-16T19:23:54 | Python | UTF-8 | Python | false | false | 1,297 | py | __init__.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from datetime import datetime
import azure.functions as func
def main(req: func.HttpRequest,
outputEvent: func.Out[func.EventGridOutputEvent]) -> func.HttpResponse:
test_uuid = req.params.get('test_uuid')
... |
16d387a3d587b93891ba6873d41c977b4c77c858 | 7343ece3b82ac87a594865c4074623b45b0297b4 | /synapse/module_api/callbacks/__init__.py | dcb036552bce5a37cbda1a334d1367b5ba0d94ac | [
"Apache-2.0"
] | permissive | matrix-org/synapse | a00111f83310783b78e2996557f8bbae4d9fb229 | d35bed8369514fe727b4fe1afb68f48cc8b2655a | refs/heads/develop | 2023-09-05T05:24:20.808942 | 2023-09-04T16:14:09 | 2023-09-04T16:14:09 | 22,844,864 | 12,215 | 2,869 | Apache-2.0 | 2023-09-14T15:20:48 | 2014-08-11T15:51:42 | Python | UTF-8 | Python | false | false | 1,318 | py | __init__.py | # Copyright 2023 The Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
bb2d976b5e7a2386a436d89824a2cf647a3e8690 | 814473697db9612e7c5ff3d6c5e0c5bf8882253b | /tests/test_rendering.py | 677497acea7f0007ea9ef4011f44d5c1b35733be | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Hrabal/TemPy | c75fd0c3d298dcb7c7b019629c374e6efc25e97e | 92f8c88ce9b06f585cdc092e419f95ef0c948665 | refs/heads/master | 2022-07-30T10:13:39.881280 | 2022-07-18T15:42:44 | 2022-07-18T15:42:44 | 92,857,015 | 166 | 91 | Apache-2.0 | 2022-04-06T16:02:18 | 2017-05-30T17:08:40 | Python | UTF-8 | Python | false | false | 1,956 | py | test_rendering.py | # -*- coding: utf-8 -*-
"""
@author: Federico Cerchiari <federicocerchiari@gmail.com>
"""
import os
import unittest
from collections import Counter
from tempy.tags import Html, Head, Body, Link, Div, A, P, Meta, Title
from tempy import render_template
class TestRender(unittest.TestCase):
def test_render_template... |
9c9f106646bf46714429451bc269c1190e814260 | ea57d267ab31480d8d731b2c095e9da9ad989133 | /tests/test_aea/test_cli/test_generate_key.py | 982f5ee59225908e753f42e99546a23df0bef7e9 | [
"Apache-2.0"
] | permissive | fetchai/agents-aea | 6d034f1db6f3beacf31dac2f5a1baaa60c8edb7d | bec49adaeba661d8d0f03ac9935dc89f39d95a0d | refs/heads/main | 2023-08-08T23:19:06.276643 | 2023-02-04T10:46:39 | 2023-02-04T10:46:39 | 203,558,879 | 192 | 58 | Apache-2.0 | 2023-07-19T04:45:26 | 2019-08-21T10:12:47 | Python | UTF-8 | Python | false | false | 8,616 | py | test_generate_key.py | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2023 Fetch.AI Limited
#
# 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 ... |
d2ffd21580105bd341974c7f5e2ddd9c7f96257f | 39a446531a94bdebfe4ec15dc29451d0d0560485 | /tests/test_vcs.py | 8890f6f9a90284f6fb7dedc3008b2e32b9f0b0dc | [
"BSD-2-Clause"
] | permissive | olofk/edalize | b5317fa955893a6a061ab5195d937281a7a5ff77 | c7e7f0e2fb3e75a86e07ec6dfb9de896560e8c89 | refs/heads/main | 2023-08-31T14:49:50.581938 | 2023-08-10T19:00:35 | 2023-08-16T13:10:30 | 132,811,303 | 550 | 163 | BSD-2-Clause | 2023-08-24T10:15:47 | 2018-05-09T20:48:49 | Python | UTF-8 | Python | false | false | 1,520 | py | test_vcs.py | from .edalize_common import make_edalize_test
def run_vcs_test(tf):
tf.backend.configure()
tf.compare_files(["Makefile", tf.test_name + ".scr"])
tf.backend.build()
tf.compare_files(["vcs.cmd"])
tf.backend.run()
tf.compare_files(["run.cmd"])
def test_vcs_tool_options(make_edalize_test):
... |
aaad8eac5386ec0df7cbaf6b952e5e18e3e80eae | 2b3bbfc742ad6a2529f2906193c3c5263ebd5fac | /src/app/application/algorithm/wscript | ac6f87f506b109fbf2010c75ffbce2a373982e09 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | permissive | foxBMS/foxbms-2 | 35502ef8441dfc7374fd6c0839e7f5328a5bda8f | 9eb6d1c44e63e43e62bbf6983b2e618fb6ad02cc | refs/heads/master | 2023-05-22T05:30:25.862475 | 2023-02-23T15:03:35 | 2023-02-24T15:04:15 | 353,751,476 | 151 | 80 | NOASSERTION | 2023-09-01T09:59:30 | 2021-04-01T15:52:24 | C | UTF-8 | Python | false | false | 4,342 | wscript | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2010 - 2023, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provid... | |
18b73ce74f04e46b18800a029ea7914bf2ebb3b6 | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/containerregistry/v20230701/get_webhook_callback_config.py | 8c2a1d8b720fcf124e34f4bf99ed16498638edea | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 3,944 | py | get_webhook_callback_config.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__all__ ... |
b6e83297e29cd45403836e7b01495895e1ee01a7 | 9fcb5164ff77e8cf48d860485fed262d36ed63e7 | /pkgpanda/__init__.py | 48e6913e81788c3f1e16f839114b34b30b3f1366 | [
"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 | 38,981 | py | __init__.py | """
See `docs/package_concepts.md` for the package layout.
Packages have ids. Ids are composed of a name + blob. The blob is never
introspected by the packaging stuff.
Each package contains a pkginfo.json. That contains a list of requires as well as
environment variables from the package.
"""
import json
import log... |
ff9585c77eb17433605f6a6ab1575ac1f04c7618 | d17a8870ff8ac77b82d0d37e20c85b23aa29ca74 | /lite/tests/unittest_py/op/common/test_uniform_random_op_base.py | 7a6981c22c2ec137052f82ba99df6301f64255fe | [
"Apache-2.0"
] | permissive | PaddlePaddle/Paddle-Lite | 4ab49144073451d38da6f085a8c56822caecd5b2 | e241420f813bd91f5164f0d9ee0bc44166c0a172 | refs/heads/develop | 2023-09-02T05:28:14.017104 | 2023-09-01T10:32:39 | 2023-09-01T10:32:39 | 104,208,128 | 2,545 | 1,041 | Apache-2.0 | 2023-09-12T06:46:10 | 2017-09-20T11:41:42 | C++ | UTF-8 | Python | false | false | 2,430 | py | test_uniform_random_op_base.py | # Copyright (c) 2021 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 appli... |
c8d67f152deeb0f5d0b7e2313ae36285d7ffa4c6 | 557a5e8ac000718959281d1d31da8e1e4947a155 | /tests/node_eval.py | 48775d3a46b7e4f4500a4fc28e06cf3ba483328b | [
"MIT"
] | permissive | PiotrDabkowski/Js2Py | 66f20a58912d2df719ce5952d7fe046512717d4d | 2e017b86e2f18a6c8a842293b1687f2ce7baa12e | refs/heads/master | 2023-08-17T08:47:00.625508 | 2022-11-06T09:56:37 | 2022-11-06T10:12:00 | 24,736,750 | 2,419 | 318 | MIT | 2023-08-03T18:06:40 | 2014-10-02T21:08:48 | JavaScript | UTF-8 | Python | false | false | 1,178 | py | node_eval.py | import subprocess
from tempfile import NamedTemporaryFile
import six
import re
import os
class NodeJsError(Exception):
pass
def node_eval_js(code):
ERR_MARKER = "<<<ERROR_MARKER>>>"
ERR_REGEXP = ERR_MARKER + r'([\s\S]*?)' + ERR_MARKER
interceptor_code = """
try {
var res = eval(%s);
... |
cb75477fdb33c572e0630a64f6a6cbce3374b7e7 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-core/PyObjCTest/test_testsupport.py | f39ce0a7402b09f435b3d7679bd7ddd38f78c342 | [
"MIT"
] | permissive | ronaldoussoren/pyobjc | 29dc9ca0af838a56105a9ddd62fb38ec415f0b86 | 77b98382e52818690449111cd2e23cd469b53cf5 | refs/heads/master | 2023-09-01T05:15:21.814504 | 2023-06-13T20:00:17 | 2023-06-13T20:00:17 | 243,933,900 | 439 | 49 | null | 2023-06-25T02:49:07 | 2020-02-29T08:43:12 | Python | UTF-8 | Python | false | false | 93,554 | py | test_testsupport.py | import sys
import unittest
try:
import ctypes
except ImportError:
ctypes = None
import pickle
import typing
import enum
import objc
from PyObjCTools import TestSupport
from PyObjCTools.TestSupport import (
no_autorelease_pool,
pyobjc_options,
expectedFailure,
expectedFailureIf,
TestCase,
... |
6434a073cac4d28c2d4479a1818d482ab2978e83 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/sky_hub/__init__.py | a5b8969018f034c2efff236687ac5b2980a7770a | [
"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 | 29 | py | __init__.py | """The sky_hub component."""
|
db25ddf590b4745773469cc4dca95d4c63942740 | fe0a9e575682bf041711aec3530c11ad6d721d19 | /tests/input/func_transformers_factories.py | 5baa91756d8ced0143303ef0929adeb68313189c | [
"MIT"
] | permissive | geerk/django_linter | 0bce15196d3979ddf25dd156dc3eb75b2ddaddac | d5a27004acc9c7caf8663a8fb519060f210c81ec | refs/heads/master | 2021-01-21T12:46:19.945844 | 2015-12-13T08:01:48 | 2015-12-13T08:01:48 | 38,575,459 | 102 | 4 | null | 2015-08-14T18:45:39 | 2015-07-05T16:18:30 | Python | UTF-8 | Python | false | false | 930 | py | func_transformers_factories.py | """
Check transforms for factories
"""
import unittest
import factory
from django.db import models
from .models import Category
class Product(models.Model):
name = models.CharField(max_length=33)
def __unicode__(self):
return self.name
class ProductFactory(factory.DjangoModelFactory):
class Me... |
d0508b7f596c261107c317d8652f2278a4e1dcad | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /plugins/hg4idea/testData/bin/mercurial/bundlecaches.py | 5851b32ed13665037a8e6e37d97c73f026db3570 | [
"Apache-2.0"
] | 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 | 13,911 | py | bundlecaches.py | # bundlecaches.py - utility to deal with pre-computed bundle for servers
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from .i18n import _
from .thirdparty import attr
from . import (
error,
requirements as requirement... |
c54079035ea4a0e9063b6c73ad99a59fee0d5352 | e2ed3d5cf080cd5b8b6f4dd05470b290aed165c3 | /experimental_code/tileset_generation/main.py | e7ab41da72c4e692915ba28a173e759f00ab30f0 | [] | no_license | IJDykeman/wangTiles | 641c128d5c494b475bc1ed1a0717db5d90810bb9 | 7c1ee2095ebdf7f72bce07d94c6484915d5cae8b | refs/heads/master | 2022-01-20T07:27:26.895920 | 2022-01-10T16:37:02 | 2022-01-10T16:37:02 | 26,565,467 | 157 | 22 | null | 2022-01-10T16:37:03 | 2014-11-13T01:57:09 | Python | UTF-8 | Python | false | false | 1,295 | py | main.py | import numpy as np
import noise
# help(noise)
import minecraft
width = 250
solids = []
solidity = np.zeros([width] * 3).astype(np.int32)
for x in range(width):
for y in range(width):
for z in range(width):
scale = .05
p = noise.snoise3(x * scale,y* scale,z* scale, octaves=1, persi... |
bb39057cb802a5c3ada9bc6605008c645a7f4582 | 35aaddadff1fc6c639869bf7302d6927c0b1918a | /src/balance-a-binary-search-tree.py | f2e4bc64f56202cda25554f2906189a882ddc011 | [] | no_license | lydxlx1/LeetCode | daa3ceadf8c12d57a16ef2ce1a98216123d6b10a | 516d5f08fc9b1b71b14d43687221a06d07dc51fc | refs/heads/master | 2023-02-18T05:58:23.481713 | 2023-02-12T21:04:46 | 2023-02-12T21:04:46 | 46,915,247 | 110 | 48 | null | 2021-09-13T21:11:37 | 2015-11-26T08:58:18 | Java | UTF-8 | Python | false | false | 904 | py | balance-a-binary-search-tree.py | """1382. Balance a Binary Search Tree
Do an in-order traversal to obtain all the elements in BST in sorted order.
Then build the balanced tree using Divide-and-Conquer.
"""
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def bal... |
6ea7ec16280657dc6f02278d666189ba646165d6 | 1ba293e5a7e675c07ea2fb0ef6393eeb482c12fb | /tests/modules/components/test_crf.py | f76970ce4386834b6c4b2eb3758e5c53a64ab3f6 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | ku-nlp/kwja | b75ed5a19543dac0fed6db0de7efb0ee41f41edd | 53594c7808de1845ebf8d5afe7b5c81bfffa7ba1 | refs/heads/main | 2023-09-02T22:30:46.843141 | 2023-08-28T07:57:23 | 2023-08-28T07:57:23 | 496,122,031 | 111 | 5 | MIT | 2023-09-05T01:25:47 | 2022-05-25T07:12:43 | Python | UTF-8 | Python | false | false | 3,451 | py | test_crf.py | from typing import Tuple
import pytest
import torch
from kwja.modules.components.crf import CRF
from kwja.utils.constants import MASKED, NE_TAGS
def test_init() -> None:
crf = CRF(NE_TAGS)
assert crf.num_tags == len(NE_TAGS)
assert crf.start_transitions.shape == (len(NE_TAGS),)
assert crf.transitio... |
f1b6df839b80685e651b6d06e078a87ba1dc8d8d | 12be962c0825d78eaf5a5a3aaf551bfdffbf09a3 | /DomainNet/code_MSDA_digit/datasets/unaligned_data_loader.py | bab3bec0e82274cdced6aef94a1a2b5cd396d564 | [] | no_license | VisionLearningGroup/VisionLearningGroup.github.io | 98032ac28b92a680db146bfad243e49f4438f79d | c8489562941c180e495b92a495adbc9e18d9c6cb | refs/heads/master | 2023-06-22T20:11:51.821301 | 2023-06-15T18:37:48 | 2023-06-15T18:37:48 | 87,874,579 | 189 | 78 | null | 2023-02-19T13:25:04 | 2017-04-11T01:34:30 | CSS | UTF-8 | Python | false | false | 5,836 | py | unaligned_data_loader.py | import torch.utils.data
import torchnet as tnt
from builtins import object
import torchvision.transforms as transforms
from datasets_ import Dataset
class PairedData(object):
def __init__(self, data_loader_A, data_loader_B, data_loader_C, data_loader_D, data_loader_t, max_dataset_size):
self.data_loader_A... |
db51e62fe2c2cc51b563429f6a2a5d69e1da5868 | 362196f32e8248e025cb2f6cf0b88f812c9a059c | /juriscraper/lib/utils.py | 0ead9a0e4653b3014dc4b246cbd74b4802a2b434 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | freelawproject/juriscraper | 0fea8d4bb512808cb1e036aaaf819e9cc0847a6b | d2c6672696e13e33ec9981a1901b87047d8108c5 | refs/heads/main | 2023-08-09T13:27:21.357915 | 2023-07-06T22:33:01 | 2023-07-06T22:33:01 | 22,757,589 | 283 | 97 | BSD-2-Clause | 2023-09-08T22:59:36 | 2014-08-08T12:50:35 | HTML | UTF-8 | Python | false | false | 1,605 | py | utils.py | import re
from itertools import chain, islice, tee
from .string_utils import force_unicode
def previous_and_next(some_iterable):
"""Provide previous and next values while iterating a list.
This is from: http://stackoverflow.com/a/1012089/64911
This will allow you to lazily iterate a list such that as y... |
c64ce92e4ae23e1d281973a6a0b93aef2594501a | c1fe9e7e94df1816004659579f52dcae4744994d | /src/xdoctest/directive.pyi | de6bf73e2e7ccec0367f6333d16e2ba9dab620ce | [
"Apache-2.0"
] | permissive | Erotemic/xdoctest | 60ec105c7305b2f72c2ee183e62fbe3a35e010e2 | 20b998eb5e5d05795292972b267ea7407cea771c | refs/heads/main | 2023-08-19T07:29:18.258737 | 2023-08-04T22:12:23 | 2023-08-04T22:44:45 | 104,611,526 | 196 | 9 | Apache-2.0 | 2023-08-04T22:44:47 | 2017-09-24T01:59:02 | Python | UTF-8 | Python | false | false | 1,918 | pyi | directive.pyi | from typing import Dict
from collections import OrderedDict
from typing import Any
from typing import List
from _typeshed import Incomplete
from collections.abc import Generator
from typing import Any, NamedTuple
from xdoctest import utils
def named(key: str, pattern: str) -> str:
...
DEFAULT_RUNTIME_STATE: Inc... |
340b7d07a7d5e64c8277cd86c87564fa3a502831 | 45055a7b35701d46d9da7b2a80fdb276fe2c4598 | /build.py | 7a1509928db0ad7a2a214bcb32c1220897cd2ef8 | [
"Apache-2.0"
] | permissive | danieleteti/delphiredisclient | 23a870f4d93c527b424919c7defc8c02e0ddae73 | 4f78d48dceb3f910ae95ae3ec8c189f93cd27ca8 | refs/heads/master | 2022-12-12T18:30:23.739807 | 2022-12-02T17:03:13 | 2022-12-02T17:03:13 | 21,604,525 | 281 | 129 | Apache-2.0 | 2022-12-02T17:03:14 | 2014-07-08T08:14:48 | Pascal | UTF-8 | Python | false | false | 2,595 | py | build.py | # coding: latin-1
import subprocess
import os
import glob
from colorama import *
init()
#################################################################################
def buildProject(project):
print(Fore.YELLOW + "Building " + project)
p = project.replace('.dproj', '.cfg')
if os.path.isfile(p):
... |
0815c347620ee03934290720c224e97d2c8c548c | 820b6af9fd43b270749224bb278e5f714f655ac9 | /Utilities/Maintenance/AddOverrides.py | 8596eb11f763e638ee44bd20c3d03aa5ff516efe | [
"BSD-3-Clause"
] | permissive | Kitware/VTK | 49dee7d4f83401efce8826f1759cd5d9caa281d1 | dd4138e17f1ed5dfe6ef1eab0ff6643fdc07e271 | refs/heads/master | 2023-09-01T10:21:57.496189 | 2023-09-01T08:20:15 | 2023-09-01T08:21:05 | 631,615 | 2,253 | 1,243 | NOASSERTION | 2023-09-14T07:53:03 | 2010-04-27T15:12:58 | C++ | UTF-8 | Python | false | false | 2,932 | py | AddOverrides.py | # This Python script can be used to add override statements where they are
# reported to be needed according to warnings produced by clang-700.1.76 on macOS
# 10.11.6 with the -Winconsistent-missing-override option enabled. To run the
# script, invoke
# > python AddOverrides.py <overrides.txt>
# Each line of the over... |
6ee608c7924740ec575d6823e9c38ea0f8ecc811 | e7efae2b83216d9621bd93390959d652de779c3d | /ibm_i/tests/test_e2e.py | 272f21ad7fb0a6d3b8aadca1c36f8253859775c1 | [
"BSD-3-Clause",
"MIT",
"BSD-3-Clause-Modification",
"Unlicense",
"Apache-2.0",
"LGPL-3.0-only",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"CC0-1.0"
] | permissive | DataDog/integrations-core | ee1886cc7655972b2791e6ab8a1c62ab35afdb47 | 406072e4294edff5b46b513f0cdf7c2c00fac9d2 | refs/heads/master | 2023-08-31T04:08:06.243593 | 2023-08-30T18:22:10 | 2023-08-30T18:22:10 | 47,203,045 | 852 | 1,548 | BSD-3-Clause | 2023-09-14T16:39:54 | 2015-12-01T16:41:45 | Python | UTF-8 | Python | false | false | 382 | py | test_e2e.py | # (C) Datadog, Inc. 2022-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
from datadog_checks.ibm_i import IbmICheck
@pytest.mark.e2e
def test_e2e(dd_agent_check, aggregator, instance):
aggregator = dd_agent_check(instance)
aggregator.assert_service_che... |
031bb04513f1a624c087f5c5b02805b2fac4c072 | b8bbdfc593b6d816e67a344f720f90ec05236778 | /airflow/www/extensions/init_auth_manager.py | 24ae020862dc932f8e517e94ec41ffa61a338e82 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | apache/airflow | ed78db0a8bab7e096990e143926e52f518e288ab | 1b122c15030e99cef9d4ff26d3781a7a9d6949bc | refs/heads/main | 2023-09-01T08:37:34.556097 | 2023-09-01T06:49:05 | 2023-09-01T06:49:05 | 33,884,891 | 22,756 | 11,558 | Apache-2.0 | 2023-09-14T20:12:36 | 2015-04-13T18:04:58 | Python | UTF-8 | Python | false | false | 1,837 | py | init_auth_manager.py | # 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... |
e8958d56bfa72f435b66b3091a9ec03fced75dd3 | 3a99f98ee6a84c916496d389944ff46a416c6b24 | /mobula/building/build_hash.py | d64a9d3b3893dfbb4548840de2f7fe4f9fa5ccf1 | [
"MIT"
] | permissive | wkcn/MobulaOP | 7ab80e756466253718cd7e3eb15379ce93fa4e01 | ae693a6a55824e9a0785f5b9befde6bd8ecccfd6 | refs/heads/master | 2021-06-02T19:21:26.774096 | 2020-09-27T11:37:20 | 2020-09-27T11:37:20 | 132,334,822 | 165 | 25 | MIT | 2020-09-27T11:37:21 | 2018-05-06T12:08:25 | Python | UTF-8 | Python | false | false | 213 | py | build_hash.py | import hashlib
import os
def path_hash(path):
md5 = hashlib.md5()
md5.update(path.encode('utf-8'))
return md5.hexdigest()[:8]
def get_file_hash(fname):
return str(int(os.path.getmtime(fname)))
|
c6882d3054945509a17c927f6e495e8bb3b101a6 | f509ab9825c542e09b0c6591d86ef1f9feb540a6 | /pkgs/sdk-pkg/src/genie/libs/sdk/triggers/modify/bgp/modify.py | bf97509c282302f8f3109b9309837876bf11a227 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genielibs | 97f597117193aaa18028defeb69078ebb241173a | e42e51475cddcb10f5c7814d0fe892ac865742ba | refs/heads/master | 2023-08-11T16:39:41.959947 | 2023-07-27T17:58:42 | 2023-07-27T17:58:42 | 130,717,047 | 109 | 60 | Apache-2.0 | 2023-08-29T22:32:08 | 2018-04-23T15:21:56 | Python | UTF-8 | Python | false | false | 22,396 | py | modify.py | '''Implementation for bgp modify triggers'''
# import python
import time
# Genie Libs
from genie.libs.sdk.libs.utils.mapping import Mapping
from genie.libs.sdk.triggers.modify.modify import TriggerModify
# TODO: Better Mapping text to explain what does what
# Which key to exclude for BGP Ops comparison
bgp_exclude ... |
e4cc769c505b609392c2035c3125e2e59d3ad6d6 | 704976ea552111c6a5af9cd7cb62b9d9abaf3996 | /rpython/jit/metainterp/test/test_threadlocal.py | 322e41a40520a6c3671b2f6321862d3f3f57a379 | [
"BSD-3-Clause"
] | permissive | mesalock-linux/mesapy | 4f02c5819ce7f2f6e249d34840f1aa097577645d | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | refs/heads/mesapy2.7 | 2023-08-16T21:33:02.239581 | 2019-08-13T10:29:43 | 2019-08-13T18:06:45 | 136,080,721 | 396 | 33 | NOASSERTION | 2020-04-01T03:05:18 | 2018-06-04T20:45:17 | Python | UTF-8 | Python | false | false | 862 | py | test_threadlocal.py | import py
from rpython.rlib import rthread
from rpython.jit.metainterp.test.support import LLJitMixin
from rpython.rtyper.lltypesystem import lltype
from rpython.rtyper.lltypesystem.lloperation import llop
class ThreadLocalTest(object):
def test_threadlocalref_get(self):
tlfield = rthread.ThreadLocalFiel... |
0d212b669e4d04bdd6d28ded728201a0b530a30a | 3b87eaa7f1b8290d1a74ac2bec9573f81aab831d | /_scripts/templates/Python3/st.Test.py | 42b5585d954fe0fe9298eb71ea817ecf06ac426b | [] | permissive | antlr/grammars-v4 | 1f6ba461f9fb2c8f04335ca495249ab6eab8e0ae | 98c2bc3b68eff9ad4b809d21a6c9d858c5b9ddfa | refs/heads/master | 2023-08-16T13:37:23.691676 | 2023-08-13T15:20:52 | 2023-08-13T15:20:52 | 5,958,314 | 9,255 | 4,577 | MIT | 2023-09-13T21:17:22 | 2012-09-25T23:45:11 | ANTLR | UTF-8 | Python | false | false | 5,344 | py | st.Test.py | # Generated from trgen <version>
import sys
from antlr4 import *
from antlr4.error.ErrorListener import ErrorListener
from readchar import readchar
from <lexer_name> import <lexer_name>;
from <parser_name> import <parser_name>;
from datetime import datetime
def getChar():
xx = readchar()
if (xx == 0):
... |
d2dcfd8133216145916a062aed25f2715583fc7f | 99199db3f78a344e72b281c71c690518ae07375a | /octavia/tests/unit/api/v2/types/test_l7policy.py | c0eddaf2495857dde24e0622a3e4e5424940d976 | [
"Apache-2.0"
] | permissive | openstack/octavia | 3faf2afe2ade5bd3978bb3a0558d2eeefc648ba2 | 0426285a41464a5015494584f109eed35a0d44db | refs/heads/master | 2023-09-01T20:12:48.272344 | 2023-08-31T17:24:04 | 2023-08-31T17:24:04 | 21,018,188 | 147 | 180 | Apache-2.0 | 2021-03-30T12:34:30 | 2014-06-19T22:47:19 | Python | UTF-8 | Python | false | false | 7,366 | py | test_l7policy.py | # Copyright 2016 Blue Box, an IBM Company
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
7229a12e1ee3f770799d144bc484a804a864f4be | 1311696a180047135c825ffa283f9ac9750d4236 | /snippets/esp32/validate_machine.py | 0ab2379704049d1dbfbf259dce50763f558539a8 | [
"MIT"
] | permissive | Josverl/micropython-stubber | 71103afa842da02d5ad074b541d9bff7243ce23f | 68fe9113f4b4e611bb4c3d19f79c8ba0e7111f5e | refs/heads/main | 2023-08-31T00:51:22.200348 | 2023-05-31T07:48:54 | 2023-05-31T07:48:54 | 177,823,007 | 135 | 8 | NOASSERTION | 2023-09-11T21:25:19 | 2019-03-26T16:00:53 | Python | UTF-8 | Python | false | false | 5,677 | py | validate_machine.py | # board : ESP32
# ref : https://docs.micropython.org/en/latest/esp32/quickref.html
import utime as time
import machine
machine.freq() # get the current frequency of the CPU
machine.freq(240000000) # set the CPU frequency to 240 MHz
# Pins and GPIO
# Use the machine.Pin class:
from machine import Pin
p0 = Pin(0,... |
941adbb13e74276777e570ee7c9bede06a944b79 | f9357dc6ebe6ae1af0b03a9afc5f765706b8d31f | /一些爬虫相关的内容/ppbc植物网站所有图片地址pid下载.py | d90341b7b76c2e045703e9fe4f1a4a533e51d68e | [] | no_license | cilame/any-whim | 660acd966048655aa36886047fbc232539807881 | 1520accbe1506a133989a6c2be17572e7fb4693e | refs/heads/master | 2023-08-17T05:10:56.348200 | 2023-08-13T16:45:11 | 2023-08-13T16:45:11 | 110,548,292 | 125 | 64 | null | null | null | null | UTF-8 | Python | false | false | 22,589 | py | ppbc植物网站所有图片地址pid下载.py | # -*- coding: utf-8 -*-
import scrapy
from scrapy import Request, Selector
from lxml import etree
# 以下补丁代码:用于预防有人可能会用 pythonw 执行 scrapy 单脚本时可能会出现的编码问题,如果直接用 python 执行该处则有无皆可。
# import io, sys; sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='utf-8')
# 以下补丁代码:用于预防处理 “scrapy(twisted) 对极少数的某些网站返回的不规范 headers 无法处... |
841edfb084abdbe3ebfd7a4eb48cfac9e8853818 | 6cc1f7f8c89db6d28b1f3b72540bc89ec6d56a0e | /hyper/cli.py | 1d5384cdd88b463fa5fa83e5f1a4d7c60ca3aab7 | [
"MIT"
] | permissive | python-hyper/hyper | bd38dd9100965c763177421e8532c9c70cede348 | b77e758f472f00b098481e3aa8651b0808524d84 | refs/heads/development | 2023-06-12T02:08:04.618434 | 2021-01-12T18:36:50 | 2021-01-12T18:36:50 | 16,165,969 | 198 | 67 | MIT | 2021-01-12T14:23:05 | 2014-01-23T07:53:47 | Python | UTF-8 | Python | false | false | 7,505 | py | cli.py | # -*- coding: utf-8 -*-
"""
hyper/cli
~~~~~~~~~
Command line interface for Hyper inspired by Httpie.
"""
import json
import locale
import logging
import sys
from argparse import ArgumentParser, RawTextHelpFormatter
from argparse import OPTIONAL, ZERO_OR_MORE
from pprint import pformat
from textwrap import dedent
from... |
a9eec8ae197e3185fe95dc3a6d080d94e7d9d4e7 | 783c65f350116d4828c90aad7c7577b934e6feed | /souporcell_pipeline.py | aa0f9975b398af44664af702db2482b47cebc4fc | [
"MIT"
] | permissive | wheaton5/souporcell | 68fc348372531698ca5405dee0c8b54bcc000035 | 6872d8803eebd5fd85d16370036aeb2a69942b22 | refs/heads/master | 2023-07-06T01:13:52.882783 | 2023-06-22T22:39:48 | 2023-06-22T22:39:48 | 175,980,241 | 133 | 43 | MIT | 2023-08-31T00:20:18 | 2019-03-16T14:11:31 | Python | UTF-8 | Python | false | false | 30,240 | py | souporcell_pipeline.py | #!/usr/bin/env python
import argparse
parser = argparse.ArgumentParser(
description="single cell RNAseq mixed genotype clustering using sparse mixture model clustering.")
parser.add_argument("-i", "--bam", required = True, help = "cellranger bam")
parser.add_argument("-b", "--barcodes", required = True, help = "b... |
0769197bed60a0989ea2bdff490801ab261d7f02 | 48ca6f9f041a1e9f563500c8a7fa04dbb18fa949 | /docs/manual/gears/examples/filt_fix_sel.py | 34f2ef6bd666c6a3905a7eb47707ded5f3bcbedd | [
"MIT"
] | permissive | bogdanvuk/pygears | 71404e53d4689ec9cdd9db546bfc0f229a7e02da | 705b11ab6de79868b25753fa9d0ce7128791b346 | refs/heads/master | 2023-07-08T11:38:54.625172 | 2022-03-07T12:29:00 | 2022-03-07T12:29:00 | 124,890,922 | 146 | 16 | MIT | 2022-08-15T07:57:08 | 2018-03-12T13:10:06 | Python | UTF-8 | Python | false | false | 214 | py | filt_fix_sel.py | from pygears.lib import filt, drv, check
from pygears.typing import Union, Uint, Int
drv(t=Union[Uint[8], Int[8]], seq=[(1, 0), (2, 1), (3, 0), (4, 1), (5, 0)]) \
| filt(fixsel=0) \
| check(ref=[1, 3, 5])
|
864f207e140d341c4fe3f1e47bf1f106d4cd3ded | 4a1e2f4f8985e2721c0ce7721432d65ea767e40b | /lessons/CRISP_DM/CatVar.py | 9cb1fda7587277d8a22432e9e4869cb3fe55e241 | [
"MIT",
"CC-BY-NC-ND-4.0"
] | permissive | udacity/DSND_Term2 | d548c94f129e73868b5b564162dd2beb3ec104cb | 6cc091fff66b8f441cbfeb5bb9e7ba70a7d74117 | refs/heads/master | 2022-12-16T10:42:15.941662 | 2022-11-30T20:29:20 | 2022-11-30T20:29:20 | 138,909,692 | 1,173 | 1,966 | MIT | 2022-12-06T18:58:39 | 2018-06-27T16:59:04 | Jupyter Notebook | UTF-8 | Python | false | false | 2,903 | py | CatVar.py | import pandas as pd
import numpy as np
from collections import defaultdict
import CatVarSolns as s
## Categorical Variables
# Question 1
def cat_df_check(cat_df):
'''
INPUT
cat_df - a pandas dataframe of only the categorical columns of df
Prints statement related to the correctness of the d... |
9be68032399da0cdf2ef6ba315f0d09c742ca563 | 33f805792e79a9ef1d577699b983031521d5b6c9 | /tapiriik/services/Strava/strava.py | 28a1de46dc298580d6b9f03fe1aa6e39e810a3a1 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | cpfair/tapiriik | 0dce9599400579d33acbbdaba16806256270d0a3 | c67e9848e67f515e116bb19cd4dd479e8414de4d | refs/heads/master | 2023-08-28T10:17:11.070324 | 2023-07-25T00:59:33 | 2023-07-25T00:59:33 | 7,812,229 | 1,519 | 343 | Apache-2.0 | 2022-10-24T16:52:34 | 2013-01-25T02:43:42 | Python | UTF-8 | Python | false | false | 22,950 | py | strava.py | from tapiriik.settings import WEB_ROOT, STRAVA_CLIENT_SECRET, STRAVA_CLIENT_ID, STRAVA_RATE_LIMITS
from tapiriik.services.service_base import ServiceAuthenticationType, ServiceBase
from tapiriik.services.service_record import ServiceRecord
from tapiriik.database import cachedb, db
from tapiriik.services.interchange... |
c988e0158db69669f778fe698a82aa7fcf67a619 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /19_数学/游程编码/1531. 压缩字符串 II-删除子数组-前后缀分解.py | f93f04f5c43e329b63120470e422d02afac52fce | [] | 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,894 | py | 1531. 压缩字符串 II-删除子数组-前后缀分解.py | # 你需要从字符串 s 中删除最多 k 个`相邻的字符`,以使 s 的行程长度编码长度最小。
# 请你返回删除最多 k 个字符后,s 行程长度编码的最小长度 。
from itertools import groupby
# 压缩字符串
class Solution:
def solve(self, string: str, k: int) -> int:
def getRLELen(x: int) -> int:
return x if x <= 1 else len(str(x)) + 1
n = len(string)
... |
26a7e5b16dc3cab74dc49c2e4008a003fa6efb84 | 6317fc30564ce5e50b470de3c1aedb0323555fde | /scratch/network_analysis.py | 8cab74bdbfd16df2d9a3eca654eef096dc853a46 | [
"MIT"
] | permissive | Insight-book/data-science-from-scratch | 73811e954c8a5757ebe412d0261bdec274367c6f | 4466437ad8ae8b8714925084534c08a3cd9ea02d | refs/heads/master | 2021-01-18T16:09:20.566055 | 2020-02-05T13:23:09 | 2020-02-05T13:23:09 | 37,478,828 | 109 | 126 | Unlicense | 2020-02-05T13:23:11 | 2015-06-15T17:02:43 | Jupyter Notebook | UTF-8 | Python | false | false | 6,665 | py | network_analysis.py | from typing import NamedTuple
class User(NamedTuple):
id: int
name: str
users = [User(0, "Hero"), User(1, "Dunn"), User(2, "Sue"), User(3, "Chi"),
User(4, "Thor"), User(5, "Clive"), User(6, "Hicks"),
User(7, "Devin"), User(8, "Kate"), User(9, "Klein")]
friend_pairs = [(0, 1), (0, 2), (1, 2)... |
cd824363bf4793142a59d14fdb2da2c3089ac1a5 | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /osf_tests/management_commands/test_EGAP_import.py | d327ef81625cd9c2487c8476d1180277ae2a8720 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | CenterForOpenScience/osf.io | 71d9540be7989f7118a33e15bc4a6ce2d2492ac1 | a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e | refs/heads/develop | 2023-09-04T03:21:14.970917 | 2023-08-31T14:49:20 | 2023-08-31T14:49:20 | 10,199,599 | 683 | 390 | Apache-2.0 | 2023-09-14T17:07:52 | 2013-05-21T15:53:37 | Python | UTF-8 | Python | false | false | 6,725 | py | test_EGAP_import.py | # encoding: utf-8
import os
import shutil
import pytest
import responses
HERE = os.path.dirname(os.path.abspath(__file__))
from osf_tests.factories import (
AuthUserFactory,
NodeFactory,
ApiOAuth2PersonalTokenFactory
)
from osf.models import (
RegistrationSchema,
ApiOAuth2PersonalToken
)
from osf.m... |
00e4f8ff18d81f251410c4b5012e881ad1b559ea | 88ae8695987ada722184307301e221e1ba3cc2fa | /third_party/depot_tools/update_depot_tools_toggle.py | 46fb1098143e13a9c2a17124256631079838079f | [
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later",
"BSD-3-Clause"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | Python | false | false | 1,113 | py | update_depot_tools_toggle.py | #!/usr/bin/env python3
# Copyright (c) 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Small utility script to enable/disable `depot_tools` automatic updating."""
import argparse
import datetime
import os
import s... |
8307533813754fb24ecec0076aedb2e1f35e8bb9 | 7e63968457789d589145916b0c1db6d76d40e2c6 | /generate_screenshots.py | edf7c91f2fbf65ca7e1f47c177e57226ae45e135 | [
"TMate",
"Apache-2.0"
] | permissive | simonw/til | eb6680de09f3a12e1286d2b1ef3f564b1b665a35 | 51f40ccffa23af69e6e8675088cc9c4db6c95c65 | refs/heads/main | 2023-09-01T15:55:16.792612 | 2023-08-31T17:44:49 | 2023-08-31T17:44:49 | 257,022,147 | 782 | 126 | Apache-2.0 | 2023-08-26T16:35:31 | 2020-04-19T14:35:59 | HTML | UTF-8 | Python | false | false | 10,096 | py | generate_screenshots.py | import hashlib
import json
import pathlib
import subprocess
import sqlite_utils
import tempfile
import zlib
root = pathlib.Path(__file__).parent.resolve()
TMP_PATH = pathlib.Path(tempfile.gettempdir())
# Change the following tuple manually any time the templates have changed
# to a point that all of the screenshots n... |
87db308ad8f5a19d45ecf4ce08022f3e5180a750 | 549270020f6c8724e2ef1b12e38d11b025579f8d | /recipes/onnx/all/conanfile.py | 7d2738dc5a86a067acb46f3c5dc4223239c9a814 | [
"MIT"
] | permissive | conan-io/conan-center-index | 1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43 | 3b17e69bb4e5601a850b6e006e44775e690bac33 | refs/heads/master | 2023-08-31T11:34:45.403978 | 2023-08-31T11:13:23 | 2023-08-31T11:13:23 | 204,671,232 | 844 | 1,820 | MIT | 2023-09-14T21:22:42 | 2019-08-27T09:43:58 | Python | UTF-8 | Python | false | false | 8,311 | py | conanfile.py | from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.apple import fix_apple_shared_install_name
from conan.tools.build import check_min_cppstd, cross_building
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildE... |
94e619e438b347a7965f9138c4adaaf6a6c0cf4d | 1334dae619b127bedb8c7a2587021b6be596a1f5 | /Chapter_8/ch08_ex1.py | 581f80867e8cc0a05c26d84b37db109119b476c4 | [
"MIT"
] | permissive | PacktPublishing/Mastering-Object-Oriented-Python-Second-Edition | 236a04c7f0b72bb2350d44e1cb3bfb7d2067179b | f6d6517952d51e75c5e086f4c19d1e52500cf261 | refs/heads/master | 2023-02-02T06:33:49.821872 | 2023-01-30T08:50:52 | 2023-01-30T08:50:52 | 187,621,576 | 139 | 103 | null | null | null | null | UTF-8 | Python | false | false | 11,636 | py | ch08_ex1.py | #!/usr/bin/env python3.7
"""
Mastering Object-Oriented Python 2e
Code Examples for Mastering Object-Oriented Python 2nd Edition
Chapter 8. Example 1.
"""
# noisyfloat
# ================================
import sys
def trace(frame, event, arg):
if frame.f_code.co_name.startswith("__"):
print(frame.f_cod... |
349f19cc5fe6789f564944be5d3533b1915188c5 | 965e163df916b01d647953f2b1431d265683f6ca | /xv_leak_tools/test_device/macos_device.py | 30f5571efee967668d4a9c6ea4c869f6655cd747 | [
"MIT"
] | permissive | expressvpn/expressvpn_leak_testing | 6505c39228d396caff0c2df3777009c6fbdf3127 | 9e4cee899ac04f7820ac351fa55efdc0c01370ba | refs/heads/master | 2023-08-18T06:33:33.931040 | 2021-10-11T03:02:50 | 2021-10-11T03:02:50 | 112,572,905 | 244 | 48 | MIT | 2021-01-19T16:02:18 | 2017-11-30T06:18:40 | Python | UTF-8 | Python | false | false | 3,001 | py | macos_device.py | import ipaddress
import signal
import netifaces
from xv_leak_tools.log import L
from xv_leak_tools.test_device.desktop_device import DesktopDevice
from xv_leak_tools.test_device.connector_helper import ConnectorHelper
from xv_leak_tools.process import XVProcessException
class MacOSDevice(DesktopDevice):
def __in... |
80d24d2e994e94a8a906e82504151a70ff9d223e | d88458a65a173999df390117005fa813735e5fe2 | /astroquery/jplspec/core.py | 114cf275d915c5458e49a81001a423871c1943c3 | [] | permissive | astropy/astroquery | 9a2793826229ba4b41ec3607ca77832036a534e9 | 51316d7417d7daf01a8b29d1df99037b9227c2bc | refs/heads/main | 2023-09-01T20:52:41.625935 | 2023-08-29T23:22:40 | 2023-08-29T23:22:40 | 4,787,269 | 636 | 365 | BSD-3-Clause | 2023-09-14T21:56:33 | 2012-06-25T20:52:07 | Python | UTF-8 | Python | false | false | 10,330 | py | core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import warnings
import astropy.units as u
from astropy.io import ascii
from ..query import BaseQuery
from ..utils import async_to_sync
# import configurable items declared in __init__.py
from . import conf
from . import lookup_table
from astroqu... |
b14ba8267d643428a8ea3cc843bce78d174d7bce | 45ba55b4fbdaf1657fde92beaeba4f173265afcd | /tests/http/clients/async_flask.py | c9de50481b734a4d7cbd61c5103fdf8ecee256c1 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | strawberry-graphql/strawberry | af96afd4edd1788c59e150597a12501fbc7bf444 | 6d86d1c08c1244e00535840d9d87925431bc6a1c | refs/heads/main | 2023-08-30T03:34:12.929874 | 2023-08-24T12:01:09 | 2023-08-24T12:01:09 | 162,690,887 | 3,408 | 529 | MIT | 2023-09-14T21:49:44 | 2018-12-21T08:56:55 | Python | UTF-8 | Python | false | false | 2,062 | py | async_flask.py | from __future__ import annotations
from typing import Any, Dict
from flask import Flask
from flask import Request as FlaskRequest
from flask import Response as FlaskResponse
from strawberry.flask.views import AsyncGraphQLView as BaseAsyncGraphQLView
from strawberry.http import GraphQLHTTPResponse
from strawberry.type... |
307cc1b255fef82fad0b6e5f92098389d54eab73 | 8d17266c7c447b631b7902dd93bafc111fb99441 | /light_cnn_v4.py | b3f6bb1f66a8283978f05d5fe606557a41bb8180 | [
"MIT"
] | permissive | AlfredXiangWu/LightCNN | a8242134c75610d38f162eebe9a1f595459c3858 | 7b38a6f2d20865b8c008c6d24cf977309af88114 | refs/heads/master | 2022-09-10T20:33:10.158385 | 2022-02-09T07:09:22 | 2022-02-09T07:09:22 | 96,199,030 | 760 | 198 | MIT | 2019-05-14T00:37:54 | 2017-07-04T09:12:03 | Python | UTF-8 | Python | false | false | 2,961 | py | light_cnn_v4.py | # -*- coding: utf-8 -*-
# @Author: Alfred Xiang Wu
# @Date: 2022-02-09 14:45:31
# @Breif:
# @Last Modified by: Alfred Xiang Wu
# @Last Modified time: 2022-02-09 14:48:34
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
class mfm(nn.Module):
d... |
20641958ee93f836f3a805389cc0cf42b1b8a976 | fbe2c3b1feb69a5ce019c805594a49dc11c7e463 | /astrality/tests/module/test_module.py | 63584311dc0dba2f463d6d9db75789f9d05a3bd7 | [
"MIT"
] | permissive | JakobGM/astrality | 50630a26ef6428a0c1376269d71ddaa52912f374 | 72935b616f9a6a2e9254e9cd9319b525c596e8f0 | refs/heads/master | 2023-01-07T20:26:05.925893 | 2019-11-19T10:15:36 | 2019-11-19T10:15:36 | 117,895,437 | 114 | 7 | MIT | 2022-12-26T20:49:19 | 2018-01-17T21:34:33 | Python | UTF-8 | Python | false | false | 27,111 | py | test_module.py | """Tests for Module class."""
import logging
import os
from datetime import datetime, timedelta
from pathlib import Path
from freezegun import freeze_time
import pytest
from astrality import event_listener
from astrality.module import Module, ModuleManager
from astrality.context import Context
from astrality.tests.u... |
dd86c6fdbd8a6ce22f79b0562780ad3959dce85e | 091e97bcfe5acc0635bd601aa8497e377b74d41a | /ansible/roles/lib_gcloud/build/ansible/gcloud_dm_resource_reconciler.py | 9fa57c4b274ec8dc641d8978b41d0875713821cb | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | openshift/openshift-tools | d59b63778f25cb8fb3c7a0253afe22a173e72f9d | e342f6659a4ef1a188ff403e2fc6b06ac6d119c7 | refs/heads/prod | 2023-08-30T01:52:04.108978 | 2022-03-23T21:07:28 | 2022-03-23T21:07:28 | 36,827,699 | 170 | 254 | Apache-2.0 | 2022-06-16T12:11:51 | 2015-06-03T20:09:22 | Python | UTF-8 | Python | false | false | 3,130 | py | gcloud_dm_resource_reconciler.py | # pylint: skip-file
# vim: expandtab:tabstop=4:shiftwidth=4
#pylint: disable=too-many-branches
def main():
''' ansible module for gcloud deployment-manager deployments '''
module = AnsibleModule(
argument_spec=dict(
# credentials
resources=dict(required=True, type='dict'),
... |
53eecf10bdb30d3c87ef1bf017e40a1dcfc62960 | 437613ebb167638565f7f32c0d3732f3d9a69f6b | /negbio/negbio_neg_chexpert.py | 0d4d6f224e00afc3821a3a6bc140f9b53f5ebddb | [
"LicenseRef-scancode-us-govt-public-domain"
] | permissive | ncbi-nlp/NegBio | 304253d5520e3020dd8249675a75d927e7ad6d45 | 073199e2792824740e89844a59c13d3d40ce4d23 | refs/heads/master | 2023-07-19T04:27:05.082202 | 2022-04-11T01:41:43 | 2022-04-11T01:41:43 | 114,385,608 | 142 | 45 | NOASSERTION | 2023-07-16T11:41:08 | 2017-12-15T15:38:04 | Python | UTF-8 | Python | false | false | 2,142 | py | negbio_neg_chexpert.py | """
Detect negation and uncertainty
Usage:
negbio_pipeline neg_chexpert [options] --output=<directory> <file> ...
Options:
--neg-patterns=FILE Negation rules [default: negbio/chexpert/patterns/negation.txt]
--pre-negation-uncertainty-patterns=FILE Pre negation uncertaint... |
20516d882eefddc8642bd89850ddb7e34957da1e | a41e1498e3c080f47abd8e8e57157548df3ebbf1 | /pandas/io/json/__init__.py | 8f4e7a62834b57c151189cdd2994a55d1ad9f7de | [
"BSD-3-Clause"
] | permissive | pandas-dev/pandas | e7e639454a298bebc272622e66faa9829ea393bb | c7325d7e7e77ecb4a4e57b48bc25265277c75712 | refs/heads/main | 2023-09-01T12:42:07.927176 | 2023-09-01T11:14:10 | 2023-09-01T11:14:10 | 858,127 | 36,166 | 18,728 | BSD-3-Clause | 2023-09-14T21:18:41 | 2010-08-24T01:37:33 | Python | UTF-8 | Python | false | false | 270 | py | __init__.py | from pandas.io.json._json import (
read_json,
to_json,
ujson_dumps,
ujson_loads,
)
from pandas.io.json._table_schema import build_table_schema
__all__ = [
"ujson_dumps",
"ujson_loads",
"read_json",
"to_json",
"build_table_schema",
]
|
920dd9a35d5f726bad5babed616d4fe085db94c5 | 73dbe07000651827e2937d728d0c5acf903932e2 | /examples/evaluation.py | 3af94b84c6e147fe7ac9773a6819219f4a140d3d | [
"Apache-2.0"
] | permissive | deepset-ai/FARM | 96a5c7a2b93dcf60f4bc208a6706be0cb07bcd43 | 5919538f721c7974ea951b322d30a3c0e84a1bc2 | refs/heads/master | 2023-08-21T23:50:50.414602 | 2022-08-31T09:45:24 | 2022-08-31T09:45:24 | 197,409,619 | 1,765 | 283 | Apache-2.0 | 2023-08-12T04:20:09 | 2019-07-17T14:51:12 | Python | UTF-8 | Python | false | false | 4,656 | py | evaluation.py | from farm.utils import initialize_device_settings
from farm.modeling.tokenization import Tokenizer
from farm.data_handler.processor import TextClassificationProcessor, SquadProcessor
from farm.data_handler.data_silo import DataSilo
from farm.eval import Evaluator
from farm.modeling.adaptive_model import AdaptiveModel
f... |
9f0a5b140420f3be0babfc3936ec2e24dec42f45 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py | 8d7d6c02dc01852e9ed029963b36e458b180bd45 | [
"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 | 2,409 | py | RecHitsValidationTest_cfg.py | # Imports
import FWCore.ParameterSet.Config as cms
# Create a new CMS process
process = cms.Process('cluTest')
# Import all the necessary files
process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration.Geometry.GeometryExtended2023... |
be01abb914f1340b72b40f2ad5745b8d93be084e | d110546d747d7e3865ce5742d5fca09f404623c0 | /salt/payload.py | 07489be9b4216ec2d3c72fe4d8c240bd65ad0d45 | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 14,263 | py | payload.py | """
Many aspects of the salt payload need to be managed, from the return of
encrypted keys to general payload dynamics and packaging, these happen
in here
"""
import collections.abc
import datetime
import gc
import logging
import salt.loader.context
import salt.transport.frame
import salt.utils.immutabletypes as immu... |
056f2352df9e37dca511a1dd6c28b03159316b1a | 30fda3a5f7f8d106c08329cb228d7938dfa47340 | /tests/system/conftest.py | 82e61762f2e196d394af7feb5cea52290f4825dd | [
"Apache-2.0"
] | permissive | googleapis/python-ndb | afb479e86486352213ad35abe4631f2919d5b14c | b0f431048b7b2ebb20e4255340290c7687e27425 | refs/heads/main | 2023-09-05T16:03:46.896711 | 2023-08-09T17:57:30 | 2023-08-09T17:57:30 | 171,752,887 | 159 | 72 | Apache-2.0 | 2023-09-14T15:13:10 | 2019-02-20T21:35:11 | Python | UTF-8 | Python | false | false | 5,313 | py | conftest.py | import itertools
import logging
import os
import uuid
import pytest
import requests
from google.cloud import datastore
from google.cloud import ndb
from google.cloud.ndb import global_cache as global_cache_module
from . import KIND, OTHER_KIND, _helpers
log = logging.getLogger(__name__)
@pytest.fixture(scope="se... |
720b3da8906a44599d7358aa30348e71a83386fe | 6d58cdc52b4f882b498d44791ea41d89f2691445 | /nipyapi/registry/models/registry_configuration.py | a05eb9ff5fbe6d1c260809e88011055a590ed731 | [
"Apache-2.0"
] | permissive | Chaffelson/nipyapi | 8cb47c1f13e9b3d53d4add8829c2efcee24349b6 | c687fb811486d7bcada099ac0785b55cfb30aea8 | refs/heads/main | 2022-12-02T15:39:27.685280 | 2022-12-01T12:39:10 | 2022-12-01T12:39:10 | 101,291,622 | 229 | 84 | NOASSERTION | 2023-08-27T15:55:31 | 2017-08-24T12:17:36 | Python | UTF-8 | Python | false | false | 6,482 | py | registry_configuration.py | # coding: utf-8
"""
Apache NiFi Registry REST API
The REST API provides an interface to a registry with operations for saving, versioning, reading NiFi flows and components.
OpenAPI spec version: 1.19.0
Contact: dev@nifi.apache.org
Generated by: https://github.com/swagger-api/swagger-codegen.git
... |
2de79c7e91c7610b7ba93bdfbf2562c457c7e094 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/shared/utils/__init__.py | 0fb72c4a969059c8c5237a7e9b5c2b6d8a16740d | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 9,895 | py | __init__.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/shared/utils/__init__.py
import imghdr
import itertools
import sys
import inspect
import uuid
import struct
from collections import namedtuple
import BigWorld
import AccountCommands
import Settings
import constants
from debug_ut... |
d01070df13c9d24f97a9bbb7ab113cb2ecabdbda | 20e84658198b7993d6da498f65a011ad4c036ae6 | /ObjectDetection/ASFF.py | 30b4504e6a2fe648304e4b51bc8df6725578432b | [] | no_license | shanglianlm0525/PyTorch-Networks | 599e95743540bdadbe587b94e0754989a76f6a37 | 063ed2776fa176d16fd665ead5d9ce13403ee4da | refs/heads/master | 2023-04-15T22:25:24.844770 | 2023-04-06T01:29:22 | 2023-04-06T01:29:22 | 211,103,666 | 1,817 | 516 | null | 2023-02-16T02:18:47 | 2019-09-26T14:04:13 | Python | UTF-8 | Python | false | false | 4,137 | py | ASFF.py | import torch
import torch.nn as nn
import torchvision
def Conv1x1BnRelu(in_channels,out_channels):
return nn.Sequential(
nn.Conv2d(in_channels=in_channels, out_channels=out_channels, kernel_size=1, stride=1, padding=0, bias=False),
nn.BatchNorm2d(out_channels),
nn.ReLU6(inplace=True),
)... |
4366ea4daa597ca769db9103df5099be3676fd6b | 31dd719c6212da836b66bcff5b61c4e1d6090055 | /packages/@jsii/python-runtime/setup.py | 5ae79af4b73046807e0abc2f6a708f4ecc3cf264 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | aws/jsii | d46f102aafdfaf4fe1063cc36f0bbf9fec05fcfb | aa1445d709070321c3c688d586b0e7a7dbb8fa0d | refs/heads/main | 2023-09-01T09:21:43.271479 | 2023-08-28T18:25:06 | 2023-08-28T18:25:06 | 105,802,846 | 2,210 | 244 | Apache-2.0 | 2023-09-13T13:41:10 | 2017-10-04T18:23:37 | TypeScript | UTF-8 | Python | false | false | 1,803 | py | setup.py | import json
import setuptools
with open("src/jsii/_metadata.json") as fp:
metadata = json.load(fp)
with open("README.md", encoding="utf8") as fp:
long_description = fp.read()
setuptools.setup(
name="jsii",
version=metadata["version"],
license=metadata["license"],
url=metadata["homepage"],
... |
5594dad5be713eeaea01dfd783ed2ba0f8a1d6a7 | 3ca67d69abd4e74b7145b340cdda65532f90053b | /programmers/난이도별/level01.소수찾기/Go-yj.py | cd71c877309907e780d409fc5bf6e452b42b94c9 | [] | 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 | 775 | py | Go-yj.py | '''
링크 : https://programmers.co.kr/learn/courses/30/lessons/12921
문제 : 소수 찾기
처음에는 본인을 제외한 2 이상의 수로 나누어 떨어지는 것이 없는지 전부 계산하여 소수를 찾았습니다.
그러면 효율성 테스트가 0점이 나오더라구요.
소수를 더 빠르게 구하는 방법으로 에라토스테네의 체를 알게 되었고
배열에 소수를 찾을 범위를 넣고, 배수를 없애는 방법으로 문제를 풀었습니다.
'''
def solution(n):
answer = 0
n_array = [i for i in range(n+1)]
fo... |
1729dc22559a38440ec6cd2ac1967cb1254c824f | cda215558ad8448ed8e2cbb89719de312c382a95 | /enteletaor_lib/libs/core/models.py | 1d8d0ccdae4e059edd78367cd8942d3992634f77 | [
"BSD-3-Clause"
] | permissive | cr0hn/enteletaor | 63fc6a9f832ea7b6b08f3f786445a8235b9a4618 | a975b5cb06bc5f819b32e65d0cd2258a37370661 | refs/heads/master | 2023-05-11T13:38:25.213779 | 2023-05-08T08:41:31 | 2023-05-08T08:41:31 | 52,361,896 | 166 | 31 | NOASSERTION | 2023-05-08T08:41:36 | 2016-02-23T13:44:22 | Python | UTF-8 | Python | false | false | 7,358 | py | models.py | # -*- coding: utf-8 -*-
#
# Enteletaor - https://github.com/cr0hn/enteletaor
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of con... |
cf4d9ccf37da9707d7c5f8bfff4534896b8b9d06 | a76a2893ea50a607fac6bcecf1a0aa1a33bba30c | /epitran/test/test_tamil.py | e84b1b3aaa3de9a169702825fa33c5a6456fc688 | [
"MIT"
] | permissive | dmort27/epitran | ec340de58e428112f17df1656e3db2f7f1199618 | ac2ad67b350fcdba29831eb968ee617bdaebb873 | refs/heads/master | 2023-09-05T06:03:28.507878 | 2023-04-19T20:30:55 | 2023-04-19T20:30:55 | 56,178,599 | 543 | 124 | MIT | 2023-06-22T02:09:30 | 2016-04-13T19:04:53 | Python | UTF-8 | Python | false | false | 1,338 | py | test_tamil.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import unicodedata
import epitran
class TestTamilGeneral(unittest.TestCase):
def setUp(self):
self.epi = epitran.Epitran(u'tam-Taml')
def _assert_trans(self, src, tar):
trans = self.epi.transliterate(src)
... |
fa739f8195f4a19c9c3cc7650e67d72263da0fef | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/show_content_response.py | af92fb216b0bb4eb1a9139edb84b97afaa7502be | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 5,347 | py | show_content_response.py | # coding: utf-8
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowContentResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the val... |
6f8ed1df7b128ccf366a683eade794be722c2261 | 1e148aada79cb648872bb8ecc740a6a798b2e236 | /tests/test_time_stretch.py | 3c2c607a87dcba816de5ca8bd9af6410c7466446 | [
"MIT"
] | permissive | iver56/audiomentations | a40ae457ca03ab8c927ad804f489cef783dae8d4 | 498a7d4f149d8917813aa35ff18e748cff49cd09 | refs/heads/main | 2023-09-05T05:53:05.369792 | 2023-08-30T13:12:51 | 2023-08-30T13:12:51 | 170,352,817 | 1,520 | 182 | MIT | 2023-09-07T14:35:26 | 2019-02-12T16:36:24 | Python | UTF-8 | Python | false | false | 1,427 | py | test_time_stretch.py | import numpy as np
from audiomentations import TimeStretch
class TestTimeStretch:
def test_dynamic_length(self):
samples = np.zeros((2048,), dtype=np.float32)
sample_rate = 16000
augmenter = TimeStretch(
min_rate=0.8, max_rate=0.9, leave_length_unchanged=False, p=1.0
)... |
777125f13e4a792f34b47b5e080de00237240553 | 4e57ad279fb04b17f0b024dba780cbd7c0f14ec7 | /riskfolio/src/ConstraintsFunctions.py | 72b49b57d18e8474f16088bf781428ee4e56bfb1 | [] | permissive | dcajasn/Riskfolio-Lib | b9ed51b8da93c648f0e255bc7bc20e17d1290cfa | 06dfe24745dd8ab40665621e72cfeb40a80c2b2e | refs/heads/master | 2023-08-09T16:11:47.258143 | 2023-08-01T20:05:00 | 2023-08-01T20:05:00 | 244,460,835 | 2,266 | 403 | BSD-3-Clause | 2023-06-20T04:04:38 | 2020-03-02T19:49:06 | C++ | UTF-8 | Python | false | false | 40,307 | py | ConstraintsFunctions.py | """""" #
"""
Copyright (c) 2020-2023, Dany Cajas
All rights reserved.
This work is licensed under BSD 3-Clause "New" or "Revised" License.
License available at https://github.com/dcajasn/Riskfolio-Lib/blob/master/LICENSE.txt
"""
import numpy as np
import pandas as pd
import scipy.cluster.hierarchy as hr
from scipy.sp... |
103e0038812f9485443711e0fc6575d14b42c39e | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-meta/amundsen/common/amundsen_common/models/tag.py | ccda2250d3150284eebeb410abb3e28fc6b81f06 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MIT"
] | 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 | 354 | py | tag.py | # Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import attr
from marshmallow3_annotations.ext.attrs import AttrsSchema
@attr.s(auto_attribs=True, kw_only=True)
class Tag:
tag_type: str
tag_name: str
class TagSchema(AttrsSchema):
class Meta:
target = Tag
... |
30b907c0827331345e486954636c95623cda06ec | 73a0f661f1423d63e86489d4b2673f0103698aab | /python/oneflow/framework/scope_util.py | 6f62c63a540e9977401a434d6e35950a45c5357b | [
"Apache-2.0"
] | permissive | Oneflow-Inc/oneflow | 4fc3e081e45db0242a465c4330d8bcc8b21ee924 | 0aab78ea24d4b1c784c30c57d33ec69fe5605e4a | refs/heads/master | 2023-08-25T16:58:30.576596 | 2023-08-22T14:15:46 | 2023-08-22T14:15:46 | 81,634,683 | 5,495 | 786 | Apache-2.0 | 2023-09-14T09:44:31 | 2017-02-11T06:09:53 | C++ | UTF-8 | Python | false | false | 2,668 | py | scope_util.py | """
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... |
7af89ccee0b831483ab1cee7d1a44ae947199c19 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoMuon/TrackerSeedGenerator/python/TSGFromL1_cfi.py | c1c9058019add2ddf55fd72d8c6089a823fd1c9f | [
"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 | 1,217 | py | TSGFromL1_cfi.py | import FWCore.ParameterSet.Config as cms
hltL3TrajectorySeedFromL1 = cms.EDProducer("TSGFromL1Muon",
Filter = cms.InputTag("pixelTrackFilterByKinematicsForTSGFromL1"),
FitterPSet = cms.PSet(
cotThetaErrorScale = cms.double(1.0),
tipErrorScale = cms.double(1.0),
ComponentName = cms.strin... |
74e46393760483a8e8353e63b8563d11d5aa32bb | 308f5596f1c7d382520cfce13ceaa5dff6f4f783 | /third-party/thrift/src/thrift/lib/py3/test/client_server.py | d5de6806251c623f15081e99c25797e1df85ba22 | [
"Apache-2.0",
"PHP-3.01",
"Zend-2.0",
"MIT"
] | permissive | facebook/hhvm | 7e200a309a1cad5304621b0516f781c689d07a13 | d8203129dc7e7bf8639a2b99db596baad3d56b46 | refs/heads/master | 2023-09-04T04:44:12.892628 | 2023-09-04T00:43:05 | 2023-09-04T00:43:05 | 455,600 | 10,335 | 2,326 | NOASSERTION | 2023-09-14T21:24:04 | 2010-01-02T01:17:06 | C++ | UTF-8 | Python | false | false | 19,933 | py | client_server.py | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
9b64f72b6878df937bc3d7666518f7d6442ab0c9 | 783bcccb13591e80b439e29782ecb977ae67c1f1 | /binderhub/tests/test_build.py | 7f7a795ea31a8ad4fe37331d8a5fc7050c3f6e26 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | jupyterhub/binderhub | 3ff86c5e896e68c17c6fd000f1426837237cb186 | 84b1db907335d5e0307222fbfcb6de77a98db8a2 | refs/heads/main | 2023-08-29T14:10:35.419954 | 2023-08-02T08:28:21 | 2023-08-02T08:28:21 | 89,419,368 | 2,422 | 420 | BSD-3-Clause | 2023-09-05T09:08:40 | 2017-04-26T00:28:26 | Python | UTF-8 | Python | false | false | 12,924 | py | test_build.py | """Test building repos"""
import json
import sys
from time import monotonic
from unittest import mock
from urllib.parse import quote
from uuid import uuid4
import docker
import pytest
from kubernetes import client
from tornado.httputil import url_concat
from tornado.queues import Queue
from binderhub.build import Ku... |
47c40a75fe6ccf7c765fdada1f1489b08b02c3cd | 481d8268f533c0b5527112f9b7d709aaa22ab053 | /pysrc/map_info_rdr.py | e6863569f22af911d0cb83bc22f085352f292a0e | [
"Apache-2.0"
] | permissive | intelxed/xed | 590f60c564dc75004e51d95773fc1d4d4bfba1d3 | 01a6da8090af84cd52f6c1070377ae6e885b078f | refs/heads/main | 2023-08-25T01:30:27.421743 | 2023-08-21T17:19:26 | 2023-08-21T17:19:26 | 75,980,044 | 1,390 | 175 | Apache-2.0 | 2023-08-07T11:12:00 | 2016-12-08T22:21:22 | Python | UTF-8 | Python | false | false | 19,900 | py | map_info_rdr.py | #!/usr/bin/env python
# -*- python -*-
#BEGIN_LEGAL
#
#Copyright (c) 2023 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... |
4befe4ac7a5f34465b05e702158009f7ebafa826 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/ops/gpu/test_atan_grad_op.py | 48b7dce2f4dc6842e7da145b3a0e16b834001a62 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 3,182 | py | test_atan_grad_op.py | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
a2ab181b7cbecaeb11f223b0737427310307730a | da1721d2783ea4d67ff4e73cee6eee71292f2ef7 | /toontown/distributed/ToontownDistrictAI.py | d9be1a236a4f86757ebea13b02efe28fdc5ef634 | [
"BSD-3-Clause"
] | permissive | open-toontown/open-toontown | bbdeb1b7bf0fb2861eba2df5483738c0112090ca | 464c2d45f60551c31397bd03561582804e760b4a | refs/heads/develop | 2023-07-07T01:34:31.959657 | 2023-05-30T23:49:10 | 2023-05-30T23:49:10 | 219,221,570 | 143 | 104 | BSD-3-Clause | 2023-09-11T09:52:34 | 2019-11-02T22:24:38 | Python | UTF-8 | Python | false | false | 693 | py | ToontownDistrictAI.py | from direct.directnotify import DirectNotifyGlobal
from otp.distributed.DistributedDistrictAI import DistributedDistrictAI
class ToontownDistrictAI(DistributedDistrictAI):
notify = DirectNotifyGlobal.directNotify.newCategory('ToontownDistrictAI')
def __init__(self, air):
DistributedDistrictAI.__init__... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.