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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cf2c071c87c51dc93900f956778f5e796168e66f | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/junos/tests/ShowInterfacesQueue/cli/equal/golden_output_expected.py | 64209483091384e99e9b442f39b6baf6646b4da7 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 11,427 | py | golden_output_expected.py | expected_output = {
"interface-information": {
"physical-interface": {
"description": "to_ixia_2/4",
"local-index": "143",
"name": "ge-0/0/2",
"oper-status": "Up",
"queue-counters": {
"interface-cos-summary": {
"... |
9551e31b4075ef6a2ebdd31a7c212db3190f89f2 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /ai/modelscope/modelscope/pipelines/cv/image_salient_detection_pipeline.py | 4a3eaa65a31cd8dba99636adedc686c7c8248938 | [
"Apache-2.0",
"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 | 1,424 | py | image_salient_detection_pipeline.py | # Copyright (c) Alibaba, Inc. and its affiliates.
from typing import Any, Dict
from modelscope.metainfo import Pipelines
from modelscope.outputs import OutputKeys
from modelscope.pipelines.base import Input, Pipeline
from modelscope.pipelines.builder import PIPELINES
from modelscope.preprocessors import LoadImage
fro... |
4db13306f96da38a04c3d13e9e67dedd454fd4f8 | 974d04d2ea27b1bba1c01015a98112d2afb78fe5 | /test/legacy_test/test_conv2d_transpose_op.py | b7fe99f85c3c2a4183c286a41cfee73a67a01fbb | [
"Apache-2.0"
] | permissive | PaddlePaddle/Paddle | b3d2583119082c8e4b74331dacc4d39ed4d7cff0 | 22a11a60e0e3d10a3cf610077a3d9942a6f964cb | refs/heads/develop | 2023-08-17T21:27:30.568889 | 2023-08-17T12:38:22 | 2023-08-17T12:38:22 | 65,711,522 | 20,414 | 5,891 | Apache-2.0 | 2023-09-14T19:20:51 | 2016-08-15T06:59:08 | C++ | UTF-8 | Python | false | false | 43,339 | py | test_conv2d_transpose_op.py | # Copyright (c) 2018 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 app... |
3dc0c7f40aa991943b01d562630fe0b43244de02 | d60dcdd392e32cd6272f7f364e5b4d556d6b84fb | /dtaidistance/util_numpy.py | eec423370f94515146f545cd56ff64098cdb1920 | [
"Apache-2.0"
] | permissive | wannesm/dtaidistance | 7e39ba5086129f330a297d82af1b25854c016f74 | d914ab85021f67ff1c58d45727e0e4844ad26d8e | refs/heads/master | 2023-08-31T06:21:45.836316 | 2023-08-01T12:51:50 | 2023-08-01T12:53:50 | 80,764,246 | 943 | 188 | NOASSERTION | 2023-05-23T14:44:06 | 2017-02-02T20:11:03 | Python | UTF-8 | Python | false | false | 3,890 | py | util_numpy.py | from contextlib import ContextDecorator
import os
import logging
from .exceptions import NumpyException, ScipyException
logger = logging.getLogger("be.kuleuven.dtai.distance")
try:
import numpy as np
except ImportError:
np = None
try:
import scipy
except ImportError:
scipy = None
def test_witho... |
412c91ae1974eee045bfa4a324ef869e8c1034ac | 828282d212d33667f05818d144ce1534db0d1584 | /src/imitation/algorithms/base.py | fd33c5f40668079b3450a9210064242e3a7c7823 | [
"MIT"
] | permissive | HumanCompatibleAI/imitation | bdbb167d8e1abc0fb629d18ac88121a096881d43 | 5b0b531bdf6fdfcaab93ff18f454aa1b54bb4355 | refs/heads/master | 2023-08-17T08:29:01.192792 | 2023-08-11T07:57:29 | 2023-08-11T07:57:29 | 160,906,482 | 936 | 203 | MIT | 2023-09-14T12:04:40 | 2018-12-08T05:15:33 | Python | UTF-8 | Python | false | false | 11,334 | py | base.py | """Module of base classes and helper methods for imitation learning algorithms."""
import abc
from typing import (
Any,
Generic,
Iterable,
Iterator,
Mapping,
Optional,
TypeVar,
Union,
cast,
)
import torch.utils.data as th_data
from stable_baselines3.common import policies
from imi... |
0e0280487ab087581bbab328481cfdd5398c93a6 | 6416b746ee71d897789eab1e450000831674dbd0 | /src/otx/algorithms/classification/adapters/mmcls/models/classifiers/semisl_multilabel_classifier.py | 1a7730543846475f1e59e026b950f61ad108c160 | [
"Apache-2.0"
] | permissive | openvinotoolkit/training_extensions | c921f83ad52311af96ff45ae0b88d0aecddd855b | 80454808b38727e358e8b880043eeac0f18152fb | refs/heads/develop | 2023-08-31T06:29:07.229339 | 2023-08-31T01:57:26 | 2023-08-31T01:57:26 | 154,843,614 | 397 | 230 | Apache-2.0 | 2023-09-14T06:17:01 | 2018-10-26T14:02:29 | Python | UTF-8 | Python | false | false | 1,747 | py | semisl_multilabel_classifier.py | """Module for defining a semi-supervised multi-label classifier using mmcls."""
# Copyright (C) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
from mmcls.models.builder import CLASSIFIERS
from otx.algorithms.common.utils.logger import get_logger
from .custom_image_classifier import CustomImageClassif... |
1f788ff838f411b15c0a5058bb07c86eccf38462 | 028b29b2e476ee042c9e8fdc9a8cde4cdd4562f4 | /tests/test_continuous_column.py | 8939bdf1f7f64342d21f21465d5c86bc0e414e6f | [
"Apache-2.0"
] | permissive | Rambatino/CHAID | fba71f001e5d0e623137160cc14723fc5d2bcea9 | b7c13b28d73e88b0b11dde5d4155775a234063e7 | refs/heads/master | 2023-08-14T14:16:48.761784 | 2023-07-25T15:28:09 | 2023-07-25T15:28:09 | 56,257,335 | 166 | 59 | Apache-2.0 | 2023-09-07T10:06:04 | 2016-04-14T17:34:11 | Python | UTF-8 | Python | false | false | 1,073 | py | test_continuous_column.py | """
Testing module for the class ContinuousColumn
"""
from unittest import TestCase
import numpy as np
from numpy import nan
from setup_tests import list_ordered_equal, CHAID
import pytest
def test_chaid_vector_converts_strings():
"""
Check that error raised when string column supplied
"""
with pytest.... |
4758686da346ec965f03f1ab9641b4c673cc584b | 8ed15d43652dbcab332c78923da416b91b139323 | /python/fedml/cli/model_deployment/device_client_runner.py | 22c7756cdc89322aba61aa94001383905a2f406f | [
"Apache-2.0"
] | permissive | FedML-AI/FedML | 74d144038c9de4a0621eb328d00987abac35e2d1 | b436fbd95cbb62f6c58d2233d7affa0f62cb1817 | refs/heads/master | 2023-08-31T22:15:39.786371 | 2023-08-24T03:41:58 | 2023-08-24T03:41:58 | 281,519,510 | 3,197 | 807 | Apache-2.0 | 2023-09-14T02:14:20 | 2020-07-21T22:41:25 | Python | UTF-8 | Python | false | false | 47,484 | py | device_client_runner.py | import json
import logging
import multiprocessing
import sys
from multiprocessing import Process
import os
import platform
import shutil
import subprocess
import threading
import time
import traceback
import urllib
import uuid
import zipfile
from urllib.parse import urlparse
import requests
from fedml import mlops
f... |
baee403bc20d3ba003ae5501c8dc144927f25d75 | c2c212ba42ebfa35f3b6122344978bc94ec8fa67 | /tests/test_sunset.py | fe1a76f13c6f5834a2d2c90360667bd59cd172ab | [
"MIT"
] | permissive | hhursev/recipe-scrapers | 0cd6b7db4ef23ca825f2354f5d1ba76076a14813 | 8ced0227b3b16c532fc5ebf3060c99ee0452adab | refs/heads/main | 2023-09-03T07:33:29.684121 | 2023-09-01T21:15:50 | 2023-09-01T21:15:50 | 42,446,168 | 1,276 | 443 | MIT | 2023-09-14T16:34:09 | 2015-09-14T12:05:00 | Python | UTF-8 | Python | false | false | 3,478 | py | test_sunset.py | from recipe_scrapers.sunset import Sunset
from tests import ScraperTest
class TestSunsetScraper(ScraperTest):
scraper_class = Sunset
def test_host(self):
self.assertEqual("sunset.com", self.harvester_class.host())
def test_canonical_url(self):
self.assertEqual(
"https://www.... |
a0ce72c37ae0e0a6b640662ac1cae6f8408f0fe3 | 13800b7827598e76428a335559b7bf11867ec2f0 | /python/ccxt/async_support/oceanex.py | ff051ca4bd36564dc07f6dd5795207d3a3926e74 | [
"MIT"
] | permissive | ccxt/ccxt | b40a0466f5c430a3c0c6026552ae697aa80ba6c6 | e4065f6a490e6fc4dd7a72b375428b2faa570668 | refs/heads/master | 2023-09-04T03:41:29.787733 | 2023-09-03T19:25:57 | 2023-09-03T19:25:57 | 91,253,698 | 30,798 | 8,190 | MIT | 2023-09-14T21:59:09 | 2017-05-14T15:41:56 | Python | UTF-8 | Python | false | false | 38,743 | py | oceanex.py | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
from ccxt.abstract.oceanex import ImplicitAPI
from ccxt.base.types import OrderSide
f... |
a185dc1da0e3dfa0d0fcdeac153bbf683550d7e0 | 39b021eabbb8e3be1734cf92fd641965a796b0eb | /deepchem/data/tests/test_fastq_loader.py | 09ffb9705e66f49c3ce6d0251dadf1a2255dacca | [
"MIT"
] | permissive | deepchem/deepchem | 066cbf42316b2f6bec0166727e0264a485d5266f | ee6e67ebcf7bf04259cf13aff6388e2b791fea3d | refs/heads/master | 2023-09-02T01:32:17.860111 | 2023-08-31T18:49:00 | 2023-08-31T18:49:00 | 43,098,215 | 4,876 | 1,905 | MIT | 2023-09-14T19:10:44 | 2015-09-24T23:20:28 | Python | UTF-8 | Python | false | false | 760 | py | test_fastq_loader.py | import os
import unittest
from deepchem.data.data_loader import FASTQLoader
class TestFASTQLoader(unittest.TestCase):
"""
Test FASTQLoader
"""
def setUp(self):
super(TestFASTQLoader, self).setUp()
self.current_dir = os.path.dirname(os.path.abspath(__file__))
def test_fastq_one_hot(se... |
ea02349995af321aa6f6d89bddd0b0a80bf6cb9e | a61bf859ceeb1ba98de3863225e07b29e1d7ce8a | /thonny/plugins/circuitpython/api_stubs/displayio/__init__.pyi | 052eae95d73016c35b67235603b47bd9d02640f2 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | thonny/thonny | 3974b1860703e8450b837863682117f525a886c6 | 8fc9f5c7cbbe1d1c82aa5503ec4b684e28aa608c | refs/heads/master | 2023-08-31T03:04:34.685140 | 2023-08-24T11:38:36 | 2023-08-24T11:38:36 | 163,728,962 | 2,788 | 1,048 | MIT | 2023-08-10T18:59:37 | 2019-01-01T10:29:50 | Python | UTF-8 | Python | false | false | 39,554 | pyi | __init__.pyi | """Native helpers for driving displays
The `displayio` module contains classes to manage display output
including synchronizing with refresh rates and partial updating.
For more a more thorough explanation and guide for using `displayio`, please
refer to `this Learn guide
<https://learn.adafruit.com/circuitpython-dis... |
36033c1a6815837630be4a3484ffe2d0f82cf547 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /PhysicsTools/PatAlgos/python/cleaningLayer1/electronCleaner_cfi.py | 138f775a6b93260eaef5713c47572435fe08aa64 | [
"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 | 955 | py | electronCleaner_cfi.py | import FWCore.ParameterSet.Config as cms
cleanPatElectrons = cms.EDProducer("PATElectronCleaner",
## pat electron input source
src = cms.InputTag("selectedPatElectrons"),
# preselection (any string-based cut for pat::Electron)
preselection = cms.string(''),
# overlap checking configurables
c... |
5612206980eaea27bf3874dacdfd802fef10e5a8 | 6b27c39edc10b1353104043b7a523f4981c99ef2 | /pytype/tools/merge_pyi/test_data/stars.pyi | 6352a7a782d685a664953c07ee2a940a1985de04 | [
"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 | 24 | pyi | stars.pyi | def f1(x:e1) -> r1: ...
|
fb92dca8f5259e58467724c4b043b6195e075df5 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/refactoring/move/withImportedTypeComments/before/src/src.py | bf4fb6b3ffddc0c64bad4f9665b171b75e8f390f | [
"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 | 291 | py | src.py | import asyncio as aio
import datetime
from typing import Text
from collections import OrderedDict as ODict
def test():
a = "a" # type: Text
b = aio.Condition() # type: aio.Condition
c = datetime.timedelta(0) # type: datetime.timedelta
d = ODict() # type: ODict |
1c43b5b06cb2259b0fbe09a2696db78e68008f5e | 7ee640f301894773eec3609feee2241a1bd5e88f | /scripts/plot_validations.py | 5e81707cb9e9d71ed1155062038a9d23a110a89f | [
"Apache-2.0"
] | permissive | joeynmt/joeynmt | 01f121e82dba8766af0690067bba470353d68909 | 0968187ac0968007cabebed5e5cb6587c08dff78 | refs/heads/main | 2023-08-25T15:15:46.776608 | 2023-06-12T11:11:28 | 2023-06-12T11:11:28 | 153,133,227 | 668 | 204 | Apache-2.0 | 2023-09-04T01:21:50 | 2018-10-15T15:00:57 | Python | UTF-8 | Python | false | false | 3,359 | py | plot_validations.py | #!/usr/bin/env python
# coding: utf-8
import argparse
from pathlib import Path
from typing import Dict, List
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.backends.backend_pdf import PdfPages
matplotlib.use("Agg")
def read_vfiles(vfiles: List[Path]) -> Dict:
"""
Parse ... |
456e6c702fd15eaa389690f4a2a6b974d7530ac4 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /hardware-testing/hardware_testing/production_qc/ninety_six_assembly_qc_ot3/test_plunger.py | 94e12df49ce0380b227f6176cb37c8c84ccd3d5e | [
"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 | 4,817 | py | test_plunger.py | """Test Plunger."""
from typing import List, Union, Tuple, Dict
from opentrons.hardware_control.ot3api import OT3API
from hardware_testing.data import ui
from hardware_testing.data.csv_report import (
CSVReport,
CSVResult,
CSVLine,
CSVLineRepeating,
)
from hardware_testing.opentrons_api import helpers... |
5c93e606d342bb9a2bf0f3de130106126fe333d0 | 407d194b52fe9cf75cca9d6f3c162a565549a1ae | /OmsAgent/extension-test/verify_e2e.py | 7ef7225709224e41f63ae4cd4d5ff4cc2d38bf00 | [
"Apache-2.0"
] | permissive | Azure/azure-linux-extensions | 808761f927045f00548aa68e38d4bec8651c0eba | 3cea1567fc4f4eb5beea9884153e92d70610394d | refs/heads/master | 2023-08-27T14:06:05.775617 | 2023-08-23T01:56:05 | 2023-08-23T01:56:05 | 19,841,123 | 300 | 314 | Apache-2.0 | 2023-09-14T04:21:26 | 2014-05-16T01:38:49 | Python | UTF-8 | Python | false | false | 3,325 | py | verify_e2e.py | '''Verify end-to-end data transmission.'''
import json
import os
import re
import sys
import subprocess
import adal
import requests
ENDPOINT = ('https://management.azure.com/subscriptions/{}/resourcegroups/'
'{}/providers/Microsoft.OperationalInsights/workspaces/{}/api/'
'query?api-version=20... |
874305c0cc2746b7739fee9116d40b5bcd9bdc0b | aaf572d39319e4400ae0c2655ea2cfa52845a429 | /trio/_core/_multierror.py | 6e4cb8b92385531c7020c6700e8513c3b6944955 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | python-trio/trio | 04cbde76313c26abdea15317cea3980dd5bc475b | e97bcb61b8b02523c82435b5408ff46efca5dfc3 | refs/heads/master | 2023-08-30T23:22:05.599646 | 2023-08-30T06:11:28 | 2023-08-30T06:11:28 | 79,083,614 | 5,651 | 369 | NOASSERTION | 2023-09-13T14:14:21 | 2017-01-16T04:45:25 | Python | UTF-8 | Python | false | false | 20,407 | py | _multierror.py | from __future__ import annotations
import sys
import warnings
from collections.abc import Callable, Sequence
from types import TracebackType
from typing import TYPE_CHECKING, Any, cast, overload
import attr
from trio._deprecate import warn_deprecated
if sys.version_info < (3, 11):
from exceptiongroup import Bas... |
da143d9a973a3136e30840a861cdce849efba804 | e8cf6493fee2383f31e77d30c78e47e694dd298f | /tools/docs/epytext.py | 7116cd606d9245f17da1fe8d47ddba2b4a1cad67 | [
"BSD-3-Clause"
] | permissive | idapython/src | 30b5af8e819e2d86736cd63527dcda0e4696c680 | e1c108a7df4b5d80d14d8b0c14ae73b924bff6f4 | refs/heads/master | 2023-09-04T08:27:09.228901 | 2023-07-31T14:26:58 | 2023-07-31T14:26:58 | 32,229,857 | 1,371 | 298 | NOASSERTION | 2023-07-28T12:34:06 | 2015-03-14T20:09:27 | Python | UTF-8 | Python | false | false | 9,503 | py | epytext.py |
import re
class HR_Epytext:
def __init__(self, text):
self.html_translation = {
"&" : "&",
"<" : "<",
">" : ">",
"\"": """,
"'" : "'"
}
identifier = r"[a-zA-Z_][a-zA-Z_0-9]*"
parameter = r"{}(?:=[^,)]... |
fcfc541a2ac5ba386dd7352e1da8abb1c900b25b | 1634f33c5021e8465a695fb5244504e2eeeecff5 | /kitsune/tidings/events.py | 8943df2b181c844a18d209cf3fe17a095f17e872 | [] | permissive | mozilla/kitsune | fee4b8598eb01f5b4add00f2f010b45e2a6ca901 | 67ec527bfc32c715bf9f29d5e01362c4903aebd2 | refs/heads/main | 2023-09-01T21:41:59.076570 | 2023-08-31T22:34:05 | 2023-08-31T22:34:05 | 489,645 | 1,218 | 697 | BSD-3-Clause | 2023-09-14T08:43:19 | 2010-01-26T18:53:57 | Python | UTF-8 | Python | false | false | 25,965 | py | events.py | import random
from smtplib import SMTPException
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
from django.core import mail
from django.db import models
from django.db.models import Q
from kitsune.tidings.models import EmailUs... |
f75d697e84d4702554d14b1d9e95bdfb5df376b9 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /chromecast/renderer/DEPS | 1c707f58626c3873ac7cfb75d208d6016b55f4e6 | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 1,011 | DEPS | include_rules = [
"+chromecast/browser/mojom",
"+chromecast/common",
"+chromecast/crash",
"+chromecast/media",
"+components/cast_receiver/renderer",
"+components/cdm/renderer",
"+components/guest_view/renderer",
"+components/media_control/renderer",
"+components/media_control/mojom",
"+components/ne... | |
15f2427608a1adf0ae9350f7223b73f7ad820135 | 70e9a7da3d4e2a41b30544516e166dab2495253c | /l10n_br_automated_payment/__manifest__.py | c9a85a9e8e7795b5706531858e19451c1eb8506c | [
"MIT"
] | permissive | Trust-Code/odoo-brasil | bf06ea58a4e0376cb5c297c18bf48eaf97104e54 | d456a10e32f56e259061afbd989942ea1aae2c2d | refs/heads/16.0 | 2023-08-31T16:06:21.038792 | 2023-01-26T19:31:31 | 2023-01-26T19:31:31 | 72,882,959 | 206 | 253 | MIT | 2023-08-18T17:05:49 | 2016-11-04T20:28:03 | Python | UTF-8 | Python | false | false | 1,137 | py | __manifest__.py | # © 2018 Danimar Ribeiro, Trustcode
# Part of Trustcode. See LICENSE file for full copyright and licensing details.
{
'name': 'Integração Iugu',
'version': '13.0.1.0.1',
'category': 'Finance',
'sequence': 5,
'author': 'Trustcode',
'license': 'OPL-1',
'summary': """Realiza a integração com ... |
6aa4fe703192f4a4ba8fea62d75d16eadaa7ee31 | 234c46d1249c9209f268417a19018afc12e378b4 | /tests/data/token_indexers/pretrained_transformer_indexer_test.py | 84021394cf3abd8eea16b2bf464f320b34b2a345 | [
"Apache-2.0"
] | permissive | allenai/allennlp | 1f4bcddcb6f5ce60c7ef03a9a3cd6a38bdb987cf | 80fb6061e568cb9d6ab5d45b661e86eb61b92c82 | refs/heads/main | 2023-07-07T11:43:33.781690 | 2022-11-22T00:42:46 | 2022-11-22T00:42:46 | 91,356,408 | 12,257 | 2,712 | Apache-2.0 | 2022-11-22T00:42:47 | 2017-05-15T15:52:41 | Python | UTF-8 | Python | false | false | 11,042 | py | pretrained_transformer_indexer_test.py | import pytest
from allennlp.common import cached_transformers
from allennlp.common.testing import AllenNlpTestCase
from allennlp.data import Vocabulary
from allennlp.data.token_indexers import PretrainedTransformerIndexer
from allennlp.data.tokenizers import PretrainedTransformerTokenizer
class TestPretrainedTransfo... |
7ea7592cbeef76cf58dbb0d429bfcb63c48d3e15 | 1180c0bfe29959d95f3c131e6e839950e528d4ee | /17/bbelderbos/podify/__init__.py | 5dc72193daf0ddb3697dd364b5ecd938f3afb991 | [] | no_license | pybites/challenges | e3e461accd8e7f890aee8007ba5070086ef983fc | 02b77652d0901e6e06cb9b1e7cb3e59c675445c2 | refs/heads/community | 2023-08-20T18:19:02.982214 | 2022-11-17T09:23:31 | 2022-11-17T09:23:31 | 78,264,928 | 764 | 3,115 | null | 2023-07-21T05:58:19 | 2017-01-07T07:17:50 | Jupyter Notebook | UTF-8 | Python | false | false | 511 | py | __init__.py | __title__ = 'podify'
__author__ = 'Bob Belderbos'
import logging
import os
import ssl
# some feeds get 'bozo_exception': URLError(SSLError(1,
# '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
ssl._create_default_https_context = ssl._create_unverified_context
FORMAT = '%(asctime)-15s :: %(message)s'
l... |
bee9a6799f8daf933cd3c8b6924acc56704ae078 | 6415c13547e6943f7b65337cbd2790c4e18723c8 | /netbox/circuits/api/views.py | bd94318877054c97d7c709753b810ed5f97f2c04 | [
"Apache-2.0"
] | permissive | netbox-community/netbox | 287254a9698270d51f57b1297118e9f01536da5a | 506884bc4dc70299db3e2a7ad577dd7fd808065e | refs/heads/develop | 2023-08-24T09:11:46.685121 | 2023-08-23T18:44:14 | 2023-08-23T18:44:14 | 52,796,596 | 8,122 | 1,817 | Apache-2.0 | 2023-09-14T18:16:01 | 2016-02-29T14:15:46 | Python | UTF-8 | Python | false | false | 2,300 | py | views.py | from rest_framework.routers import APIRootView
from circuits import filtersets
from circuits.models import *
from dcim.api.views import PassThroughPortMixin
from netbox.api.viewsets import NetBoxModelViewSet
from utilities.utils import count_related
from . import serializers
class CircuitsRootView(APIRootView):
... |
aacb22e1cf755f7e8faad03eb70938fd6233942e | 48fdd1305ea3b6aad7537909b2ee0764c991d4e8 | /resources/auxiliary_workflows/benchmark/workflow/scripts/performance_measures_global.py | 0205b0002af8c422e513308ca53289dd0cd216f2 | [
"Apache-2.0"
] | permissive | cbg-ethz/V-pipe | e62418cbe4f45f040bb6c071a08144dedf98281d | 8c4599509955b33f761ded2889d68777628a4f12 | refs/heads/master | 2023-08-22T05:34:52.941749 | 2023-03-17T21:37:28 | 2023-03-17T22:11:55 | 87,789,709 | 115 | 38 | Apache-2.0 | 2023-05-11T18:34:46 | 2017-04-10T09:01:20 | HTML | UTF-8 | Python | false | false | 18,166 | py | performance_measures_global.py | import datetime
import functools
import subprocess
from pathlib import Path
import pandas as pd
import numpy as np
from sklearn import manifold
import seaborn as sns
import matplotlib.pyplot as plt
from matplotlib.ticker import FuncFormatter
import editdistance
from Bio import SeqIO
import natsort as ns
from tqdm i... |
6d53fc77082394bfe7af2881f1349988a13bdd23 | 6c9ce6ca26990b9ca2f9967768e3607fa0be3d23 | /cloudsplaining/command/create_multi_account_config_file.py | f78b0ac3d333841050a8b0a97d423176d4671609 | [] | permissive | salesforce/cloudsplaining | 100e062ee4b0c558ab408a25f05ace24d8d3b029 | 1c2255ca9280be2a6035346151570c596d6f3dfa | refs/heads/master | 2023-09-04T08:08:49.544990 | 2023-08-29T21:20:47 | 2023-08-29T21:20:47 | 256,772,852 | 1,769 | 171 | BSD-3-Clause | 2023-09-05T21:50:55 | 2020-04-18T14:23:56 | JavaScript | UTF-8 | Python | false | false | 2,126 | py | create_multi_account_config_file.py | """
Create YML Template files for the exclusions template command.
This way, users don't have to remember exactly how to phrase the yaml files, since this command creates it for them.
"""
# Copyright (c) 2020, salesforce.com, inc.
# All rights reserved.
# Licensed under the BSD 3-Clause license.
# For full license text... |
a6cd26e1a11124b3ed824518c58a13faca2675a1 | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /WebMirror/management/rss_parser_funcs/feed_parse_extractWwwKuronotranslationsCom.py | b825e0e34e1a460e390e49c0aa34ec27b903bfd1 | [
"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 | 611 | py | feed_parse_extractWwwKuronotranslationsCom.py | def extractWwwKuronotranslationsCom(item):
'''
Parser for 'www.kuronotranslations.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
if "Level Up Just By Eating" in item['tags']:
return buildReleaseMessage... |
9e606b330f14c8714da145c618e3c31ca8f7c369 | 9ed4d46aedd4d4acadb48d610e940594b5b7b3fd | /matrix/pascal_triangle.py | 7f6555f9c8b9f2b61199a73af7a5c947fd6f96ae | [
"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 | 6,183 | py | pascal_triangle.py | """
This implementation demonstrates how to generate the elements of a Pascal's triangle.
The element havingva row index of r and column index of c can be derivedvas follows:
triangle[r][c] = triangle[r-1][c-1]+triangle[r-1][c]
A Pascal's triangle is a triangular array containing binomial coefficients.
https://en.wiki... |
986eff2b17fbebaeb3940654e9c11b41606a7022 | 3c41443364da8b44c74dce08ef94a1acd1b66b3e | /osf/utils/identifiers.py | 6505ee3ada7be92559e57117dda91a812ded866d | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-warranty-disclaimer",
"AGPL-3.0-only",
"LGPL-2.0-or-later",
"LicenseRef-scancode-proprietary-license",
"MPL-1.1",
"CPAL-1.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause",
"Apache-2.0"
] | permissive | CenterForOpenScience/osf.io | 71d9540be7989f7118a33e15bc4a6ce2d2492ac1 | a3e0a0b9ddda5dd75fc8248d58f3bcdeece0323e | refs/heads/develop | 2023-09-04T03:21:14.970917 | 2023-08-31T14:49:20 | 2023-08-31T14:49:20 | 10,199,599 | 683 | 390 | Apache-2.0 | 2023-09-14T17:07:52 | 2013-05-21T15:53:37 | Python | UTF-8 | Python | false | false | 2,838 | py | identifiers.py | import abc
import re
from urllib.parse import urljoin
import requests
from framework import sentry
from osf.exceptions import (
InvalidPIDError,
InvalidPIDFormatError,
NoSuchPIDError,
NoSuchPIDValidatorError
)
from website.settings import (
PID_VALIDATION_ENABLED,
PID_VALIDATION_ENDPOINTS,
)
... |
020f4b236355aed8d6bf8c294d6ce1cf96a5cf33 | 9fcb5164ff77e8cf48d860485fed262d36ed63e7 | /packages/dcos-integration-test/extra/test_metrics.py | c550330ac95f9d6ed32e6cf90dddb701d635d81b | [
"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 | 68,590 | py | test_metrics.py | import contextlib
import copy
import logging
import re
import sys
import uuid
from typing import Any, Generator
import pytest
import retrying
from dcos_test_utils.dcos_api import DcosApiSession
from prometheus_client.parser import text_string_to_metric_families
from test_helpers import get_expanded_config
__mainta... |
e6621c2bee69f88960a4a3f33a4d0ed2ce398d5a | 2d3a0b9caaff0ec56de90ca9285648848395c18b | /imageio/plugins/pillow_info.py | 59b971ce792cca172764da7f2faf8f0654547643 | [
"BSD-2-Clause"
] | permissive | imageio/imageio | f96a03fd0c0c704f76ec4ed2f3f5137b5d1d3d2b | a0091371dd42442ca3fae0fc0e8a4f0925757ac7 | refs/heads/master | 2023-09-04T11:09:46.646163 | 2023-09-04T02:23:41 | 2023-09-04T02:23:41 | 9,861,437 | 1,332 | 346 | BSD-2-Clause | 2023-09-04T13:54:07 | 2013-05-04T22:56:45 | Python | UTF-8 | Python | false | false | 36,624 | py | pillow_info.py | # -*- coding: utf-8 -*-
# styletest: ignore E122 E123 E501
"""
Module that contain info about the Pillow formats. The first part of
this module generates this info and writes it to its own bottom half
if run as a script.
"""
import warnings
warnings.warn(
"The `PillowFormat` plugin is deprecated and will be rem... |
af41399a45ae6e8cb712cc81c145fcce6e519f9b | 88dda5e76cef286c7db3ae7e5d1a32d28f7815a3 | /reviewboard/reviews/tests/test_entries.py | 6609e1cd472f7f2f797e6b508a5c250696195476 | [
"MIT"
] | permissive | reviewboard/reviewboard | f4d3bada08ba9d6ef53add2d1fdb82bd6cc63a1e | c3a991f1e9d7682239a1ab0e8661cee6da01d537 | refs/heads/master | 2023-08-31T09:03:14.170335 | 2023-08-30T08:22:43 | 2023-08-30T08:22:43 | 285,304 | 1,141 | 353 | MIT | 2023-06-07T16:51:02 | 2009-08-22T21:39:49 | Python | UTF-8 | Python | false | false | 72,137 | py | test_entries.py | """Unit tests for review request page entries."""
from datetime import datetime, timedelta
from django.contrib.auth.models import AnonymousUser, User
from django.template import RequestContext
from django.test.client import RequestFactory
from django.utils import timezone
from django.utils.timezone import utc
from dj... |
2dfce237148ecfc7c41c742fb26e8fa5a788621e | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /examples/docs_snippets/docs_snippets_tests/concepts_tests/assets_tests/test_asset_definition_metadata.py | e088501c66356539a3199bb863e050930846afed | [
"Apache-2.0"
] | permissive | dagster-io/dagster | 6adb5deee8bcf3ea1866a6a64f2ed81e1db5e73a | fe21995e0402878437a828c6a4244025eac8c43b | refs/heads/master | 2023-09-05T20:46:08.203794 | 2023-09-05T19:54:52 | 2023-09-05T19:54:52 | 131,619,646 | 8,565 | 1,154 | Apache-2.0 | 2023-09-14T21:57:37 | 2018-04-30T16:30:04 | Python | UTF-8 | Python | false | false | 138 | py | test_asset_definition_metadata.py | from docs_snippets.concepts.assets.asset_definition_metadata import my_asset
def test():
assert my_asset.op.outs["result"].metadata
|
6c111646bfe46fb79ca65f79baeac703b41cd7de | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/special-binary-string.py | bd11d040bbabb5a129109282a49801bdcafd1bb2 | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 628 | py | special-binary-string.py | # Time: f(n) = k * f(n/k) + n/k * klogk <= O(logn * nlogk) <= O(n^2)
# n is the length of S, k is the max number of special strings in each depth
# Space: O(n)
class Solution(object):
def makeLargestSpecial(self, S):
"""
:type S: str
:rtype: str
"""
result = []
... |
84af2add2bc09117bd2afc0ae36f042c163cc380 | 1299ffaa8bb1cd13db0ed53598b638ec36c555ac | /benedict/core/standardize.py | d255ad664024ffe2af7f74e615da8fd4b32cb880 | [
"MIT"
] | permissive | fabiocaccamo/python-benedict | c93240bf526696c7b11043fef898a461d3fd6f14 | 27d76331a00fff1fffe7890a77ffd93c8833aeda | refs/heads/main | 2023-08-31T04:06:24.451591 | 2023-08-22T20:59:04 | 2023-08-22T20:59:04 | 187,202,744 | 1,118 | 51 | MIT | 2023-09-08T12:43:04 | 2019-05-17T11:13:40 | Python | UTF-8 | Python | false | false | 515 | py | standardize.py | import re
from slugify import slugify
from benedict.core.rename import rename
from benedict.core.traverse import traverse
from benedict.utils import type_util
def _standardize_item(d, key, value):
if type_util.is_string(key):
# https://stackoverflow.com/a/12867228/2096218
norm_key = re.sub(r"((?... |
9ba4d7f86dcf6f16099333521d1467b598bc4ff1 | c024edfeda471bd2bdb42531f59c6b5fa0621ea0 | /config/settings.template.py | 6ff4c9ec2e418ede24ea547317e1bf42b0a376c6 | [
"MIT"
] | permissive | aellerton/demo-allauth-bootstrap | 58bffa2a6620dc614a07fad9c353531fbb010762 | d55590a008288490f81cb4f128ab8b93b8810678 | refs/heads/master | 2022-07-03T23:24:09.622983 | 2022-06-04T02:06:28 | 2022-06-04T02:06:28 | 20,476,587 | 226 | 60 | NOASSERTION | 2022-04-22T23:37:16 | 2014-06-04T08:57:11 | Python | UTF-8 | Python | false | false | 5,145 | py | settings.template.py | """
Django settings for allauthdemo project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
from os.path import dirname, join
BASE_DIR = dirname(dirname(__file_... |
db405d09976453920f6311ee0d23f8104eaf4c85 | 08ee04ae665dcb930ed4b98ca7b91b2dac2cc3b0 | /src/rayoptics/mpl/__init__.py | f4a523b2bd1ba8d263ee719e7e7a734698f4a495 | [
"BSD-3-Clause"
] | permissive | mjhoptics/ray-optics | 6bad622f7bb9b3485823b9cc511a6d2b679f7048 | 41ea6d618a93fe14f8bee45fb3efff6a6762bcce | refs/heads/master | 2023-07-09T18:03:36.621685 | 2023-05-08T22:46:36 | 2023-05-08T22:46:36 | 109,168,474 | 195 | 49 | BSD-3-Clause | 2023-08-10T16:53:28 | 2017-11-01T18:34:12 | Python | UTF-8 | Python | false | false | 584 | py | __init__.py | """ package implementing useful rayoptics graphics using matplotlib
The :mod:`~.mpl` subpackage provides useful basic optical graphics
using the matplotlib plotting package. Particular features include:
- 2D lens layout, :mod:`~.interactivelayout`
- |ybar| and |nubar| paraxial ray diagrams, :m... |
b0590e0f091ad5d73a5b7e86fc491325f1932c1a | 831c6ac1fa3253a5ef49b493ab211590d39e220e | /generation/builtins_templates/render.tmpl.pyi | 9080bda1cd3e1c2f70b37a0c3633183adb7eab28 | [
"MIT",
"CC-BY-3.0"
] | permissive | touilleMan/godot-python | a61bd686e929f62962b196243c0edf17b662271f | b9757da859a4d9fae86c330224881738d6b97392 | refs/heads/master | 2023-09-04T15:02:44.858077 | 2022-08-20T13:22:02 | 2022-08-20T13:22:02 | 69,164,674 | 1,766 | 168 | NOASSERTION | 2023-02-11T21:26:19 | 2016-09-25T13:03:54 | Python | UTF-8 | Python | false | false | 1,249 | pyi | render.tmpl.pyi | {#- `render_target` must be defined by calling context -#}
{% set get_target_method_spec = get_target_method_spec_factory(render_target) %}
{#- Define rendering macros -#}
{% macro render_method(method_name, py_name=None, default_args={}) %}
{% set spec = get_target_method_spec(method_name) %}
def {{ py_name or spec.... |
dea68b5132fe3ee8081ac4810ba96c73fcbebc46 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Validation/HGCalValidation/test/python/standalone_fromRECO_HARVESTING.py | 86bdcd97b1666e61d8f976c6674e0286d4342c30 | [
"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,585 | py | standalone_fromRECO_HARVESTING.py | import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Phase2_cff import Phase2
process = cms.Process('HARVESTING',Phase2)
# import of standard configurations
process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load('Configuration... |
881e03a2fbd0f26fee88b8357d36c62182838f38 | bad6940b201987d55edb3d7128f2ce3718d3b40f | /examples/add_singleton_misc_feature.py | b24b9e7d0972a26a6fe63acc319d89593c680f6c | [
"MIT"
] | permissive | pyconll/pyconll | ff985ef2e80820a0dd86b5d7c81914712f5dd5cd | 1bb8cd31fe18bfb048e6e26bc583004952094bff | refs/heads/master | 2023-06-23T12:17:10.758862 | 2023-06-21T03:20:45 | 2023-06-21T03:20:45 | 107,349,042 | 148 | 11 | MIT | 2023-06-21T03:13:56 | 2017-10-18T02:30:31 | Python | UTF-8 | Python | false | false | 821 | py | add_singleton_misc_feature.py | #
# Add a singleton feature to the misc column of all tokens of a certain form.
#
# Format
# add_singleton_misc_feature.py filename > transform.conll
#
import argparse
import pyconll
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='The name of the file to transform')
args = parser.parse_arg... |
95c2efa374c5b56a7a4077a64a446ab5f7c14b73 | 8f267fe1157904023004aa1fcee8cdcaf1d69f74 | /tempest/tests/lib/services/network/test_extensions_client.py | 27eb4858db1eb8dfe6308ea69aaac776bb5f2fcc | [
"Apache-2.0"
] | permissive | openstack/tempest | a65737f3e62d4ebeb7e387feac7bcc636d3f5fe0 | 3932a799e620a20d7abf7b89e21b520683a1809b | refs/heads/master | 2023-08-28T15:04:21.241805 | 2023-08-28T10:16:57 | 2023-08-28T10:16:57 | 2,356,406 | 270 | 407 | Apache-2.0 | 2022-06-29T15:52:45 | 2011-09-09T15:56:02 | Python | UTF-8 | Python | false | false | 7,776 | py | test_extensions_client.py | # Copyright 2017 AT&T Corporation.
# 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 require... |
b7fcd102005c088ac99343450f2026addf24f43a | ef2c1a0ae0f1746e58fcc160844788ab92a8d488 | /archai/discrete_search/search_spaces/nlp/__init__.py | e027cac5946ea6c7392a4b9ba9bdcc930972e988 | [
"MIT",
"LicenseRef-scancode-free-unknown",
"LGPL-2.1-or-later",
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | microsoft/archai | 4d04476ef6a434148638ef91df0ef3bf2c948422 | 95d6e19a1523a701b3fbc249dd1a7d1e7ba44aee | refs/heads/main | 2023-09-03T13:23:48.576626 | 2023-07-27T01:30:01 | 2023-07-27T01:30:01 | 245,036,506 | 439 | 97 | MIT | 2023-05-09T21:10:10 | 2020-03-05T00:54:29 | Python | UTF-8 | Python | false | false | 258 | py | __init__.py | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from archai.discrete_search.search_spaces.nlp.transformer_flex.search_space import TransformerFlexSearchSpace
from archai.discrete_search.search_spaces.nlp.tfpp import TfppSearchSpace
|
a6d896b596c18256c72dd56f3df6017bbea4aac7 | 92d97211aebc18d62fdde441ea775198a231c362 | /tests/unit/small_text/utils/test_labels.py | 14e5a24763080c301a5c1988ff02b80047744ff1 | [
"MIT"
] | permissive | webis-de/small-text | 4a510bc4dd9a2110976121603bcc859581a5141c | 2bb16b7413f85f3b933887c7054db45b5652d3a2 | refs/heads/main | 2023-09-03T06:00:20.976398 | 2023-08-19T18:28:43 | 2023-08-19T18:28:43 | 370,275,343 | 476 | 58 | MIT | 2023-08-23T20:54:25 | 2021-05-24T08:06:41 | Python | UTF-8 | Python | false | false | 6,155 | py | test_labels.py | import unittest
import numpy as np
from numpy.testing import assert_array_equal
from scipy.sparse import csr_matrix
from small_text.base import LABEL_IGNORED, LABEL_UNLABELED
from small_text.utils.labels import (
concatenate,
csr_to_list,
get_flattened_unique_labels,
get_ignored_labels_mask,
get_n... |
c9075456414d1497e144ab8f237c0b47001a17b2 | 300b0e36434201d7796d5ddd5b2d1789321379d4 | /Addons/PolyQuilt/__init__.py | f41d7d3310731f843e54cbe9acdb9b7a34ba0c99 | [] | no_license | sakana3/PolyQuilt | bdf6101da46c49511734b34664c01cf2ec949697 | 5ed6c9ac20b04008e726299ea4e3a36080024f11 | refs/heads/master | 2023-07-28T16:50:21.154579 | 2021-12-05T11:26:11 | 2021-12-05T11:26:11 | 180,507,265 | 489 | 40 | null | 2022-09-27T19:28:10 | 2019-04-10T05:20:42 | Python | UTF-8 | Python | false | false | 2,776 | py | __init__.py | # This program 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; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
... |
0e55ed35a61a5c3d488886c94b37a2947d95e206 | 8f76cee606ca901d6b9c1ecdcadaa172aa861c00 | /languages/python/web_urllib2_basic2.py | 5e9746fc8bb2856787c71bb29af51f76a92eea66 | [
"BSD-3-Clause"
] | permissive | uthcode/learntosolveit | b0cdc386ab17dadcefef9867aacc5ef0326b7215 | 88b1cbfea313fdca50f48573c396bed9ba38c354 | refs/heads/master | 2023-05-24T14:00:34.115585 | 2023-05-15T00:18:02 | 2023-05-15T00:18:02 | 14,986,557 | 171 | 1,714 | NOASSERTION | 2022-09-13T13:37:07 | 2013-12-06T15:44:38 | Java | UTF-8 | Python | false | false | 2,469 | py | web_urllib2_basic2.py | import urllib.request, urllib.error, urllib.parse
URL = 'http://localhost/basic.html'
ah = urllib.request.HTTPBasicAuthHandler()
ah.add_password('Realm','http://localhost/','username','veryverylongpassword')
urllib.request.install_opener(urllib.request.build_opener(ah))
r = urllib.request.Request(URL)
obj = urllib.r... |
053f774817dfa4d681c0f88ccf13a6322c63d4fc | 2ad93a1cf25a580fe980482d2d17a657de3b2523 | /django-stubs/contrib/gis/gdal/field.pyi | 6d1a27a3b09fc0385b28f2164db68d3fb42a208a | [
"MIT"
] | permissive | typeddjango/django-stubs | f35dfcb001e54694a0a1e8c0afcc6e6a3d130c32 | 0117348c3c7713f25f96b46e53ebdeed7bdba544 | refs/heads/master | 2023-08-25T19:42:52.707151 | 2023-08-23T15:13:25 | 2023-08-23T15:13:25 | 142,779,680 | 1,133 | 376 | MIT | 2023-09-13T19:05:06 | 2018-07-29T17:08:50 | Python | UTF-8 | Python | false | false | 1,460 | pyi | field.pyi | from typing import Any
from django.contrib.gis.gdal.base import GDALBase
class Field(GDALBase):
ptr: Any
def __init__(self, feat: Any, index: Any) -> None: ...
def as_double(self) -> float | None: ...
def as_int(self, is_64: bool = ...) -> int | None: ...
def as_string(self) -> str | None: ...
... |
a1426ef921ed5bde5016381c41f38ca40ae6de12 | 73305ddcc6dc9775b1e9a71506e2f3c74f678edc | /examples/anonymize_query_example.py | f8d699aa58d5125a212681c8a549f0855d88e9ed | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | google/starthinker | ef359557da4140275a8524d0d813eecf022ece9e | b596df09c52511e2e0c0987f6245aa4607190dd0 | refs/heads/master | 2023-08-25T21:16:45.578012 | 2023-07-17T22:19:18 | 2023-07-17T22:20:10 | 123,017,995 | 167 | 64 | Apache-2.0 | 2023-08-02T01:24:51 | 2018-02-26T19:15:09 | Python | UTF-8 | Python | false | false | 3,994 | py | anonymize_query_example.py | ###########################################################################
#
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/l... |
585350d43516b2471732c7e90d2ddf793c28a99b | 069c2295076c482afadfe6351da5ae02be8e18e6 | /tests/defer_regress/tests.py | 3dfe96ddb3a3536022249ec811f071df83f8df97 | [
"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 | 13,969 | py | tests.py | from operator import attrgetter
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models import Count
from django.test import TestCase
from .models import (
Base,
Child,
Derived,
Feature,
Item,
ItemAndSimpleItem,
Leaf,
Location,
... |
3fd45369f24f9c4f2be78ffc5ba3a31c49191784 | abe6c00f9790df7e6ef20dc02d0b1b225b5020cb | /src/prefect/server/database/migrations/versions/postgresql/2023_04_04_132534_3bf47e3ce2dd_add_index_on_log.py | 4626dba6df6dfb82bd9405fa43d6f47116bfb5ac | [
"Apache-2.0"
] | permissive | PrefectHQ/prefect | 000e6c5f7df80f76a181f0a30f8661c96417c8bd | 2c50d2b64c811c364cbc5faa2b5c80a742572090 | refs/heads/main | 2023-09-05T20:25:42.965208 | 2023-09-05T18:58:06 | 2023-09-05T18:58:06 | 139,199,684 | 12,917 | 1,539 | Apache-2.0 | 2023-09-14T20:25:45 | 2018-06-29T21:59:26 | Python | UTF-8 | Python | false | false | 523 | py | 2023_04_04_132534_3bf47e3ce2dd_add_index_on_log.py | """add_index_on_log
Revision ID: 3bf47e3ce2dd
Revises: 46bd82c6279a
Create Date: 2023-04-04 13:25:34.694078
"""
from alembic import op
# revision identifiers, used by Alembic.
revision = "3bf47e3ce2dd"
down_revision = "46bd82c6279a"
branch_labels = None
depends_on = None
def upgrade():
op.create_index(
... |
f6b69c558da3c18e9cf126cccebea8e9a3bd293f | 833d4cc8ec460902d0a8beb7f2e1ab13ba9114d0 | /powermon/dto/resultDTO.py | 28ad951b8f8613d1dd3157b572870005092554a4 | [
"MIT"
] | permissive | jblance/mpp-solar | 3d834e88715591ec63c2abbff97b41417286f451 | d541a7ec05754c570c44db21f271f5628c7f19e3 | refs/heads/master | 2023-08-31T10:09:36.558171 | 2023-08-24T22:42:36 | 2023-08-24T22:42:36 | 102,808,429 | 284 | 141 | MIT | 2023-09-11T20:47:11 | 2017-09-08T02:35:31 | Python | UTF-8 | Python | false | false | 164 | py | resultDTO.py | from typing import Iterable
from pydantic import BaseModel
# TODO: update
class ResultDTO(BaseModel):
device_identifier: str
command: str
data: dict |
96386627e903984bd5c2ccce2fcd7d56b39a97ec | 6eb0ba72a576b18873e53b0ff4f86fb581c6c806 | /docker/credentials/__init__.py | a1247700d3ed8208a4e89f9384f1e685afc6fa6f | [
"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 | 197 | py | __init__.py | from .store import Store
from .errors import StoreError, CredentialsNotFound
from .constants import (
DEFAULT_LINUX_STORE,
DEFAULT_OSX_STORE,
DEFAULT_WIN32_STORE,
PROGRAM_PREFIX,
)
|
c6c022bbcca9e7d99d7ed86a9ffff789df0f7855 | 7ae9aa9e9d359e2182bbab6ae7e083fc2c7fa815 | /rapidsms/router/celery/router.py | bef5019d6e91120ab02a7175a3197ae242c89fc4 | [
"BSD-3-Clause"
] | permissive | rapidsms/rapidsms | 8ce6d3f46002146e76cf68fdca3288865578b17a | aaa2ddab68e19d979525c3823c3ec0e646e92c83 | refs/heads/develop | 2023-08-15T16:44:27.206841 | 2022-03-16T15:09:36 | 2022-03-16T15:09:36 | 132,857 | 409 | 196 | BSD-3-Clause | 2023-09-11T20:41:56 | 2009-02-19T22:21:40 | Python | UTF-8 | Python | false | false | 2,063 | py | router.py | import logging
from rapidsms.router.blocking import BlockingRouter
from rapidsms.router.celery.tasks import receive_async, send_async
logger = logging.getLogger(__name__)
class CeleryRouter(BlockingRouter):
"""Skeleton router only used to execute the Celery task."""
def is_eager(self, backend_name):
... |
3f48d0c4369b15390f793086be26eb47235f0900 | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /job_compassplus/job_report/report_person.py | 34ba7f93fd09058eec8ed703b2bfa31288f76017 | [
"CC-BY-4.0"
] | permissive | gil9red/SimplePyScripts | bd2733372728bf9b9f00570e90316fa12116516b | 773c2c9724edd8827a1dbd91694d780e03fcb05a | refs/heads/master | 2023-08-31T04:26:09.120173 | 2023-08-30T17:22:59 | 2023-08-30T17:22:59 | 22,650,442 | 157 | 46 | null | 2023-09-08T17:51:33 | 2014-08-05T16:19:52 | Python | UTF-8 | Python | false | false | 2,931 | py | report_person.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
from functools import total_ordering
class ReportPerson:
"""Класс для описания сотрудника в отчете."""
def __init__(self, tags: list[str]):
# ФИО
self.second_name, self.first_name, self.middle_name = tags[0].split(maxsp... |
2b9e2c7ea55d63f10d6ecdfbe255a1064e52c693 | 8ca19f1a31070738b376c0370c4bebf6b7efcb43 | /examples/sharepoint/files/get_properties.py | 47f86cd93094ef89b8a9bf17b9e54ce7d9aeed23 | [
"MIT"
] | permissive | vgrem/Office365-REST-Python-Client | 2ef153d737c6ed5445ba1e446aeaec39c4ef4ed3 | cbd245d1af8d69e013c469cfc2a9851f51c91417 | refs/heads/master | 2023-09-02T14:20:40.109462 | 2023-08-31T19:14:05 | 2023-08-31T19:14:05 | 51,305,798 | 1,006 | 326 | MIT | 2023-08-28T05:38:02 | 2016-02-08T15:24:51 | Python | UTF-8 | Python | false | false | 1,185 | py | get_properties.py | import json
from office365.sharepoint.client_context import ClientContext
from tests import test_team_site_url, test_client_credentials
ctx = ClientContext(test_team_site_url).with_credentials(test_client_credentials)
file_url = '/sites/team/Shared Documents/big_buck_bunny.mp4'
file = ctx.web.get_file_by_server_relat... |
341dfa3872468426cc8c0b526c251ccac593f65a | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/storsimple/v20170601/get_backup_policy.py | acf9365dc6fe5aa1dfd6b011cf1381040834fee7 | [
"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 | 8,830 | py | get_backup_policy.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__all__ ... |
2e7743bc576f9c88579d9a279412464a52871c94 | 1aaddad1e1c99c222f6a9ba4907a535e0e1bbbae | /broadlink/exceptions.py | 2343ad6ed79158238f3bb8523da0cea188791dfe | [
"MIT"
] | permissive | mjg59/python-broadlink | 6b07e721637e1e487bdfdf6c6d8265e00dde01c3 | 3c183eaaef6cbaf9c1154b232116bc130cd2113f | refs/heads/master | 2023-08-15T22:59:01.997876 | 2022-11-20T18:48:08 | 2022-11-20T18:48:08 | 68,303,993 | 1,323 | 552 | MIT | 2023-09-01T07:28:45 | 2016-09-15T15:00:33 | Python | UTF-8 | Python | false | false | 4,472 | py | exceptions.py | """Exceptions for Broadlink devices."""
import collections
import struct
class BroadlinkException(Exception):
"""Base class common to all Broadlink exceptions."""
def __init__(self, *args, **kwargs):
"""Initialize the exception."""
super().__init__(*args, **kwargs)
if len(args) >= 2:
... |
8f250f0e9c470597164187c61f21212c7d221965 | dcd772f567ef8a8a1173a9f437cd68f211fb9362 | /tests/framework/user_guide/optimizing/Constrain/constraint.py | e1879a739d5fe988f754b6cee5ffaebfd3a71aba | [
"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 | 104 | py | constraint.py |
def constrain(self):
if (self.x-1.)**2 + self.y**2 < 1.0:
return False
else:
return True
|
271eeafd5d402c6a8b9d5c3ac91548d56e54dde1 | 6ba5116e37f67c613c855efd33a1615c8c851054 | /openaerostruct/structures/vonmises_wingbox.py | 052bfbfef2a3392775bd81c84a5e61aa4c7f8469 | [
"Apache-2.0"
] | permissive | mdolab/OpenAeroStruct | 08dc28fc12df9927c78469ea6188f4cee87a9d5b | f2f974fb06a34244a3bed6f99b486769256353fe | refs/heads/main | 2023-08-04T02:04:58.875285 | 2023-07-29T19:31:22 | 2023-07-29T19:31:22 | 53,821,266 | 154 | 100 | Apache-2.0 | 2023-07-29T19:31:23 | 2016-03-14T02:37:30 | Python | UTF-8 | Python | false | false | 6,588 | py | vonmises_wingbox.py | import numpy as np
import openmdao.api as om
from openaerostruct.structures.utils import norm, unit
class VonMisesWingbox(om.ExplicitComponent):
"""Compute the von Mises stresses for each element.
See Chauhan et al. (https://doi.org/10.1007/978-3-319-97773-7_38) for more.
Parameters
----------
... |
bb12d06f9700d729398f1bc8b01d3d8b4b6ac99e | 302ce5ab1045ee93845608c96580c63d54d730af | /src/spikeinterface/extractors/tests/test_toy_example.py | 448494f975d7e644fa4b2306b89a48b67035411a | [
"MIT"
] | permissive | SpikeInterface/spikeinterface | f900b62720860b2881d2e6b5fa4441e0e560f625 | ee2237b3f5ce2347b2ec9df90e97b0ee6c738dcf | refs/heads/main | 2023-09-02T11:27:54.687021 | 2023-09-01T13:48:29 | 2023-09-01T13:48:29 | 196,581,117 | 295 | 133 | MIT | 2023-09-14T19:12:16 | 2019-07-12T13:07:46 | Python | UTF-8 | Python | false | false | 588 | py | test_toy_example.py | import pytest
import numpy as np
from spikeinterface.extractors import toy_example
def test_toy_example():
rec, sorting = toy_example(num_segments=2, num_units=10)
assert rec.get_num_segments() == 2
assert sorting.get_num_segments() == 2
assert sorting.get_num_units() == 10
rec, sorting = toy_ex... |
c7d1d42ea5732bd7208293e45c88f2972547974a | 551eabacd926e7f9146177ef15664424bd4e3c9b | /numexpr/__init__.py | 7946f8522d7c5e536d6def85e69fd7b84aa0373d | [
"MIT"
] | permissive | pydata/numexpr | 69b0dc6e1bdf6450081ccee687f930616ebbf842 | 7d377e38f1c69f629a7e2b536761e7c0373a8b2d | refs/heads/master | 2023-09-05T04:08:51.739737 | 2023-08-18T19:06:13 | 2023-08-18T19:06:13 | 14,829,536 | 1,938 | 235 | MIT | 2023-09-13T09:14:04 | 2013-11-30T22:33:48 | Python | UTF-8 | Python | false | false | 2,279 | py | __init__.py | ###################################################################
# Numexpr - Fast numerical array expression evaluator for NumPy.
#
# License: MIT
# Author: See AUTHORS.txt
#
# See LICENSE.txt and LICENSES/*.txt for details about copyright and
# rights to use.
##########################################... |
b5a02429f292fe82fc4834988135de72d6eb923f | 5b6ba0f288b1e2ac236af846a9bf546a63228476 | /mmtbx/refinement/targets.py | 0c2af359f1d417f05b55614b93fa26884769afe1 | [
"BSD-3-Clause-LBNL"
] | permissive | cctbx/cctbx_project | 5b547b416cadbdf95cca21dace9f54272a08d98a | 7f4dfb6c873fd560920f697cbfd8a5ff6eed82fa | refs/heads/master | 2023-08-17T17:44:05.077010 | 2023-08-16T22:40:22 | 2023-08-16T22:40:22 | 39,508,026 | 206 | 131 | NOASSERTION | 2023-09-14T17:12:55 | 2015-07-22T13:36:27 | Python | UTF-8 | Python | false | false | 13,238 | py | targets.py | from __future__ import absolute_import, division, print_function
import libtbx.load_env
if(not libtbx.env.has_module(name="phaser")):
phaser = None
else:
import phaser.phenix_adaptors.sad_target
from cctbx.array_family import flex
from cctbx import xray
import boost_adaptbx.boost.python as bp
from libtbx.utils impo... |
cef53d89feed07e41ee5d844cef05fd57a206d43 | 4674b8088ffdf55905d44995f08a0792a3e4cd5c | /tests/hwsim/hwsim.py | e21c814f2e8e6928a61ac09d34b72d14884b2bdb | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | vanhoefm/krackattacks-scripts | 41daca791638a92aa4cfa68a582e46119037560e | 4b78669686f74efe664c6543b1b5b1616b22f902 | refs/heads/research | 2022-10-29T20:21:11.512335 | 2022-10-16T18:44:41 | 2022-10-16T18:44:41 | 107,408,514 | 2,184 | 577 | NOASSERTION | 2021-07-06T12:43:49 | 2017-10-18T12:58:08 | C | UTF-8 | Python | false | false | 4,640 | py | hwsim.py | #
# HWSIM generic netlink controller code
# Copyright (c) 2014 Intel Corporation
#
# Author: Johannes Berg <johannes.berg@intel.com>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import netlink, os
# constants
HWSIM_CMD_CREATE_RADIO = 4
HWSIM_CMD_DESTROY_RADI... |
8b8474c018550ba69de560c56678301a60f9eff9 | c19bcbc98555ef06276f9f0dcffc9ac35942a7c4 | /tests/test_proc_net_route.py | 177d58478cad83efc12c761b7c06497f453f4a7f | [
"MIT"
] | permissive | kellyjonbrazil/jc | 4e81a5421cd20be5965baf375f4a5671c2ef0410 | 4cd721be8595db52b620cc26cd455d95bf56b85b | refs/heads/master | 2023-08-30T09:53:18.284296 | 2023-07-30T17:08:39 | 2023-07-30T17:08:39 | 215,404,927 | 6,278 | 185 | MIT | 2023-09-08T14:52:22 | 2019-10-15T22:04:52 | Python | UTF-8 | Python | false | false | 1,281 | py | test_proc_net_route.py | import os
import unittest
import json
from typing import Dict
import jc.parsers.proc_net_route
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
class MyTests(unittest.TestCase):
f_in: Dict = {}
f_json: Dict = {}
@classmethod
def setUpClass(cls):
fixtures = {
'proc_net_route'... |
0fbc2b6d137e24412a656515ef777211e749dcfd | ef3f32be7b34d7f3cbb166cd3f66200ef33f4268 | /test/new_tests/test_admin_set_password.py | 0e0d5d400edbeb5d670a4317b3ad359040187afe | [
"Apache-2.0"
] | permissive | aerospike/aerospike-client-python | 8fa67b82d0d699b5c06e5b408d4b06985e6b3935 | 03853b63b824da488f651e0a375a7ed90730ed8e | refs/heads/master | 2023-08-23T15:39:01.169857 | 2023-08-21T19:12:16 | 2023-08-21T19:12:16 | 21,751,897 | 121 | 106 | Apache-2.0 | 2023-09-14T21:34:29 | 2014-07-11T21:24:56 | Python | UTF-8 | Python | false | false | 3,566 | py | test_admin_set_password.py | # -*- coding: utf-8 -*-
import pytest
import time
from .test_base_class import TestBaseClass
from aerospike import exception as e
import aerospike
class TestSetPassword(TestBaseClass):
pytestmark = pytest.mark.skipif(
not TestBaseClass.auth_in_use(), reason="No user specified, may be not secured cluste... |
6034069deee21816810934712805b50384adfe26 | 2f3d66965dbec4021c3819dce093a8b40724af33 | /mirage/libs/wireless_utils/device.py | 35708ec36ff92ccd18ca638fa6c03eec384557c1 | [
"MIT"
] | permissive | RCayre/mirage | 92bfa2c2822c06238976dbba6df993b10f2dc25d | f73f6c4442e4bfd239eb5caf5e1283c125d37db9 | refs/heads/master | 2023-02-04T06:23:05.985200 | 2022-11-24T19:16:53 | 2022-11-24T19:16:53 | 203,883,338 | 199 | 35 | MIT | 2023-01-26T03:06:32 | 2019-08-22T22:36:00 | Python | UTF-8 | Python | false | false | 8,961 | py | device.py | import mirage.libs.io as io
from mirage.libs.utils import exitMirage,booleanArg
class Device:
'''
This class is used to communicate with a specific hardware component.
Every class communicating with a given hardware component must inherits from this class, and implements the following methods :
* ``init()`` : t... |
097fe26ddcab3b510c554797a24a03782a74118e | d6712c5008277098937ac90cfe42533ed9ee55a0 | /docs/conf.py | 9807ade8244974bb323a21f749fc1d764597925b | [
"MIT"
] | permissive | AnalogJ/lexicon | 50492bccc304c6d703d29382d6d18359a8a171eb | 55914350aa28851b0c4df487bc5176b5a4841b88 | refs/heads/master | 2023-08-17T00:52:46.893312 | 2023-08-16T14:11:46 | 2023-08-16T14:11:46 | 50,903,853 | 1,397 | 402 | MIT | 2023-09-14T14:41:41 | 2016-02-02T07:53:04 | Python | UTF-8 | Python | false | false | 233 | py | conf.py | from os.path import abspath, dirname, join
import toml
metadata = toml.load(join(dirname(dirname(abspath(__file__))), "pyproject.toml"))["tool"]["poetry"]
master_doc = 'index'
project = "DNS-Lexicon"
release = metadata["version"]
|
150b9ee0836d921eb357d290c4c6d15fc82977d3 | 795984ca2c91f62ac5bc3d07ef759e202b688969 | /pages/tests/test_regression.py | 687fa9a0f09ccd102405d4565d86162bb4e5e732 | [
"BSD-3-Clause"
] | permissive | batiste/django-page-cms | 914b615c0ab3dc9ebc5aa2dfa718569484918c23 | cde7eab82a69dd5d4bd3da22b583d2de5eb7afdd | refs/heads/master | 2023-09-03T00:04:45.855102 | 2023-08-01T06:50:10 | 2023-08-01T06:50:10 | 403,432 | 154 | 71 | BSD-3-Clause | 2023-08-01T06:50:11 | 2009-12-07T11:59:13 | Python | UTF-8 | Python | false | false | 11,945 | py | test_regression.py | # -*- coding: utf-8 -*-
"""Django page CMS test suite module"""
from django.template import Context
from django.template import TemplateDoesNotExist
from django.core.files.uploadedfile import SimpleUploadedFile
from django.template import loader
from django.urls import reverse
from pages.placeholders import Placeholder... |
3bb4c1be0f4bcf1953f790d186604b1a8eee2200 | 060c559cdfe39e3ff37bcc4f5113f30901a605d7 | /examples/end2end_tfhub.py | 25e5251a4a8d8931f393469f78eacceef5c42e24 | [
"Apache-2.0"
] | permissive | onnx/tensorflow-onnx | 4402bc3416b1e191b122120aafcce5a5f396b160 | d5b7f39de66f3b4ff8731fd23b3f379ae731e601 | refs/heads/main | 2023-09-01T08:47:00.417130 | 2023-08-29T03:57:16 | 2023-08-29T03:57:16 | 125,098,252 | 2,068 | 454 | Apache-2.0 | 2023-08-29T03:57:18 | 2018-03-13T18:39:56 | Jupyter Notebook | UTF-8 | Python | false | false | 2,389 | py | end2end_tfhub.py | # SPDX-License-Identifier: Apache-2.0
"""
This example retrieves a model from tensorflowhub.
It is converted into ONNX. Predictions are compared to
the predictions from tensorflow to check there is no
discrepencies. Inferencing time is also compared between
*onnxruntime*, *tensorflow* and *tensorflow.lite*.
"""
from o... |
173b1cc175a40676326626b97d6c1107b683d927 | 14078605a0e9a0a958c6c521a90a6e2df380e924 | /tests/test_util.py | eb8f7e91b648204f5c7919765385b1f61ee83596 | [
"MIT"
] | permissive | westonplatter/fast_arrow | f175a7c76ed6d96b00404cd5887baf2861f88d82 | 1b7bd00c9151f0bb7c1a746219ecda3c3060363d | refs/heads/master | 2021-06-09T17:53:16.463612 | 2020-04-18T18:05:37 | 2020-04-18T18:05:37 | 141,639,575 | 147 | 46 | MIT | 2021-03-29T19:26:02 | 2018-07-19T23:15:25 | Python | UTF-8 | Python | false | false | 573 | py | test_util.py | import vcr
from fast_arrow import Client
def gen_vcr():
return vcr.VCR(
cassette_library_dir='tests/fixtures_vcr',
record_mode='none',
match_on=['method', 'scheme', 'host', 'port', 'path', 'query'],
)
def gen_client():
auth_data = gen_auth_data()
client = Client(auth_data)
... |
9374f1d27bd4f3a4174da3d958944baa04bec439 | 39164ede111f154b31cbb61663ea837f16f8aa4f | /odps/lib/tzlocal/__init__.py | 883c2dda8e0b827e5f67aa0b3f9c20d9f74ed0eb | [
"MIT",
"Apache-2.0"
] | permissive | aliyun/aliyun-odps-python-sdk | 217631252e6d52e75354a2a19faab5b9ff40e272 | c5b897f03759b1a9851505eea3858a96d628f105 | refs/heads/master | 2023-08-16T22:42:12.441717 | 2023-07-19T06:28:25 | 2023-07-19T06:28:25 | 45,234,875 | 437 | 116 | Apache-2.0 | 2023-08-03T06:45:34 | 2015-10-30T07:07:59 | Python | UTF-8 | Python | false | false | 154 | py | __init__.py | import sys
if sys.platform == 'win32':
from .win32 import get_localzone, reload_localzone
else:
from .unix import get_localzone, reload_localzone
|
69a58f0a006b12f5e05ce6ac51fd29c6dc94b6df | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/storage/azure-storage-blob/samples/blob_samples_enumerate_blobs_async.py | e98180583c57e7eeb59578e72c224f0eb29166db | [
"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 | 1,287 | py | blob_samples_enumerate_blobs_async.py | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... |
7d2f6ff92ff23658f3174b346d9a8ed59ba58cc1 | 360328d098a74581d0822fba489dd15e0d4e7ab3 | /tests/apps/core/test_error_view.py | 7f22a12420342b3b4dc3b4711a4cb9ebf994fd4b | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | openfun/richie | 0cef545486267bfb40e75e5fb2ce2a74f85a53ff | f2d46fc46b271eb3b4d565039a29c15ba15f027c | refs/heads/master | 2023-08-31T23:51:37.714179 | 2023-08-29T15:25:04 | 2023-08-29T15:48:39 | 111,388,461 | 238 | 96 | MIT | 2023-09-13T12:48:53 | 2017-11-20T09:23:40 | Python | UTF-8 | Python | false | false | 3,246 | py | test_error_view.py | """
Tests for error views
"""
from django.contrib.auth.models import AnonymousUser
from django.test import TestCase
from django.test.client import RequestFactory
from cms.api import create_page
from richie.apps.core.views import error
class ErrorViewHandlersTestCase(TestCase):
"""Test suite for the error view h... |
19f3fa2af77779f9f1e1d5b90210f5351befe3b4 | 6408f4b02543a55209b62a470c9d98ae782deac3 | /pandas_market_calendars/exchange_calendar_bmf.py | 10b2487fa7ec496e1668be51e5520b950d850d8e | [
"MIT",
"Apache-2.0"
] | permissive | rsheftel/pandas_market_calendars | c0d6de741abf66365704004c730a8df3ddb645d4 | 4a824d98cc3f62b8a6bff9c2ba044054790e805d | refs/heads/master | 2023-09-05T03:58:07.799842 | 2023-08-22T22:41:44 | 2023-08-22T22:41:44 | 75,791,177 | 649 | 154 | MIT | 2023-09-06T21:29:43 | 2016-12-07T02:28:15 | Python | UTF-8 | Python | false | false | 5,357 | py | exchange_calendar_bmf.py | #
# Copyright 2016 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
28e733ed2bb1801fcf6d7712b2ca19aaaf06732e | 23652304566b1869ca65b95b116ee43d16e134f3 | /tests/h/feeds/atom_test.py | 86720eb0ea8efecc3afe998ffcd25f8d604c6ea8 | [
"BSD-2-Clause",
"BSD-3-Clause",
"BSD-2-Clause-Views"
] | permissive | hypothesis/h | 29399a26990856c336b05022e827541dd8aeedab | 232446d776fdb906d2fb253cf0a409c6813a08d6 | refs/heads/main | 2023-08-30T16:21:33.754658 | 2023-08-30T09:26:50 | 2023-08-30T09:40:48 | 3,910,945 | 2,558 | 452 | BSD-2-Clause | 2023-09-14T11:25:06 | 2012-04-02T19:56:59 | Python | UTF-8 | Python | false | false | 6,203 | py | atom_test.py | from datetime import datetime, timedelta
from unittest import mock
import pytest
from h.feeds import atom
def test_feed_id():
feed = atom.feed_from_annotations([], "atom_url", mock.Mock())
assert feed["id"] == "atom_url"
def test_feed_title():
feed = atom.feed_from_annotations([], mock.Mock(), mock.M... |
5b379d6b85f475a3331ecdb9b10a2441cd101923 | a72cedaa0599bc8d42ed711b31bb01863549b3b1 | /src/klein/_request.py | 1a511902a44aaced46ded5e3a6cca7c1bb6d0954 | [
"MIT"
] | permissive | twisted/klein | 74d7282707b1c210c78b10e92ea4eae398c81b24 | 1e099333d08bda360e7d9c9d7aeeb77804b56a27 | refs/heads/trunk | 2023-08-31T10:47:01.550050 | 2023-08-15T00:41:44 | 2023-08-15T00:41:44 | 3,409,513 | 674 | 141 | NOASSERTION | 2023-09-11T23:05:09 | 2012-02-10T17:55:04 | Python | UTF-8 | Python | false | false | 1,130 | py | _request.py | # -*- test-case-name: klein.test.test_request -*-
# Copyright (c) 2011-2021. See LICENSE for details.
"""
HTTP request API.
"""
from typing import Union
from attr import Factory, attrib, attrs
from attr.validators import instance_of, provides
from hyperlink import DecodedURL
from tubes.itube import IFount
from zope.... |
79c2c264dd8499ef4d261bc958676cbc69db9c6c | 9b3ed66b0a1647a87c6ff38b6cef2354fb790ece | /assets/17_convexopt/testcvx.py | 05f4603349c61bb49c1f119727a55269edd32695 | [] | no_license | tiepvupsu/tiepvupsu.github.io | a117f82b0702b5f5a9422679aa20b8ba59d54d24 | 19c653816f9748537bf403d3adfa9b391c5321e0 | refs/heads/master | 2023-08-02T08:29:54.409971 | 2023-01-12T04:21:35 | 2023-01-12T05:11:18 | 83,335,474 | 675 | 773 | null | 2023-01-12T05:11:19 | 2017-02-27T17:05:56 | Jupyter Notebook | UTF-8 | Python | false | false | 205 | py | testcvx.py | from cvxopt import matrix, solvers
A = matrix([[-1.0, -1.0, 0., 1.0], [1., -1., -1., -1.]])
b = matrix([1.0, -2.0, 0., 4.])
c = matrix([[2.],[ 1.]])
sol = solvers.lp(c, A, b)
print(sol['x'])
import cvxopt |
f7c2c0bc951fe80ec7605975a81ecaf706520b73 | ecca79bf1491492befcccf5af27c1653d4c34685 | /grappa/reporters/information.py | 7391852b3be28816cbc5abcca4d1ec8597f1300b | [
"MIT"
] | permissive | grappa-py/grappa | d1545e9c9cbc161b3f7f068962b6c78a15707320 | f1861e1572e68f031977e86a5d9eba1957bd164e | refs/heads/master | 2021-06-01T10:31:17.896919 | 2020-11-23T18:18:27 | 2020-11-23T18:18:27 | 81,199,115 | 143 | 17 | MIT | 2020-11-23T23:01:27 | 2017-02-07T11:04:41 | Python | UTF-8 | Python | false | false | 207 | py | information.py | # -*- coding: utf-8 -*-
from .base import BaseReporter
class InformationReporter(BaseReporter):
title = 'Information'
def run(self, error):
return self.from_operator('information', None)
|
9097b9a4fe1cf86fc575640130ec274475e2212a | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/ios/tests/ShowIpEigrpNeighborsDetail/cli/equal/device_output_6_expected.py | 98ecc64dea204e990d4a9c21aa19462e7288bfbb | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 3,275 | py | device_output_6_expected.py | expected_output = {
"eigrp_instance": {
"100": {
"vrf": {
"default": {
"address_family": {
"ipv4": {
"name": "test",
"named_mode": True,
"eigrp_interfac... |
e0725e51530a4c9d2e1926679db904d23880777a | 3a50c0712e0a31b88d0a5e80a0c01dbefc6a6e75 | /thrift/compiler/test/fixtures/transitive-deps/gen-python/s/thrift_types.py | b48271ca75adbc39c8ce56715f6bd859aaa05b1e | [
"Apache-2.0"
] | permissive | facebook/fbthrift | 3b7b94a533666c965ce69cfd6054041218b1ea6f | 53cf6f138a7648efe5aef9a263aabed3d282df91 | refs/heads/main | 2023-08-24T12:51:32.367985 | 2023-08-24T08:28:35 | 2023-08-24T08:28:35 | 11,131,631 | 2,347 | 666 | Apache-2.0 | 2023-09-01T01:44:39 | 2013-07-02T18:15:51 | C++ | UTF-8 | Python | false | false | 1,103 | py | thrift_types.py | #
# Autogenerated by Thrift
#
# DO NOT EDIT
# @generated
#
from __future__ import annotations
import folly.iobuf as _fbthrift_iobuf
import thrift.python.types as _fbthrift_python_types
import thrift.python.exceptions as _fbthrift_python_exceptions
import b.thrift_types
import c.thrift_types
# This unfortunately ... |
1d501b446b54802820db4645e97a208bc18bbd4d | d110546d747d7e3865ce5742d5fca09f404623c0 | /doc/_ext/saltautodoc.py | d475d34b83db40870b8f746c5e41a368965fc74e | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 1,459 | py | saltautodoc.py | """
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
saltautodoc.py
~~~~~~~~~~~~~~
Properly handle ``__func_alias__``
"""
from sphinx.ext.autodoc import FunctionDocumenter
class SaltFunctionDocumenter(FunctionDocumenter):
"""
Simple override of sphinx.ext.autodoc.FunctionDocumenter to prope... |
289c1388df8e1d4e1d2d325d68f0156eb4a7548e | e993a7972529f60210d9dd6d7c4097c62c37bcdf | /data_loaders/humanml/utils/get_opt.py | c331b4dde8cc71c2ce33916945d75a43fc32308f | [
"MIT"
] | permissive | GuyTevet/motion-diffusion-model | 64756013105a80ea2a3180a73ac86519b361e53b | 8139dda55d90a58aa5a257ebf159b2ecfb78c632 | refs/heads/main | 2023-09-01T05:00:14.156745 | 2023-06-06T23:42:33 | 2023-06-06T23:42:33 | 543,082,997 | 2,302 | 265 | MIT | 2023-08-29T09:27:54 | 2022-09-29T11:24:35 | Python | UTF-8 | Python | false | false | 2,548 | py | get_opt.py | import os
from argparse import Namespace
import re
from os.path import join as pjoin
from data_loaders.humanml.utils.word_vectorizer import POS_enumerator
def is_float(numStr):
flag = False
numStr = str(numStr).strip().lstrip('-').lstrip('+') # 去除正数(+)、负数(-)符号
try:
reg = re.compile(r'^[-+]?[0-9... |
eaaf6ab90f9d126f4e0419a8bad30fcc2ed7ce08 | 0faf534ebb6db6f32279e5bee25b968bd425ce3a | /veriloggen/dataflow/dataflow.py | 7874fc356606d0ff95240b994622ea290fc33f7b | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | PyHDI/veriloggen | e8647cb2d40737d84e31d6b89c5799bab9cbd583 | f2b1b9567150af097eed1b5e79ba2b412854ef43 | refs/heads/develop | 2023-08-09T10:02:35.626403 | 2023-08-09T00:50:14 | 2023-08-09T00:50:14 | 37,813,184 | 282 | 60 | Apache-2.0 | 2023-07-20T03:03:29 | 2015-06-21T15:05:30 | Python | UTF-8 | Python | false | false | 7,531 | py | dataflow.py | from __future__ import absolute_import
from __future__ import print_function
import os
import sys
import copy
import collections
import functools
import veriloggen.core.vtypes as vtypes
from veriloggen.core.module import Module
from veriloggen.seq.seq import Seq
from . import visitor
from . import dtypes
from . impor... |
7f4dd69417c79bf27f57d3ebf5893dfbec33c9fd | b04c5ad9a8019f2b936ce933293402c98eb25ba7 | /src/ontogpt/utils/model_utils.py | eed44047e239bf73bbc801ba701e55eafba137e9 | [
"BSD-3-Clause"
] | permissive | monarch-initiative/ontogpt | ede671ced22e8b00d2f33bbe09a3595ed04e508c | 4849f4ce7c54f0394c263fdcad832f7a9eabd52b | refs/heads/main | 2023-08-31T07:20:06.912334 | 2023-08-25T21:20:17 | 2023-08-25T21:20:17 | 584,843,480 | 322 | 43 | BSD-3-Clause | 2023-09-14T20:06:46 | 2023-01-03T16:53:25 | Jupyter Notebook | UTF-8 | Python | false | false | 572 | py | model_utils.py | """Utilities for retrieving and applying prebuild models."""
import pystow
import logging
from pathlib import PosixPath
ONTOGPT_MODULE = pystow.module("ontogpt")
def get_model(url: str) -> PosixPath:
"""Retrieve a model from a given URL.
Returns the Path for the retrieved file,
or the path to where it ... |
d3e07e30ba9355a5de6fc6eec847ac4dfa5f3d7a | 0ba9681b235b377b3f57d52532ab7212d4d4cd8a | /saw-remote-api/python/tests/saw_low_level/test_swap_low_level.py | 6c0891425fdd0ebd3ec807861b8785850bb78e65 | [
"BSD-3-Clause"
] | permissive | GaloisInc/saw-script | d9a3eb7b05c1bcbcc319987223cd53b903b55b5d | 79ddd800bec59528958ed6d7593304e2b17b7dfb | refs/heads/master | 2023-09-01T09:47:31.415255 | 2023-08-30T11:26:08 | 2023-08-30T11:26:08 | 34,082,065 | 458 | 82 | BSD-3-Clause | 2023-09-14T16:23:09 | 2015-04-16T21:39:32 | Haskell | UTF-8 | Python | false | false | 1,959 | py | test_swap_low_level.py | from pathlib import Path
import unittest
import saw_client as saw
from saw_client.proofscript import *
class SwapLowLevelTest(unittest.TestCase):
def test_swap(self):
c = saw.connection.connect(reset_server=True)
if __name__ == "__main__": saw.view(saw.LogResults())
swap_bc = str(Path('te... |
25ac02f8a2b6634ceaa1b7e485d5827436b10df0 | bfc42c114f652012b6cfd14e7cccf52cb6b9ac7e | /src/spdx_tools/spdx/jsonschema/checksum_converter.py | 9ffb39b11e6feadc567bb3f4865a56fd94a5a3a5 | [
"Apache-2.0",
"GPL-2.0-only"
] | permissive | spdx/tools-python | 05a952501af2ac608678cb1737f7c661f6091fa2 | 777bd274dd06cb24342738df7da5ab285d652350 | refs/heads/main | 2023-08-31T09:39:52.930063 | 2023-08-24T06:39:48 | 2023-08-24T10:22:33 | 32,761,058 | 147 | 136 | Apache-2.0 | 2023-09-14T15:50:59 | 2015-03-23T21:54:39 | Python | UTF-8 | Python | false | false | 1,232 | py | checksum_converter.py | # SPDX-FileCopyrightText: 2022 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0
from beartype.typing import Type
from spdx_tools.spdx.jsonschema.checksum_properties import ChecksumProperty
from spdx_tools.spdx.jsonschema.converter import TypedConverter
from spdx_tools.spdx.jsonschema.json_property import Json... |
5bc187ceb676bfc52755d2e66381fc19ee1d70cc | ac0deeda807797e445ee1f5fd2bfd52c7687843e | /MayaSublime.py | 71a3011666691ac3d4d8c66fcd9c928cec8233bd | [
"MIT"
] | permissive | justinfx/MayaSublime | 7e9ea5e63ca78a9dc4d2dd91ec1e7dd4e1b9e187 | 6b7cd30117940c95e2b94e671b81be28de56647f | refs/heads/master | 2021-12-24T11:00:41.808879 | 2021-09-30T19:02:27 | 2021-09-30T19:02:27 | 4,867,118 | 105 | 27 | MIT | 2021-09-26T20:05:36 | 2012-07-03T02:10:59 | Python | UTF-8 | Python | false | false | 14,191 | py | MayaSublime.py | # ST2/ST3 compat
from __future__ import print_function
import re
import sys
import time
import uuid
import socket
import textwrap
import threading
import traceback
from telnetlib import Telnet
import sublime, sublime_plugin
if sublime.version() < '3000':
# we are on ST2 and Python 2.X
_ST3 = False
else:
_ST3 =... |
ee970f8573c61210cadeffcbe8d62fc229e59f5d | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /api/src/opentrons/protocol_api/core/__init__.py | 150697d611833661babf835043a853869c191a67 | [
"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 | 736 | py | __init__.py | """Core protocol logic interfaces and implementations.
This module provide facades to different protocol execution cores,
and is an internal implementation detail of the Python Protocol API.
Nothing defined in `opentrons.protocol_api.core` may be considered public.
"""
# TODO(mc, 2022-08-22): uncomment when import cy... |
c0934b5c2ae84ddb92e9e65bc678adb8f4799e38 | 559f3dec0964d2e0f86c6c871371fe779cf3726c | /EISeg/eiseg/util/regularization/rs_regularization.py | 9fff9b8f99927d9bf2603ae20906d142cf7d4a33 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSeg | 319ab26665ea492527a1949671650135123ffc39 | 2c8c35a8949fef74599f5ec557d340a14415f20d | refs/heads/release/2.8 | 2023-08-31T09:08:06.724717 | 2023-08-18T01:59:56 | 2023-08-18T01:59:56 | 204,380,779 | 8,531 | 1,866 | Apache-2.0 | 2023-09-12T02:30:42 | 2019-08-26T02:32:22 | Python | UTF-8 | Python | false | false | 11,832 | py | rs_regularization.py | # Copyright (c) 2022 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 b... |
e0bd30c05a071236c6ff743bff715c38e023c9b9 | a1c7055f3e66fb802ae4c3ecdb952ff45579914f | /tests_isolated/test_commandset/test_categories.py | 71f1db8e238e73885ebef0fb40912cf480eb40f9 | [
"MIT"
] | permissive | python-cmd2/cmd2 | 3e4ef2a1804554e8acd50898636a5685eab292c1 | 9886b82c71face043e1fac871a6cdbebbf0e864c | refs/heads/master | 2023-09-05T14:55:50.702311 | 2023-09-04T16:44:01 | 2023-09-04T16:44:01 | 51,442,999 | 571 | 154 | MIT | 2023-09-04T16:44:03 | 2016-02-10T13:34:49 | Python | UTF-8 | Python | false | false | 4,417 | py | test_categories.py | #!/usr/bin/env python3
# coding=utf-8
"""
Simple example demonstrating basic CommandSet usage.
"""
from typing import (
Any,
)
import cmd2
from cmd2 import (
CommandSet,
with_default_category,
)
@with_default_category('Default Category')
class MyBaseCommandSet(CommandSet):
"""Defines a default catego... |
4a23646282f2e84935d077be648013ef91c7fc3a | b3a693cb2c15f95133876f74a640ec585b7a0f62 | /CompetitiveProgramming/BinarySearch/adjusting_rectangles.py | 081c289074bdfcada26ee7d1750c427b5eea1bc9 | [] | no_license | singhsanket143/CppCompetitiveRepository | 1a7651553ef69fa407d85d789c7c342f9a4bd8e9 | 6e69599ff57e3c9dce4c4d35e60c744f8837c516 | refs/heads/master | 2022-06-23T01:42:38.811581 | 2022-06-16T13:17:15 | 2022-06-16T13:17:15 | 138,698,312 | 349 | 148 | null | 2021-03-06T18:46:58 | 2018-06-26T07:06:16 | C++ | UTF-8 | Python | false | false | 631 | py | adjusting_rectangles.py | """
There are 𝑛 rectangles of the same size: 𝑤 in width and ℎ in length. It is required to find a square of the smallest size into which these rectangles can be packed. Rectangles cannot be rotated.
https://codeforces.com/edu/course/2/lesson/6/2/practice/contest/283932/problem/A
"""
def good(mid, n, w, h):
return (m... |
c2d5329ef55209d74620838cf0f8f6027d758ea6 | 6bc58f290bc3ecd1f4d2a492f0abc5fd4b8ff9c0 | /tests/test_aruba.py | 79186b52c334dc48bccb656eb08d5fde039b693a | [
"Apache-2.0",
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | splunk/splunk-connect-for-syslog | c5821e025ef1b5d1312a6ac71b822262f560aa99 | 472f0b7a0bcbb29cb00a141e4fe4aa6193c49fde | refs/heads/main | 2023-08-25T03:57:40.245846 | 2023-08-21T08:55:12 | 2023-08-21T08:55:12 | 194,185,530 | 188 | 149 | Apache-2.0 | 2023-09-14T18:31:04 | 2019-06-28T01:27:07 | Python | UTF-8 | Python | false | false | 3,309 | py | test_aruba.py | # Copyright 2019 Splunk, Inc.
#
# Use of this source code is governed by a BSD-2-clause-style
# license that can be found in the LICENSE-BSD2 file or at
# https://opensource.org/licenses/BSD-2-Clause
from jinja2 import Environment
from .sendmessage import *
from .splunkutils import *
from .timeutils import *
import ... |
96c5e1a31366de3e83c8a7dc19a618a94ae388fd | 675ecac2016ba9f8db611f6688a46ac4d2095447 | /Interview Questions solutions/group anagrams/index.py | 78026ac25e4902357e718e3745d1361446fdfc77 | [] | no_license | BitPunchZ/Leetcode-in-python-50-Algorithms-Coding-Interview-Questions | 87a9619ba011aa8c30fe33e5e94037fea3144d1a | 86a0ceefa9c8416c17010fe90eb372daf82256db | refs/heads/master | 2023-08-17T05:37:59.467046 | 2023-08-09T08:59:01 | 2023-08-09T08:59:01 | 247,604,188 | 144 | 125 | null | 2021-04-19T03:04:00 | 2020-03-16T03:42:10 | Python | UTF-8 | Python | false | false | 436 | py | index.py | class Solution:
def findHash(self,s):
return ''.join(sorted(s))
def groupAnagrams(self, strs: List[str]) -> List[List[str]]:
answers = []
m = {}
for s in strs:
hashed = self.findHash(s)
if(hashed not in m):
m[hashed] = []
m[has... |
174f7c8c728d1f3f88fbc80d954a37e833f26ee5 | 914faa10e5423efc87d0079248b3eb7df72ed83e | /test/calls/call8.py | 0b78f3d3a8473650025a42b5c240d03f26528292 | [
"MIT"
] | permissive | MagicStack/MagicPython | cf7b7ae8290b0e997adf6a197b2f5be300391a0a | 7d0f2b22a5ad8fccbd7341bc7b7a715169283044 | refs/heads/master | 2023-08-26T04:16:54.672649 | 2022-10-18T07:43:20 | 2022-10-19T23:20:38 | 43,982,620 | 1,564 | 146 | MIT | 2023-02-23T19:40:57 | 2015-10-09T22:13:24 | JavaScript | UTF-8 | Python | false | false | 4,250 | py | call8.py | foo. __class__(foo=bar)
foo. __class__ (foo=bar)
foo. __add__ (foo=bar)
foo. __add__(foo=bar)
foo : source.python
. : meta.member.access.python, punctuation.separator.period.python, source.python
: meta.member.access.python, source.python
__class__ : meta.function-call.python... |
29453d3335187eeb54b33e0a775fe7109fdb934b | d3b468ef0938ec32edf71ea1ceeb5b5d06ebf171 | /swig/python/gdal-utils/scripts/gdal_edit.py | 32e2b9dca8c492546914936a4441b0629f56789a | [
"LicenseRef-scancode-warranty-disclaimer",
"SunPro",
"LicenseRef-scancode-info-zip-2005-02",
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause"
] | permissive | OSGeo/gdal | 30a1e1fb0909d758d4f636d481bf03fcd7affe3c | 1e7746b2546b8c4878f4bfdb20c87f87e561745b | refs/heads/master | 2023-09-03T19:37:50.027999 | 2023-09-03T18:29:31 | 2023-09-03T18:29:31 | 6,148,317 | 4,100 | 2,611 | NOASSERTION | 2023-09-14T20:23:19 | 2012-10-09T21:39:58 | C++ | UTF-8 | Python | false | false | 315 | py | gdal_edit.py | #!/usr/bin/env python3
import sys
from osgeo.gdal import UseExceptions, deprecation_warn
# import osgeo_utils.gdal_edit as a convenience to use as a script
from osgeo_utils.gdal_edit import * # noqa
from osgeo_utils.gdal_edit import main
UseExceptions()
deprecation_warn("gdal_edit")
sys.exit(main(sys.argv))
|
a47f80d8ba6c8825aa93c72a576024a13997c32b | 6afed2f82f1a33ee48104fdef154f05147398645 | /setup.py | 2bbb8e69b64a4d5e0413f826b3c9babe93fdb2c3 | [
"Apache-2.0"
] | permissive | MAIF/eurybia | 0d8e6936caf19e6c3028db8c8d6c17df0efcf48b | 31ab98bebadadc2b31a77653fb6a5d4171010207 | refs/heads/master | 2023-05-31T03:22:11.867851 | 2023-03-02T16:49:18 | 2023-03-02T16:49:18 | 487,858,444 | 166 | 21 | Apache-2.0 | 2023-08-31T14:21:56 | 2022-05-02T13:36:59 | Jupyter Notebook | UTF-8 | Python | false | false | 3,126 | py | setup.py | #!/usr/bin/env python
"""The setup script."""
import os
from setuptools import setup
here = os.path.abspath(os.path.dirname(__file__))
with open("README.md", encoding="utf8") as readme_file:
long_description = readme_file.read()
# Load the package's __version__.py module as a dictionary.
version_d: dict = {}
w... |
0bf71366402b3bd62274259e2cd72e69f0fc3c92 | e4c5238c86c8a114d49b7ba3ecc5ef9d5157e152 | /toqito/matrix_props/is_block_positive.py | cf7bdd18f22acc82846e8aa8cecf59b7a88b7f77 | [
"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 | 4,184 | py | is_block_positive.py | """Is matrix block positive."""
from __future__ import annotations
import numpy as np
from toqito.matrix_props.is_hermitian import is_hermitian
from toqito.matrix_props.is_positive_semidefinite import is_positive_semidefinite
from toqito.matrix_props.sk_norm import sk_operator_norm
def is_block_positive(
mat: np... |
f47b385e5f918a6ef70f369fa7cfefa24678b77a | 95b4a15808b9c412c8364db80fd619a65dd587e0 | /tests/compas/geometry/test_curves_parabola.py | 40e7bf6eeb8989fcb555f0563abbcf7e99258a60 | [
"MIT"
] | permissive | compas-dev/compas | 11d5c4d9afd554833297b4a5dbe6a975e6940ce3 | 486e2e9332553240bcbd80e100d26bff58071709 | refs/heads/main | 2023-08-31T15:49:32.430570 | 2023-08-17T10:19:52 | 2023-08-17T10:19:52 | 104,857,648 | 286 | 116 | MIT | 2023-09-12T13:53:36 | 2017-09-26T08:28:01 | Python | UTF-8 | Python | false | false | 3,259 | py | test_curves_parabola.py | import pytest
import json
import compas
from compas.geometry import allclose
from compas.geometry import Frame
from compas.geometry import Parabola
def test_parabola_create():
parabola = Parabola(focal=1)
assert parabola.focal == 1
assert parabola.frame == Frame.worldXY()
assert allclose(parabola.p... |
68ecb2b96db868ad97cb47033dc005e55e9584ff | e9869359c839c8c175ae7877bc35dcfdfe4058f8 | /kornia/metrics/mean_iou.py | 26173c8ba54645c7b72f484c9a7ab861ddd8f770 | [
"Apache-2.0"
] | permissive | kornia/kornia | 80f93eae6a70b8bc0c9784f92a842ab9a6ab54ae | 1e0f8baa7318c05b17ea6dbb48605691bca8972f | refs/heads/master | 2023-08-31T06:32:45.960859 | 2023-08-30T21:59:41 | 2023-08-30T21:59:41 | 145,693,916 | 7,351 | 833 | Apache-2.0 | 2023-09-12T21:59:29 | 2018-08-22T10:31:37 | Python | UTF-8 | Python | false | false | 4,594 | py | mean_iou.py | import torch
from .confusion_matrix import confusion_matrix
def mean_iou(input: torch.Tensor, target: torch.Tensor, num_classes: int, eps: float = 1e-6) -> torch.Tensor:
r"""Calculate mean Intersection-Over-Union (mIOU).
The function internally computes the confusion matrix.
Args:
input : tenso... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.