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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b39a5723d99f17834ae7dc99b842d352a6da828c | 3ef70fe63acaa665e2b163f30f1abd0a592231c1 | /stackoverflow/venv/lib/python3.6/site-packages/redis/client.py | df1ebfd757b3dca1121fdd199cbc61188fe63041 | [
"MIT"
] | permissive | wistbean/learn_python3_spider | 14914b63691ac032955ba1adc29ad64976d80e15 | 40861791ec4ed3bbd14b07875af25cc740f76920 | refs/heads/master | 2023-08-16T05:42:27.208302 | 2023-03-30T17:03:58 | 2023-03-30T17:03:58 | 179,152,420 | 14,403 | 3,556 | MIT | 2022-05-20T14:08:34 | 2019-04-02T20:19:54 | Python | UTF-8 | Python | false | false | 146,267 | py | client.py | from __future__ import unicode_literals
from itertools import chain
import datetime
import sys
import warnings
import time
import threading
import time as mod_time
import re
import hashlib
from redis._compat import (basestring, imap, iteritems, iterkeys,
itervalues, izip, long, nativestr, saf... |
9921a7921552d61727fb3788e096b8b475644310 | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/totto/prepare_predictions_for_eval.py | 3a0b2b734442be06ec331d734f7b7226c631ef5d | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google-research/language | e941b1a92ab46d40d8d03bb0c314905cb6902ce2 | ac9447064195e06de48cc91ff642f7fffa28ffe8 | refs/heads/master | 2023-08-24T23:10:13.207294 | 2023-05-25T20:47:18 | 2023-05-25T22:29:27 | 153,201,352 | 1,567 | 371 | Apache-2.0 | 2023-07-06T23:03:15 | 2018-10-16T00:58:14 | Python | UTF-8 | Python | false | false | 2,733 | py | prepare_predictions_for_eval.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... |
69aa94596a0bac67b88a3c76627d93a81f32ffb3 | 952dc66c61966f099756cdb6c2d13b40352f63cc | /zerver/webhooks/netlify/view.py | e1616ed8e40f36e74d776eaf19a7759bb103901a | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | zulip/zulip | 5ae6aad35fd9f72996c0a2a9cdd674400966ebf6 | 965a25d91b6ee2db54038f5df855215fa25146b0 | refs/heads/main | 2023-08-28T23:43:00.971110 | 2023-08-28T16:47:09 | 2023-08-28T19:33:02 | 43,160,685 | 20,239 | 8,996 | Apache-2.0 | 2023-09-14T20:57:47 | 2015-09-25T16:37:25 | Python | UTF-8 | Python | false | false | 2,285 | py | view.py | from typing import Tuple
from django.http import HttpRequest, HttpResponse
from zerver.decorator import webhook_view
from zerver.lib.exceptions import UnsupportedWebhookEventTypeError
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.validator impor... |
6839c497b4680c8da1177a49fabd0c361d3508f2 | 2337351b228818e41be3002bd38f68f77c2aa074 | /sa/profiles/DLink/DxS_Cisco_CLI/get_inventory.py | 956f5262b0c8a35234914d7cec84b925357725f3 | [
"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 | 3,615 | py | get_inventory.py | # ---------------------------------------------------------------------
# DLink.DxS_Cisco_CLI.get_inventory
# ---------------------------------------------------------------------
# Copyright (C) 2007-2016 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
... |
1d0387bd317c850782c01d80cbdd333319176fe5 | d3031d50874a592cca6bbd6296a7f8aea734e48f | /Tests/check_large_memory_numpy.py | 24cb1f722bf07d34ba3301fc0325f8f8193f893c | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-permissive",
"HPND"
] | permissive | python-pillow/Pillow | 97abc2f04646ae702aca971d59c738a8239a0053 | 601324bf8915a6180f5616c817e63e2e7816b892 | refs/heads/main | 2023-09-03T22:55:27.094813 | 2023-09-02T04:20:46 | 2023-09-02T04:20:46 | 5,171,600 | 10,807 | 2,470 | NOASSERTION | 2023-09-14T13:41:58 | 2012-07-24T21:38:39 | Python | UTF-8 | Python | false | false | 935 | py | check_large_memory_numpy.py | import sys
import pytest
from PIL import Image
# This test is not run automatically.
#
# It requires > 2gb memory for the >2 gigapixel image generated in the
# second test. Running this automatically would amount to a denial of
# service on our testing infrastructure. I expect this test to fail
# on any 32-bit mac... |
fc0d61cacd0ca746b6796ef5f9dd963d5b2f6623 | ec8d9e1595ccc252a57d1769382bb98d604e40a9 | /pyrolite/geochem/quality/__init__.py | 9905e742c99e2aa7fd2df6ccdbb3bba0a538483c | [
"BSD-3-Clause",
"MIT"
] | permissive | morganjwilliams/pyrolite | 2a8e738e14099f72282a80acb7139d71eec71efc | ac7cd52029909738a41143b89be880e0da419266 | refs/heads/main | 2023-08-31T09:20:33.282184 | 2023-07-21T06:45:24 | 2023-07-21T06:45:24 | 137,172,322 | 113 | 37 | NOASSERTION | 2023-08-29T10:49:17 | 2018-06-13T06:31:12 | Python | UTF-8 | Python | false | false | 1,076 | py | __init__.py | """
Submodule for data quality checking and assurance.
Todo
------
* Identifying interval data by identifying dominant low-end periodicity at scales similar to the lowest values
This is largely a metadata thing for single points, but a tractable problem for
multi-point data groups.
Assump... |
f25867d47b1bee6aff62a84dc3958c921a9848dd | 6ba5116e37f67c613c855efd33a1615c8c851054 | /openaerostruct/transfer/load_transfer.py | 9004cfa509e155404985acf5f6e0c78bf137399e | [
"Apache-2.0"
] | permissive | mdolab/OpenAeroStruct | 08dc28fc12df9927c78469ea6188f4cee87a9d5b | f2f974fb06a34244a3bed6f99b486769256353fe | refs/heads/main | 2023-08-04T02:04:58.875285 | 2023-07-29T19:31:22 | 2023-07-29T19:31:22 | 53,821,266 | 154 | 100 | Apache-2.0 | 2023-07-29T19:31:23 | 2016-03-14T02:37:30 | Python | UTF-8 | Python | false | false | 11,373 | py | load_transfer.py | import numpy as np
import openmdao.api as om
class LoadTransfer(om.ExplicitComponent):
"""
Perform aerodynamic load transfer.
Apply the computed sectional forces on the aerodynamic surfaces to
obtain the deformed mesh FEM loads.
Parameters
----------
def_mesh[nx, ny, 3] : numpy array
... |
5faa5f87da9c39e9f3301ed7dfbfc9d3f110446f | aaa72c72c9089a5f4a71f8151ab8304297692680 | /pysaliency/plotting.py | 020537c49074dec16a16835c43ce01e1785b5864 | [
"MIT"
] | permissive | matthias-k/pysaliency | 2569653a727247cc81c0a994acaeface93124ee7 | 0664dba9b637f64b089b3a44b191dd24da84a30e | refs/heads/master | 2023-08-11T08:03:26.527271 | 2022-06-11T21:52:31 | 2022-06-11T21:52:31 | 46,892,512 | 142 | 42 | MIT | 2023-07-06T14:03:09 | 2015-11-25T23:08:26 | Python | UTF-8 | Python | false | false | 4,761 | py | plotting.py | from __future__ import absolute_import, print_function, division, unicode_literals
try:
import matplotlib.pyplot as plt
except ImportError:
# If matplotlib is not there, just ignore it
pass
import numpy as np
from scipy.ndimage import zoom
def plot_information_gain(information_gain, ax=None, color_range... |
529fce474217d5b0960ce03a3061daf58528846f | 7f620e7902c0b9ccb1fcfd1427acd5936ea33814 | /tests/api/api/test_client_spec.py | 7c8b63aeec9bf1850c3618d2e18d95f7dcf7c1f3 | [
"Apache-2.0"
] | permissive | mlrun/mlrun | 2074c230070129ce3becb211b92c90b29a2ce850 | b5fe0c05ae7f5818a4a5a5a40245c851ff9b2c77 | refs/heads/development | 2023-09-06T00:09:21.546135 | 2023-09-05T19:38:13 | 2023-09-05T19:38:13 | 205,706,595 | 1,093 | 229 | Apache-2.0 | 2023-09-14T14:14:10 | 2019-09-01T16:59:19 | Python | UTF-8 | Python | false | false | 8,598 | py | test_client_spec.py | # Copyright 2023 Iguazio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwa... |
af3ef43f7983de51240025be986af4b6b836e590 | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /third_party/Paste/paste/wsgilib.py | 98299e24734a7fa649f56948d077627b5ff5ae4c | [
"MIT",
"BSD-3-Clause"
] | permissive | catapult-project/catapult | e2cbdd5eb89f3b1492fc8752494e62ea1df4bae0 | 53102de187a48ac2cfc241fef54dcbc29c453a8e | refs/heads/main | 2021-05-25T07:37:22.832505 | 2021-05-24T08:01:49 | 2021-05-25T06:07:38 | 33,947,548 | 2,032 | 742 | BSD-3-Clause | 2022-08-26T16:01:18 | 2015-04-14T17:49:05 | HTML | UTF-8 | Python | false | false | 20,285 | py | wsgilib.py | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
A module of many disparate routines.
"""
from __future__ import print_function
# functions which moved to paste.request and paste.response
# Dep... |
3a5ba894ef51fd8e17a3748d8d0ca81f3f2c0051 | 5daf77b700fa270058d4267b81079e01cc0eb8c0 | /channels/routing.py | efb428ac91830ecc399cfb8fc06442b25266c36a | [
"BSD-3-Clause"
] | permissive | django/channels | ca834fc403b7a829ad6325d76d2ee03fc1894cee | 093326080b4984fcb39f51955681800e39e14f43 | refs/heads/main | 2023-08-17T00:00:34.306150 | 2023-06-14T15:47:48 | 2023-06-14T15:47:48 | 36,818,673 | 4,853 | 970 | BSD-3-Clause | 2023-09-04T20:57:26 | 2015-06-03T17:16:20 | Python | UTF-8 | Python | false | false | 5,772 | py | routing.py | import importlib
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.urls.exceptions import Resolver404
from django.urls.resolvers import URLResolver
"""
All Routing instances inside this file are also valid ASGI applications - with
new Channels routing, whatever you e... |
5584c2156960ae8c15092611d9d5ce92555cb7d5 | 28cf7b16dd29a5802d09b44b0186f6ae2c5ff0ed | /kuryr_kubernetes/cni/prometheus_exporter.py | d04b39621eb74e234a247fec44a07d7cc8e31afd | [
"Apache-2.0"
] | permissive | openstack/kuryr-kubernetes | c292826abfb8aa0d3f8ef3b1007362162db16956 | 4993c7a4b2d7e4b053832bf39602f2573fad6266 | refs/heads/master | 2023-08-18T19:21:02.487908 | 2023-08-03T13:58:11 | 2023-08-03T13:58:11 | 58,626,548 | 169 | 78 | Apache-2.0 | 2022-04-13T02:27:52 | 2016-05-12T09:14:29 | Python | UTF-8 | Python | false | false | 2,619 | py | prometheus_exporter.py | # Copyright 2020 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
182f49f82fed346078e1ea0f8fd9ed781226e205 | c7d3ae6e46a505cceea3cb6193412f4b5983bed3 | /albumentations/core/composition.py | dfc5e86d4c69da48e57ccc2be0df6c49dcc6abff | [
"MIT"
] | permissive | albumentations-team/albumentations | 5f4e969f8185f1070413f5d85fb410cad3c5aa41 | e3b47b3a127f92541cfeb16abbb44a6f8bf79cc8 | refs/heads/master | 2023-09-01T07:32:03.676066 | 2023-06-10T07:12:14 | 2023-06-10T07:12:14 | 136,265,021 | 9,022 | 1,208 | MIT | 2023-06-10T07:12:15 | 2018-06-06T03:10:50 | Python | UTF-8 | Python | false | false | 22,235 | py | composition.py | from __future__ import division
import random
import typing
import warnings
from collections import defaultdict
import numpy as np
from .. import random_utils
from .bbox_utils import BboxParams, BboxProcessor
from .keypoints_utils import KeypointParams, KeypointsProcessor
from .serialization import (
SERIALIZABL... |
9562411e40e6d04d3f0a126c2278aeaeee38a485 | 3a8678a73ff5caa3df02da97a0a0b49ab4482994 | /python/tests/table/test_refs.py | d106f0237abe79d0fb6416bda8e7589043d4cba4 | [
"Apache-2.0"
] | permissive | apache/iceberg | b21a9c1bfbb328919f51cd257772dfd1bd86aaff | c9ce6a123b49c1c4e5bd950b388d69e6ff849b5d | refs/heads/master | 2023-09-03T15:54:18.098529 | 2023-09-03T12:37:39 | 2023-09-03T12:37:39 | 158,256,479 | 4,358 | 1,659 | Apache-2.0 | 2023-09-14T16:31:51 | 2018-11-19T16:26:46 | Java | UTF-8 | Python | false | false | 1,434 | py | test_refs.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... |
2323eb8a91be5c8645dc8152c040a09d80c771e7 | 4506d81df5ae98078e5cbe79f613514ad12b1c83 | /nipype/interfaces/niftyseg/tests/test_em_interfaces.py | c90d93a6baa3beb1172bf317505a05da815c120f | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | nipy/nipype | d52eba1b98fda68e24d006ac0d5701fc8a531b9c | 03a236320fa229299d637ff9af97865a6ae76aca | refs/heads/master | 2023-08-28T10:36:07.020541 | 2023-08-25T13:40:09 | 2023-08-25T13:40:09 | 791,477 | 692 | 569 | NOASSERTION | 2023-09-11T06:04:51 | 2010-07-22T17:06:49 | Python | UTF-8 | Python | false | false | 1,167 | py | test_em_interfaces.py | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import pytest
from ....testing import example_data
from ...niftyreg import get_custom_path
from ...niftyreg.tests.test_regutils import no_nifty_tool
from .. import EM
@pytest.mark.skipif(no_nifty_tool(c... |
1086832bb6a5e0fbeebe34beb5ffd6869166c94a | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/storage/azure-storage-blob/tests/perfstress_tests/T1_legacy_tests/_test_base_legacy.py | 2cc007240ba901b0fdb1174f38c699e6378300b8 | [
"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 | 4,057 | py | _test_base_legacy.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
e1f04d21608271ff398cda655743a27acc743ea9 | 8a151e6ba14ff88d06581f4ace273c7b04a3398c | /deepface/detectors/FaceDetector.py | 522592d1889e9bb45c27711c90a73406c5274eca | [
"MIT",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | serengil/deepface | dd96d6c94fdb3214b4805e3ec133067bc7e4388d | abf9c6a1d55371d1252deefbe69fd468d2384759 | refs/heads/master | 2023-08-08T11:48:06.914057 | 2023-08-07T09:03:21 | 2023-08-07T09:03:21 | 239,201,565 | 7,350 | 1,589 | MIT | 2023-09-08T07:01:50 | 2020-02-08T20:42:28 | Python | UTF-8 | Python | false | false | 3,985 | py | FaceDetector.py | import math
from PIL import Image
import numpy as np
from deepface.commons import distance
from deepface.detectors import (
OpenCvWrapper,
SsdWrapper,
DlibWrapper,
MtcnnWrapper,
RetinaFaceWrapper,
MediapipeWrapper,
YoloWrapper,
YunetWrapper,
)
def build_model(detector_backend):
glo... |
1fe1c2dba8bd220723272ffffda7694af59ef44e | 9efca95a55cb4df52d895d42f1ec10331516a734 | /c7n/resources/glacier.py | 8bed5fbb5f64e8ae6bafe2f6695791fcc3a8e31a | [
"Apache-2.0"
] | permissive | cloud-custodian/cloud-custodian | 519e602abe00c642786441b64cc40857ef5bc9de | 27563cf4571040f923124e1acb2463f11e372225 | refs/heads/main | 2023-09-04T10:54:55.963703 | 2023-09-01T17:40:17 | 2023-09-01T17:40:17 | 52,837,350 | 3,327 | 1,096 | Apache-2.0 | 2023-09-14T14:03:30 | 2016-03-01T01:11:20 | Python | UTF-8 | Python | false | false | 5,812 | py | glacier.py | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from botocore.exceptions import ClientError
import json
from c7n.actions import RemovePolicyBase
from c7n.filters import CrossAccountAccessFilter
from c7n.query import QueryResourceManager, TypeInfo
from c7n.manager import resources
from c... |
115b710d54655e57aebb2a8563322b849baade47 | 6c88b2cea38b2cead9e2402d46a8fc64949c53df | /sdk/python/lib/pulumi/runtime/stack.py | 5422debce3509ae88822ef688e306f922e1db584 | [
"Apache-2.0"
] | permissive | pulumi/pulumi | a9b36c32f0cdd445c22f9ca64ce26c9ae5147575 | 46e2753d02d46a1c077930eeccdfe6738f46c0d2 | refs/heads/master | 2023-08-19T10:25:49.849189 | 2023-08-16T04:59:07 | 2023-08-16T04:59:07 | 72,477,752 | 17,553 | 1,082 | Apache-2.0 | 2023-09-14T21:05:35 | 2016-10-31T21:02:47 | Go | UTF-8 | Python | false | false | 10,463 | py | stack.py | # Copyright 2016-2018, Pulumi Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
8fa881f620256d6109eb5c38a1c2ca5c472ea544 | dd91ea0a9b143371cfb186eaa74333da9488510d | /python/interpret-core/interpret/provider/_visualize.py | 6aecc87d83a33a35e5d3af3a98c564f5a0b74bd1 | [
"MIT"
] | permissive | interpretml/interpret | 6c6ef2f2e6a6bb9c43633251089385cc44affe16 | e6f38ea195aecbbd9d28c7183a83c65ada16e1ae | refs/heads/develop | 2023-09-03T17:42:50.611413 | 2023-08-28T18:16:10 | 2023-08-28T18:16:10 | 184,704,903 | 3,731 | 472 | MIT | 2023-08-15T04:31:34 | 2019-05-03T05:47:52 | C++ | UTF-8 | Python | false | false | 8,375 | py | _visualize.py | # Copyright (c) 2023 The InterpretML Contributors
# Distributed under the MIT software license
from abc import ABC, abstractmethod
import logging
from ._environment import EnvironmentDetector, is_cloud_env, ENV_DETECTED
from .._version import __version__
JS_URL = "https://unpkg.com/@interpretml/interpret-inline@{}/... |
7515ff11ddf5f1e27558a45f0585b9fbce69c053 | 8730cd656903205527da131c3308579f1491cd04 | /tests/selenium/test_guide/test_essentials/test_list_rendering.py | b2ecd42ef3433a5bd77c5b970e11a81b959dc42d | [
"MIT"
] | permissive | stefanhoelzl/vue.py | 9509cff8a8fbd1b4a835b9f2e362935e76bf39ba | 581e764d57e2b476e700034bc11000cd07f176df | refs/heads/master | 2023-02-21T18:13:21.969549 | 2023-02-15T14:37:17 | 2023-02-15T14:43:10 | 139,488,690 | 323 | 21 | MIT | 2023-02-15T12:02:26 | 2018-07-02T20:05:06 | Python | UTF-8 | Python | false | false | 1,355 | py | test_list_rendering.py | from vue import *
def test_mutation_methods(selenium):
class MutationMethods(VueComponent):
array = [1, 2, 3]
template = "<div id='done' />"
def created(self):
print(self.array) # 1,2,3
print(self.array.pop()) # 3
print(self.array) # 1,2
... |
8c66515d25a7a6e03bf6c0b86c83b2baa5a73504 | afba4b442011358e053a43d5f66df726543eb751 | /quimb/__init__.py | bf20d21b2dea64d4dc2388101a446f6cc9ed54fe | [
"Apache-2.0"
] | permissive | jcmgray/quimb | c4450a41dd50e32dea24c712b6fb3925aff7f89e | 8183746fcc8a3ae136d5f5f91893fa720f543533 | refs/heads/main | 2023-08-31T09:02:12.643261 | 2023-08-02T20:58:30 | 2023-08-02T20:58:30 | 47,694,811 | 379 | 105 | NOASSERTION | 2023-09-10T18:25:09 | 2015-12-09T14:02:41 | Python | UTF-8 | Python | false | false | 8,933 | py | __init__.py | """
Quantum Information for Many-Body calculations.
"""
try:
# -- Distribution mode --
# import from _version.py generated by setuptools_scm during release
from ._version import version as __version__
except ImportError:
# -- Source mode --
try:
# use setuptools_scm to get the current versio... |
cb6eeeac20908757cdbff27b24be84ff2b1eac95 | 50c1abfbfde3554c61bb1d9f7057ba7aaa6488c0 | /onesided_cards.py | 6033fa36a25180b940a587adf694928c895a14c5 | [] | no_license | ospalh/anki-addons | f818a67f1c28f55c320b78c2606cae459d0b572a | 4ece13423bd541e29d9b40ebe26ca0999a6962b1 | refs/heads/develop | 2023-08-08T16:56:15.390038 | 2021-02-03T09:26:45 | 2021-02-03T09:26:45 | 4,192,177 | 129 | 60 | null | 2023-07-21T13:54:46 | 2012-05-01T12:44:44 | Python | UTF-8 | Python | false | false | 1,226 | py | onesided_cards.py | #!/usr/bin/env python
# -*- mode: python ; coding: utf-8 -*-
#
# Copyright © 2012 Roland Sieker, <ospalh@gmail.com>
# License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html
from aqt import mw
from anki.consts import MODEL_STD
from anki.hooks import addHook
__version__ = "1.0.2"
def maybe_skip_q... |
0e288aae51910ab1cc8816a92371de18fa6007b8 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/python/mindspore/ops/_op_impl/akg/ascend/prod_force_se_a.py | 4e0adbdcd7fdafb97e4c9c24b4d9ed979f66ef77 | [
"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 | 1,235 | py | prod_force_se_a.py | # Copyright 2020 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... |
edc998ff41a44f92d2247d297a224dd87e27252b | b54f5fe75dbb010a18d1da30a4f030fbb257ed4a | /core/src/toga/handlers.py | c434a3454bf9700146fdfa32ca0320cfaab23586 | [
"BSD-3-Clause"
] | permissive | beeware/toga | 449e3f008ad89e10f8ffcc61bdac798e7e825d09 | 01b076bd6434d0bd04c04ff72ac6eb20b9e973ea | refs/heads/main | 2023-08-24T11:33:53.705165 | 2023-08-24T00:06:09 | 2023-08-24T00:06:09 | 22,529,973 | 1,865 | 468 | BSD-3-Clause | 2023-09-14T18:46:58 | 2014-08-01T21:44:10 | Python | UTF-8 | Python | false | false | 4,236 | py | handlers.py | import asyncio
import inspect
import sys
import traceback
from abc import ABC
class NativeHandler:
def __init__(self, handler):
self.native = handler
async def long_running_task(interface, generator, cleanup):
"""Run a generator as an asynchronous coroutine."""
try:
try:
whil... |
97e7da10489cf961a8197ec77b5a6f82ad00bad0 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /chrome/browser/chromeos/extensions/printing_metrics/DEPS | 51376a3706578d29c6fea6b4c27c6b084810927d | [
"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 | 151 | DEPS | specific_include_rules = {
".*test\.c": [
# Guarded by IS_CHROMEOS_ASH or in is_chromeos_ash sources.
"+chrome/browser/ash/printing",
],
}
| |
6e1c9f942bff90956d551d3fbc3213bec181f398 | 13aa7b9d76c364eb6b112ad057f81ea2fa63da3a | /modules/wireless/mana-toolkit.py | 44c8364d11098c3eb4a5344454156980de149448 | [] | no_license | trustedsec/ptf | df2ed6671c9efd05db756faec41298fbfb50bc5a | f87dfa8b3b62f2157fc51e8abe31bf3f0bf8541c | refs/heads/master | 2023-08-31T08:01:58.033518 | 2023-03-15T17:04:49 | 2023-03-15T17:04:49 | 35,505,904 | 5,087 | 1,434 | null | 2023-08-27T22:33:41 | 2015-05-12T18:37:25 | Python | UTF-8 | Python | false | false | 1,113 | py | mana-toolkit.py | #!/usr/bin/env python
#######################################
# Installation module for mana-toolkit
#######################################
# AUTHOR OF MODULE NAME
AUTHOR="jklaz"
# DESCRIPTION OF THE MODULE
DESCRIPTION="This module will install/update the mana-toolkit"
# INSTALL TYPE GIT, SVN, FILE DOWNLOAD
# OPTIO... |
6ed28901b0433fdd83db65a352d1573394bf2fd8 | c558b0a576c18d4950cd34db48efb01c13bce27c | /test/stubs/colorama.pyi | cd5a50a7d9402f0cda580748c65f1a55e8b4c615 | [
"MIT"
] | permissive | jtesta/ssh-audit | de4a44293692d6b21aaeaac5272355fcc7d322fc | 3f2fdbaa3ddc3607eaf46b11e2be588ce415f6a1 | refs/heads/master | 2023-07-24T05:42:55.829154 | 2023-07-11T15:08:42 | 2023-07-11T15:08:42 | 104,118,612 | 1,682 | 135 | MIT | 2023-09-07T02:32:19 | 2017-09-19T19:24:59 | Python | UTF-8 | Python | false | false | 158 | pyi | colorama.pyi | from typing import Optional
def init(autoreset: bool = False, convert: Optional[bool] = None, strip: Optional[bool] = None, wrap: bool = True) -> None: ...
|
40c8a9eebabe2dab5efd4423774c8756d9bad170 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-meeting/huaweicloudsdkmeeting/v1/model/query_vmr_result_dto.py | e9d9881d839bae44a81c0e8961c0aa06b286b770 | [
"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 | 16,113 | py | query_vmr_result_dto.py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class QueryVmrResultDTO:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute ... |
4343e9f12d9d946fc5c4a3f33017b92beb14184b | df7b40e95718ac0f6071a0ba571b42efc81cf6de | /mmseg/models/backbones/two_stream_swin_transformer.py | 090ed022ef0fb22ed15435e997d6c059b0e5d71a | [
"Apache-2.0"
] | permissive | shinianzhihou/ChangeDetection | 87fa2c498248e6124aeefb8f0ee8154bda36deee | 354e71234bef38b6e142b6ba02f23db958582844 | refs/heads/master | 2023-01-23T20:42:31.017006 | 2023-01-09T11:37:24 | 2023-01-09T11:37:24 | 218,001,748 | 162 | 29 | Apache-2.0 | 2022-11-03T04:11:00 | 2019-10-28T08:41:54 | Python | UTF-8 | Python | false | false | 2,227 | py | two_stream_swin_transformer.py | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision.models as tvmodels
from torch import einsum
from einops import rearrange, repeat
import timm.models as tms
from ..builder import BACKBONES
@BACKBONES.register_module()
class TwoStreamSwinTransformer(nn.Module):
a... |
3ad62817d2eab383967225c34c320420261b4c92 | da1500e0d3040497614d5327d2461a22e934b4d8 | /third_party/web_platform_tests/tools/wptrunner/wptrunner/tests/test_testloader.py | 0d967b051fdad860ef792176afb6c8da07bca13e | [
"LicenseRef-scancode-w3c-03-bsd-license",
"BSD-3-Clause",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"Apache-2.0",
"MIT"
] | 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 | 769 | py | test_testloader.py | from __future__ import unicode_literals
import os
import sys
import tempfile
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", ".."))
from mozlog import structured
from wptrunner.testloader import TestFilter as Filter
from .test_chunker import make_mock_manifest
structured.set_default_logger(structur... |
86dbdac95f10044515501ef94d5cb042c2d140ba | c6fc980cac6bb0e0345ff678f1aade74f1efe8b2 | /rico/utils.py | 5210744e8e54037d2c137e6995f2e30485780c6e | [] | no_license | yzygitzh/Humanoid | f41d6d51601eb3c1435cf4dc72be70895ea6b70a | b0b951154e32ec76473595c76cb566f719b3c4ca | refs/heads/master | 2023-03-02T09:12:56.156211 | 2023-02-18T10:33:14 | 2023-02-18T10:36:29 | 137,621,755 | 111 | 51 | null | null | null | null | UTF-8 | Python | false | false | 4,604 | py | utils.py | #coding=utf-8
import numpy as np
from matplotlib import pyplot as plt
def traverse_view_tree(view_tree, call_back, semantic_ui=False):
if view_tree is None or not semantic_ui and not is_view_valid(view_tree):
return
call_back(view_tree)
if "children" in view_tree:
for child in view_tree["... |
c40610f8cf0201eeb567cc428893d2e6cba27086 | 3a05bb0d4a598d18e9c90c0a35bd44556fcd94d3 | /ask-smapi-model/ask_smapi_model/v1/skill/manifest/__init__.py | b2bd35ebc1880b151c3f4181b94204ca1eb9b141 | [
"Apache-2.0"
] | permissive | alexa/alexa-apis-for-python | 2e21330c7e35b76e4f360aa72a9e789906f3bca1 | 751e6dbbb829ceb34dd7405eb77235c06b19c612 | refs/heads/master | 2023-08-28T12:50:05.522913 | 2023-08-21T16:04:58 | 2023-08-21T16:04:58 | 145,045,841 | 119 | 34 | Apache-2.0 | 2022-07-19T16:40:29 | 2018-08-16T22:40:28 | Python | UTF-8 | Python | false | false | 7,878 | py | __init__.py | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License'). You may not use this file
# except in compliance with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the 'lice... |
fab021a207bfba2ee358eec5e1e898e7a0a5b5c2 | 85d2c76b8a646c4183fb095c2b5a2e2a916d70a8 | /solution/binary_search/2776/main.py | 08f07e05a1c7e2eecf6ddf1ab2e6877928a8de83 | [
"MIT"
] | permissive | tony9402/baekjoon | 448213dcbdf74b58b6d87191ac54c286bad32f29 | 71f9bfc1f4ed66b97ffc0aff2d17389a095a7d11 | refs/heads/main | 2023-08-16T17:54:08.533578 | 2023-08-16T16:36:36 | 2023-08-16T16:36:36 | 200,492,112 | 4,828 | 1,230 | MIT | 2023-06-22T11:49:18 | 2019-08-04T12:48:59 | Python | UTF-8 | Python | false | false | 664 | py | main.py | # Authored by : gusdn3477
# Co-authored by : -
# Link : http://boj.kr/93afacc450454aedbd2b0d6667914846
import sys
def input():
return sys.stdin.readline().rstrip()
def binary_search(t):
start, end = 0, len(arr)-1
while start <= end:
mid = (start + end) // 2
if arr[mid] == t:
re... |
0328665c4e04b8ca7785ae0cb105a5db865aebac | 4d28185e7a78a569f9a449f39f183cac3024f711 | /packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py | a341c517663544c6729920cca78bb14bde510d13 | [
"NCSA",
"Apache-2.0",
"LLVM-exception"
] | permissive | apple/swift-lldb | 2789bf44f648609a1674ee520ac20b64c95de072 | d74be846ef3e62de946df343e8c234bde93a8912 | refs/heads/stable | 2023-04-06T00:28:15.882479 | 2019-10-25T22:46:59 | 2019-10-25T22:46:59 | 44,838,862 | 780 | 291 | Apache-2.0 | 2020-01-10T19:28:43 | 2015-10-23T21:13:18 | C++ | UTF-8 | Python | false | false | 1,688 | py | TestDataFormatterStdSmartPtr.py | """
Test lldb data formatter subsystem.
"""
from __future__ import print_function
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class StdSmartPtrDataFormatterTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_tes... |
5ef77c6fdf6cd2639284b4a1df1cd14e92a5f64d | 9df589466f50c870aa53fd98ecd739750f8fb007 | /roam_to_git/scrapping.py | 747758ca5b9260e5ee6652dd2616d8a88ab51a08 | [
"MIT"
] | permissive | MatthieuBizien/roam-to-git | e0f4e389434b65f00b676f5a07a9fc5783cd2c00 | 2381924739a6f848165c483d6d0a2af3cdca1916 | refs/heads/master | 2023-08-23T12:02:27.629484 | 2023-05-23T20:27:52 | 2023-05-23T20:27:52 | 243,395,909 | 594 | 164 | MIT | 2023-08-11T20:01:32 | 2020-02-27T00:33:46 | Python | UTF-8 | Python | false | false | 11,622 | py | scrapping.py | import atexit
import os
import pdb
import sys
import time
from pathlib import Path
from typing import List, Optional
import psutil
from loguru import logger
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenc... |
7f811978566a7ab0ef7750fc50e0af568d518405 | 6415c13547e6943f7b65337cbd2790c4e18723c8 | /netbox/utilities/forms/fields/__init__.py | 7f9f4b409406f289115d17a1b823dd05aa88e53a | [
"Apache-2.0"
] | permissive | netbox-community/netbox | 287254a9698270d51f57b1297118e9f01536da5a | 506884bc4dc70299db3e2a7ad577dd7fd808065e | refs/heads/develop | 2023-08-24T09:11:46.685121 | 2023-08-23T18:44:14 | 2023-08-23T18:44:14 | 52,796,596 | 8,122 | 1,817 | Apache-2.0 | 2023-09-14T18:16:01 | 2016-02-29T14:15:46 | Python | UTF-8 | Python | false | false | 140 | py | __init__.py | from .array import *
from .content_types import *
from .csv import *
from .dynamic import *
from .expandable import *
from .fields import *
|
c2758378e268e3d607198fbd79acc8b9c6fbdf1d | 091a6200be74bf6577c86f623665bcc24e16b02b | /Playing_Sounds_and_Using_Buttons_with_Raspberry_Pi/simple-jukebox.py | 9479b8e94e65a91ad5393d98cf9924650999af01 | [
"MIT"
] | permissive | adafruit/Adafruit_Learning_System_Guides | b5f7bce40a16da64e7a79d4b39de032f2cca41d4 | 5eaa7a15a437c533b89f359a25983e24bb6b5438 | refs/heads/main | 2023-09-05T18:31:41.621956 | 2023-09-05T15:36:09 | 2023-09-05T15:36:09 | 105,065,494 | 937 | 937 | MIT | 2023-09-12T18:48:53 | 2017-09-27T20:22:44 | C | UTF-8 | Python | false | false | 1,533 | py | simple-jukebox.py | # SPDX-FileCopyrightText: 2018 Mikey Sklar for Adafruit Industries
#
# SPDX-License-Identifier: MIT
# This script requires a Raspberry Pi 2, 3 or Zero. Circuit Python must
# be installed and it is strongly recommended that you use the latest
# release of Raspbian.
import time
from os import listdir
import subprocess
... |
b7aa1ab98cc0f709c4c177c14aac55a75c906156 | d6a43cbb975c0d5dd2465d6f09c43767d35c121a | /tests/test_plugins_mark_as_read.py | affd436df0b7d85dde7bab5c58e487aeb1d6ad90 | [
"BSD-3-Clause"
] | permissive | lemon24/reader | a76f5fd3f8dbf9d86e3627bbf9a60732414721cb | 5e1682c9bfa36d341c03ab804adfb95cfc53f26e | refs/heads/master | 2023-08-17T00:38:03.405077 | 2023-08-16T21:11:25 | 2023-08-16T21:11:25 | 115,272,183 | 349 | 24 | BSD-3-Clause | 2022-06-20T19:37:32 | 2017-12-24T15:36:43 | Python | UTF-8 | Python | false | false | 3,393 | py | test_plugins_mark_as_read.py | import json
import os
import pytest
from fakeparser import Parser
from utils import naive_datetime
from utils import utc_datetime as datetime
def test_regex_mark_as_read(make_reader):
key = '.reader.mark-as-read'
value = {'title': ['^match']}
reader = make_reader(':memory:', plugins=['reader.mark_as_rea... |
ee96af55d687c9e63b9fde63acb648ed970b9ce5 | f2034c76a11ce6296131d2bab89a5dae7d59edfe | /python/orca/src/bigdl/orca/learn/trigger.py | 6ec0691b9c832f7d6cfb3f33010f3a1eed1a2638 | [
"Apache-2.0"
] | permissive | intel-analytics/BigDL | e22cd917eecc7340bda3df4356acba0623a62ef6 | 4ffa012a426e0d16ed13b707b03d8787ddca6aa4 | refs/heads/main | 2023-08-22T06:31:37.923091 | 2023-08-22T02:58:42 | 2023-08-22T02:58:42 | 66,823,715 | 4,913 | 1,327 | Apache-2.0 | 2023-09-14T10:41:50 | 2016-08-29T07:59:50 | Jupyter Notebook | UTF-8 | Python | false | false | 2,988 | py | trigger.py | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
12ae7600321046218659f17168b0f54dee5400c1 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-CoreServices/PyObjCTest/test_sksearch.py | 466700b92c73dbc7bb003d9164344c364d7172a1 | [
"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 | 6,266 | py | test_sksearch.py | import CoreServices
from PyObjCTools.TestSupport import TestCase, os_level_key, os_release
import objc
class TestSKSearch(TestCase):
def testTypes(self):
self.assertIsInstance(CoreServices.SKSearchGroupRef, objc.objc_class)
self.assertIsInstance(CoreServices.SKSearchResultsRef, objc.objc_class)
... |
b24ca829c4d2ed20e66244cf87f898a7d76b70c7 | 8ce453de612c9024207d00d328df183c443c4e2d | /NodeGraphQt/widgets/dialogs.py | b6e5b40cba8fb0eca76d7d84f01a76a1dcb8efc8 | [
"MIT"
] | permissive | jchanvfx/NodeGraphQt | 71f946d7547f6b79c57ee2565d171a30c130a74e | 4823b43642cce520ee88c5e89a0e1702c26ee9f0 | refs/heads/main | 2023-08-29T00:31:18.599300 | 2023-08-22T03:47:44 | 2023-08-22T03:47:44 | 101,639,727 | 1,015 | 255 | MIT | 2023-09-14T04:44:45 | 2017-08-28T12:13:27 | Python | UTF-8 | Python | false | false | 2,934 | py | dialogs.py | import os
from Qt import QtWidgets, QtGui, QtCore
_current_user_directory = os.path.expanduser('~')
def _set_dir(file):
global _current_user_directory
if os.path.isdir(file):
_current_user_directory = file
elif os.path.isfile(file):
_current_user_directory = os.path.split(file)[0]
clas... |
fae05811b840b1a9186b58b7a0501efe4e1c4f7d | d1c2d00078520cd556f60b7213c27856f8b3460d | /sdks/python/apache_beam/examples/kafkataxi/kafka_taxi.py | 1cdd266c3df4bdcbc01359ee0bea47fac8597604 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-protobuf",
"Apache-2.0",
"Python-2.0"
] | permissive | apache/beam | ed11b9e043465c720659eac20ac71b5b171bfa88 | 6d5048e05087ea54abc889ce402ae2a0abb9252b | refs/heads/master | 2023-09-04T07:41:07.002653 | 2023-09-01T23:01:05 | 2023-09-01T23:01:05 | 50,904,245 | 7,061 | 4,522 | Apache-2.0 | 2023-09-14T21:43:38 | 2016-02-02T08:00:06 | Java | UTF-8 | Python | false | false | 5,935 | py | kafka_taxi.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 us... |
a72e336cbccd7344faed15ab23507106a7de5466 | 25476f58ab74593902c0db71dd8e560dafa5442a | /tools/platform-tools/systrace/catapult/common/eslint/bin/run_eslint | 933415be67b809ca8fb039e8f5897be634245adf | [
"BSD-3-Clause",
"Apache-2.0",
"MIT",
"ISC",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"NCSA",
"LicenseRef-scancode-unicode",
"LGPL-2.1-only",
"OpenSSL",
"blessing",
"NICTA-1.0",
"LicenseRef-scancode-protobuf",
"GPL-2.0-or-later",
"LicenseRef-scancode-openssl"... | permissive | CanciuCostin/android-spyware | 859771d8ba17b434f3f330b08d6b28f9b26a5068 | be9c2989a76214462b9fe5869c79ffbe86151f13 | refs/heads/master | 2023-04-11T11:34:01.983825 | 2023-03-26T12:25:01 | 2023-03-26T12:25:01 | 253,235,389 | 360 | 104 | MIT | 2023-03-03T12:59:41 | 2020-04-05T12:58:20 | HTML | UTF-8 | Python | false | false | 1,711 | run_eslint | #!/usr/bin/env python
# Copyright 2016 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.
import argparse
import os
import sys
_CATAPULT_PATH = os.path.abspath(
os.path.join(os.path.dirname(__file__),
o... | |
6baefb675ab5d76d8249fc095d7b13d515508c61 | d72dd2a0364f1cb02f69ecbd6c9b75ba72005d1b | /一、工程基础/软件工程/算法与数据结构/力扣题目/leetcode_026.py | 68d7f3dbcf6d6f63817814351ba41018d92b161b | [
"Apache-2.0"
] | permissive | ethan-sui/AI-algorithm-engineer-knowledge | bf8baf3bfdf54a8cd0cedeef38809d0447df4527 | 24795b23a4cbeb6e6839e0cae65f7745be666da6 | refs/heads/main | 2023-02-16T05:45:44.954543 | 2021-01-13T00:40:37 | 2021-01-13T00:40:37 | 301,581,802 | 221 | 8 | null | null | null | null | UTF-8 | Python | false | false | 709 | py | leetcode_026.py | # 2、删除排序数组中的重复项
# 一、双指针法,设置快慢指针,当快慢指针指向元素一样时,快指针快走一步,
# 当快慢指针指向元素不同时,同时走一步,并把快指针的元素值赋给慢指针,
# 这样,慢指针走过的元素就是不重复的元素
# 时间复杂度O(n),空间复杂度O(1)
def removeDuplicates0(arr):
if len(arr) == 0:
return 0
left = 0
right = 1
while right < len(arr):
if arr[right] != arr[left]:
left +... |
9d5d8cc5b1b777a8f5d39659d53b7e4e31c0f61d | 85373d45a83e4096affafa4f4e5b400787413e57 | /test/programytest/parser/template/graph_tests/test_that.py | 1bf15c7bc72cc26efc11d5ee17897aa25cf2bda8 | [
"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 | 4,437 | py | test_that.py | import xml.etree.ElementTree as ET
from programy.parser.template.nodes.base import TemplateNode
from programy.parser.template.nodes.that import TemplateThatNode
from programytest.parser.template.graph_tests.graph_test_client import TemplateGraphTestClient
class TemplateGraphThatTests(TemplateGraphTestClient):
d... |
89c09f622e242801de604a1148cf24dd2d1b8d80 | 34cd8ee9aca03e0dcbc40a63d1c97c780b29ca7b | /fetch/views.py | 49316d45ec54b901ac8d5a34ed25b899c5774753 | [
"CC-BY-3.0",
"MIT"
] | permissive | csev/dj4e-samples | 5bb5c25eab6c253b2533dc4e1b438dc89e32733b | af2386d14fd856462acc37fd906a16fae5ba482c | refs/heads/main | 2023-08-16T18:24:01.571774 | 2023-08-16T01:33:19 | 2023-08-16T01:33:19 | 166,510,747 | 508 | 640 | MIT | 2023-08-16T01:33:20 | 2019-01-19T05:42:05 | Python | UTF-8 | Python | false | false | 729 | py | views.py | from django.shortcuts import render, redirect, reverse
from django.views import View
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.http import JsonResponse, HttpResponse
from datetime import datetime, timedelta
from django.uti... |
9122831cd0bc55455c67e0bff02066d6ea74f56d | 5f65d81134e2384f668cc920c85d5a95a5559683 | /models/object_detection/pytorch/ssd-resnet34/inference/cpu/oob_utils.py | 7093217511df191bccbd338dbf9d60d89e55890d | [
"Apache-2.0"
] | permissive | IntelAI/models | a59202087140a868bd8f08d31c5b4cc0c9a91a7d | 9304c9f59fde013f158ac338fc80171c0e8cda5d | refs/heads/master | 2023-08-17T12:30:58.047221 | 2023-08-07T21:12:59 | 2023-08-07T21:12:59 | 154,412,076 | 609 | 220 | Apache-2.0 | 2023-09-02T12:59:45 | 2018-10-23T23:59:08 | Python | UTF-8 | Python | false | false | 3,196 | py | oob_utils.py | #
# -*- coding: utf-8 -*-
#
# Copyright (c) 2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
6b039032f6d32e142798b8c1e9bac3b668a95e4c | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/growatt_server/sensor_types/tlx.py | 645b32db9d0fdb67fbe01856624305fb2281fb1f | [
"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 | 16,033 | py | tlx.py | """Growatt Sensor definitions for the TLX type.
TLX Type is also shown on the UI as: "MIN/MIC/MOD/NEO"
"""
from __future__ import annotations
from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
from homeassistant.const import (
PERCENTAGE,
UnitOfElectricCurrent,
UnitOfElectricP... |
ec29fb476027fdb933b264516c0f14561d4d1820 | 4ff11364a6dc59bd6bf7fb4efd868c7e45b1caab | /calamari_ocr/scripts/predict.py | 1de32cf8eb7bc36c6b859bea97b89777726d38d0 | [
"Apache-2.0"
] | permissive | Calamari-OCR/calamari | 6cf29512e71025b90807462b452595abe94cb8f3 | 2f71b7eb08339d25ccb21d80c1d5b851f3d5bdaa | refs/heads/master | 2023-08-22T05:34:23.008839 | 2023-08-18T11:01:23 | 2023-08-18T11:01:23 | 126,039,059 | 1,019 | 245 | Apache-2.0 | 2023-09-05T09:30:58 | 2018-03-20T15:22:29 | Python | UTF-8 | Python | false | false | 7,221 | py | predict.py | import os
import zlib
from dataclasses import dataclass, field
from typing import TYPE_CHECKING, List, Optional
import tfaip.util.logging
from bidi.algorithm import get_base_level
from paiargparse import PAIArgumentParser, pai_meta, pai_dataclass
from calamari_ocr import __version__
from calamari_ocr.ocr.dataset.data... |
ab7fb689f0be206e9fd01b4c9e8c6990c100043e | a7c0cc71e6da4615eca2c3d75117dad5b8dce8d3 | /CTFd/utils/events/__init__.py | ad1c7e3db8470f3fa76f9cac65aecd25e8007a77 | [
"Apache-2.0"
] | permissive | CTFd/CTFd | 4b75207aeea3ed8d761cc6269c27a070693ab3ec | d8f0b9e602fca109cabe1895e847d39a46ce7429 | refs/heads/master | 2023-09-01T19:19:19.767862 | 2023-08-29T18:46:53 | 2023-08-29T18:46:53 | 28,681,142 | 4,593 | 2,273 | Apache-2.0 | 2023-09-13T18:24:37 | 2015-01-01T05:36:55 | Python | UTF-8 | Python | false | false | 3,890 | py | __init__.py | import json
from collections import defaultdict
from queue import Queue
from gevent import Timeout, spawn
from tenacity import retry, wait_exponential
from CTFd.cache import cache
from CTFd.utils import string_types
class ServerSentEvent(object):
def __init__(self, data, type=None, id=None):
self.data =... |
4ade7b3e62ecadc4556e179776d9bcd985d5c8fb | 49abdb1be64ad5ac3ca7114d7b82f1f4a7929c0f | /.github/nightly_build/darkify.py | 8894988261b4f92bfc705bf613bd207a71cbdd9c | [
"Apache-2.0"
] | permissive | tencent-quantum-lab/tensorcircuit | 1581d47e6d33831223ccbe558fb4be968bfd8167 | b96a1b1c11df8c767e85476efd6c336bb2b3a7b9 | refs/heads/master | 2023-09-05T16:54:20.170821 | 2023-09-05T09:24:23 | 2023-09-05T09:24:23 | 492,659,956 | 222 | 60 | Apache-2.0 | 2023-09-05T04:38:31 | 2022-05-16T02:31:33 | Python | UTF-8 | Python | false | false | 835 | py | darkify.py | from datetime import datetime
import requests
def change_version(post=""):
datestr = datetime.now().strftime("%Y%m%d")
datestr += post
with open("tensorcircuit/__init__.py", "r") as f:
r = []
for l in f.readlines():
if l.startswith("__version__"):
l = l[:-2]
... |
c94865ad0e0eb841d6aca0db63155f0bce81b6d6 | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Rhino/DocObjects/__init___parts/PointObject.py | b502e914b95c299f6b795b8b368dcbf7f64ebc92 | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 303 | py | PointObject.py | class PointObject(RhinoObject):
# no doc
def DuplicatePointGeometry(self):
""" DuplicatePointGeometry(self: PointObject) -> Point """
pass
PointGeometry=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: PointGeometry(self: PointObject) -> Point
"""
|
ef4a25f8b0238d3176cd74ac751100c5b06d3770 | cbc4eec2c39bc954d05d28be812592a205106b8b | /python/app/amrev.py | 54b7257cf4eeee3160f853846d63ab1f96544f70 | [] | no_license | pranab/avenir | 756abaf6dc1d11bdafb61a5df77b0ed3ce56008c | 4381166d61f7bc6088be34e6b35927a37ef6ba98 | refs/heads/master | 2022-10-07T20:58:12.992960 | 2022-09-06T04:28:47 | 2022-09-06T04:28:47 | 4,390,566 | 171 | 84 | null | null | null | null | UTF-8 | Python | false | false | 2,087 | py | amrev.py | #
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# p... |
46ca8eb64c0bb5987b9b74cf03978dc7046144b7 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/gift_system/hubs/base/stamper.py | 2a07bb76d4109c37509ddd2b74d1c5b1bb92f07d | [] | 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 | 2,997 | py | stamper.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/gift_system/hubs/base/stamper.py
import typing
from gui.ClientUpdateManager import g_clientUpdateManager
from gui.gift_system.hubs.subsystems import BaseHubSubsystem
from helpers import dependency
from skeletons.gui.shared impor... |
35b45477c1a5cf20d9f360d2beef5ba7d85cb447 | d1f15554df2d5c0f74ddbcba6e870359841f682b | /wagtail/test/utils/wagtail_factories/__init__.py | 885fbe90507750e36274673077b2ade54482cd3c | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | wagtail/wagtail | bd405f89b86e0c625fef0685fd6bfba41cf5cbfc | 06a7bc6124bf62675c09fbe0a4ed9bbac183e025 | refs/heads/main | 2023-09-04T06:22:51.601208 | 2023-09-01T15:22:00 | 2023-09-01T15:22:00 | 16,479,108 | 12,974 | 3,580 | BSD-3-Clause | 2023-09-14T10:45:04 | 2014-02-03T12:41:59 | Python | UTF-8 | Python | false | false | 75 | py | __init__.py | from .blocks import * # noqa: F403
from .factories import * # noqa: F403
|
d5aa2b2b9d116cfd2251a63c4775605473132a69 | 0c932b52ddb40867419dedd394934c059fc4ef7e | /allenact/utils/cache_utils.py | e54369536654a25aae4103badae4c011c053d090 | [
"MIT"
] | permissive | allenai/allenact | ed614f745cbd8ddb1404af6e8d5e855b5d66908a | 9772eeeb7eacc1f9a83c90d1cf549a3f7e783c12 | refs/heads/main | 2023-09-05T01:33:37.424674 | 2023-06-13T18:13:57 | 2023-06-13T18:13:57 | 233,944,205 | 266 | 58 | NOASSERTION | 2023-07-25T17:05:01 | 2020-01-14T21:58:30 | Python | UTF-8 | Python | false | false | 5,772 | py | cache_utils.py | import math
from typing import Dict, Any, Union, Callable, Optional
from allenact.utils.system import get_logger
def pos_to_str_for_cache(pos: Dict[str, float]) -> str:
return "_".join([str(pos["x"]), str(pos["y"]), str(pos["z"])])
def str_to_pos_for_cache(s: str) -> Dict[str, float]:
split = s.split("_")
... |
19d01e7297571a92a96c8c5d9e096a2757b94ee9 | f88a5ad8af044f7956a9d03d57f6ed6610dc9246 | /tests/unit/weatherapi25/test_weathercoderegistry.py | ef91523f2bfb51f484066432eefaf70c7a57576b | [
"MIT"
] | permissive | csparpa/pyowm | 9664089d8dd792489882696f194d9659146d95a1 | 3be796cc60fd2cac1fe1fba005dc4c7f650debcf | refs/heads/master | 2023-08-15T17:47:31.064245 | 2023-06-24T11:50:42 | 2023-06-24T11:50:42 | 12,535,703 | 855 | 240 | MIT | 2023-08-30T14:24:56 | 2013-09-02T08:43:51 | Python | UTF-8 | Python | false | false | 1,055 | py | test_weathercoderegistry.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from pyowm.weatherapi25.weathercoderegistry import WeatherCodeRegistry
class TestWeatherCodeRegistry(unittest.TestCase):
__test_instance = WeatherCodeRegistry({
"abc": [{
"start": 1,
"end": 100
},
{
... |
dd7525afcb89c4e1eaf0f1616d6f99e52e239596 | dacdebab897f9287f37a2e85c5705a926ddd36aa | /snakemake/linting/__init__.py | 3a1b0fc94553241077faff399085edb3c6014b90 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | snakemake/snakemake | 5d4528193d87786d7b372ca7653ece302ff46965 | 27b224ed12448df8aebc7d1ff8f25e3bf7622232 | refs/heads/main | 2023-09-02T08:37:04.323976 | 2023-08-11T10:02:34 | 2023-08-11T10:02:34 | 212,840,200 | 1,941 | 536 | MIT | 2023-09-11T09:51:44 | 2019-10-04T14:58:11 | HTML | UTF-8 | Python | false | false | 2,054 | py | __init__.py | import textwrap
import shutil
import inspect
from abc import ABC, abstractmethod
from snakemake.logging import logger
NAME_PATTERN = "[a-zA-Z_][a-zA-Z_0-9]*"
class Linter(ABC):
def __init__(self, workflow, items):
self.items = items
self.workflow = workflow
def read_item(self, item):
... |
1686d9bd41015dfd47cbacef378e6f399d6f8847 | c9502eb1420a32a7bf36a32391d6b66b7018f9a7 | /dragonn/callbacks.py | bb836632ff88a58cdf170622eb9769bac46345ee | [
"MIT"
] | permissive | kundajelab/dragonn | ae81f00885494e61b81a6ce359130e2283038364 | d2442a27a3991a18717ef199e3197d6692f14c33 | refs/heads/master | 2023-08-13T21:52:20.555859 | 2022-07-08T03:29:04 | 2022-07-08T03:29:04 | 60,218,942 | 262 | 95 | MIT | 2023-03-24T22:57:13 | 2016-06-02T00:03:18 | Jupyter Notebook | UTF-8 | Python | false | false | 1,206 | py | callbacks.py | from keras.callbacks import Callback
from dragonn.metrics import *
import warnings
warnings.filterwarnings('ignore')
class MetricsCallback(Callback):
def __init__(self, train_data, validation_data):
super().__init__()
self.validation_data = validation_data
self.train_data = ... |
bc0c0c776bc05aa3dac826608b2e9463587cffca | 42926e8621fc64211e385901f737c925ede26c33 | /scrapGoogleWithPros.py | ea235ebe8089cb25a7b5d6803591e215ad96e96f | [] | no_license | enghamzasalem/SouqScraper | 21cd827a3adbfb79f6b99746a91e2d35b8d8c4f7 | 0ef5d396a9c8cf07aadd3b5a3551e8b823c4843e | refs/heads/master | 2023-09-03T07:25:14.068321 | 2023-08-28T14:54:21 | 2023-08-28T14:54:21 | 180,890,693 | 244 | 186 | null | 2023-09-04T12:56:21 | 2019-04-11T22:59:30 | Python | UTF-8 | Python | false | false | 629 | py | scrapGoogleWithPros.py | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from webdriver_manager.chrome import ChromeDriverManager
driver = webdriver... |
dc4675e5bda126a7580b4ed04990286ccf4f9cd7 | 572afc77a246acb9483b47fc9e1839f47005d736 | /python/fate_arch/abc/_federation.py | b3e8fd21a92b614601c0f6edcf740edebd7d3b70 | [
"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 | 2,039 | py | _federation.py | import abc
import typing
from abc import ABCMeta
from fate_arch.abc._gc import GarbageCollectionABC
from fate_arch.common import Party
__all__ = ["FederationABC"]
class FederationABC(metaclass=ABCMeta):
"""
federation, get or remote objects and tables
"""
@property
@abc.abstractmethod
def s... |
3515a659658e891c7c27a7a3b3d555964664fa20 | eb9253b8c2a281bebddbf77fa02b249fa18f11b7 | /knet/kernel_updator.py | 9021b53637e2d9b7e77efc93699b379b45b1018c | [
"Apache-2.0"
] | permissive | ZwwWayne/K-Net | 781ea91ebe17fb9887409ee030c0bfae8dc60b99 | 5e50ee58957dce972f51096804ff69171c2f072e | refs/heads/main | 2023-05-23T18:43:16.806151 | 2021-12-16T12:43:08 | 2021-12-16T12:43:08 | 417,726,092 | 452 | 55 | null | null | null | null | UTF-8 | Python | false | false | 3,996 | py | kernel_updator.py | import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import build_activation_layer, build_norm_layer
from mmcv.cnn.bricks.transformer import TRANSFORMER_LAYER
@TRANSFORMER_LAYER.register_module()
class KernelUpdator(nn.Module):
def __init__(self,
in_channels=256,
... |
30c89d386f747bd3cbfe49f6f2dd43a7d4bd5f66 | acf7457d3a799cb9bff12686d2d616688bcd4b5b | /packages/python/plotly/plotly/validators/layout/template/data/_violin.py | 91f6842f5292a81c0d9f1ccb8025fd9bda35c247 | [
"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 | 543 | py | _violin.py | import _plotly_utils.basevalidators
class ViolinValidator(_plotly_utils.basevalidators.CompoundArrayValidator):
def __init__(
self, plotly_name="violin", parent_name="layout.template.data", **kwargs
):
super(ViolinValidator, self).__init__(
plotly_name=plotly_name,
pare... |
67fe189b089c0aa5e89e012b320e691481700aa4 | 47f94329d813e02a4a2b88dd43d70c2cb8fa0b5a | /test/test_api_decorator.py | 2fe497f6435fab9e1f3c441486cb12e895ffad2b | [
"MIT"
] | permissive | laike9m/Cyberbrain | b3b798b6a0924d2af3a0c36ed002dee8b9746a3f | ef92fee10e3fd4ff4bcee38bf8356b0d645519e3 | refs/heads/master | 2023-01-07T12:31:15.636701 | 2022-04-19T08:05:24 | 2022-04-19T08:05:24 | 249,303,697 | 2,512 | 176 | MIT | 2022-12-30T22:40:02 | 2020-03-23T00:59:43 | Python | UTF-8 | Python | false | false | 209 | py | test_api_decorator.py | def test_decorator_api(trace, check_golden_file):
def f(foo):
return foo
@trace
def decorated_func():
a = 1
b = f(a)
return a + b
assert decorated_func() == 2
|
834017331d81dee90f76ec0b8c3d7fb89cdc2c3a | 98c396dbb1e5e03403de8d8860ee3cc0e48b5366 | /image/randaugment/wrn.py | f054dbbfe4b6e1288166fe91cf6bd2563de752e5 | [
"Apache-2.0"
] | permissive | google-research/uda | 94ca1c52547c12081fab52897e51da3bd19d92df | 960684e363251772a5938451d4d2bc0f1da9e24b | refs/heads/master | 2023-08-25T12:17:16.716778 | 2020-02-08T23:32:13 | 2020-02-08T23:32:13 | 192,635,589 | 2,239 | 351 | Apache-2.0 | 2021-08-28T07:16:56 | 2019-06-19T01:21:45 | Python | UTF-8 | Python | false | false | 3,880 | py | wrn.py | # coding=utf-8
# Copyright 2019 The Google UDA Team 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 applicab... |
6d5c4de01e7ef53388bce437fe73a29b038378fc | 11cd362cdd78c2fc48042ed203614b201ac94aa6 | /desktop/core/ext-py3/boto-2.49.0/boto/https_connection.py | ddc31a152292e69897fcfc01b9b44f354bd4051d | [
"CC-BY-3.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"ZPL-2.0",
"Unlicense",
"LGPL-3.0-only",
"CC0-1.0",
"LicenseRef-scancode-other-permissive",
"CNRI-Python",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-or-later",
"Python-2.0",
"GPL-3.0... | permissive | cloudera/hue | b42343d0e03d2936b5a9a32f8ddb3e9c5c80c908 | dccb9467675c67b9c3399fc76c5de6d31bfb8255 | refs/heads/master | 2023-08-31T06:49:25.724501 | 2023-08-28T20:45:00 | 2023-08-28T20:45:00 | 732,593 | 5,655 | 2,244 | Apache-2.0 | 2023-09-14T03:05:41 | 2010-06-21T19:46:51 | JavaScript | UTF-8 | Python | false | false | 5,135 | py | https_connection.py | # Copyright 2007,2011 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
ead5eafee2dfb167ba73c9ea0a8f534cb3b9164d | 607dc8df19fc5248f6289cdda97857b5d58ca16f | /smac/model/multi_objective_model.py | 23a765a8fffe88dcc1cb8d3957e7797c4c47a138 | [
"BSD-3-Clause",
"LicenseRef-scancode-philippe-de-muyter",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | automl/SMAC3 | 7dce243a33023c52d6819deff966f7b502e90ed0 | 541ee7e0383b491b86d1a23dcff669f2efad616d | refs/heads/main | 2023-08-31T17:36:06.067579 | 2023-08-01T13:02:51 | 2023-08-01T13:02:51 | 65,900,469 | 943 | 259 | NOASSERTION | 2023-09-11T02:36:57 | 2016-08-17T10:58:05 | Python | UTF-8 | Python | false | false | 3,002 | py | multi_objective_model.py | from __future__ import annotations
from typing import TypeVar
import numpy as np
from smac.model.abstract_model import AbstractModel
__copyright__ = "Copyright 2022, automl.org"
__license__ = "3-clause BSD"
Self = TypeVar("Self", bound="MultiObjectiveModel")
class MultiObjectiveModel(AbstractModel):
"""Wrap... |
f3b03a42bb4bd88fadd7a5502532f749e4d3b887 | 0f2b08b31fab269c77d4b14240b8746a3ba17d5e | /onnxruntime/python/tools/microbench/attention.py | 285b42b7cbb62484ade272633e158c12ad64e28a | [
"MIT"
] | permissive | microsoft/onnxruntime | f75aa499496f4d0a07ab68ffa589d06f83b7db1d | 5e747071be882efd6b54d7a7421042e68dcd6aff | refs/heads/main | 2023-09-04T03:14:50.888927 | 2023-09-02T07:16:28 | 2023-09-02T07:16:28 | 156,939,672 | 9,912 | 2,451 | MIT | 2023-09-14T21:22:46 | 2018-11-10T02:22:53 | C++ | UTF-8 | Python | false | false | 2,236 | py | attention.py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
import argparse
from dataclasses import dataclass
import numpy as np
fr... |
e5004ab64beb3294e93a77c60682e9f569f1c0f7 | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/spring/azext_spring/tests/latest/app_managed_identity/test_app_managed_identity_force_set_scenario.py | a2c311efacbf4b7455c3dbfce70514132334f395 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-cli-extensions | c1615b19930bba7166c282918f166cd40ff6609c | b8c2cf97e991adf0c0a207d810316b8f4686dc29 | refs/heads/main | 2023-08-24T12:40:15.528432 | 2023-08-24T09:17:25 | 2023-08-24T09:17:25 | 106,580,024 | 336 | 1,226 | MIT | 2023-09-14T10:48:57 | 2017-10-11T16:27:31 | Python | UTF-8 | Python | false | false | 6,543 | py | test_app_managed_identity_force_set_scenario.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
cc1c114b0db7d640fc90a999502511eac4dddf85 | 7edc26a54f4b71085db5758ee15e87dfc822c372 | /openelex/tests/test_fetch.py | 32147f021a02a3c889135db7d30ff7ecf8dd4b01 | [
"MIT"
] | permissive | openelections/openelections-core | 55f1b440644588502a6a1a67f8924024a2f1dffb | 3c516d8c4cf1166b1868b738a248d48f3378c525 | refs/heads/master | 2022-02-06T01:24:38.557078 | 2021-04-22T17:53:34 | 2021-04-22T17:53:34 | 11,376,829 | 161 | 99 | MIT | 2022-01-21T18:56:12 | 2013-07-12T19:52:57 | Python | UTF-8 | Python | false | false | 343 | py | test_fetch.py | from unittest import TestCase
from openelex.base.fetch import ErrorHandlingURLopener, HTTPError
class TestErrorHandlingURLopener(TestCase):
def setUp(self):
self.opener = ErrorHandlingURLopener()
def test_404(self):
url = "http://example.com/test.csv"
self.assertRaises(HTTPError, self... |
13ff27ba48eae8bd9a129fae3a255de92a597b7d | 3f1e0d8ac4800db05ce37d698a026ec085e3304c | /doric-Qt/example/doric/scripts/package-windows.py | 40e5ae212fcd374a5efefd6cf448a3ba8bee6da4 | [
"Apache-2.0"
] | permissive | doric-pub/Doric | e8080e6e8091018e49e39fa35c7d737fc5323aed | ff92ac5b16de12b139f59156e8005dfddb645b41 | refs/heads/master | 2023-08-16T18:11:51.849633 | 2023-08-11T12:19:03 | 2023-08-11T12:36:52 | 216,160,126 | 170 | 25 | Apache-2.0 | 2023-09-14T06:14:23 | 2019-10-19T06:28:35 | JavaScript | UTF-8 | Python | false | false | 1,246 | py | package-windows.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import sys
import time
import platform
import shutil
import glob
import requests
import json
import zipfile
def system(command):
retcode = os.system(command)
if retcode != 0:
raise Exception("Error while executing:\n\t %s" % command)
def main():
... |
0aa45b3ff0fecbc66c43b7061dcdab70168e0960 | acf7457d3a799cb9bff12686d2d616688bcd4b5b | /packages/python/plotly/plotly/validators/isosurface/_valuehoverformat.py | 40fa68323eaffcae97724ed9e33aa03c52b0b8b2 | [
"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 | 441 | py | _valuehoverformat.py | import _plotly_utils.basevalidators
class ValuehoverformatValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name="valuehoverformat", parent_name="isosurface", **kwargs
):
super(ValuehoverformatValidator, self).__init__(
plotly_name=plotly_name,
... |
2e2f6240cddafc7d4847a027600aa4b253d28635 | 982a904a83e2caa7acd8b2ac19cfc5a4fb75bde1 | /examples/ch11/snippets_ipynb/ch11utilities.py | e20cb4f4a36a92b153c42c03325bac0e5747c33d | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | pdeitel/IntroToPython | 73bc349fe40701b51f49d17d7fbc5b9985885e48 | 978093febf2ed849a2049e0b0860d2c4998306f7 | refs/heads/master | 2023-02-09T08:04:15.313698 | 2023-02-03T23:23:42 | 2023-02-03T23:23:42 | 173,331,130 | 249 | 371 | null | 2022-12-04T06:52:26 | 2019-03-01T16:08:37 | null | UTF-8 | Python | false | false | 1,734 | py | ch11utilities.py | # ch11utilities.py
"""Utility function for printing a pass of the
insertion_sort and selection_sort algorithms"""
def print_pass(data, pass_number, index):
"""Print a pass of the algorithm."""
label = f'after pass {pass_number}: '
print(label, end='')
# output elements up to selected item
print(... |
67ef1cfa42f1e21015da5ee170630fc06b3c0d1e | 48ee50316a950d9bc789ae843477b58b2913bf0d | /src/app/test/api/http/unit/handlers/v1/event_test.py | d08a8033a17f67f502db222ef8374b6547b30444 | [
"MIT"
] | permissive | beer-garden/beer-garden | f6d1c305a261b59d3cb3389513fc3138004a8d07 | a5fd2dcc2444409e243d3fdaa43d86695e5cb142 | refs/heads/develop | 2023-08-15T11:50:29.833953 | 2023-07-20T03:20:45 | 2023-07-20T03:20:45 | 120,045,001 | 254 | 38 | MIT | 2023-07-20T03:20:47 | 2018-02-03T00:13:29 | Python | UTF-8 | Python | false | false | 6,193 | py | event_test.py | # -*- coding: utf-8 -*-
import json
import pytest
from brewtils.models import Event, System
from mock import Mock
from tornado import gen
from tornado.testing import AsyncHTTPTestCase, gen_test
from tornado.web import Application
from tornado.websocket import websocket_connect
from beer_garden.api.http.handlers.v1.ev... |
930b391f348c83c4b4cdd114e9112d3b88df7a72 | 0c8ac66ae050e1a98dd8afd7525c9ed74ec5d300 | /django_school_management/result/migrations/0008_subjectgroup_subjects.py | 011335ba1b97fcc0d0bf2b62d74be8e307fbced2 | [] | no_license | TareqMonwer/Django-School-Management | 5b1c8145d04082063bc14fc9db1ce38b4db97a9d | 3d425d300a77ad505089a3a4c0a9dc71cacbe89a | refs/heads/master | 2023-08-19T23:36:34.359488 | 2023-08-13T05:53:42 | 2023-08-13T05:53:42 | 221,053,244 | 409 | 163 | null | 2023-08-13T05:53:44 | 2019-11-11T19:22:28 | JavaScript | UTF-8 | Python | false | false | 451 | py | 0008_subjectgroup_subjects.py | # Generated by Django 2.2.13 on 2020-12-21 06:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('academics', '0010_auto_20201219_0025'),
('result', '0007_subjectgroup'),
]
operations = [
migrations.AddField(
model_na... |
3dfc2bc0486d8c24e9e29a9454d582f71b499901 | 1adebf72de7aa7147b1148ba35280645fbe5bbd3 | /docs/source/conf.py | f0bd5d473b2c38ef98aa26317b69e3f62995634e | [
"MIT"
] | permissive | josiah-wolf-oberholtzer/supriya | d0c4f921a06e3f9df40f91a226a1c038d3ef84d5 | 2ebf835ce9bbfca19e4220628a32c30fa66e04f7 | refs/heads/main | 2023-07-20T00:06:23.955530 | 2023-07-18T03:02:14 | 2023-07-18T03:02:14 | 17,463,359 | 227 | 28 | MIT | 2023-07-18T03:02:15 | 2014-03-06T02:27:25 | Python | UTF-8 | Python | false | false | 3,942 | py | conf.py | import datetime
import os
import supriya
### SPHINX ###
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.graphviz",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
# "sphinx.ext.viewcode",
"sphinxext.opengraph",
"uqbar.sphinx.api",
"uqbar.sphinx.book",
"... |
be1f208de4063bd6877cbcec7beb3880138903fd | 2427bd92fae91f0f9168c7de7f822306faa36fe0 | /tests/test_sampler.py | 214be9afa9f2902abe4261a84aa96c73818bf6b5 | [
"Apache-2.0"
] | permissive | aio-libs/aiozipkin | 52e4a5dace1e94b4ec1b7391fb670f86446ec4f4 | 0f15660507ffd8a0229fb5053ef55383a7580d7b | refs/heads/master | 2023-08-31T12:33:49.399845 | 2022-07-01T16:32:45 | 2022-07-01T16:32:45 | 105,470,666 | 184 | 34 | Apache-2.0 | 2023-04-03T16:29:54 | 2017-10-01T20:05:13 | Python | UTF-8 | Python | false | false | 801 | py | test_sampler.py | from aiozipkin.sampler import Sampler
def test_sample_always() -> None:
sampler = Sampler(sample_rate=1.0)
trace_id = "bde15168450e7097008c7aab41c27ade"
assert sampler.is_sampled(trace_id)
assert sampler.is_sampled(trace_id)
assert sampler.is_sampled(trace_id)
def test_sample_never() -> None:
... |
b6fdbd02e21dcc93e8aefc4da6fb3253fff214f1 | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/1932. Merge BSTs to Create Single BST/1932.py | 2416f6ae9128d107a835c0e6e2cc9ec834722899 | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 1,119 | py | 1932.py | class Solution:
def canMerge(self, trees: List[TreeNode]) -> Optional[TreeNode]:
valToNode = {} # {val: node}
count = collections.Counter() # {val: freq}
for tree in trees:
valToNode[tree.val] = tree
count[tree.val] += 1
if tree.left:
count[tree.left.val] += 1
if tree.ri... |
7039d88d8c5cd4aec4310dc346556366a8389531 | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/pytests/unit/client/ssh/test_shell.py | 37065c4c187601b2b2a59b93fd8737fe353c888f | [
"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 | 1,765 | py | test_shell.py | import subprocess
import types
import pytest
import salt.client.ssh.shell as shell
from tests.support.mock import patch
@pytest.fixture
def keys(tmp_path):
pub_key = tmp_path / "ssh" / "testkey.pub"
priv_key = tmp_path / "ssh" / "testkey"
return types.SimpleNamespace(pub_key=pub_key, priv_key=priv_key)
... |
9f33c2a0f0d3b73103a84c3702c8d8ad79a48927 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /EventFilter/HcalRawToDigi/python/HcalLaserEventFilterProducer_cfi.py | 02c6d9bc8c2ccccd9c57bb40bce6840ee748fd97 | [
"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,904 | py | HcalLaserEventFilterProducer_cfi.py | import FWCore.ParameterSet.Config as cms
import os
HcalLaserEventFilterResult=cms.EDProducer("HcalLaserEventFiltProducer2012",
# Specify laser events to remove in gziped file
eventFileName = cms.string("EventFilter/HcalRawToDigi/data/HCALLaser... |
eed70bc0e6b3d826aa025cc69a7e33b8618e3f46 | a18320b408bf4f17ff8dd20c90b139c801b9f7a1 | /docker-build/9.0.5.15/scripts/applyConfig.py | 6ad64d41fbb56d290acb469ad637769d17bf3227 | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | WASdev/ci.docker.websphere-traditional | 6412a0e1e9abe17946100174ffe87242049fbcfe | 38bd272341e42b572ac2af41d5b14aeb03c5d5c2 | refs/heads/main | 2023-08-31T03:23:09.158252 | 2023-08-03T13:49:12 | 2023-08-03T13:49:12 | 49,430,367 | 173 | 217 | Apache-2.0 | 2023-08-03T13:49:14 | 2016-01-11T14:09:10 | HTML | UTF-8 | Python | false | false | 152 | py | applyConfig.py | import os
import sys
filename = sys.argv[0]
AdminTask.applyConfigProperties('[-propertiesFileName ' + filename + ' -validate true]')
AdminConfig.save()
|
6f991a6ea0985b45d7c4433b0b442e0ea4510f75 | 7a4caf0cc235bc1b3211efbbd9375e9ca2e2b37b | /adaptive/tests/unit/test_triangulation.py | 4aa48a9f06e26c55258eac84c5e7dcd11636e869 | [
"BSD-3-Clause"
] | permissive | python-adaptive/adaptive | 7f001c8bd456321a5b16d7b9d411f2266b0d73dc | cfe628a24dc9bde795654c7df7a2af9fe098df39 | refs/heads/main | 2023-08-31T00:50:47.996931 | 2023-08-14T18:43:36 | 2023-08-14T18:43:36 | 113,714,660 | 1,081 | 69 | BSD-3-Clause | 2023-08-20T19:56:48 | 2017-12-10T01:47:05 | Python | UTF-8 | Python | false | false | 3,338 | py | test_triangulation.py | import numpy as np
import pytest
from adaptive.learner.triangulation import Triangulation
###################################
# Points are shaped like this: #
# #
# ..(5) #
# ..--** / #
# (1)** / #
# / |... |
5a022aa6555ce0001cba21df88932eef0eceef5f | b74320ad439e37dfa48cd8db38dab3b7a20a36ff | /tests/pipelines/text_to_video/test_text_to_video.py | 801af7f6b4e6253965ae36eccfd5caa9ef9e5ed8 | [
"Apache-2.0"
] | permissive | huggingface/diffusers | c82beba1ec5f0aba01b6744040a5accc41ec2493 | 5eeedd9e3336882d598091e191559f67433b6427 | refs/heads/main | 2023-08-29T01:22:52.237910 | 2023-08-28T18:16:27 | 2023-08-28T18:16:27 | 498,011,141 | 17,308 | 3,158 | Apache-2.0 | 2023-09-14T20:57:44 | 2022-05-30T16:04:02 | Python | UTF-8 | Python | false | false | 6,668 | py | test_text_to_video.py | # coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
9158199276a43e9616315d35f1eba3cd5f3d0f82 | 8da41ffa2ccb09e04f95db0f211e0ed69a42a352 | /courses/data-engineering/demos/composer_ml_pipeline/chicago_taxifare/trainer/task.py | d40ef3506066cb9aad8fcf2179add22cb1c1ccd8 | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/training-data-analyst | 808af9b09a0e5f5657c4ca76cdd205f808d76d89 | 975a95032ce5b7012d1772c7f1f5cfe606eae839 | refs/heads/master | 2023-09-05T19:50:59.722334 | 2023-09-04T14:25:33 | 2023-09-04T14:25:33 | 56,459,948 | 7,311 | 5,917 | Apache-2.0 | 2023-09-13T21:45:54 | 2016-04-17T21:39:27 | Jupyter Notebook | UTF-8 | Python | false | false | 1,015 | py | task.py | import argparse
from . import model
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument(
"--train_data_path",
help="GCS or local path to training data",
required=True
)
parser.add_argument(
"--train_epochs",
help="Steps to run th... |
c10b6161bb584c8ea671b43066b165127cdcb19f | 4a0e17a639b8d657ff263863d1df2cb1e60b68c5 | /setup.py | 7273b897719cbc5f71dc566c57b59e9080efade4 | [
"BSD-2-Clause"
] | permissive | ianozsvald/ipython_memory_usage | af785a13e43bebb3adc3476118c6186606b83de6 | a2c28197f67e249f12aa1f603b9a4bf712f70add | refs/heads/master | 2023-08-27T08:34:17.948989 | 2021-05-14T12:09:08 | 2021-05-14T12:09:08 | 21,815,824 | 333 | 58 | BSD-2-Clause | 2019-11-02T14:44:46 | 2014-07-14T10:26:54 | Python | UTF-8 | Python | false | false | 1,714 | py | setup.py | #!/usr/bin/env python
"""ipython_memory_usage: display memory usage during IPython execution
ipython_memory_usage is an IPython tool to report memory usage deltas for every command you type.
"""
doclines = __doc__.split("\n")
# Chosen from http://www.python.org/pypi?:action=list_classifiers
classifiers = """\
Develo... |
6c24535e2f5aac8cf0d7b57039633ab69c4dc2a7 | 6416b746ee71d897789eab1e450000831674dbd0 | /src/otx/cli/utils/multi_gpu.py | f1ffe7774bc32d248ea3872e434931601afe9144 | [
"Apache-2.0"
] | permissive | openvinotoolkit/training_extensions | c921f83ad52311af96ff45ae0b88d0aecddd855b | 80454808b38727e358e8b880043eeac0f18152fb | refs/heads/develop | 2023-08-31T06:29:07.229339 | 2023-08-31T01:57:26 | 2023-08-31T01:57:26 | 154,843,614 | 397 | 230 | Apache-2.0 | 2023-09-14T06:17:01 | 2018-10-26T14:02:29 | Python | UTF-8 | Python | false | false | 12,862 | py | multi_gpu.py | """Multi GPU training utility."""
# Copyright (C) 2022 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... |
39554c327f65c150832ede5b2468172d605282a4 | 72378321136063ebf5002b6103f2fe2f8007f961 | /Chapter07/onboarding.py | 3c9b0892c912359155f1164fc95c0234d103a4ca | [
"MIT"
] | permissive | PacktPublishing/Neural-Network-Projects-with-Python | cf749542e032b352fe183b0962940face73ad6e9 | e1decc34b0f52f946eee5d421e376c511959e772 | refs/heads/master | 2023-01-30T03:48:33.637619 | 2023-01-18T09:26:49 | 2023-01-18T09:26:49 | 148,056,623 | 307 | 178 | MIT | 2023-09-12T00:11:42 | 2018-09-09T19:02:32 | Python | UTF-8 | Python | false | false | 689 | py | onboarding.py | import cv2
import math
import utils
import face_detection
video_capture = cv2.VideoCapture(0)
counter = 5
while True:
_, frame = video_capture.read()
frame, face_box, face_coords = face_detection.detect_faces(frame)
text = 'Image will be taken in {}..'.format(math.ceil(counter))
if face_box is not Non... |
70781e2c7618ccfee93f760d3c8a00f7b0f54326 | c1ff870879152fba2b54eddfb7591ec322eb3061 | /plugins/render/ogreRender/3rdParty/ogre/Tools/Blender2.6Export/ogre_mesh_exporter/mesh_panel.py | 099a68cdbffd762b6d476a89271cefff7e0a3345 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | MTASZTAKI/ApertusVR | 1a9809fb7af81c3cd7fb732ed481ebe4ce66fefa | 424ec5515ae08780542f33cc4841a8f9a96337b3 | refs/heads/0.9 | 2022-12-11T20:03:42.926813 | 2019-10-11T09:29:45 | 2019-10-11T09:29:45 | 73,708,854 | 188 | 55 | MIT | 2022-12-11T08:53:21 | 2016-11-14T13:48:00 | C++ | UTF-8 | Python | false | false | 11,693 | py | mesh_panel.py | # ##### BEGIN MIT LICENSE BLOCK #####
# Copyright (C) 2011 by Lih-Hern Pang
# 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 ... |
b20b0ab340b3d5d1eb61f3c6fe2f2f9fc86bcf06 | 59546d74cac6a55f5dc94990c7aec236feb062c7 | /lungmask/__init__.py | bbebd0bdcf73cc46a0d5e4fa4bc693f963edf6f7 | [
"Apache-2.0"
] | permissive | JoHof/lungmask | 2bba6f4ce5b59b3cad1185dc56342776f1de1d03 | 096bed3fc51437902265615060062258becc736c | refs/heads/master | 2023-09-01T08:02:29.833551 | 2023-08-16T18:19:18 | 2023-08-16T18:19:18 | 224,678,136 | 562 | 144 | Apache-2.0 | 2023-07-25T21:33:39 | 2019-11-28T15:08:11 | Python | UTF-8 | Python | false | false | 28 | py | __init__.py | from .mask import LMInferer
|
454b0dc5d676f931244be395453515e7228974b1 | 54606d99cd0c8bc2c34cded2bc433be1cc5a4968 | /05-pseudo-whitening | c11ad627e12107fd7abf0a87ce248e734d0b3c7b | [
"MIT"
] | permissive | jbornschein/mpi4py-examples | dfe71831149a2917f46a13252f169757efbecf9f | c0f5fa18bab612fb5afbd9a5bdbc47521d6c6dd6 | refs/heads/master | 2022-07-09T12:12:34.557268 | 2020-06-14T13:21:22 | 2020-06-14T13:21:22 | 809,089 | 333 | 129 | MIT | 2018-08-01T10:08:31 | 2010-07-31T09:51:02 | Python | UTF-8 | Python | false | false | 2,942 | 05-pseudo-whitening | #!/usr/bin/env python
"""
How to run:
mpirun -np <NUM> ./pseudo-whitening <INPUT-IMAGES.h5> <OUTPUT-IMAGES.h5>
"""
from __future__ import division
import sys
import tables
import numpy as np
from numpy.fft import fft2, ifft2
from mpi4py import MPI
from parutils import pprint
#================================... | |
6193edb482426fc9ccb71388ee5673655f8fbef8 | b2fef77e77f77b6cfd83da4ec2f89cbe73330844 | /tests/test_torchscript_utils.py | ec24f388f1a0995dc884d4858ea267e541a60fa5 | [
"Apache-2.0"
] | permissive | Project-MONAI/MONAI | 8ef2593cc5fd1cd16e13464f927fe563fe3f5bac | e48c3e2c741fa3fc705c4425d17ac4a5afac6c47 | refs/heads/dev | 2023-09-02T00:21:04.532596 | 2023-09-01T06:46:45 | 2023-09-01T06:46:45 | 214,485,001 | 4,805 | 996 | Apache-2.0 | 2023-09-14T15:19:30 | 2019-10-11T16:41:38 | Python | UTF-8 | Python | false | false | 4,089 | py | test_torchscript_utils.py | # Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... |
1b4ef1edc1950c55e1fe3aa0eeee520907341a47 | 091e97bcfe5acc0635bd601aa8497e377b74d41a | /ansible/roles/lib_openshift_3.2/build/src/oc_scale.py | 1318608492f8d7e85a3867daf4a89209587ccae1 | [
"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 | 2,075 | py | oc_scale.py | # vim: expandtab:tabstop=4:shiftwidth=4
# pylint: skip-file
# pylint: disable=too-many-instance-attributes
class OCScale(OpenShiftCLI):
''' Class to wrap the oc command line tools '''
# pylint allows 5
# pylint: disable=too-many-arguments
def __init__(self,
resource_name,
... |
3579a46f04dd766b68699d9be1dedc873add01c6 | 0009c76a25c89a0d61d3bc9e10071da58bdfaa5a | /py/ztools/Fs/pyNPDM.py | 328874bf59d46175b5df1759344090b07127058e | [
"MIT"
] | permissive | julesontheroad/NSC_BUILDER | 84054e70a80b572088b0806a47ceb398302451b5 | e9083e83383281bdd9e167d3141163dcc56b6710 | refs/heads/master | 2023-07-05T05:23:17.114363 | 2021-11-15T19:34:47 | 2021-11-15T19:34:47 | 149,040,416 | 1,249 | 143 | MIT | 2022-12-15T03:19:33 | 2018-09-16T22:18:01 | Python | UTF-8 | Python | false | false | 6,206 | py | pyNPDM.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import io
import re
from Utils import read_at, read_u8, read_u32, read_u64, memdump
class FsAccessControl:
def __init__(self, fp):
self.f = fp
self._parse()
def __str__(self):
string = ' FS Access Control:\n'
string += ' Version: %d\n' % self... |
4837c21e95fe4e05f7328e0cbedf90b4db29f033 | 559f3dec0964d2e0f86c6c871371fe779cf3726c | /contrib/QualityInspector/qinspector/uad/models/stfpm.py | 3c1d5e50c98dcf6e8e2bf58a00b8a9be932f0fb8 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSeg | 319ab26665ea492527a1949671650135123ffc39 | 2c8c35a8949fef74599f5ec557d340a14415f20d | refs/heads/release/2.8 | 2023-08-31T09:08:06.724717 | 2023-08-18T01:59:56 | 2023-08-18T01:59:56 | 204,380,779 | 8,531 | 1,866 | Apache-2.0 | 2023-09-12T02:30:42 | 2019-08-26T02:32:22 | Python | UTF-8 | Python | false | false | 1,830 | py | stfpm.py | # Copyright (c) 2023 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... |
870881a8aeb9c1c8ba3e939e888e583ad56b2a27 | 4724ff27971f185099a27ec04f329d43c962133c | /tests/cli/27_test_info.py | b16047df3f49a8640b41c482dc4dc886919641d7 | [
"MIT"
] | permissive | WordOps/WordOps | 2efef63cbfb9741b7f8b6554bb26d53fdb88bea8 | 64ad38600f98e021e699ee4216d7186197f01b3f | refs/heads/master | 2023-08-19T09:05:03.322182 | 2023-08-15T18:08:15 | 2023-08-15T18:08:15 | 121,243,203 | 1,214 | 242 | MIT | 2023-09-12T12:24:49 | 2018-02-12T12:19:24 | Python | UTF-8 | Python | false | false | 452 | py | 27_test_info.py | from wo.utils import test
from wo.cli.main import WOTestApp
class CliTestCaseInfo(test.WOTestCase):
def test_wo_cli_info_mysql(self):
with WOTestApp(argv=['info', '--mysql']) as app:
app.run()
def test_wo_cli_info_php(self):
with WOTestApp(argv=['info', '--php']) as app:
... |
14590521a96abeab9a57953c7b9b797b781efbce | 7a7e2201642a730460dd4d3b0441df3710898787 | /PythonWidget/algorithms/search_all_files.py | 351d6f8eb84c4958deff4f05f4dab540d153bd1c | [
"BSD-3-Clause"
] | permissive | xiaodongxiexie/python-widget | 87118cbd75927f2f181fc5c9ff1a0fbd1c12af27 | 58fd929ee57884a73a1d586c7b891c82b9727f93 | refs/heads/master | 2023-04-02T03:13:51.929149 | 2023-03-23T02:17:21 | 2023-03-23T02:17:21 | 89,505,063 | 188 | 55 | null | null | null | null | UTF-8 | Python | false | false | 1,471 | py | search_all_files.py | #coding: utf-8
#使用递归查找指定目录下所有文件,并美化输出
import os
import glob
def searchFile(root_path,flag=0):
if glob.glob(os.path.join(root_path, '*')):
for x in glob.glob(os.path.join(root_path, '*')):
if flag == 1:
print '\t\t', x
else:
print x
searchF... |
13edc81d2fcb936b86378291dccdc18e73458dfc | 80d505489f5354d4b29156d6eea7e3516162bcc7 | /exercises/practice/say/.meta/example.py | 95d6d44770fd6035b42f5196213ac2aa958e2f1a | [
"Python-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | exercism/python | 419e89690070eef42fc4c932faa0df0706d5c222 | 1e71b8a00c8b34c251d785f0a10843efc5234994 | refs/heads/main | 2023-08-29T03:18:02.845245 | 2023-08-25T12:50:16 | 2023-08-25T12:50:16 | 17,274,389 | 1,588 | 1,513 | MIT | 2023-09-14T20:33:13 | 2014-02-28T03:48:58 | Python | UTF-8 | Python | false | false | 1,478 | py | example.py | def say(number):
small = dict(enumerate((
'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',
'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen',
'sixteen', 'seventeen', 'eighteen', 'nineteen')))
tens = {20: 'twenty', 30: 'thirty', 40: '... |
0107eb09026a318b5a64191fa21d1bfe2db1e398 | 6bbadf1d6c8f23cd08d643324003d9c46e99bae2 | /filterpy/examples/__init__.py | e8bd52ef77c623dc8d2ce76e0366df83bae11367 | [
"MIT"
] | permissive | rlabbe/filterpy | 83293ffc05e10a9ec6dc06ff22006dadb3285ff3 | 3b51149ebcff0401ff1e10bf08ffca7b6bbc4a33 | refs/heads/master | 2023-08-23T02:15:53.525750 | 2022-08-22T18:21:12 | 2022-08-22T18:21:12 | 21,843,083 | 2,957 | 661 | MIT | 2022-09-22T16:35:35 | 2014-07-15T02:15:19 | Python | UTF-8 | Python | false | false | 280 | py | __init__.py | # -*- coding: utf-8 -*-
#pylint: disable=wildcard-import
""" Contains various example, mostly very outdated now."""
from __future__ import (absolute_import, division, print_function,
unicode_literals)
__all__ = ["radar_sim"]
from .radar_sim import *
|
3547b40a30d474b6a6faeaa6bac7ed964bc6ad5a | b40d1a26ea04a19ec0da7bf55db84b7ee36cc898 | /leetcode.com/python/681_Next_Closest_Time.py | b9360823d19f414d38cea95220bdabe8d38ff6f1 | [
"MIT"
] | permissive | partho-maple/coding-interview-gym | 5e8af7d404c28d4b9b52e5cffc540fd51d8025cf | 20ae1a048eddbc9a32c819cf61258e2b57572f05 | refs/heads/master | 2022-09-11T16:36:01.702626 | 2022-03-14T08:39:47 | 2022-03-14T08:39:47 | 69,802,909 | 862 | 438 | MIT | 2022-08-18T06:42:46 | 2016-10-02T14:51:31 | Python | UTF-8 | Python | false | false | 2,631 | py | 681_Next_Closest_Time.py | import bisect
# My initial solution. Not correct solution
class Solution(object):
def nextClosestTime(self, time):
"""
:type time: str
:rtype: str
"""
digits = list(time)
digits.pop(2)
sortedDigits = sorted(digits)
for idx in range(len(digits) - 1, -1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.