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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0c526c56c00ba208f758cf4422bfebbfe602bd20 | 0760fb4901a75766921a205b55686d6d6f049b30 | /rllib/execution/train_ops.py | c71f9fc3482654cd316c34f7bbf8a52c52ae0d6a | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 8,161 | py | train_ops.py | import logging
import numpy as np
import math
from typing import Dict
from ray.rllib.execution.common import (
LEARN_ON_BATCH_TIMER,
LOAD_BATCH_TIMER,
)
from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
from ray.rllib.utils.annotations import DeveloperAPI
from ray.rllib.utils.framework import try_imp... |
f8d2928388e17c5cfc291176f47964c79425e9ee | 1063bc07ba3331808812499af980c30aa4becca4 | /canvas_grab/planner.py | 108fa8a1fca6c045f6d43781fee1bd840f5d61fb | [
"MIT"
] | permissive | skyzh/canvas_grab | ab3a8d55bffe9009211113c28d793b51290015f1 | 2c2b2d79def5f12564aae7d2034e8b3f4066db16 | refs/heads/master | 2022-09-22T18:23:58.342682 | 2022-09-12T17:02:19 | 2022-09-12T17:02:19 | 244,135,442 | 214 | 46 | MIT | 2023-09-09T02:35:44 | 2020-03-01T11:19:02 | Python | UTF-8 | Python | false | false | 1,788 | py | planner.py | from .snapshot import SnapshotFile, SnapshotLink
class Planner(object):
"""Planner generates a transfer plan from two snapshots
"""
def __init__(self, remove_local_file):
self.remove_local_file = remove_local_file
def plan(self, snapshot_from, snapshot_to, file_filter):
"""plan a tra... |
cc70b20e1d73aae84666105a9ecaf310e8e9d333 | afd2087e80478010d9df66e78280f75e1ff17d45 | /torch/utils/_python_dispatch.py | 32b2620ee02328d479ad54956bc8bde3aa01e93e | [
"BSD-3-Clause",
"BSD-2-Clause",
"LicenseRef-scancode-secret-labs-2011",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | pytorch/pytorch | 7521ac50c47d18b916ae47a6592c4646c2cb69b5 | a6f7dd4707ac116c0f5fb5f44f42429f38d23ab4 | refs/heads/main | 2023-08-03T05:05:02.822937 | 2023-08-03T00:40:33 | 2023-08-03T04:14:52 | 65,600,975 | 77,092 | 24,610 | NOASSERTION | 2023-09-14T21:58:39 | 2016-08-13T05:26:41 | Python | UTF-8 | Python | false | false | 5,602 | py | _python_dispatch.py | import contextlib
from typing import Optional
import warnings
import torch
from torch._C import _len_torch_dispatch_stack, _get_dispatch_stack_at,\
_pop_torch_dispatch_stack, _push_on_torch_dispatch_stack, DispatchKey
# TODO: Limitations and things about enable_torch_dispatch_mode we should fix before exposing i... |
3e7abeb488e927af85b9d91e4d693a423c3a7762 | f0f07a94d3876779d27c6b01e2c08c08391fbafb | /tensorflow_model_analysis/api/tfma_unit.py | e5d8dab3ce593933b5aa0eaf34d3c3eae922b6a0 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | tensorflow/model-analysis | 4ec2f637a657d49aa503f2f047bed45b82c93f7b | ee0d8eff562bfe068a3ffdc4da0472cc90adaf41 | refs/heads/master | 2023-08-18T22:51:47.404027 | 2023-08-17T22:39:56 | 2023-08-17T22:40:27 | 126,528,713 | 1,200 | 313 | Apache-2.0 | 2023-08-14T20:18:27 | 2018-03-23T19:08:49 | Python | UTF-8 | Python | false | false | 16,375 | py | tfma_unit.py | # Copyright 2018 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
e8c83c1ceb06e5eaf5eea8ff9e83242b26f71035 | 542f898adea1b36d627d4bf437731022f242d2dd | /configs/new_baselines/mask_rcnn_regnety_4gf_dds_FPN_200ep_LSJ.py | b867cc865e5ac4d7b70221da141894efd7cbd75c | [
"Apache-2.0"
] | permissive | facebookresearch/detectron2 | 24bf508e374a98a5e5d1bd4cc96556d5914215f4 | 80307d2d5e06f06a8a677cc2653f23a4c56402ac | refs/heads/main | 2023-08-30T17:00:01.293772 | 2023-08-25T22:10:24 | 2023-08-25T22:10:24 | 206,660,580 | 27,469 | 8,047 | Apache-2.0 | 2023-09-13T09:25:57 | 2019-09-05T21:30:20 | Python | UTF-8 | Python | false | false | 333 | py | mask_rcnn_regnety_4gf_dds_FPN_200ep_LSJ.py | from .mask_rcnn_regnety_4gf_dds_FPN_100ep_LSJ import (
dataloader,
lr_multiplier,
model,
optimizer,
train,
)
train.max_iter *= 2 # 100ep -> 200ep
lr_multiplier.scheduler.milestones = [
milestone * 2 for milestone in lr_multiplier.scheduler.milestones
]
lr_multiplier.scheduler.num_updates = tr... |
72eb5e7e625cf13b66490eb78cb10c4f0116c2f0 | 4d28185e7a78a569f9a449f39f183cac3024f711 | /packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py | 088a66c71c5cafa18f0bae2e9fa013e5664d1bbe | [
"NCSA",
"Apache-2.0",
"LLVM-exception"
] | permissive | apple/swift-lldb | 2789bf44f648609a1674ee520ac20b64c95de072 | d74be846ef3e62de946df343e8c234bde93a8912 | refs/heads/stable | 2023-04-06T00:28:15.882479 | 2019-10-25T22:46:59 | 2019-10-25T22:46:59 | 44,838,862 | 780 | 291 | Apache-2.0 | 2020-01-10T19:28:43 | 2015-10-23T21:13:18 | C++ | UTF-8 | Python | false | false | 1,341 | py | TestSectionAPI.py | """
Test SBSection APIs.
"""
from __future__ import print_function
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class SectionAPITestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
@add_test_categories(['pyapi'])
def test_ge... |
e0c6ad5c3ba067120f1cdc9edbc3d0c212e322c5 | 3bb9fb3e0096f2e08259fc0cb244dfca61385b6b | /deepbgc/models/wrapper.py | 67bea60a9ac1b7cb19011a4d6bb7742e05f42fd0 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0",
"Python-2.0",
"LicenseRef-scancode-biopython",
"GPL-3.0-only"
] | permissive | Merck/deepbgc | d95545c74f99a2e0e16c5eb24b12f37ff0d280b3 | bd653ad3fa578f12f8004c9df390f9faa782bb08 | refs/heads/master | 2023-01-12T23:16:16.373478 | 2022-12-16T19:26:22 | 2022-12-16T19:26:22 | 162,141,645 | 105 | 33 | MIT | 2022-09-06T22:59:12 | 2018-12-17T14:19:43 | Python | UTF-8 | Python | false | false | 8,677 | py | wrapper.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# David Prihoda
# Wrapper for a BGC detection model than handles feature transformation and loading model definitions from JSON
from __future__ import (
print_function,
division,
absolute_import,
)
import logging
import six
from deepbgc import models, features,... |
febda0db237d16fd5f74e8c8105ebddc08a4b538 | 05fe579c12f0013ce83a106083ddb66ace5e8f47 | /tests/utils/log_operations.py | 2f800d247cf18d506daafe34abd3ba345ba3d27a | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"BSD-3-Clause"
] | permissive | mindspore-ai/mindinsight | 59d3f47144ada9a12d2c82d9826ad5f5288aed78 | a774d893fb2f21dbc3edb5cd89f9e6eec274ebf1 | refs/heads/master | 2023-07-22T22:46:43.075617 | 2023-07-17T11:26:58 | 2023-07-17T11:26:58 | 250,692,948 | 224 | 24 | Apache-2.0 | 2020-12-29T12:22:51 | 2020-03-28T01:58:56 | Python | UTF-8 | Python | false | false | 7,318 | py | log_operations.py | # Copyright 2019-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 agre... |
58a99775abd5260a43c93535c74fea040bb02958 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Geometry/GEMGeometry/test/runGEMDetIdAnalysis_cfg.py | a7be075f6538ff85d28b8126620b01c2dbc29896 | [
"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 | 870 | py | runGEMDetIdAnalysis_cfg.py | import FWCore.ParameterSet.Config as cms
from Configuration.StandardSequences.Eras import eras
process = cms.Process('PROD',eras.Phase2C4)
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('DataFormats.MuonDetId.gemDetIdAnalyzer_cfi')
if hasattr(process,'MessageLogger'):
process.MessageLogger.G... |
15dd74c26f217b6111ba84421ef0275dcc9ad8e7 | cbb0bd995f5ecb64f93a30d5f1dcd106e3241214 | /Compiler/floatingpoint.py | bd5c13844fcdff97e9b93f9472b1903a198a53e6 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | data61/MP-SPDZ | 324010a4caaa403f64d769a276d58931e0ed274e | 5c26feece05e13387fc9bd2ef3f09b2735d6ea4b | refs/heads/master | 2023-08-10T01:25:33.653174 | 2023-08-09T02:13:34 | 2023-08-09T02:13:34 | 152,511,277 | 724 | 277 | NOASSERTION | 2023-07-21T04:43:18 | 2018-10-11T01:16:16 | C++ | UTF-8 | Python | false | false | 24,014 | py | floatingpoint.py | import math
from math import log, floor, ceil
from Compiler.instructions import *
from . import types
from . import comparison
from . import program
from . import util
from . import instructions_base
##
## Helper functions for floating point arithmetic
##
def two_power(n):
if isinstance(n, int) an... |
cc78939f353dee48f2355561a3f8b4eb799fd833 | 40e5847e3d0302af01af9f5595f6cc12e7ca08c4 | /main_test.py | caacea0256ff88c1f53d760cc86ae60f99c3b50a | [] | no_license | le-liang/MARLspectrumSharingV2X | 4c52b43d0b5016c8107dd98cf777534226f1274b | 5626e1ad90352e8fb5a520d3d7c558612a4cfe42 | refs/heads/master | 2023-03-05T21:39:25.278890 | 2023-02-23T12:22:18 | 2023-02-23T12:22:18 | 174,652,256 | 185 | 87 | null | null | null | null | UTF-8 | Python | false | false | 23,159 | py | main_test.py | from __future__ import division, print_function
import random
import scipy
import scipy.io
import numpy as np
import tensorflow as tf
import Environment_marl_test
import os
from replay_memory import ReplayMemory
import sys
my_config = tf.ConfigProto()
my_config.gpu_options.allow_growth=True
class Agent(object):
d... |
260db06e3678aa531c6ead2921e173a5b29ba243 | 42a7b596cd3d8700631c3b83f6fc16e536b35ec1 | /jsonpatch.py | d3fc26d51c53006fecd09ff7a31e10ef01883f25 | [
"BSD-3-Clause"
] | permissive | stefankoegl/python-json-patch | 1c7f9353b44c83f069101ff6e5cc1099225c4155 | 73c36f2c4776c008cd4e750f5240e06dfdc918fc | refs/heads/master | 2023-07-06T00:06:52.183696 | 2023-06-28T04:01:39 | 2023-06-28T04:01:39 | 1,915,437 | 309 | 84 | BSD-3-Clause | 2023-06-28T04:01:40 | 2011-06-18T12:03:47 | Python | UTF-8 | Python | false | false | 29,778 | py | jsonpatch.py | # -*- coding: utf-8 -*-
#
# python-json-patch - An implementation of the JSON Patch format
# https://github.com/stefankoegl/python-json-patch
#
# Copyright (c) 2011 Stefan Kögl <stefan@skoegl.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted... |
d870291877029e7f05fc790fb3d5e65a4333082a | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-hss/huaweicloudsdkhss/v5/model/show_asset_statistic_response.py | c1f6ff8240ed33a099af611e616023c99546d435 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 10,544 | py | show_asset_statistic_response.py | # coding: utf-8
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ShowAssetStatisticResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and ... |
1587e9609833149d1bf62ded35ec5a7384040c06 | 10d495c139f6556d27f8dfe34c4ee348b1803b64 | /src/snowflake/connector/s3_storage_client.py | 0df5fd84f18bc24623331f53f0f67b4f05e6ea77 | [
"Apache-2.0",
"MIT"
] | permissive | snowflakedb/snowflake-connector-python | a5544f53d68a7a8d9be80ddf6e3cd34412610e8b | da1ae4ed1e940e4210348c59c9c660ebaa78fc2e | refs/heads/main | 2023-09-01T19:50:39.864458 | 2023-08-31T20:06:56 | 2023-08-31T20:06:56 | 62,262,074 | 492 | 494 | Apache-2.0 | 2023-09-14T10:02:00 | 2016-06-29T22:29:53 | Python | UTF-8 | Python | false | false | 21,830 | py | s3_storage_client.py | #
# Copyright (c) 2012-2023 Snowflake Computing Inc. All rights reserved.
#
from __future__ import annotations
import binascii
import re
import xml.etree.ElementTree as ET
from datetime import datetime
from io import IOBase
from logging import getLogger
from operator import itemgetter
from typing import TYPE_CHECKING... |
78e98e0876df8887e9f44d01e07a6660bfa2ed8d | 378c63f88e266b35aa07f2691de768bd55f12637 | /godmode/database/base.py | eaf1dbe6d7506c0fcda4f3377f17386379c7d9b7 | [
"WTFPL"
] | permissive | vas3k/GodMode2 | a55ba1a177e48743eb36ae808e1238858a96dab9 | d8a79b45c6d8b94f3d2af3113428a87d148d20d0 | refs/heads/public | 2023-05-12T00:27:34.315970 | 2021-09-08T12:05:52 | 2021-09-08T12:05:52 | 63,632,563 | 291 | 22 | WTFPL | 2023-05-01T20:52:43 | 2016-07-18T19:52:52 | CSS | UTF-8 | Python | false | false | 786 | py | base.py | import hashlib
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from sqlalchemy.pool import QueuePool
import settings
class BaseDatabase:
def __init__(self, dsn: str, **kwargs):
self.dsn = dsn
self.engine = sa.create_engine(
... |
08ee3ae89ed9cc9e57af7d0d9432f148cfe3fe8f | dcd772f567ef8a8a1173a9f437cd68f211fb9362 | /ravenframework/JobHandler.py | b851deff43f2d1e82a66546aa4bf37a757e2524c | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | idaholab/raven | 39cdce98ad916c638399232cdc01a9be00e200a2 | 2b16e7aa3325fe84cab2477947a951414c635381 | refs/heads/devel | 2023-08-31T08:40:16.653099 | 2023-08-29T16:21:51 | 2023-08-29T16:21:51 | 85,989,537 | 201 | 126 | Apache-2.0 | 2023-09-13T21:55:43 | 2017-03-23T19:29:27 | C++ | UTF-8 | Python | false | false | 54,365 | py | JobHandler.py |
# Copyright 2017 Battelle Energy Alliance, 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 ... |
d4bf7889af1cc0c39402364804440611065d5990 | 2bb7bc07df02a17735c2cacc7b2ba0c6de77b63c | /tron/bin/recover_batch.py | a92b8ccbc8dedd2602e7636f2b88dfba4a8d96ce | [
"Apache-2.0"
] | permissive | Yelp/Tron | 2c30a301055a732c3b33a39e05dbdcfc84ac8e02 | 958a2e22a6ac733cba043bc4238f3bf2b8048f4b | refs/heads/master | 2023-08-29T11:35:11.716532 | 2023-08-21T19:27:45 | 2023-08-21T19:27:45 | 899,771 | 226 | 53 | NOASSERTION | 2023-08-21T19:26:45 | 2010-09-09T20:54:04 | Python | UTF-8 | Python | false | false | 2,982 | py | recover_batch.py | #!/usr/bin/env python3.6
import argparse
import logging
import signal
import sys
from queue import Queue
import psutil
from twisted.internet import inotify
from twisted.internet import reactor
from twisted.python import filepath
from tron import yaml
log = logging.getLogger("tron.recover_batch")
class StatusFileWa... |
ba58784a7a072b1ae38ec319806240e7930b742b | 944a49e62bc79622fe01abee62403397a1b0504d | /openstackclient/tests/unit/volume/v2/test_backup_record.py | 4933af16a74342c7d0521a6a06ed33abe69d9d15 | [
"Apache-2.0"
] | permissive | openstack/python-openstackclient | 1c22984f9b29ae8ff9bbea26067981e2130ed039 | 78988d1786c0634ee055714910d1e6187f941673 | refs/heads/master | 2023-08-28T15:10:05.542862 | 2023-08-26T12:44:20 | 2023-08-26T12:44:20 | 4,170,310 | 286 | 224 | Apache-2.0 | 2022-09-19T13:29:49 | 2012-04-28T21:07:25 | Python | UTF-8 | Python | false | false | 3,729 | py | test_backup_record.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
# distr... |
5fd2ef96a8e6613469b8612f2766252605891b2f | bf8d344b17e2ff9b7e38ad9597d5ce0e3d4da062 | /ppdet/__init__.py | 6fcc982fb60c796e6b9b6e23026d50ef0e9611ae | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleDetection | e7e0f40bef75a4e0b6dcbacfafa7eb1969e44961 | bd83b98342b0a6bc8d8dcd5936233aeda1e32167 | refs/heads/release/2.6 | 2023-08-31T07:04:15.357051 | 2023-08-18T02:24:45 | 2023-08-18T02:24:45 | 217,475,193 | 12,523 | 3,096 | Apache-2.0 | 2023-09-10T10:05:56 | 2019-10-25T07:21:14 | Python | UTF-8 | Python | false | false | 1,039 | py | __init__.py | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
53e5dbda61ab8d856cf2d13c273481253de5ae1b | 52042672823e33dcb1a2291f2a134e09571e5909 | /moonlight/util/more_iter_tools_test.py | 480da513e58d34247b2e688f5abfbb38575cfdfa | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | tensorflow/moonlight | 1fcb859b7e76c89647f0ef96aade26c353896107 | d80279a3bf5d93f309ac6df2ec3baf47f29fa52a | refs/heads/master | 2023-08-23T22:35:21.400841 | 2022-06-02T19:24:07 | 2022-06-02T19:24:07 | 129,930,967 | 334 | 85 | Apache-2.0 | 2022-02-11T02:33:16 | 2018-04-17T16:05:02 | Python | UTF-8 | Python | false | false | 1,195 | py | more_iter_tools_test.py | """Tests for more_iter_tools."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import random
from absl.testing import absltest
from moonlight.util import more_iter_tools
import numpy as np
from six import moves
class MoreIterToolsTest(absltest.TestCase... |
cf1fbf0e4470f609e825889de59c727825cb5b60 | c3493b2d99ea73b71d6a930482a906c11432c568 | /muspy/inputs/note.py | c6dbaa3b30f9e492795c2ab20379d5b37189bc04 | [
"MIT"
] | permissive | salu133445/muspy | bdf1a1cc2d28e5fc8423ec7fe2e467fb0b67122c | b2d4265c6279e730903d8abe9dddda8484511903 | refs/heads/main | 2023-07-08T09:29:22.413086 | 2023-06-26T08:08:22 | 2023-06-26T08:08:22 | 247,167,654 | 380 | 54 | MIT | 2023-01-02T20:20:21 | 2020-03-13T21:53:38 | Python | UTF-8 | Python | false | false | 2,467 | py | note.py | """Note-based representation input interface."""
from operator import attrgetter
import numpy as np
from numpy import ndarray
from ..classes import DEFAULT_VELOCITY, Note, Track
from ..music import DEFAULT_RESOLUTION, Music
def from_note_representation(
array: ndarray,
resolution: int = DEFAULT_RESOLUTION,
... |
e82241e65fb84027fc41baf24fa2e5fc151c6ecd | 59864cbd213b5da6f50d6255b0a021564b3d5bd4 | /challenges/Audio_Visualizer/poller/for-release/machine.py | 130fe89207052dbb8b3abdc7dd6cc51f00c092d5 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-unknown",
"BSD-2-Clause"
] | permissive | trailofbits/cb-multios | 8af96a4fbc3b34644367faa135347f88e0e0d0a3 | 810d7b24b1f62f56ef49b148fe155b0d0629cad2 | refs/heads/master | 2023-09-05T03:56:20.229403 | 2022-12-27T15:47:54 | 2022-12-27T15:47:54 | 41,688,943 | 522 | 133 | MIT | 2023-06-29T02:47:13 | 2015-08-31T17:04:31 | C | UTF-8 | Python | false | false | 6,524 | py | machine.py | from generator.actions import Actions
import random
import string
import struct
#define MAX_MSGS 5
#define MAX_RCPT 16
#define MAX_ADDR_LEN 32
#define MAX_DATA 512
#define MAX_USER_LEN 64
#define MAX_PASS_LEN 64
#define MAX_LINE 64
def random_bad_input(max_size=10, min_size=2):
characters = string.letters + strin... |
912fc8871e184458ecba751c81601a28a4294d35 | 140e90b1cdc47650cc88637d79e122d0695a8105 | /pyrender/platforms/egl.py | ae2478d29c9a538c53ad83fa31f8e2277cd897c8 | [
"MIT"
] | permissive | mmatl/pyrender | 2d7a92cab4e134a65f98990549d98ef3c63aa668 | a59963ef890891656fd17c90e12d663233dcaa99 | refs/heads/master | 2023-07-10T17:31:50.861253 | 2022-04-30T19:40:43 | 2022-04-30T19:40:43 | 166,606,982 | 1,166 | 224 | MIT | 2023-04-06T08:09:08 | 2019-01-20T00:11:18 | Python | UTF-8 | Python | false | false | 6,615 | py | egl.py | import ctypes
import os
import OpenGL.platform
from .base import Platform
EGL_PLATFORM_DEVICE_EXT = 0x313F
EGL_DRM_DEVICE_FILE_EXT = 0x3233
def _ensure_egl_loaded():
plugin = OpenGL.platform.PlatformPlugin.by_name('egl')
if plugin is None:
raise RuntimeError("EGL platform plugin is not available.")... |
8b7959df4c968555e333913279fcc1d0ebcbc860 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /FWCore/Integration/test/ref_alias_compare_drop_original_cfg.py | c6ffa3f5715dd6229a48e5b4c63ba18b879fc3a6 | [
"Apache-2.0"
] | permissive | cms-sw/cmssw | 4ecd2c1105d59c66d385551230542c6615b9ab58 | 19c178740257eb48367778593da55dcad08b7a4f | refs/heads/master | 2023-08-23T21:57:42.491143 | 2023-08-22T20:22:40 | 2023-08-22T20:22:40 | 10,969,551 | 1,006 | 3,696 | Apache-2.0 | 2023-09-14T19:14:28 | 2013-06-26T14:09:07 | C++ | UTF-8 | Python | false | false | 1,546 | py | ref_alias_compare_drop_original_cfg.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("Test")
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(10))
process.source = cms.Source("EmptySource")
process.thing = cms.EDProducer("ThingProducer")
process.thingAlias = cms.EDAlias( thing = cms.VPSet(
... |
bea53f239bec18e6712a642e62da2a2be538149a | 61673ab9a42f7151de7337608c442fa6247f13bb | /pygame/GUI- widgets-SGC/sgc3/widgets/_locals.py | 7e261eae70c4ed6fc3af6d2a75e3e2d9bbe37211 | [
"MIT",
"BSD-2-Clause"
] | permissive | furas/python-examples | 22d101670ecd667a29376d7c7d7d86f8ec71f6cf | 95cb53b664f312e0830f010c0c96be94d4a4db90 | refs/heads/master | 2022-08-23T23:55:08.313936 | 2022-08-01T14:48:33 | 2022-08-01T14:48:33 | 45,575,296 | 176 | 91 | MIT | 2021-02-17T23:33:37 | 2015-11-04T23:54:32 | Python | UTF-8 | Python | false | false | 13,593 | py | _locals.py | # Copyright 2010-2012 the SGC project developers.
# See the LICENSE file at the top-level directory of this distribution
# and at http://program.sambull.org/sgc/license.html.
"""
A collection of things for widgets to use. These can be imported with a
`from _locals import *` line.
Constants:
GUI: Widgets should use ... |
318a4c8b1961a21aacca13220883c672d63d64c0 | a9ed175e2cf09ea29fe72b90dc4186ff9515c9b0 | /tests/integration/suite/test_password_store.py | 96f0709faef3df5d4759a37f7152aa889c176d7e | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | rancher/rancher | 96d67163506fa4ab219dca4d86d9bfebacb68a6d | 90fc68836fd8d1bd2996283500f954ace40203ba | refs/heads/release/v2.8 | 2023-08-29T06:23:12.480919 | 2023-08-28T21:35:36 | 2023-08-28T21:35:36 | 26,337,322 | 21,773 | 3,508 | Apache-2.0 | 2023-09-14T19:51:31 | 2014-11-07T20:49:31 | Go | UTF-8 | Python | false | false | 3,585 | py | test_password_store.py | from kubernetes.client import CustomObjectsApi
from kubernetes.client import CoreV1Api
from kubernetes.client.rest import ApiException
from .common import random_str
import base64
group = 'management.cattle.io'
version = 'v3'
namespace = 'local'
plural = 'clusterloggings'
clusterId = "local"
globalNS = "cattle-global-... |
06f9b2142cfaf056cb528b67c0cf25fe6b30ee41 | e726481820c477c2bcfcc2b03da3feda30b0beaf | /simplenote_cli/view_note.py | 37d6fbd90b7b736fa9fdb5ed29516442fd4b8d1f | [
"MIT"
] | permissive | insanum/sncli | 06c759e2893cdec5d5d8646043242d24a227696d | 0276a8b5de718b2f023f8ec574c98763bd96ce23 | refs/heads/master | 2023-08-29T13:38:17.125943 | 2023-06-19T00:35:55 | 2023-06-19T00:35:55 | 21,809,114 | 413 | 48 | MIT | 2023-02-28T19:04:24 | 2014-07-14T05:58:57 | Python | UTF-8 | Python | false | false | 8,936 | py | view_note.py |
# Copyright (c) 2014 Eric Davis
# Licensed under the MIT License
import time, urwid
from . import utils
import re
from .clipboard import Clipboard
import logging
class ViewNote(urwid.ListBox):
def __init__(self, config, args):
self.config = config
self.ndb = args['ndb']
self.key = args['... |
963fc73cb18d787513ae872e285e36502b4470a5 | 307d3837d31f9e3728af2b62ca51ebf63fe6ec6b | /hall_of_fame/kimdonghun/[BOJ]2525_OvenClock.py | f48978ad68d3b5f58ced15deeb4653d8d183de13 | [] | no_license | ellynhan/challenge100-codingtest-study | 905043497d154b8a7333ca536e536d013f6e7454 | bcdc6d04f13b12ba80b42e066f9d244d7c2cc698 | refs/heads/master | 2023-09-01T14:10:13.481013 | 2023-08-27T14:38:52 | 2023-08-27T14:38:52 | 401,561,230 | 162 | 176 | null | 2023-09-09T14:56:25 | 2021-08-31T03:30:36 | C++ | UTF-8 | Python | false | false | 196 | py | [BOJ]2525_OvenClock.py | import sys
A,B = map(int, sys.stdin.readline().split())
C = int(sys.stdin.readline())
min = B + C
hour_add = min // 60
min %= 60
hour = A + hour_add
hour %= 24
print(hour, min)
|
78b5a02c11f8adfb4999b42b0d2f0caeed1d631f | d110546d747d7e3865ce5742d5fca09f404623c0 | /salt/utils/dockermod/translate/network.py | a49f312ec59390d02391455d80593d1ef594f74f | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 4,143 | py | network.py | """
Functions to translate input for network creation
"""
from salt.exceptions import SaltInvocationError
from . import helpers
ALIASES = {
"driver_opt": "options",
"driver_opts": "options",
"ipv6": "enable_ipv6",
}
IPAM_ALIASES = {
"ip_range": "iprange",
"aux_address": "aux_addresses",
}
# ALIAS... |
5ead7b2e6b8f6a47b5854c4f0a6edd0f8051e7db | 6d7e44292e34bbc5e8cbc0eb9e9b264c0b498c5d | /modules/sfp_gravatar.py | 6b42f780410fd37fac07613f1ba4ee70b0f3edee | [
"Python-2.0",
"MIT"
] | permissive | smicallef/spiderfoot | 69585266dad860d3230d3ce7b801e34eeb359f90 | 6e8e6a8277ea251fdd62a0946268f5dfe9162817 | refs/heads/master | 2023-08-28T09:40:10.136780 | 2023-08-18T05:47:39 | 2023-08-18T05:47:39 | 4,165,675 | 10,620 | 2,130 | MIT | 2023-09-13T08:18:31 | 2012-04-28T07:10:13 | Python | UTF-8 | Python | false | false | 7,361 | py | sfp_gravatar.py | # -------------------------------------------------------------------------------
# Name: sfp_gravatar
# Purpose: SpiderFoot plug-in to search Gravatar API for an email address
# and retrieve user information, including username, name, phone
# numbers, additional email addresses, an... |
36a6cdff795ae65a19dd49610796f51a264d69bb | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/core/azure-core/azure/core/rest/_aiohttp.py | 64833e311c8624b2b1a4f9228647db21d11f233b | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 7,782 | py | _aiohttp.py | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""), ... |
cc0cc5342da1d3edd5b80466c36c553bd5456734 | 0f2b08b31fab269c77d4b14240b8746a3ba17d5e | /onnxruntime/test/testdata/transform/propagate_cast/gen_propagate_cast.py | dca1cbaf1d3d7174b5a4f73b7d254fb5b6c3ff9a | [
"MIT"
] | permissive | microsoft/onnxruntime | f75aa499496f4d0a07ab68ffa589d06f83b7db1d | 5e747071be882efd6b54d7a7421042e68dcd6aff | refs/heads/main | 2023-09-04T03:14:50.888927 | 2023-09-02T07:16:28 | 2023-09-02T07:16:28 | 156,939,672 | 9,912 | 2,451 | MIT | 2023-09-14T21:22:46 | 2018-11-10T02:22:53 | C++ | UTF-8 | Python | false | false | 15,042 | py | gen_propagate_cast.py | import itertools
import numpy as np
import onnx
from onnx import OperatorSetIdProto, TensorProto, helper
onnxdomain = OperatorSetIdProto()
onnxdomain.version = 12
# The empty string ("") or absence of this field implies the operator set that is defined as part of the ONNX specification.
onnxdomain.domain = ""
msdomai... |
c4b9d1865eaa564a484f58ad3f7a421ad3b606f0 | 828a277419095556f50b331da73e4a931be7b452 | /tests/unit/test_pathspec_math.py | 9cb3098568fec1ef6c3bc261a7586e68395f6a6e | [
"Apache-2.0"
] | permissive | iterative/dvc | 6b843492a680370054cddf5cf62c66b6808007ca | f47d21b0c29f5603bff09cc51c4a14a1bdf962c6 | refs/heads/main | 2023-09-02T17:14:25.412431 | 2023-08-31T23:17:17 | 2023-08-31T23:17:17 | 83,878,269 | 11,687 | 1,331 | Apache-2.0 | 2023-09-14T14:36:48 | 2017-03-04T08:16:33 | Python | UTF-8 | Python | false | false | 3,747 | py | test_pathspec_math.py | import pytest
from dvc.pathspec_math import PatternInfo, _change_dirname
@pytest.mark.parametrize(
"patterns, dirname, changed",
[
# A line starting with # serves as a comment.
("#comment", "/dir", "#comment"),
# Put a backslash ("\") in front of the first hash for patterns that
... |
d47a65f63ffcad64d329097be0afa7e5526ba11a | ba26fe339628554701cfd94ddb0afe217d2a9f4c | /retail/recommendation-system/bqml-scann/tfx_pipeline/bq_components.py | f4571a92971fc7b5ce634f65e8c518edad9b9cff | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | GoogleCloudPlatform/analytics-componentized-patterns | 8eb704a4de1b01705301ee41b80c9fb6724edce5 | 51329bab5c0e2812f07b1a4addf38c0a71a6939d | refs/heads/master | 2023-05-08T14:34:27.923955 | 2023-01-04T11:35:10 | 2023-01-04T11:35:10 | 282,664,606 | 157 | 90 | Apache-2.0 | 2023-05-01T22:25:19 | 2020-07-26T14:17:44 | Jupyter Notebook | UTF-8 | Python | false | false | 4,043 | py | bq_components.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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
25ca49b80140b27b4e2fbad70dc2973e43426066 | 5eb35e6fa9d0d7b28b3478cd932a867f2fcd66cd | /test/dlc_tests/sanity/quick_checks/test_dlc_developer_config.py | e06a3860e0dfe3916ad6c3a58e3b4438d35288bf | [
"Apache-2.0"
] | permissive | aws/deep-learning-containers | 3f4bc3fa0a27eca35c2faeac282a3fc2891e8d40 | ba76fa031f29e323a67b29c1d863db5c3d95084c | refs/heads/master | 2023-09-01T13:55:25.697898 | 2023-08-31T16:41:44 | 2023-08-31T16:41:44 | 234,634,164 | 811 | 434 | NOASSERTION | 2023-09-14T17:59:08 | 2020-01-17T20:52:43 | Python | UTF-8 | Python | false | false | 8,272 | py | test_dlc_developer_config.py | import pytest
from src import config
@pytest.mark.quick_checks
@pytest.mark.model("N/A")
@pytest.mark.integration("dlc_developer_config")
def test_developer_configuration():
"""
Ensure that defaults are set back to normal before merge
"""
# Check dev settings
assert config.parse_dlc_developer_con... |
3bb47f13d70fd35c606ed5770f0e651637ff7507 | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/pytests/unit/states/test_mac_xattr.py | a338467955e0c8b3cfb8cf0dcf3165b32fdc927f | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 4,180 | py | test_mac_xattr.py | import pytest
import salt.states.mac_xattr as xattr
from tests.support.mock import MagicMock, patch
@pytest.fixture
def configure_loader_modules():
return {xattr: {}}
def test_exists_not():
"""
Test adding an attribute when it doesn't exist
"""
with patch("os.path.exists") as exists_mock:
... |
1be328ce5c44dee6511ed3fc2a71c8aac962b5ad | 2c596f013d7ffb7415a1021fe58ef7fb2f8d5428 | /mem_usage_ui/snapshot.py | 96e8509d74113ee486cb9c20e4082ff68e7cb021 | [
"MIT"
] | permissive | parikls/mem_usage_ui | 11e4c5f86d1fbbc2e79a9baa7049d449a4cd0ec1 | e65177bcba4528bcfe15ff8a315b90e5def3530d | refs/heads/master | 2023-07-06T17:54:18.157766 | 2023-06-28T11:10:36 | 2023-06-28T11:10:36 | 164,311,793 | 138 | 6 | MIT | 2022-11-11T15:27:20 | 2019-01-06T13:52:57 | Python | UTF-8 | Python | false | false | 6,875 | py | snapshot.py | import asyncio
import getpass
import logging
from typing import Union, List, Dict
import psutil
from aiohttp.web_app import Application
from aiohttp.web_ws import WebSocketResponse
from psutil import Error
logger = logging.getLogger("mem_usage_ui")
class SnapshotProcessor:
"""
Main class for handling proces... |
795224a4498e4c555a68f39033b857e31d4bfcdf | 09724e5c0ad743b3cd4a4729bd15f5df6a467c25 | /rrd/view/index.py | 7c786c39d30c23734c69f1ee2bfa5e8b37c6b0eb | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | open-falcon/dashboard | c97478c7db99a6e2cd784155bc33c2799e657d6d | e98217f5003d5a12055215667e2b0a92395f20c1 | refs/heads/master | 2023-05-12T13:50:43.158398 | 2022-05-27T09:36:46 | 2022-05-27T09:36:46 | 35,652,835 | 404 | 317 | Apache-2.0 | 2023-02-15T21:49:16 | 2015-05-15T04:17:14 | JavaScript | UTF-8 | Python | false | false | 4,762 | py | index.py | #-*- coding:utf-8 -*-
# Copyright 2017 Xiaomi, 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... |
a3f2e4c7eb8661ea2de60aec91ffeda470647525 | 7bf0e3d4f4841db2d2df37c33e7e7fdff6b465e1 | /tsfresh/feature_extraction/data.py | 0174094549b83ef8ce4f7f62952c5b762e5a1e2a | [
"MIT"
] | permissive | blue-yonder/tsfresh | 6bacfff586db8e9bf2f3f5f096af9637e1a7518a | f3a6a7c6fc851ec0ab98e7f3a227c89ca41560af | refs/heads/main | 2023-08-30T15:16:01.905311 | 2023-08-03T21:07:06 | 2023-08-03T21:07:06 | 71,996,613 | 8,031 | 1,324 | MIT | 2023-09-13T01:13:42 | 2016-10-26T11:29:17 | Jupyter Notebook | UTF-8 | Python | false | false | 16,831 | py | data.py | import itertools
from collections import defaultdict, namedtuple
from typing import Iterable, Sized
import pandas as pd
try:
from dask import dataframe as dd
except ImportError: # pragma: no cover
dd = None
def _binding_helper(f, kwargs, column_sort, column_id, column_kind, column_value):
def wrapped_f... |
b21bcdcda60480469ebd3a4d6b843c87789bc13c | e60f402bb3adf22b086ba4cd707db050c9e93c80 | /src/pytest_recording/exceptions.py | c44fb2d809e3e628869303f96d5d8be3a558bd8d | [
"MIT"
] | permissive | kiwicom/pytest-recording | 8cbb45230b292316efe72c87c1501def3d96fde3 | 85c3ffa55e01d26ca0551bf6a9a3eacdd6c1d8a1 | refs/heads/master | 2023-08-20T02:25:40.548883 | 2023-07-31T23:36:35 | 2023-07-31T23:36:35 | 197,214,988 | 309 | 26 | MIT | 2023-09-04T16:50:25 | 2019-07-16T14:57:52 | Python | UTF-8 | Python | false | false | 91 | py | exceptions.py | class UsageError(Exception):
"""Error in plugin usage."""
__module__ = "builtins"
|
9429ea112671cdab5f049c15ec4c2c268a9a43f0 | 2ac03b8c24df220ea32ea525e1d65aeb294cd1a4 | /custom_components/waste_collection_schedule/waste_collection_schedule/source/iweb_itouchvision_com.py | 4c44f6b09211c5d2129445f3bae2da366e94dd58 | [
"MIT"
] | permissive | mampfes/hacs_waste_collection_schedule | a7b98319a7483dedc8cf78b724f93932934c1702 | 1dc9476efef9963a141b9ac987e2708224b9eaaf | refs/heads/master | 2023-08-16T21:14:46.088962 | 2023-08-16T10:05:24 | 2023-08-16T10:05:24 | 254,347,436 | 495 | 428 | MIT | 2023-09-12T18:59:07 | 2020-04-09T11:02:16 | Python | UTF-8 | Python | false | false | 8,345 | py | iweb_itouchvision_com.py | # Credit where it's due:
# This is predominantly a refactoring of the Somerset Council script from the UKBinCollectionData repo
# https://github.com/robbrad/UKBinCollectionData
import json
from datetime import datetime
import requests
from bs4 import BeautifulSoup
from waste_collection_schedule import Collection
TIT... |
fc7be47ae8d41bbfb73bef37b3a1ee3d9755b38a | 9ed4d46aedd4d4acadb48d610e940594b5b7b3fd | /other/activity_selection.py | 2cc08d9598622e8837bc76e5632bbb95721a6e6a | [
"MIT"
] | permissive | TheAlgorithms/Python | 7596a0e236ed12a61f9db19a7ea68309779cc85b | 421ace81edb0d9af3a173f4ca7e66cc900078c1d | refs/heads/master | 2023-09-01T17:32:20.190949 | 2023-08-29T13:18:10 | 2023-08-29T13:18:10 | 63,476,337 | 184,217 | 48,615 | MIT | 2023-09-14T02:05:29 | 2016-07-16T09:44:01 | Python | UTF-8 | Python | false | false | 1,253 | py | activity_selection.py | """The following implementation assumes that the activities
are already sorted according to their finish time"""
"""Prints a maximum set of activities that can be done by a
single person, one at a time"""
# n --> Total number of activities
# start[]--> An array that contains start time of all activities
# finish[] -->... |
0e7021a72df8271aa1aa39245f29ef4c4e2a0199 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/Pygments/py3/pygments/lexers/javascript.py | bc5e2e43cb8da41f277917e4d8d10a4648394088 | [
"Apache-2.0",
"BSD-2-Clause"
] | 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 | 62,859 | py | javascript.py | """
pygments.lexers.javascript
~~~~~~~~~~~~~~~~~~~~~~~~~~
Lexers for JavaScript and related languages.
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import bygroups, combined, default, do_insertions, i... |
f28934fb9a46ecf60aa1fbeba70cb48230866071 | 772e04b18f36fe1bffb05c16ef4eff3ba765fd13 | /sample_kg/network_prediction/script/split_graph.py | 314549bae6dbef36151ebd07d00f87321d6b98cc | [
"LicenseRef-scancode-other-permissive"
] | permissive | clinfo/kGCN | 3c74f552dd9d71d470a3173012b01733a1262688 | 32328d5a41e6ed7491b3edb705ff94658fc95d3f | refs/heads/master | 2023-08-16T19:43:17.149381 | 2023-08-03T00:08:11 | 2023-08-03T00:08:11 | 194,075,235 | 110 | 38 | NOASSERTION | 2022-02-04T17:09:55 | 2019-06-27T10:31:57 | Python | UTF-8 | Python | false | false | 6,732 | py | split_graph.py | import sys
import pandas as pd
from sklearn.model_selection import KFold
import argparse
def check_graph(filename):
print(f'\n== Check input data==\n'
f'[LOAD] input graph: {filename}')
graph = pd.read_table(filename, sep='\t', header=None)
if len(graph.columns) == 3:
graph.columns = ['n... |
e32157cdb35086c8901cfd86090a4748a37ff1e4 | f1872915f044e9bc8d6622d529535441ea8aec6a | /tools/setupHelpers.py | a6e5d884f8ddb9b3f125381daaaeda9d052af8bf | [
"MIT"
] | permissive | pyqtgraph/pyqtgraph | 5dc14ddd513f4f3fdd0e834aba720e61b122c886 | f261280905a74f6cae4a43e39fa1732635b25c63 | refs/heads/master | 2023-08-30T23:24:30.305478 | 2023-08-29T00:35:59 | 2023-08-29T00:35:59 | 12,777,496 | 3,432 | 1,184 | NOASSERTION | 2023-09-14T13:40:51 | 2013-09-12T07:18:21 | Python | UTF-8 | Python | false | false | 20,540 | py | setupHelpers.py | from contextlib import suppress
import json
import os
import re
import shutil
import subprocess
import sys
from distutils import core
from typing import Dict, Any
from .generateChangelog import generateDebianChangelog
# Maximum allowed repository size difference (in kB) following merge.
# This is used to prevent lar... |
67aafca8cc322769b86437c66b5bd40c4f64b30c | d4412fbe37540e2c4cbe59ed6503d3661ccb7d9c | /examples/tutorial/large_batch_optimizer/config.py | 2efa0ffd0556c6d245dea8e86ffc19cf5ab68cc3 | [
"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 | 314 | py | config.py | from colossalai.amp import AMP_TYPE
# hyperparameters
# BATCH_SIZE is as per GPU
# global batch size = BATCH_SIZE x data parallel size
BATCH_SIZE = 512
LEARNING_RATE = 3e-3
WEIGHT_DECAY = 0.3
NUM_EPOCHS = 2
WARMUP_EPOCHS = 1
# model config
NUM_CLASSES = 10
fp16 = dict(mode=AMP_TYPE.NAIVE)
clip_grad_norm = 1.0
|
cf0133a83d2520ee5a879d0fff1cd330ad8e8538 | b06340ae3dfcb551bacefa362c034b064809fd28 | /examples/test_example_functions_pass.py | 11c86fba3bc9489933e347dbfaad5a042c8da7b0 | [
"MIT"
] | permissive | okken/pytest-check | cd3b82ae31932d54550822abb6cc96fa6b4e7c88 | c7e7741e4d5665a07b0985932acc484aac2d5095 | refs/heads/main | 2023-08-19T09:10:40.776832 | 2023-08-11T20:44:36 | 2023-08-11T20:44:36 | 108,791,429 | 282 | 35 | MIT | 2023-08-11T20:37:17 | 2017-10-30T02:22:27 | Python | UTF-8 | Python | false | false | 1,718 | py | test_example_functions_pass.py | """
Passing versions of all of the check helper functions.
"""
from pytest_check import check
def test_equal():
check.equal(1, 1)
def test_not_equal():
check.not_equal(1, 2)
def test_is():
x = ["foo"]
y = x
check.is_(x, y)
def test_is_not():
x = ["foo"]
y = ["foo"]
check.is_not(x... |
934ba587f94fae781a9eb7ce23de4ebc29b185b3 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /chrome/browser/ui/ash/multi_user/DEPS | 8ce1ebc41777471427dfbdf40e42a0347dbfeca3 | [
"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 | 119 | DEPS | specific_include_rules = {
"multi_profile_support\.cc": [
"+components/app_restore/full_restore_utils.h",
],
}
| |
3966258e5292c676c7b915597b6e72fb72a0ff6c | af101b467134e10270bb72d02f41f07daa7f57d8 | /configs/controlnet_animation/anythingv3_config.py | b6159dc3780b69b764ca2902d9265dca226da503 | [
"Apache-2.0"
] | permissive | open-mmlab/mmagic | 4d864853417db300de4dfe7e83ce380fd1557a23 | a382f143c0fd20d227e1e5524831ba26a568190d | refs/heads/main | 2023-08-31T14:40:24.936423 | 2023-08-30T05:05:56 | 2023-08-30T05:05:56 | 203,999,962 | 1,370 | 192 | Apache-2.0 | 2023-09-14T11:39:18 | 2019-08-23T13:04:29 | Jupyter Notebook | UTF-8 | Python | false | false | 1,331 | py | anythingv3_config.py | # config for model
stable_diffusion_v15_url = 'Linaqruf/anything-v3.0'
controlnet_hed_url = 'lllyasviel/sd-controlnet-hed'
control_detector = 'lllyasviel/ControlNet'
control_scheduler = 'UniPCMultistepScheduler'
# method type : 'multi-frame rendering' or 'attention_injection'
inference_method = 'attention_injection'
... |
889a9688578fc2a3208716e742dbfcba72086e7b | 5fdfa2069b1aa05f61852b498328366d3dcfeb2a | /2021_11_10/dojo_test.py | 7aea3ec61babe7734bb33f4f7afcefc6d1b2e986 | [
"MIT"
] | permissive | globocom/dojo | 5110b5ed86734d49fd0934d8701d5016e7e27e0d | 8df96c932f61645e9717197e5b58ca60909c7fc1 | refs/heads/master | 2022-07-21T17:59:16.133549 | 2022-06-22T18:17:01 | 2022-06-22T18:17:01 | 2,145,424 | 121 | 40 | MIT | 2022-02-17T17:21:46 | 2011-08-02T22:11:54 | JavaScript | UTF-8 | Python | false | false | 1,004 | py | dojo_test.py | import unittest
from dojo import permutation, hashme
class DojoTest(unittest.TestCase):
def test_check_permutation_two_numbers(self):
self.assertEqual(permutation([0,1]),[[0,1],[1,0]])
def test_check_permutation_one_number(self):
self.assertEqual(permutation([0]),[[0]])
def test_check_pe... |
995dcf3b2e460fc4f5d9105909bef9a017df1137 | 5218e77f02d278e43b7df687e37cd73cffd21823 | /doc/samples/custom_loader.py | 2d4e58e65c13021b6aef301648f4edb2f65c41db | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | pydoit/doit | 12c4fa30f2153bdba69810b0393f5be19edae110 | 00c136f5dfe7e9039d0fed6dddd6d45c84c307b4 | refs/heads/master | 2023-08-03T04:41:26.397490 | 2023-01-16T03:40:03 | 2023-01-16T03:40:03 | 16,851,127 | 1,727 | 201 | MIT | 2023-03-18T18:37:45 | 2014-02-14T22:21:23 | Python | UTF-8 | Python | false | false | 608 | py | custom_loader.py | #! /usr/bin/env python3
import sys
from doit.task import dict_to_task
from doit.cmd_base import TaskLoader2
from doit.doit_cmd import DoitMain
my_builtin_task = {
'name': 'sample_task',
'actions': ['echo hello from built in'],
'doc': 'sample doc',
}
class MyLoader(TaskLoader2):
def setup(self, opt_... |
397a287b2b2189a078f42dd6f406130fe6221356 | 7976cbc8e26c8db85d75820ff289b048f22d3986 | /isort/io.py | 94698917118e647e66269da31463cadce8970eef | [
"MIT"
] | permissive | PyCQA/isort | 5eaf38d78f5088f7568a2056fe7868c4f79abfdd | e35a55f6ab8473003d68a8b2ffebdd08fbb2b61b | refs/heads/main | 2023-08-28T12:03:16.110191 | 2023-08-20T20:18:05 | 2023-08-20T20:18:05 | 12,550,138 | 2,914 | 312 | MIT | 2023-09-06T18:45:21 | 2013-09-02T22:22:53 | Python | UTF-8 | Python | false | false | 2,216 | py | io.py | """Defines any IO utilities used by isort"""
import dataclasses
import re
import tokenize
from contextlib import contextmanager
from io import BytesIO, StringIO, TextIOWrapper
from pathlib import Path
from typing import Any, Callable, Iterator, TextIO, Union
from isort.exceptions import UnsupportedEncoding
_ENCODING_... |
fa265b47e6a1a768e8ca316d1e176b974e938ad8 | 7b7c570b30d6d7a0e9b904c7cb378cfb0d0f0e07 | /mlflow/tracking/request_header/default_request_header_provider.py | 191150821fa6ab8a7c06881543891b5eb45e8814 | [
"Apache-2.0"
] | permissive | mlflow/mlflow | ca97bfbbf32f8e59f454e428f5e46eb3d34d062f | 37298ffafcd34002352d01d579d4524790544267 | refs/heads/master | 2023-09-01T13:15:53.902815 | 2023-09-01T09:00:42 | 2023-09-01T09:00:42 | 136,202,695 | 14,102 | 3,748 | Apache-2.0 | 2023-09-14T21:52:42 | 2018-06-05T16:05:58 | Python | UTF-8 | Python | false | false | 484 | py | default_request_header_provider.py | from mlflow import __version__
from mlflow.tracking.request_header.abstract_request_header_provider import RequestHeaderProvider
_USER_AGENT = "User-Agent"
_DEFAULT_HEADERS = {_USER_AGENT: f"mlflow-python-client/{__version__}"}
class DefaultRequestHeaderProvider(RequestHeaderProvider):
"""
Provides default r... |
fa3e390dfbf095f42fbd7c45730c7ed1f371f012 | 46b0c5040aacffb01a6b9013c578ea92ea50a345 | /examples/python/test_connection.py | 0cd3b46fd49bd00222b5fa71beeea9ea5e98f40f | [
"MIT"
] | permissive | looker-open-source/sdk-codegen | 13957cf7ff24f8bd1a68205f1a1f0a4dbb9cb192 | 351a15d71dd6b87124a0275a9b2d126f4e5c3ed1 | refs/heads/main | 2023-08-22T09:32:26.892694 | 2023-08-21T21:00:59 | 2023-08-21T21:00:59 | 180,189,919 | 213 | 196 | MIT | 2023-08-30T05:44:25 | 2019-04-08T16:30:46 | TypeScript | UTF-8 | Python | false | false | 2,134 | py | test_connection.py | """ Given a connection name, obtain all supported tests, and run these test
$ python test_connection.py <connection_name>
Example:
$ python test_connection.py thelook
Notes: Connections to Looker's internal database cannot be tested.
Last modified: August 25, 2021
"""
from functools import redu... |
9e12f9a57c98bf72915cc0b9a60055af28112c74 | 67ce6a1d1369463b15023cc5bd1be9e823bab398 | /lib/pymedphys/_dicom/header.py | 7b13544d37c7493c61ebf4469dedde0d9c7381d9 | [
"Apache-2.0"
] | permissive | pymedphys/pymedphys | 2487efe7259cc4e226e93d32fe86cef01673016e | f6acdf9bd2e8a32e372966879284fbd71c612358 | refs/heads/main | 2023-08-05T06:27:48.110296 | 2023-06-07T18:22:09 | 2023-06-07T18:22:09 | 168,238,552 | 288 | 79 | Apache-2.0 | 2023-05-30T03:23:50 | 2019-01-29T22:20:04 | Python | UTF-8 | Python | false | false | 5,206 | py | header.py | # Copyright (C) 2021 Matthew Jennings
# Copyright (C) 2019 Cancer Care Associates
# 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 re... |
b47e59029a996536856a42956247c7037649a368 | 6eb0ba72a576b18873e53b0ff4f86fb581c6c806 | /tests/unit/models_images_test.py | 3478c3fedb3b6ef0ca9086852d0c7622ea0b94dc | [
"Apache-2.0"
] | permissive | docker/docker-py | 566f9dd69c71ef79fbe2b9dd2745c905e1c613df | c38656dc7894363f32317affecc3e4279e1163f8 | refs/heads/main | 2023-08-31T14:13:48.087317 | 2023-08-21T13:31:57 | 2023-08-21T13:31:57 | 10,247,874 | 6,473 | 1,943 | Apache-2.0 | 2023-09-08T18:24:21 | 2013-05-23T16:15:07 | Python | UTF-8 | Python | false | false | 5,925 | py | models_images_test.py | import unittest
import warnings
from docker.constants import DEFAULT_DATA_CHUNK_SIZE
from docker.models.images import Image
from .fake_api import FAKE_IMAGE_ID
from .fake_api_client import make_fake_client
class ImageCollectionTest(unittest.TestCase):
def test_build(self):
client = make_fake_client()
... |
c2aa52641d64f1a1bca8d401e82e5cfea3dc0bb3 | 68073b5bbec051890bce2cdb0abbf1c7652002ed | /src/robotide/widgets/font.py | a0813321fe1f2c356f6ff9a60a05033439fa2002 | [
"Apache-2.0"
] | permissive | robotframework/RIDE | 3b6dc9629e34b6f350e154e5f76d106fa48eaaa8 | ed4d650dbd806672401d4341fecc30274c4972c7 | refs/heads/master | 2023-09-05T15:59:01.151700 | 2023-09-02T22:39:16 | 2023-09-02T22:39:16 | 2,467,257 | 897 | 419 | Apache-2.0 | 2023-09-10T03:43:39 | 2011-09-27T11:53:40 | Python | UTF-8 | Python | false | false | 1,285 | py | font.py | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... |
6333af436fabf4db54fc09456d8645e7e578386c | 3de6d6c868ed8eaa73369ca3af92c8af93b0046a | /软统/task3/problem10.py | 67eaceb1b3b0bc80f0b35699aaf2bb794adf8d78 | [] | no_license | NJU-SE-15-share-review/professional-class | 32fed8b83a7e008b04dd046433017c2fe6cc8ddf | a3531b0d0efd681ae4cf3ec01573654161b3ae3f | refs/heads/master | 2023-08-25T04:09:10.523340 | 2023-03-22T15:50:09 | 2023-03-22T15:50:09 | 94,741,641 | 824 | 441 | null | 2023-03-22T15:50:11 | 2017-06-19T05:59:55 | HTML | UTF-8 | Python | false | false | 478 | py | problem10.py | # -*- coding:utf-8 -*-
"""
log api example: log('output is: ' + str(output))
"""
from __future__ import print_function
from scipy.stats import t
import math
class Solution():
def solve(self):
n = 25
mean = 7.73
std = 0.77
u0 = 8
stat_value = (mean - u0) / (std / math.sqrt(n... |
8ea59aedb6eac226b55af31cdb4795dc463c2434 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /DPGAnalysis/SiStripTools/python/eventtimedistribution_cfi.py | e5c6f6a4182591ec2121037fa10b253b390d38b7 | [
"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 | 794 | py | eventtimedistribution_cfi.py | import FWCore.ParameterSet.Config as cms
eventtimedistribution = cms.EDAnalyzer('EventTimeDistribution',
historyProduct = cms.InputTag("consecutiveHEs"),
apvPhaseCollection = cms.InputTag("APVPhases"),
... |
24cbd65a30208f78648b7abb1e48b4601416406a | 2337351b228818e41be3002bd38f68f77c2aa074 | /commands/network-scan.py | be3102fee9ba7bf0dfd25aedab89933bbbc54ed0 | [
"LicenseRef-scancode-unknown-license-reference",
"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 | 20,855 | py | network-scan.py | # -*- coding: utf-8 -*-
# ----------------------------------------------------------------------
# network-scan command
# ----------------------------------------------------------------------
# Copyright (C) 2007-2023 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------... |
e2a604dafbfc0491cd23fc4c51bef58d1ea0cb2b | d6aae799e18e907fb413b715200c7832252a87e5 | /image-superresolution/esrgan/convert_weights.py | e5c4c0958d440a1a72497a8a30b93faef8bcc1d5 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"CC-BY-NC-4.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | sony/nnabla-examples | 0d0bbd5df3028996e790bcf07248fdb0932697d1 | 41f71faa6efff7774a76bbd5af3198322a90a6ab | refs/heads/master | 2023-09-04T03:45:54.023899 | 2023-08-22T03:31:21 | 2023-08-22T03:31:21 | 109,625,584 | 308 | 108 | Apache-2.0 | 2023-08-22T03:31:23 | 2017-11-05T23:30:40 | Python | UTF-8 | Python | false | false | 1,895 | py | convert_weights.py | # Copyright 2019,2020,2021 Sony Corporation.
# Copyright 2021 Sony Group Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... |
44bb3385bfb8056dcad473e951ac92b8852a9ad5 | a4250d60726fa37341736ed14173ce77797b47e9 | /setup.py | aa5b05c308daba4e7abf64430a144f168fc20e58 | [
"MIT"
] | permissive | Scille/umongo | cdd04c85a5a93a85a64bb97367aec5219fb48a97 | 1b23dc7155448a52fa6e7f3d7da6621632e259f5 | refs/heads/master | 2023-08-03T18:14:05.908192 | 2022-09-21T15:09:58 | 2022-09-21T15:09:58 | 53,513,600 | 482 | 84 | MIT | 2023-05-16T22:47:55 | 2016-03-09T16:34:42 | Python | UTF-8 | Python | false | false | 1,553 | py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst', 'rb') as readme_file:
readme = readme_file.read().decode('utf8')
with open('HISTORY.rst', 'rb') as history_file:
history = history_file.read()... |
6259e6a0fa103cc761339946b5a30a101ab34733 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/RndBenefitRule.py | 99bd93257284bb62cd1503cefde2d48533eb6e0a | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 1,913 | py | RndBenefitRule.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class RndBenefitRule(object):
def __init__(self):
self._max_benefit = None
self._min_benefit = None
self._proportion = None
@property
def max_benefit(self):
ret... |
b9c0fcc695ac64ac88d408fec9a1730f52733028 | 462b8a2326486dd41bf0d1ddbb19bbcee9532411 | /blender/arm/logicnode/canvas/LN_set_canvas_checkbox.py | ad41a7ae8c60d17d5dca2487419a87f637f993c2 | [
"Zlib",
"GPL-2.0-only"
] | permissive | armory3d/armory | b751fb23d6590f2ca421ace7cf7cbeaef91f472c | 511657981bd2716eddcee8dff26820d27f2bc610 | refs/heads/main | 2023-08-12T02:57:02.898742 | 2023-08-04T18:55:45 | 2023-08-04T18:55:45 | 45,202,654 | 3,077 | 530 | Zlib | 2023-09-12T11:24:38 | 2015-10-29T18:27:56 | Python | UTF-8 | Python | false | false | 479 | py | LN_set_canvas_checkbox.py | from arm.logicnode.arm_nodes import *
class CanvasSetCheckBoxNode(ArmLogicTreeNode):
"""Sets the state of the given UI checkbox."""
bl_idname = 'LNCanvasSetCheckBoxNode'
bl_label = 'Set Canvas Checkbox'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmNodeSocketAction', 'In'... |
26846119cd58ab81424034999e41136cd5cd056e | 62179a165ec620ba967dbc20016e890978fbff50 | /tests/torch/quantization/test_unified_scales.py | 78f9ede365601a75b57622f6b928d294517db4e1 | [
"Apache-2.0"
] | permissive | openvinotoolkit/nncf | 91fcf153a96f85da166aacb7a70ca4941e4ba4a4 | c027c8b43c4865d46b8de01d8350dd338ec5a874 | refs/heads/develop | 2023-08-24T11:25:05.704499 | 2023-08-23T14:44:05 | 2023-08-23T14:44:05 | 263,687,600 | 558 | 157 | Apache-2.0 | 2023-09-14T17:06:41 | 2020-05-13T16:41:05 | Python | UTF-8 | Python | false | false | 29,572 | py | test_unified_scales.py | # Copyright (c) 2023 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writ... |
fd2afdb9a3afe2676481f5731ac9cceb7dd52cb7 | 2337351b228818e41be3002bd38f68f77c2aa074 | /services/ping/datastream.py | a62b2834f7659fbed807f39b88df900d588cac1d | [
"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 | 705 | py | datastream.py | # ----------------------------------------------------------------------
# Ping DataStream client
# ----------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# NOC m... |
059564d4848743efdf572fd7060158a665b790e0 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /tests/encryption/test_intransit_encryption_sanity.py | b9b6304e33d2fbdc59bf0a2f0f72145f289e5334 | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 2,478 | py | test_intransit_encryption_sanity.py | import logging
import pytest
from ocs_ci.ocs.resources.storage_cluster import (
in_transit_encryption_verification,
set_in_transit_encryption,
get_in_transit_encryption_config_state,
)
from ocs_ci.framework.pytest_customization.marks import (
tier1,
skipif_ocs_version,
green_squad,
)
from ocs_c... |
c03ab15c47890a35b70582c1b64da626bbb230f5 | 3d4c7b9c179322e6bdb3c7a0c137919364806cb3 | /examples/python/native/multi_head_attention.py | 7ccdae4186cb5c8b563f268e87d41a7fefb6ab97 | [
"Apache-2.0"
] | permissive | flexflow/FlexFlow | 291282d27009924a427966e899d7c2fda9c20cec | b2ec6cb5d2b898db1ad4df32adf5699bc48aaac7 | refs/heads/inference | 2023-09-04T05:25:02.250225 | 2023-09-03T14:15:07 | 2023-09-03T14:15:07 | 160,988,469 | 1,139 | 186 | Apache-2.0 | 2023-09-14T17:56:24 | 2018-12-08T23:43:13 | C++ | UTF-8 | Python | false | false | 3,052 | py | multi_head_attention.py | from flexflow.core import *
from argparse import ArgumentParser
import numpy as np
def parse_args():
parser = ArgumentParser()
parser.add_argument('--seq-length', default=256, type=int)
parser.add_argument('--num-heads', default=16, type=int)
parser.add_argument('--hidden-size', default=512, type=int)
args, ... |
49020e19bcb75fa1861af3c9a3f0923728ce9421 | 10cb11f83e1c8b51b9d72c28d6259a56ff1a97c8 | /tests/integration/pipeline/test_bootstrap_command.py | 876faef31c879b7cd76ad1b64da66c5a9f303468 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] | permissive | aws/aws-sam-cli | 6d4411aacf7f861e75e5cf4882a32858797a276d | b297ff015f2b69d7c74059c2d42ece1c29ea73ee | refs/heads/develop | 2023-08-30T23:28:36.179932 | 2023-08-30T21:58:26 | 2023-08-30T21:58:26 | 92,205,085 | 1,402 | 470 | Apache-2.0 | 2023-09-14T21:14:23 | 2017-05-23T18:16:23 | Python | UTF-8 | Python | false | false | 20,237 | py | test_bootstrap_command.py | from unittest import skipIf
import pytest
from parameterized import parameterized
from samcli.commands.pipeline.bootstrap.cli import PIPELINE_CONFIG_FILENAME, PIPELINE_CONFIG_DIR
from samcli.lib.config.samconfig import SamConfig
from tests.integration.pipeline.base import BootstrapIntegBase
from tests.testing_utils i... |
38fb58b7a74a7d21c87ee2b3b1ea4114971adb36 | 8b725e9f1bef041961f9df5a77ed5ef14cd75908 | /src/pystack/colors.py | 8628568042dc6d2fad64aec1996302b3d10176b0 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | bloomberg/pystack | 70a3615961ba61a53a0f8417cd4eea91a89d2e69 | e07ee353cbdac9359aaa84c4c624f709ec39512c | refs/heads/main | 2023-08-31T01:35:51.516066 | 2023-08-23T10:01:20 | 2023-08-23T10:01:20 | 593,714,137 | 791 | 35 | Apache-2.0 | 2023-09-14T16:51:06 | 2023-01-26T17:15:57 | Python | UTF-8 | Python | false | false | 3,064 | py | colors.py | import os
import re
import sys
from typing import Iterable
from typing import Optional
ATTRIBUTES = dict(
list(
zip(
[
"bold",
"faint",
"italized",
"underline",
"blink",
"",
"reverse"... |
a4331505b809deba657cc577bb0349acb1e26778 | 951c578186220f2499a7aecf99a314e46778fa75 | /tests/columns/test_nested.py | 9c9f39080f1016220f87506a846d084af1e41e27 | [
"MIT",
"Python-2.0"
] | permissive | mymarilyn/clickhouse-driver | 0d06fb1d3b28f61b267307fb6cea1a33d7997df4 | ce712b5bc7a7900e844c7c8f99a1e3426aa326f7 | refs/heads/master | 2023-07-20T08:41:27.193499 | 2023-06-30T08:29:06 | 2023-06-30T08:29:31 | 90,912,724 | 1,108 | 229 | NOASSERTION | 2023-05-24T02:54:41 | 2017-05-10T22:13:04 | Python | UTF-8 | Python | false | false | 3,248 | py | test_nested.py | from tests.testcase import BaseTestCase
class NestedTestCase(BaseTestCase):
required_server_version = (21, 3, 13)
def entuple(self, lst):
return tuple(
self.entuple(x) if isinstance(x, list) else x for x in lst
)
def test_simple(self):
columns = 'n Nested(i Int32, s S... |
f07e550a1988b8d9733ce380e3c2b94e1b13067c | e4c5238c86c8a114d49b7ba3ecc5ef9d5157e152 | /tests/test_state_opt/test_ppt_distinguishability.py | 1ac7ccfca65f8403b33a88935ea4aca4a1e00e39 | [
"MIT"
] | permissive | vprusso/toqito | 64a9963c02b73127836b76d886543a0642b93664 | 7e6869d783f98cb241579ea89e0f9ff61eff9d9b | refs/heads/master | 2023-07-22T17:08:18.392204 | 2023-07-19T07:27:37 | 2023-07-19T07:27:37 | 235,493,396 | 116 | 53 | MIT | 2023-09-12T13:35:38 | 2020-01-22T03:47:16 | Python | UTF-8 | Python | false | false | 9,162 | py | test_ppt_distinguishability.py | """Test ppt_distinguishability."""
import numpy as np
from toqito.perms import swap_operator
from toqito.state_opt import ppt_distinguishability
from toqito.states import basis, bell
def test_ppt_distinguishability_yyd_density_matrices():
"""
PPT distinguishing the YYD states from [1] should yield `7/8 ~ 0.8... |
8fb5b76df5512078c51be7c0e1a10bf1ec5f3c73 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /ocs_ci/helpers/dr_helpers_ui.py | 9bc6638f6e2df80fd4743ae7f196f97c8fc54a73 | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 18,182 | py | dr_helpers_ui.py | """
Helper functions specific to DR User Interface
"""
import logging
from selenium.common.exceptions import NoSuchElementException
from ocs_ci.framework import config
from ocs_ci.ocs import constants
from ocs_ci.ocs.ui.views import locators
from ocs_ci.ocs.ui.helpers_ui import format_locator
from ocs_ci.utility.util... |
438ca23fa7d617c6c84f7ed31aa49d68ca07a94c | 554718851656376ad2bceb282de30459167ffeb2 | /smdebug/mxnet/singleton_utils.py | 4da2498b91197fa3482ce3a4aabb7b023b403f36 | [
"Apache-2.0"
] | permissive | awslabs/sagemaker-debugger | d6ae6a6177a6cb457972772e2b3021e8a9dcc621 | 37ecf0aaeb24ab2adbe7f0ad664d0e50fa4154f2 | refs/heads/master | 2023-09-05T05:20:02.458427 | 2023-04-20T20:48:11 | 2023-04-20T20:48:11 | 222,554,670 | 162 | 89 | Apache-2.0 | 2023-08-23T14:31:27 | 2019-11-18T22:12:36 | Python | UTF-8 | Python | false | false | 564 | py | singleton_utils.py | """
Easy-to-use methods for getting the singleton SessionHook.
This is abstracted into its own module to prevent circular import problems.
Sample usage (in AWS-MXNet repo):
import smdebug.mxnet as smd
hook = smd.hook()
"""
# First Party
import smdebug.core.singleton_utils as sutils
from smdebug.core.singleton_utils ... |
e9e1e732d70afdca14dc799431ffeb2747537631 | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /WebMirror/management/rss_parser_funcs/feed_parse_extractStarrynightnovelsWordpressCom.py | 68bf15a4df9b07a611277c2ba4f98c543688e105 | [
"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 | 1,980 | py | feed_parse_extractStarrynightnovelsWordpressCom.py | def extractStarrynightnovelsWordpressCom(item):
'''
Parser for 'starrynightnovels.wordpress.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('Shini Yasui Kōshaku Reijō to Shichi-nin no Kikōsh... |
edc72604308d853c0b5785dee3513f0f4cc30a0c | 594555ce60da5dd32e34b87ea48f0731e19adc9d | /models/DeformableConvNets/lib/utils/show_boxes.py | 42b7ec2105603bb42f395e5305dc57cc9fa398b4 | [
"MIT"
] | permissive | i-pan/kaggle-rsna18 | 97a4a016183ae19a3690f0c89454339fdfdaf2a9 | 2db498fe99615d935aa676f04847d0c562fd8e46 | refs/heads/master | 2022-02-09T16:39:53.996841 | 2021-12-23T23:49:23 | 2021-12-23T23:49:23 | 156,621,490 | 227 | 72 | MIT | 2021-12-23T23:49:45 | 2018-11-07T23:21:51 | Python | UTF-8 | Python | false | false | 1,231 | py | show_boxes.py | # --------------------------------------------------------
# Deformable Convolutional Networks
# Copyright (c) 2017 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Yi Li, Haocheng Zhang
# --------------------------------------------------------
import matplotlib.pyplot as plt
from ran... |
6a774b3c94e5daee6f8edbc9711451c85f99d85c | 0339ff270893ee0787ed9818aab05dd56c185e92 | /showyourwork/workflow/rules/preprocess.smk | 3ad10bfda41472d35437660ee699ab4098262871 | [
"MIT"
] | permissive | showyourwork/showyourwork | 27a985642c497079eaff43d494456510de46af8d | acd9a28f2a85c3a954f9a9c6dc99f3aa1d947c7d | refs/heads/main | 2023-09-01T15:45:31.115438 | 2023-08-24T12:02:03 | 2023-08-24T12:02:03 | 383,577,518 | 247 | 31 | MIT | 2023-09-12T12:39:11 | 2021-07-06T19:25:57 | TeX | UTF-8 | Python | false | false | 3,037 | smk | preprocess.smk | """
Defines the rule ``syw__preprocess`` to parse the config and build the
workflow graph.
Runs the script :doc:`preprocess` to generate the ``.showyourwork/config.json``
file containing metadata about the build and the workflow graph.
"""
from showyourwork import paths
# Allow user to define their own tectonic.yml... |
d248ab0ed6ab8c9a84e7fe922b027bbe201a3091 | 3a61d74a32de232682867a1063944cad4daaa47f | /custom_components/elasticsearch/config_flow.py | 2564ec1721eb747f2c8eabe12cf7888061d38d69 | [
"MIT"
] | permissive | legrego/homeassistant-elasticsearch | c131eacf125bb8008fa85dfb477375ec6abb185c | fbe6f8c48c62c9b9b4b559d372d38716afe8ebf1 | refs/heads/main | 2023-08-22T12:27:49.162089 | 2023-08-13T23:43:52 | 2023-08-13T23:43:52 | 132,661,981 | 115 | 29 | MIT | 2023-09-07T18:20:09 | 2018-05-08T20:35:58 | Python | UTF-8 | Python | false | false | 15,242 | py | config_flow.py | """Config flow for Elastic."""
import homeassistant.helpers.config_validation as cv
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.config_entries import SOURCE_IGNORE, SOURCE_IMPORT
from homeassistant.const import (
CONF_ALIAS,
CONF_PASSWORD,
CONF_TIMEOUT,
CONF_UR... |
928a5d302d4fb598b1e7f8cbafc470bd55954372 | b8d80a23cb27af08a1c4d34b478c76228ae5fbb4 | /insights/tests/parsers/test_sat5_insights_properties.py | 62d61bbdab8888a22870d566ff68f57b5cb0acc3 | [
"Apache-2.0"
] | permissive | RedHatInsights/insights-core | bb243e2bf8a52446fefb95ebe05478d6e35efe2e | b0ea07fc3f4dd8801b505fe70e9b36e628152c4a | refs/heads/master | 2023-09-04T21:15:40.456257 | 2023-09-04T10:46:56 | 2023-09-04T10:46:56 | 92,518,221 | 144 | 290 | Apache-2.0 | 2023-09-14T02:40:13 | 2017-05-26T14:23:11 | Python | UTF-8 | Python | false | false | 1,079 | py | test_sat5_insights_properties.py | import doctest
import pytest
from insights.core.exceptions import SkipComponent
from insights.parsers import sat5_insights_properties
from insights.parsers.sat5_insights_properties import Sat5InsightsProperties
from insights.tests import context_wrap
INSIGHTS_PROPERTIES = """
portalurl = https://cert-api.access.redha... |
b4dc07846e72265da382f281147657aaf71504a1 | caeaa54aabffb74c7c72d24d246d7a1226950b10 | /other/gif/loga.py | 7d5b940bce9dbecc05102985a35084ada8b0a86f | [] | no_license | DIYer22/boxx | 883931b570c767baca9f8ada58034340c108d535 | 69b117ee983d8a9ee3ad176af8b096acc902f3ae | refs/heads/master | 2023-09-01T01:13:38.515791 | 2023-08-24T07:37:34 | 2023-08-24T07:37:34 | 112,070,868 | 452 | 45 | null | 2023-04-24T07:48:32 | 2017-11-26T09:35:12 | Python | UTF-8 | Python | false | false | 148 | py | loga.py | import numpy as np
array = np.random.normal(size=(4,3, 244, 244))
# I want to know every thing about `array`
array[0] = np.inf
array[1] = np.nan
|
261e88df72362667f3add64a263d007868fee028 | 4b484246502bd0607d9f9e25078adcf49bac1e84 | /roles/openshift_node/callback_plugins/aa_version_requirement.py | 00494b8e19677e75eb17e1b06af4d62736567422 | [
"Apache-2.0"
] | permissive | openshift/openshift-ansible | b94ca8004be5373bc78b33e7c2cc4909c5ab81ab | 2ba66d98edb01fb1ff1250053c09fddae0441b12 | refs/heads/master | 2023-08-23T12:26:12.586513 | 2023-06-19T08:20:58 | 2023-06-19T08:20:58 | 24,109,199 | 2,386 | 3,107 | Apache-2.0 | 2023-09-14T16:02:38 | 2014-09-16T17:07:51 | Python | UTF-8 | Python | false | false | 1,397 | py | aa_version_requirement.py | #!/usr/bin/python
"""
This callback plugin verifies the required minimum version of Ansible
is installed for proper operation of the OpenShift Ansible Installer.
The plugin is named with leading `aa_` to ensure this plugin is loaded
first (alphanumerically) by Ansible.
"""
import sys
from pkg_resources import parse_ve... |
9851ad120a86bb158e94962276b6831e5c4c5378 | 1236eb50df4b9cf63caf9d0c6ceabe34c323bd24 | /tools/phising_attack.py | 44513463cb2b17612bc61d8c66bc3e0107f6dac1 | [
"MIT"
] | permissive | Z4nzu/hackingtool | f444de56cca7446cecc0a35c48bdb2c44d5492e9 | f5aff5547a4506cfc62008cced6055a354ac70b9 | refs/heads/master | 2023-08-22T06:53:58.418816 | 2023-07-23T05:20:23 | 2023-07-23T05:20:23 | 254,832,799 | 39,265 | 4,263 | MIT | 2023-09-13T19:08:34 | 2020-04-11T09:21:31 | Python | UTF-8 | Python | false | false | 9,062 | py | phising_attack.py | # coding=utf-8
import os
from core import HackingTool
from core import HackingToolsCollection
class autophisher(HackingTool):
TITLE = "Autophisher RK"
DESCRIPTION = "Automated Phishing Toolkit"
INSTALL_COMMANDS = [
"sudo git clone https://github.com/CodingRanjith/autophisher.git",
"cd auto... |
54d9df5e0d0dce4d5b8d1042f873e6e7abddb3de | 0ca218c0f54dac33a2ade4accfdf8f5be3207588 | /lib/sqlalchemy/sql/schema.py | 008ae2c0059b722e8dbf302e3684fa09e4cb5c24 | [
"MIT"
] | permissive | sqlalchemy/sqlalchemy | 9d949c67c9b5396b1f33e7ff0f3230c81babf5be | b382bff6e3464f039db0fd1f2ce1b79038675e48 | refs/heads/main | 2023-08-31T17:40:59.565421 | 2023-08-30T15:01:41 | 2023-08-30T15:01:41 | 159,271,175 | 8,083 | 1,489 | MIT | 2023-09-12T18:53:55 | 2018-11-27T03:35:03 | Python | UTF-8 | Python | false | false | 227,728 | py | schema.py | # sql/schema.py
# Copyright (C) 2005-2023 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""The schema module provides the building blocks for database metadata.
Each elemen... |
ccc085ca36fa5838f96149a7503e5546d5cd3b27 | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-mrs/huaweicloudsdkmrs/v2/model/node_group_v2.py | db6ebf25b0994182ab69e25498608caa0505c6d1 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 15,679 | py | node_group_v2.py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class NodeGroupV2:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
... |
f615574c8b534e5a0ea72fd46c6829a3955062c9 | de499dbec27ff53d8163b816cafcd62b3a00d438 | /psql_database_helper.py | 3dd1524d8cd50127d2dc782ca5a722951771e59d | [
"MIT"
] | permissive | TonicAI/condenser | 0f93720bade91ca22cfd6790598b842fcb9b1475 | 14ff40774ce7f6a3a6167df4cac64b10490c5487 | refs/heads/master | 2023-05-26T11:04:18.590206 | 2023-05-18T14:48:45 | 2023-05-18T14:48:45 | 143,047,034 | 285 | 46 | MIT | 2023-05-18T14:48:47 | 2018-07-31T17:39:50 | Python | UTF-8 | Python | false | false | 8,903 | py | psql_database_helper.py | import os, uuid, csv
import config_reader
from pathlib import Path
from psycopg2.extras import execute_values, register_default_json, register_default_jsonb
from subset_utils import columns_joined, columns_tupled, schema_name, table_name, fully_qualified_table, redact_relationships, quoter
register_default_json(loads=... |
44963c83618614e1a82e508572dbd79f00596ed8 | cd954f06232e3b9fe008f9a6291689e75f179a88 | /GPLT_Python/L1-035.py | 8c8d8a5f94ee052fe38fef92f557d8dfd28e6ba8 | [
"MIT"
] | permissive | upupming/algorithm | 35446f4b15f3a505041ac65c1dc6f825951d8e99 | a3807ba05960b9025e55d668ef95b3375ae71895 | refs/heads/master | 2023-08-09T03:07:18.047084 | 2023-08-01T05:57:13 | 2023-08-01T05:57:13 | 217,478,998 | 239 | 34 | MIT | 2021-08-13T05:42:26 | 2019-10-25T07:41:19 | C++ | UTF-8 | Python | false | false | 300 | py | L1-035.py | a = []
while True:
N = input()
if N != '.':
a.append(N)
else:
break
if len(a) < 2:
print('Momo... No one is for you ...')
elif 2 <= len(a) < 14:
print(a[1] + ' is the only one for you...')
else:
print(a[1] + ' and ' + a[13] + ' are inviting you to dinner...')
|
3d93c847ea5cd9d3ee089cf12c1d3a49e4b1e531 | 16fcf54e753704a08888a235419ef19fcb49b793 | /Widgets/Skins/PreviewWidget.py | 00e24dbbd5655575a9781665a753f29eac0d752f | [] | no_license | PyQt5/PyQtClient | 08ca93f7af79c201fbb3d232a6063741f900a019 | f86e4e5038f9d9b1626c0a25f3aa59d33c3e4393 | refs/heads/master | 2022-09-03T21:43:42.371070 | 2022-09-01T19:20:44 | 2022-09-01T19:20:44 | 120,252,826 | 285 | 97 | null | 2019-02-02T09:53:59 | 2018-02-05T04:00:37 | Python | UTF-8 | Python | false | false | 4,908 | py | PreviewWidget.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on 2019年1月30日
@author: Irony
@site: https://pyqt.site https://github.com/PyQt5
@email: 892768447@qq.com
@file: Widgets.Skins.PreviewWidget
@description: 主题预览
"""
import os
from PyQt5.QtCore import Qt, QTimer, pyqtSlot
from PyQt5.QtGui import QCol... |
58a4c108d3bd0fc36fb5531675f408633450e25a | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /chrome/android/junit/src/org/chromium/chrome/browser/contextmenu/DEPS | 78b9a20ec80974b771dcfe8fdec0493cac43a0a2 | [
"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 | 112 | DEPS | include_rules = [
"+components/embedder_support/android/java/src/org/chromium/components/embedder_support",
]
| |
0c8e7e8414a3bf3e232f16ea6fac8a30fdd2ca65 | 3c6b36eb1f4f9760c52903f6d0ec4a501f948c90 | /osp/test/citations/jstor_record/test_surname.py | cbd01a29611b86b68df4fc84af0d59d1fff4f1d3 | [
"Apache-2.0"
] | permissive | davidmcclure/open-syllabus-project | 38444249af845013e3f281a7a713dca83159c56e | 078cfd4c5a257fbfb0901d43bfbc6350824eed4e | refs/heads/master | 2021-06-30T21:47:07.636558 | 2021-06-27T15:15:35 | 2021-06-27T15:15:35 | 50,152,020 | 220 | 14 | Apache-2.0 | 2021-06-27T15:11:15 | 2016-01-22T02:29:57 | Python | UTF-8 | Python | false | false | 610 | py | test_surname.py |
import pytest
from osp.citations.jstor_record import JSTOR_Record
@pytest.mark.parametrize('inputs,surname', [
# Single author.
(
[
('David', 'McClure'),
],
'McClure'
),
# Multiple authors.
(
[
('David', 'McClure'),
('Joe', '... |
6e7356dbfcdeac3dcb5e897f5031dbf849fcef60 | c5fd80ede07f0972a9b99d0c65a0df40e6d487fa | /pyocd/target/builtin/target_MAX32660.py | 60585b456911b092109083c94fb288a84fdd0908 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | pyocd/pyOCD | 46330f3a10c9be381293d220cc025e0e347513ce | 9253740baf46ebf4eacbce6bf3369150c5fb8ee0 | refs/heads/main | 2023-08-18T07:56:54.205305 | 2023-08-13T19:11:01 | 2023-08-13T19:11:01 | 13,862,423 | 507 | 204 | Apache-2.0 | 2023-09-09T20:13:57 | 2013-10-25T14:10:05 | Python | UTF-8 | Python | false | false | 4,036 | py | target_MAX32660.py | # pyOCD debugger
# Copyright (c) 2017-2021 Maxim Integrated (Part of Analog Devices)
# SPDX-License-Identifier: Apache-2.0
#
# 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.a... |
2f41476b06c06442d68a3259b59e4454c6bee2b2 | 187414dcb264fb49d82507a099fd5fdca6e55e38 | /python/pyspark/mllib/tests/test_util.py | 28a53af0aa8ae8558047d0c57bde5798bd150347 | [
"BSD-3-Clause",
"CC0-1.0",
"CDDL-1.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.0-or-later",
"Python-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",... | permissive | apache/spark | 8aeba2d80465a262acc95781ede105a5b5886f6d | 60d8fc49bec5dae1b8cf39a0670cb640b430f520 | refs/heads/master | 2023-09-04T04:33:36.058199 | 2023-09-04T03:48:52 | 2023-09-04T03:48:52 | 17,165,658 | 39,983 | 32,449 | Apache-2.0 | 2023-09-14T19:46:24 | 2014-02-25T08:00:08 | Scala | UTF-8 | Python | false | false | 3,929 | py | test_util.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
79e35eafa3d12bf27d1381346345636be664833e | 8cc3498e311d15c9a4394aaa341ef489b482dbe6 | /test/language/expressions/python/StringTypeTest.py | 215bf470a8bb924c20b91768fed07a1c79c87224 | [
"BSD-3-Clause"
] | permissive | ndsev/zserio | 3e55c064f72e86219a6da297f116d3dbb565a9a9 | c540c4a97fee4e08bfc6669a2cec0d2b8282d8f6 | refs/heads/master | 2023-08-24T14:56:10.750155 | 2023-08-11T19:36:54 | 2023-08-11T19:36:54 | 141,550,444 | 113 | 23 | BSD-3-Clause | 2023-08-30T11:14:47 | 2018-07-19T08:44:23 | Java | UTF-8 | Python | false | false | 3,342 | py | StringTypeTest.py | import unittest
from testutils import getZserioApi
class StringTypeTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "expressions.zs").string_type
def testReturnValue(self):
stringTypeExpression = self._createStringTypeExpression(True)
sel... |
3e5f8b1dfc050e759d7a862d665c88f3b5f69b8c | 3c2ee998c99a693b3b04d44f8c5af0fc5fb2c49d | /migrations/versions/c40e1fdf6b70_.py | 93d64de31e128451e8b7334320ae8dbe680872a5 | [
"BSD-2-Clause"
] | permissive | hotosm/tasking-manager | 4520a56b31b35ebfc82a337bc7e676f1f8bc946a | 45bf3937c74902226096aee5b49e7abea62df524 | refs/heads/develop | 2023-09-01T02:43:43.875659 | 2023-08-16T21:26:02 | 2023-08-29T13:15:52 | 80,733,077 | 526 | 316 | BSD-2-Clause | 2023-09-14T10:15:55 | 2017-02-02T14:31:35 | JavaScript | UTF-8 | Python | false | false | 5,029 | py | c40e1fdf6b70_.py | """empty message
Revision ID: c40e1fdf6b70
Revises: 84c793a951b2
Create Date: 2020-02-04 22:23:22.457001
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "c40e1fdf6b70"
down_revision = "84c793a951b2"
branch_labels = None
depends_on = None
class Determiner:
... |
b61443c8afeaf79ab1629940b61316f6bf26afe2 | 069c2295076c482afadfe6351da5ae02be8e18e6 | /tests/i18n/patterns/urls/wrong.py | b4a2e0e16ba4cf879b48c2f5051508f9421a23bb | [
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"GPL-1.0-or-later",
"Python-2.0.1",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-other-permissive",
"Python-2.0"
] | permissive | django/django | 5eb557f57053631cd4f566f451e43197309dbeeb | c74a6fad5475495756a5bdb18b2cab2b68d429bc | refs/heads/main | 2023-09-01T03:43:44.033530 | 2023-08-31T08:27:32 | 2023-08-31T08:27:32 | 4,164,482 | 73,530 | 38,187 | BSD-3-Clause | 2023-09-14T20:03:48 | 2012-04-28T02:47:18 | Python | UTF-8 | Python | false | false | 297 | py | wrong.py | from django.conf.urls.i18n import i18n_patterns
from django.urls import include, re_path
from django.utils.translation import gettext_lazy as _
urlpatterns = i18n_patterns(
re_path(
_(r"^account/"),
include("i18n.patterns.urls.wrong_namespace", namespace="account"),
),
)
|
01e8e1eba44795626e398b6bc694f85c22033d61 | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/virtual-network-tap/azext_vnettap/commands.py | eff3d854c6b5bbde93a658736bf8e7905cf46248 | [
"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 | 1,695 | py | commands.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
3941444e0aab79e6b4da555aef5a1e3649bb459a | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/scipy/py3/scipy/integrate/_ivp/base.py | ada0589dfa6a8f274d1eb4a8733c6bef7295b4c7 | [
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"Qhull",
"BSD-3-Clause",
"BSL-1.0",
"Apache-2.0",
"BSD-2-Clause"
] | 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 | 9,550 | py | base.py | import numpy as np
def check_arguments(fun, y0, support_complex):
"""Helper function for checking arguments common to all solvers."""
y0 = np.asarray(y0)
if np.issubdtype(y0.dtype, np.complexfloating):
if not support_complex:
raise ValueError("`y0` is complex, but the chosen solver doe... |
c24982b8326befabe53b0df06c41789e8cf664c7 | e03bce53de6f88c0e09f56e4fe11c36af0f1161f | /tests/integration/conftest.py | b0a9f2427a32a3ed394babf8adef0851f6067274 | [
"Apache-2.0"
] | permissive | onicagroup/runway | 20c31df9cbc1a1ffc5c9aa468ce5cf7d6ac7899f | 0763b06aee07d2cf3f037a49ca0cb81a048c5deb | refs/heads/master | 2023-08-30T22:35:54.113981 | 2023-08-29T14:13:35 | 2023-08-29T14:13:35 | 122,529,924 | 156 | 79 | Apache-2.0 | 2023-09-13T13:43:50 | 2018-02-22T20:12:55 | Python | UTF-8 | Python | false | false | 1,467 | py | conftest.py | """Pytest configuration, fixtures, and plugins."""
# pylint: disable=redefined-outer-name
from __future__ import annotations
import shutil
from pathlib import Path
from typing import TYPE_CHECKING, Any, Callable
import pytest
if TYPE_CHECKING:
from _pytest.config import Config
TEST_ROOT = Path(__file__).parent
... |
202d252fda5c41bebdab30a6f4603e7378890fc5 | 9c8e06301f6559a106b805dfe0b372ad2e6bc4d8 | /scripts/audit_frontend_licenses.py | 76c813b8ab1a8a3e878b8fe4deee79a6d7adc3bb | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"Zlib",
"BSD-3-Clause",
"WTFPL",
"MIT",
"MPL-2.0",
"MPL-1.1",
"CC0-1.0",
"GPL-2.0-only",
"AFL-2.1",
"CC-BY-3.0",
"Unlicense"
] | permissive | streamlit/streamlit | beecb89300d6f219f3a43ed328f22d3656243f26 | 4f45c18a4323a796440d651ba77b5eb29409cb2b | refs/heads/develop | 2023-09-06T06:22:40.853489 | 2023-09-04T13:53:20 | 2023-09-04T13:53:20 | 204,086,862 | 27,877 | 2,739 | Apache-2.0 | 2023-09-14T19:08:39 | 2019-08-24T00:14:52 | Python | UTF-8 | Python | false | false | 7,038 | py | audit_frontend_licenses.py | #!/usr/bin/env python
# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)
#
# 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
#
# U... |
511b918c86ed9c52d3b8d6d7e7dd0ccd2dca2c40 | 833ef1cc5cbd5cf76da144d10d393e30976d9185 | /froide/problem/migrations/0005_problemreport_escalated.py | af20d954d8c30d307458c0d7dabad2835323bb4b | [
"MIT"
] | permissive | okfde/froide | d022407ec30bf018e6ca587ae9df0b73a8625edf | 16e3c69b333fc82cb1e52378fc003ddf071152a7 | refs/heads/main | 2023-08-31T08:02:23.343743 | 2023-08-29T07:01:03 | 2023-08-29T07:01:03 | 1,700,944 | 230 | 48 | MIT | 2023-09-13T09:10:40 | 2011-05-04T12:20:51 | Python | UTF-8 | Python | false | false | 405 | py | 0005_problemreport_escalated.py | # Generated by Django 3.0.8 on 2020-07-15 16:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("problem", "0004_auto_20200710_1148"),
]
operations = [
migrations.AddField(
model_name="problemreport",
name="escalat... |
18bc0cffafaec5172f27e32ea9bb707c07af4686 | 08ea46c0a9fb71ef222cf6afa2e9094f5663dcfb | /tests/test_pvacfuse_generate_protein_fasta.py | d2b58dd9e29f8f0c638a5e50044d42bcb266ba95 | [
"BSD-3-Clause-Clear"
] | permissive | griffithlab/pVACtools | e358919eee76100f79dbe8d40d02b3fce8b227ac | 3317d2c18e82edb5ea183ae09820beb68c39d256 | refs/heads/master | 2023-08-09T15:42:06.725426 | 2023-08-09T14:28:44 | 2023-08-09T14:28:44 | 102,625,109 | 124 | 64 | BSD-3-Clause-Clear | 2023-09-08T14:17:22 | 2017-09-06T15:23:04 | Python | UTF-8 | Python | false | false | 3,182 | py | test_pvacfuse_generate_protein_fasta.py | import unittest
import os
import sys
import tempfile
from subprocess import call
from filecmp import cmp
import py_compile
from pvactools.tools.pvacfuse import generate_protein_fasta
from tests.utils import *
class GenerateFastaTests(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.python = s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.