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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
76bbd2810770224bb57dde28bea1edec6834da43 | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/securityinsights/v20230501preview/_inputs.py | 6df00df97bf4b518a34a280590df448e24502f58 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 18,851 | py | _inputs.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
from ._en... |
3a3d38c81104e0ab5f20c0eac36904cd6bb7426b | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/rapt_ble/sensor.py | 9967a36faeef2441bc29b87c523f0d9d8a29f7d7 | [
"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 | 4,696 | py | sensor.py | """Support for RAPT Pill hydrometers."""
from __future__ import annotations
from rapt_ble import DeviceClass, DeviceKey, SensorUpdate, Units
from homeassistant import config_entries
from homeassistant.components.bluetooth.passive_update_processor import (
PassiveBluetoothDataProcessor,
PassiveBluetoothDataUpd... |
9e2c4ea5c8a74be261ccfe88dce12aa809ee1278 | dd221d1ab80a49190a0c93277e2471debaa2db95 | /hanlp/components/mtl/tasks/ud.py | f9abb0822b6814505071a1bbfbc8d259a5c76ba0 | [
"Apache-2.0",
"CC-BY-NC-SA-4.0"
] | permissive | hankcs/HanLP | 29a22d4e240617e4dc67929c2f9760a822402cf7 | be2f04905a12990a527417bd47b79b851874a201 | refs/heads/doc-zh | 2023-08-18T12:48:43.533453 | 2020-02-15T17:19:28 | 2023-03-14T02:46:03 | 24,976,755 | 32,454 | 9,770 | Apache-2.0 | 2023-08-13T03:11:39 | 2014-10-09T06:36:16 | Python | UTF-8 | Python | false | false | 7,550 | py | ud.py | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-12-17 21:54
import logging
from typing import Dict, Any, List, Union, Iterable, Callable
import torch
from torch.utils.data import DataLoader
from hanlp.common.dataset import SamplerBuilder, PadSequenceDataLoader
from hanlp_common.document import Document
from hanl... |
e9affed3e3a4a6566d12b2b05ca8eb63781f79b8 | 05b0c763ab92086e69a8d00ae6465009c596f6bc | /tests/cpu/test_launcher.py | b736e11d8d6f074e544021cbcc6fdde00e9e56a5 | [
"Apache-2.0"
] | permissive | intel/intel-extension-for-pytorch | 60ce2af2ec3a1dacae0d0db13dd51a5b44512e61 | 7f9266789de7ca9d8bcf55606f3204f1a3640640 | refs/heads/master | 2023-09-01T09:13:16.866410 | 2023-08-31T08:00:37 | 2023-08-31T08:00:37 | 256,061,008 | 991 | 144 | Apache-2.0 | 2023-08-13T13:56:07 | 2020-04-15T23:35:29 | Python | UTF-8 | Python | false | false | 28,110 | py | test_launcher.py | import unittest
from common_utils import TestCase
from utils.cpuinfo import construct_numa_config
from intel_extension_for_pytorch.cpu.launch import (
CPUPoolList,
Launcher,
DistributedTrainingLauncher,
)
import os
from os.path import expanduser
import glob
import subprocess
class TestLauncher(TestCase):
... |
9b2d4e62f9294d157355aff4fc6b18a31c1c3606 | a69294c7d5ee75441759b66bc20cce727350bd59 | /tests/keybench.py | 736c4d311dfa2192e5e43ded27cda07f1cd4dd99 | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/datastore-ndb-python | 58b57437e11104bfe924fca3de2ee28319f2976f | 59cb209ed95480025d26531fc91397575438d2fe | refs/heads/master | 2023-08-21T01:16:54.021744 | 2022-10-20T23:12:51 | 2022-10-20T23:12:51 | 37,215,291 | 127 | 56 | Apache-2.0 | 2022-10-20T23:12:53 | 2015-06-10T18:34:30 | Python | UTF-8 | Python | false | false | 2,330 | py | keybench.py | #
# Copyright 2008 The ndb Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
f90c0a6e03a297dafb019b3f37d9b993cf417a7c | 31cf77b4c0342c6148b35ae2613d5e2501d5e755 | /src/encoded/tests/test_upgrade_star_qc.py | c8af8f31d399af2f8fe5be4c9ecc5b7c8a2f45e8 | [
"MIT"
] | permissive | ENCODE-DCC/encoded | 096de8a6d60c959a783cc9517f1d60bd6c21b71f | 80e05610c79b46d0890228555bb03e436b2fef11 | refs/heads/dev | 2023-08-08T15:45:07.493187 | 2023-08-03T20:01:24 | 2023-08-03T20:01:24 | 7,045,549 | 110 | 69 | MIT | 2023-09-12T23:59:45 | 2012-12-07T00:52:21 | JavaScript | UTF-8 | Python | false | false | 480 | py | test_upgrade_star_qc.py | import pytest
def test_star_quality_metric_upgrade(registry, star_quality_metric_0,
bam_file, lab, award):
from snovault import UPGRADER
upgrader = registry[UPGRADER]
value = upgrader.upgrade('star_quality_metric',
star_quality_metric_0, re... |
db7569d1590daaab6c087209a18904e21a2d17c9 | df40e97d889659c320afcb16427c2478a7d263f3 | /functions/utils.py | 2b2712a6ea233ec905a90a11648d601b35687e0a | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Esri/raster-functions | 954d7f055a2a00c73458b67176b9b383c5b4da88 | 8548ca2ac156ea0a50e978e7465fc8a0edc727e8 | refs/heads/master | 2023-08-28T05:08:56.637185 | 2023-08-02T18:45:00 | 2023-08-02T18:45:00 | 22,187,946 | 191 | 82 | Apache-2.0 | 2022-03-23T16:32:09 | 2014-07-24T00:13:43 | Python | UTF-8 | Python | false | false | 10,073 | py | utils.py | #------------------------------------------------------------------------------
# Copyright 2016 Esri
# 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... |
1f0319f7fcf6ad8ca88ef4233dd5f5bb5476c44f | f2e027bf993bdad87b894d606c1bc8335c032c29 | /fw/make_thermistor_table.py | 1ed5499355058f8735daf4f6f6b0d5515fd6c429 | [
"Apache-2.0"
] | permissive | mjbots/moteus | 857546df67c4140a4c55ae73baab2077ada83849 | da016eb5bb77c6d3a6cbc2191576579f26238a59 | refs/heads/main | 2023-08-08T22:02:53.352368 | 2023-08-08T15:00:02 | 2023-08-08T15:00:02 | 174,456,820 | 638 | 215 | Apache-2.0 | 2023-05-06T16:05:15 | 2019-03-08T02:43:21 | C++ | UTF-8 | Python | false | false | 967 | py | make_thermistor_table.py | #!/usr/bin/python3
# Copyright 2019 Josh Pieper, jjp@pobox.com.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
706b92dadf775e3c090e50a5b7f6c50ec8dc666e | 643410b6ed94f3b11fb7fcab1dcb9f9f9532a8bb | /rolepermissions/decorators.py | 6d61ef67fad4d5bec4bb2adae4b657e79ec1f0a9 | [
"MIT"
] | permissive | vintasoftware/django-role-permissions | 51158a4c550fbce93b088a2563d0dbc93cdd962b | e74613d78d188788ee4c5c84b99341648e06e78c | refs/heads/master | 2023-09-01T19:12:34.472365 | 2023-06-09T20:27:07 | 2023-06-09T20:27:07 | 13,388,701 | 666 | 130 | MIT | 2023-06-09T20:27:08 | 2013-10-07T16:13:02 | Python | UTF-8 | Python | false | false | 1,581 | py | decorators.py | from __future__ import unicode_literals
from functools import wraps
from django.conf import settings
from django.contrib.auth.views import redirect_to_login as dj_redirect_to_login
from django.core.exceptions import PermissionDenied
from django.shortcuts import redirect as dj_redirect
from rolepermissions.checkers i... |
10748acef5837fa43c9e10142d1432f1bf824778 | ccc00ce0041bd050a33880a84e68d6231610bfe5 | /elasticdl/python/tests/elasticdl_job_service_test.py | 616100bd2e732fe916b837123e49949956a2ff99 | [
"MIT"
] | permissive | sql-machine-learning/elasticdl | 009bfa5bcd0c2e8ffd032c559af5d3b0d13e2ed2 | 86cd6ff7e175939a4bcd7938e334c4865acacb6d | refs/heads/develop | 2023-08-31T06:13:50.904537 | 2023-08-15T10:39:31 | 2023-08-15T10:39:31 | 154,232,678 | 724 | 122 | MIT | 2023-08-15T10:39:33 | 2018-10-22T23:53:10 | Python | UTF-8 | Python | false | false | 3,241 | py | elasticdl_job_service_test.py | # Copyright 2020 The ElasticDL Authors. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
cd28afdf3ce5cac8fd3da4cdd50ef1404ea9a310 | b60686a2e351a756f249e0d9faab8fe154a08f11 | /tests/util/test_config.py | 302eb9918a647da1829588fc550a37ad634c615e | [
"MIT",
"LicenseRef-scancode-generic-export-compliance"
] | permissive | intel/dffml | 86483b47229b9b62c9f8dfef51491aa02563347e | 7d381bf67a72fe1ecb1012393d5726085564cb0e | refs/heads/main | 2023-08-28T00:35:04.219193 | 2023-06-06T18:29:16 | 2023-06-06T18:29:16 | 149,512,216 | 237 | 204 | MIT | 2023-05-05T15:39:35 | 2018-09-19T21:06:34 | Python | UTF-8 | Python | false | false | 824 | py | test_config.py | import unittest
from dffml.util.config.numpy import numpy_docstring_args
from .double_ret import double_ret as numpy_double_ret
class TestMakeConfig(unittest.TestCase):
def test_numpy_docstring_args(self):
args = numpy_docstring_args(numpy_double_ret)
self.assertIn("super_cool_arg", args)
... |
6a57695606b2580523f64139c74591c639a0d3c9 | f487532281c1c6a36a5c62a29744d8323584891b | /sdk/python/pulumi_azure/elasticcloud/get_elasticsearch.py | 210ed3b126e52a93795f96d04dd864c96cc86738 | [
"MPL-2.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure | a8f8f21c46c802aecf1397c737662ddcc438a2db | c16962e5c4f5810efec2806b8bb49d0da960d1ea | refs/heads/master | 2023-08-25T00:17:05.290397 | 2023-08-24T06:11:55 | 2023-08-24T06:11:55 | 103,183,737 | 129 | 57 | Apache-2.0 | 2023-09-13T05:44:10 | 2017-09-11T20:19:15 | Java | UTF-8 | Python | false | false | 12,276 | py | get_elasticsearch.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
6dee6e3aa10697a737bb9bdfd504a2a5e9db3c57 | 422a48c4deaee6a02e4d9de5243dcda00f9a1d89 | /sparse/_dok.py | 1aa330b704b61c1e551d804a76532837bb2b8d6e | [
"BSD-3-Clause"
] | permissive | pydata/sparse | 3510bc2f2ef15d9a28299dd550ae1bf7931744c9 | 096f9b04e9abf666e442f6cfd87b18c9395bc157 | refs/heads/master | 2023-08-28T18:43:35.349118 | 2023-07-01T06:15:17 | 2023-07-01T06:15:17 | 88,426,738 | 467 | 102 | BSD-3-Clause | 2023-09-07T21:08:35 | 2017-04-16T16:12:10 | Python | UTF-8 | Python | false | false | 16,399 | py | _dok.py | from math import ceil
from numbers import Integral
from collections.abc import Iterable
import numpy as np
import scipy.sparse
from numpy.lib.mixins import NDArrayOperatorsMixin
from ._slicing import normalize_index
from ._utils import equivalent
from ._sparse_array import SparseArray
class DOK(SparseArray, NDArray... |
25ff85c3c868c36be14f90d30a2e14fe98afbb26 | d47abf79e58b2982bd2f5359057126864fdb6e48 | /b2sdk/transfer/outbound/copy_source.py | 0c66f89d98fced30b15b157601d880e2d0d07f10 | [
"Apache-2.0",
"MIT"
] | permissive | Backblaze/b2-sdk-python | ca90f4dca6a1a9a52c8dbccd0294bfc01290970a | 072f96dfe90ff191cb74dd2b657564ed5649553c | refs/heads/master | 2023-08-16T23:53:48.691286 | 2023-08-10T13:37:40 | 2023-08-10T13:37:40 | 168,011,367 | 160 | 67 | NOASSERTION | 2023-08-31T11:01:52 | 2019-01-28T18:13:01 | Python | UTF-8 | Python | false | false | 3,078 | py | copy_source.py | ######################################################################
#
# File: b2sdk/transfer/outbound/copy_source.py
#
# Copyright 2020 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from __future__... |
8dae7fb54725c97f67c1a66a4f3bd8b08e53b0b1 | 4cb9ceb8840ed18c9d5b17faee4eb5841f890c83 | /tests/rustworkx_tests/graph/test_connected_components.py | f8b254abc75f2f506391e5f3eaf72fb09edf524f | [
"Apache-2.0"
] | permissive | Qiskit/rustworkx | f5c4b94d21bee2fcac999cd2057246c307570bad | e0af0a26c71eadb6d15807efb6ec1cd4d3893244 | refs/heads/main | 2023-09-01T03:45:25.807566 | 2023-08-30T13:48:41 | 2023-08-30T13:48:41 | 186,025,444 | 250 | 38 | Apache-2.0 | 2023-09-14T14:08:45 | 2019-05-10T17:09:02 | Python | UTF-8 | Python | false | false | 3,177 | py | test_connected_components.py | # 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, software
# distributed under th... |
628539d011c91be898d32fc785793416e2d7ecf3 | b2fef77e77f77b6cfd83da4ec2f89cbe73330844 | /monai/transforms/smooth_field/array.py | c9df5f1dbb8cc7ce1c4e224bfc0b75333db6c610 | [
"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 | 17,833 | py | array.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... |
8f70ab938b89d775729c84df58b7b573cf19759d | b7163b44b679e082fe97cf7fcd0c73b2fcdb38eb | /modules/dbnd/src/dbnd/_vendor/ascii_graph/colordata.py | 0073e1cdd0c78f24e8109eeb0eabd4bfbee7c691 | [
"MIT",
"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,376 | py | colordata.py | def vcolor(data, pattern):
""" Color a graph line by line
:param data: the data
:type data: list of tuples (info, value)
:param pattern: list of colors, this list defines
the pattern to color each line of the graph.
:type pattern: list of 'colors' (str)
:return: the colored graph
:rty... |
b9f670d1962fd606991be35e4fc77f2059b33a74 | d4412fbe37540e2c4cbe59ed6503d3661ccb7d9c | /tests/test_context/test_hybrid_parallel.py | 9f26a5af53ce6d13fc0d00e4c4d8b949b1172b17 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"BSD-2-Clause",
"MIT"
] | permissive | hpcaitech/ColossalAI | a082ed08a3807b53c49d1f86835b9808590d9042 | c7b60f75470f067d1342705708810a660eabd684 | refs/heads/main | 2023-09-01T04:13:13.834565 | 2023-08-30T15:07:21 | 2023-08-30T15:07:21 | 422,274,596 | 32,044 | 4,084 | Apache-2.0 | 2023-09-14T15:19:54 | 2021-10-28T16:19:44 | Python | UTF-8 | Python | false | false | 6,006 | py | test_hybrid_parallel.py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from pathlib import Path
import pytest
import torch
from colossalai import launch
from colossalai.context import reset_seeds
from colossalai.context.parallel_mode import ParallelMode
from colossalai.core import global_context as gpc
from colossalai.global_variables imp... |
0c93433c868da48ecca7219858b926457f374eed | d6a165271729a11bbe20c3724e877f29bdb580d1 | /yabgp/tests/unit/message/test_notification.py | ac58b4f43f5beaf0965130e26d37b03fb06bce7f | [
"Apache-2.0"
] | permissive | smartbgp/yabgp | 67482f4368a39f777a99f9428ee5034fe8672977 | 24cbb732d4380ab54d000ac08690e521c60d4f2a | refs/heads/master | 2023-06-22T23:44:20.481844 | 2023-06-21T11:01:08 | 2023-06-21T11:01:08 | 33,908,998 | 227 | 82 | Apache-2.0 | 2023-06-21T11:01:10 | 2015-04-14T03:36:40 | Python | UTF-8 | Python | false | false | 1,300 | py | test_notification.py | # Copyright 2015 Cisco Systems, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
9148eda8555ce4741055c587f35af356370150a6 | c530897cb72b6943c7226b25824444cad5f3503b | /usaspending_api/references/tests/integration/test_adv_search_filters_and_hashes.py | ed05e65b8ce952a4a7c3974123614ceabee62de2 | [
"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 | 2,423 | py | test_adv_search_filters_and_hashes.py | import pytest
from model_bakery import baker
from rest_framework import status
from usaspending_api.references.models import FilterHash
HASH_ENDPOINT = "/api/v2/references/hash/"
FILTER_ENDPOINT = "/api/v2/references/filter/"
@pytest.fixture
def stored_hashes(db):
baker.make("references.FilterHash", filter={}... |
6426c7f482f35e594c28cec9a1430ef9a3c840f0 | 36977d5aba5592ec4ee2090d16958f90df11997d | /dit/math/combinatorics.py | 90dfa15af0f6a0ffd1c06f9a0ebd85da5c5971f9 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | dit/dit | 8589f969973b204fed828d1f8133f8c30de2cb6b | b13c5020a2b8524527a4a0db5a81d8549142228c | refs/heads/master | 2023-08-31T03:58:57.651496 | 2023-08-30T21:55:54 | 2023-08-30T21:55:54 | 13,201,610 | 468 | 95 | BSD-3-Clause | 2023-08-29T03:54:31 | 2013-09-29T23:03:51 | Python | UTF-8 | Python | false | false | 3,637 | py | combinatorics.py | """
Combinatorial functions.
"""
__all__ = (
'slots',
'unitsum_tuples',
)
def unitsum_tuples(n, k, mn, mx):
"""Generates unitsum k-tuples with elements from mn to mx.
This function is more general than slots(n,k,normalized=True), as it can
return unitsum vectors with elements outside of (0,1).
... |
9918c61e08fb4e583167caea4b6b0bfb2958e286 | 3f763cf893b09a3be562858613c928703ff349e4 | /client/verta/verta/_protos/public/modeldb/DatasetService_pb2.py | 0296cb61ba0753b5eebd233401638c3cdb4cfd05 | [
"Apache-2.0"
] | permissive | VertaAI/modeldb | 636e46fc025b01a514d599b10e228c8735503357 | ec9ac7712500adb13fd815dfd476ce9f536c6921 | refs/heads/main | 2023-08-31T00:45:37.220628 | 2023-08-30T18:45:13 | 2023-08-30T18:45:13 | 71,305,435 | 844 | 142 | Apache-2.0 | 2023-09-14T19:24:13 | 2016-10-19T01:07:26 | Java | UTF-8 | Python | false | true | 83,489 | py | DatasetService_pb2.py | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: modeldb/DatasetService.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_databa... |
3256ea930094eb5366ab29672f1108499b68737a | 5f800554fe91198d1abd45b7598b885c57731880 | /torchtext/models/t5/modules.py | 2b658efcfb6888782af407f5e4262b79093432c0 | [
"BSD-3-Clause"
] | permissive | pytorch/text | 314ac5d550c6971ac8dd065d7b3fd14e65738ebb | 45e4b8ca3615016625de15326a14668c8b58595d | refs/heads/main | 2023-09-02T01:52:17.987567 | 2023-09-01T00:41:04 | 2023-09-01T00:41:04 | 76,210,069 | 3,640 | 1,002 | BSD-3-Clause | 2023-09-01T00:41:05 | 2016-12-12T00:56:03 | Python | UTF-8 | Python | false | false | 55,358 | py | modules.py | # /* Portions Copyright (c) Meta Platforms, Inc. and affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable... |
a33e6e9464d4db34f93d9b953ed3db8dadf96efa | e4ba41f7efc71fefb22032a64d456d9c633f32f7 | /Re-ID/reid/prepare/add_aic_gps.py | 9e922adad0d523e7f63c39f9fa65eb8991d59656 | [] | no_license | yorkeyao/VehicleX | 61d2dd8dd7769b50680de49246d5201d25907c0e | c5cbc3196abef7a285d2159acee4c9a716b98aeb | refs/heads/master | 2022-05-29T18:02:40.613703 | 2022-04-15T09:40:21 | 2022-04-15T09:40:21 | 227,411,112 | 163 | 25 | null | 2020-10-25T10:40:31 | 2019-12-11T16:28:26 | Python | UTF-8 | Python | false | false | 4,314 | py | add_aic_gps.py | import os
import os.path as osp
import cv2
import numpy as np
from numpy.linalg import inv
data_path = 'D:/Data/AIC19/' if os.name == 'nt' else osp.expanduser('~/Data/AIC19/')
scenes = [1, 2, 3, 4, 5]
folder_by_scene = {1: 'train',
2: 'test',
3: 'train',
4: 'tr... |
f42d4d3d7753003048e772168861fca6d139c901 | f7f3dd55fa7ab6833f3c2d8e457884c127cc203d | /tests/test_enhancements/output/enumeration/notebook_model_1.py | 01a1f98d73a64cf31879e1bc41196f5f1f3c6528 | [
"CC0-1.0"
] | permissive | linkml/linkml | 0fe41590ea729f10b1a6e2de4a85c585f284dc22 | 2354a45838c6207b01ffabc6eda92512c3fb147b | refs/heads/main | 2023-08-17T05:59:08.486218 | 2023-08-11T21:31:59 | 2023-08-11T21:31:59 | 348,419,208 | 198 | 63 | CC0-1.0 | 2023-09-14T16:04:30 | 2021-03-16T16:34:43 | Python | UTF-8 | Python | false | false | 2,893 | py | notebook_model_1.py | # Auto generated from notebook_model_1.yaml by pythongen.py version: 0.9.0
# Generation date: 2022-01-27T02:54:10
# Schema: simple
#
# id: http://example.org/test/simple
# description: Very simple enumeration
# license: https://creativecommons.org/publicdomain/zero/1.0/
import dataclasses
import re
import sys
from dat... |
c88a2a5e1f0853c28c45e5bae072bd439aefc866 | 01427af18635fe286c91c28716231e0005fc4129 | /libs/colbert/colbert/utility/preprocess/queries_split.py | 5ebc5b8a37618d374563f66dc31034f0bb92321d | [
"MIT",
"Apache-2.0"
] | permissive | IntelLabs/fastRAG | 1441bdb95a86e74e5e44a8dfbe6493135e3d3427 | 5fb5bb18b39ee22d71349fbfe282e464f7094494 | refs/heads/main | 2023-08-30T19:41:39.216795 | 2023-08-22T10:55:09 | 2023-08-22T10:55:09 | 592,391,289 | 324 | 27 | Apache-2.0 | 2023-08-22T10:55:11 | 2023-01-23T16:25:35 | Python | UTF-8 | Python | false | false | 2,253 | py | queries_split.py | """
Divide a query set into two.
"""
import math
import os
import random
from argparse import ArgumentParser
from collections import OrderedDict
import ujson
from colbert.utils.utils import print_message
def main(args):
random.seed(12345)
"""
Load the queries
"""
Queries = OrderedDict()
... |
924313c2daf1abd17faf1af82ece3008ff1f6923 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /3_linkedList/篮球比赛分组-优先队列+双向链表.py | b7e190e04f2db546520109eaba28f10d98aacde3 | [] | 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 | 3,011 | py | 篮球比赛分组-优先队列+双向链表.py | """
某次篮球比赛前,
需要将站成一排的n名球员分为两队(两队人数可以不同),
每名球员的能力值为ai。
有两名教练轮流挑选队员,第一个教练先挑选。
每位教练每次选人时,都会选择当前剩余的所有人中,
能力值最大的那一个。当选择一个人后,
会将他左右两侧各m个人一起挑选走(若某一侧可选的人数不够m人,则将这—侧能选的人都选上)。
请输出此规则下,分到两队的具体成员情况。
"""
from heapq import heapify, heappop
from typing import List, Optional
class MaxCycleNode:
__slots__ = ("ind... |
fdf91d139eae0108d5dee7de69e103bb710d465c | d47abf79e58b2982bd2f5359057126864fdb6e48 | /b2sdk/v2/session.py | 9deee3f0137d0b1c8edebc7ca25ee52ed62cd8be | [
"Apache-2.0",
"MIT"
] | permissive | Backblaze/b2-sdk-python | ca90f4dca6a1a9a52c8dbccd0294bfc01290970a | 072f96dfe90ff191cb74dd2b657564ed5649553c | refs/heads/master | 2023-08-16T23:53:48.691286 | 2023-08-10T13:37:40 | 2023-08-10T13:37:40 | 168,011,367 | 160 | 67 | NOASSERTION | 2023-08-31T11:01:52 | 2019-01-28T18:13:01 | Python | UTF-8 | Python | false | false | 1,454 | py | session.py | ######################################################################
#
# File: b2sdk/v2/session.py
#
# Copyright 2021 Backblaze Inc. All Rights Reserved.
#
# License https://www.backblaze.com/using_b2_code.html
#
######################################################################
from __future__ import annotations... |
91aeba7ad2e2b1903612a62f434cc44408313021 | 0c41f2fd4c1ad9b954097b0662e556b3eb288987 | /cellbender/remove_background/tests/test_dataprep.py | 8fcb1562ee818f03ace75ac15eeb997277f03a60 | [] | permissive | broadinstitute/CellBender | e884a5520fc3e0fc2f422f8cd6dcdc6c594b5094 | 4990df713f296256577c92cab3314daeeca0f3d7 | refs/heads/master | 2023-08-21T14:55:33.619290 | 2023-08-08T18:40:14 | 2023-08-08T18:40:14 | 171,951,233 | 207 | 40 | BSD-3-Clause | 2023-08-30T05:27:18 | 2019-02-21T21:53:57 | Python | UTF-8 | Python | false | false | 3,177 | py | test_dataprep.py | """Test functions in dataprep.py"""
import pytest
import scipy.sparse as sp
import numpy as np
import torch
from cellbender.remove_background.data.dataprep import DataLoader
from cellbender.remove_background.sparse_utils import dense_to_sparse_op_torch
from .conftest import sparse_matrix_equal, simulated_dataset
U... |
5075dbd1c0d35c5797e437b9ae980de4d7c92d66 | d4a88b3b102e20e727cae8fbd4167dcb4b57d1ec | /dump/typingissues/no-overload-matches.py | 7bc960e1c3e1652df41983591ffe1fb845547bd7 | [
"MIT"
] | permissive | viblo/pymunk | ca64888e45706db431788368ff8464edf2912d5f | 20ac14f665fb38b4ef1bef5acea36a3d612dd0d5 | refs/heads/master | 2023-08-27T16:37:14.740653 | 2023-08-16T19:26:16 | 2023-08-16T19:26:16 | 13,273,472 | 855 | 255 | MIT | 2023-01-13T10:13:47 | 2013-10-02T14:36:46 | Python | UTF-8 | Python | false | false | 773 | py | no-overload-matches.py | import collections.abc
from typing import Any, Optional, Sequence, Tuple, Union, overload
class Vec(Sequence[float]):
@overload
def __init__(self, x_or_pair: Sequence[float], y: None) -> None:
...
@overload
def __init__(self, x_or_pair: float, y: float) -> None:
...
def __init__(... |
92f79d29af94ee0adf986a17c58b3091ba4ea9dc | 219a938ab3b084f8a9a0c4e0fe552ae40a42b991 | /liminal/runners/airflow/operators/operator_with_variable_resolving.py | 9f00f8ed5248a32616e4bd0a74466953fd4c16e0 | [
"LGPL-2.0-or-later",
"Apache-2.0"
] | permissive | apache/incubator-liminal | 0b9c510ed30826fcd416a5b3aaf991d675b0347a | 57246ec472dc79529a68b2c6edd76e5fef677f1b | refs/heads/master | 2023-08-31T09:25:43.704740 | 2023-01-22T08:13:30 | 2023-01-22T08:13:30 | 271,182,596 | 141 | 44 | Apache-2.0 | 2023-09-12T19:01:36 | 2020-06-10T04:57:10 | Python | UTF-8 | Python | false | false | 7,532 | py | operator_with_variable_resolving.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... |
5ade632fe0c1dede0f3e95561c7fbd8f0ed227e3 | f1973e136f49f0b5ea2ec63c4d862188d197e5a5 | /ans/upgrade/cfgdb/v3.0.0/files/cfgdb_zk_rest_server.py | e90c01b98705a6c4be44b64a9cd3c9e03579fe41 | [
"Apache-2.0"
] | permissive | erigones/esdc-ce | 65dc7d84e1bca3e3fcec668f54acae20183096a2 | 7e3dedddbe821283d909393f333eed4acd452953 | refs/heads/master | 2023-02-07T17:57:15.970089 | 2022-02-03T12:55:14 | 2022-02-03T12:55:14 | 73,122,985 | 123 | 36 | Apache-2.0 | 2023-01-24T23:22:54 | 2016-11-07T21:34:53 | Python | UTF-8 | Python | false | false | 8,786 | py | cfgdb_zk_rest_server.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import ssl
import json
import signal
import logging
import subprocess
try:
# noinspection PyCompatibility,PyUnresolvedReferences
import urlparse
except ImportError:
# noinspection PyCompatibility,PyUnresolvedReferences
from urllib impo... |
a3f736efb4d2c364877181ccf1f98ca22426dba2 | 98dbb9cd9523809b4ee0e6b92334fa6a2a6af2a3 | /bingads/v13/bulk/file_writer.py | f539d2836eeb2ee10d0917bdc32154e16b890b50 | [
"MIT"
] | permissive | BingAds/BingAds-Python-SDK | a2f9b0c099b574a4495d0052218f263af55cdb32 | 373a586402bf24af7137b7c49321dbc70c859fce | refs/heads/main | 2023-07-27T15:31:41.354708 | 2023-07-10T03:21:03 | 2023-07-10T03:21:03 | 31,927,550 | 105 | 182 | NOASSERTION | 2023-09-04T06:51:20 | 2015-03-09T23:09:01 | Python | UTF-8 | Python | false | false | 2,146 | py | file_writer.py | from bingads.v13.internal.bulk.object_writer import _BulkObjectWriter
class BulkFileWriter:
""" Provides methods to write bulk entities to a file.
For more information about the Bulk File Schema, see https://go.microsoft.com/fwlink/?linkid=846127.
:param file_path: The file path of the bulk file to writ... |
500931a601a860c092aedf078c718e208112125c | 6d58cdc52b4f882b498d44791ea41d89f2691445 | /nipyapi/nifi/models/node_dto.py | 34d4111b8dab801a9377d7013f6962d4567e7373 | [
"Apache-2.0"
] | permissive | Chaffelson/nipyapi | 8cb47c1f13e9b3d53d4add8829c2efcee24349b6 | c687fb811486d7bcada099ac0785b55cfb30aea8 | refs/heads/main | 2022-12-02T15:39:27.685280 | 2022-12-01T12:39:10 | 2022-12-01T12:39:10 | 101,291,622 | 229 | 84 | NOASSERTION | 2023-08-27T15:55:31 | 2017-08-24T12:17:36 | Python | UTF-8 | Python | false | false | 10,824 | py | node_dto.py | # coding: utf-8
"""
NiFi Rest API
The Rest API provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... |
6089575b00a8c46ab6f3e219ce26aac0a973eec3 | b60686a2e351a756f249e0d9faab8fe154a08f11 | /dffml/source/dir.py | d15aae7bc076ba189541e1c1052cee5e3d0cb523 | [
"MIT",
"LicenseRef-scancode-generic-export-compliance"
] | permissive | intel/dffml | 86483b47229b9b62c9f8dfef51491aa02563347e | 7d381bf67a72fe1ecb1012393d5726085564cb0e | refs/heads/main | 2023-08-28T00:35:04.219193 | 2023-06-06T18:29:16 | 2023-06-06T18:29:16 | 149,512,216 | 237 | 204 | MIT | 2023-05-05T15:39:35 | 2018-09-19T21:06:34 | Python | UTF-8 | Python | false | false | 4,124 | py | dir.py | """
Loads files from a directory
"""
import os
import glob
import pathlib
from typing import List
from ..record import Record
from ..base import config, field
from .memory import MemorySource
from ..util.entrypoint import entrypoint
from ..source.source import BaseSource
from ..configloader.configloader import ConfigL... |
e1d60bf59d0e2b1143eea190b03c262551f6ee2a | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-HealthKit/PyObjCTest/test_healthkit.py | 4105173b86e83137de8a4638a25b412b3e297720 | [
"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 | 194 | py | test_healthkit.py | from PyObjCTools.TestSupport import TestCase
import HealthKit
class TestHealthKit(TestCase):
def test_callable_metadata_is_sane(self):
self.assertCallableMetadataIsSane(HealthKit)
|
6f6495d32fef698ed1919f427c62d665d5abf8b0 | a5ae6cdf4288c5d0f015dd2fa4718ca8d922ceda | /scraper/services/__init__.py | fe45e7e34cb5d5188f6eae57eb0e4f7a5c28b60c | [] | no_license | itsToggle/plex_debrid | e2de847abd0f59259c3285cb4672200a79ef0e8f | 8deca8c9a57deed35e065d52ca211a5f90fcbdc1 | refs/heads/main | 2023-08-03T11:29:13.705811 | 2023-07-20T09:09:38 | 2023-07-20T09:09:38 | 490,273,040 | 761 | 72 | null | 2023-09-04T20:06:44 | 2022-05-09T12:27:37 | Python | UTF-8 | Python | false | false | 2,472 | py | __init__.py | from base import *
#import child modules
from scraper.services import rarbg
from scraper.services import x1337
from scraper.services import jackett
from scraper.services import prowlarr
from scraper.services import orionoid
from scraper.services import nyaa
from scraper.services import torrentio
#define subc... |
f67f89ee9bb0ec45da5b47a57c2a2e00c54b0f38 | 3d986080cde791938fdfa11cc3dbf31ca37b5936 | /examples/jsonfile.py | daf99bcd351610315053f79613a1447368ef5ff9 | [
"MIT"
] | permissive | yukinarit/pyserde | 266545ac4183b883bf23f81e730ed626639f308c | 89680ed429401d41e2a4584b8023cb6366786e41 | refs/heads/main | 2023-08-07T19:05:47.496365 | 2023-07-31T09:56:19 | 2023-07-31T09:56:19 | 160,464,105 | 533 | 40 | MIT | 2023-09-07T10:51:47 | 2018-12-05T05:10:29 | Python | UTF-8 | Python | false | false | 1,052 | py | jsonfile.py | """
jsonfile.py
Deserialize JSON into an object.
Usage:
$ poetry install
$ poetry run python jsonfile.py
"""
from dataclasses import dataclass
from typing import List, Optional
from serde import serde
from serde.json import from_json
@serde
@dataclass
class Slide:
title: str
type: str
items: Op... |
6df03bc778bde720a8c9ca9ee9973138860e990e | 753cd066a9bd26b6c37c8d53a86c7a9c659ec18c | /tutorials/simple_applications/pytorch/bert/test_bert_inference.py | 7838183170a59c67c337e8e9e089f6925b390a80 | [
"MIT"
] | permissive | graphcore/examples | ac872015808ed2a913d4d7bf0d63202ce15ebbae | e2f834dd60e7939672c1795b4ac62e89ad0bca49 | refs/heads/master | 2023-08-05T02:08:12.341836 | 2023-07-27T11:13:10 | 2023-07-27T11:13:10 | 143,977,106 | 311 | 80 | MIT | 2023-09-11T16:42:56 | 2018-08-08T07:29:17 | Python | UTF-8 | Python | false | false | 1,800 | py | test_bert_inference.py | #!/usr/bin/env python3
# Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import os
import re
import pytest
import tutorials_tests.testing_util as testing_util
EXPECTED_RESULTS = [
("How many islands are there in Scotland?", "more than 790"),
("What sea is to the south of Scotland?", "irish sea"),
(... |
d22a1d62dd80bd884d59ff3c51b675e81f1fe924 | 5095200e9ca55cd3a37af34ed44448c02e2a1bb5 | /modules/text/language_model/lda_news/config.py | da0651c0bbd52e0c1bcf72d547a65c6e19559d3c | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleHub | 8712603ef486c45e83eb0bc5725b0b3ed3ddbbde | b402610a6f0b382a978e82473b541ea1fc6cf09a | refs/heads/develop | 2023-07-24T06:03:13.172978 | 2023-03-28T11:49:55 | 2023-03-28T11:49:55 | 162,672,577 | 12,914 | 2,239 | Apache-2.0 | 2023-07-06T21:38:19 | 2018-12-21T06:00:48 | Python | UTF-8 | Python | false | false | 259 | py | config.py | """
This file defines the basic config information of LDA/SLDA model.
"""
class ModelType:
LDA = 0
SLDA = 1
class ModelConfig:
type = None
num_topics = None
alpha = None
beta = None
word_topic_file = None
vocab_file = None
|
e03487109a0673a98b56442254557bdac0dcb015 | 2337351b228818e41be3002bd38f68f77c2aa074 | /sa/profiles/Zyxel/MSAN/get_version.py | df2379b2c9719a69d8c1e235c08b15a77c07b511 | [
"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,998 | py | get_version.py | # ---------------------------------------------------------------------
# Zyxel.MSAN.get_version
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python m... |
ed76f21a4a73ac19117bce256b71757d15eedde1 | 3395a234e7c80d011607e79c49cd48bf516f256b | /dependencies/jedi/inference/gradual/__init__.py | 5c86b7b349988f5dd5e0e6c3e957c59918ff997d | [
"MIT"
] | permissive | srusskih/SublimeJEDI | 67329b72e184bc9584843968dcc534a002c797a1 | 95c185d778425c04536d53517b0e3fe6dedf8e59 | refs/heads/master | 2023-08-24T11:30:37.801834 | 2022-08-30T09:04:17 | 2022-08-30T09:04:17 | 6,241,108 | 669 | 125 | MIT | 2022-08-30T09:04:18 | 2012-10-16T08:23:57 | Python | UTF-8 | Python | false | false | 143 | py | __init__.py | """
It is unfortunately not well documented how stubs and annotations work in Jedi.
If somebody needs an introduction, please let me know.
"""
|
75bc4f8f23ee1240ebba0443d2e53e2508715b4e | 8ca19f1a31070738b376c0370c4bebf6b7efcb43 | /tests/test_graph_client.py | 7e9336d580753536e293aec6e159ea63af5500b0 | [
"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 | 4,446 | py | test_graph_client.py | import uuid
from office365.onedrive.internal.paths.url import UrlPath
from office365.runtime.odata.path_builder import ODataPathBuilder
from office365.runtime.paths.resource_path import ResourcePath
from tests import test_team_site_url
from tests.graph_case import GraphTestCase
class TestGraphClient(GraphTestCase):
... |
61f14f92dec1139a9d15f3a967bc0e645809a515 | 217c4e211060b9d699655b434a86be712324d509 | /tests/test_bqplot.py | d3ceb2d93fb963523e0eb234ed54fe3c9b1eb54d | [
"Apache-2.0"
] | permissive | Kaggle/docker-python | 29ecfcb983839f91660665b238a48024ac87b6dc | cf60eda37be580511e9fc4b3ca7a25de40ee9f71 | refs/heads/main | 2023-08-29T08:45:31.581555 | 2023-08-24T13:14:55 | 2023-08-24T13:14:55 | 33,904,449 | 2,365 | 1,066 | Apache-2.0 | 2023-09-01T19:16:31 | 2015-04-14T01:45:38 | Python | UTF-8 | Python | false | false | 383 | py | test_bqplot.py | import unittest
import numpy as np
import bqplot.pyplot as plt
class TestBqplot(unittest.TestCase):
def test_figure(self):
size = 100
scale = 100.0
np.random.seed(0)
x_data = np.arange(size)
y_data = np.cumsum(np.random.randn(size) * scale)
fig = plt.figure(title='F... |
e1d1328b16e3338f3310a4995f74d0ace8a6e05d | e2e34d01afc5b6bc6923a721ef92e8ffa8884f86 | /tests/endtoend/servicebus_functions/servicebus_functions_stein/generic/function_app.py | 4314116579b6ae09ab5273e1252f46b1071f886a | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-functions-python-worker | 094340eeb0c4728e3202749027f01ab75e908bd8 | d4bdf7edc544b6c15e541930f890da790b180ebd | refs/heads/dev | 2023-08-22T22:48:01.645722 | 2023-08-14T14:52:42 | 2023-08-14T14:52:42 | 117,730,503 | 329 | 122 | MIT | 2023-09-01T16:54:58 | 2018-01-16T19:23:54 | Python | UTF-8 | Python | false | false | 2,645 | py | function_app.py | import json
import azure.functions as func
app = func.FunctionApp(http_auth_level=func.AuthLevel.ANONYMOUS)
@app.function_name(name="put_message")
@app.generic_trigger(arg_name="req", type="httpTrigger", route="put_message")
@app.generic_output_binding(arg_name="msg",
type="ser... |
71de5b8b70ff3f1d1013f5e2af766f46d3e0ed8c | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/training/adagrad_test.py | 5c60262337bac67845a9ffe26f7c1de337b3aa0f | [
"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 | 15,029 | py | adagrad_test.py | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
16c38cb24bf343c4a2a0450dcf8590715682bf7f | db957e448e0247f92a33efb72a4d76e22d58e55e | /docs/mkdocs/prepare_mkdocs.py | b1c2ecf1e6d0255d39fbd783a75e116c21de6e4b | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | lf-edge/eve | 5852c0d738e3f7675f2d7c96c825ef99f30799df | 4240dd362cefdf156c68f7126b1d60e388ec94d1 | refs/heads/master | 2023-09-06T09:12:03.778918 | 2023-09-01T11:59:26 | 2023-09-05T18:52:11 | 182,198,941 | 435 | 288 | Apache-2.0 | 2023-09-14T17:13:47 | 2019-04-19T04:01:17 | Go | UTF-8 | Python | false | false | 4,038 | py | prepare_mkdocs.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This script prepares documentation files for mkdocs."""
import os
import sys
import shutil
import re
# Output directory for document sources
if len(sys.argv) <= 2:
print("Use: python", sys.argv[0], "<output-directory> <repository-url>")
sys.exit(1)
else:
o... |
5b33501ff4ff50648db63f082775ce9bbd33d7c2 | bffbde8cc7a544f1b5d6c1bc4b84ca607226e134 | /tests/test_split.py | 9aff270c867b0899163fbabd5be87b8de976193c | [
"MIT"
] | permissive | VainF/Torch-Pruning | c006d274e69c5c592ca1e302a70f6603504b8e07 | e2478a72022c96af3b9053da359a726939e1adaf | refs/heads/master | 2023-09-05T02:38:36.804176 | 2023-09-04T11:26:29 | 2023-09-04T11:26:29 | 228,203,350 | 1,606 | 231 | MIT | 2023-09-06T16:45:28 | 2019-12-15T15:07:24 | Python | UTF-8 | Python | false | false | 2,618 | py | test_split.py | import sys, os
sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
import torch
import torch_pruning as tp
import torch.nn as nn
class Net(nn.Module):
def __init__(self, in_dim):
super().__init__()
self.block1 = nn.Sequential(
nn.Conv2d(in_dim, in_dim, 1),
... |
69105ae710431b6eb9028812ef85a3f8165eacca | 77ff40ab8d90d15013f9cc884c2eb3ed24cd5cf7 | /houdini/scripts/456.py | 076ceeab36525009834c90e971a6c81eca08a169 | [
"MIT"
] | permissive | captainhammy/Houdini-Toolbox | 78655b943244d2c086966812031bb94ab0ace3a3 | f233232d8fbf5934ac99dad1aa72bdd5faa63b8b | refs/heads/master | 2023-06-23T09:37:30.745036 | 2023-06-12T19:59:23 | 2023-06-12T19:59:23 | 3,946,767 | 159 | 34 | MIT | 2022-10-01T15:31:26 | 2012-04-06T04:12:28 | Python | UTF-8 | Python | false | false | 630 | py | 456.py | """Perform tasks when a .hip file is loaded."""
# =============================================================================
# IMPORTS
# =============================================================================
# Houdini Toolbox
from houdini_toolbox.events import SceneEvents, run_event
# =====================... |
f7deb93c3401c27918dae53c9c41fd4cf1a725a8 | a63d907ad63ba6705420a6fb2788196d1bd3763c | /src/api/dataflow/shared/api/modules/meta.py | 0d0d5399a2907d3967935517e52aad725db3c53b | [
"MIT"
] | permissive | Tencent/bk-base | a38461072811667dc2880a13a5232004fe771a4b | 6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2 | refs/heads/master | 2022-07-30T04:24:53.370661 | 2022-04-02T10:30:55 | 2022-04-02T10:30:55 | 381,257,882 | 101 | 51 | NOASSERTION | 2022-04-02T10:30:56 | 2021-06-29T06:10:01 | Python | UTF-8 | Python | false | false | 5,742 | py | meta.py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
------------------------------------------... |
a315bd9ed9c73a895c94336613e5d2b581eda426 | 8ca19f1a31070738b376c0370c4bebf6b7efcb43 | /office365/onedrive/sharepoint_ids.py | 03cf8a3ba1187f88a3243dcd61551a1dc308dd6f | [
"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 | 816 | py | sharepoint_ids.py | from office365.runtime.client_value import ClientValue
class SharePointIds(ClientValue):
"""The SharePointIds resource groups the various identifiers for an item stored in a SharePoint site or OneDrive
for Business into a single structure. """
def __init__(self, list_id=None, list_item_id=None, list_item... |
555d30d4475b01fd0c229fcdce192dcfdf44ad6a | bf00669ed38e95a82b2ca3f5f058817ca97f4704 | /Algorithmia/__main__.py | 1b5f7b5a8800e772e215d031466240d58ecf606a | [
"MIT"
] | permissive | algorithmiaio/algorithmia-python | e049ee9bb9aa6ad6571471b4b1f5e57ae285dc20 | 31f0e9047483bea72b4fdec9ef42b9174b2aa2dc | refs/heads/develop | 2022-08-25T14:07:18.714220 | 2022-08-03T16:30:46 | 2022-08-03T16:30:46 | 38,772,089 | 144 | 48 | MIT | 2023-02-24T20:50:36 | 2015-07-08T18:25:17 | Python | UTF-8 | Python | false | false | 9,445 | py | __main__.py | import sys
import os
import json
sys.path = ['../'] + sys.path
import Algorithmia
import six
from Algorithmia.CLI import CLI
import argparse
import re
#bind input to raw input
try:
input = raw_input
except NameError:
pass
#CLI app to allow a user to run algorithms and manage data collections
usage = """CLI fo... |
761d128183d22869d5b1d240d501a662a3d54195 | b8106a0cd1e1604de98ef2b4b5311ec3f36d122a | /ask-sdk-core/tests/unit/test_template_factory.py | 7618c3753adf10c1888b9561a2cf7e8f1e8dffbb | [
"Apache-2.0"
] | permissive | alexa/alexa-skills-kit-sdk-for-python | b5e8288c6dd7a3ff6e13b19a7f0026561087ed93 | 7e13ca69b240985584dff6ec633a27598a154ca1 | refs/heads/master | 2023-06-26T02:01:58.858446 | 2023-06-08T18:20:05 | 2023-06-08T18:20:05 | 130,283,857 | 560 | 239 | Apache-2.0 | 2023-05-23T18:51:30 | 2018-04-19T23:40:46 | Python | UTF-8 | Python | false | false | 7,401 | py | test_template_factory.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 i... |
68881642c46be5a8415d24979379941c61613556 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /前端笔记/牛客/牛客网前端笔试题/算法题/美团10/正则序列-贪心.py | c30ae6fc2bee3bd8fed84e7c815e9483c148bf73 | [] | 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 | 566 | py | 正则序列-贪心.py | # 有一天小团得到了一个长度为n的任意序列s,他需要在有限次操作内,将这个序列变成一个正则序列,每次操作他可以任选序列中的一个数字,并将该数字加一或者减一。
# 请问他最少用多少次操作可以把这个序列变成正则序列(1到n的排列)?
# 改动最少的方案一定是对输入序列和正则序列中相同排名的元素
n = int(input())
nums = [int(i) for i in input().split()]
nums.sort()
res = 0
for i in range(n):
res += abs(i + 1 - nums[i])
print(res)
|
d9401b442c562e539f80b69f8bb70478d0afdee7 | df4361db61d10a10c46ed5f18973d89e4efda82c | /armi/reactor/grids/__init__.py | 598295a65d5ade75c6615bc2c7c5d85958dc2134 | [
"Apache-2.0",
"GPL-1.0-or-later",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | terrapower/armi | 5524741c5e80781e136ea3422aed0db8398f76ae | 360791847227df3f3a337a996ef561e00f846a09 | refs/heads/main | 2023-09-04T05:16:29.080518 | 2023-09-01T16:10:29 | 2023-09-01T16:10:29 | 218,863,590 | 204 | 75 | Apache-2.0 | 2023-09-14T20:42:24 | 2019-10-31T21:18:34 | Python | UTF-8 | Python | false | false | 3,717 | py | __init__.py | # Copyright 2023 TerraPower, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... |
469b9491121d55efaec5268c2e0c2a749f3d89ae | 4805a71711625735215cc1a773a85712be305b59 | /Cython/Compiler/UtilNodes.py | 81d3038ead414e8cb19b1cd1b0af674080a6b545 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cython/cython | 0a75b75b7eaf19eeedaaebca9d49adb603e3e8f5 | 6ba3daf319d94058de74e8e7f53f932092b38441 | refs/heads/master | 2023-09-04T11:09:56.569277 | 2023-09-04T07:45:47 | 2023-09-04T07:45:47 | 1,099,265 | 8,352 | 1,704 | Apache-2.0 | 2023-09-14T06:33:34 | 2010-11-21T07:44:20 | Python | UTF-8 | Python | false | false | 12,463 | py | UtilNodes.py | #
# Nodes used as utilities and support for transforms etc.
# These often make up sets including both Nodes and ExprNodes
# so it is convenient to have them in a separate module.
#
from __future__ import absolute_import
from . import Nodes
from . import ExprNodes
from .Nodes import Node
from .ExprNodes import AtomicE... |
0a4b962526c9983e62c8737557f823ad3b36bcde | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/serialization/scipy.py | d3cdf9ab60c7e7e303abe4fd1e1941e5eca72c75 | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 2,435 | py | scipy.py | # Copyright 1999-2021 Alibaba Group Holding 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 a... |
a876b0eba0334bc287a732052bf1b6be7caf0a76 | 2ab8c172bc4e9d3b3c75659585e83ade1e2eb832 | /tests/test_basic.py | 234a83b4f8143ea2d2569c2d440016e81deb9932 | [
"BSD-3-Clause"
] | permissive | theislab/scvelo | 0a5d717f8f025d7b6cf96ded2a7d5868f0484f43 | d89ca6aecbe93256fbcdd8a521fdee2b9f2a673a | refs/heads/master | 2023-07-25T16:28:58.484128 | 2023-07-25T15:21:12 | 2023-07-25T15:21:12 | 145,459,109 | 372 | 143 | BSD-3-Clause | 2023-07-25T15:21:14 | 2018-08-20T19:03:07 | Python | UTF-8 | Python | false | false | 3,916 | py | test_basic.py | import numpy as np
import scvelo as scv
from scvelo.tools import ExpectationMaximizationModel
def test_einsum():
from scvelo.core import l2_norm, prod_sum
Ms, Mu = np.random.rand(5, 4), np.random.rand(5, 4)
assert np.allclose(prod_sum(Ms, Mu, axis=0), np.sum(Ms * Mu, 0))
assert np.allclose(prod_sum(... |
492a95e9522506f954e076b536971f91de09ba31 | 94c1805df5a09c39159d502f420d19ad54b567fc | /runtime/deps/gyp/test/sanitize-rule-names/gyptest-sanitize-rule-names.py | 968a0ce5ce48e8001091e75953655791dc0982e1 | [
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | 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 | 479 | py | gyptest-sanitize-rule-names.py | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""
Make sure rule names with non-"normal" characters in them don't cause
broken build files. This test was originally causing broken .ninja... |
605993b1e10ebacfc8f25e03c9c176de9e88a9b8 | 3a24f63c8742560993b5465b26339e7c0ed05a27 | /crates/ruff/resources/test/fixtures/pandas_vet/pandas_use_of_dot_read_table.py | a0e48e223ebb47fb8f64031aefa8ea90b0c2c2a2 | [
"BSD-3-Clause",
"0BSD",
"LicenseRef-scancode-free-unknown",
"GPL-1.0-or-later",
"MIT",
"Apache-2.0"
] | permissive | astral-sh/ruff | 8f1de11263474c6293454b02c728df2f113801db | 82410524d9612f11387c2675a03869d489bb97ef | refs/heads/main | 2023-08-02T23:20:34.351174 | 2023-08-02T21:32:43 | 2023-08-02T21:32:43 | 523,043,277 | 2,264 | 122 | MIT | 2023-09-14T20:08:59 | 2022-08-09T17:17:44 | Rust | UTF-8 | Python | false | false | 606 | py | pandas_use_of_dot_read_table.py | import pandas as pd
# Errors.
df = pd.read_table("data.csv", sep=",")
df = pd.read_table("data.csv", sep=",", header=0)
filename = "data.csv"
df = pd.read_table(filename, sep=",")
df = pd.read_table(filename, sep=",", header=0)
# Non-errors.
df = pd.read_csv("data.csv")
df = pd.read_table("data.tsv")
df = pd.read_tab... |
353e81dc519df9fb9826c725e82908e56ff51046 | 85373d45a83e4096affafa4f4e5b400787413e57 | /src/programy/storage/stores/file/store/errors.py | 9ffdb61a8fa3cc3a696b14beace46b491efd74cc | [
"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 | 2,619 | py | errors.py | """
Copyright (c) 2016-2020 Keith Sterling http://www.keithsterling.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, m... |
37c684a902f89ff4555a6261ebaf99734549ef08 | 2617bfec230858814b32795c6a47249c54a15cac | /tests/clpy_tests/opencl_tests/test_api.py | f254f6ba9b2cb821e8472673b581a19dd1133873 | [
"MIT",
"NCSA",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | fixstars/clpy | a06a1281887470d8faee3ec204b56fbef2496fab | 693485f85397cc110fa45803c36c30c24c297df0 | refs/heads/clpy | 2021-06-10T04:00:30.974447 | 2021-02-28T06:01:26 | 2021-02-28T06:01:26 | 136,439,592 | 154 | 20 | NOASSERTION | 2021-04-07T02:41:03 | 2018-06-07T07:33:04 | Python | UTF-8 | Python | false | false | 303 | py | test_api.py | # -*- coding: utf-8 -*-
import unittest
class TestApi(unittest.TestCase):
"""test class of OpenCL API"""
def test_import(self):
self.assertTrue(True) # Always OK if no exeption from import
# TODO(LWisteria): Implement more case
if __name__ == "__main__":
unittest.main()
|
b3b94e3a9e154ec45183935b21c63fc42c762540 | 73305ddcc6dc9775b1e9a71506e2f3c74f678edc | /dags/deal_finder_dag.py | 5ceb63e16bbfb78cdc174f80f235d83fe56353d1 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | google/starthinker | ef359557da4140275a8524d0d813eecf022ece9e | b596df09c52511e2e0c0987f6245aa4607190dd0 | refs/heads/master | 2023-08-25T21:16:45.578012 | 2023-07-17T22:19:18 | 2023-07-17T22:20:10 | 123,017,995 | 167 | 64 | Apache-2.0 | 2023-08-02T01:24:51 | 2018-02-26T19:15:09 | Python | UTF-8 | Python | false | false | 14,740 | py | deal_finder_dag.py | ###########################################################################
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/l... |
25ea74cef302f87e2073c9bff1949cc403ab7183 | d48e09166db1ff0dae2c8a4ddbbe453606689081 | /selfdrive/can/libdbc_py.py | fbf36a3d4d07643530a9cdd46fac546925685657 | [
"MIT"
] | permissive | Gernby/raspberry-pilot | a8857fdb2a50ade237d657ccd9d1049c5aa65515 | 0909e7594dff1c6fb524b5502ce3258f1969b6a5 | refs/heads/resonant-rails | 2023-04-06T10:09:35.457160 | 2023-01-06T01:57:31 | 2023-01-06T01:57:31 | 242,575,807 | 141 | 62 | MIT | 2023-03-05T05:22:49 | 2020-02-23T19:15:12 | C | UTF-8 | Python | false | false | 1,884 | py | libdbc_py.py | import os
import subprocess
from cffi import FFI
can_dir = os.path.dirname(os.path.abspath(__file__))
libdbc_fn = os.path.join(can_dir, "libdbc.so")
subprocess.check_call(["make"], cwd=can_dir)
ffi = FFI()
ffi.cdef("""
typedef struct {
const char* name;
double value;
} SignalPackValue;
typedef struct {
uint3... |
d9c8c9d1b442bdc20cbef0ae31657fb10a006b80 | 5eb52c07e5b1bd00af77306f927f382b684cd6ff | /indy_common/test/types/test_get_rich_schema_object_by_metadata_schema.py | a1919821c22d758cb64539d55f0ff6f7e558d383 | [
"Apache-2.0"
] | permissive | hyperledger/indy-node | bce39486988f5114581cff4f6d14fc1b7684143c | e6bb87d4c605aff9914491d062248b6ec857334c | refs/heads/main | 2023-09-03T15:33:08.187153 | 2023-05-08T22:48:21 | 2023-05-08T22:48:21 | 77,021,566 | 691 | 783 | Apache-2.0 | 2023-05-09T15:42:43 | 2016-12-21T05:45:04 | Python | UTF-8 | Python | false | false | 831 | py | test_get_rich_schema_object_by_metadata_schema.py | from collections import OrderedDict
from indy_common.types import ClientGetRichSchemaObjectByMetadataOperation
from plenum.common.messages.fields import ConstantField, LimitedLengthStringField, VersionField, NonEmptyStringField
EXPECTED_ORDERED_FIELDS = OrderedDict([
("type", ConstantField),
("rsType", NonEmp... |
7c7ea9a31bd032227bdf71ce2ec2c2b199d81fc9 | ea57d267ab31480d8d731b2c095e9da9ad989133 | /aea/runtime.py | ef93e6212561c20f129b32ac4a4ef3dab5b4db20 | [
"Apache-2.0"
] | permissive | fetchai/agents-aea | 6d034f1db6f3beacf31dac2f5a1baaa60c8edb7d | bec49adaeba661d8d0f03ac9935dc89f39d95a0d | refs/heads/main | 2023-08-08T23:19:06.276643 | 2023-02-04T10:46:39 | 2023-02-04T10:46:39 | 203,558,879 | 192 | 58 | Apache-2.0 | 2023-07-19T04:45:26 | 2019-08-21T10:12:47 | Python | UTF-8 | Python | false | false | 14,470 | py | runtime.py | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2023 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... |
60ba60cffc380f4777bdd6000639b3e40546f1d1 | f9308d5a8efe2dbb48e9cc87cd06405b60a9dc7b | /samples/python/apidocs/ee_image_arrayargmax.py | e0b33b07dbbbb7bae1f32c57125918cad4d1e1f7 | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | google/earthengine-community | 4e054b421f66f03507d58668084aee981062fc24 | ce931040c518860f8788b4888c0acfdebd2952fc | refs/heads/master | 2023-09-01T14:47:54.812703 | 2023-08-31T23:01:00 | 2023-08-31T23:01:39 | 200,732,820 | 428 | 552 | Apache-2.0 | 2023-09-13T21:46:51 | 2019-08-05T21:42:11 | Jupyter Notebook | UTF-8 | Python | false | false | 1,733 | py | ee_image_arrayargmax.py | # Copyright 2023 The Google Earth Engine Community 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
2ffff106d97ba4dd03a27b10a435701fec23dad8 | a902290fb3b911676358ae4d93f83061a6c2bd0f | /InvenTree/company/migrations/0014_auto_20200407_0116.py | 03985a1ef3297e868cf40a1ca188e1a0fdd5cc68 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | inventree/InvenTree | a15e54182c9bfafdf5348cc9a66da1004e23e760 | e88a8e99a5f0b201c67a95cba097c729f090d5e2 | refs/heads/master | 2023-09-03T19:32:35.438375 | 2023-08-30T00:25:40 | 2023-08-30T00:25:40 | 85,894,461 | 3,077 | 549 | MIT | 2023-09-14T14:21:01 | 2017-03-23T01:44:10 | Python | UTF-8 | Python | false | false | 492 | py | 0014_auto_20200407_0116.py | # Generated by Django 2.2.10 on 2020-04-07 01:16
import company.models
from django.db import migrations
import stdimage.models
class Migration(migrations.Migration):
dependencies = [
('company', '0013_auto_20200406_0131'),
]
operations = [
migrations.AlterField(
model_name='... |
94f73c99e6171e386bdaf2d71a4c3d204a12f32d | 87ddcf61c2faaaa795b9c25af334a76018337f62 | /tests/schema/field/test_general.py | 160ee3c7224aa3c1a877a5d3ea11c9c15599417d | [
"MIT"
] | permissive | frictionlessdata/frictionless-py | 17d663ad34c18964113c97e4d657004610fe0df0 | 740319edeee58f12cc6956a53356f3065ff18cbb | refs/heads/main | 2023-08-26T16:24:25.353929 | 2023-08-04T07:55:37 | 2023-08-04T07:55:37 | 28,409,905 | 295 | 79 | MIT | 2023-09-04T05:01:33 | 2014-12-23T17:11:11 | Python | UTF-8 | Python | false | false | 3,985 | py | test_general.py | import textwrap
from importlib import import_module
import pytest
from frictionless import Field
# General
DESCRIPTOR = {
"name": "id",
"type": "integer",
"format": "default",
"missingValues": ["-"],
"constraints": {"required": True},
}
def test_field():
field = Field.from_descriptor(DESC... |
5a64309f1909c5871346288705c1141003c9b432 | 2ed0210bc41f848a0e67fce3ad6b7a3e85228261 | /src/pykeen/triples/utils.py | 922f67737afb5261c062f09aab8502327795785e | [
"MIT"
] | permissive | pykeen/pykeen | f7483445bd99d3a404bc4ff42538550d56702b66 | 5ff3597b18ab9a220e34361d3c3f262060811df1 | refs/heads/master | 2023-08-25T20:29:55.021639 | 2023-08-24T20:05:20 | 2023-08-24T20:05:20 | 242,672,435 | 1,308 | 199 | MIT | 2023-09-13T18:18:36 | 2020-02-24T07:26:03 | Python | UTF-8 | Python | false | false | 6,683 | py | utils.py | # -*- coding: utf-8 -*-
"""Instance creation utilities."""
import pathlib
from typing import Callable, List, Mapping, Optional, Sequence, Set, TextIO, Tuple, Union
import numpy as np
import pandas
import torch
from pkg_resources import iter_entry_points
from ..typing import LabeledTriples, MappedTriples
__all__ = ... |
14d7e4473b37812c6f13c61478f453e4ad51748b | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/impl/gen/view_models/common/__init__.py | 246529802b71fcefa0e2d3107e781c7d85b85fd2 | [] | 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 | 137 | py | __init__.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/impl/gen/view_models/common/__init__.py
pass
|
fdcd60e6950a8cd9994ce09b797ff55c0a18c173 | 6146e33102797407ede06ce2daa56c28fdfa2812 | /python/GafferUI/SpreadsheetUI/_Formatting.py | 80656005820b75fb532fd10482989be31e4807e5 | [
"BSD-3-Clause"
] | permissive | GafferHQ/gaffer | e1eb78ba8682bfbb7b17586d6e7b47988c3b7d64 | 59cab96598c59b90bee6d3fc1806492a5c03b4f1 | refs/heads/main | 2023-09-01T17:36:45.227956 | 2023-08-30T09:10:56 | 2023-08-30T09:10:56 | 9,043,124 | 707 | 144 | BSD-3-Clause | 2023-09-14T09:05:37 | 2013-03-27T00:04:53 | Python | UTF-8 | Python | false | false | 3,704 | py | _Formatting.py | ##########################################################################
#
# Copyright (c) 2020, Cinesite VFX Ltd. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions ... |
b1aa409965c272d64ff825793379950965f864ef | b2bcf07493b5a1bbfb7e29c7f13ac0b380cefead | /deprecated/scripts/dcgan_celeba_lightning.py | deadf65b98d99c11e834c74b7e59c24564fb3bda | [
"MIT"
] | permissive | probml/pyprobml | e1952927bceec676eb414f9342470ba4b8e6703b | 9cc22f3238ae092c2b9bff65d6283c93d38d25d4 | refs/heads/master | 2023-08-31T07:36:11.603301 | 2023-08-13T02:47:12 | 2023-08-13T02:47:12 | 65,924,871 | 6,263 | 1,598 | MIT | 2023-01-20T23:34:23 | 2016-08-17T16:42:24 | Jupyter Notebook | UTF-8 | Python | false | false | 13,455 | py | dcgan_celeba_lightning.py | # -*- coding: utf-8 -*-
"""
Author: Ang Ming Liang
Please run the following command before running the script
wget -q https://raw.githubusercontent.com/sayantanauddy/vae_lightning/main/data.py
or curl https://raw.githubusercontent.com/sayantanauddy/vae_lightning/main/data.py > data.py
Then, make sure to get your kag... |
21aee623068c32901dfcd10da718b1fef21fc3ff | 32ebd1bf59f0e9be34363e3c9e34b10d2cf3eb9e | /2019/Reversing/BIGbadEASYvm/Admin/flag_gen.py | 46c454ed04fbb39ca6d2b76686feccd7383bc9ad | [] | no_license | teambi0s/InCTFi | d7fb450ec7b8b08e36dcee656d6111d9bd14127c | b249e5b41dba80bcbfc6ccd986c8fd64d8afa87c | refs/heads/master | 2022-07-22T09:54:58.393301 | 2021-08-19T18:14:40 | 2021-08-19T18:14:40 | 152,749,662 | 139 | 64 | null | 2022-07-05T22:14:31 | 2018-10-12T12:48:23 | CSS | UTF-8 | Python | false | false | 753 | py | flag_gen.py | import random
import time
random.seed(time.time())
s = '''mov cnt r2 {}
chk lt r1 r2
jmp chk 4095'''
s2 = '''mov cnt r2 {}
chk gt r1 r2
jmp chk 4095'''
flag = "inctf{1_kN0w_1t5_R3411y_3z_&_fuNNy_but_1ts_h0n3st_w0rk!}"
for letter in flag:
k = random.randrange(13,29)
f_loc = random.randrange(0,123) % k
f_l... |
39729318ce7ae70e9174b85c608f29fb0cc4e07a | 07e810873aa0134ba5017ccfef641d1038ca9b92 | /hs_core/hydroshare/utils.py | 24b92fdcc8f8a19cffdbd735a43cc2ad4a299667 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | hydroshare/hydroshare | 9093e6dce047a30d4b2b7720257a7841d209353f | 69855813052243c702c9b0108d2eac3f4f1a768f | refs/heads/develop | 2023-09-04T12:52:30.816709 | 2023-08-30T16:46:20 | 2023-08-30T16:46:20 | 24,703,136 | 207 | 57 | BSD-3-Clause | 2023-09-14T20:20:16 | 2014-10-02T02:19:41 | Python | UTF-8 | Python | false | false | 48,245 | py | utils.py | import mimetypes
import os
import tempfile
import logging
import shutil
import copy
from uuid import uuid4
from urllib.parse import quote
import errno
import urllib
import aiohttp
import asyncio
from asgiref.sync import sync_to_async
from urllib.request import pathname2url, url2pathname
from django.apps import apps
f... |
5674780aecfbeffa105efe82ffd1855c00461558 | a0eb6744e6f7f509b96d21f0bc8b3f8387f6861c | /notebook/test_main.py | c130833421d6b41566b15e0524b76f4f8fc595dd | [
"MIT"
] | permissive | nkmk/python-snippets | a6c66bdf999502e52f4795a3074ced63bf440817 | f9dd286a9cf93f474e20371f8fffc4732cb3c4d5 | refs/heads/master | 2023-08-03T04:20:05.606293 | 2023-07-26T13:21:11 | 2023-07-26T13:21:11 | 98,900,570 | 253 | 77 | MIT | 2020-10-25T01:12:53 | 2017-07-31T14:54:47 | Jupyter Notebook | UTF-8 | Python | false | false | 172 | py | test_main.py | import test_module
print('This is test_main.py')
print('test_module.__name__ is', test_module.__name__)
print('---')
print('call test_module.func()')
test_module.func()
|
f8d24578762c4b70183a493f19ddd3d6235cd75a | 81f2e2c5ae46c93a76dd612326089e1219e38694 | /utils/tests/test_method_timer.py | 0f9964ce17e0c5b51b30c069ff860a604ab1c07c | [
"MIT"
] | permissive | istresearch/scrapy-cluster | 02a4931f26b215efda1e4934c6e2a2421c2115a2 | 01861c2dca1563aab740417d315cc4ebf9b73f72 | refs/heads/dev | 2023-08-13T21:14:17.893387 | 2021-04-07T18:46:01 | 2021-04-07T18:46:01 | 33,957,281 | 1,220 | 408 | MIT | 2023-09-07T20:12:24 | 2015-04-14T21:12:04 | Python | UTF-8 | Python | false | false | 818 | py | test_method_timer.py | '''
Offline utility tests
'''
from unittest import TestCase
from scutils.method_timer import MethodTimer
import time
class TestMethodTimer(TestCase):
def test_under(self):
@MethodTimer.timeout(1, False)
def method():
time.sleep(0.5)
return True
result = method()
... |
7fbb661985a38a53975de4d93a9020aa9f0e1e06 | 119646d6e1f13582c577fd7b87c9654839a0b806 | /tests/spec/crm/test_products.py | 2748b64f4e7b5e83b9586c29afd4139cce5549d5 | [] | permissive | HubSpot/hubspot-api-python | 446daaceeb3a6ce27edcd0414603c6d4bc07e327 | d51a64c413461c0b82d8a41743e752d878747ca1 | refs/heads/master | 2023-08-31T09:52:56.583803 | 2023-08-07T11:00:27 | 2023-08-07T11:00:27 | 248,865,684 | 227 | 98 | Apache-2.0 | 2023-09-14T15:25:19 | 2020-03-20T22:41:24 | Python | UTF-8 | Python | false | false | 417 | py | test_products.py | from hubspot import HubSpot
from hubspot.crm.products import BasicApi, BatchApi, SearchApi, PublicObjectApi
def test_is_discoverable():
apis = HubSpot().crm.products
assert isinstance(apis.basic_api, BasicApi)
assert isinstance(apis.batch_api, BatchApi)
assert isinstance(apis.search_api, SearchApi)
... |
02bcf32fa881658071fd26597df124ccdcc8ffba | 6c8305ea1df9687df1c0d2b0ace56733516c6322 | /readthedocs/proxito/tests/test_headers.py | 2f8fd6626d6ca94c353772053c51b4fedf7114ae | [
"MIT"
] | permissive | readthedocs/readthedocs.org | 9806083aa744c2308267919480a692e1e003e45d | bf88ce6d1085d922322a5fadce63a22c5544c830 | refs/heads/main | 2023-09-05T20:22:34.281891 | 2023-09-05T12:41:52 | 2023-09-05T12:41:52 | 841,835 | 2,894 | 1,509 | MIT | 2023-09-14T20:36:00 | 2010-08-16T19:18:06 | Python | UTF-8 | Python | false | false | 8,839 | py | test_headers.py | import django_dynamic_fixture as fixture
from django.test import override_settings
from django.urls import reverse
from readthedocs.builds.constants import LATEST
from readthedocs.projects.models import Domain, HTTPHeader
from .base import BaseDocServing
@override_settings(
PUBLIC_DOMAIN="dev.readthedocs.io",
... |
279108c19e2dd074bb8092478daca9942a09626a | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/hybridcompute/v20220510preview/_enums.py | 3c91a2b34cccb2fcfa0d81b0d063de3abe84398e | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 945 | py | _enums.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'AssessmentModeTypes',
'PatchModeTypes',
'ResourceIdentityType',
'StatusLevelTypes',
]
class AssessmentModeTypes(str... |
973e4862a1c54da4efa6d5a10d8fe4adf9fb581a | 26cadb387da6dc71f5536b9d74ad44b7b974d26d | /launch_xml/test/launch_xml/test_include.py | 9fc23fc2e4a05ea6f915783e7573f4e1dddd686a | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ros2/launch | 84971e86f6131976bdfaf872fca12f1a6a377cd6 | f2b232555900d62c3cec839a49afd4cdc01cda58 | refs/heads/rolling | 2023-08-24T14:33:18.237122 | 2023-08-23T17:12:30 | 2023-08-23T17:12:30 | 32,485,326 | 116 | 139 | Apache-2.0 | 2023-09-14T12:07:30 | 2015-03-18T21:27:58 | Python | UTF-8 | Python | false | false | 1,666 | py | test_include.py | # Copyright 2019 Open Source Robotics Foundation, 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... |
e963ee93e3436e24020a235f4f07d25e6723f2df | 3afe7348e830a0c5139fb7cf393736e18b59ab4a | /src/clusterfuzz/_internal/tests/core/base/bisection_test.py | 04190fc5c4981965f47476ff0fbc66bada723be9 | [
"Apache-2.0"
] | permissive | google/clusterfuzz | 00845899e081dbbb89b70a75ce0b7eba3da73b02 | 6501a839b27a264500244f32bace8bee4d5cb9a2 | refs/heads/master | 2023-09-03T17:34:17.821599 | 2023-09-01T16:11:51 | 2023-09-01T16:11:51 | 168,060,021 | 5,420 | 639 | Apache-2.0 | 2023-09-13T16:40:54 | 2019-01-29T00:19:40 | Python | UTF-8 | Python | false | false | 7,933 | py | bisection_test.py | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
30719bb57fc34191a821577be22da73f4d605278 | c8f7773f80acf75345af37c67f0d925cf0234118 | /python_prototype/tir4.py | aa17a3e13b50fc125322b54e4b324ca31a203b08 | [
"MIT"
] | permissive | uglyDwarf/linuxtrack | 14a8854b826d57fa28ca276ec6ba5c54a1ddaa31 | fe9b98b51f6ee6521d38bd1f7edf84839227e588 | refs/heads/master | 2023-05-25T02:05:04.332165 | 2023-02-22T20:20:35 | 2023-02-22T20:20:35 | 39,029,490 | 156 | 35 | MIT | 2023-05-19T07:27:16 | 2015-07-13T18:21:31 | C | UTF-8 | Python | false | false | 19,721 | py | tir4.py | #! /usr/bin/python
# -*- coding: utf-8 -*-
##bc##################################################################
## (C) Copyright 2009, All Rights Reserved.
##
## Name : tir4.py
## Author : DT Austin
## Created : 07/02/2009
## SVN date : $Date$
##
################################################... |
40e9338e644bc04590fbe5fb08912f511f7ba059 | 93713f46f16f1e29b725f263da164fed24ebf8a8 | /Library/lib/python3.7/site-packages/networkx/algorithms/connectivity/edge_augmentation.py | a7f16aaa88538074a72405110553b138eedf7d3c | [
"BSD-3-Clause"
] | permissive | holzschu/Carnets | b83d15136d25db640cea023abb5c280b26a9620e | 1ad7ec05fb1e3676ac879585296c513c3ee50ef9 | refs/heads/master | 2023-02-20T12:05:14.980685 | 2023-02-13T15:59:23 | 2023-02-13T15:59:23 | 167,671,526 | 541 | 36 | BSD-3-Clause | 2022-11-29T03:08:22 | 2019-01-26T09:26:46 | Python | UTF-8 | Python | false | false | 45,102 | py | edge_augmentation.py | # -*- coding: utf-8 -*-
# Copyright (C) 2004-2019 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
#
# Authors: Jon Crall (erotemic@gmail.com)
"""
Algorithms for finding k-edge-augmentations
A k-edge-augmenta... |
9cbd0c5526e3319c81647104695fe0b54125698c | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /HLTriggerOffline/Egamma/test/testEmDQM_cfg.py | 90db91bc81ddf0165851a2fb530db0979bbe6661 | [
"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 | 3,172 | py | testEmDQM_cfg.py | import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester
process = cms.Process("emdqm")
process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = 'START72_V1::All'
process.load("FWCore.MessageService.MessageLogger_cfi")
#... |
b26457033e7b40855c77b3e4d44e7e680fc58722 | 0fad22883f6464f168e2c5046af3b0a48cdfa6c3 | /datasets/wflw.py | 8d9a9cd89f96b74ca175b2e0c0d9c5ee5bd16a9e | [
"MIT"
] | permissive | browatbn2/3FabRec | ca10cbe2f8efebb26afc1b0fcc74625b2d06cffd | c7668c2ffc39d74f41e6bff6e4ec05c687a0c888 | refs/heads/master | 2023-08-08T20:34:00.099589 | 2022-06-22T10:47:28 | 2022-06-22T10:47:28 | 251,210,646 | 131 | 20 | MIT | 2023-07-23T10:18:01 | 2020-03-30T05:32:09 | Python | UTF-8 | Python | false | false | 4,314 | py | wflw.py | import os
import numpy as np
import torch.utils.data as td
import pandas as pd
import config
from csl_common.utils import geometry
from datasets.facedataset import FaceDataset
SUBSETS = ['pose', 'illumination', 'expression', 'make-up', 'occlusion', 'blur']
class WFLW(FaceDataset):
NUM_LANDMARKS = 98
ALL_LAN... |
ca5ba18fd52f1ca72b58e91e188275f18b6c5d5c | a63d907ad63ba6705420a6fb2788196d1bd3763c | /src/api/dataflow/flow/tasks/deploy/job/job_handler.py | cabc8497634546540e3a863150f086fa9981de9d | [
"MIT"
] | permissive | Tencent/bk-base | a38461072811667dc2880a13a5232004fe771a4b | 6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2 | refs/heads/master | 2022-07-30T04:24:53.370661 | 2022-04-02T10:30:55 | 2022-04-02T10:30:55 | 381,257,882 | 101 | 51 | NOASSERTION | 2022-04-02T10:30:56 | 2021-06-29T06:10:01 | Python | UTF-8 | Python | false | false | 15,385 | py | job_handler.py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
------------------------------------------... |
6c11c1eb3e42819c5835e83f39d17c1db0b61051 | 263170e7dca79883314273bb35aef1449e018361 | /src/pynguin/analyses/__init__.py | 1493993821b2d34004fb726beec27663265c47f9 | [
"CC-BY-4.0",
"LGPL-2.1-or-later",
"MIT"
] | permissive | se2p/pynguin | 029cfd9c43c08a2f687a816749828054e409646e | cc083252c7054824bfaf200533a8b7ad45f7c4fb | refs/heads/main | 2023-08-23T16:58:04.568755 | 2023-08-18T13:11:44 | 2023-08-18T13:11:44 | 282,944,472 | 1,223 | 65 | MIT | 2023-08-18T13:12:29 | 2020-07-27T15:50:19 | Python | UTF-8 | Python | false | false | 183 | py | __init__.py | # This file is part of Pynguin.
#
# SPDX-FileCopyrightText: 2019-2023 Pynguin Contributors
#
# SPDX-License-Identifier: MIT
#
"""Provides analyses on the SUT needed by Pynguin."""
|
87612311b829922f4905603cf86284daf6a35012 | 4caa087dcb95a6a7dbe8cc49fde383e9f2aa4426 | /mmtrack/datasets/reid_dataset.py | 5ab20fb733d20a641521bcbb2dce25a9cbaf0569 | [
"Apache-2.0"
] | permissive | open-mmlab/mmtracking | 1e55c69cc1a264b3c9546c19332a38e9621430ed | e79491ec8f0b8c86fda947fbaaa824c66ab2a991 | refs/heads/master | 2023-09-01T15:41:04.322684 | 2023-04-25T13:25:18 | 2023-04-25T13:25:18 | 291,213,368 | 3,263 | 604 | Apache-2.0 | 2023-08-26T04:05:00 | 2020-08-29T06:16:56 | Python | UTF-8 | Python | false | false | 7,604 | py | reid_dataset.py | # Copyright (c) OpenMMLab. All rights reserved.
import copy
from collections import defaultdict
import numpy as np
import torch
from mmcls.datasets import BaseDataset
from mmdet.datasets import DATASETS
from mmdet.datasets.pipelines import Compose
@DATASETS.register_module()
class ReIDDataset(BaseDataset):
"""Da... |
822d74047dc5eaf176a3a714894515d08ffbc018 | 94d3ef554f7931d2aad799eb6bcfa18104dc9bed | /ndlib/models/opinions/MajorityRuleModel.py | fa56098cad5ea21a48e805ab4ede036683544e2b | [
"BSD-2-Clause"
] | permissive | GiulioRossetti/ndlib | 76b5a86a2b521cd68197218aea235e20bcb8d1f4 | 900cb3727795c97a73e59fdb736aa736c4d17157 | refs/heads/master | 2023-09-03T17:09:00.069129 | 2023-07-21T13:57:29 | 2023-07-21T13:57:29 | 59,556,819 | 265 | 82 | BSD-2-Clause | 2023-08-17T03:54:33 | 2016-05-24T08:53:47 | Python | UTF-8 | Python | false | false | 3,802 | py | MajorityRuleModel.py | from ..DiffusionModel import DiffusionModel
import numpy as np
__author__ = "Alina Sirbu"
__email__ = "alina.sirbu@unipi.it"
class MajorityRuleModel(DiffusionModel):
""" """
def __init__(self, graph, seed=None):
"""
Model Constructor
:param graph: A networkx graph object
"""... |
763ef31a254c3bda17b307fbcfae7468326ccfb6 | daf4e74748a639c53b6ecb2415aa155f85f70cbc | /examples/benchmarks/chunking_benchmark.py | 18bd62b3c3c22b7ad690a7e9e25289f4d09664f8 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | alexandrainst/danlp | e3f10f2947a23ff8b08db559265a144d2daf3fa4 | a1e9fa70fc5a3ae7ff78877062da3a8a8da80758 | refs/heads/master | 2023-06-23T08:29:18.552687 | 2022-02-22T09:34:16 | 2022-02-22T09:34:16 | 193,449,903 | 205 | 43 | BSD-3-Clause | 2023-06-12T21:50:50 | 2019-06-24T06:47:49 | Python | UTF-8 | Python | false | false | 2,032 | py | chunking_benchmark.py |
import time
import os
from danlp.datasets import DDT
from danlp.models import load_spacy_chunking_model, get_noun_chunks
from spacy.tokens.doc import Doc
from spacy.gold import read_json_object
from utils import print_speed_performance, f1_report
chunker = load_spacy_chunking_model()
def load_test_with_spacy(ddt... |
e6001ab48036f4ebf314f9fb7711e4fa98e10f93 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/grit/PRESUBMIT.py | 91cb8a26e7eaa09020dc3474a459574e823b58b4 | [
"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 | 845 | py | PRESUBMIT.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.
"""grit unittests presubmit script.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for
details on the presubmit API built into gcl.
"""
def RunUnit... |
8eb5c25d9b2b3e6cc253d19eceb923cd42703c90 | 3750387e046dfd287d02decc846860fae874bf3e | /tools/configen/tests/test_modules/__init__.py | 0de1ec2dee1c8bf205b77d4c1cabcc4c9e43de8e | [
"MIT"
] | permissive | facebookresearch/hydra | baf152caa30cd1d8a7e76ba2111fb9a49ecbe18c | b5ff66134f268164a20712d18b1230f4dd737444 | refs/heads/main | 2023-08-28T02:33:18.063795 | 2023-07-25T17:58:43 | 2023-07-25T17:58:43 | 191,632,914 | 7,667 | 692 | MIT | 2023-09-11T15:38:52 | 2019-06-12T19:33:15 | Python | UTF-8 | Python | false | false | 5,324 | py | __init__.py | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from dataclasses import dataclass, field
from enum import Enum
from typing import Dict, List, Optional, Tuple, Union
from omegaconf import MISSING
class Color(Enum):
RED = 0
GREEN = 1
BLUE = 2
@dataclass
class User:
name: str = ... |
ab833ed5d96b2e4bbf41bca2d4552b6b729b7f8f | e98c36ecaa7d1d4ece30143ae58dbbf020f8072a | /samples/Qiskit/ch02_02_random_byte.py | c96131d0b2fbd9ba57bd696efc56c8e0e5e411b0 | [] | no_license | oreilly-qc/oreilly-qc.github.io | a01e7652b1ff5635d550844c58b3703dee4c059d | ade464819dc08d56630a597fe20f9b1bcab4883c | refs/heads/master | 2022-11-30T16:05:12.382414 | 2022-11-26T18:17:45 | 2022-11-26T18:17:45 | 166,602,053 | 125 | 66 | null | 2022-10-05T16:38:10 | 2019-01-19T22:54:04 | HTML | UTF-8 | Python | false | false | 1,152 | py | ch02_02_random_byte.py | ## Programming Quantum Computers
## by Eric Johnston, Nic Harrigan and Mercedes Gimeno-Segovia
## O'Reilly Media
##
## More samples like this can be found at http://oreilly-qc.github.io
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute, Aer, IBMQ, BasicAer
import math
## Uncomment the ... |
7152bc94577bbed2e179e6eabfacd79aa54d99aa | 32ef8d7b826185e15fa28fe198f35fe1ebb2e0bc | /sendgrid/helpers/mail/content_id.py | 0fff301070a93dbded20881cca2bc2187e9910e5 | [
"MIT"
] | permissive | sendgrid/sendgrid-python | 2165eaa7c0b02bb69143f049252e1303c5752a2c | 2fe145956a1ee50355f5da8deab401e1e118c736 | refs/heads/main | 2023-08-30T18:42:42.884191 | 2023-04-17T08:48:43 | 2023-04-17T08:48:43 | 3,546,794 | 1,470 | 826 | MIT | 2023-08-22T23:45:51 | 2012-02-25T19:10:40 | Python | UTF-8 | Python | false | false | 1,718 | py | content_id.py | class ContentId(object):
"""The ContentId of an Attachment."""
def __init__(self, content_id=None):
"""Create a ContentId object
:param content_id: The content id for the attachment.
This is used when the Disposition is set to "inline"
and ... |
f382a7110c35ec529e72844847334f18e7d80c96 | 6c8305ea1df9687df1c0d2b0ace56733516c6322 | /readthedocs/builds/migrations/0027_add_privacy_level_automation_rules.py | b9816f7e80ef14a5c024c2911f0bb56b13c2c6c9 | [
"MIT"
] | permissive | readthedocs/readthedocs.org | 9806083aa744c2308267919480a692e1e003e45d | bf88ce6d1085d922322a5fadce63a22c5544c830 | refs/heads/main | 2023-09-05T20:22:34.281891 | 2023-09-05T12:41:52 | 2023-09-05T12:41:52 | 841,835 | 2,894 | 1,509 | MIT | 2023-09-14T20:36:00 | 2010-08-16T19:18:06 | Python | UTF-8 | Python | false | false | 920 | py | 0027_add_privacy_level_automation_rules.py | # Generated by Django 2.2.12 on 2020-07-08 23:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("builds", "0026_add_hide_version_automation_rule"),
]
operations = [
migrations.AlterField(
model_name="versionautomationrule",
... |
15682d2f3ef088a4a6c26ef2f9c0c957e097d97f | ad1d46b4ec75ef1f00520ff246d0706c6bb7770e | /content/tutorials/kerning-heat-map/kerningHeatMap.py | 055677bff4aacb1e0f9b43e19b1f34bfa3ee7b64 | [] | no_license | roberto-arista/PythonForDesigners | 036f69bae73095b6f49254255fc473a8ab7ee7bb | 1a781ea7c7ee21e9c64771ba3bf5634ad550692c | refs/heads/master | 2022-02-24T15:28:04.167558 | 2021-09-07T10:37:01 | 2021-09-07T10:37:01 | 168,937,263 | 103 | 37 | null | 2022-02-11T02:24:01 | 2019-02-03T11:17:51 | Python | UTF-8 | Python | false | false | 3,338 | py | kerningHeatMap.py | ### Modules
# from project folder
from flatKerningDefault import flatKerning
# dependencies
from drawBot import font, fill, stroke
from drawBot import savedState, translate
from drawBot import text, rect, textSize, newPage
from fontParts.world import OpenFont
# from std library
from itertools import product
from stri... |
fb52f12e9adfe84ae2b39ed1bfb6c6be28c52406 | 68fc65f2d27495ef251629c351018dfb9c67d2c5 | /examples/usage_with_zipimport.py | 7e37da1f9c3ac1320aa78ac3c8735920994aaa85 | [
"NAIST-2003",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mocobeta/janome | 5f1b7ec2046d3916069ebeefce35ce98102c4205 | 9d82248e0c0815e367b9604d83ef0de198e017bc | refs/heads/master | 2023-07-12T22:48:47.528908 | 2023-07-01T11:31:23 | 2023-07-01T11:31:23 | 30,792,770 | 837 | 69 | Apache-2.0 | 2023-07-01T11:25:28 | 2015-02-14T09:47:00 | Python | UTF-8 | Python | false | false | 1,191 | py | usage_with_zipimport.py | """
This was contributed by @roy-freee.
zipアーカイブから直接ロードする方法
準備: wheelを作る(手動でパッケージをzip圧縮してもいい)
$ pip wheel . --no-deps --no-binary
もしくは、
$ python setup.py bdist_wheel --universal
出来上がった.whlファイルを使う
[制限事項] mmap=False を指定した場合のみ有効です。(NEologd 同梱 janome に zip import は適用できません。)
How to import the zip archive
You first buil... |
34d18806c61f8c45c06ea5606a679a4171739735 | 5e9576c368e98927e2965bd2fb23bd35d9993d69 | /featuretools/primitives/standard/transform/full_name_to_last_name.py | aa2b2bbaa7ebde292168ec87151bea413ea7323f | [
"BSD-3-Clause"
] | permissive | alteryx/featuretools | c6e319e063e8e84e7684bf232376f95dc5272160 | c284c2d27a95b81e0bae913ac90df2b02c8f3b37 | refs/heads/main | 2023-08-25T12:21:33.945418 | 2023-08-23T16:30:25 | 2023-08-23T16:30:25 | 102,908,804 | 1,783 | 201 | BSD-3-Clause | 2023-09-07T18:53:19 | 2017-09-08T22:15:17 | Python | UTF-8 | Python | false | false | 1,803 | py | full_name_to_last_name.py | import pandas as pd
from woodwork.column_schema import ColumnSchema
from woodwork.logical_types import Categorical, PersonFullName
from featuretools.primitives.base import TransformPrimitive
class FullNameToLastName(TransformPrimitive):
"""Determines the first name from a person's name.
Description:
... |
257b3a2ead4bbf916b884845cf0138ab8aaa11f9 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/python/mindspore/profiler/parser/framework_struct.py | 370068f5e58eaa36e0dece06a34c02aedf40c08e | [
"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 | 2,266 | py | framework_struct.py | # Copyright 2021 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.