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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3b17bd810932ee635e24864482ef59430b9471e8 | 6f36df6219f8e50374068bb4b3e1a5387c7a2f34 | /examples/convection/exponential1D/tri2D.py | 4b7ae111ec641368df45c736ad14e143140f295b | [
"NIST-PD"
] | permissive | usnistgov/fipy | 0a3db715fea452ae710eea3999d9cd42dfe76fe7 | fdc17193bc293da7511be9021e6d4766757e1966 | refs/heads/master | 2023-08-31T21:59:36.611448 | 2023-06-27T16:28:58 | 2023-06-27T16:28:58 | 23,316,495 | 444 | 171 | NOASSERTION | 2023-09-06T19:21:19 | 2014-08-25T14:27:58 | Python | UTF-8 | Python | false | false | 1,705 | py | tri2D.py | r"""
This example solves the steady-state convection-diffusion equation as described in
:mod:`examples.diffusion.convection.exponential1D.input` but uses a
:class:`~fipy.meshes.tri2D.Tri2D` mesh.
Here the axes are reversed (``nx = 1``, ``ny = 1000``) and
.. math::
\vec{u} = (0, 10)
>>> from fipy import CellVari... |
41b7a902faf87390ad221c9b3f5c955ede78ea4a | fea765125139b71175f69525aca692ba349bcf48 | /monitoring/error_reporting.py | 5a21970a8dfc2d37232236b74989d652792567d5 | [
"MIT"
] | permissive | ourresearch/oadoi | 4e39b93429d30cedcdc9d6d5f618de6ebab0f105 | 54750e4d58fc39c3714d934b47060949320a89b3 | refs/heads/master | 2023-09-05T18:01:53.743037 | 2023-08-28T14:33:33 | 2023-08-28T14:33:33 | 59,266,757 | 156 | 19 | MIT | 2023-05-01T21:36:52 | 2016-05-20T05:14:06 | Python | UTF-8 | Python | false | false | 320 | py | error_reporting.py | import json
from app import logger
from monitoring.email import send_email
def handle_papertrail_alert(alert):
payload = json.loads(alert.values['payload'])
pp_alert = json.dumps(payload, indent=2)
logger.info(u'got this papertrail alert:\n{}'.format(pp_alert))
send_email(pp_alert)
return alert
|
cbb5ff0c99f5f23cab5cad7f31d92f58d95e9315 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/dp分类/区间dp/dfs/回文/中心扩展法求回文子串/2472. 不重叠回文子字符串的最大数目/2472. 不重叠回文子字符串的最大数目.py | 93fea8f8e8b2120c1e6365fa78ed0ed4ea7133aa | [] | 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 | 2,151 | py | 2472. 不重叠回文子字符串的最大数目.py | # 给你一个字符串 s 和一个 正 整数 k 。
# 从字符串 s 中选出一组满足下述条件且 不重叠 的子字符串:
# !每个子字符串的长度 至少 为 k 。
# !每个子字符串是一个 回文串 。
# !返回最优方案中能选择的子字符串的 最大 数目。
class Solution:
def maxPalindromes2(self, s: str, k: int) -> int:
"""
贪心+马拉车 O(n)
我们只需要考虑长度为k和k+1的回文串数目就行。
如果k+2i是回文串,那么掐头去尾,肯定有长度为k的回文串,
... |
8772345250882b91030a89cd14b0d40e5f48aeb0 | dacdebab897f9287f37a2e85c5705a926ddd36aa | /tests/common.py | 7f5f4666f6e748a13ba0adbdbe9efd826cc5d424 | [
"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 | 9,867 | py | common.py | __authors__ = ["Tobias Marschall", "Marcel Martin", "Johannes Köster"]
__copyright__ = "Copyright 2022, Johannes Köster"
__email__ = "johannes.koester@uni-due.de"
__license__ = "MIT"
import os
import signal
import sys
import shlex
import shutil
import time
from os.path import join
import tempfile
import hashlib
import... |
405d9d857b75e620a116bde5200ac70ff3231b21 | 03666e5f961946fc1a0ac67781ac1425562ef0d7 | /src/test/tests/hybrid/qcrit.py | f02131eba31cd7e861b17b8ca2492425721ac6b2 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | visit-dav/visit | e9f81b4d4b9b9930a0db9d5282cd1bcabf465e2e | 601ae46e0bef2e18425b482a755d03490ade0493 | refs/heads/develop | 2023-09-06T08:19:38.397058 | 2023-09-05T21:29:32 | 2023-09-05T21:29:32 | 165,565,988 | 335 | 120 | BSD-3-Clause | 2023-09-14T00:53:37 | 2019-01-13T23:27:26 | C | UTF-8 | Python | false | false | 1,162 | py | qcrit.py | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: qcrit.py
#
# Tests:# plots - pseudocolor, contour
# Defect ID: 1829
#
# Programmer: Kevin Griffin
# Date: Thu Jul 31 14:21:02 PDT 2014
#
# Modifications:
#
# ----------------------------... |
83892f6c286e163c1823af89defe3ef20649385a | 7fa7a9e87ecbaefc1414219701fbf8c789f639ac | /gnpy/tools/cli_examples.py | ba0e226658652161ee5a3ace982a174c5c7503c5 | [
"BSD-3-Clause"
] | permissive | Telecominfraproject/oopt-gnpy | 4f804ba3fc1be5712b78d89d8c029a4546813334 | 70731b64d68ea199d369feb7e3178d3e72d0b48b | refs/heads/master | 2023-08-08T03:15:56.015462 | 2023-06-26T11:47:29 | 2023-07-24T15:13:15 | 96,894,149 | 156 | 88 | BSD-3-Clause | 2023-03-03T15:35:56 | 2017-07-11T13:08:42 | Python | UTF-8 | Python | false | false | 22,055 | py | cli_examples.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
gnpy.tools.cli_examples
=======================
Common code for CLI examples
"""
import argparse
import logging
import sys
from math import ceil
from numpy import linspace, mean
from pathlib import Path
import gnpy.core.ansi_escapes as ansi_escapes
from gnpy.core.e... |
6b82901e824c7b79b681a6834733fe51fa38550a | 7f4605f5424a4a62794c701cb9b26946cf3a66e1 | /examples/contrib/quantization_aware_training/parser.py | 2c445c48fa5280697c6c08a759aef66d78ecc23f | [
"MIT"
] | permissive | NVIDIA-AI-IOT/torch2trt | 8bad3d178767e70a009e0055e89e37e72e0b1027 | 36656b614f3fbc067ac673932e2200d7afdae712 | refs/heads/master | 2023-07-31T22:52:09.467109 | 2023-04-28T17:22:32 | 2023-04-28T17:22:32 | 183,790,380 | 4,295 | 719 | MIT | 2023-04-28T17:22:33 | 2019-04-27T15:30:56 | Python | UTF-8 | Python | false | false | 2,300 | py | parser.py | import argparse
def parse_args():
"""
"""
parser = argparse.ArgumentParser(description='PyTorch QAT')
parser.add_argument('--tl','--transfer_learning',action='store_true',help='used to map weights correctly')
parser.add_argument('--iter',default=300, type=int, help='no of iterations')
parser.ad... |
4234b660446fc26f7ccffd4a9fc2633ae96b83fb | 9734c93c86c982b1ce046340bac9e53645b261b8 | /tests/output/l2t_csv.py | f00780eea4c0347a035cac094ebb66e98ba68d29 | [
"Apache-2.0"
] | permissive | log2timeline/plaso | cd72dd407d6c5627506c14f58cb8f6a6926aa808 | d6022f8cfebfddf2d08ab2d300a41b61f3349933 | refs/heads/main | 2023-09-02T08:43:48.241198 | 2023-08-19T07:28:12 | 2023-08-19T07:28:12 | 23,812,315 | 1,506 | 421 | Apache-2.0 | 2023-09-04T08:24:53 | 2014-09-08T23:29:28 | Python | UTF-8 | Python | false | false | 10,379 | py | l2t_csv.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the log2timeline (l2t) CSV output module."""
import io
import unittest
from dfvfs.path import fake_path_spec
from plaso.containers import events
from plaso.lib import definitions
from plaso.output import l2t_csv
from tests.containers import test_lib as con... |
52436e32db9a8e0405859058e0b6c6ebd2f152fa | 689a78e08c957abc02ea5f89fb657b1f78f88b6e | /det3d/models/necks/rpn.py | 8d489399d959deb3a5e93c42f902bfc49dc4a6c4 | [
"MIT",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | tianweiy/CenterPoint | 2bb9a7def8d4bf87b66af2e3b671736eae6fa275 | d3a248fa56db2601860d576d5934d00fee9916eb | refs/heads/master | 2023-08-30T23:11:49.528882 | 2022-10-24T13:09:52 | 2022-10-24T13:09:52 | 274,006,091 | 1,692 | 476 | MIT | 2023-05-06T10:30:06 | 2020-06-22T00:32:05 | Python | UTF-8 | Python | false | false | 5,501 | py | rpn.py | import time
import numpy as np
import math
import torch
from torch import nn
from torch.nn import functional as F
from torchvision.models import resnet
from torch.nn.modules.batchnorm import _BatchNorm
from det3d.torchie.cnn import constant_init, kaiming_init, xavier_init
from det3d.torchie.trainer import load_check... |
faa41df9b3d9ac5f9a5edcc676ee16dd22aad8c7 | c530897cb72b6943c7226b25824444cad5f3503b | /usaspending_api/recipient/v2/views/list_recipients.py | b4bae78336b83e269f6cd2e89d784ade67ae27f7 | [
"CC0-1.0"
] | permissive | fedspendingtransparency/usaspending-api | fc63a22d32ea0207b7273d3e1ef26ba9dbabc42a | 38f920438697930ae3ac57bbcaae9034877d8fb7 | refs/heads/master | 2023-09-01T22:00:36.633612 | 2023-08-29T18:39:18 | 2023-08-29T18:39:18 | 65,394,827 | 276 | 118 | CC0-1.0 | 2023-09-14T20:33:15 | 2016-08-10T15:39:45 | Python | UTF-8 | Python | false | false | 5,739 | py | list_recipients.py | import copy
import logging
from django.db.models import F, Q
from django.utils.decorators import method_decorator
from rest_framework.response import Response
from rest_framework.views import APIView
from usaspending_api.common.api_versioning import deprecated
from usaspending_api.common.cache_decorator import cache_... |
a227fdcab03fdfb79e821f94a035ca7b058bee14 | 6bbbb8237c93f9b1f302010a65d6ecb6f286f23b | /websauna/tests/utils/test_utils_crypt.py | 99e024122e47ae9119d609d2f3ad8006f4cbe844 | [
"MIT",
"Apache-2.0"
] | permissive | websauna/websauna | ea60d5a6aef59b3725bace0d188dacea72574e63 | a57de54fb8a3fae859f24f373f0292e1e4b3c344 | refs/heads/master | 2023-08-07T08:16:51.664340 | 2020-06-06T19:28:18 | 2020-06-06T19:28:18 | 49,773,298 | 294 | 74 | NOASSERTION | 2020-12-30T01:48:27 | 2016-01-16T12:55:54 | Python | UTF-8 | Python | false | false | 729 | py | test_utils_crypt.py | """Test utils.crypt."""
# Standard Library
import string
import pytest
# Websauna
from websauna.utils import crypt
test_data = (
(32, None, crypt._default),
(32, crypt._default, crypt._default),
(40, string.digits, string.digits),
)
@pytest.mark.parametrize('length,letters,pool', test_data)
def test_g... |
d7f38f0fd98fd6ca4cdb4c98608d504b4ce8beca | b095173b2dbc77c8ad61c42403258c76169b7a63 | /src/sagemaker/jumpstart/utils.py | f77e1ae2317fb05047cf8d7a34957ae864c567fe | [
"Apache-2.0"
] | permissive | aws/sagemaker-python-sdk | 666665e717cfb76698ba3ea7563b45344634264d | 8d5d7fd8ae1a917ed3e2b988d5e533bce244fd85 | refs/heads/master | 2023-09-04T01:00:20.663626 | 2023-08-31T15:29:19 | 2023-08-31T15:29:19 | 110,621,895 | 2,050 | 1,255 | Apache-2.0 | 2023-09-14T17:37:15 | 2017-11-14T01:03:33 | Python | UTF-8 | Python | false | false | 24,573 | py | utils.py | # Copyright 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 "license" file accompan... |
82002e8cc74e3c315e43be7da1aafa8362243b20 | 5db0fab37c2b8a618d85d3b60fab9f806c416474 | /build-support/flake8/await_in_loop.py | fac47f3bbb86d8aab4f89453372e73530c556b57 | [
"Apache-2.0"
] | permissive | pantsbuild/pants | 4988d1ac5474ec95f94ce2218aeb759401e4b011 | 98cbda8545f0d58c586ed2daa76fefd729d5e0d5 | refs/heads/main | 2023-09-05T03:44:17.646899 | 2023-09-01T19:52:09 | 2023-09-01T19:52:09 | 7,209,075 | 2,708 | 593 | Apache-2.0 | 2023-09-14T19:33:33 | 2012-12-17T17:39:04 | Python | UTF-8 | Python | false | false | 4,695 | py | await_in_loop.py | # Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""Disallow 'await' in a loop."""
from __future__ import annotations
import ast
from contextlib import contextmanager
from pathlib import PurePath
from typing import Iterator, Sequence
d... |
1b64b6eda9614116a9d50c21f1338f7758c61940 | 279f415dd1e06c594c6c87deda57e201c73c4542 | /egs2/tedx_spanish_openslr67/asr1/local/split_data.py | 6692a4e7a70146bd2b32bd43a0e1eb4b9b81ad9d | [
"Apache-2.0"
] | permissive | espnet/espnet | f7ba47271c1a6b1ed606dbbfb04a7f14220bb585 | bcd20948db7846ee523443ef9fd78c7a1248c95e | refs/heads/master | 2023-08-28T23:43:34.238336 | 2023-08-23T02:51:39 | 2023-08-23T02:51:39 | 114,054,873 | 7,242 | 2,244 | Apache-2.0 | 2023-09-14T08:01:11 | 2017-12-13T00:45:11 | Python | UTF-8 | Python | false | false | 1,046 | py | split_data.py | # create train, dev, test split 90/5/5
# no speakers in the train set, 4M4F in test/dev sets
# 126 (94M, 32F), 8 (4M, 4F), 8 (4M, 4F)
import glob
import os
import random
m_speakers = []
f_speakers = []
for f in glob.glob(os.environ["TEDX_SPANISH"] + "/tedx_spanish_corpus/speech/*.wav"):
spkr = "_".join(f.split(... |
5e552c28039d402a312b58e47262514fdc80a9fc | 0e48483bd01170a8f4ca864de9b75bad50f55a94 | /tests/integration/backward_compatible/threading_test.py | 00dce33091c2111f2da50d0e262add73c134c2eb | [
"Apache-2.0"
] | permissive | hazelcast/hazelcast-python-client | ed01e55165961ecb148a498ae3dd36503b64e93e | 1723cc040c328ebc0d5ab44396c2f55bad7d9075 | refs/heads/master | 2023-09-04T02:29:29.753280 | 2023-08-14T09:13:03 | 2023-08-14T09:13:03 | 47,321,016 | 112 | 73 | Apache-2.0 | 2023-09-11T17:59:53 | 2015-12-03T09:14:23 | Python | UTF-8 | Python | false | false | 1,795 | py | threading_test.py | import sys
import threading
from random import choice
from unittest import skip
from tests.base import SingleMemberTestCase
from tests.util import random_string
class ThreadingTest(SingleMemberTestCase):
@classmethod
def configure_client(cls, config):
config["cluster_name"] = cls.cluster.id
... |
77dda568e55db9cb761ec455bd9e028178fc8dc1 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/search/azure-search-documents/tests/async_tests/test_search_client_index_document_live_async.py | 24b8f73f31035f88e055ff609f32f7cc4a020d62 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 6,927 | py | test_search_client_index_document_live_async.py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from pydo... |
5e1a0dbf05923b37b90d66627727da342d894863 | fa3f6d4e9169fb95f828013d179d03accdff381b | /grr/server/grr_response_server/databases/mysql_blob_keys.py | c9b853a754af5911c152ff17a66395c8727bfdde | [
"Apache-2.0"
] | permissive | google/grr | c51a2bd251ed2f7adae538541990a2cc01fdcc8c | 44c0eb8c938302098ef7efae8cfd6b90bcfbb2d6 | refs/heads/master | 2023-09-05T20:02:36.823914 | 2023-07-26T09:34:09 | 2023-07-26T09:34:09 | 14,909,673 | 4,683 | 927 | Apache-2.0 | 2023-07-26T09:34:10 | 2013-12-04T00:17:53 | Python | UTF-8 | Python | false | false | 2,122 | py | mysql_blob_keys.py | #!/usr/bin/env python
"""A module with MySQL implementation of blobstore encryption keys methods."""
from __future__ import annotations
from typing import Collection
from typing import Dict
from typing import Optional
import MySQLdb
from grr_response_server.databases import mysql_utils
from grr_response_server.rdfva... |
55d934fc5af2084dd75a3b78b11d4431b6e52297 | 94c1805df5a09c39159d502f420d19ad54b567fc | /runtime/deps/gyp/test/rules-variables/gyptest-rules-variables.py | c1825e0c1363857ebca6e03fcf1477ab74054b43 | [
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | tmikov/jscomp | 9805a5a4d06520549c57380f0df4a1c0aa0dab56 | 83828441cb38ec96603a6a60be06977d4852940a | refs/heads/develop | 2021-01-19T02:56:35.102659 | 2016-04-12T06:19:30 | 2016-04-12T06:19:30 | 36,981,674 | 237 | 13 | Apache-2.0 | 2018-10-14T09:48:12 | 2015-06-06T13:49:26 | C | UTF-8 | Python | false | false | 806 | py | gyptest-rules-variables.py | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies rules related variables are expanded.
"""
import sys
if sys.platform == 'win32':
print "This test is currently disabled: ht... |
1caab6f8f1b3c4d5c128b97f49991167d997bcbe | d629e0d6ca0a3bb0c270879b2388ad5e23ed7e9d | /tests/mypy/module/success.py | a48fafd22f86be81ae79b220e28760e6ee5e1f00 | [
"MIT"
] | permissive | seandstewart/typical | 942645157dcd70a69fbe1957f88b7b0a850528b7 | 97eec305c094f265abc49051150be56a2fe17a07 | refs/heads/main | 2023-08-18T00:35:48.713176 | 2023-04-26T16:56:57 | 2023-04-26T16:56:57 | 175,726,271 | 190 | 15 | MIT | 2023-07-25T21:39:11 | 2019-03-15T01:24:36 | Python | UTF-8 | Python | false | false | 716 | py | success.py | import typic
@typic.klass
class Klass:
attr: str
class Other:
def __init__(self, attr: str):
self.attr = attr
if __name__ == "__main__":
Klass(attr="foo")
Klass("foo")
Klass.transmute("foo")
Klass.validate({"attr": "foo"})
Klass("foo").primitive()
Klass("foo").primitive(la... |
dbe6eedae8e75a58df170c7a8c56d3bef81aacee | ec4f9f4df4497507c2f0f0c64afbf68f07b7e62a | /sqlathanor/declarative/declarative_base.py | efcbef27ff0b428528a598403ef1e2765a93d9f4 | [
"MIT"
] | permissive | insightindustry/sqlathanor | 70c4fe11081e54aadbf661770a016d8db3e1cc2a | a5cfd349d092b25a3ffb3950b996b13878e1db17 | refs/heads/master | 2022-05-22T20:01:10.571987 | 2020-12-28T18:00:42 | 2020-12-28T18:00:42 | 137,494,226 | 105 | 7 | MIT | 2022-04-28T19:34:34 | 2018-06-15T14:00:46 | Python | UTF-8 | Python | false | false | 3,213 | py | declarative_base.py | # -*- coding: utf-8 -*-
# The lack of a module docstring for this module is **INTENTIONAL**.
# The module is imported into the documentation using Sphinx's autodoc
# extension, and its member function documentation is automatically incorporated
# there as needed.
from sqlalchemy.ext.declarative import declarative_bas... |
d8d9cffcc782b6f2ad68863a85a5ccdee7b3f423 | adf3ca8f0ce8b3333d70c83118932d0e46d90182 | /tiledb/tests/cc/test_vfs.py | 3bfb76758354c8d412faf1b94f2cb86ce92edc05 | [
"MIT"
] | permissive | TileDB-Inc/TileDB-Py | 77ccce93e1607ce4280d57d2f715cf490aa9f0d3 | 223ee9939e23ecb618bd98d89dc9e874ebd47a2d | refs/heads/dev | 2023-08-28T14:13:52.112262 | 2023-08-25T20:03:54 | 2023-08-26T01:19:46 | 91,851,641 | 167 | 35 | MIT | 2023-09-14T19:07:10 | 2017-05-19T23:06:53 | Python | UTF-8 | Python | false | false | 849 | py | test_vfs.py | import os
import tiledb.cc as lt
def test_dir(tmp_path):
ctx = lt.Context()
vfs = lt.VFS(ctx)
path = os.path.join(tmp_path, "test_dir")
vfs._create_dir(path)
assert vfs._is_dir(path) is True
assert vfs._dir_size(path) == 0
vfs._remove_dir(path)
assert vfs._is_dir(path) is False
de... |
5c108c7ee51c14f01106f561274fe9f792079f7e | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/grit/grit/node/mapping.py | 2fef690ac0bb7569613eccca6db5dab3755458c5 | [
"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 | 1,731 | py | mapping.py | # Copyright 2012 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
'''Maps each node type to an implementation class.
When adding a new node type, you add to this mapping.
'''
from grit import exception
from grit.node import empty
from grit.no... |
1e93c0418192ec363da8c24816559238d18d2720 | 2c4c3f777d94157d5a5cf8664907de1a605a1110 | /utils/data_loader.py | 24c6cc6930e9197c264a811cb3a55322b70f0580 | [
"Apache-2.0"
] | permissive | safe-graph/DGFraud | a86715662d86291c22dae389aa36d72b74042ab6 | 22b72d75f81dd057762f0c7225a4558a25095b8f | refs/heads/master | 2023-08-23T01:01:04.195966 | 2022-04-20T21:39:08 | 2022-04-20T21:39:08 | 223,415,751 | 632 | 162 | Apache-2.0 | 2020-07-31T04:10:54 | 2019-11-22T14:02:36 | Python | UTF-8 | Python | false | false | 7,253 | py | data_loader.py | import numpy as np
from sklearn.model_selection import train_test_split
import scipy.io as sio
import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.getcwd(), '..')))
from utils.utils import pad_adjlist
import zipfile
# zip_src = '../dataset/DBLP4057_GAT_with_idx_tra200_val_800.zip'
# dst_dir = '../... |
de34346812fa4c132a3e672127bb533c8d4e549b | dfa1a1a263eab3ac8bbcb2a00297da7fc82bccfd | /src/graphs/toplogical_sort_bfs.py | c91750c1e740118145884b6015d84fd06b8f9166 | [] | no_license | monpro/algorithm | 07e79e7a85ca9fe86fac0b3c740de2f2037f5e89 | a330e92191642e2965939a06b050ca84d4ed11a6 | refs/heads/master | 2021-07-01T03:49:59.040611 | 2020-08-25T12:36:54 | 2020-08-25T12:36:54 | 143,118,129 | 102 | 0 | null | 2020-05-31T04:22:46 | 2018-08-01T07:12:45 | Python | UTF-8 | Python | false | false | 1,039 | py | toplogical_sort_bfs.py | """
Definition for a Directed graph node
class DirectedGraphNode:
def __init__(self, x):
self.label = x
self.neighbors = []
"""
class Solution:
"""
@param: graph: A list of Directed graph node
@return: Any topological order for the given graph.
"""
def topSort(s... |
5dd691f26049b91e38d1a542aec5cec5d23bfea4 | 7343ece3b82ac87a594865c4074623b45b0297b4 | /synapse/util/linked_list.py | 8efbf061aaae9461ee322668315edd903201b112 | [
"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 | 5,006 | py | linked_list.py | # Copyright 2021 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... |
ae2b682ee8a1b9d4db148dbb4b94f1902b74c8ae | 7418bfa84537014885da5414c22c6b926101b136 | /kfac/python/kernel_tests/optimizer_test.py | 3cd06024016525271a51efc937febaa43b0f2eb9 | [
"Apache-2.0"
] | permissive | tensorflow/kfac | a024789cfa99f08f9488d8be930ca233a874e860 | ddad6375bbdebfae809bccfd3a5c3db073128764 | refs/heads/master | 2023-09-04T08:45:24.299663 | 2022-02-11T18:05:09 | 2022-02-11T20:33:56 | 119,905,182 | 193 | 44 | Apache-2.0 | 2021-08-30T19:54:19 | 2018-02-01T23:14:00 | Python | UTF-8 | Python | false | false | 7,517 | py | optimizer_test.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
bf45c66d8791b6ab6d9d05914e4dd10a9326a7bf | 36437b397a855f3986325f1bfe41d7ced00b703a | /tests/hierarchies/test_name_harmonizing.py | e1ced91a83f819a0be5749d8f406ac8d1fdf2f25 | [
"MIT"
] | permissive | nolar/kopf | 090cd21550e3a86e512a4c9150dfcf5f59ac14e4 | 538df59b88d1aab7b985d703483497f73c6c4783 | refs/heads/main | 2023-08-29T20:39:07.128912 | 2023-08-24T15:47:40 | 2023-08-24T15:47:40 | 288,234,242 | 1,627 | 154 | MIT | 2023-09-14T12:31:33 | 2020-08-17T16:45:35 | Python | UTF-8 | Python | false | false | 11,783 | py | test_name_harmonizing.py | import copy
import pytest
import kopf
forced_mode = pytest.mark.parametrize('forcedness', [
pytest.param(dict(forced=True), id='forcedTrue'),
])
non_forced_mode = pytest.mark.parametrize('forcedness', [
pytest.param(dict(forced=False), id='forcedFalse'),
pytest.param(dict(), id='forcedAbsent'),
])
any_fo... |
275b1368601cf5e574429a70d22560584d449283 | 13800b7827598e76428a335559b7bf11867ec2f0 | /examples/py/kraken-conditional-close-order.py | c865a3a520251ad52ade030d4f432325cab711cd | [
"MIT"
] | permissive | ccxt/ccxt | b40a0466f5c430a3c0c6026552ae697aa80ba6c6 | e4065f6a490e6fc4dd7a72b375428b2faa570668 | refs/heads/master | 2023-09-04T03:41:29.787733 | 2023-09-03T19:25:57 | 2023-09-03T19:25:57 | 91,253,698 | 30,798 | 8,190 | MIT | 2023-09-14T21:59:09 | 2017-05-14T15:41:56 | Python | UTF-8 | Python | false | false | 938 | py | kraken-conditional-close-order.py | # -*- coding: utf-8 -*-
import os
import sys
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
import ccxt # noqa: E402
from pprint import pprint
exchange = ccxt.kraken({
# 'apiKey': 'YOUR_API_KEY',
# 'secret': 'YOUR_SECRET',
})
markets ... |
31bcff02c841198c59c941a809893346f36e9e5c | ef1def58b933921ccf31bece9fc6eb5f7ffb9a18 | /tensorhive/models/RestrictionSchedule.py | 8ab1ba0b6e266b25d64e9dc40189a615b6b10f22 | [
"Apache-2.0"
] | permissive | roscisz/TensorHive | 4b33acd727e0b294a4a12af972c471e1254136aa | 5b50245d285618044a9a71c06ea5361a48ad4acb | refs/heads/master | 2023-03-10T05:09:08.874394 | 2022-02-02T11:08:21 | 2022-02-02T11:08:21 | 98,513,283 | 153 | 26 | Apache-2.0 | 2023-03-01T02:26:54 | 2017-07-27T08:37:35 | Python | UTF-8 | Python | false | false | 4,695 | py | RestrictionSchedule.py | import re
import datetime
import logging
from sqlalchemy import Column, Integer, String, Time, ForeignKey
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.hybrid import hybrid_property
from tensorhive.database import Base
from tensorhive.models.CRUDModel import CRUDModel
from tensorhive.utils.Weekd... |
a3558b65bfac161d1de03a1d46d7d8a4f330d5ff | ff443629c167f318d071f62886581167c51690c4 | /contrib/verify-binaries/test.py | 22d718ece334aa99d33ca1c9f813847fd394c33e | [
"MIT"
] | permissive | bitcoin/bitcoin | a618b2555d9fe5a2b613e5fec0f4b1eca3b4d86f | 6f03c45f6bb5a6edaa3051968b6a1ca4f84d2ccb | refs/heads/master | 2023-09-05T00:16:48.295861 | 2023-09-02T17:43:00 | 2023-09-02T17:46:33 | 1,181,927 | 77,104 | 33,708 | MIT | 2023-09-14T20:47:31 | 2010-12-19T15:16:43 | C++ | UTF-8 | Python | false | false | 2,206 | py | test.py | #!/usr/bin/env python3
import json
import sys
import subprocess
from pathlib import Path
def main():
"""Tests ordered roughly from faster to slower."""
expect_code(run_verify("", "pub", '0.32'), 4, "Nonexistent version should fail")
expect_code(run_verify("", "pub", '0.32.awefa.12f9h'), 11, "Malformed ve... |
65806eb4b6ea7b1dc69d2421158c455735b6275c | 7f620e7902c0b9ccb1fcfd1427acd5936ea33814 | /tests/package/packagers_testers/default_packager_tester.py | 617ff2698028186ac5cac690364ee6e55d559f2d | [
"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 | 2,228 | py | default_packager_tester.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... |
5260203e8edecdb823ff8ae8f03acade16d72d80 | 7766096d6b2032562304e4b20190256ac2a5023e | /xbox/webapi/authentication/manager.py | 1552e32a19663246e843ab42f215a8cb1ed8c350 | [
"MIT"
] | permissive | OpenXbox/xbox-webapi-python | c9d47be15cebc258ced7afde1ead70b5cd2d7a8c | 398320c7777475959e4f8c6716297735be04aac4 | refs/heads/master | 2023-03-16T23:02:06.051438 | 2022-11-12T15:28:50 | 2022-11-12T15:28:50 | 125,562,423 | 166 | 55 | MIT | 2022-11-15T13:31:11 | 2018-03-16T19:43:18 | Python | UTF-8 | Python | false | false | 5,743 | py | manager.py | """
Authentication Manager
Authenticate with Windows Live Server and Xbox Live.
"""
import logging
from typing import List, Optional
import httpx
from xbox.webapi.authentication.models import (
OAuth2TokenResponse,
XAUResponse,
XSTSResponse,
)
from xbox.webapi.common.exceptions import AuthenticationExcep... |
e1b7dd9f08924d980c418de8168ae5f885d34fab | ca10e5645aa2e8152d6219d31ac77d3ed50096c0 | /bindings/python/capstone/riscv.py | ca09db61f337d5b892992a3bd9ee29fe5a2cbedc | [
"BSD-3-Clause",
"NCSA"
] | permissive | capstone-engine/capstone | fc4f1b14eded800818f2ed64eafaf342e6046f9b | f036d2dbb6a9f0d1e0dc9c14b4f44878aeed260a | refs/heads/next | 2023-09-02T14:38:15.356818 | 2023-08-30T03:13:17 | 2023-08-30T03:13:17 | 14,735,429 | 1,390 | 292 | NOASSERTION | 2023-09-14T20:47:20 | 2013-11-27T02:32:11 | C | UTF-8 | Python | false | false | 1,055 | py | riscv.py | # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com>
import ctypes
from . import copy_ctypes_list
from .riscv_const import *
# define the API
class RISCVOpMem(ctypes.Structure):
_fields_ = (
('base', ctypes.c_uint),
('disp', ctypes.c_int64),
)
class RISCVOpValue(ctypes.Union):
... |
8645a3235a53e541f664c2c9abc0e53eb2fe8a1a | 3982e6daf88e453c726f6b39a081fc37ce15a08a | /discovery-provider/src/challenges/trending_challenge.py | 1d6590ef0644086277623205298fd802e9bc221f | [
"Apache-2.0"
] | permissive | AudiusProject/audius-protocol | 45808e11082608ad5b76a425d287cb6d94a6dab0 | 7cf1d8e378520460d24a7cc8c29e9927c0944cb3 | refs/heads/main | 2023-08-09T10:34:28.850436 | 2023-08-09T04:28:17 | 2023-08-09T04:28:17 | 201,821,771 | 531 | 108 | NOASSERTION | 2023-09-14T21:27:52 | 2019-08-11T22:31:43 | TypeScript | UTF-8 | Python | false | false | 3,497 | py | trending_challenge.py | import logging
from datetime import date, datetime, timedelta
from typing import Dict, List, Optional, Tuple
import pytz
from sqlalchemy import desc
from sqlalchemy.orm.session import Session
from src.challenges.challenge import (
ChallengeManager,
ChallengeUpdater,
FullEventMetadata,
)
from src.models.re... |
751a5e1ad6ca056c402dd4d004401a2069e643bd | a9f5549d90e49c62c1198a3a54a70370e6f7256c | /setup.py | 49365bd706ed4d13ecb718b8bb444eb31f48a97b | [
"BSD-3-Clause",
"Python-2.0"
] | permissive | Blosc/python-blosc | cbe07af0b3c52ee4dcf0c43d0de5b83c7cd117e4 | 99128d6d3f988546e0ca03b3bc431eb9d377bec4 | refs/heads/main | 2023-07-01T10:42:32.301766 | 2023-05-01T11:38:40 | 2023-05-01T11:38:40 | 951,194 | 288 | 73 | NOASSERTION | 2023-09-04T19:55:16 | 2010-09-30T12:56:53 | Python | UTF-8 | Python | false | false | 3,686 | py | setup.py | ########################################################################
#
# License: BSD 3-clause
# Created: September 22, 2010
# Author: The Blosc development team
#
########################################################################
# flake8: noqa
import os
import sys
from skbuild import s... |
c16531f3d2947cfc49eba48520f2d9c7dcaf6f30 | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/securityinsight/azext_sentinel/aaz/latest/sentinel/entity_query/_create.py | edba2948fc2bdddd4b0528db7413fbebe72ee54e | [
"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 | 16,545 | py | _create.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------... |
c64f206429a490464a2dd97478119f51af1f3797 | 9e204cdb8d32e3854bb96c8d933f4a5f3a7d00f3 | /pyredner_tensorflow/object.py | e2d81504f51ad20298a74a5fa27719447f22f4b3 | [
"MIT"
] | permissive | BachiLi/redner | 81ca08f838cf00e1a31758f3f06a82559a1de7d8 | f355e8c445b2cba1dd7d75b8e137d736c7270520 | refs/heads/master | 2023-08-19T03:16:49.188230 | 2022-03-28T18:57:01 | 2022-03-28T18:57:01 | 157,027,341 | 1,326 | 147 | MIT | 2022-08-19T13:09:03 | 2018-11-10T22:32:27 | NASL | UTF-8 | Python | false | false | 3,681 | py | object.py | import pyredner_tensorflow as pyredner
import tensorflow as tf
from typing import Optional
class Object:
"""
Object combines geometry, material, and lighting information
and aggregate them in a single class. This is a convinent class
for constructing redner scenes.
redner supports ... |
0c8b04522cf0d6194f6afc1849d3390528e7aabf | 8ca19f1a31070738b376c0370c4bebf6b7efcb43 | /office365/runtime/types/event_handler.py | 57576ab5085362b7135f94ff2c2c827adac922af | [
"MIT"
] | permissive | vgrem/Office365-REST-Python-Client | 2ef153d737c6ed5445ba1e446aeaec39c4ef4ed3 | cbd245d1af8d69e013c469cfc2a9851f51c91417 | refs/heads/master | 2023-09-02T14:20:40.109462 | 2023-08-31T19:14:05 | 2023-08-31T19:14:05 | 51,305,798 | 1,006 | 326 | MIT | 2023-08-28T05:38:02 | 2016-02-08T15:24:51 | Python | UTF-8 | Python | false | false | 688 | py | event_handler.py | class EventHandler:
def __init__(self, once=False):
self._listeners = []
self._once = once
def __contains__(self, e):
return e in self._listeners
def __iter__(self):
return iter(self._listeners)
def __iadd__(self, listener):
self._listeners.append(listener)
... |
ee86201f74f4f73b8300f69dbca06d3d92c7cffb | 8880226d2ca1c9448c44b3e9f21226a58e61ac93 | /awacs/chatbot.py | a8dc71a7b973a28106ea794750a3a20892f118ee | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | cloudtools/awacs | 2f82958ccc7ba2177492c29c706a5737f19dd2d1 | c449a9637f01c26e73b827a9f8d5cc7715bbbea2 | refs/heads/main | 2023-08-31T00:58:28.636568 | 2023-08-28T05:13:01 | 2023-08-28T05:13:01 | 9,062,692 | 385 | 107 | BSD-2-Clause | 2023-08-13T23:21:39 | 2013-03-27T20:16:27 | Python | UTF-8 | Python | false | false | 2,745 | py | chatbot.py | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
from typing import Optional
from .aws import Action as BaseAction
from .aws import BaseARN
service_name = "AWS Chatbot"
prefix = "chatbot"
class Action(BaseAction):
def __init__(self, action: Opti... |
bbd55ae575bbc04efe5ebf28427a78800f65ea55 | de2d6e6cbb65729255f288f3b3bf1c065c538573 | /running_modes/configurations/automated_curriculum_learning/automated_curriculum_learning_input_configuration.py | 8257e8863db8f5cff4e1f9745d9f690988b9252a | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | MolecularAI/Reinvent | 2edf7736b77107f3c04a6ba7ad8b8a3b39691f31 | b7324d222a49d18b08335a01649abdb0ac66a734 | refs/heads/master | 2022-08-09T00:09:11.752865 | 2022-06-01T15:17:01 | 2022-06-01T15:17:01 | 248,080,601 | 306 | 110 | Apache-2.0 | 2023-03-05T15:55:52 | 2020-03-17T21:54:26 | Python | UTF-8 | Python | false | false | 644 | py | automated_curriculum_learning_input_configuration.py | from running_modes.configurations.automated_curriculum_learning.base_configuration import BaseConfiguration
from running_modes.configurations.automated_curriculum_learning.curriculum_strategy_input_configuration import \
CurriculumStrategyInputConfiguration
from running_modes.configurations.automated_curriculum_lea... |
67d79c9e6b39dae1645ac0156837b017770461c6 | 4a84dc50411dc2a423ba7408318522b7c26c9487 | /tests/unit/test_soapui2yaml.py | 7e72e8b9243f1fbf48c13561170af880e1e314cc | [
"Apache-2.0"
] | permissive | Blazemeter/taurus | ffdef9b433d6754e5395f6b42fc6838ef817a763 | 81a114bb10ae0b0827079bb7acc2337db8f0e68d | refs/heads/master | 2023-08-19T00:19:12.036869 | 2023-08-14T11:45:09 | 2023-08-14T11:45:09 | 30,940,272 | 1,976 | 555 | Apache-2.0 | 2023-09-12T09:37:02 | 2015-02-17T22:05:08 | Python | UTF-8 | Python | false | false | 2,550 | py | test_soapui2yaml.py | import yaml
from bzt.soapui2yaml import SoapUI2YAML
from tests.unit import BZTestCase, RESOURCES_DIR, EngineEmul
class FakeOptions(object):
def __init__(self, verbose=True, file_name=None, test_case=None, quiet=False, json=False, log=False):
self.verbose = verbose
self.file_name = file_name
... |
afe8048ed2a1475466a6c8c1664652548788ff88 | 2f57b9476832bc613ca7428353f9f2ddde89b4f3 | /impala/hiveserver2.py | 73f4555ff2a0f24dc65dc31aa8b69c45cd059585 | [
"Apache-2.0"
] | permissive | cloudera/impyla | 121f9cf9b4f576046ce60018d022f37b96b712f0 | b8272c61dd9023019b65666b923469639edb3818 | refs/heads/master | 2023-08-28T01:24:53.013395 | 2023-08-01T21:19:09 | 2023-08-02T16:31:31 | 18,780,981 | 720 | 277 | Apache-2.0 | 2023-08-02T00:28:27 | 2014-04-14T23:52:07 | Python | UTF-8 | Python | false | false | 59,649 | py | hiveserver2.py | # Copyright 2014 Cloudera 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... |
c20a33bd6a4369df47c5fe72b85c29886537f3e1 | 95069eaed0c9abe54bb20019511c39053a966236 | /audio/hparams_audio.py | c27408f2bd4baddfff544f56a7c57be2d027ce5f | [
"MIT"
] | permissive | xcmyz/FastSpeech | 722546ff71d717a537cb1782462db457a3d14998 | 1e1a61b5015c951caa551b7fab4080339d697c7c | refs/heads/master | 2023-07-23T03:28:19.696457 | 2022-09-16T06:38:58 | 2022-09-16T06:38:58 | 189,590,197 | 884 | 230 | MIT | 2023-07-06T22:00:14 | 2019-05-31T12:27:47 | Python | UTF-8 | Python | false | false | 155 | py | hparams_audio.py | max_wav_value = 32768.0
sampling_rate = 22050
filter_length = 1024
hop_length = 256
win_length = 1024
n_mel_channels = 80
mel_fmin = 0.0
mel_fmax = 8000.0
|
a3fd6cdcaea4fafe6f022a7f0e6b6238209dcdfc | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/reverse-linked-list.py | 27ea387334fbefcad96b2d2526f4ee98ad50d30d | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 1,057 | py | reverse-linked-list.py | # Time: O(n)
# Space: O(1)
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
def __repr__(self):
if self:
return "{} -> {}".format(self.val, repr(self.next))
# Iterative solution.
class Solution(object):
# @param {ListNode} head
# @retur... |
c45c88b36e8e5dec73523b397e1c656e6ccfb283 | 7eaf54a78c9e2117247cb2ab6d3a0c20719ba700 | /SOFTWARE/A64-TERES/linux-a64/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 15c8400240fd9029ae34fca077304337d9c75ca6 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"Linux-syscall-note",
"GPL-2.0-only",
"GPL-1.0-or-later"
] | permissive | OLIMEX/DIY-LAPTOP | ae82f4ee79c641d9aee444db9a75f3f6709afa92 | a3fafd1309135650bab27f5eafc0c32bc3ca74ee | refs/heads/rel3 | 2023-08-04T01:54:19.483792 | 2023-04-03T07:18:12 | 2023-04-03T07:18:12 | 80,094,055 | 507 | 92 | Apache-2.0 | 2023-04-03T07:05:59 | 2017-01-26T07:25:50 | C | UTF-8 | Python | false | false | 1,935 | py | Util.py | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... |
aa9b786a6c9664d396067fbc0bd7e7933a926ec9 | 7bea5adf7d6284fbad0131d665e957d58adfe7c7 | /allauth/socialaccount/providers/openid_connect/provider.py | 03be12beda774e3140352a5eaf178366f4f433a3 | [
"MIT"
] | permissive | pennersr/django-allauth | 50c9e71c3666785368e92ed9e19ea0f6a5438cd2 | 6b8911a5ebbabda0d446f2743bd4d00d250ed500 | refs/heads/main | 2023-09-03T16:48:10.988418 | 2023-09-02T08:00:53 | 2023-09-02T08:00:53 | 976,994 | 7,719 | 3,481 | MIT | 2023-09-14T15:06:57 | 2010-10-10T20:10:52 | Python | UTF-8 | Python | false | false | 2,422 | py | provider.py | from django.urls import reverse
from django.utils.http import urlencode
from allauth.account.models import EmailAddress
from allauth.socialaccount.providers.base import ProviderAccount
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider
class OpenIDConnectProviderAccount(ProviderAccount):
... |
5ff43aa2e1fc78574c6c25e6b4115893f9d413c5 | 6186a3787d1e74f1866844491da48b9643c8f1a9 | /ghostwriter/rolodex/models.py | 00992839dba64c8b090c9dc32be60556383b672b | [
"BSD-3-Clause"
] | permissive | GhostManager/Ghostwriter | b46b2421e5737ed0afbf49182dce9eeb5eb31936 | b9eae4459ba192fbb2d4a5b66f8210d57fd7112a | refs/heads/master | 2023-09-04T02:34:54.085997 | 2023-07-13T22:38:44 | 2023-07-13T22:38:44 | 197,269,443 | 1,011 | 197 | BSD-3-Clause | 2023-09-08T00:19:52 | 2019-07-16T21:19:43 | Python | UTF-8 | Python | false | false | 25,726 | py | models.py | """This contains all the database models used by the Rolodex application."""
# Standard Libraries
from datetime import time, timedelta
# Django Imports
from django.conf import settings
from django.contrib.auth import get_user_model
from django.db import models
from django.urls import reverse
# 3rd Party Libraries
fr... |
67d52c44017973e85dceea72a88a4c178a3e97f8 | 1acb41c1157c8eb5c3988f24baa72bdbf697931c | /easyfsl/methods/few_shot_classifier.py | c77202b9afdaabace8e82e23e2cf98703a96913d | [
"MIT"
] | permissive | sicara/easy-few-shot-learning | f2050a7dcacc9fcc1de7502f03fd3491cc175f69 | 509dd9aa60879ad76b687002dc5648c9b4f337b8 | refs/heads/master | 2023-09-01T19:24:10.217392 | 2023-09-01T08:59:43 | 2023-09-01T08:59:43 | 334,984,118 | 634 | 107 | MIT | 2023-09-11T15:23:48 | 2021-02-01T14:55:41 | Python | UTF-8 | Python | false | false | 6,316 | py | few_shot_classifier.py | from abc import abstractmethod
from typing import Optional
import torch
from torch import Tensor, nn
from easyfsl.methods.utils import compute_prototypes
class FewShotClassifier(nn.Module):
"""
Abstract class providing methods usable by all few-shot classification algorithms
"""
def __init__(
... |
3e2c979887c2a2252f392ee8cc8034352a6cc9ed | 3f39a707fdcf8bd0184cf044a6cb039e659738b7 | /data_wizard/rest.py | 54bef701f23499a390b4011c7430969d5d625232 | [
"MIT"
] | permissive | wq/django-data-wizard | b166882c163d19d3facb9cc648dc442ab8f64a51 | 2cf34acd96e6e6ad8eaff5f2fb5dee6dd94416d5 | refs/heads/main | 2023-07-20T03:59:38.137970 | 2023-07-13T21:33:40 | 2023-07-13T21:33:40 | 25,331,283 | 331 | 56 | MIT | 2023-06-08T15:57:41 | 2014-10-17T01:26:45 | Python | UTF-8 | Python | false | false | 2,516 | py | rest.py | from rest_framework import serializers
from wq.db import rest
from wq.db.rest.views import ModelViewSet
from wq.db.rest.serializers import ModelSerializer
from wq.db.rest.renderers import HTMLRenderer, JSONRenderer
from .models import Run
from . import views as wizard
from . import autodiscover
from rest_framework.sett... |
fb32eb55f45b7a38298616c8a66991e156a29496 | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /dashboard/dashboard/pinpoint/models/quest/quest_test.py | 6a9d645a1e3a91b3cc84bbbf13c1d3d4828d6b2c | [
"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 | 2,228 | py | quest_test.py | # Copyright 2018 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.
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import itertools
import unittest
from dashboar... |
725927c2edad24c9d6dce70896bac31c77ac51f2 | a411a55762de11dc2c9d913ff33d2f1477ac02cf | /dp/cloud/python/magma/radio_controller/tests/test_utils/db_cbsd_builder.py | 5bd80362b624b265ddfc5b83b59fde95e66698d0 | [
"BSD-3-Clause"
] | permissive | magma/magma | 0dc48c1513d9968bd05fb7589f302c192b7c0f94 | 0e1d895dfe625681229e181fbc2dbad83e13c5cb | refs/heads/master | 2023-09-04T09:31:56.140395 | 2023-08-29T13:54:49 | 2023-08-29T13:54:49 | 170,803,235 | 1,219 | 525 | NOASSERTION | 2023-09-07T17:45:42 | 2019-02-15T04:46:24 | C++ | UTF-8 | Python | false | false | 5,259 | py | db_cbsd_builder.py | """
Copyright 2022 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... |
331a1a4786878f63be69e46b2516942168ebfdf4 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/FiltersAndTransformers/Scripts/ParseHTMLTables/ParseHTMLTables.py | 5370d7be91784154e9a9126394a4eb67a54cf86e | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 12,102 | py | ParseHTMLTables.py | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
import copy
from typing import Any, Dict, Generator, List, Optional, Tuple, Union
from bs4 import BeautifulSoup, NavigableString, Tag
TITLE_THRESHOLD = 4
class Table:
def __init__(self, title: str):
self.__title =... |
d2fa12d718ae10b7abdc0e8f5b8c77b06fb2e4d8 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/codeInsight/mlcompletion/receiverMatchesSimple.py | 88297749105971b3715df9f1441cd5e9f844e396 | [
"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 | 59 | py | receiverMatchesSimple.py | def foo(someParam: int):
pass
someParam = 1
foo(<caret>) |
ec882c956a8039f40be96c4220ccd13455c3b937 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-libdispatch/PyObjCTest/test_workgroup_interval.py | 34e58a78000011dc7f5d43c95680174a35f607d1 | [
"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 | 1,235 | py | test_workgroup_interval.py | import dispatch
import objc
from PyObjCTools.TestSupport import TestCase, min_os_level
class TestWorkgroupIntervalAPI(TestCase):
@min_os_level("11.0")
def test_functions(self):
self.assertResultHasType(dispatch.os_workgroup_interval_start, objc._C_INT)
self.assertArgHasType(dispatch.os_workgro... |
4de6f1ade8c0d8fbcbad918c8a3ea58253da7b31 | 767b09cdf51803d533ebb5906042ed1f92f91a7c | /tests/structured_prediction/models/semantic_role_labeling_test.py | 1eb998d97d49251a36f11a9b4cb1deecf08daa5c | [
"Apache-2.0"
] | permissive | allenai/allennlp-models | e93bb3b084e99e211d5ebb515b765de117e41970 | b1f372248c17ad12684d344955fbcd98e957e77e | refs/heads/main | 2023-09-05T01:57:37.434101 | 2022-11-24T00:06:05 | 2022-11-24T00:06:05 | 246,170,605 | 520 | 172 | Apache-2.0 | 2022-11-24T00:06:06 | 2020-03-10T00:22:21 | Python | UTF-8 | Python | false | false | 4,553 | py | semantic_role_labeling_test.py | import subprocess
import os
from flaky import flaky
import pytest
import numpy
from allennlp.common.testing import ModelTestCase
from allennlp.common.params import Params
from allennlp.common.checks import ConfigurationError
from allennlp.models import Model
from allennlp.nn.util import get_lengths_from_binary_sequen... |
3069bfc1e38881102b4489d2fd0577154faa72d5 | c475cd8531a94ffae69cc92371d41531dbbddb6c | /Projects/bullet3-2.89/examples/pybullet/unittests/utils.py | b6ef61d41a6dda1c92f71223e3c201290092f417 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"Zlib"
] | permissive | WolfireGames/overgrowth | 72d3dd29cbd7254337265c29f8de3e5c32400114 | 594a2a4f9da0855304ee8cd5335d042f8e954ce1 | refs/heads/main | 2023-08-15T19:36:56.156578 | 2023-05-17T08:17:53 | 2023-05-17T08:20:36 | 467,448,492 | 2,264 | 245 | Apache-2.0 | 2023-05-09T07:29:58 | 2022-03-08T09:38:54 | C++ | UTF-8 | Python | false | false | 285 | py | utils.py | def dot(A, b):
"""Dot product between a 2D matrix and a 1D vector"""
return [sum([aij * bj for aij, bj in zip(ai, b)]) for ai in A]
def allclose(a, b, tol=1e-7):
"""Are all elements of a vector close to one another"""
return all([abs(ai - bi) < tol for ai, bi in zip(a, b)])
|
f11ce038753c2e2c0e3138946eb0950d003bdc86 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/pydev/_pydevd_asyncio_util/pydevd_asyncio_utils.py | b3ed912401b0e8146487b79bc55260ea879f3058 | [
"EPL-1.0",
"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 | 5,475 | py | pydevd_asyncio_utils.py | # Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
from _pydevd_bundle.pydevd_constants import IS_ASYNCIO_DEBUGGER_ENV, IS_ASYNCIO_REPL
from _pydevd_bundle.pydevd_exec2 import Exec
from _pydev_bundle.pydev_log import warn
eval_async_expression_in_... |
270ed6188babf984bdd0399b42723895ee13a524 | 48ca6f9f041a1e9f563500c8a7fa04dbb18fa949 | /pygears/sim/extens/websim.py | c548767d9bc56a789b12e74d4c931124b1a66f0d | [
"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 | 24,032 | py | websim.py | from enum import IntEnum
import time
import multiprocessing
from pygears.core.hier_node import HierYielderBase
from pygears.conf import inject, Inject
import os
from pygears.typing import typeof
from pygears import find, reg
from pygears.hdl import HDLPlugin
from pygears.hdl.sv.intf import SVIntfGen
from pygears.core.g... |
b68080aa05458d26ae2820e873b0541c61990888 | 2f5cc34ab90fce50ffca092e9e3acd283144ae48 | /praatio/utilities/utils.py | 513bfa821e4c666c3952600f49245923e43eac9a | [
"MIT"
] | permissive | timmahrt/praatIO | e05859e56bb7f9de1fd776c07aed9dc3c1f989b2 | 0f0544e5a897f05993cbe183836f3773dcd817a8 | refs/heads/main | 2023-07-31T17:39:59.469860 | 2023-07-18T14:10:17 | 2023-07-18T14:10:17 | 23,467,063 | 275 | 37 | MIT | 2023-07-18T14:10:18 | 2014-08-29T14:45:36 | Python | UTF-8 | Python | false | false | 15,558 | py | utils.py | """
Various generic utility functions
"""
import os
import subprocess
import itertools
import wave
from pkg_resources import resource_filename
from typing_extensions import Literal
from typing import Any, Iterator, List, Tuple, NoReturn, Type, Optional
from praatio.utilities import errors
from praatio.utilities impor... |
ede90c97f39e7c89afd0c4454b4b1451b1253413 | 231f2aa788dbcdf064b45a1baf3f1ca17517b2b9 | /caer/coreten/tensor.py | dc8a2283d4ab6a69040c0cba0730804da0dac75e | [
"MIT"
] | permissive | jasmcaus/caer | 5184d34a39b2074d5500a3eef6de2703e7b9502d | 3708bce3d6b1568b844ac78c55402862c548de61 | refs/heads/master | 2023-08-11T06:04:24.999595 | 2021-10-13T21:05:33 | 2021-10-13T21:05:33 | 285,644,536 | 806 | 159 | MIT | 2023-04-01T08:26:46 | 2020-08-06T18:36:14 | Python | UTF-8 | Python | false | false | 2,714 | py | tensor.py | # _____ ______ _____
# / ____/ /\ | ____ | __ \
# | | / \ | |__ | |__) | Caer - Modern Computer Vision
# | | / /\ \ | __| | _ / Languages: Python, C, C++, Cuda
# | |___ / ____ \ | |____ | | \ \ http://github.com/jasmcaus/caer
# \_____\/_/ \_ \______ |_| \_\
# Lice... |
ab648ad6c4f3e1e66be64d1990a9a3cdf502119a | 744c3b66611b08782fcdd9d66261c4d55b00d426 | /examples/pybullet/gym/pybullet_envs/minitaur/robots/safety/motor_state_validator.py | 3ccf34c02c06dde9aa3b3654595bc6e2fe8303d6 | [
"Zlib"
] | permissive | erwincoumans/bullet3 | 4ff9e0aa64b641c65b57b26f415dd69dbfb12256 | 6d181d78a5c7be8714c74055cddcf63d5ccef70a | refs/heads/master | 2023-03-10T14:58:18.072562 | 2023-02-24T18:32:53 | 2023-02-24T18:32:53 | 31,621,748 | 103 | 29 | NOASSERTION | 2019-02-25T17:31:00 | 2015-03-03T21:15:54 | C++ | UTF-8 | Python | false | false | 5,217 | py | motor_state_validator.py | """Software safety layer for robot control.
Validates the motor states received from the motor encoder.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import typing
from pybullet_envs.minitaur.robots.safety import data_types
from pybullet_envs.minit... |
27ab7c4f7e6e153670fa245120f6b6f51956d88b | 9abd182d02355ddf0b79afd4a35f7127a4a66f7a | /gluoncv/model_zoo/rcnn/faster_rcnn/rcnn_target.py | f0383835dff4ac035d3dc6df0253082fe0708d9e | [
"Apache-2.0"
] | permissive | dmlc/gluon-cv | e1303086419a5733661d0fcb9095c09d4f2382ad | 567775619f3b97d47e7c360748912a4fd883ff52 | refs/heads/master | 2023-07-19T12:02:36.824294 | 2023-01-19T00:37:33 | 2023-01-19T00:37:33 | 122,896,249 | 6,064 | 1,458 | Apache-2.0 | 2023-01-19T00:37:35 | 2018-02-26T01:33:21 | Python | UTF-8 | Python | false | false | 9,106 | py | rcnn_target.py | """RCNN Target Generator."""
from __future__ import absolute_import
from mxnet import autograd
from mxnet import gluon
from ....nn.coder import MultiClassEncoder, NormalizedPerClassBoxCenterEncoder
class RCNNTargetSampler(gluon.HybridBlock):
"""A sampler to choose positive/negative samples from RCNN Proposals
... |
1fca19d37aa2c2126777a652976039bf1e4433c2 | e65a4dbfbfb0e54e59787ba7741efee12f7687f3 | /science/py-mdp/files/patch-mdp__configuration.py | 3a15968aa3b3293ded3fd32a8d904c1ad01da1db | [
"BSD-2-Clause"
] | permissive | freebsd/freebsd-ports | 86f2e89d43913412c4f6b2be3e255bc0945eac12 | 605a2983f245ac63f5420e023e7dce56898ad801 | refs/heads/main | 2023-08-30T21:46:28.720924 | 2023-08-30T19:33:44 | 2023-08-30T19:33:44 | 1,803,961 | 916 | 918 | NOASSERTION | 2023-09-08T04:06:26 | 2011-05-26T11:15:35 | null | UTF-8 | Python | false | false | 425 | py | patch-mdp__configuration.py | --- mdp/configuration.py.orig 2016-03-04 08:39:38 UTC
+++ mdp/configuration.py
@@ -388,7 +388,7 @@ def set_configuration():
try:
import svm as libsvm
libsvm.libsvm
- except ImportError as exc:
+ except (ImportError, OSError) as exc:
config.ExternalDepFailed('libsvm', exc)
exce... |
7e54b8e13a5d442abd44f56d6e8094927d1532b8 | 0cfd410037a841dc618d74e6f51b937256afbea0 | /drop_queue.py | a1e0df7fb36f0fe43fbf222d1c6b7e7cb4397392 | [] | no_license | MyrikLD/LinusTrinus | 19e997e2c98325e294878a77ee4d24f4d664e4ba | bc34a38e2b0d534b9a5396af1509d63877b8f75e | refs/heads/master | 2023-04-06T13:55:38.413242 | 2023-04-05T15:07:50 | 2023-04-05T15:07:50 | 117,450,600 | 130 | 22 | null | 2023-04-05T15:07:52 | 2018-01-14T17:19:48 | Python | UTF-8 | Python | false | false | 256 | py | drop_queue.py | import queue
class DropQueue(queue.Queue):
def put(self, *args, **kwargs):
if self.full():
try:
self.get_nowait()
except queue.Empty:
pass
queue.Queue.put(self, *args, **kwargs)
|
b89df0c5f5fc86948efb7f871d2acf06ed347795 | ddddaa700e4642f46a2c1e1e0271a7c8ea62ba0f | /harness/determined/tensorboard/fetchers/azure.py | 87f90857c28aedae652787ddbfc388bb6a1f4ee9 | [
"Apache-2.0"
] | permissive | determined-ai/determined | 9d563cb5ffd074c88ee5edc9bf22ab9c3cb78c7e | 8239b1993f4f44390f4e88901ffaf3b12429b83c | refs/heads/main | 2023-08-21T12:13:36.651298 | 2023-08-21T08:34:16 | 2023-08-21T08:34:16 | 253,846,879 | 2,531 | 330 | Apache-2.0 | 2023-09-14T21:54:17 | 2020-04-07T16:12:29 | Go | UTF-8 | Python | false | false | 2,534 | py | azure.py | import datetime
import logging
import os
import urllib
from typing import Any, Callable, Dict, Generator, List
from .base import Fetcher
logger = logging.getLogger(__name__)
class AzureFetcher(Fetcher):
def __init__(self, storage_config: Dict[str, Any], storage_paths: List[str], local_dir: str):
from az... |
6ea1bf8a4b0e0a38f9f3bb16ef81b2bf0f2150af | c1da9aff530a66aebe2fb3eb28d2b806dd22cb85 | /scripts/build_demo_dataset.py | 25fcd2a18aad9e2a24bee04a943f35c6678e0db7 | [] | no_license | XgDuan/WSDEC | 6a59e71a715aefe5701203f2741a34021a6b80bd | 64abf5ee041ac6ad138de31880dd6cad73c70b00 | refs/heads/master | 2020-04-02T14:00:32.408337 | 2020-03-21T03:53:27 | 2020-03-21T03:53:27 | 154,506,382 | 104 | 25 | null | null | null | null | UTF-8 | Python | false | false | 594 | py | build_demo_dataset.py | import json
def build_demo_dataset(source_file, target_file, item_num):
captioning = json.load(open(source_file, 'r'))
target_keys = captioning.keys()[:item_num]
target = {key:captioning[key] for key in target_keys}
json.dump(target, open(target_file, 'w'))
if __name__ == '__main__':
buil... |
eb984d9354bbf6dd2d273538573432b508f95a42 | 9508168e33819894da0adba6f5738035823ce580 | /djmoney/__init__.py | f3ca3321b7901e89756f33167d59b3a5170cf28b | [
"BSD-3-Clause"
] | permissive | django-money/django-money | a05210f57848530603debaf770041fd77a891468 | aceac3ecc1f0202e0bc59cb712c8b11e00b422f7 | refs/heads/main | 2023-08-18T02:11:13.824022 | 2023-07-26T13:24:06 | 2023-07-26T13:24:06 | 1,750,874 | 1,428 | 288 | NOASSERTION | 2023-09-10T19:45:19 | 2011-05-15T12:13:19 | Python | UTF-8 | Python | false | false | 247 | py | __init__.py | __version__ = "3.2.0"
try:
import django
if django.VERSION < (3, 2):
default_app_config = "djmoney.apps.MoneyConfig"
except ModuleNotFoundError:
# this part is useful for allow setup.py to be used for version checks
pass
|
2a463896d9a8f90806543a00189fd85c6755e704 | 6d652aa802d90571a640ac0b538ff3055d0e34c5 | /i3pystatus/mail/thunderbird.py | 61c7710cd8e0088cb4d5f8a4ea696db3a4a5164b | [
"MIT"
] | permissive | enkore/i3pystatus | 38eaea8203ed309ff90e1717bd3a9075f12590b0 | 0820dd4e3d479dddec7797b2ea9a83da0f62b7cf | refs/heads/current | 2023-08-18T11:36:18.296269 | 2023-04-25T20:56:08 | 2023-04-25T20:56:08 | 8,130,605 | 438 | 244 | MIT | 2023-08-13T12:13:33 | 2013-02-11T01:01:15 | Python | UTF-8 | Python | false | false | 1,621 | py | thunderbird.py | # This plugin listens for dbus signals emitted by the
# thunderbird-dbus-sender extension for TB:
# https://github.com/janoliver/thunderbird-dbus-sender
# The plugin must be active and thunderbird running for the module to work
# properly.
from functools import partial
import dbus
from dbus.mainloop.glib import DBusG... |
91ae0507aef2928b9f11f15b8fbe776954778650 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/__init__.py | 0858ec706f38091c3545c18d4146d02947db2333 | [
"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 | 1,994 | py | __init__.py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
e89e2885c0f06351ea42d16a336d5ae5905a49e2 | 0577a46d8d28e1fd8636893bbdd2b18270bb8eb8 | /chromium/weblayer/browser/url_bar/DEPS | 34bb2688e08925d4878ecb765a78d79fc8ff3725 | [
"BSD-3-Clause"
] | permissive | ric2b/Vivaldi-browser | 388a328b4cb838a4c3822357a5529642f86316a5 | 87244f4ee50062e59667bf8b9ca4d5291b6818d7 | refs/heads/master | 2022-12-21T04:44:13.804535 | 2022-12-17T16:30:35 | 2022-12-17T16:30:35 | 86,637,416 | 166 | 41 | BSD-3-Clause | 2021-03-31T18:49:30 | 2017-03-29T23:09:05 | null | UTF-8 | Python | false | false | 86 | DEPS | include_rules = [
"+components/browsing_data/content",
"+components/page_info",
]
| |
c13bd5d0ace7937e09f0b1b8f485b9bd22b89433 | 64d923ab490341af97c4e7f6d91bf0e6ccefdf4b | /tensorforce/core/models/tensorforce.py | 3be50029ef85ea8eaa3611528d5b572e4d0b797f | [
"Apache-2.0"
] | permissive | tensorforce/tensorforce | 38d458fedeeaa481adf083397829cea434d020cd | 1bf4c3abb471062fb66f9fe52852437756fd527b | refs/heads/master | 2023-08-17T17:35:34.578444 | 2023-08-14T20:14:08 | 2023-08-14T20:14:08 | 85,491,050 | 1,312 | 246 | Apache-2.0 | 2023-08-14T20:14:10 | 2017-03-19T16:24:22 | Python | UTF-8 | Python | false | false | 148,569 | py | tensorforce.py | # Copyright 2020 Tensorforce Team. 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 la... |
a5187b194ba3e0bc87b8e3d92ebd1da62ee3bf5e | e910318d01528d82040507a49eeeb8dade45b31f | /examples/pins.py | 3a8472e8a6849db30165fb5e8fc74859a485e3fe | [
"MIT"
] | permissive | pfalcon/pycopy | e844480a5e5cd463530328889daed2ba87552b8a | 3ac90ae9c3c6bbebfba9cada2d37025e35c62796 | refs/heads/pfalcon | 2023-08-30T09:39:52.290147 | 2022-09-08T16:42:38 | 2022-09-08T16:42:38 | 15,507,576 | 753 | 71 | MIT | 2021-05-08T04:59:21 | 2013-12-29T11:38:47 | C | UTF-8 | Python | false | false | 1,966 | py | pins.py | # Print a nice list of pins, their current settings, and available afs.
# Requires pins_af.py from ports/stm32/build-PYBV10/ directory.
import pyb
import pins_af
def af():
max_name_width = 0
max_af_width = 0
for pin_entry in pins_af.PINS_AF:
max_name_width = max(max_name_width, len(pin_entry[0]))... |
6c3155b31dd68205ffff01f49894890cdfff4c40 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /plugins/hg4idea/testData/bin/hgext/infinitepush/store.py | ed449b2cc6f3f040331a552fd707f9caea691400 | [
"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 | 6,296 | py | store.py | # This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
# based on bundleheads extension by Gregory Szorc <gps@mozilla.com>
from __future__ import absolute_import
import abc
import os
import subprocess
from mercurial.node import hex
from... |
b18d4584b0e950b7bafa61c0b9fe222f97390d91 | e65a4dbfbfb0e54e59787ba7741efee12f7687f3 | /www/py-lektor/files/patch-setup.py | 22af075176c56788564d6358657de358dd153da0 | [
"BSD-2-Clause"
] | permissive | freebsd/freebsd-ports | 86f2e89d43913412c4f6b2be3e255bc0945eac12 | 605a2983f245ac63f5420e023e7dce56898ad801 | refs/heads/main | 2023-08-30T21:46:28.720924 | 2023-08-30T19:33:44 | 2023-08-30T19:33:44 | 1,803,961 | 916 | 918 | NOASSERTION | 2023-09-08T04:06:26 | 2011-05-26T11:15:35 | null | UTF-8 | Python | false | false | 156 | py | patch-setup.py | --- setup.py.orig 2022-07-31 16:11:11 UTC
+++ setup.py
@@ -0,0 +1,6 @@
+from setuptools import setup
+
+setup(
+ name="Lektor",
+ version="3.3.6",
+)
|
fa9170e98b5c3844314bc7a04a8808b0545c458b | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /CalibTracker/Configuration/python/SiPixel_FrontierConditions_cff.py | a48bd342eee930e744487eeee21e51f99bbc7778 | [
"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 | 350 | py | SiPixel_FrontierConditions_cff.py | import FWCore.ParameterSet.Config as cms
#
# Pixel Frontier conditions from Production DB
#
from CalibTracker.Configuration.SiPixelCabling.SiPixelCabling_Frontier_cff import *
from CalibTracker.Configuration.SiPixelGain.SiPixelGain_Frontier_cff import *
from CalibTracker.Configuration.SiPixelLorentzAngle.SiPixelLorent... |
4cb100a9f3354f2dc8fd0206d342d27bce4e739f | bfc42c114f652012b6cfd14e7cccf52cb6b9ac7e | /src/spdx_tools/spdx/validation/package_validator.py | 25cd6147fa5296c64dc1c4e62da4a6d7482307e0 | [
"Apache-2.0",
"GPL-2.0-only"
] | permissive | spdx/tools-python | 05a952501af2ac608678cb1737f7c661f6091fa2 | 777bd274dd06cb24342738df7da5ab285d652350 | refs/heads/main | 2023-08-31T09:39:52.930063 | 2023-08-24T06:39:48 | 2023-08-24T10:22:33 | 32,761,058 | 147 | 136 | Apache-2.0 | 2023-09-14T15:50:59 | 2015-03-23T21:54:39 | Python | UTF-8 | Python | false | false | 7,111 | py | package_validator.py | # SPDX-FileCopyrightText: 2022 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0
from beartype.typing import List, Optional
from spdx_tools.spdx.model import Document, File, Package, Relationship, RelationshipType
from spdx_tools.spdx.model.relationship_filters import filter_by_type_and_origin, filter_by_type... |
5e3d295317f645b26d9f85dbad0b2a21079e176b | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/tpu/feature_column_v2_test.py | f278295c27683a4b815c38ebba2308cc2feb3f21 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | tensorflow/tensorflow | 906276dbafcc70a941026aa5dc50425ef71ee282 | a7f3934a67900720af3d3b15389551483bee50b8 | refs/heads/master | 2023-08-25T04:24:41.611870 | 2023-08-25T04:06:24 | 2023-08-25T04:14:08 | 45,717,250 | 208,740 | 109,943 | Apache-2.0 | 2023-09-14T20:55:50 | 2015-11-07T01:19:20 | C++ | UTF-8 | Python | false | false | 29,823 | py | feature_column_v2_test.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
289942882108cb52dd9e749721538775502bef57 | 752818f443b62f5c7041cc855389762026987174 | /tests/test_lint.py | 0a2153dc6ac3eb7afe20a29e2927a96118432ac9 | [
"MIT"
] | permissive | Pylons/webtest | b67c085b5fdcce44acf175b9f8d35575df5bb81e | 5bc6841351a71569889e11f443a7948cb3ca64f0 | refs/heads/main | 2023-09-01T00:57:04.362679 | 2023-06-08T06:54:30 | 2023-06-08T06:54:30 | 6,662,296 | 260 | 97 | NOASSERTION | 2023-06-24T14:17:52 | 2012-11-12T23:19:10 | Python | UTF-8 | Python | false | false | 10,986 | py | test_lint.py | import sys
from tests.compat import unittest
from webob import Request, Response
import warnings
from unittest import mock
from io import StringIO
from webtest import TestApp
from webtest.compat import to_bytes
from webtest.lint import check_headers
from webtest.lint import check_content_type
from webtest.lint import... |
4df44807bd8082fb49faaaff61301e94bf0d6a48 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/python/mindspore/ops/_grad_experimental/grad_math_ops.py | 52dda9680d1999d0189047dc79c1c684457cb1f2 | [
"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 | 44,632 | py | grad_math_ops.py | # Copyright 2021-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 agre... |
cc2aab0fec1224f20f5bdfd1102542ceab656d51 | 568fa58296378fa129ab3349adf010daa44ed45b | /third_party/incubator-tvm/vta/python/vta/top/nnvm_op.py | a38b2172671bba292818a6a242760a04f5684148 | [
"Apache-2.0",
"BSD-3-Clause",
"NCSA",
"X11-distribute-modifications-variant",
"Zlib",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | mindspore-ai/akg | 37f471badc66de6a831f1f45ad84344f34d23ef2 | 99f33858d6972741748cbfc9ab0bf9600428fef7 | refs/heads/master | 2023-07-25T23:03:17.672665 | 2023-07-11T07:33:57 | 2023-07-11T07:33:57 | 274,077,856 | 319 | 36 | Apache-2.0 | 2021-12-30T13:43:08 | 2020-06-22T08:09:05 | Python | UTF-8 | Python | false | false | 5,057 | py | nnvm_op.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... |
36a0812029814b3dfd8f4831df19ff3f16a2315c | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowCryptoGdoiDetail/cli/equal/golden_output_expected.py | fb53b18d21310c127c88be8aff5ca4bf537bee4b | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 4,954 | py | golden_output_expected.py | expected_output={
"group_name":{
"getvpn1":{
"group_information":{
"crypto_path":"ipv4",
"group_identity":"1223",
"group_member":{
"3.3.1.1":{
"active_tek_num":1,
"allowable_rekey_cipher":"ESP",
"a... |
0780573dac9315b31cb97e46af743f406bfc748d | 8bc2bfc34352aac01bef774209e651e81c61c681 | /pox/openflow/flow_table.py | 4bbf79321bab029c68299bb14ac6f099a970435d | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | noxrepo/pox | 0925260bc723cda49dd0dab7e827f61548e1370c | 5f82461e01f8822bd7336603b361bff4ffbd2380 | refs/heads/gar-experimental | 2023-04-30T00:04:33.991794 | 2020-05-20T12:00:13 | 2020-05-20T12:00:13 | 3,382,021 | 467 | 370 | Apache-2.0 | 2023-06-01T02:19:33 | 2012-02-07T22:18:46 | Python | UTF-8 | Python | false | false | 12,049 | py | flow_table.py | # Copyright 2011,2012,2013 Colin Scott
#
# 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 i... |
5caaf723395cada56b5355750684fe6b9541d9a9 | 97efdfac795c44f9a2a62e48ba71bf1783c523bf | /message_ix/tests/util/test_tutorial.py | 78c877f63a29e81bcea2b8ae5034d40d28bf8d2f | [
"CC-BY-4.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | iiasa/message_ix | 1e96ee254b6f67117faf4fb78ef8fd75d9ee0a6c | bf4469111a2d10c5dbc2c921e6a7e502e96aea34 | refs/heads/main | 2023-08-17T20:36:23.055462 | 2023-08-14T08:46:24 | 2023-08-14T08:46:24 | 113,015,968 | 103 | 162 | Apache-2.0 | 2023-09-08T11:56:21 | 2017-12-04T08:29:06 | Jupyter Notebook | UTF-8 | Python | false | false | 1,794 | py | test_tutorial.py | from ixmp.reporting import Key
from message_ix import Scenario
from message_ix.testing import SCENARIO
from message_ix.util import make_df
from message_ix.util.tutorial import prepare_plots, solve_modified
def test_prepare_plots(dantzig_reporter):
# Function runs without error
prepare_plots(dantzig_reporter)... |
e0bd674973ff78666e7224357e33561e6a5c46bb | 639437d2d764971680f4c9cf9cf2108b2898b245 | /sdk/datahub-python-sdk/setup.py | e31365acc7288d664372ba3969f6396a2ba8298d | [
"MIT"
] | permissive | macacajs/macaca-datahub | b06df95e1a6dccba84e09783de248ea3cb8025cb | cc22e536de55c7b4ba7958f19a190c8f6e2d53de | refs/heads/master | 2023-08-27T11:45:35.474410 | 2022-12-16T08:40:19 | 2022-12-16T08:40:19 | 111,818,989 | 546 | 71 | MIT | 2023-09-11T04:07:47 | 2017-11-23T14:28:42 | JavaScript | UTF-8 | Python | false | false | 1,211 | py | setup.py | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='datahub-sdk',
version='1.0.4',
description='Macaca DataHub Cl... |
6a6b3cd0f6df1d4633887e620c44a9d104062393 | fae16a539b7c1b0525aab40ddaeee3e451fc9b74 | /src/argilla/tasks/users/create.py | 62bfa31eae333d08873b7bbf3c83341029985dc8 | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | argilla-io/argilla | a6b45f7f64e9db82f6d9a61771d758ffbb3dab4a | 7c1b2368b444b7b7a281d37ad51bcb2d8e92acf5 | refs/heads/develop | 2023-09-04T03:58:05.914619 | 2023-09-01T15:58:31 | 2023-09-01T15:58:31 | 362,500,938 | 1,085 | 122 | Apache-2.0 | 2023-09-14T15:31:07 | 2021-04-28T14:37:42 | Python | UTF-8 | Python | false | false | 2,724 | py | create.py | # Copyright 2021-present, the Recognai S.L. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
7e33a15bcd10fe34f653928a84bd04fb86c03036 | 554ac81a19409420c076fed11616e259526e8e0d | /Chapter02/chapter2_5.py | 43d4fc2b1e9373a152fb795a1111adb56a4ba4f4 | [
"MIT"
] | permissive | PacktPublishing/Mastering-Python-Networking-Third-Edition | 9fc013efb932a2172a99a363e9f50fa824321e81 | 0c1a6ea557710f3b12cdb310dd9cb4ecca2dbce3 | refs/heads/master | 2022-09-13T22:04:08.292000 | 2021-12-07T23:50:04 | 2021-12-07T23:50:04 | 209,299,242 | 116 | 95 | MIT | 2022-09-03T12:15:06 | 2019-09-18T12:09:31 | Python | UTF-8 | Python | false | false | 650 | py | chapter2_5.py | #!/usr/bin/env python
from nornir import InitNornir
from nornir.plugins.tasks.networking import netmiko_send_command
from nornir.plugins.functions.text import print_result
# If you are using Nornir3, there are some changes:
# https://github.com/twin-bridges/nornir_course/blob/master/nornir3_changes.md
# Please pip in... |
38fe572b3f90d553386d1fd0a4245b66c1b3ad41 | 38bd31e53bdc4d8ed8a06544931ad9c3db5b6f5b | /slowfast/visualization/gradcam_utils.py | 07c0fa28f257a2c8202ec98a3556b327293f80cd | [
"Apache-2.0"
] | permissive | facebookresearch/SlowFast | 1ee6f666d20e5adab8e86949649bcaf4bf6cd820 | 6092dad7be32bb1d6b71fe1bade258dc8b492fe3 | refs/heads/main | 2023-09-03T12:15:35.478138 | 2023-08-26T20:55:56 | 2023-08-26T20:55:56 | 203,465,734 | 6,221 | 1,325 | Apache-2.0 | 2023-09-12T23:51:28 | 2019-08-20T22:47:26 | Python | UTF-8 | Python | false | false | 6,958 | py | gradcam_utils.py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
import slowfast.datasets.utils as data_utils
from slowfast.visualization.utils import get_layer
class GradCAM:
"""
GradCAM class helps c... |
1696cf5da822390ce62b7d95d00b4afbcd5d5742 | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/0656. Coin Path/0656-2.py | c27a233e1398157b042f28e1dc29c2cf332e3a67 | [
"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 | 800 | py | 0656-2.py | class Solution:
def cheapestJump(self, coins: List[int], maxJump: int) -> List[int]:
if coins[-1] == -1:
return []
n = len(coins)
# dp[i] := min cost to jump to n - 1 from i
dp = [math.inf] * n
next = [-1] * n
dp[-1] = coins[-1]
for i in reversed(range(n - 1)):
if coins[i] =... |
ce8b979197410ff276f8acf95b8defe6fb216b2f | 8f267fe1157904023004aa1fcee8cdcaf1d69f74 | /tempest/tests/lib/services/identity/v3/test_domain_configuration_client.py | 72e5bd2d5d577bf690f7f51fda95fa59f5a0567f | [
"Apache-2.0"
] | permissive | openstack/tempest | a65737f3e62d4ebeb7e387feac7bcc636d3f5fe0 | 3932a799e620a20d7abf7b89e21b520683a1809b | refs/heads/master | 2023-08-28T15:04:21.241805 | 2023-08-28T10:16:57 | 2023-08-28T10:16:57 | 2,356,406 | 270 | 407 | Apache-2.0 | 2022-06-29T15:52:45 | 2011-09-09T15:56:02 | Python | UTF-8 | Python | false | false | 8,295 | py | test_domain_configuration_client.py | # Copyright 2016 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, ... |
35c5042ad1b7bf766e8b3b62cd67e9fa02d49f27 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/Box/Integrations/BoxEventsCollector/BoxEventsCollector.py | 74545b12dc425eafb7123ad8cf0cbf5a2b8d59c3 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 8,962 | py | BoxEventsCollector.py | # pylint: disable=no-name-in-module
# pylint: disable=no-self-argument
import dateparser
import secrets
import jwt
import urllib3
from cryptography import exceptions
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.serialization import load_pem_private_key
from pydantic impo... |
770236195638bb038d129832eaf715b3be275c07 | e4e7461d012360b32779a851f8734c0a18289bf1 | /logic/leaderboard.py | 37cd4b82d95764f55e58a4d7ed7ccf5ccf4da598 | [
"MIT"
] | permissive | Yelp/love | 3650755da9e6cae20b1a0ea98d580daad0aab6b6 | f9f1c47616c247c20110f60a876049d9908d0e03 | refs/heads/master | 2023-09-04T09:53:46.720336 | 2021-11-08T19:10:51 | 2021-11-08T19:10:51 | 55,083,938 | 165 | 41 | MIT | 2023-05-01T20:16:11 | 2016-03-30T17:41:25 | Python | UTF-8 | Python | false | false | 1,311 | py | leaderboard.py | # -*- coding: utf-8 -*-
from datetime import datetime
from datetime import timedelta
from logic import TIMESPAN_LAST_WEEK
from logic import to_the_future
from logic import utc_week_limits
import logic.love_count
def get_leaderboard_data(timespan, department, office=None):
# If last week, we need to subtract *bef... |
9ad01dc6240f53a23ab209a7d58f5ffeb86bdc64 | 002d925a46fef6867c7092935a5a4113a11cf0c5 | /care/facility/migrations_old/0261_auto_20210710_2305.py | ec77872cc25a18d8379c3c390808b0c70c515a33 | [
"MIT"
] | permissive | coronasafe/care | ba74c06c6486e8cd3c11e0f8b3d948e99d304746 | c000eea7f1c79a37b0fa53eba09696cd95122202 | refs/heads/master | 2023-08-31T12:52:08.181541 | 2023-08-29T13:43:33 | 2023-08-29T13:43:33 | 247,995,671 | 216 | 218 | MIT | 2023-09-13T14:52:59 | 2020-03-17T14:48:11 | Python | UTF-8 | Python | false | false | 30,257 | py | 0261_auto_20210710_2305.py | # Generated by Django 2.2.11 on 2021-07-10 17:35
import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import care.utils.models.validators
class Migration(migrations.Migration):
dependencies = [
("facility", "0260_auto_20210710_1742"),
]
... |
6425d869cbe9f93d0239f0f0dc790d5f40307a73 | b7163b44b679e082fe97cf7fcd0c73b2fcdb38eb | /modules/dbnd/test_dbnd/parameters/test_parameter_value_type_loader.py | bf037adf5e1634bc3ad3c2687025aad584353def | [
"Apache-2.0"
] | permissive | databand-ai/dbnd | 70c95d95e12bfb8ab471a6dce27691ed658cb92d | d59c99dcdcd280d7eec36a693dd80f8c8c831ea2 | refs/heads/develop | 2023-06-24T18:07:56.524526 | 2023-05-28T07:57:36 | 2023-05-28T07:57:36 | 231,361,064 | 257 | 33 | Apache-2.0 | 2023-08-06T08:30:28 | 2020-01-02T10:42:47 | Python | UTF-8 | Python | false | false | 1,600 | py | test_parameter_value_type_loader.py | # © Copyright Databand.ai, an IBM Company 2022
from dbnd import parameter
from targets.values import InlineValueType, ValueTypeLoader, register_value_type
class TypeWithValueTypeLoaderError(object):
pass
class TestParameterValueTypeLoader(object):
def test_value_type_loader(self):
register_value_t... |
c492c57fc60cb5811360b670e8970041c3f82686 | eb9253b8c2a281bebddbf77fa02b249fa18f11b7 | /configs/det/knet/knet_s3_r50_fpn_ms-3x_coco.py | 72243317778ba437f44e664e527acaabdadf4e56 | [
"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 | 100 | py | knet_s3_r50_fpn_ms-3x_coco.py | _base_ = [
'../_base_/models/knet_s3_r50_fpn.py',
'../common/mstrain_3x_coco_instance.py'
]
|
6e9aba7f12e216488b740550a72e43ceff727e30 | 9db247ecf5cc49927aa292f94d777565ac4b394c | /tests/version.py | c3e2351a99d7edf8041a66259063755bf86141eb | [
"BSD-3-Clause"
] | permissive | rsmusllp/king-phisher | 33d82b24fbf3a9b9f5a3c2db58a7c14161ca2902 | 1bbc1bf122a18085b1ea4af20c9af10cc4cf899e | refs/heads/master | 2023-08-30T08:49:57.893481 | 2022-11-07T16:21:41 | 2022-11-07T16:21:41 | 15,592,447 | 1,018 | 231 | BSD-3-Clause | 2023-08-01T23:01:41 | 2014-01-02T20:00:55 | Python | UTF-8 | Python | false | false | 3,017 | py | version.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# tests/version.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of co... |
7b3d778991ef6a3eaa7852414919b05b06a1b1a6 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/py/py/_io/__init__.py | 835f01f3ab9dcb656dce1e580f0d98d7b8abfe3a | [
"MIT",
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 29 | py | __init__.py | """ input/output helping """
|
12657f03588cc5d675e43de7ee0ca5a32c823c63 | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /amqpstorm/management/queue.py | 652fea0121004159ddb8e093786084faffb83508 | [
"BSD-3-Clause"
] | permissive | fake-name/ReadableWebProxy | 24603660b204a9e7965cfdd4a942ff62d7711e27 | ca2e086818433abc08c014dd06bfd22d4985ea2a | refs/heads/master | 2023-09-04T03:54:50.043051 | 2023-08-26T16:08:46 | 2023-08-26T16:08:46 | 39,611,770 | 207 | 20 | BSD-3-Clause | 2023-09-11T15:48:15 | 2015-07-24T04:30:43 | Python | UTF-8 | Python | false | false | 7,242 | py | queue.py | from amqpstorm.compatibility import json
from amqpstorm.compatibility import quote
from amqpstorm.compatibility import urlparse
from amqpstorm.management.base import ManagementHandler
API_QUEUE = 'queues/%s/%s'
API_QUEUE_PURGE = 'queues/%s/%s/contents'
API_QUEUES = 'queues'
API_QUEUES_VIRTUAL_HOST = 'queues/%s'
API_QU... |
1cee38fb8962f5ef55f7d1f42484e734c0caf828 | 6416b746ee71d897789eab1e450000831674dbd0 | /tests/unit/algorithms/common/adapters/mmcv/tasks/test_exporter.py | 6544f25be50432a915f8eec60c255f8afd43b1c3 | [
"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 | 2,740 | py | test_exporter.py | from otx.api.usecases.tasks.interfaces.export_interface import ExportType
import mmcv
import pytest
from otx.algorithms.common.adapters.mmcv.tasks.exporter import Exporter
from tests.test_suite.e2e_test_system import e2e_pytest_unit
class TestExporter:
@pytest.fixture(autouse=True)
def setup(self, mocker):
... |
88ddad710ae7862b775d0c75047fdc6c1954e57b | ffde62a49fe3dab3d72ddcd33c1d3e1f4c0d64b6 | /powerful_benchmarker/delete_experiment.py | 775a8b85872b614f52a7027559f7957f668888a5 | [] | no_license | KevinMusgrave/powerful-benchmarker | 93403e1fae46cfdae2983c2e1c1a95da7b628021 | 528117d43790e1d155f581ac509aed5e505feff7 | refs/heads/domain-adaptation | 2023-07-16T14:05:47.124839 | 2023-06-15T02:13:08 | 2023-06-15T02:13:08 | 220,663,367 | 399 | 45 | null | 2023-04-09T23:29:51 | 2019-11-09T15:36:55 | Python | UTF-8 | Python | false | false | 1,134 | py | delete_experiment.py | import argparse
import glob
import os
import shutil
import sys
sys.path.insert(0, ".")
from powerful_benchmarker.utils.constants import add_default_args
from validator_tests.utils import utils
from validator_tests.utils.constants import add_exp_group_args
def delete_experiment(cfg, exp_group):
experiment_paths ... |
f6351876ff6b9d429f627d97a98ab23d379f1138 | 80a3d98eae1d755d6914b5cbde63fd10f5cc2046 | /autox/autox_video/mmaction2/tests/test_models/test_recognizers/test_skeletongcn.py | 063a090214d43e390ef8a81618a583a02069bdc5 | [
"Apache-2.0"
] | permissive | 4paradigm/AutoX | efda57b51b586209e1d58e1dab7d0797083aadc5 | 7eab9f4744329a225ff01bb5ec360c4662e1e52e | refs/heads/master | 2023-05-24T00:53:37.109036 | 2023-02-14T14:21:50 | 2023-02-14T14:21:50 | 388,068,949 | 752 | 162 | Apache-2.0 | 2022-07-12T08:28:09 | 2021-07-21T09:45:41 | Jupyter Notebook | UTF-8 | Python | false | false | 1,749 | py | test_skeletongcn.py | # Copyright (c) OpenMMLab. All rights reserved.
import pytest
import torch
from mmaction.models import build_recognizer
from ..base import generate_recognizer_demo_inputs, get_skeletongcn_cfg
def test_skeletongcn():
config = get_skeletongcn_cfg('stgcn/stgcn_80e_ntu60_xsub_keypoint.py')
with pytest.raises(Typ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.