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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
345f5a9f62ca1f3e41b10d550144926830ab4537 | 7e6afb4986a53c420d40a2039240f8c5ed3f9549 | /scripts/clang_git_format/clang_git_format/clang_format.py | 584a7d860f7107600abb10c64550912981eee064 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | MRPT/mrpt | 9ea3c39a76de78eacaca61a10e7e96646647a6da | 34077ec74a90b593b587f2057d3280ea520a3609 | refs/heads/develop | 2023-08-17T23:37:29.722496 | 2023-08-17T15:39:54 | 2023-08-17T15:39:54 | 13,708,826 | 1,695 | 646 | BSD-3-Clause | 2023-09-12T22:02:53 | 2013-10-19T21:09:23 | C++ | UTF-8 | Python | false | false | 5,301 | py | clang_format.py | import difflib
from distutils import spawn
import glob
import os
import sys
import threading
import subprocess
import logging
from .config import (PROGNAME)
from .utils import (
callo,
)
logger = logging.getLogger("clang-format")
class ClangFormat:
"""Find clang-format and linting/formating individual ... |
b0e3867e9d255729b4f307c849d9ddf78036ba2c | 4c8ce1a65c1543d8411b990340b0ccb84bfcf18a | /examples/unfinished/tsp_mo.py | 1b0430264a49f8565a5d18b1a8ff08654737fb83 | [
"MIT"
] | permissive | scipopt/PySCIPOpt | e7b92c39ea1cdc32a123669614e4c06bee4b73eb | c6329760618a88e43e32d164e363ed233499de91 | refs/heads/master | 2023-09-03T13:35:16.769766 | 2023-07-03T08:33:49 | 2023-07-03T08:33:49 | 59,214,089 | 390 | 92 | MIT | 2023-08-07T10:44:19 | 2016-05-19T14:29:21 | Cython | UTF-8 | Python | false | false | 10,031 | py | tsp_mo.py | """
tsp-mp.py: solve the multi-objective traveling salesman problem
Approaches:
- segmentation
- ideal point
- scalarization
Copyright (c) by Joao Pedro PEDROSO and Mikio KUBO, 2012
"""
import math
import random
from pyscipopt import Model, quicksum, multidict
def optimize(model,cand):
"""optimize:... |
6b8e58a3432fba7436a87f9a80c7428fe1d94014 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /PhysicsTools/PatAlgos/python/selectionLayer1/displacedMuonSelector_cfi.py | 5de4cb6fd54f5f96b2c9ed51a1016f577001c181 | [
"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 | 212 | py | displacedMuonSelector_cfi.py | import FWCore.ParameterSet.Config as cms
# module to select displacedMuons
#
selectedPatDisplacedMuons = cms.EDFilter("PATMuonSelector",
src = cms.InputTag("patDisplacedMuons"),
cut = cms.string("")
)
|
0049597f101849b6839e8ab31e0f8515085d57b5 | 0b4a95ce694695086e1ad43b4327f0f539361c4f | /jamboree/base/old/refactor.py | b316da0953c1080a444ee0c9cc0898b72e102119 | [] | no_license | kivo360/jamboree | 68f3bf855e3058a0007ea18742f285a5dab1a9bb | 235a49ac83e734a166458efc57738c5559f5124e | refs/heads/master | 2023-01-04T22:40:24.166459 | 2020-10-08T21:10:04 | 2020-10-08T21:10:04 | 222,349,483 | 138 | 1 | null | 2020-11-05T10:27:52 | 2019-11-18T02:44:45 | Python | UTF-8 | Python | false | false | 11,187 | py | refactor.py | import base64
import random
from abc import ABC
from copy import copy
from multiprocessing import cpu_count
from typing import List
import maya
import orjson
import ujson
from loguru import logger
from pebble.pool import ThreadPool
from redis import Redis
from funtime import Store
from jamboree.storage.databases impo... |
22ea63edcb8c121515e3bc205e6a47fce6acbc83 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-bing-ads/unit_tests/test_source.py | b19fea3127ccecc370e2b9d7b3877934e1529ff2 | [
"MIT",
"Elastic-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 5,995 | py | test_source.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
import json
from unittest.mock import patch
import pytest
import source_bing_ads
from airbyte_cdk.models import SyncMode
from source_bing_ads.source import AccountPerformanceReportMonthly, Accounts, AdGroups, Ads, Campaigns, SourceBingAds
@pytest.fixture(... |
39a462245e72d3380ffbaf3eef406fb6b452c2df | 1cfb0aca5ab2746ff3dacf554411f326beb0676e | /isochrones/tests/test_populations.py | 099ad3da9cb1642896884eb63fd6f7874c5eacfb | [
"MIT"
] | permissive | timothydmorton/isochrones | b8cd9e7b41aa21459ba1459a07092fca10f5443a | 1627b4dda2845c362c0dcb4b140b4278fc916034 | refs/heads/master | 2022-11-05T04:26:24.415865 | 2021-12-06T06:02:34 | 2021-12-06T06:02:34 | 19,379,027 | 113 | 72 | MIT | 2023-01-13T17:51:40 | 2014-05-02T15:14:25 | Jupyter Notebook | UTF-8 | Python | false | false | 3,045 | py | test_populations.py | import unittest
from pandas.testing import assert_frame_equal
from scipy.stats import uniform, norm
from isochrones import get_ichrone
from isochrones.priors import ChabrierPrior, FehPrior, GaussianPrior, SalpeterPrior, DistancePrior, AVPrior
from isochrones.populations import StarFormationHistory, StarPopulation, Bin... |
0cbc04f7c6ad965d5bb38208a4edcf072e19a528 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/ml/azure-ai-ml/azure/ai/ml/_utils/_asset_utils.py | bc302cf35c9f312e02609c479714ad6c7ea32d0b | [
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-python-cwi",
"LGPL-2.1-or-later",
"PSF-2.0",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"Python-2.0",
"MPL-2.0",
"LicenseRef-scancode-other-copyleft",
"HPND",... | 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 | 42,111 | py | _asset_utils.py | # ---------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# ---------------------------------------------------------
# pylint: disable=protected-access,too-many-lines
import hashlib
import logging
import os
import uuid
import warnings
from concurrent.futu... |
db98f7a492e6e4897216c2d47effd94207d59937 | 3eaef0fa3c0be14c47c6aa1e1fcfc51ccebe65c7 | /src/falconpy/_endpoint/deprecated/_d4c_registration.py | 0efc33cd4de0c83c7849c176983efa5836f7b076 | [
"Unlicense"
] | permissive | CrowdStrike/falconpy | 9dd97ee0d703d35f7da100a4c78c91f1f5911478 | b112fde2f3fbe44615f9a3b60b8210e89e51c1d5 | refs/heads/main | 2023-08-18T19:45:46.092966 | 2023-08-12T01:59:37 | 2023-08-12T01:59:37 | 312,363,599 | 256 | 109 | Unlicense | 2023-09-13T02:59:04 | 2020-11-12T18:33:23 | Python | UTF-8 | Python | false | false | 5,506 | py | _d4c_registration.py | """Internal API endpoint constant library.
_______ __ _______ __ __ __
| _ .----.-----.--.--.--.--| | _ | |_.----|__| |--.-----.
|. 1___| _| _ | | | | _ | 1___| _| _| | <| -__|
|. |___|__| |_____|________|_____|____ |____|__| |__|__|__|_____|
|: 1 | ... |
d19a82989acf1a4b217bc5e295b110ea43f7bcfe | 2de1320d0d2c79b44708f9145271d1024dc20de1 | /tests/test_typeclass/test_typed_dict.py | de776c35798b843a33321fdcfeade2598bc4b9f5 | [
"BSD-2-Clause"
] | permissive | dry-python/classes | b5dd8de65243ea5f38b565ebad34d62393f0a094 | 6f925f70285510d264a625c6afd0f26395b51475 | refs/heads/master | 2023-07-06T19:25:48.559783 | 2023-04-12T05:57:11 | 2023-04-12T05:57:11 | 217,621,930 | 625 | 29 | BSD-2-Clause | 2023-04-12T05:57:13 | 2019-10-25T22:14:08 | Python | UTF-8 | Python | false | false | 1,549 | py | test_typed_dict.py | import sys
import pytest
from typing_extensions import TypedDict
from classes import typeclass
if sys.version_info[:2] >= (3, 9): # noqa: C901
pytestmark = pytest.mark.skip('Only python3.7 and python3.8 are supported')
else:
class _User(TypedDict):
name: str
registered: bool
class _User... |
4f4a8a39dcbb06e46861683e99b4b39d2d1b7b41 | fdb9bdc6c4ab2f14ba71e544493706d5e275899f | /fhir/resources/devicedefinition.py | b9785e2cd321ccff5d218635189569e690a73f2d | [
"BSD-3-Clause"
] | permissive | nazrulworld/fhir.resources | 6ae8aea8180c611b0c5050759c6dcdf63e4cb061 | 1fd6ea476b27b3fcb8c4ef8f23bc51cf161e69e3 | refs/heads/main | 2023-08-30T18:27:27.277249 | 2023-07-03T19:57:06 | 2023-07-03T19:57:06 | 165,297,877 | 256 | 83 | NOASSERTION | 2023-08-24T15:34:05 | 2019-01-11T19:26:41 | Python | UTF-8 | Python | false | false | 72,710 | py | devicedefinition.py | # -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/DeviceDefinition
Release: R5
Version: 5.0.0
Build ID: 2aecd53
Last updated: 2023-03-26T15:21:02.749+11:00
"""
import typing
from pydantic import Field, root_validator
from pydantic.error_wrappers import ErrorWrapper, ValidationError
from pyda... |
3419ac0689ec94e735cf6f995f8f6ba96aeb0453 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/ScenePayBusinessParamDTO.py | 906fc40af9648df5d476cfe4684e2050ed3bb7d0 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 4,458 | py | ScenePayBusinessParamDTO.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ScenePayBusinessParamDTO(object):
def __init__(self):
self._custom_params = None
self._mall_cell_id = None
self._mall_cell_type = None
self._mall_id = None
... |
7d7dd88d933f092b2490dafd70ebf61d23d65f02 | 98f1a0bfa5b20a0b81e9e555d76e706c62d949c9 | /examples/pytorch/dimenet/modules/activations.py | c9bfbd05f7c36a243db2beae36f60e60e4840c88 | [
"Apache-2.0"
] | permissive | dmlc/dgl | 3a8fbca3a7f0e9adf6e69679ad62948df48dfc42 | bbc8ff6261f2e0d2b5982e992b6fbe545e2a4aa1 | refs/heads/master | 2023-08-31T16:33:21.139163 | 2023-08-31T07:49:22 | 2023-08-31T07:49:22 | 130,375,797 | 12,631 | 3,482 | Apache-2.0 | 2023-09-14T15:48:24 | 2018-04-20T14:49:09 | Python | UTF-8 | Python | false | false | 183 | py | activations.py | import torch
def swish(x):
"""
Swish activation function,
from Ramachandran, Zopf, Le 2017. "Searching for Activation Functions"
"""
return x * torch.sigmoid(x)
|
de104af652c917b003726da54d0cd11fad9ae9dc | d6aae799e18e907fb413b715200c7832252a87e5 | /image-classification/imagenet/obsolete/args.py | aca80893f6e5fdf4e1834623b1a40d3b47ec3d83 | [
"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 | 5,516 | py | args.py | # Copyright 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
#
# Unless ... |
c065a387d61a64781f659953cfca90d9e234ece6 | 847ebadf2b0e7c01ad33ce92b42528a1a5c4846c | /python/ovs/process.py | d7561310cad12892213b2e54aa7a4c4bc80b6c42 | [
"BSD-3-Clause",
"ISC",
"Apache-2.0",
"SISSL",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | openvswitch/ovs | 6f782527cf5fde4ccfd25e68d359b91ff41acf8a | bc79a7bf033fa4cda8ccfc5481db3cfccd72650c | refs/heads/master | 2023-09-04T06:31:47.899017 | 2023-08-03T16:19:12 | 2023-09-01T20:15:05 | 18,383,364 | 3,366 | 2,259 | Apache-2.0 | 2023-08-17T13:17:13 | 2014-04-02T22:15:28 | C | UTF-8 | Python | false | false | 1,467 | py | process.py | # Copyright (c) 2010, 2011 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
c3543e5c701ca46e594e2f7d5a102c4de902d7f1 | ed865aed525556fd7aa5ac5a024af720de8438e3 | /cli/src/pcluster/api/util.py | 2bace2ddd16172cc2d38d4689341dbb027ab4648 | [
"Python-2.0",
"GPL-1.0-or-later",
"MPL-2.0",
"MIT",
"LicenseRef-scancode-python-cwi",
"BSD-3-Clause",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"MIT-0",
"BSD-2-Clause"
] | permissive | aws/aws-parallelcluster | 7bb33a6e175168f63a1e0acb1a9a7e9cbc405eff | a213978a09ea7fc80855bf55c539861ea95259f9 | refs/heads/develop | 2023-09-05T15:12:18.533270 | 2023-09-05T14:38:59 | 2023-09-05T14:38:59 | 19,718,034 | 520 | 226 | Apache-2.0 | 2023-09-14T15:56:30 | 2014-05-12T22:42:19 | Python | UTF-8 | Python | false | false | 8,594 | py | util.py | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
# with the License. A copy of the License is located at http://aws.amazon.com/apache2.0/
# or in the "LICENSE.txt" file accompanyin... |
3dcfcd710706b9427d8059804c4636ae802ecfa9 | 68073b5bbec051890bce2cdb0abbf1c7652002ed | /src/robotide/contrib/testrunner/testrunner.py | 0abbac38690969df0af5f9334afd77801b52f4c0 | [
"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 | 7,669 | py | testrunner.py | # Copyright 2010 Orbitz WorldWide
#
# 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... |
386f63d7f592cbe2f670fc27409a43abeaf9e08e | d1f15554df2d5c0f74ddbcba6e870359841f682b | /wagtail/migrations/0047_add_workflow_models.py | 13d10033244fc7087dea1b773e3fa2dbe01730e4 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license"
] | permissive | wagtail/wagtail | bd405f89b86e0c625fef0685fd6bfba41cf5cbfc | 06a7bc6124bf62675c09fbe0a4ed9bbac183e025 | refs/heads/main | 2023-09-04T06:22:51.601208 | 2023-09-01T15:22:00 | 2023-09-01T15:22:00 | 16,479,108 | 12,974 | 3,580 | BSD-3-Clause | 2023-09-14T10:45:04 | 2014-02-03T12:41:59 | Python | UTF-8 | Python | false | false | 12,562 | py | 0047_add_workflow_models.py | # Generated by Django 3.0.3 on 2020-03-03 15:26
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
class Migration(migrations.Migration):
dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("wagta... |
d79e3457f4496093b3d9d29f54c35c1c0fea6479 | 14c3c7e470e3c8048e1fa7d3466c0008577400e6 | /Chapter03/process_pool.py | 1481a7e9bacfb4607350c5605256f1fa7c9164ca | [
"MIT"
] | permissive | PacktPublishing/Python-Parallel-Programming-Cookbook-Second-Edition | 7053d7c2ac6f4c53f642e5ee23335c1102398831 | a10f0b2ba69995a6a8697e68ae0b53a20f4c04c7 | refs/heads/master | 2022-10-30T19:55:23.337571 | 2022-10-28T10:13:28 | 2022-10-28T10:13:28 | 166,166,539 | 105 | 60 | MIT | 2021-04-23T04:11:29 | 2019-01-17T05:35:24 | Python | UTF-8 | Python | false | false | 389 | py | process_pool.py | #Using a Process Pool – Chapter 3: Process Based Parallelism
import multiprocessing
def function_square(data):
result = data*data
return result
if __name__ == '__main__':
inputs = list(range(0,100))
pool = multiprocessing.Pool(processes=4)
pool_outputs = pool.map(function_square, inputs)
poo... |
a50606d4829c6c0e7e8ae375b078b6975e49f490 | ac235a23f22be0d6f1818bb53902177f9969813a | /ddtrace/contrib/asyncio/provider.py | 356753c1ee5f08313d035cc440d5d8ebf185bed5 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | DataDog/dd-trace-py | f09d6d48c4c69aea68f999fc8a458ade5c6150cf | 1e3bd6d4edef5cda5a0831a6a7ec8e4046659d17 | refs/heads/1.x | 2023-09-01T20:25:26.746324 | 2023-09-01T18:54:37 | 2023-09-01T18:54:37 | 61,572,326 | 461 | 426 | NOASSERTION | 2023-09-14T20:38:57 | 2016-06-20T18:52:23 | Python | UTF-8 | Python | false | false | 2,855 | py | provider.py | import asyncio
from ...provider import BaseContextProvider
from ...provider import DatadogContextMixin
from ...span import Span
class AsyncioContextProvider(BaseContextProvider, DatadogContextMixin):
"""Manages the active context for asyncio execution. Framework
instrumentation that is built on top of the ``... |
08fffad0afc340e5644b31dada523cc73382bdf2 | 4c4deee160ee4a3056b2973f6202e5cbaafb5925 | /tests/functional/crawler/test_integrity_crawler.py | d856d5750d17780f89398c3808632309efe5c967 | [
"AGPL-3.0-only",
"LGPL-3.0-only"
] | permissive | open-io/oio-sds | b9bc7cec283838a59b83b5279cb181cded69034f | 08abd65aac86e47cf324826487ab9b475e014938 | refs/heads/master | 2023-09-05T05:09:29.653325 | 2023-08-01T16:37:37 | 2023-08-31T16:05:19 | 32,169,193 | 663 | 121 | MIT | 2022-03-04T13:08:03 | 2015-03-13T17:06:25 | Python | UTF-8 | Python | false | false | 5,659 | py | test_integrity_crawler.py | # Copyright (C) 2019 OpenIO SAS, as part of OpenIO SDS
# Copyright (C) 2022 OVH SAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your opti... |
5c49a0d301fd4875a6eefcef521d2271cbccba12 | e8b38b8dfa348ff006eb197a7906ca8e491a23dc | /tests/pyccel/scripts/array_binary_operation.py | 652e53bb716ca2e17a50a8ba717cd6ba582370f5 | [
"MIT"
] | permissive | pyccel/pyccel | d79a81dbdff1172839a6a1227abfcc1f97e6c97b | 1896b761ba662c90b14c195bbb6eb5cddc57cbfc | refs/heads/devel | 2023-08-30T12:15:25.244401 | 2023-08-28T09:31:32 | 2023-08-28T09:31:32 | 100,463,736 | 307 | 39 | MIT | 2023-09-14T19:29:26 | 2017-08-16T07:59:14 | Python | UTF-8 | Python | false | false | 2,928 | py | array_binary_operation.py | # pylint: disable=missing-function-docstring, missing-module-docstring
import numpy as np
def my_pow(n : 'int', m : 'int'):
return n ** m
def array_func_mult():
arr = np.array([1,2,3,4])
arr1 = arr * my_pow(2, 3)
shape = np.shape(arr1)
return arr[0], arr1[0], len(shape), shape[0]
def array_func_d... |
f3629e590412fb6edb8ee7aa9cb082753222e4a6 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/ue_smart_radio/media_player.py | 7fc727cf9fea1a8cee9dc1cb0c97e8f2670ae9de | [
"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 | 6,049 | py | media_player.py | """Support for Logitech UE Smart Radios."""
from __future__ import annotations
import logging
import requests
import voluptuous as vol
from homeassistant.components.media_player import (
PLATFORM_SCHEMA,
MediaPlayerEntity,
MediaPlayerEntityFeature,
MediaPlayerState,
MediaType,
)
from homeassistan... |
fb3426adc951ea2cd0cbc454de06b576838ca701 | 100bfa827dacb23637d3dd2d1396a830c7d9a4b2 | /mode/examples/Contributed Libraries in Python/OpenCV/BackgroundSubtraction/BackgroundSubtraction.pyde | 1a3fc9440555b5d1f6548a705cb0d63650dc7ce1 | [
"Apache-2.0"
] | permissive | jdf/processing.py | 82b37e5b1f4ce68825b5fe919205362ecdc16993 | f38544c70892c7534f059e8acc1c9a492e2b7c86 | refs/heads/master | 2023-08-26T01:42:50.442853 | 2023-02-15T21:33:12 | 2023-02-15T21:33:12 | 833,574 | 1,399 | 246 | Apache-2.0 | 2023-02-21T12:28:09 | 2010-08-12T14:29:22 | Python | UTF-8 | Python | false | false | 572 | pyde | BackgroundSubtraction.pyde | add_library('video')
add_library('opencv_processing')
video = None
opencv = None
def setup():
size(720, 480, P2D)
video = Movie(this, "street.mov")
opencv = OpenCV(this, 720, 480)
opencv.startBackgroundSubtraction(5, 3, 0.5)
video.loop()
video.play()
def draw():
image(video, 0, 0)
... |
65c6b120f5d38d960ad682ea1c0d72b0cd0959f4 | da769d44cfb931914ff51c0f1f302b056837c388 | /elpis/engines/common/input/resample.py | b45f07b6434708b8c264fef11e5438ca36ae6e36 | [
"Apache-2.0"
] | permissive | CoEDL/elpis | d7ef5d8c5daf450df10ca57371291d953555eaa7 | 9a019483b4440a96f80486142fb53c7b95c8f983 | refs/heads/master | 2023-07-08T05:06:13.276450 | 2023-03-09T00:17:37 | 2023-03-09T00:17:37 | 154,595,187 | 142 | 40 | Apache-2.0 | 2023-09-05T09:41:13 | 2018-10-25T02:00:37 | Python | UTF-8 | Python | false | false | 432 | py | resample.py | import subprocess
from ..utilities.globals import SOX_PATH
from pathlib import Path
def resample(src_path: Path, dst_path: Path):
src_path = Path(src_path)
dst_path = Path(dst_path)
sox_arguments = [
SOX_PATH,
f"{src_path}",
"-b",
"16",
"-c",
"1",
"-... |
33447977a7bb2a40fce92716bcc1c9ceb19cb889 | da1721d2783ea4d67ff4e73cee6eee71292f2ef7 | /toontown/parties/PartyGlobals.py | 895e54a7b43b27c388be9242609465e090ac2e0b | [
"BSD-3-Clause"
] | permissive | open-toontown/open-toontown | bbdeb1b7bf0fb2861eba2df5483738c0112090ca | 464c2d45f60551c31397bd03561582804e760b4a | refs/heads/develop | 2023-07-07T01:34:31.959657 | 2023-05-30T23:49:10 | 2023-05-30T23:49:10 | 219,221,570 | 143 | 104 | BSD-3-Clause | 2023-09-11T09:52:34 | 2019-11-02T22:24:38 | Python | UTF-8 | Python | false | false | 37,853 | py | PartyGlobals.py | from panda3d.core import BitMask32
from panda3d.core import Point3, VBase4
from toontown.toonbase import TTLocalizer
from enum import IntEnum
KICK_TO_PLAYGROUND_EVENT = 'parties_kickToPlayground'
MaxSetInvites = 1000
MaxSetPartiesInvitedTo = 100
MaxSetHostedParties = 50
MaxPlannedYear = 2030
MinPlannedYear = 1975
Jelly... |
9b8754f2862c1046bf8a9479648d1b81ffc13f26 | 0577a46d8d28e1fd8636893bbdd2b18270bb8eb8 | /chromium/ios/chrome/browser/ui/side_swipe/DEPS | 94d0c0ba70e7d298ab32e0bc249a4cbd107e596a | [
"BSD-3-Clause"
] | permissive | ric2b/Vivaldi-browser | 388a328b4cb838a4c3822357a5529642f86316a5 | 87244f4ee50062e59667bf8b9ca4d5291b6818d7 | refs/heads/master | 2022-12-21T04:44:13.804535 | 2022-12-17T16:30:35 | 2022-12-17T16:30:35 | 86,637,416 | 166 | 41 | BSD-3-Clause | 2021-03-31T18:49:30 | 2017-03-29T23:09:05 | null | UTF-8 | Python | false | false | 180 | DEPS | specific_include_rules = {
# TODO(crbug.com/620932): Remove this exception.
"^side_swipe_controller\.h$": [
"+ios/web/web_state/ui/crw_swipe_recognizer_provider.h",
],
}
| |
a02e93929a2f8751ff07ab3367c6ff71467a2446 | 1334dae619b127bedb8c7a2587021b6be596a1f5 | /Chapter_4/ch04_ex5.py | 9752b2f095ab4eb4b129cba0dafaff850108967c | [
"MIT"
] | permissive | PacktPublishing/Mastering-Object-Oriented-Python-Second-Edition | 236a04c7f0b72bb2350d44e1cb3bfb7d2067179b | f6d6517952d51e75c5e086f4c19d1e52500cf261 | refs/heads/master | 2023-02-02T06:33:49.821872 | 2023-01-30T08:50:52 | 2023-01-30T08:50:52 | 187,621,576 | 139 | 103 | null | null | null | null | UTF-8 | Python | false | false | 2,866 | py | ch04_ex5.py | #!/usr/bin/env python3.7
"""
Mastering Object-Oriented Python 2e
Code Examples for Mastering Object-Oriented Python 2nd Edition
Chapter 4. Example 5.
"""
from dataclasses import dataclass
from enum import Enum
from typing import Iterator, cast, Iterable, Optional
@dataclass
class RTD:
rate: Optional[float]
... |
ed6a708dd23245561461528ddb610a2948568bd2 | 8ce453de612c9024207d00d328df183c443c4e2d | /NodeGraphQt/qgraphics/node_backdrop.py | 628d2186197cb650b0048a93d3c2099047d6a7d9 | [
"MIT"
] | permissive | jchanvfx/NodeGraphQt | 71f946d7547f6b79c57ee2565d171a30c130a74e | 4823b43642cce520ee88c5e89a0e1702c26ee9f0 | refs/heads/main | 2023-08-29T00:31:18.599300 | 2023-08-22T03:47:44 | 2023-08-22T03:47:44 | 101,639,727 | 1,015 | 255 | MIT | 2023-09-14T04:44:45 | 2017-08-28T12:13:27 | Python | UTF-8 | Python | false | false | 10,718 | py | node_backdrop.py | #!/usr/bin/python
from Qt import QtGui, QtCore, QtWidgets
from NodeGraphQt.constants import Z_VAL_PIPE, NodeEnum
from NodeGraphQt.qgraphics.node_abstract import AbstractNodeItem
from NodeGraphQt.qgraphics.pipe import PipeItem
from NodeGraphQt.qgraphics.port import PortItem
class BackdropSizer(QtWidgets.QGraphicsItem... |
986c33f457a97f982b37be29151150a38bc9e56b | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /api/src/opentrons/hardware_control/modules/update.py | 519bb9bbf2ad39aba270fafcf13ec97d44dd6cf6 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | Opentrons/opentrons | 874321e01149184960eeaeaa31b1d21719a1ceda | 026b523c8c9e5d45910c490efb89194d72595be9 | refs/heads/edge | 2023-09-02T02:51:49.579906 | 2023-08-31T16:02:45 | 2023-08-31T16:02:45 | 38,644,841 | 326 | 174 | Apache-2.0 | 2023-09-14T21:47:20 | 2015-07-06T20:41:01 | Python | UTF-8 | Python | false | false | 8,721 | py | update.py | import asyncio
import logging
import os
from pathlib import Path
from glob import glob
from typing import Any, AsyncGenerator, Dict, Tuple, Optional, Union
from .types import UpdateError
from .mod_abc import AbstractModule
from opentrons.hardware_control.threaded_async_lock import ThreadedAsyncLock
from contextlib impo... |
c761b8a065780e52a4f61534dab4afb3b7d2f13d | 952dc66c61966f099756cdb6c2d13b40352f63cc | /analytics/management/commands/clear_single_stat.py | f0b8f0ff4e5ee2f718db652387b379fbc8b77789 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | zulip/zulip | 5ae6aad35fd9f72996c0a2a9cdd674400966ebf6 | 965a25d91b6ee2db54038f5df855215fa25146b0 | refs/heads/main | 2023-08-28T23:43:00.971110 | 2023-08-28T16:47:09 | 2023-08-28T19:33:02 | 43,160,685 | 20,239 | 8,996 | Apache-2.0 | 2023-09-14T20:57:47 | 2015-09-25T16:37:25 | Python | UTF-8 | Python | false | false | 838 | py | clear_single_stat.py | from argparse import ArgumentParser
from typing import Any
from django.core.management.base import BaseCommand, CommandError
from analytics.lib.counts import COUNT_STATS, do_drop_single_stat
class Command(BaseCommand):
help = """Clear analytics tables."""
def add_arguments(self, parser: ArgumentParser) -> ... |
27d875b6ed019b7215d9196dd30ab68e519996cb | 6146e33102797407ede06ce2daa56c28fdfa2812 | /python/GafferDispatchUI/LocalDispatcherUI.py | a7110218ad531b82e7d3f84e624c4c7b4734ea91 | [
"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 | 12,027 | py | LocalDispatcherUI.py | ##########################################################################
#
# Copyright (c) 2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... |
63ab4a09f51adf99971ef00be0b8c5b931be53d6 | e4b7980aa0deb74a4b3a42a124ca9fe85067a03c | /zoofs/greywolfoptimization.py | e805518ac5b38292ee6b42c2b4989d3eb79f55bf | [
"Apache-2.0"
] | permissive | jaswinder9051998/zoofs | 2b1238a901f0e711e354214dea968fb79da17bc0 | 7c502b88818dcdf82387d617d6dcf8b9447c2dc5 | refs/heads/master | 2023-09-02T07:47:24.988182 | 2023-02-09T14:51:16 | 2023-02-09T14:51:16 | 278,821,412 | 208 | 42 | Apache-2.0 | 2023-08-29T15:09:46 | 2020-07-11T08:33:37 | Python | UTF-8 | Python | false | false | 8,880 | py | greywolfoptimization.py | from zoofs.baseoptimizationalgorithm import BaseOptimizationAlgorithm
import numpy as np
import time
import warnings
class GreyWolfOptimization(BaseOptimizationAlgorithm):
def __init__(
self,
objective_function,
n_iteration: int = 1000,
timeout: int = None,
population_size=... |
ecbd943c92bf3361a98b8edea53e221a4d0e7247 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-LaunchServices/PyObjCTest/test_lsinfo.py | 0fcd2db61b4eaa4eb136a74ae2f9457997b0cebb | [
"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 | 17,085 | py | test_lsinfo.py | import os
import warnings
from PyObjCTools.TestSupport import TestCase, min_os_level, os_release, os_level_key
import objc
with warnings.catch_warnings():
warnings.filterwarnings("ignore")
import LaunchServices
class TestLSInfo(TestCase):
def setUp(self):
self.path = os.path.join(
os... |
5e3a9eca9988ab3b489484cc2e34ce4105e86210 | b38247a5d84d8b52ce8363f8dd81629cfbe17f65 | /reagent/test/ranking/seq2slate_utils.py | ba9caf83b747aa0bf3a78732239deb36dd5eb456 | [
"BSD-3-Clause"
] | permissive | facebookresearch/ReAgent | 7f2b82eaaf7a19e58cc50aacc307d7b001231440 | c5f1a8371a677b4f8fb0882b600bf331eba5259d | refs/heads/main | 2023-09-05T15:56:49.175072 | 2023-08-29T21:48:40 | 2023-08-29T21:48:40 | 98,565,575 | 1,480 | 290 | BSD-3-Clause | 2023-09-12T23:09:30 | 2017-07-27T17:53:21 | Python | UTF-8 | Python | false | false | 11,359 | py | seq2slate_utils.py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
import logging
import math
import tempfile
from itertools import permutations
import pytorch_lightning as pl
import reagent.core.types as rlt
import torch
import torch.nn as nn
from reagent.core.parameters import Seq2SlateP... |
9c62a47a8fbb331afcccecbaad161ea36c3f815f | dcd772f567ef8a8a1173a9f437cd68f211fb9362 | /ravenframework/Optimizers/acquisitionFunctions/ExpectedImprovement.py | eac639237a9240e6d0ac7beda89c72ef7929f6c9 | [
"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 | 5,235 | py | ExpectedImprovement.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 t... |
f64645241f91ba3803b8cdbefe297e9290e24047 | 59886a1143cc4043b19e398fae1fddb5742b4b55 | /src/main/python/rlbot/setup_manager.py | b107541f877a62e8f8b7adf88e2ae250ef0a5ef4 | [
"MIT"
] | permissive | RLBot/RLBot | a6c4f502403f02822b3e4078b27583226584432e | c2f7c9a07911691b112b5338008e2ec932e7aee0 | refs/heads/master | 2023-08-16T06:04:35.384448 | 2023-07-01T11:21:26 | 2023-07-01T11:21:26 | 80,671,678 | 482 | 138 | MIT | 2023-07-01T11:21:28 | 2017-02-01T22:36:52 | Python | UTF-8 | Python | false | false | 40,063 | py | setup_manager.py | import signal
import multiprocessing as mp
import os
import sys
import json
from dataclasses import dataclass
import psutil
import platform
import queue
import subprocess
import time
import webbrowser
from contextlib import contextmanager
from datetime import datetime, timedelta
from pathlib import Path
from typing i... |
f03da7b9011f1f33e586be12be9b17a22e41fd29 | f86035685ad272d5504ec4f5715feed428a89637 | /src/EIPTestsFiller/Pyspecs/cancun/eip4844_blobs/test_excess_blob_gas.py | 032ddb639fdb2520168c72758ab7c5c061ae1fcc | [
"MIT"
] | permissive | ethereum/tests | fd0206671a652e1550b1f64b1b34df191570ae7a | 9b00b68593f5869eb51a6659e1cc983e875e616b | refs/heads/develop | 2023-08-30T14:33:54.326595 | 2023-08-18T00:00:33 | 2023-08-19T13:03:12 | 15,540,967 | 507 | 338 | MIT | 2023-09-14T02:12:16 | 2013-12-31T02:09:03 | Python | UTF-8 | Python | false | false | 22,487 | py | test_excess_blob_gas.py | """
abstract: Tests `excessBlobGas` and `blobGasUsed` block fields for [EIP-4844: Shard Blob Transactions](https://eips.ethereum.org/EIPS/eip-4844)
Test `excessBlobGas` and `blobGasUsed` block fields for [EIP-4844: Shard Blob Transactions](https://eips.ethereum.org/EIPS/eip-4844).
note: Adding a new test
Add... |
6103daeb5f15af6f876a104244920f44e91607f5 | 8d77f3b72dc52b85ee0c4ef6ba06f63a6920841f | /python/aitemplate/compiler/ops/padding/pad_last_dim.py | 6def61e730b03e73241b86ae1814ec702bdfa2c2 | [
"Apache-2.0"
] | permissive | facebookincubator/AITemplate | b643c217e1d15f7f17dab1eb1cc6855eab664b97 | c60dc19788217556ba12ea378c02b9fd0aea9ffe | refs/heads/main | 2023-08-28T18:22:15.828008 | 2023-08-28T14:43:41 | 2023-08-28T14:43:41 | 514,321,895 | 4,065 | 334 | Apache-2.0 | 2023-09-14T04:53:57 | 2022-07-15T15:40:58 | Python | UTF-8 | Python | false | false | 3,103 | py | pad_last_dim.py | # 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... |
0a4f2cd3137e87ec639951780c25585fc21f5d3d | 704976ea552111c6a5af9cd7cb62b9d9abaf3996 | /rpython/jit/tool/oparser_model.py | a52d879f419656b801c11258ca3505ab9c51dec3 | [
"BSD-3-Clause"
] | permissive | mesalock-linux/mesapy | 4f02c5819ce7f2f6e249d34840f1aa097577645d | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | refs/heads/mesapy2.7 | 2023-08-16T21:33:02.239581 | 2019-08-13T10:29:43 | 2019-08-13T18:06:45 | 136,080,721 | 396 | 33 | NOASSERTION | 2020-04-01T03:05:18 | 2018-06-04T20:45:17 | Python | UTF-8 | Python | false | false | 4,846 | py | oparser_model.py | class Boxes(object):
pass
def get_real_model():
class LoopModel(object):
from rpython.jit.metainterp.history import TreeLoop, JitCellToken
from rpython.jit.metainterp.history import ConstInt, ConstPtr, ConstFloat
from rpython.jit.metainterp.history import BasicFailDescr, BasicFinalDescr... |
ce618000e59756a77fff313c6dabf22f2e5c46f0 | dd317f56cd0d93b66e174e93691dd09d4e191d30 | /tests/test_03_multiple_dependency.py | a5e585a9faf2bc1396a48b59eef52c7a1ca6cfb8 | [
"Apache-2.0"
] | permissive | RKrahl/pytest-dependency | 32f87a10b86d21c7ec201153570e41144ca443d0 | cab2f65ced816939a9041b9e67169073ef0ee412 | refs/heads/develop | 2023-04-27T13:06:40.853328 | 2022-02-17T17:06:21 | 2022-02-17T17:06:21 | 56,441,594 | 131 | 33 | Apache-2.0 | 2022-03-25T10:00:08 | 2016-04-17T14:46:54 | Python | UTF-8 | Python | false | false | 1,746 | py | test_03_multiple_dependency.py | """A complicated scenario with tests having multiple dependencies.
"""
import pytest
def test_multiple(ctestdir):
ctestdir.makepyfile("""
import pytest
@pytest.mark.dependency(name="a")
def test_a():
pytest.skip("explicit skip")
@pytest.mark.dependency(name="b")
... |
4a87d021a82c0a7b7fb83200ee07e61449d17f80 | df4361db61d10a10c46ed5f18973d89e4efda82c | /armi/materials/ht9.py | b2e63580e627b61b72db828e5dd9234e1743c61c | [
"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 | 2,945 | py | ht9.py | # Copyright 2019 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... |
f2c13db67e193e8b314ebc3106ae0671cfd83147 | 24db6985a016c3e4767c95ca51190e659d0847cd | /hacktivityctf2021/yabo/exploit.py | 785d759e9cc4f4df9606fe7500f1d70a7a9a2ab0 | [
"MIT"
] | permissive | datajerk/ctf-write-ups | 463f53db224410a51df481b9e41b7777a09f3e2c | c33815911de3f4a66cbafbf5f12d7b57239250d9 | refs/heads/master | 2022-09-30T02:29:44.097435 | 2022-09-05T02:16:19 | 2022-09-05T02:16:19 | 204,361,251 | 136 | 36 | null | null | null | null | UTF-8 | Python | false | false | 1,522 | py | exploit.py | #!/usr/bin/env python3
from pwn import *
from binascii import hexlify
binary = context.binary = ELF('./yabo')
if args.REMOTE:
p = remote('challenge.ctf.games', 32332)
else:
p = remote('127.0.0.1', 9999)
arg0 = b'./flag.txt'
shellcode = asm(f'''
/* open flag.txt */
xor eax, eax # eax = 0
xor ecx, ecx ... |
838f289137edba4673204a7b640bcb4f896e01db | 7efe08063fd383640455cc709ef04c889b8ebc42 | /test/functional/feature_notifications.py | 9fdfa7d83c9943ce0bdbc424cd8000effe98ce2f | [
"MIT"
] | permissive | litecoin-project/litecoin | 0d55434c63e41409f3c69b43199a9cb6bd256a83 | 5ac781487cc9589131437b23c69829f04002b97e | refs/heads/master | 2023-09-05T21:38:55.634991 | 2023-04-24T04:08:34 | 2023-05-12T06:47:49 | 4,646,198 | 4,040 | 4,600 | MIT | 2023-07-29T19:58:50 | 2012-06-13T04:18:26 | C++ | UTF-8 | Python | false | false | 7,574 | py | feature_notifications.py | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the -alertnotify, -blocknotify and -walletnotify options."""
import os
from test_framework.addres... |
995094a6e303aa40ebd5846a68aa65540f08632d | 1f7afd1360d14d7ebd6e48dd4328f384c8cdf486 | /examples/evaluation/plot_classification_report.py | 7d21371b4f51a47f83e622c651566d5073aeff14 | [
"MIT"
] | permissive | scikit-learn-contrib/imbalanced-learn | add5eef6af31ff229e8a99cc8767a76da83fc647 | 27bb6c7b0fab2dd0941ed56d2895478776c74f95 | refs/heads/master | 2023-08-31T21:40:03.484581 | 2023-08-09T08:39:17 | 2023-08-09T08:39:17 | 23,011,147 | 6,423 | 1,286 | MIT | 2023-09-07T14:08:47 | 2014-08-16T05:08:26 | Python | UTF-8 | Python | false | false | 1,584 | py | plot_classification_report.py | """
=============================================
Evaluate classification by compiling a report
=============================================
Specific metrics have been developed to evaluate classifier which has been
trained using imbalanced data. :mod:`imblearn` provides a classification report
similar to :mod:`sklea... |
fd03f0065dd6451a9c1cf08a038a781a7afffc28 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/lastfm/test_init.py | 2f126af11a3307882890151a7f514a1c00d1cf94 | [
"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 | 864 | py | test_init.py | """Test LastFM component setup process."""
from __future__ import annotations
from homeassistant.components.lastfm.const import DOMAIN
from homeassistant.core import HomeAssistant
from . import MockUser
from .conftest import ComponentSetup
from tests.common import MockConfigEntry
async def test_load_unload_entry(
... |
646cb5c5474efd6ba1107510e78ca7888123b406 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/py/py/_path/svnwc.py | b5b9d8d544a25253dab87a4f9d1bc3752f38ba06 | [
"Apache-2.0",
"MIT"
] | 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 | 43,825 | py | svnwc.py | """
svn-Command based Implementation of a Subversion WorkingCopy Path.
SvnWCCommandPath is the main class.
"""
import os, sys, time, re, calendar
import py
import subprocess
from py._path import common
#-----------------------------------------------------------
# Caching latest repository revision and repo-path... |
87e5d5124d3a054f02ed28390178d9073e78b104 | 80e7b99f9882fcabce36a97500d0d99937975a38 | /programming-language/cases/python/examples/py.test/example2_exception.py | 0ccee31ee67e1c70d343d7f388574b17afa6e882 | [
"Unlicense"
] | permissive | wdv4758h/notes | b1dcb06602a63e7fc94ff1fce817f34dd2be502e | 986cbd10b79b644c1a22a8a8426f14a016290500 | refs/heads/master | 2023-07-23T17:35:55.735741 | 2023-07-08T12:13:38 | 2023-07-08T13:11:17 | 24,794,858 | 148 | 22 | null | 2020-07-05T16:24:09 | 2014-10-04T16:36:12 | C++ | UTF-8 | Python | false | false | 292 | py | example2_exception.py | #!/usr/bin/env python
'''
you can use ``py.test -x`` to stop after first failure,
or use ``py.test --maxfail=N`` to stop after N failures.
'''
import pytest
def f():
raise SystemExit(1)
def test_f_fail():
f()
def test_f_pass():
with pytest.raises(SystemExit):
f()
|
8bb295747b199dedead32890c494878d29ed9752 | 378c63f88e266b35aa07f2691de768bd55f12637 | /actions/demo_ban_user.py | cccb6be346783b62e1d9aca42cb8ad33fa5cf51c | [
"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 | 515 | py | demo_ban_user.py | from flask import render_template
from godmode.actions.base import BaseAction
from godmode.acl import ACL
class DemoBanUserAction(BaseAction):
name = "ban"
title = "Ban"
acl = ACL.ADMIN
stay_on_page = True
style = "white-space: nowrap;"
methods = ["GET", "POST"]
def do_item_action(self, ... |
9e77ad9475691445f6400a4aabcc403ba1d81f93 | 572afc77a246acb9483b47fc9e1839f47005d736 | /python/fate_client/flow_client/flow_cli/commands/key.py | fd2f0451667148ffe39b029b27a8a58ff2bac20e | [
"Apache-2.0"
] | permissive | FederatedAI/FATE | 7c787c308cca9ff46f287d24569c68de0a1cac07 | 8767db5ec0cb93784f64b290bc39b7b545c530fb | refs/heads/master | 2023-08-17T10:13:00.302529 | 2023-06-14T07:01:38 | 2023-06-14T07:01:38 | 167,349,656 | 4,942 | 1,571 | Apache-2.0 | 2023-09-14T07:02:29 | 2019-01-24T10:32:43 | Python | UTF-8 | Python | false | false | 2,153 | py | key.py | #
# Copyright 2019 The FATE 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... |
7282a56210de13af30da88f9fa357b77798c61dc | 568a2667a1b6ec33a0dec9ac01844ef74e11ab2b | /landlab/components/species_evolution/zone_taxon.py | a2207762c861f4ff2cf41a36565ec4ada554505a | [
"MIT"
] | permissive | landlab/landlab | 0bcc9b7b1d8c4d7f79bad687e1526b80ebc83728 | 1cd72e5832ece1aa922cd1b239e2e94ed0f11f8b | refs/heads/master | 2023-08-31T07:24:21.545523 | 2023-08-29T18:51:06 | 2023-08-29T18:51:06 | 19,599,383 | 326 | 313 | MIT | 2023-09-14T19:12:23 | 2014-05-09T04:52:50 | Python | UTF-8 | Python | false | false | 14,012 | py | zone_taxon.py | #!/usr/bin/env python
"""ZoneTaxon object of SpeciesEvolver."""
import numpy as np
from pandas import Series
from .base_taxon import Taxon
class ZoneTaxon(Taxon):
"""A taxon based in zones.
A ``ZoneTaxon`` is composed of members of a lower taxonomic level that each
exists within a ``Zone`` object. Taxon... |
2f0b5486b196d8fcccc64bf6a5c9f71f429674c9 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /pytorch/source/caffe2/python/operator_test/flatten_op_test.py | 19d204e0bdededf4bd30b0551b1a32e1d6e28d26 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 1,067 | py | flatten_op_test.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from hypothesis import given
import numpy as np
from caffe2.python import core
import caffe2.python.hypothesis_test_util as hu
class TestFlatten(hu.HypothesisTestCase)... |
d12164bd8dbcd9e0f274654ceb6348921120f0ed | 9dd2bc9409bcdd7749cf0bad79092cd204200eb5 | /examples/rest/universal-snapshot.py | 1ab5e80482589fcd4f7a33d6d8d0229fdfe45634 | [
"MIT"
] | permissive | polygon-io/client-python | b36ccdd380fdf4b9ec344c3e9d43eaab0ce313cc | 195d3a2894b979c4ad86c6bd170b674e09c30d9d | refs/heads/master | 2023-08-29T12:04:36.823546 | 2023-08-28T16:19:25 | 2023-08-28T16:19:25 | 216,660,192 | 574 | 189 | MIT | 2023-09-11T19:50:33 | 2019-10-21T20:33:17 | Python | UTF-8 | Python | false | false | 1,323 | py | universal-snapshot.py | from typing import cast, Iterator, Union
from urllib3 import HTTPResponse
from polygon import RESTClient
from polygon.rest.models import UniversalSnapshot, SnapshotMarketType
# docs
# https://polygon.io/docs/stocks/get_v3_snapshot
# https://polygon-api-client.readthedocs.io/en/latest/Snapshot.html
# client = RESTClie... |
72e5c6208bea2ec38a32b877e317f6d2337078bc | 98810fbf90a42028915a88bfac9fb8cb8681008e | /azure-devops/azext_devops/test/team/test_team.py | 3c332d6bb2fcd2adeb1c1a3fb43b7508b27b9bcb | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unicode",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"PSF-2.0",
"PostgreSQL",
"LicenseRef-scancode-python-cwi",
"LGPL-2.1-or-later",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.1-only",
"C... | permissive | Azure/azure-devops-cli-extension | ba87357a8243e1318f100791fc32acbb59448d05 | bd34a6fd0658a15dadf6c09c7f6217ca5ffa662b | refs/heads/master | 2023-08-29T10:56:54.228674 | 2023-07-17T04:37:06 | 2023-07-17T04:37:06 | 107,708,057 | 419 | 208 | MIT | 2023-08-02T02:10:10 | 2017-10-20T17:39:11 | Python | UTF-8 | Python | false | false | 7,141 | py | test_team.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
458995e679a1513e2fd656e5fa8698b85695b871 | c058f51b99f91faebf27183b2b579e9f96e0d8f5 | /botorch/models/kernels/categorical.py | 56f9258726a090bc01e5bf3868f6e209533802a6 | [
"MIT"
] | permissive | pytorch/botorch | 255d62f698cc615c750e9343c278a63c7e96a586 | 4cc5ed59b2e8a9c780f786830c548e05cc74d53c | refs/heads/main | 2023-08-22T15:23:51.071048 | 2023-08-22T05:30:38 | 2023-08-22T05:30:38 | 142,940,093 | 2,891 | 373 | MIT | 2023-09-13T00:16:13 | 2018-07-30T23:59:57 | Jupyter Notebook | UTF-8 | Python | false | false | 1,198 | py | categorical.py | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
from gpytorch.kernels.kernel import Kernel
from torch import Tensor
class CategoricalKernel(Kernel):
... |
73fd460008b3497c697eeba773cf473a9f8abcca | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/servicenetworking/_enums.py | 12a206f094a218cb1f320963660b3f1e0cdb3044 | [
"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 | 308 | 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__ = [
'AssociationType',
]
class AssociationType(str, Enum):
"""
Association Type
"""
SUBNETS = "subnets"
|
1c21be18d7e078879df9ef1ab6dbaab6011d118a | 9fcb5164ff77e8cf48d860485fed262d36ed63e7 | /packages/dcos-integration-test/extra/test_service_discovery.py | 565262111854b527b96aae9728e6647f7654d8e4 | [
"Apache-2.0",
"MIT",
"LicenseRef-scancode-oracle-bcl-javase-javafx-2012",
"ErlPL-1.1",
"MPL-2.0",
"ISC",
"BSL-1.0",
"Python-2.0",
"BSD-2-Clause"
] | permissive | dcos/dcos | 2415d298979c6d6e3183aeb64c906a0959863576 | 79b9a39b4e639dc2c9435a869918399b50bfaf24 | refs/heads/master | 2023-08-09T04:16:19.696621 | 2021-07-05T06:42:39 | 2021-07-05T06:42:39 | 56,184,050 | 2,613 | 641 | Apache-2.0 | 2023-07-27T04:13:50 | 2016-04-13T20:31:58 | Python | UTF-8 | Python | false | false | 15,270 | py | test_service_discovery.py | import collections
import logging
import socket
from typing import Any, Optional
import pytest
import requests
import retrying
import test_helpers
from dcos_test_utils import marathon
from dcos_test_utils.dcos_api import DcosApiSession
__maintainer__ = 'urbanserj'
__contact__ = 'dcos-networking@mesosphere.io'
DNS_E... |
53e6b8d88f336b9ca8f6adcd6a9fd84b272be643 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-cdk/python/unit_tests/sources/declarative/retrievers/test_simple_retriever.py | d4c69ffef9bb538c2ba8f1b54e9b1232e9ec25ec | [
"MIT",
"Apache-2.0",
"BSD-3-Clause",
"Elastic-2.0"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 25,114 | py | test_simple_retriever.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from unittest.mock import MagicMock, patch
import airbyte_cdk.sources.declarative.requesters.error_handlers.response_status as response_status
import pytest
import requests
from airbyte_cdk.models import AirbyteLogMessage, AirbyteMessage, Level, SyncMode, T... |
6de2084e7f96ff0b28dcfa5d8f8c7d24107b51d9 | ac2f43c8e0d9649a7f063c59b3dffdfed9fd7ed7 | /tests2/tests/cloudripper/test_i2c_driver_presence.py | 4b789f4065e7c78d6392daaec4b9a0073e5b8ba3 | [] | no_license | facebook/openbmc | bef10604ced226288600f55248b7f1be9945aea4 | 32777c66a8410d767eae15baabf71c61a0bef13c | refs/heads/helium | 2023-08-17T03:13:54.729494 | 2023-08-16T23:24:18 | 2023-08-16T23:24:18 | 31,917,712 | 684 | 331 | null | 2023-07-25T21:19:08 | 2015-03-09T19:18:35 | C | UTF-8 | Python | false | false | 1,600 | py | test_i2c_driver_presence.py | #!/usr/bin/env python3
#
# Copyright 2020-present Facebook. All Rights Reserved.
#
# This program file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; version 2 of the License.
#
# This program is distributed ... |
2137a93a916c5db5887d1ecfcd9839bee8dbf7a0 | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/pytests/unit/states/zabbix/test_valuemap.py | bc589d7bc92b9cb1bf56f6d8006ee1e6cc2179fc | [
"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 | 7,841 | py | test_valuemap.py | """
:codeauthor: :email:`Jakub Sliva <jakub.sliva@ultimum.io>`
"""
import pytest
import salt.states.zabbix_valuemap as zabbix_valuemap
from tests.support.mock import MagicMock, patch
@pytest.fixture
def input_params():
return {
"mappings": [
{"newvalue": "OK", "value": "0h"},
... |
782c14fe5df3867c8f31dd1cc15070011440eb87 | e76a79816ff5203be2c4061e263a09d31072c940 | /third-party/py/pex/pex/pex.py | a928248558f25dbc552455e18c30deead440bd7e | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | facebook/buck | ef3a833334499b1b44c586e9bc5e2eec8d930e09 | 9c7c421e49f4d92d67321f18c6d1cd90974c77c4 | refs/heads/main | 2023-08-25T19:30:28.803205 | 2023-04-19T11:32:59 | 2023-04-19T11:32:59 | 9,504,214 | 8,481 | 1,338 | Apache-2.0 | 2023-05-04T22:13:59 | 2013-04-17T18:12:18 | Java | UTF-8 | Python | false | false | 17,019 | py | pex.py | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, print_function
import os
import subprocess
import sys
from contextlib import contextmanager
from distutils import sysconfig
from site import USER_S... |
d3c94ed180a7288ebdba249b25efe1922d5e16f7 | 54292bb222c6525217458e92ddacfc4e2635b83e | /python/phonenumbers/data/alt_format_62.py | 7cda9598359526faf50dc6d50a4dc028c79533b4 | [
"Apache-2.0"
] | permissive | daviddrysdale/python-phonenumbers | 0d69b48033d1464c0a6c358274062f1db2ee8c4a | 2f06ef6db2ca83f3856fbb8019a0c665f5971b13 | refs/heads/dev | 2023-08-31T09:37:20.570690 | 2023-08-22T05:18:22 | 2023-08-22T05:18:22 | 1,643,611 | 2,944 | 406 | Apache-2.0 | 2023-08-08T06:49:07 | 2011-04-21T03:06:38 | Python | UTF-8 | Python | false | false | 806 | py | alt_format_62.py | """Auto-generated file, do not edit by hand. 62 metadata"""
from ..phonemetadata import NumberFormat
PHONE_ALT_FORMAT_62 = [NumberFormat(pattern='(\\d{2})(\\d{3,4})(\\d{4})', format='\\1 \\2 \\3', leading_digits_pattern=['2[124]|[36]1']), NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{5})', format='\\1 \\2 \\3', leading_d... |
ade31c7a395c3210c0945a847f22009ad5abee79 | 1742b6719b988e5519373002305e31d28b8bd691 | /sdk/python/pulumi_aws/oam/get_sinks.py | c769b4bc884dd073a0f9f474c817736cfd2f638b | [
"MPL-2.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-aws | 4f7fdb4a816c5ea357cff2c2e3b613c006e49f1a | 42b0a0abdf6c14da248da22f8c4530af06e67b98 | refs/heads/master | 2023-08-03T23:08:34.520280 | 2023-08-01T18:09:58 | 2023-08-01T18:09:58 | 97,484,940 | 384 | 171 | Apache-2.0 | 2023-09-14T14:48:40 | 2017-07-17T14:20:33 | Java | UTF-8 | Python | false | false | 2,158 | py | get_sinks.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... |
34d0c4af9e45566377e35ea32e452f54a0c97565 | 3ca67d69abd4e74b7145b340cdda65532f90053b | /programmers/난이도별/level01.문자열_다루기_기본/HyeonJeong.py | fa9b20b4a111e7ec133d36eabf824fc242913358 | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 279 | py | HyeonJeong.py | def solution(s):
# 조건에 안맞는 것들을 바로 return 시키면 더 효율적인 코드가 됨.
if len(s) != 4 and 6 :
return False
for i in s :
if i not in "0123456789":
return False
return True
print(solution("a234"))
|
791f2276117c68c9e329371791dff814b392b319 | 5de2fda1683fd85ef9093d9cae4d18485e767da2 | /tests/hamcrest_unit_test/collection/is_empty_test.py | 44b5292f033cb4a41e1a1c68c847d028e017e7eb | [
"BSD-3-Clause"
] | permissive | hamcrest/PyHamcrest | 073fd46145290f3e932513abdd5d0471d85e4c7b | 8f160f83762e011af93194c38e84be9d91012fe9 | refs/heads/main | 2023-08-31T07:42:35.980553 | 2023-08-30T20:27:48 | 2023-08-30T20:27:48 | 1,194,778 | 654 | 116 | NOASSERTION | 2023-08-30T20:27:49 | 2010-12-24T02:55:56 | Python | UTF-8 | Python | false | false | 1,709 | py | is_empty_test.py | from hamcrest.library.collection.is_empty import empty
from hamcrest_unit_test.matcher_test import MatcherTest
__author__ = "Chris Rose"
__copyright__ = "Copyright 2012 hamcrest.org"
__license__ = "BSD, see License.txt"
class LengthHaver(object):
def __init__(self, len_):
self._len = len_
def __len_... |
504d60577f7e55a15ee7f0b7e997a57afe74474e | 8a40c574871927b120defd07b9b15bd78bceb09d | /uarray/tests/test_uarray.py | cacd9d192545b3a21d1e0a5716ef2b6c43f42b64 | [
"BSD-3-Clause"
] | permissive | Quansight-Labs/uarray | c2f677e78a88b6012816fd04caf1d6e314947806 | d895d6821589a9b63a960b9912282ba2b1ce9553 | refs/heads/master | 2022-09-02T19:26:55.283378 | 2022-08-17T04:04:40 | 2022-08-17T04:04:40 | 145,463,966 | 101 | 31 | BSD-3-Clause | 2022-08-17T04:04:41 | 2018-08-20T19:53:58 | C++ | UTF-8 | Python | false | false | 15,173 | py | test_uarray.py | import uarray as ua
import pickle
import pytest # type: ignore
@pytest.fixture(scope="function", autouse=True)
def cleanup_backends():
with ua.reset_state():
yield
class Backend:
__ua_domain__ = "ua_tests"
class DisableBackend:
def __init__(self, domain="ua_tests"):
self.__ua_domain_... |
fef208a02f614e3bd34b75d95a5a4bb1428bf9a8 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/ut/python/nn/probability/distribution/test_categorical.py | fa8598b879eb63880699a7c9e240db655e109cf2 | [
"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 | 8,014 | py | test_categorical.py | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
a4fc7c5a8599e10ea4b3c0a74333e04ad5bd7b98 | 952dc66c61966f099756cdb6c2d13b40352f63cc | /zerver/migrations/0044_reaction.py | 6d2db44e49eb660b6e4d0e247233f336bf39150a | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | zulip/zulip | 5ae6aad35fd9f72996c0a2a9cdd674400966ebf6 | 965a25d91b6ee2db54038f5df855215fa25146b0 | refs/heads/main | 2023-08-28T23:43:00.971110 | 2023-08-28T16:47:09 | 2023-08-28T19:33:02 | 43,160,685 | 20,239 | 8,996 | Apache-2.0 | 2023-09-14T20:57:47 | 2015-09-25T16:37:25 | Python | UTF-8 | Python | false | false | 1,272 | py | 0044_reaction.py | import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("zerver", "0043_realm_filter_validators"),
]
operations = [
migrations.CreateModel(
name="Reaction",
... |
fcc405bf3c35535b8fde695aba3facaccfa1926e | ad61cc119a42abfd3d64224a753817ae0f9ba058 | /tests/functional/elb/test_configure_health_check.py | 67fb1d75ef9744998cb26dd770610cfe0747d2d9 | [
"Apache-2.0"
] | permissive | aws/aws-cli | 30b0e5b0fb6d736f1540990955f0a7351ee7a908 | 147d16dfdb72dc9cf362b676a57e46a49375afbd | refs/heads/develop | 2023-09-03T19:52:07.955543 | 2023-09-01T20:37:50 | 2023-09-01T20:37:50 | 6,780,767 | 13,038 | 4,107 | NOASSERTION | 2023-09-13T19:48:11 | 2012-11-20T16:07:36 | Python | UTF-8 | Python | false | false | 2,737 | py | test_configure_health_check.py | #!/usr/bin/env python
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in ... |
b278f91f6018268cbf5eef74c773bedc12ea3369 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/setuptools/py3/setuptools/_imp.py | 9d4ead0eb036be85c7681c74ef933969de0a6ceb | [
"Apache-2.0",
"MIT"
] | 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 | 2,433 | py | _imp.py | """
Re-implementation of find_module and get_frozen_object
from the deprecated imp module.
"""
import os
import importlib.util
import importlib.machinery
from importlib.util import module_from_spec
PY_SOURCE = 1
PY_COMPILED = 2
C_EXTENSION = 3
C_BUILTIN = 6
PY_FROZEN = 7
def find_spec(module, paths):
finder =... |
073465b149e7b250e34f802ba30c3bbff8db5406 | 0ca218c0f54dac33a2ade4accfdf8f5be3207588 | /lib/sqlalchemy/orm/path_registry.py | 2cd8a1412c4d2e1b91b913970088b8e839b0e702 | [
"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 | 25,626 | py | path_registry.py | # orm/path_registry.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
"""Path tracking utilities, representing mapper graph traversals.
"""
from __... |
5454f5d95b96a153c06f3ceca1907231ff22cb58 | 3e00405025535eb1a1829b70f9e984ea9bb76fc5 | /poshc2/server/Implant.py | 582470e0581f110afa12b67326bc9ad93e8a57d9 | [
"BSD-3-Clause"
] | permissive | nettitude/PoshC2 | 5d1fdfbd53ee82e6fb145bde5cbb1afc6b2067ed | 517903431ab43e6d714b24b0752ba111f5d4c2f1 | refs/heads/master | 2023-08-24T17:45:43.198409 | 2022-07-12T11:12:28 | 2022-08-01T09:09:15 | 141,987,967 | 1,378 | 299 | BSD-3-Clause | 2023-07-23T22:14:04 | 2018-07-23T08:53:32 | PowerShell | UTF-8 | Python | false | false | 8,606 | py | Implant.py | import urllib, base64, http.client, re
from datetime import datetime, timezone
from poshc2.Colours import Colours
from poshc2.Utils import randomuri, gen_key
from poshc2.server.Config import PayloadsDirectory, PayloadTemplatesDirectory, Jitter, NotificationsProjectName
from poshc2.server.Core import get_images
from po... |
b195a56d55fd82ce128d21e28c54886add6f88c7 | 4f14b1901d909b0b917d35815e7b19233692f25b | /time-based-one-time-password-tools/totp.py | f61eb9c60cc39fbd3bc31d912a043488fb06e2fa | [] | no_license | nayuki/Nayuki-web-published-code | e61a761e5c188aeacd35e5c8ddd005460545c94e | 49414617b088ec4c4e339a6c1caa7ec0f40eb58f | refs/heads/master | 2023-08-24T10:54:42.862243 | 2023-03-14T05:29:56 | 2023-03-14T05:29:56 | 25,706,873 | 133 | 53 | null | 2017-02-20T08:39:16 | 2014-10-24T20:33:24 | Java | UTF-8 | Python | false | false | 4,860 | py | totp.py | #
# Time-based One-Time Password tools (Python)
#
# Copyright (c) 2020 Project Nayuki. (MIT License)
# https://www.nayuki.io/page/time-based-one-time-password-tools
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"),... |
539fc15d08bab0e86007c157c564de41b7e29f7b | 77861deda8b3046bdda221d3cb80b77e84b14523 | /iterater-over-bits/scripts/print_table.py | 6c6d91053c5cbd878dd8ab6911c06b938ad97b1d | [
"BSD-2-Clause"
] | permissive | WojciechMula/toys | b73f09212ca19f1e76bbf2afaa5ad2efcea95175 | 6110b59de45dc1ce44388b21c6437eff49a7655c | refs/heads/master | 2023-08-18T12:54:25.919406 | 2023-08-05T09:20:14 | 2023-08-05T09:20:14 | 14,905,115 | 302 | 44 | BSD-2-Clause | 2020-04-17T17:10:42 | 2013-12-03T20:35:37 | C++ | UTF-8 | Python | false | false | 1,855 | py | print_table.py | from table import Table
def print_report(path):
table1 = Table()
table2 = Table()
header_common = [
"case",
"size [bits]",
"cardinality [bits]",
"fill factor",
]
table1.set_header(header_common + [
"naive [us]",
"better [us]",
"block-3 [us]... |
c3f1b08b2731cc1e55cf904527c85b973c6f2ec4 | d7697a668e560e0447bc2844baa48d747cf1e70b | /examples/Calculator/Calculator.py | c66ee732b2cdea6ec2cc3d2640a6fd49e01e11e9 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"WxWindows-exception-3.1",
"LGPL-2.0-or-later"
] | permissive | wxGlade/wxGlade | 4bdfb98ea305163fa2187c0a59dd8e8612974163 | 828515e217c4733d38c57ed88d853e983a2008f2 | refs/heads/master | 2023-09-01T15:49:41.152236 | 2023-08-26T16:34:36 | 2023-08-26T16:34:36 | 126,486,431 | 275 | 59 | MIT | 2023-05-02T18:27:53 | 2018-03-23T13:06:05 | Python | UTF-8 | Python | false | false | 4,045 | py | Calculator.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.8.0a6 on Thu Nov 02 22:44:22 2017
#
import wx
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class CalculatorFrame(wx.Frame):
def __init__(self, *args, **kwds):
# begin wxGlade: CalculatorFra... |
d5d55431cdf55dd6af490769a3faa966ad4c622d | 32c61e92b792c3572287033ef5051fd67ef9c912 | /tooz/drivers/file.py | eb26eb0d69534378e61746521b7f51623b6eddc8 | [
"Apache-2.0"
] | permissive | openstack/tooz | 8095697e973635f49e104a0bbc8e34e2231a3b91 | 702ea408b2d5c2b2ee27d56d4eeef1ce0263a1b9 | refs/heads/master | 2023-09-02T07:29:42.602556 | 2023-08-11T11:10:40 | 2023-08-11T11:10:40 | 14,909,684 | 115 | 64 | Apache-2.0 | 2018-03-05T21:15:45 | 2013-12-04T00:18:39 | Python | UTF-8 | Python | false | false | 20,558 | py | file.py | # -*- coding: utf-8 -*-
#
# Copyright © 2015 eNovance
#
# 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... |
6076246eea3c58921fd70e51f98880739a69b229 | eaba398a0ca5414c10dd1890e662fdcd87e157b6 | /jirafs/constants.py | ccf01bc46d7b981db0b5986970f7fe40661ef465 | [
"MIT"
] | permissive | coddingtonbear/jirafs | a78f47e59836d9a6024bc287ea2a1247fb297e62 | 778cba9812f99eeaf726a77c1bca5ae2650a35e9 | refs/heads/development | 2023-06-16T00:06:33.262635 | 2022-09-20T04:06:26 | 2022-09-20T04:06:26 | 21,588,191 | 125 | 17 | MIT | 2023-06-02T05:48:53 | 2014-07-07T21:54:20 | Python | UTF-8 | Python | false | false | 1,156 | py | constants.py | from environmental_override import override # noqa
from jirafs import __version__ as version
# Metadata filenames
TICKET_DETAILS = "fields.jira"
TICKET_COMMENTS = "comments.read_only.jira"
TICKET_NEW_COMMENT = "new_comment.jira"
TICKET_LINKS = "links.jira"
TICKET_FILE_FIELD_TEMPLATE = "{field_name}.jira"
# Generic ... |
54bdc47a07f8a9a25488feab898ab7c3c1cb78ad | 54292bb222c6525217458e92ddacfc4e2635b83e | /python/phonenumbers/data/region_CH.py | dba35cd8d469d5ee52182ec221c26f9b73165b56 | [
"Apache-2.0"
] | permissive | daviddrysdale/python-phonenumbers | 0d69b48033d1464c0a6c358274062f1db2ee8c4a | 2f06ef6db2ca83f3856fbb8019a0c665f5971b13 | refs/heads/dev | 2023-08-31T09:37:20.570690 | 2023-08-22T05:18:22 | 2023-08-22T05:18:22 | 1,643,611 | 2,944 | 406 | Apache-2.0 | 2023-08-08T06:49:07 | 2011-04-21T03:06:38 | Python | UTF-8 | Python | false | false | 2,072 | py | region_CH.py | """Auto-generated file, do not edit by hand. CH metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_CH = PhoneMetadata(id='CH', country_code=41, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='8\\d{11}|[2-9]\\d{8}', possible_length=(9... |
a4bbf0c32df36a852e893b3d284566f37eb23c88 | bba97d00eba0c3de8a081e61ed6711f138d6babd | /scripts/db_migration/update_build_items.py | 4258008c0e0c9db7aa6425c8cdab5b83a9d97eb7 | [
"Apache-2.0"
] | permissive | keithrozario/Klayers | a6df271a7f72c8b2ae9d2025ff030cff09bd5b75 | 026ebed4a3de0018418638e37d6453253aa48f0e | refs/heads/master | 2023-09-04T12:33:32.454360 | 2023-09-04T08:44:18 | 2023-09-04T08:44:18 | 164,266,648 | 1,725 | 276 | NOASSERTION | 2023-09-04T08:44:19 | 2019-01-06T01:49:43 | Python | UTF-8 | Python | false | false | 1,122 | py | update_build_items.py | """
Add the package fields to build items.
Derived from the sk field
"""
import boto3
profile = "KlayersProdP38"
# profile = 'KlayersDev'
config = {"table_name": "kl.Klayers-prodp38.db", "region": "us-east-2"}
# config = {'table_name': 'kl.Klayers-devp38.db', 'region': 'us-west-2'}
# config = {'table_name': 'kl.Klaye... |
5b6cbc2059d3161b66164d431c43cdde7fc17ef1 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/ops/cpu/test_cdist_grad_op.py | 1e361754ba693a7d87def6f32da1341aade6aede | [
"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 | 4,643 | py | test_cdist_grad_op.py | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
d38188d6f38e3f7661f7f8ad11b0a84a3373706e | 6b27c39edc10b1353104043b7a523f4981c99ef2 | /pytype/pytd/type_match.py | 6e24aaa1a42192591c5018b3764e51fcb05c9c90 | [
"Apache-2.0",
"MIT"
] | permissive | google/pytype | ad0ff0b6c1083b4f0a1af1747869d422f2b5f4d8 | bda0b9547af9a084bb2bd1427f58dcde968e48b5 | refs/heads/main | 2023-08-26T17:52:23.546035 | 2023-08-24T22:48:00 | 2023-08-24T22:48:00 | 32,483,713 | 4,595 | 367 | NOASSERTION | 2023-09-13T04:40:45 | 2015-03-18T20:52:08 | Python | UTF-8 | Python | false | false | 21,616 | py | type_match.py | """Match pytd types against each other.
"Matching" x against y means roughly: If we have a function f(param: y) and
a type x, would we be able to pass (an instance of) x to f. (I.e.,
"execute f(x)"). So for example, str would "match" against basestring, and
list[int] would match against list[Number].
This is used for... |
62332bdbc0de79f9481dd77afc0838cc15d552fa | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-meta/amundsen/frontend/amundsen_application/api/utils/search_utils.py | f582a57b2836cab400faa95038a708cbe327ff18 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MIT"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 5,040 | py | search_utils.py | # Copyright Contributors to the Amundsen project.
# SPDX-License-Identifier: Apache-2.0
import logging
from typing import Dict, List # noqa: F401
from http import HTTPStatus
from flask import current_app as app
from amundsen_application.api.utils.request_utils import request_search
from amundsen_common.models.sea... |
72556d93b5cb2de0673008b8a481d044ef78ed70 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /pytorch/source/caffe2/python/brew.py | bb6d3f0c3fcf9d6715cd4b6d41cc59e92e4ea353 | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 4,417 | py | brew.py | ## @package model_helper_api
# Module caffe2.python.model_helper_api
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import sys
import copy
import inspect
from past.builtins import basestring
from caffe2.python.model_h... |
cebdbb92b516bb2e2f924e14d81e1445a06c9fb0 | e1ab23a4010a411e0435540e7a98abc6bf02352e | /scripts/check_crash_newmonkey.py | d66a709717e4e68391577771e37ab09dd53af551 | [
"MIT"
] | permissive | the-themis-benchmarks/home | 05ef5c17d4d9c996ef37aa24336c3ef445396ff0 | aeb0e6005c51ff2bde8c369e97c33b80e194ea4a | refs/heads/master | 2023-07-05T20:17:11.192700 | 2023-07-04T09:44:17 | 2023-07-04T09:44:17 | 290,040,967 | 107 | 20 | MIT | 2023-07-04T09:44:18 | 2020-08-24T21:11:53 | Python | UTF-8 | Python | false | false | 47,572 | py | check_crash_newmonkey.py | # This file aims to do quick crash checking
import csv
import datetime
import os
import shutil
import subprocess
import time
from argparse import ArgumentParser, Namespace
from typing import List, Dict, Set
ALL_APPS = ['ActivityDiary', 'AmazeFileManager', 'and-bible', 'AnkiDroid', 'APhotoManager', 'commons... |
888d2418623333eaf2c6b92cebe80b22f8998ea7 | 645a7db93e9d7a4f3074ad482a1f57071556d2c4 | /tests/test_module.py | 5f802818c8ceb865432f077116791fe29ef648b4 | [
"Apache-2.0"
] | permissive | monobot/asyncorm | 852152c08b2dca3020699588bb675b188c1b89f3 | 6342e2d5fbaa22fb368aead772ac4f255df7562a | refs/heads/development | 2023-07-20T09:17:00.568299 | 2020-08-20T10:30:30 | 2020-08-20T10:30:30 | 82,396,221 | 207 | 20 | NOASSERTION | 2023-07-07T03:01:37 | 2017-02-18T15:31:32 | Python | UTF-8 | Python | false | false | 2,159 | py | test_module.py | from asyncorm.application.configure import configure_orm, get_model, orm_app
from asyncorm.exceptions import AsyncOrmAppError, AsyncOrmModelError, AsyncOrmModelNotDefined
from asyncorm.test_case import AsyncormTestCase
Book = get_model("Book")
db_config = {"database": "asyncorm", "host": "localhost", "user": "ormdbus... |
89e3b77cf75c7caa4f7f50044409c441ee040e95 | 2337351b228818e41be3002bd38f68f77c2aa074 | /services/card/cards/path.py | 728c7d9171e2e2bdc88b59dc88b497f72afa700f | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 1,585 | py | path.py | # ----------------------------------------------------------------------
# Path
# ----------------------------------------------------------------------
# Copyright (C) 2007-2017 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Third-party modules
im... |
88576daf8b12aec26af13483581aee6d5c129700 | 99199db3f78a344e72b281c71c690518ae07375a | /octavia/api/root_controller.py | 272fad78d1602b51c17dec99dd9114fdb4374762 | [
"Apache-2.0"
] | permissive | openstack/octavia | 3faf2afe2ade5bd3978bb3a0558d2eeefc648ba2 | 0426285a41464a5015494584f109eed35a0d44db | refs/heads/master | 2023-09-01T20:12:48.272344 | 2023-08-31T17:24:04 | 2023-08-31T17:24:04 | 21,018,188 | 147 | 180 | Apache-2.0 | 2021-03-30T12:34:30 | 2014-06-19T22:47:19 | Python | UTF-8 | Python | false | false | 6,862 | py | root_controller.py | # Copyright 2014 Rackspace
#
# 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 agree... |
3dbc3a391abb0d7c39f04a090698036730548e02 | 532ad1aedff8528b2e8af4e4e752f32d58b92b0d | /aesara/compile/compilelock.py | bdd895fff7ac68e0764a793ccfaeb9d48ec1b212 | [
"BSD-3-Clause",
"MIT"
] | permissive | aesara-devs/aesara | ebaa204159d4ddb94ede10580c5b8e39d114713f | b5a3cf45f0f6762bb4bb0e2c657f7d3822c74595 | refs/heads/main | 2023-08-09T10:56:56.528283 | 2023-07-15T06:15:49 | 2023-07-15T13:28:29 | 221,231,590 | 861 | 142 | NOASSERTION | 2023-09-05T03:16:16 | 2019-11-12T14:02:08 | Python | UTF-8 | Python | false | false | 2,041 | py | compilelock.py | """
Locking mechanism to ensure no two compilations occur simultaneously
in the same compilation directory (which can cause crashes).
"""
import os
import threading
from contextlib import contextmanager
from typing import Optional, Union
import filelock
from aesara.configdefaults import config
__all__ = [
"forc... |
eda48384b6609db04656ef39ac079f1291fcad71 | 1dbbb05b30d27c6419b9f34eea3b9a47f92582a0 | /parlai/tasks/convai2/agents.py | 6811226d64863c5959f3f884677247ffe66815ab | [
"MIT",
"CC-BY-4.0"
] | permissive | facebookresearch/ParlAI | 815334323d0ebef51bf9837336fe3eef6fe1655d | e1d899edfb92471552bae153f59ad30aa7fca468 | refs/heads/main | 2023-08-31T22:20:45.918129 | 2023-08-14T19:39:56 | 2023-08-14T19:39:56 | 89,266,735 | 10,943 | 2,395 | MIT | 2023-09-13T23:07:40 | 2017-04-24T17:10:44 | Python | UTF-8 | Python | false | false | 7,372 | py | agents.py | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.core.teachers import FbDeprecatedDialogTeacher, YamlTeacher
from parlai.utils.data import DatatypeHelper
fro... |
ce9bac8a2748531556b7be2b9ba6786c4ecaef7a | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/addImport/newLastImportInProjectGroup/main.py | 1a5843fae36318c592afe2040220ab273ae3b9d4 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 37 | py | main.py | import sys
import a
print(sys, a, b) |
75ac83359fd3475438c009ca140ecbb9b99c2d0f | da5bcb4a92a802dedf84a74dc2ee4c08cb744656 | /will/plugins/devops/pagerduty.py | d09a50b8ed1168006cab656753e775157c48ab9e | [
"MIT"
] | permissive | skoczen/will | 21981ba1213a49b650d661feb59d69719918446c | 27a23ce47e3ec11b94f3355c2d2ee94c1958679c | refs/heads/master | 2023-08-16T00:03:47.974919 | 2021-04-13T10:31:26 | 2021-04-13T10:31:26 | 14,900,247 | 359 | 186 | MIT | 2023-01-15T17:34:57 | 2013-12-03T17:08:08 | Python | UTF-8 | Python | false | false | 7,356 | py | pagerduty.py | from will.plugin import WillPlugin
from will.decorators import respond_to, periodic, hear, randomly, route, rendered_template, require_settings
from will import settings
import datetime
import pygerduty
class PagerDutyPlugin(WillPlugin):
@staticmethod
def _associate_pd_user(email_address, pager):
tr... |
bedb88273850159a19fa815ba794be82e9019739 | bade5b29e8ba58adbe440f8eda491e43b2155132 | /pronto/entity/attributes.py | 1f7f8ac069c52f64c7dd5877d15dec10a30bf393 | [
"MIT"
] | permissive | althonos/pronto | 72697bd0aa0e69b728d70038d340b546de2d5b76 | 9e11c06e71c24685404fc1d0d3a560f4e2cdd3de | refs/heads/master | 2023-08-20T19:46:30.418518 | 2023-08-17T10:27:39 | 2023-08-17T10:27:39 | 62,424,052 | 228 | 60 | MIT | 2023-09-04T04:39:11 | 2016-07-01T23:02:01 | Python | UTF-8 | Python | false | false | 1,529 | py | attributes.py | import typing
from typing import Iterable, Iterator
from ..utils.meta import typechecked
from . import Entity, EntitySet
if typing.TYPE_CHECKING:
from ..relationship import Relationship
_E = typing.TypeVar("_E", bound=Entity)
_S = typing.TypeVar("_S", bound=EntitySet)
class Relationships(typing.MutableMapping[... |
6d5d1e637d6fd03aad2240d9b5cf0a80d313c209 | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/data/experimental/kernel_tests/service/metadata_test.py | 750b405079c788eedb4ca9df4736ba002609b6ae | [
"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 | 10,418 | py | metadata_test.py | # Copyright 2021 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... |
9c704571f31ac63181ea551b911973d5e59050bf | e20264d49e426f91bdaf225280ca8ab156115da4 | /deephyper/evaluator/storage/_redis_storage.py | c43fd4729f98cb1e416c48a09709acb3d996ee36 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | deephyper/deephyper | 8f21610c05b6d7630633d19251db434019c50379 | 98854c61b94433d4b0668a3a914ea1e747e7f249 | refs/heads/master | 2023-08-19T08:21:59.141952 | 2023-07-31T15:23:41 | 2023-07-31T15:23:41 | 156,403,341 | 236 | 67 | BSD-3-Clause | 2023-07-31T14:59:42 | 2018-11-06T15:18:42 | Python | UTF-8 | Python | false | false | 8,727 | py | _redis_storage.py | import pickle
from typing import Any, Dict, Hashable, List, Tuple
import redis
from deephyper.evaluator.storage._storage import Storage
class RedisStorage(Storage):
"""Storage client for Redis.
The Redis server should be started with the Redis-JSON module loaded.
Args:
host (str, optional): T... |
5927bc3817f751fb1ef56c58f08ab0c3682e4b24 | c530897cb72b6943c7226b25824444cad5f3503b | /usaspending_api/references/models/subtier_agency.py | 94d0c66ee829ea65da0316d7918fa10c3ec648e9 | [
"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 | 456 | py | subtier_agency.py | from django.db import models
class SubtierAgency(models.Model):
subtier_agency_id = models.AutoField(primary_key=True)
create_date = models.DateTimeField(auto_now_add=True)
update_date = models.DateTimeField(auto_now=True)
subtier_code = models.TextField(db_index=True, unique=True)
abbreviation = ... |
02f3676938748223b18badb86845895c21ee3796 | 0ac2d343bad7e25df1a2f2be951854d86b3ad173 | /pycket/prims/hash.py | 9d70d4520e9903573914cf7ce94d621b44162102 | [
"MIT"
] | permissive | pycket/pycket | 8c28888af4967b0f85c54f83f4ccd536fc8ac907 | 05ebd9885efa3a0ae54e77c1a1f07ea441b445c6 | refs/heads/master | 2021-12-01T16:26:09.149864 | 2021-08-08T17:01:12 | 2021-08-08T17:01:12 | 14,119,907 | 158 | 14 | MIT | 2021-08-08T17:01:12 | 2013-11-04T18:39:34 | Python | UTF-8 | Python | false | false | 15,974 | py | hash.py | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from pycket import impersonators as imp
from pycket import values, values_string
from pycket.hash.base import W_HashTable, W_ImmutableHashTable, w_missing
from pycket.hash.simple import (
W_EqvMutableHashTable, W_EqMutableHashTa... |
e8cbb4fd8ab0b39dc4c0e42a9c0d75c36f767f67 | 88ae8695987ada722184307301e221e1ba3cc2fa | /third_party/webrtc/modules/audio_processing/test/py_quality_assessment/quality_assessment/input_mixer_unittest.py | 4fd5e4f1ee98d2de74a32e369cfd0e1335c0673d | [
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later",
"BSD-3-Clause",
"LicenseRef-scancode-google-patent-license-webrtc",
"LicenseRef-scancode-google-patent-license-webm",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | Python | false | false | 5,929 | py | input_mixer_unittest.py | # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project au... |
d54fb226a9c8c5302112030f198c6976687c422a | 73f69adf4e744751933725075c447e7d2d8df813 | /book/src/ch01/src/test_annotations.py | 41de784556e8878645c926fcd700de46824e250d | [
"MIT"
] | permissive | rmariano/Clean-code-in-Python | 5b6c89816e75ac18dfbbeb5210edb57cda9a910b | 0cc2e3d79f996dfdda3dfbdf575cb3b9c492cefa | refs/heads/main | 2023-08-17T09:23:45.471046 | 2023-08-15T18:18:01 | 2023-08-15T18:18:01 | 63,787,233 | 156 | 31 | MIT | 2023-09-11T11:32:05 | 2016-07-20T14:17:05 | Python | UTF-8 | Python | false | false | 548 | py | test_annotations.py | """Clean Code in Python - Chapter 01: Introduction, Tools, and Formatting
Tests for annotations examples
"""
import pytest
from src.annotations import Point, locate
@pytest.mark.parametrize(
"defined_object,expected",
(
(locate, {"latitude": float, "longitude": float, "return": Point}),
(Po... |
ad2f97531a7990e90640ad489588e847478ed08f | 3ef70fe63acaa665e2b163f30f1abd0a592231c1 | /stackoverflow/venv/lib/python3.6/site-packages/twisted/words/xish/utility.py | 6f8a11527daeabc0edd175e15e3b7d974c8482ea | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | wistbean/learn_python3_spider | 14914b63691ac032955ba1adc29ad64976d80e15 | 40861791ec4ed3bbd14b07875af25cc740f76920 | refs/heads/master | 2023-08-16T05:42:27.208302 | 2023-03-30T17:03:58 | 2023-03-30T17:03:58 | 179,152,420 | 14,403 | 3,556 | MIT | 2022-05-20T14:08:34 | 2019-04-02T20:19:54 | Python | UTF-8 | Python | false | false | 13,482 | py | utility.py | # -*- test-case-name: twisted.words.test.test_xishutil -*-
#
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Event Dispatching and Callback utilities.
"""
from __future__ import absolute_import, division
from twisted.python import log
from twisted.python.compat import iteritems
from twist... |
7a85c20e8ecaa672a52a9ad8f52f6efcd1112d96 | 79e8247110b113395f6ad935209c24b3d2590f24 | /plugins/lighthouse/util/qt/util.py | 0f7d337cf591b9a905d318abbfc7b58bf7782860 | [
"MIT"
] | permissive | gaasedelen/lighthouse | 133a3fb019095c06d7432db2ac6a9dfb8be55ef7 | f4642e8b4b4347b11ccb25a79ec4f490c9ad901d | refs/heads/develop | 2023-07-19T21:13:47.247797 | 2022-02-17T07:59:38 | 2022-02-17T19:29:27 | 81,627,212 | 2,053 | 309 | MIT | 2023-05-14T00:11:52 | 2017-02-11T03:13:36 | Python | UTF-8 | Python | false | false | 11,119 | py | util.py | import sys
import time
import logging
import threading
from .shim import *
from ..misc import is_mainthread
from ..python import *
from ..disassembler import disassembler
logger = logging.getLogger("Lighthouse.Qt.Util")
#------------------------------------------------------------------------------
# Qt Fonts
#-----... |
1d4ee85a13c8b7aaf89b751f102f033647754a3d | c882c16e1c42974f2744a79738bde155acc985b6 | /spirit/user/auth/forms.py | 2c0d498c61c8102ab5bf56c22b633c60b71d5530 | [
"MIT"
] | permissive | nitely/Spirit | 4e4f1615a990ec8174f71ab66c64de5c4e599107 | 9a304a57de021108d9225b87f35ad6395d5d56d3 | refs/heads/master | 2023-06-09T02:09:47.275554 | 2023-05-24T09:19:48 | 2023-05-24T09:19:48 | 19,626,318 | 1,049 | 391 | MIT | 2023-08-20T05:34:25 | 2014-05-09T21:31:33 | Python | UTF-8 | Python | false | false | 5,181 | py | forms.py | # -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm
from django.utils.translation import gettext_lazy as _
from django.template.loader import render_to_string
from spirit.core.conf import settings
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.