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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f287477ff2b04066c5a7dec2d7bf312e952dfe5e | 26060f5ea4d7efee2d03cbbd0b49c099e0f5f38a | /sharpy/linear/dev/linsym_uc_dncdzeta.py | 1cbee5cabfced8dfc929bdf5af75603fa94bc091 | [
"BSD-3-Clause"
] | permissive | ImperialCollegeLondon/sharpy | 0fcd1fba9ed2181dabc1124f9800aa75521bfc3d | 58ddceb985bef13af3ea199a1764c8dc9b088907 | refs/heads/main | 2023-08-19T03:04:26.044857 | 2023-07-17T07:05:06 | 2023-07-17T07:05:06 | 70,235,936 | 106 | 55 | BSD-3-Clause | 2023-08-16T02:27:58 | 2016-10-07T10:11:51 | Python | UTF-8 | Python | false | false | 5,041 | py | linsym_uc_dncdzeta.py | '''
Analytical linearisation of uc*dnc/dzeta
Sign convention:
Scalar quantities are all lower case, e.g. zeta
Arrays begin with upper case, e.g. Zeta_i
2 D Matrices are all upper case, e.g. AW, ZETA=[Zeta_i]
3 D arrays (tensors) will be labelled with a 3 in the name, e.g. A3
'''
import numpy as np
import sympy as s... |
bfc3a671bed4bf3e1d24505f769887418cd2815f | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /Social_Network_Analysis_for_Starupts/chapter4/hijackers.py | 33f1aa8e0f9dae850bdc919c67ff17b5784e4d31 | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 1,088 | py | hijackers.py | #!/usr/bin/env python
# encoding: utf-8
"""
hijackers.py
Created by Maksim Tsvetovat on 2011-08-16.
Copyright (c) 2011 Maksim Tsvetovat. All rights reserved.
"""
import sys
import os
import csv ## we'll use the built-in CSV library
import networkx as net
import multimode as mm
import triadic
# open the file
in_file... |
5cc0b0d4774aa296ae0fd46d219042bd10f6a9ef | b8bbdfc593b6d816e67a344f720f90ec05236778 | /tests/system/providers/google/cloud/gcs/example_sftp_to_gcs.py | 80b53774d55f26727a6249fa12e5b5dcd1247cb0 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | apache/airflow | ed78db0a8bab7e096990e143926e52f518e288ab | 1b122c15030e99cef9d4ff26d3781a7a9d6949bc | refs/heads/main | 2023-09-01T08:37:34.556097 | 2023-09-01T06:49:05 | 2023-09-01T06:49:05 | 33,884,891 | 22,756 | 11,558 | Apache-2.0 | 2023-09-14T20:12:36 | 2015-04-13T18:04:58 | Python | UTF-8 | Python | false | false | 4,510 | py | example_sftp_to_gcs.py | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
03b003710097d91372b8d57d6f3cf700654ae4f4 | 5a6ccde5f37cc86b6fc0812b2bf40f42eab23906 | /A-set/612A.Splitting Text.py | 7fde6e905d38de66f9879199485d02bc1956d9fa | [] | no_license | Waqar-107/Codeforces | 23f2b1edffb85f6f020107f03e09a455d3e6e792 | f0d2f25aa6a09c06083b82c39cdf3288ec2eecba | refs/heads/master | 2023-03-09T07:55:46.583363 | 2023-03-04T09:57:44 | 2023-03-04T09:57:44 | 82,915,896 | 196 | 138 | null | 2023-02-11T22:06:20 | 2017-02-23T10:29:34 | C++ | UTF-8 | Python | false | false | 500 | py | 612A.Splitting Text.py | # from dust i have come dust i will be
n,p,q=map(int,input().split())
s=input()
x=0
while p*x<=n:
if (n-p*x)%q==0:
y=(n-p*x)//q
print(x+y)
l=0
while x>0:
x-=1
for i in range(p):
print(s[l],end='')
l+=1
print()
... |
a366e85cde21fe661c307a2eb1506604a8aba75f | 8d37f57da7c991381c9fc3d7d5d3c9f610ac10d4 | /tests/samples/variables_classes.py | 328e3572f71235fb408e729060c8f1acab82fbc7 | [
"MIT"
] | permissive | alexmojaki/snoop | b91615844ed9f8c9f34071774ed4aaeb197d3a6a | 98102bde87d092640828590927ef144d069dc56f | refs/heads/master | 2023-08-21T11:59:00.497603 | 2022-12-22T13:48:56 | 2022-12-22T13:48:56 | 186,476,740 | 975 | 40 | MIT | 2022-12-22T13:47:56 | 2019-05-13T18:45:35 | Python | UTF-8 | Python | false | false | 473 | py | variables_classes.py | from collections import OrderedDict
import snoop
class WithSlots(object):
__slots__ = ('x', 'y')
def __init__(self):
self.x = 3
self.y = 4
@snoop.snoop(watch=(
snoop.Keys('_d', exclude='c'),
snoop.Attrs('_s'),
snoop.Indices('_lst')[-3:],
snoop.Attrs('_lst'),... |
835c20a08ad5469a9e28e6a0944731782c7ef693 | 5eb52c07e5b1bd00af77306f927f382b684cd6ff | /indy_node/test/request_handlers/rich_schema/test_rich_schema_handler.py | 8704f7e847446e3da4da548010712cbcb56073f7 | [
"Apache-2.0"
] | permissive | hyperledger/indy-node | bce39486988f5114581cff4f6d14fc1b7684143c | e6bb87d4c605aff9914491d062248b6ec857334c | refs/heads/main | 2023-09-03T15:33:08.187153 | 2023-05-08T22:48:21 | 2023-05-08T22:48:21 | 77,021,566 | 691 | 783 | Apache-2.0 | 2023-05-09T15:42:43 | 2016-12-21T05:45:04 | Python | UTF-8 | Python | false | false | 943 | py | test_rich_schema_handler.py | import pytest
from indy_common.constants import ENDORSER
from indy_node.server.request_handlers.domain_req_handlers.rich_schema.rich_schema_handler import RichSchemaHandler
from indy_node.test.request_handlers.helper import add_to_idr
from indy_node.test.request_handlers.rich_schema.helper import rich_schema_request
f... |
1c501f03cab1ac47f87eb09aaef108a89468f84c | d48e09166db1ff0dae2c8a4ddbbe453606689081 | /panda/tests/safety/test_honda.py | a5eb04ad6632c53ad685f06cbce200be4f07a383 | [
"MIT"
] | permissive | Gernby/raspberry-pilot | a8857fdb2a50ade237d657ccd9d1049c5aa65515 | 0909e7594dff1c6fb524b5502ce3258f1969b6a5 | refs/heads/resonant-rails | 2023-04-06T10:09:35.457160 | 2023-01-06T01:57:31 | 2023-01-06T01:57:31 | 242,575,807 | 141 | 62 | MIT | 2023-03-05T05:22:49 | 2020-02-23T19:15:12 | C | UTF-8 | Python | false | false | 10,898 | py | test_honda.py | #!/usr/bin/env python3
import unittest
import numpy as np
import libpandasafety_py
from panda import Panda
MAX_BRAKE = 255
INTERCEPTOR_THRESHOLD = 328
class TestHondaSafety(unittest.TestCase):
@classmethod
def setUp(cls):
cls.safety = libpandasafety_py.libpandasafety
cls.safety.safety_set_mode(Panda.SAFE... |
4136638bf46777bf1cc168db6b898f7ad60bc4ce | f4393e02de84da11a2c4562d44a0f5b9996f5150 | /hard_negative_mining.py | 4d0498125102dec96f7e3234dcff971befc02532 | [] | no_license | CuongNN218/zalo_ltr_2021 | 809637ac246c95e857808893dc96895e917ebe47 | b63aa805052c068ab3a18811ec344598bfe845c4 | refs/heads/main | 2023-05-22T13:43:49.015440 | 2021-12-20T17:25:29 | 2021-12-20T17:25:29 | 437,156,924 | 162 | 56 | null | null | null | null | UTF-8 | Python | false | false | 4,137 | py | hard_negative_mining.py | import pickle
import os
import numpy as np
import json
import torch
from tqdm import tqdm
from rank_bm25 import *
import argparse
import warnings
from sentence_transformers import SentenceTransformer, util
warnings.filterwarnings("ignore")
if __name__ == '__main__':
parser = argparse.ArgumentParser()
par... |
db2a3eb1a4d100654846eaebe6b6c27d9d58832c | 862ecba769c82b7e4dd83f14c6e99aedbbef7e98 | /fnss/__init__.py | ebd581c63a6efce40a533873c13e8fe5a9a1e2b7 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | fnss/fnss | 3f1611066227c9f4acc2b394f53667d008bf84fa | cf4cec4ceb82c0bfe3032c7cef1754d451de8216 | refs/heads/master | 2023-03-10T00:44:03.803279 | 2023-02-22T01:41:28 | 2023-02-22T01:41:28 | 7,737,956 | 128 | 38 | NOASSERTION | 2023-02-22T01:41:29 | 2013-01-21T18:36:10 | Python | UTF-8 | Python | false | false | 1,397 | py | __init__.py | """
The Fast Network Simulation Setup (FNSS) core library is a Python library
providing a set of features allowing network researchers and engineers to
simplify the setup of a network simulation.
These features include the ability to:
* Parse a topology from a dataset, a topology generator or generate it
according ... |
64ec8770b74a2717905e00eaaf39db7c143271e6 | db12b990924703cd74748d8585cd9c11fafa6746 | /h2o-py/tests/testdir_apis/H2OAssembly/pyunit_h2oassembly_fit.py | 124049cee8e59def7db3a0b90872c83942cdcac4 | [
"Apache-2.0"
] | permissive | h2oai/h2o-3 | 919019a8f297eec676011a9cfd2cc2d97891ce14 | d817ab90c8c47f6787604a0b9639b66234158228 | refs/heads/master | 2023-08-17T18:50:17.732191 | 2023-08-17T16:44:42 | 2023-08-17T16:44:42 | 17,371,412 | 6,872 | 2,345 | Apache-2.0 | 2023-09-14T18:05:40 | 2014-03-03T16:08:07 | Jupyter Notebook | UTF-8 | Python | false | false | 1,311 | py | pyunit_h2oassembly_fit.py | import sys
sys.path.insert(1,"../../")
from tests import pyunit_utils
from h2o.utils.typechecks import assert_is_type
from h2o.assembly import *
from h2o.transforms.preprocessing import *
def h2oassembly_fit():
"""
Python API test: H2OAssembly.fit(fr)
Copied from pyunit_assembly_demo.py
"""
fr = ... |
90eb736cd81231aead116d9a5f903411be83c4c1 | 684df684759bfbef64b0fbcde9eb2b898a2e2061 | /swagger-gen/python/test/test_linear_market_api.py | be4d9e8add06a6e28d556205cdfb47e68c097bdf | [] | no_license | bybit-exchange/api-connectors | ae13caecb98c82460c0a24b910f2e9c1eb80b9bc | cc021a371bde30c2fd282be9fdc8eef0ed0e362e | refs/heads/master | 2021-12-31T10:23:24.429638 | 2021-11-24T16:37:18 | 2021-11-24T16:37:18 | 213,896,494 | 192 | 185 | null | 2023-03-03T12:50:12 | 2019-10-09T11:10:19 | C# | UTF-8 | Python | false | false | 912 | py | test_linear_market_api.py | # coding: utf-8
"""
Bybit API
## REST API for the Bybit Exchange. Base URI: [https://api.bybit.com] # noqa: E501
OpenAPI spec version: 0.2.11
Contact: support@bybit.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittes... |
74a53bb2575fb64827af397e94e74acc9e638dde | bdf0d4d3aac186af3ad0ad6ac9f380f9a0573fba | /aries_cloudagent/ledger/endpoint_type.py | 2f5f7da59247b5366708190e9bf8b41c6f0af12e | [
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] | permissive | hyperledger/aries-cloudagent-python | f25d961e0717a4d703bf43df3e4b4bc8ec07b908 | 39cac36d8937ce84a9307ce100aaefb8bc05ec04 | refs/heads/main | 2023-09-01T15:37:05.353674 | 2023-08-31T14:13:06 | 2023-08-31T14:13:06 | 193,556,007 | 370 | 530 | Apache-2.0 | 2023-09-14T17:59:34 | 2019-06-24T18:12:14 | Python | UTF-8 | Python | false | false | 1,028 | py | endpoint_type.py | """Ledger utilities."""
from collections import namedtuple
from enum import Enum
EndpointTypeName = namedtuple("EndpointTypeName", "w3c indy")
class EndpointType(Enum):
"""Enum for endpoint/service types."""
ENDPOINT = EndpointTypeName("Endpoint", "endpoint")
PROFILE = EndpointTypeName("Profile", "prof... |
9cb03e49709c619b614f4abf8a637511a1716295 | 0b98732dcd3dd94a97555a8f3e8dd3524bb8ec86 | /mmdet/datasets/loader/build_loader.py | 1843713738ef417b17aa090b2d69562b131a8626 | [
"Apache-2.0"
] | permissive | hasanirtiza/Pedestron | e89fea2ec676f150a7266f6b65963dd6c4ec35c9 | 8ab23ec38982cfaf0ae82c77c30f10b2fff62d12 | refs/heads/master | 2023-08-06T02:53:06.368937 | 2023-04-06T13:46:27 | 2023-04-06T13:46:27 | 247,410,025 | 723 | 161 | Apache-2.0 | 2022-10-02T10:17:44 | 2020-03-15T05:52:52 | Python | UTF-8 | Python | false | false | 1,559 | py | build_loader.py | import platform
from functools import partial
from mmcv.runner import get_dist_info
from mmcv.parallel import collate
from torch.utils.data import DataLoader
from .sampler import GroupSampler, DistributedGroupSampler, DistributedSampler
if platform.system() != 'Windows':
# https://github.com/pytorch/pytorch/issu... |
f2ea3f33a920d9dab10435de1ce94a26ef5288e8 | ceeb1dd2c71c6c94cf0c4581218fd02f64b526dd | /extruct/microformat.py | dab6a11478f22b32fa12d50865de7ce4ae4952d4 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | scrapinghub/extruct | f2a79c45117bda0a819f50f51c4edb97eb0c75f7 | 60538125f743c7c357fd170abcf94440ea45a132 | refs/heads/master | 2023-09-03T01:49:58.318356 | 2023-07-07T11:18:01 | 2023-07-07T11:18:01 | 44,965,223 | 788 | 122 | BSD-3-Clause | 2023-07-04T10:08:31 | 2015-10-26T11:51:21 | Python | UTF-8 | Python | false | false | 372 | py | microformat.py | # mypy: disallow_untyped_defs=False
import mf2py
class MicroformatExtractor:
def extract(self, htmlstring, base_url=None, encoding="UTF-8"):
return list(self.extract_items(htmlstring, base_url=base_url))
def extract_items(self, html, base_url=None):
for obj in mf2py.parse(html, html_parser="l... |
5f0796fcf7d040ad674bf02f01fdc9cb327211e6 | 71f97e5a7a9a41090cc160fd3e77bbdb05fbc43c | /bids/variables/tests/test_entities.py | fcf0ecae3ff31429852169aae06f6ef44620fce0 | [
"MIT"
] | permissive | bids-standard/pybids | 731a86c4d4a28b383da347010be5535bf52dbd4b | 013067e4ddabb3f8d9e84b0f63675791a0c3becf | refs/heads/master | 2023-08-25T13:50:38.525154 | 2023-08-21T15:58:26 | 2023-08-21T15:58:26 | 62,954,915 | 138 | 78 | MIT | 2023-09-11T13:24:43 | 2016-07-09T15:08:27 | Python | UTF-8 | Python | false | false | 2,897 | py | test_entities.py | from bids.layout import BIDSLayout
from bids.variables.entities import RunNode, Node, NodeIndex
from bids.variables import load_variables
from bids.variables import BIDSRunVariableCollection
import pytest
from os.path import join
from bids.tests import get_test_data_path
@pytest.fixture(scope="module")
def layout1():... |
3396e6cefb081b51c26dcea1e6069e4aff7e0668 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/ecolite/infer/sdk/main.py | ef1796f19076bbf520a03cbb063d215a4170b7fa | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 5,130 | py | main.py | # -*- coding:utf-8 -*-
# Copyright(C) 2021. Huawei Technologies Co.,Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... |
46bb608da1047495a2b6b5ae9e751ddaa4936722 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Configuration/ProcessModifiers/python/ecal_deepsc_cff.py | 997decae5b524032d31d6026e81f3322fb21e6e1 | [
"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 | 131 | py | ecal_deepsc_cff.py | import FWCore.ParameterSet.Config as cms
# This modifier is for ECAL SuperCluster with ML studies
ecal_deepsc = cms.Modifier()
|
5b4bdb57cdc4dfec4601875c66bf257f383cb049 | b11113d4e20d5c2dca31a7e9a1fe33c8242c9416 | /slack-bot/app.py | df3dba4dc1bcf982264d39d84ae62cfb6c85670a | [] | no_license | MoralisWeb3/youtube-tutorials | ce182b6b70443af36891ea3f3c25bde6914b9dd9 | 4f6fa634344614840b80f7a3942976f09837a77d | refs/heads/main | 2023-07-06T10:22:32.342053 | 2023-07-04T22:26:39 | 2023-07-04T22:26:39 | 346,786,715 | 639 | 1,821 | null | 2023-05-21T12:00:47 | 2021-03-11T17:40:31 | C# | UTF-8 | Python | false | false | 2,639 | py | app.py | from flask import Flask, request
from dotenv import load_dotenv
import json
import locale
import os
from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError
load_dotenv()
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
app = Flask(__name__)
SLACK_BOT_TOKEN = os.getenv('SLACK_BOT_TOKEN')
SLACK_CHAN... |
aa27752f2bef4526394816c616ee6a9e0c85d90a | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Validation/RecoEgamma/test/PhotonValidator_SingleGammaFlatPt10To100.py | b922d8caead8ff60c76d320da5b751f27c5cd27d | [
"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 | 5,160 | py | PhotonValidator_SingleGammaFlatPt10To100.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("TestPhotonValidator")
process.load('Configuration/StandardSequences/GeometryPilot2_cff')
process.load("Configuration.StandardSequences.MagneticField_38T_cff")
process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi")
process.load("RecoTracker.Ge... |
dfd05440404d7c829d0671f195cc223c2940bf3c | 8488fa51bd937bc9403d636279ba03ee5b1bd4c0 | /sample-plugins/permissions/debug_perm.py | d3e43b7ec9190b4d268605ce10e932f22ce22a5e | [
"BSD-3-Clause"
] | permissive | edgewall/trac | e7ecd994121c6e30b39e98dc6ad9b9edf5be4559 | f7eba7b121c9ff227b062e9d032ff4d4582adc39 | refs/heads/trunk | 2023-08-17T00:13:12.555838 | 2023-07-02T15:13:51 | 2023-07-02T15:13:51 | 615,096 | 399 | 173 | NOASSERTION | 2023-03-07T13:46:40 | 2010-04-17T15:10:51 | Python | UTF-8 | Python | false | false | 1,518 | py | debug_perm.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2023 Edgewall Software
# Copyright (C) 2007 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at https://t... |
ba6662f2fa00dd00da6f2a22bd001a5b1a9df11c | 5e66707ccdea0c000e6e269fce6907ee3cfcdbde | /galaxy/main/migrations/0123_fix_importtaskmessage_constraints.py | 77da91b227f2868e1665852f75dcfc250d74bd13 | [
"Apache-2.0"
] | permissive | ansible/galaxy | f629046d579d7cd4e484cdf1e27ad68fe7b170a2 | 6a374cacdf0f04de94486913bba5285e24e178d3 | refs/heads/devel | 2023-09-04T09:21:43.542346 | 2023-08-25T16:58:09 | 2023-08-25T16:58:09 | 24,333,272 | 972 | 419 | Apache-2.0 | 2023-08-25T17:38:20 | 2014-09-22T15:04:57 | Python | UTF-8 | Python | false | false | 501 | py | 0123_fix_importtaskmessage_constraints.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0122_auto_20181015_1802'),
]
operations = [
migrations.AlterField(
model_name='importtaskmessage',
name='message_text',
field=models.TextField(),... |
f4014b8272e5885612ff6444b75e4419449c8fdd | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/dynalite/common.py | 446cdc74c0bd01cd16ba71a515a056f94156dab4 | [
"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 | 2,519 | py | common.py | """Common functions for tests."""
from unittest.mock import AsyncMock, Mock, call, patch
from homeassistant.components import dynalite
from homeassistant.const import ATTR_SERVICE
from homeassistant.helpers import entity_registry as er
from tests.common import MockConfigEntry
ATTR_METHOD = "method"
ATTR_ARGS = "args... |
f645bf788a38a8e13116492fdc46810f37aa8661 | 9d7ea04b3e0a0edf85fa6f7e09ccf8cbd958d291 | /examples/bench/bench.py | ab813ed9d8736d01b3c06a7eee6d505fdef24659 | [
"MIT"
] | permissive | mrjoes/sockjs-tornado | 321557657c0cdef409f0790930e34334b84bfaf6 | 59f99e02ee210764f0cdefc93d11e6060aa937d1 | refs/heads/master | 2023-09-04T00:22:59.375813 | 2023-05-10T16:47:01 | 2023-05-10T16:47:01 | 2,927,833 | 437 | 126 | MIT | 2023-08-04T15:50:55 | 2011-12-06T20:41:39 | Python | UTF-8 | Python | false | false | 1,593 | py | bench.py | # -*- coding: utf-8 -*-
"""
sockjs-tornado benchmarking server. Works as a simple chat server
without HTML frontend and listens on port 8080 by default.
"""
import sys
import weakref
from tornado import web, ioloop
from sockjs.tornado import SockJSRouter, SockJSConnection
class EchoConnection(SockJSConnecti... |
b9b61060d270b66039586168be10048f70b77433 | 4506d81df5ae98078e5cbe79f613514ad12b1c83 | /nipype/interfaces/spm/tests/test_auto_RealignUnwarp.py | bb27419547f5bb478ea308af8a131ea763c3c767 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | nipy/nipype | d52eba1b98fda68e24d006ac0d5701fc8a531b9c | 03a236320fa229299d637ff9af97865a6ae76aca | refs/heads/master | 2023-08-28T10:36:07.020541 | 2023-08-25T13:40:09 | 2023-08-25T13:40:09 | 791,477 | 692 | 569 | NOASSERTION | 2023-09-11T06:04:51 | 2010-07-22T17:06:49 | Python | UTF-8 | Python | false | false | 3,311 | py | test_auto_RealignUnwarp.py | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from ..preprocess import RealignUnwarp
def test_RealignUnwarp_inputs():
input_map = dict(
est_basis_func=dict(
field="uweoptions.basfcn",
),
est_first_order_effects=dict(
field="uweoptions.fot",
),
... |
aca9da847da3807b3014235f5ea2194ebb0e3882 | 2181883c8faac55bfc969a97d22d9b24a3e81ab3 | /com/win32comext/shell/demos/servers/context_menu.py | b92109d738022a3c17ad22552b445efef87163ae | [
"PSF-2.0"
] | permissive | mhammond/pywin32 | 574bf121cfeac8c7a9d28f94ee0f2069a425e8ab | 2a7137f21965013020ef9e4f27565db6dea59003 | refs/heads/main | 2023-09-02T13:16:52.307262 | 2023-08-17T19:42:26 | 2023-08-17T19:42:26 | 108,187,130 | 4,757 | 907 | null | 2023-08-23T01:45:49 | 2017-10-24T21:44:27 | C++ | UTF-8 | Python | false | false | 4,413 | py | context_menu.py | # A sample context menu handler.
# Adds a 'Hello from Python' menu entry to .py files. When clicked, a
# simple message box is displayed.
#
# To demostrate:
# * Execute this script to register the context menu.
# * Open Windows Explorer, and browse to a directory with a .py file.
# * Right-Click on a .py file - locate... |
b745e8c69c5374129e8a07365203983cce755d7b | c1ab5fc6d37749cf7dd693a8f6d5475dfa54cd45 | /kubernetes/client/api/events_v1_api.py | 94c411ed03d9cee74ce7cb0334ab9452b82e4cca | [
"Apache-2.0"
] | permissive | kubernetes-client/python | 2d10e5d7c1358aa4473c1fcd54d2c5a1085cf56e | 68d5a1479e7d735ea454021bc54e453c9b31baf7 | refs/heads/master | 2023-09-01T11:23:54.508420 | 2023-08-31T21:04:31 | 2023-08-31T21:04:31 | 72,473,727 | 5,792 | 3,654 | Apache-2.0 | 2023-09-13T18:34:16 | 2016-10-31T20:08:03 | Python | UTF-8 | Python | false | false | 114,411 | py | events_v1_api.py | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.28
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import r... |
2841f2d77f18270f4fb3616b21a1e8845365cd04 | 8f4db78e562ab88ef6eadf991c340829f2c67217 | /doc/examples/bench_proj_perp/bench.py | 03114dc8bd4adbbd016fc74549bfc8dd9615bf65 | [
"BSD-3-Clause"
] | permissive | fluiddyn/transonic | 3df606abda7f98c9958a8964ce1c6ab442167574 | 40329915cb277645c0a54286ef9e1d400e29719f | refs/heads/branch/default | 2023-08-30T14:00:12.851327 | 2023-08-24T09:16:38 | 2023-08-24T09:16:38 | 164,679,098 | 107 | 1 | BSD-3-Clause | 2021-12-30T11:58:11 | 2019-01-08T15:34:10 | Python | UTF-8 | Python | false | false | 2,825 | py | bench.py | import numpy as np
from transonic import boost, Array, Type
A = Array[Type(np.float64, np.complex128), "3d"]
Af = "float[:,:,:]"
A = Af # issue fused type with Cython
def proj(vx: A, vy: A, vz: A, kx: Af, ky: Af, kz: Af, inv_k_square_nozero: Af):
tmp = (kx * vx + ky * vy + kz * vz) * inv_k_square_nozero
vx ... |
4f1a37bdcad92827e8289d7159e62eef8ac6ef9b | 549270020f6c8724e2ef1b12e38d11b025579f8d | /recipes/aws-cdi-sdk/all/conanfile.py | 5fba77e00e10af17890c762f9d9b7eb837144668 | [
"MIT"
] | permissive | conan-io/conan-center-index | 1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43 | 3b17e69bb4e5601a850b6e006e44775e690bac33 | refs/heads/master | 2023-08-31T11:34:45.403978 | 2023-08-31T11:13:23 | 2023-08-31T11:13:23 | 204,671,232 | 844 | 1,820 | MIT | 2023-09-14T21:22:42 | 2019-08-27T09:43:58 | Python | UTF-8 | Python | false | false | 5,910 | py | conanfile.py | import os
import re
from conans import AutoToolsBuildEnvironment, CMake, ConanFile, tools
from conans.errors import ConanInvalidConfiguration
required_conan_version = ">=1.35.0"
class AwsCdiSdkConan(ConanFile):
name = "aws-cdi-sdk"
description = "AWS Cloud Digital Interface (CDI) SDK"
topics = ("aws", "c... |
da04c577fa422c16b68954d688d51de350c4143a | aa2ae30a88361b4b80ffa28c4d8a54600bbee542 | /Chapter24/libcube/cubes/cube2x2.py | fdb01e8eeca00b43469d2ceda58f0b9e507e9da2 | [
"MIT"
] | permissive | PacktPublishing/Deep-Reinforcement-Learning-Hands-On-Second-Edition | 6728fadb38076f6243da3d98b1cf18faf6b287af | d5a421d63c6d3ebbdfa54537fa5ce485bc2b9220 | refs/heads/master | 2023-07-05T23:08:32.621622 | 2022-01-17T12:18:54 | 2022-01-17T12:18:54 | 195,020,985 | 963 | 491 | MIT | 2023-03-25T01:00:07 | 2019-07-03T09:21:47 | Jupyter Notebook | UTF-8 | Python | false | false | 4,766 | py | cube2x2.py | import enum
import collections
from . import _env
from . import _common
State = collections.namedtuple("State", field_names=['corner_pos', 'corner_ort'])
RenderedState = collections.namedtuple("RenderedState", field_names=['top', 'front', 'left',
'r... |
b3b802dfa822aea2a1862a18eb00cadd1f77d7b4 | 8f7320c10f2c5fc8475753dc5256d1a66067e15c | /pykeops/pykeops/tutorials/a_LazyTensors/plot_lazytensors_a.py | a736fe8124be019eaa284f5cb5f41e9568ff30e2 | [
"MIT"
] | permissive | getkeops/keops | 947a5409710379893c6c7a46d0a256133a6d8aff | 52ed22a7fbbcf4bd02dbdf5dc2b00bf79cceddf5 | refs/heads/main | 2023-08-25T12:44:22.092925 | 2023-08-09T13:33:58 | 2023-08-09T13:33:58 | 182,054,091 | 910 | 69 | MIT | 2023-09-03T20:35:44 | 2019-04-18T09:04:07 | Python | UTF-8 | Python | false | false | 13,029 | py | plot_lazytensors_a.py | r"""
================================================
A wrapper for NumPy and PyTorch arrays
================================================
KeOps brings **semi-symbolic** calculus
to modern computing libraries:
it alleviates the need for **huge intermediate variables**
such as *kernel* or *distance* matrices in mach... |
ccc0d50a13ca967957094fed4c3563929ed6e0f3 | 0ec2b0a2caf2cc5e0ec2bbb89aefc10fc5c63047 | /tests/test_datetimes.py | 30fa3b026c833059cef5d18ad0d6f2b6dd78defc | [
"Apache-2.0"
] | permissive | spulec/freezegun | 3d8406eaf4c3ffa72f884162a278a332eaee4a94 | 4f4496380deefceead7bef23bccaca17c2bdecfa | refs/heads/master | 2023-08-30T22:29:16.153344 | 2023-02-22T05:49:22 | 2023-02-22T05:49:22 | 7,106,250 | 3,480 | 294 | Apache-2.0 | 2023-08-24T21:19:36 | 2012-12-11T05:11:00 | Python | UTF-8 | Python | false | false | 27,795 | py | test_datetimes.py | import time
import calendar
import datetime
import unittest
import locale
import sys
from unittest import SkipTest
from dateutil.tz import UTC
import pytest
from tests import utils
from freezegun import freeze_time
from freezegun.api import FakeDatetime, FakeDate
try:
import maya
except ImportError:
maya = N... |
d69c09e262e76661b35b5ac37b500ce3330d8db3 | 8ef61b6b4cd0c533524d23c3e77a9caf70077023 | /mnamer/tty.py | e9aa2db47d323e72db8073f83eec974a8733ec21 | [
"MIT"
] | permissive | jkwill87/mnamer | 73e68d27d184193218605484a0db1c935f256ca6 | 82da0712ab99e9d80c60adda3db6a3225fdf49b4 | refs/heads/main | 2023-08-30T21:48:34.567239 | 2023-08-15T19:31:04 | 2023-08-15T19:31:04 | 107,178,928 | 656 | 69 | MIT | 2023-09-11T15:02:41 | 2017-10-16T20:23:27 | Python | UTF-8 | Python | false | false | 4,192 | py | tty.py | """Provides an interface for handling user input and printing output."""
import traceback
from typing import Any, Callable
from teletype import codes
from teletype.components import ChoiceHelper, SelectOne
from teletype.io import style_format, style_print
from mnamer.const import SYSTEM
from mnamer.exceptions import... |
8d92255c290faad2206aac7634cc7fd8d2d3fe5c | d3031d50874a592cca6bbd6296a7f8aea734e48f | /Tests/test_file_wal.py | 4be46e9d673f1b8d93fa7ffcc7a1d31f162fe108 | [
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-other-permissive",
"HPND"
] | permissive | python-pillow/Pillow | 97abc2f04646ae702aca971d59c738a8239a0053 | 601324bf8915a6180f5616c817e63e2e7816b892 | refs/heads/main | 2023-09-03T22:55:27.094813 | 2023-09-02T04:20:46 | 2023-09-02T04:20:46 | 5,171,600 | 10,807 | 2,470 | NOASSERTION | 2023-09-14T13:41:58 | 2012-07-24T21:38:39 | Python | UTF-8 | Python | false | false | 668 | py | test_file_wal.py | from PIL import WalImageFile
from .helper import assert_image_equal_tofile
TEST_FILE = "Tests/images/hopper.wal"
def test_open():
with WalImageFile.open(TEST_FILE) as im:
assert im.format == "WAL"
assert im.format_description == "Quake2 Texture"
assert im.mode == "P"
assert im.si... |
2eb20f8cfc37f505abdf4e9b12c5cf48b880359b | 99199db3f78a344e72b281c71c690518ae07375a | /octavia/amphorae/backends/agent/api_server/certificate_update.py | 79510a13d24ba241a9d15975500dc74c0c44de73 | [
"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 | 1,184 | py | certificate_update.py | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# 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... |
e6c2f576ac52f9bbc26ffbc7b371e34fff64e190 | f52b8606074c2e0cc0c60b30b51c015fd932b0a2 | /tests/v1/pull.py | 5e7e3f2bcc3b7d6e6dd05229f0942a77c051ae84 | [
"MIT"
] | permissive | CiscoDevNet/virlutils | 81af101bcca6a28fd584ab4b8f3e1aed5a6345c3 | 84afb01a6366d54febb9481c364a378f891327f4 | refs/heads/master | 2023-04-30T12:00:05.233334 | 2023-03-06T14:46:48 | 2023-03-06T14:46:48 | 114,168,527 | 144 | 47 | MIT | 2023-04-25T18:32:39 | 2017-12-13T21:02:26 | Python | UTF-8 | Python | false | false | 1,234 | py | pull.py | from . import BaseTest
from .mocks.github import MockGitHub
from click.testing import CliRunner
import requests_mock
from virl.cli.main import virl
class Tests(BaseTest):
def test_virl_pull(self):
with requests_mock.mock() as m:
# Mock the request to return what we expect from the API.
... |
dfc4b4bfe70f2d9c598ecb9cb1eef0b71e1fd88f | e7bf1ff05319acc59bba5af5890041bd82c3e197 | /mne/simulation/tests/test_evoked.py | 0209f08876bff380f64157588eecc9cc538bbc38 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mne-tools/mne-python | 7e8d7e945dfbbee6432a4955cf050fa823f2d34b | f44636f00666b8eb869417960926d01690ff4f42 | refs/heads/main | 2023-09-04T03:05:37.402100 | 2023-09-03T14:15:18 | 2023-09-03T14:15:18 | 1,301,584 | 2,437 | 1,418 | BSD-3-Clause | 2023-09-14T19:23:38 | 2011-01-28T03:31:13 | Python | UTF-8 | Python | false | false | 7,244 | py | test_evoked.py | # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
#
# License: BSD-3-Clause
from pathlib import Path
import numpy as np
from numpy.testing import (
assert_array_almost_equal,
assert_array_equal,
assert_equal,
assert_allclose,
)
import pytest
from mne import (
read_cov,
read_forward_s... |
6cd724387de777835fe1c3197a94bf2a70bb50b6 | 9c028c54fcba2d22d48bed063090e35e9af35dc4 | /ciw/arrival_node.py | 89163b40c1c2e979f8e03797d02ae3db733efaf1 | [
"MIT"
] | permissive | CiwPython/Ciw | b2612edf361c7c6af58fdf5f710b44c81f417d23 | 85d03a4988f34c1ca05d7781649042ea2761a42b | refs/heads/master | 2023-04-19T03:45:53.599066 | 2023-04-06T17:42:08 | 2023-04-06T17:42:08 | 47,995,577 | 143 | 39 | MIT | 2023-02-07T13:06:10 | 2015-12-14T19:10:50 | Python | UTF-8 | Python | false | false | 6,374 | py | arrival_node.py | from __future__ import division
from random import random
from .individual import Individual
class ArrivalNode(object):
"""
Class for the arrival node of the network
"""
def __init__(self, simulation):
"""
Initialise the arrvial node.
"""
self.simulation = simulation
... |
364c900467ae12e7e1b0795e3365a78065508a11 | 3b87eaa7f1b8290d1a74ac2bec9573f81aab831d | /python/python/examples/try_stmt.py | 8b926ab56c6ff469ef152b9557f1024bf84c4ac2 | [
"MIT"
] | permissive | antlr/grammars-v4 | 1f6ba461f9fb2c8f04335ca495249ab6eab8e0ae | 98c2bc3b68eff9ad4b809d21a6c9d858c5b9ddfa | refs/heads/master | 2023-08-16T13:37:23.691676 | 2023-08-13T15:20:52 | 2023-08-13T15:20:52 | 5,958,314 | 9,255 | 4,577 | MIT | 2023-09-13T21:17:22 | 2012-09-25T23:45:11 | ANTLR | UTF-8 | Python | false | false | 462 | py | try_stmt.py | # try_stmt: TRY COLON suite (except_clause+ else_clause? finaly_clause? | finaly_clause)
# TRY COLON suite except_clause
try:
pass
except:
pass
# TRY COLON suite except_clause except_clause else_clause
try:
pass
except Exception as ex:
pass
except:
pass
else:
pass
# TRY COLON suite except_cla... |
7978f95215489747b36c0f1177bb0a689384ffeb | 11cd362cdd78c2fc48042ed203614b201ac94aa6 | /desktop/core/ext-py3/boto-2.49.0/boto/mws/connection.py | 687fae74f0baec58395853266b0e596ad88513af | [
"CC-BY-3.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"ZPL-2.0",
"Unlicense",
"LGPL-3.0-only",
"CC0-1.0",
"LicenseRef-scancode-other-permissive",
"CNRI-Python",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-or-later",
"Python-2.0",
"GPL-3.0... | permissive | cloudera/hue | b42343d0e03d2936b5a9a32f8ddb3e9c5c80c908 | dccb9467675c67b9c3399fc76c5de6d31bfb8255 | refs/heads/master | 2023-08-31T06:49:25.724501 | 2023-08-28T20:45:00 | 2023-08-28T20:45:00 | 732,593 | 5,655 | 2,244 | Apache-2.0 | 2023-09-14T03:05:41 | 2010-06-21T19:46:51 | JavaScript | UTF-8 | Python | false | false | 49,808 | py | connection.py | # Copyright (c) 2012-2014 Andy Davidoff http://www.disruptek.com/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy... |
8fd57c9c7c260154ace9ffc13ae832d7975922c4 | 5130754859e274cd06f63260439e5203c2000a11 | /core/domain/image_services_test.py | a030cd6771bf56c1d33e74e81a3e65d9a788f353 | [
"Apache-2.0"
] | permissive | oppia/oppia | 8ebc9c7c7f2b336e9a79ce04533abe3956f48cbe | d16fdf23d790eafd63812bd7239532256e30a21d | refs/heads/develop | 2023-09-04T07:50:13.661276 | 2023-09-03T09:21:32 | 2023-09-03T09:21:32 | 40,687,563 | 6,172 | 4,666 | Apache-2.0 | 2023-09-14T18:25:11 | 2015-08-14T00:16:14 | Python | UTF-8 | Python | false | false | 5,410 | py | image_services_test.py | # coding: utf-8
#
# Copyright 2018 The Oppia 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 requi... |
ce1bd08c46698f765bf5cf30df67fb140a95701a | d09310d0190b81117c39aa823acf8a568d710997 | /hough transform/21HT.py | 062bae289508fee06bf33e1fd0703d301785b1e5 | [
"MIT"
] | permissive | o0o0o0o0o0o0o/image-processing-from-scratch | 36a05ed7f7a765a1a0fa0bd8f0902a23728c15e9 | bd33441263cc9def01e0eaa4bad91574f18a2462 | refs/heads/master | 2022-07-09T23:13:39.108767 | 2022-06-22T19:25:46 | 2022-06-22T19:25:46 | 173,010,773 | 1,061 | 334 | null | null | null | null | UTF-8 | Python | false | false | 10,447 | py | 21HT.py | #coding:utf-8
import numpy as np
import matplotlib.pyplot as plt
import os
import cv2
def convolve(filter,mat,padding,strides):
'''
:param filter:卷积核,必须为二维(2 x 1也算二维) 否则返回None
:param mat:图片
:param padding:对齐
:param strides:移动步长
:return:返回卷积后的图片。(灰度图,彩图都适用)
@author:bilibili-会飞的吴克
'''
... |
93e0a3975a6fbd359b16ea361f6ade68aca20bc5 | 4b9029d66c0b041f6b4797fbeb3572084a6c0dbc | /tests/plugin/NaomiTestCase.py | 8df33c31dca62db2f3e9daa9746478fe2b77a442 | [
"BSD-3-Clause",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | borela/naomi | 3a087a294a67175891f3283dfc9d4daaad64a326 | 3ffae6beb69788002cb7b86b7e6756e783473f66 | refs/heads/master | 2023-07-06T21:54:59.912344 | 2022-07-08T14:34:04 | 2022-07-08T14:34:04 | 56,852,832 | 618 | 30 | NOASSERTION | 2022-07-08T14:34:05 | 2016-04-22T12:10:29 | MQL4 | UTF-8 | Python | false | false | 1,690 | py | NaomiTestCase.py | # Licensed under the Apache License, Version 2.0 (the “License”); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... |
1fe73419240c643672ef7dd5e039ca49d44d1d87 | 31cf77b4c0342c6148b35ae2613d5e2501d5e755 | /src/encoded/tests/test_types_antibody_lot.py | 1cdc1cfcc76d5243bf3a05c4d9e066cc0b20f8f7 | [
"MIT"
] | permissive | ENCODE-DCC/encoded | 096de8a6d60c959a783cc9517f1d60bd6c21b71f | 80e05610c79b46d0890228555bb03e436b2fef11 | refs/heads/dev | 2023-08-08T15:45:07.493187 | 2023-08-03T20:01:24 | 2023-08-03T20:01:24 | 7,045,549 | 110 | 69 | MIT | 2023-09-12T23:59:45 | 2012-12-07T00:52:21 | JavaScript | UTF-8 | Python | false | false | 41,761 | py | test_types_antibody_lot.py | import pytest
# A single characterization (primary or secondary) associated with an ab that is not submitted
# for review, should result in a not pursued antibody lot status.
def test_not_submitted_secondary_missing_primary(testapp, motif_enrichment, antibody_lot):
char = testapp.post_json('/antibody_characteriza... |
e59f3a1c1a5d6961eb974c836a4c6d02a68f94de | a2b20597759990445081057d35d113434cfcf970 | /stubs/typeshed/typeshed/stubs/ExifRead/exifread/utils.pyi | d534019c3683cbf7f56e444d53ab82583b4a139c | [
"MIT",
"Apache-2.0"
] | permissive | facebook/pyre-check | 34059599c02b65605c574f13555229f3b931fd4e | fe8ccedc572cc1faa1fd01e9138f65e982875002 | refs/heads/main | 2023-09-03T19:10:11.587028 | 2023-09-02T07:40:35 | 2023-09-02T07:40:35 | 110,274,488 | 6,703 | 575 | MIT | 2023-09-13T17:02:32 | 2017-11-10T17:31:36 | OCaml | UTF-8 | Python | false | false | 677 | pyi | utils.pyi | from collections.abc import Mapping
from fractions import Fraction
from typing import Any, TypeVar, overload
from typing_extensions import Self
_T = TypeVar("_T")
@overload
def ord_(dta: str) -> int: ... # type: ignore[misc]
@overload
def ord_(dta: _T) -> _T: ...
def make_string(seq: str | list[int]) -> str: ...
def... |
ca60d0cd595a4ed62989a28b93c942a85b224994 | cb9556a6cd54c480d59814540c42d96fa989b290 | /beeprint/utils.py | 93046340cc0c29cc1b1e950f8f1e0b8e9bc74619 | [] | no_license | panyanyany/beeprint | b48c9cdf4d737fc751373b51bea2997e66392592 | 54c38876b3c8f2009bb74dec1dffbc5ee8086498 | refs/heads/master | 2023-09-05T09:09:35.016032 | 2023-08-29T02:46:03 | 2023-08-29T02:46:03 | 17,399,131 | 433 | 21 | null | 2016-12-19T05:31:54 | 2014-03-04T10:59:34 | Python | UTF-8 | Python | false | false | 4,478 | py | utils.py | # -*- coding:utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import division
import inspect
import sys
import types
import traceback
_unicode = None
if sys.version_info < (3, 0):
pyv = 2
_unicode = unicode
else:
... |
32ad2741f09341d65aaa56a1134323ffb9120d6c | 99d79ada2d3b7746573f071823ec61f5f853d7a3 | /examples/riscv_mini/conftest.py | 1b4e91567b99c8c0c087f9d7e68e0ef0ab592058 | [
"BSD-3-Clause",
"MIT"
] | permissive | phanrahan/magma | d8062c6163e2c2c2cedef82317dc8cc40038220a | b05fe5303ed17e668c6ec2ec3558cd5a52eff787 | refs/heads/master | 2023-08-23T18:08:22.494869 | 2023-08-08T18:53:05 | 2023-08-17T16:16:44 | 84,332,281 | 227 | 21 | NOASSERTION | 2023-09-14T21:32:19 | 2017-03-08T14:57:09 | Python | UTF-8 | Python | false | false | 229 | py | conftest.py | import pytest
from magma.config import config as magma_config
from magma.util import reset_global_context
@pytest.fixture(autouse=True)
def riscv_mini_test():
magma_config.compile_dir = 'normal'
reset_global_context()
|
875d5aa21f31cc534c7971c41d23f3e995f8f5b8 | 8a7507d2a51e85085114e685f052def13062d365 | /tests/lib/canonical.py | a8b4e3a7d611d32fe4fe578b4c782d0f6d06cf69 | [
"MIT"
] | permissive | yaml/pyyaml | cc0715b0e72d792217403ef99e59368da175722a | 155ec463f6a854ac14ccd5e2dda8017ce42a508a | refs/heads/main | 2023-09-03T22:40:59.106106 | 2023-08-29T22:06:59 | 2023-08-29T22:07:06 | 2,700,147 | 2,334 | 541 | MIT | 2023-09-05T17:02:28 | 2011-11-03T05:09:49 | Python | UTF-8 | Python | false | false | 12,371 | py | canonical.py |
import yaml, yaml.composer, yaml.constructor, yaml.resolver
class CanonicalError(yaml.YAMLError):
pass
class CanonicalScanner:
def __init__(self, data):
if isinstance(data, bytes):
try:
data = data.decode('utf-8')
except UnicodeDecodeError:
rai... |
39e0bbf61880bfc8ac46d607fec14c8bf8f4d189 | d9b749e8a4982b8bcd66a19d4ee189fc607ab79e | /libunbound/python/doc/examples/example8-1.py | 79060167d83c35a47ab9b2566f2706e578470c44 | [
"LicenseRef-scancode-free-unknown",
"GPL-3.0-or-later",
"LicenseRef-scancode-autoconf-simple-exception",
"BSD-3-Clause"
] | permissive | NLnetLabs/unbound | 26312ae0b3b963f2ab700c4be3d9c45587bcf45e | 10843805ac37002f1d9293c9835a3e68e41d392d | refs/heads/master | 2023-08-31T23:34:52.610625 | 2023-08-31T11:54:03 | 2023-08-31T11:54:03 | 94,195,301 | 2,526 | 395 | BSD-3-Clause | 2023-09-07T14:37:56 | 2017-06-13T09:27:49 | C | UTF-8 | Python | false | false | 918 | py | example8-1.py | #!/usr/bin/python
# vim:fileencoding=utf-8
#
# Lookup for MX and NS records
#
import unbound
ctx = unbound.ub_ctx()
ctx.resolvconf("/etc/resolv.conf")
status, result = ctx.resolve("nic.cz", unbound.RR_TYPE_MX, unbound.RR_CLASS_IN)
if status == 0 and result.havedata:
print "Result:"
print " raw data:", re... |
6253994bff4f5c8033e2679175970a9306ec5cd6 | 753cd066a9bd26b6c37c8d53a86c7a9c659ec18c | /vision/efficientdet/tensorflow2/ipu_utils/dataset.py | b61500f045572dbe05f8dff89fdb73821cf66593 | [
"Apache-2.0",
"MIT"
] | permissive | graphcore/examples | ac872015808ed2a913d4d7bf0d63202ce15ebbae | e2f834dd60e7939672c1795b4ac62e89ad0bca49 | refs/heads/master | 2023-08-05T02:08:12.341836 | 2023-07-27T11:13:10 | 2023-07-27T11:13:10 | 143,977,106 | 311 | 80 | MIT | 2023-09-11T16:42:56 | 2018-08-08T07:29:17 | Python | UTF-8 | Python | false | false | 4,065 | py | dataset.py | # Copyright (c) 2022 Graphcore Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
089fa2891b027a48f9dd248d6e12484f394faccd | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/refactoring/move/fromImportAliases/before/src/lib.py | 279b5630edd805dffcbd59dc1ebf67cc173c4e42 | [
"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 | 54 | py | lib.py | def function1():
pass
def function2():
pass
|
47a5d41a29b48ea7f8ea501cfa2ebf4aa5d6e4b2 | b8d80a23cb27af08a1c4d34b478c76228ae5fbb4 | /insights/parsers/ntp_sources.py | 8b5b48ca05cf72034dbb869dbcd74fd5f6737f75 | [
"Apache-2.0"
] | permissive | RedHatInsights/insights-core | bb243e2bf8a52446fefb95ebe05478d6e35efe2e | b0ea07fc3f4dd8801b505fe70e9b36e628152c4a | refs/heads/master | 2023-09-04T21:15:40.456257 | 2023-09-04T10:46:56 | 2023-09-04T10:46:56 | 92,518,221 | 144 | 290 | Apache-2.0 | 2023-09-14T02:40:13 | 2017-05-26T14:23:11 | Python | UTF-8 | Python | false | false | 5,862 | py | ntp_sources.py | """
NTP sources - remote clock info from ``ntpq`` and ``chronyc``
=============================================================
The parsers here provide information about the time sources used by
``ntpd`` and ``chronyd``. These are gathered from the output of the
``ntpq -pn`` and ``chronyc sources`` commands respecti... |
c109820e2837d95fa311edae724a2a6320ec4919 | 73a0f661f1423d63e86489d4b2673f0103698aab | /python/oneflow/framework/docstr/index_add.py | 625aeb8f8dad4953d7d7a7f061da4d50e4c3548d | [
"Apache-2.0"
] | permissive | Oneflow-Inc/oneflow | 4fc3e081e45db0242a465c4330d8bcc8b21ee924 | 0aab78ea24d4b1c784c30c57d33ec69fe5605e4a | refs/heads/master | 2023-08-25T16:58:30.576596 | 2023-08-22T14:15:46 | 2023-08-22T14:15:46 | 81,634,683 | 5,495 | 786 | Apache-2.0 | 2023-09-14T09:44:31 | 2017-02-11T06:09:53 | C++ | UTF-8 | Python | false | false | 3,014 | py | index_add.py | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... |
6037693a6a5bd5a8ea5237fd6e522fdb8a656fe0 | 5b6ba0f288b1e2ac236af846a9bf546a63228476 | /xfel/ui/components/xfel_gui_init.py | 9cdccb62530fecb0ec51c8dcc43b9208bc6f8d45 | [
"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 | 148,318 | py | xfel_gui_init.py | from __future__ import absolute_import, division, print_function
from six.moves import range, zip, map
'''
Author : Lyubimov, A.Y.
Created : 06/02/2016
Last Changed: 02/09/2017
Description : XFEL UI Initialization module
'''
import os
import wx
import time
import numpy as np
from threading import Thread
from... |
63744591f25d4c1b1f251b1443be21ba247b564c | a98c221480dea8907aede403606b4450ec86b9f3 | /tfts/models/seq2seq.py | 4a552f4a629553da93577eb9d95498b7142c258a | [
"MIT"
] | permissive | LongxingTan/Time-series-prediction | c38c05724b50e36e43647ddef591582556578822 | b6381e47fa110b76334b907ff3973bdb2d0f1091 | refs/heads/master | 2023-08-31T18:00:31.865106 | 2023-08-19T15:48:03 | 2023-08-19T15:48:03 | 131,993,562 | 746 | 152 | MIT | 2023-09-12T11:59:21 | 2018-05-03T12:43:20 | Python | UTF-8 | Python | false | false | 14,814 | py | seq2seq.py | """
`Sequence to Sequence Learning with Neural Networks
<https://arxiv.org/abs/1409.3215>`_
"""
from typing import Any, Callable, Dict, Optional, Tuple, Type
import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.keras.layers import GRU, LSTM, RNN, Dense, Dropout, GRUCell, LSTMCell
from tfts.... |
567f9d450c9b3deff69f03d1b8da9225a4249e0d | c675ff5fcd3b13fa39352bb8cac11d75262659a8 | /reactivex/disposable/scheduleddisposable.py | 067d8667605ac5f9c2da12feece1a959a3642af4 | [
"MIT"
] | permissive | ReactiveX/RxPY | 469eb714996c205989e99899a6f1ab1ae2f42dd0 | af1663d35810fdcd4c25a3ed2e8f0d71b55c341d | refs/heads/master | 2023-08-14T19:27:40.086304 | 2023-01-08T10:02:08 | 2023-03-04T15:33:19 | 8,946,089 | 4,764 | 467 | MIT | 2023-09-05T02:53:16 | 2013-03-22T06:16:54 | Python | UTF-8 | Python | false | false | 1,149 | py | scheduleddisposable.py | from threading import RLock
from typing import Any
from reactivex import abc
from .singleassignmentdisposable import SingleAssignmentDisposable
class ScheduledDisposable(abc.DisposableBase):
"""Represents a disposable resource whose disposal invocation will
be scheduled on the specified Scheduler"""
de... |
b719fe9d12473290591d766c41e78fb862bf7b50 | fa3f6d4e9169fb95f828013d179d03accdff381b | /grr/server/grr_response_server/gui/webauth_test.py | f39e7876d1cde3db6dbe54e2ee2133340dc29f22 | [
"Apache-2.0"
] | permissive | google/grr | c51a2bd251ed2f7adae538541990a2cc01fdcc8c | 44c0eb8c938302098ef7efae8cfd6b90bcfbb2d6 | refs/heads/master | 2023-09-05T20:02:36.823914 | 2023-07-26T09:34:09 | 2023-07-26T09:34:09 | 14,909,673 | 4,683 | 927 | Apache-2.0 | 2023-07-26T09:34:10 | 2013-12-04T00:17:53 | Python | UTF-8 | Python | false | false | 12,354 | py | webauth_test.py | #!/usr/bin/env python
"""Tests for the web auth managers."""
import base64
from unittest import mock
from absl import app
import requests
from werkzeug import test as werkzeug_test
from google.oauth2 import id_token
from grr_response_server import data_store
from grr_response_server.gui import http_response
from g... |
129b18c5b8c674870ee16ac5d877b3e2ca7b306d | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/bond/test_init.py | 33919219301d1dfceb03fb150aaee1e0f36078a3 | [
"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 | 12,176 | py | test_init.py | """Tests for the Bond module."""
import asyncio
from unittest.mock import MagicMock, Mock
from aiohttp import ClientConnectionError, ClientResponseError
from bond_async import DeviceType
import pytest
from homeassistant.components.bond.const import DOMAIN
from homeassistant.components.fan import DOMAIN as FAN_DOMAIN
... |
579b7e2a95075229fed06c66fd6f49c2fd3e7c0f | 03aef1b35a54fb2f1ee89523f086a5184a84f154 | /gitlint-core/gitlint/contrib/rules/signedoff_by.py | 5ea8217ab775b1f4f158add737d92d596b857906 | [
"MIT"
] | permissive | jorisroovers/gitlint | 955f693e30d1149ec84bde38d54617c6e3daa1f5 | 4d9119760056492eabc201bfad5de2f9e660b85f | refs/heads/main | 2023-09-03T15:52:33.666513 | 2023-09-02T08:25:48 | 2023-09-02T08:25:48 | 41,824,974 | 741 | 113 | MIT | 2023-09-13T01:42:56 | 2015-09-02T20:06:16 | Python | UTF-8 | Python | false | false | 620 | py | signedoff_by.py | from gitlint.rules import CommitRule, RuleViolation
class SignedOffBy(CommitRule):
"""This rule will enforce that each commit body contains a "Signed-off-by" line.
We keep things simple here and just check whether the commit body contains a line that starts with "Signed-off-by".
"""
name = "contrib-b... |
a5a7e9e04b11f17eff251be7bf1bf49f6f09c030 | c530897cb72b6943c7226b25824444cad5f3503b | /usaspending_api/common/management/commands/clear_usaspending_cache.py | befe1b194abde5d2b95506953f77a11f840de2df | [
"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 | 564 | py | clear_usaspending_cache.py | import logging
from django.core.management.base import BaseCommand
from django.core.cache import caches
class Command(BaseCommand):
"""
This command will clear the usaspending-cache (useful after a load or a deletion
to ensure end users don't see stale data)
"""
help = "Clears the usaspending-cac... |
18d616e6afe7122d766423720526170fddadd9c5 | 1ad268817e4f048815df6e7b7669c45257a37b0e | /kartothek/core/factory.py | a3590628b750e500f8bb4f972a31b49d409f46e1 | [
"MIT"
] | permissive | JDASoftwareGroup/kartothek | 07c7f2fceb3dcee5cf8d0a6a93f4c1060eb0bcf4 | 1821ea5df60d4079d3911b3c2f17be11d8780e22 | refs/heads/master | 2023-05-26T11:43:04.781173 | 2021-12-10T09:15:19 | 2021-12-10T09:15:19 | 184,608,549 | 178 | 59 | MIT | 2023-05-15T21:56:50 | 2019-05-02T15:45:42 | Python | UTF-8 | Python | false | false | 6,845 | py | factory.py | # -*- coding: utf-8 -*-
import copy
from typing import TYPE_CHECKING, Any, Optional, TypeVar, cast
from kartothek.core.dataset import DatasetMetadata, DatasetMetadataBase
from kartothek.core.typing import StoreInput
from kartothek.core.utils import lazy_store
from kartothek.utils.migration_helpers import (
deprec... |
c15f467d77be64eff8e63b6be6b483a1ad09ff8f | 3f66c9877f0c8a394dbc1fa98dedb9273316b175 | /flow.py | 6b72cb26a0fd7231fb797ef3fa04c0631f7a1c9e | [
"MIT"
] | permissive | onejgordon/flow-dashboard | c06f6760d0087cebebe75102b543ac35d7aa8469 | b8d85d9313e51cf386f6d2e5944fc958a7d96769 | refs/heads/develop | 2023-09-03T12:20:57.223724 | 2023-07-02T15:55:02 | 2023-07-02T15:55:02 | 84,657,014 | 1,801 | 250 | MIT | 2023-04-01T02:06:25 | 2017-03-11T14:46:24 | Python | UTF-8 | Python | false | false | 10,956 | py | flow.py | import os
import webapp2
from constants import COOKIE_NAME
from actions import adminActions
from views import views
import imp
import api
import tasks
try:
imp.find_module('secrets', ['settings'])
except ImportError:
from settings import secrets_template as secrets
else:
from settings import secrets
SECS_P... |
56c39364a4aab99a9b126d3939f7d7bc87c9b207 | 95fc101e34e54c35ea8ce3d572078951a3cf3a18 | /data/fileList.py | 0a614173dc6e3f2ca334322a7287b1c9557af4b4 | [
"Apache-2.0"
] | permissive | SoftwareGift/FeatherNets_Face-Anti-spoofing-Attack-Detection-Challenge-CVPR2019 | 61e157820ea7dfefac2104d94a542612212b0117 | 220d5398a5da3147546fec1f2ca4b297f22cf39f | refs/heads/regression | 2023-08-14T07:31:11.540484 | 2019-09-25T13:08:36 | 2019-09-25T13:08:36 | 173,394,014 | 896 | 288 | NOASSERTION | 2020-10-06T18:32:41 | 2019-03-02T02:29:10 | Python | UTF-8 | Python | false | false | 2,815 | py | fileList.py |
# coding: utf-8
# # Use CASIA-SURF training dataset and our private dataset for training
# In[1]:
from pathlib import Path #从pathlib中导入Path
import os
# data_dir = os.getcwd() + '/our_filelist'
# txt_dir=[i for i in list(Path(data_dir).glob("**/2*.txt")) ]#
# Use CASIA-SURF traing data and our private data
# str... |
be925726af31738a735d744d9831da9008a897df | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /SimG4CMS/HcalTestBeam/test/python/run2006_37_cfg.py | 706da5a7ebf08193149604b15df21ba9976a04b1 | [
"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 | 5,616 | py | run2006_37_cfg.py | import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Modifier_h2tb_cff import h2tb
process = cms.Process("PROD", h2tb)
process.load('SimG4CMS.HcalTestBeam.TB2006Geometry37XML_cfi')
process.load('SimGeneral.HepPDTESSource.pdt_cfi')
process.load('Configuration.StandardSequences.Services_cff')
process.load('... |
7b510bb3a2fdbf2d361fdc3ce8bff714c351f526 | 31d9c3ee15671d45d8fdb8533a35be74bad58c18 | /montreal_forced_aligner/command_line/anchor.py | 7d7a740356c48762080c220022b66691f5a0977b | [
"MIT"
] | permissive | MontrealCorpusTools/Montreal-Forced-Aligner | 6547a9b4176fe2663d1210c296e95c9073b4de52 | 7fbccdd1df52c606704332c6a78731b4d51291eb | refs/heads/main | 2023-09-01T12:17:22.009722 | 2023-08-30T08:27:16 | 2023-08-30T08:27:16 | 44,983,969 | 1,078 | 248 | MIT | 2023-09-12T03:57:04 | 2015-10-26T17:02:06 | Python | UTF-8 | Python | false | false | 677 | py | anchor.py | """Command line functions for launching anchor annotation"""
from __future__ import annotations
import logging
import sys
import rich_click as click
__all__ = ["anchor_cli"]
logger = logging.getLogger("mfa")
@click.command(name="anchor", short_help="Launch Anchor")
@click.help_option("-h", "--help")
def anchor_cl... |
c4344b4eea51867e7c8b56b27ffd7b658827b802 | 39b021eabbb8e3be1734cf92fd641965a796b0eb | /contrib/nn/constraints.py | 046986b5fed107909c2aca2702832f49efda43fe | [
"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 | 2,584 | py | constraints.py | """Place constraints on models."""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
from __future__ import absolute_import
from deepchem.nn import model_ops
from deepchem.nn.activations import get_from_module
class Constraint(object):
def __call__(self,... |
f99ff9fa5530605f0db7af2fd1cf7c380f111fd2 | 32809f6f425bf5665fc19de2bc929bacc3eeb469 | /src/1186-Maximum-Subarray-Sum-with-One-Deletion/1186.py | 44630671e9bec0570742303eb2e78a1026dd82e2 | [] | no_license | luliyucoordinate/Leetcode | 9f6bf01f79aa680e2dff11e73e4d10993467f113 | bcc04d49969654cb44f79218a7ef2fd5c1e5449a | refs/heads/master | 2023-05-25T04:58:45.046772 | 2023-05-24T11:57:20 | 2023-05-24T11:57:20 | 132,753,892 | 1,575 | 569 | null | 2023-05-24T11:57:22 | 2018-05-09T12:30:59 | C++ | UTF-8 | Python | false | false | 379 | py | 1186.py | class Solution:
def maximumSum(self, arr: List[int]) -> int:
deleted = notDeleted = 0
res = float('-inf')
for i, a in enumerate(arr):
deleted = max(deleted + a, a)
if i > 0:
deleted = max(deleted, notDeleted)
notDeleted = max(notDeleted + a... |
057621c3f109ef60745780f7de42c6ad23b63c22 | e3eecdd6c4795d5119abf6dc8c7633aef354b23f | /fio_plot/fiolib/jsonparsing.py | 4225970beaf279c2a451d086db8ba4303032d283 | [
"BSD-3-Clause"
] | permissive | louwrentius/fio-plot | 1d182ea039ce0ca460a0a9eb2acbc6a019cbfb05 | 0b6418489b7be19385d515987e30500ef4e08457 | refs/heads/master | 2023-08-19T11:37:07.280468 | 2023-07-06T11:55:59 | 2023-07-06T11:55:59 | 87,225,610 | 273 | 85 | BSD-3-Clause | 2023-08-03T19:54:53 | 2017-04-04T19:15:27 | Python | UTF-8 | Python | false | false | 3,275 | py | jsonparsing.py | import sys
from . import (
jsonparsing_support as jsonsupport
)
def printkeys(data, depth=0, maxdepth=3):
"""
For debugging only
"""
if depth <= maxdepth:
if isinstance(data, dict):
for key,value in data.items():
print(f"{'-' * depth} {key}")
pri... |
96daef61bc6c43e9b84ec0fd202aabf219dad429 | f91124a8bbd0b719f0fd0b4e021e766ca8f5dbb0 | /tf_coder/value_search/value_search_main.py | 16a8be7b17f8cc1d0d80e9d5975716d97c0ffde7 | [
"Apache-2.0"
] | permissive | google-research/tensorflow-coder | 0922c5ae4b22a84f1fc0f9545f2a433937cbfa17 | dc7ff6080a8b2159d6f14c4a82e5332dcbf2f8ed | refs/heads/master | 2023-08-31T16:14:19.401996 | 2023-02-24T23:15:19 | 2023-02-24T23:15:19 | 289,581,495 | 288 | 31 | Apache-2.0 | 2023-02-24T23:16:56 | 2020-08-22T23:13:07 | Python | UTF-8 | Python | false | false | 7,470 | py | value_search_main.py | # Copyright 2021 The TF-Coder Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
e63ff354ef41479b097fb8e8ef8ed878ebf4e352 | da1500e0d3040497614d5327d2461a22e934b4d8 | /third_party/angle/scripts/generate_new_renderer.py | 9b26c5ee674ffa691d7e6bd76705fdf333c53124 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"Apache-2.0",
"MIT"
] | permissive | youtube/cobalt | 34085fc93972ebe05b988b15410e99845efd1968 | acefdaaadd3ef46f10f63d1acae2259e4024d383 | refs/heads/main | 2023-09-01T13:09:47.225174 | 2023-09-01T08:54:54 | 2023-09-01T08:54:54 | 50,049,789 | 169 | 80 | BSD-3-Clause | 2023-09-14T21:50:50 | 2016-01-20T18:11:34 | null | UTF-8 | Python | false | false | 9,340 | py | generate_new_renderer.py | #!/usr/bin/python2
#
# Copyright 2015 The ANGLE 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.
#
# generate_new_renderer.py:
# Utility script to generate stubs for a new Renderer class.
# Usage: generate_new_renderer.py <re... |
44c3d1407484bbbb64564e966cb9e6e175f90c0a | ab05cd17c414313a217c510fed056ce6de1a4cc9 | /omniduct/caches/filesystem.py | b83b3e6f52e3d9fc52ab2b79a0946a599697823a | [
"MIT"
] | permissive | airbnb/omniduct | c1d8ccdab42c1c386ca659a5421d4eab582c6659 | a91ebed6fd6f0f1319d20c5b19d89543897296b7 | refs/heads/master | 2023-08-23T18:52:32.173073 | 2022-05-09T03:05:24 | 2022-05-09T03:05:24 | 82,863,327 | 259 | 56 | MIT | 2023-04-22T00:08:37 | 2017-02-22T23:35:26 | Python | UTF-8 | Python | false | false | 4,829 | py | filesystem.py | import six
import yaml
from interface_meta import override
from omniduct.filesystems.base import FileSystemClient
from omniduct.filesystems.local import LocalFsClient
from .base import Cache
class FileSystemCache(Cache):
"""
An implementation of `Cache` that wraps around a `FilesystemClient`.
"""
P... |
f6094dca49583d79a602cac2e9816a1b2b4d2d02 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/SemanticHumanMatting/eval.py | 60d1f7f13d31edfa7a10c68a562fd362d98a0f68 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 4,843 | py | eval.py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
9d86104dbb9dab1940cdd06f7c2ae9831830d0d0 | 1ed4e86b420ad69233d6afc530dc9bc6b27c7039 | /clients/recreation_client.py | 94a2dacab5eb2eb1bf3d26e49358e7a167dde063 | [
"Apache-2.0"
] | permissive | banool/recreation-gov-campsite-checker | 7f5f50e48325dace863652b909e59e46618f419d | 7f56fcfe361d92ab1d6feb81b7be858a1f0a9016 | refs/heads/master | 2023-08-31T21:22:29.611472 | 2023-07-25T18:12:12 | 2023-07-25T18:38:35 | 140,966,466 | 290 | 179 | Apache-2.0 | 2023-08-24T00:54:25 | 2018-07-14T17:50:03 | Python | UTF-8 | Python | false | false | 1,472 | py | recreation_client.py | import logging
import requests
import user_agent
from utils import formatter
LOG = logging.getLogger(__name__)
class RecreationClient:
BASE_URL = "https://www.recreation.gov"
AVAILABILITY_ENDPOINT = (
BASE_URL + "/api/camps/availability/campground/{park_id}/month"
)
MAIN_PAGE_ENDPOINT = B... |
691b1d57956b7718ba2c8147a17434d5ac281062 | 17b4b0b4714f3a784466d0209a40b8880dfb5fb0 | /owtf/plugins/base.py | ba01ffae70d3c8c32dfe2615d0f8e632f2dcfef8 | [
"BSD-3-Clause"
] | permissive | owtf/owtf | 8b72d43ee01272d100408200a898d76deeb1569f | 240825989a3850241b6b5dba6bcae1042a5dc384 | refs/heads/develop | 2023-08-31T20:25:57.364620 | 2023-08-30T23:02:24 | 2023-08-30T23:02:24 | 3,215,654 | 1,683 | 534 | BSD-3-Clause | 2023-09-01T17:23:00 | 2012-01-19T06:42:44 | Python | UTF-8 | Python | false | false | 428 | py | base.py | from abc import ABCMeta, abstractmethod
class Plugin(object):
"""Abstract base class definition for plugins.
Plugins must be a subclass of Plugin and
must define the following members.
"""
__metaclass__ = ABCMeta
name = None
description = None
author = None
# Type is a tuple of ta... |
5104c3bec36529a38876e5c8bb2451fc933aa9f8 | 33be4b8a076a83adb73ff6b267d8135dbbdd16fc | /chapter9/ness6rest.py | ea65115118ab2ebee846e58a85f96d5725601e40 | [
"MIT"
] | permissive | PacktPublishing/Mastering-Python-for-Networking-and-Security-Second-Edition | 73bbe8bd6464585bb3cef788eb8fd62ec89f8983 | b748cca5841b013b44c98f1884611b66676fef1a | refs/heads/master | 2023-01-27T10:59:59.868438 | 2023-01-18T10:10:33 | 2023-01-18T10:10:33 | 254,302,959 | 117 | 67 | null | null | null | null | UTF-8 | Python | false | false | 44,065 | py | ness6rest.py | # Copyright (c) 2014-2015, Tenable Network Security, 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:
# - Redistributions of source code must retain the above copyright notice,
# this li... |
4e08cf67813b6bf91e7dfae701b4702fa7cead37 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/tensor/linalg/solve.py | 7ee3d113c170e5ee7acffb787111720c7540fc4d | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 2,138 | py | solve.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... |
d1e38383189b73bc4b69a3f288ed635b9be51899 | 0121f2810d6081fee314d730b8f22081e0943faf | /python/examples-qt6/headers/main.py | 6097b4cd16a527507cfed090175a7e506cac0e34 | [
"MIT"
] | permissive | KDAB/KDChart | 329d5010d3ea93509f0f862cd6b9cbd36856cdfd | 8ecbc4402b1efe0a21bdb5aa879dbf1acde0eb0b | refs/heads/kdchart-3.0 | 2023-09-01T13:52:24.166135 | 2023-08-15T10:46:24 | 2023-08-15T10:46:24 | 182,813,124 | 103 | 31 | NOASSERTION | 2023-08-23T01:54:56 | 2019-04-22T15:14:18 | C++ | UTF-8 | Python | false | false | 3,003 | py | main.py | #!/usr/bin/env python
# Contact info@kdab.com if any conditions of this licensing are not clear to you.
# This file is part of the KD Chart library.
#
# SPDX-FileCopyrightText: 2019-2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
#
# SPDX-License-Identifier: MIT
#
''' Example custom formatter ... |
9bd0f235b860ebe93705f6e8af39b02f4b9e8044 | def993d87717cd42a9090a17d9c1df5648e924ce | /test/IECoreScene/SmoothSkinningDataTest.py | c448c1df39b976cccff82545dec292f22d579b8e | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | ImageEngine/cortex | 688388296aad2b36dd0bfb7da7b25dcbdc7bd856 | 6eec66f5dccfd50dda247b04453bce65abc595eb | refs/heads/main | 2023-09-05T07:01:13.679207 | 2023-08-17T23:14:41 | 2023-08-17T23:14:41 | 10,654,465 | 439 | 104 | NOASSERTION | 2023-09-14T11:30:41 | 2013-06-12T23:12:28 | C++ | UTF-8 | Python | false | false | 8,208 | py | SmoothSkinningDataTest.py | ##########################################################################
#
# Copyright (c) 2007-2013, Image Engine Design Inc. All rights reserved.
#
# Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
# its affiliates and/or its licensors.
#
# Redistribution and use in source and binary ... |
5f2e9cafe3b6a4a3d9599311995135c95d0fdb9e | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Calibration/HcalAlCaRecoProducers/test/AlCaHcalIsoTrk_cfg.py | 7300056e51131275849bd82d29c63533856967c7 | [
"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 | 4,247 | py | AlCaHcalIsoTrk_cfg.py | import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run2_2018_cff import Run2_2018
process = cms.Process("ALCAISOTRACK",Run2_2018)
process.load('Configuration.StandardSequences.Services_cff')
process.load('FWCore.MessageService.MessageLogger_cfi')
process.load("Configuration.StandardSequences.Geometr... |
dc5488bb02651bc463635a437924236db7f8ccef | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-rocketmq/huaweicloudsdkrocketmq/v2/model/list_rocket_instance_topics_response.py | 7e1c3d4f11e70d9dc8c230858d758a3e356834a4 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 7,691 | py | list_rocket_instance_topics_response.py | # coding: utf-8
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class ListRocketInstanceTopicsResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
... |
fe611cdb804675326e70a31f421ed7eb04055025 | 67025b57439c3a99d6a393f74529164ea67d7501 | /tests/color_tests/test_asgray.py | 63a9895bbf5788a7d9b6c2c1c4b7bc605df37d87 | [
"MIT"
] | permissive | wkentaro/imgviz | cf9861f97ef5f0406e44ed4c1f53b0238a131d27 | 7a3cdb1aef46a50d5025e0a9c366c5b238266907 | refs/heads/main | 2023-08-10T03:59:31.193626 | 2023-07-27T01:59:47 | 2023-07-27T01:59:47 | 163,167,512 | 237 | 30 | MIT | 2023-08-20T01:56:16 | 2018-12-26T10:27:22 | Python | UTF-8 | Python | false | false | 187 | py | test_asgray.py | import numpy as np
import imgviz
def test_asgray():
data = imgviz.data.arc2017()
gray = imgviz.asgray(data["rgb"])
assert gray.ndim == 2
assert gray.dtype == np.uint8
|
a760678d1a3a69a3f2691b6b9b79953167b215bb | 1f20484efc357aae4b7e2f98a191e7a9256f3a58 | /irc3/__init__.py | 2ed8256b802a208ad8adeaf66b54f2bd16ed0227 | [
"CC-BY-3.0",
"MIT",
"LicenseRef-scancode-ietf"
] | permissive | gawel/irc3 | 55b2e4d01ca95f45077f8bad231394551584d7bd | 76d6849d5e7a531d649aca766f623f9f30a55545 | refs/heads/master | 2023-07-15T20:49:40.188267 | 2023-04-17T09:02:31 | 2023-04-17T09:02:31 | 14,820,406 | 187 | 58 | MIT | 2023-02-27T10:18:41 | 2013-11-30T12:09:48 | Python | UTF-8 | Python | false | false | 14,524 | py | __init__.py | # -*- coding: utf-8 -*-
from urllib.request import urlopen
from ipaddress import ip_address
from collections import deque
from .dcc import DCCManager
from .dcc import DCCChat
from .dec import dcc_event
from .dec import event
from .dec import extend
from .dec import plugin
from . import config
from . import utils
from .... |
b980f106f0d6344d9cfd594b441756142be00015 | f9a03c7f8a02913a6b04d4a6535d1974baa7dd22 | /build.py | e6b46f8442d4e85466026e7bda90bd14ec31d347 | [
"Apache-2.0"
] | permissive | openshift/openshift-docs | e769b35bf84fb43860ed97f669cfca19e8c8f439 | 6d225638fc4ec4a50090f2a1ccfe32205983dd4f | refs/heads/main | 2023-09-01T02:00:24.922059 | 2023-08-31T18:24:51 | 2023-08-31T18:24:51 | 21,740,844 | 739 | 1,990 | Apache-2.0 | 2023-09-14T21:37:35 | 2014-07-11T15:14:42 | HTML | UTF-8 | Python | false | false | 39,400 | py | build.py | #!/usr/bin/python
# this file builds content from asciidoc to ccutil ready format BUT is only
# used for validating content, rather than the actual conversion. For the
# actual conversion, the file build_for_portal.py is used (on the portal).
# the only difference between this and build_for_portal file is in the
# se... |
64582aa7b5004df3183a6520294eb60408dd11c7 | 2270e0fb290591a21fd13a3980dccf4ff47d83fa | /tf2_gnn/layers/message_passing/rgat.py | 946bb62c244f147700838ff25a6b6b1f2b547470 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | microsoft/tf2-gnn | d0251e48c0d7cfa67fbd4d1cd8579cbf6845059b | fa608555c68c41027a44e1ec68c160e92b570632 | refs/heads/master | 2023-08-30T01:09:37.653689 | 2023-07-13T13:47:00 | 2023-07-13T13:47:00 | 242,964,823 | 411 | 80 | MIT | 2023-07-12T18:33:59 | 2020-02-25T09:49:36 | Python | UTF-8 | Python | false | false | 7,247 | py | rgat.py | """Relation graph attention network layer."""
from typing import Dict, List, Tuple, Any
import tensorflow as tf
from dpu_utils.tf2utils import unsorted_segment_log_softmax
from .message_passing import MessagePassing, MessagePassingInput, register_message_passing_implementation
@register_message_passing_implementati... |
abcd27de3dc1480ace72d9c4af2774cac04d2e22 | afbeee6a3a83946449e5fccf7c74457461ed921f | /docs/source/gallery/showcase/plots/point_cloud_plot.py | 5374fd9c9b51a7002aa5b9a233a52388f664dc73 | [
"MIT"
] | permissive | K3D-tools/K3D-jupyter | d69e541de90835415be5516d3e6758b1fcd530d2 | 5973d30947f6bc80b2a50ba260f198bec57ddfc1 | refs/heads/main | 2023-09-01T20:41:01.159202 | 2023-08-26T20:45:56 | 2023-08-26T20:45:56 | 44,377,817 | 859 | 134 | MIT | 2023-08-26T20:33:59 | 2015-10-16T10:14:20 | Python | UTF-8 | Python | false | false | 747 | py | point_cloud_plot.py | import numpy as np
import os
import k3d
def generate():
filepath = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../assets/point_cloud.npz')
data = np.load(filepath)['arr_0']
plt_points = k3d.points(data[:, 0:3],
data[:, 4].astype(np.u... |
dace283102d1b3ed5f1304969136ebfcfdfc0fe4 | 8da41ffa2ccb09e04f95db0f211e0ed69a42a352 | /courses/understanding_spanner/dataflow/csv-to-spanner.py | 38d499a7afa4564226685fd667d8c1871766072b | [
"Apache-2.0"
] | permissive | GoogleCloudPlatform/training-data-analyst | 808af9b09a0e5f5657c4ca76cdd205f808d76d89 | 975a95032ce5b7012d1772c7f1f5cfe606eae839 | refs/heads/master | 2023-09-05T19:50:59.722334 | 2023-09-04T14:25:33 | 2023-09-04T14:25:33 | 56,459,948 | 7,311 | 5,917 | Apache-2.0 | 2023-09-13T21:45:54 | 2016-04-17T21:39:27 | Jupyter Notebook | UTF-8 | Python | false | false | 2,412 | py | csv-to-spanner.py | import argparse
import logging
import re, os
from typing import NamedTuple, List
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.options.pipeline_options import SetupOptions
from apache_beam.io.gcp.spanner import SpannerInsert
from apache_beam.dataframe.io i... |
dc431f81cdda1f0279477776204023854f06798f | 4a7f8042d9d0591baf9a776320229b255d95562d | /shopify/utils/shop_url.py | 76e088a73b71b97abf65c102d00e22e8b79cc3c5 | [
"MIT"
] | permissive | Shopify/shopify_python_api | 56a175187ee22ede2bc1d26eb5b101989ae73410 | 5f295932bebbdde1835d35c4865093ff83564cdc | refs/heads/master | 2023-09-04T14:44:28.214779 | 2023-04-12T16:10:00 | 2023-04-12T16:10:00 | 2,249,127 | 1,029 | 332 | MIT | 2023-09-14T20:51:42 | 2011-08-22T14:49:21 | Python | UTF-8 | Python | false | false | 699 | py | shop_url.py | import re
import sys
if sys.version_info[0] < 3: # Backwards compatibility for python < v3.0.0
from urlparse import urlparse
else:
from urllib.parse import urlparse
HOSTNAME_PATTERN = r"[a-z0-9][a-z0-9-]*[a-z0-9]"
def sanitize_shop_domain(shop_domain, myshopify_domain="myshopify.com"):
name = str(shop_... |
25d408e8ab5e13d4758f04ea31486071d5bdfcf8 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /hardware/tests/opentrons_hardware/drivers/can_bus/test_settings.py | 1833509a4d67577d52a09f8df6b7174fcaa1a008 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | 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 | 2,655 | py | test_settings.py | """Tests for pcan bit timing calculations."""
import pytest
from typing import Optional
from opentrons_shared_data.errors.exceptions import CANBusConfigurationError
from opentrons_hardware.drivers.can_bus import settings
@pytest.mark.parametrize(
argnames=["fcan_clock", "bitrate", "sample_rate", "jump_width", "e... |
959ed7c8210d2f3bf4f4995afa8cf67cb609e707 | 42748690b8eb7a79a94a7431e19f7adfec88ffdc | /charcoal/charcoal.py | 50dcb2de7bea18ed91dc3e2c6668e13b142f5f32 | [
"BSD-3-Clause"
] | permissive | sky-shiny/smolder | 4f5a59f0d66b9cf7898aa0165dde27306e89b6d0 | 385df80e83c8370bfe285948242f39e20e99db24 | refs/heads/master | 2021-01-18T21:32:11.172441 | 2017-11-19T22:25:22 | 2017-11-19T22:25:22 | 32,863,450 | 103 | 12 | null | 2017-11-19T23:21:18 | 2015-03-25T12:35:18 | Python | UTF-8 | Python | false | false | 14,257 | py | charcoal.py | #! /usr/bin/env python
import os
import time
import logging
import warnings
from copy import deepcopy
from ldap3 import Connection, Server, ANONYMOUS, SIMPLE, SYNC, ASYNC
import jsonpickle
import requests
import validictory
from yapsy.PluginManager import PluginManager
from . import COLOURS, get_verify, get_host_over... |
12b30ad0e91fb1a3a88d8dc3a6970251cdcee58b | 84ecf73288879a396d1ff67e5779e07fadde80fb | /tools/analysis_tools/visualize/run.py | 73b521922eaa186c94008fe887f4c8cea1caae28 | [
"Apache-2.0"
] | permissive | OpenDriveLab/UniAD | 1ef9d2203ad35bbf8e1eb1a305d409817d90b888 | 2f38ff1357d3956af11c5609d5275db56c559c20 | refs/heads/main | 2023-08-09T05:28:26.497452 | 2023-08-07T07:27:30 | 2023-08-07T07:27:30 | 575,306,900 | 2,156 | 233 | Apache-2.0 | 2023-08-29T02:44:05 | 2022-12-07T08:05:49 | Python | UTF-8 | Python | false | false | 14,016 | py | run.py | import cv2
import torch
import argparse
import os
import glob
import numpy as np
import mmcv
import matplotlib
import matplotlib.pyplot as plt
from nuscenes import NuScenes
from nuscenes.prediction import PredictHelper, convert_local_coords_to_global
from nuscenes.utils.geometry_utils import view_points, box_in_image, ... |
9c3b2b4f946f242b3f7a89455d325e8ce264ca6d | c2d48caa5db7e746a38beca625406fcf47379d3c | /src/olympia/git/migrations/0003_auto_20200427_1211.py | 4ecf4f11dd5c3b376aa625bc2bb5acbb404b14ce | [] | permissive | mozilla/addons-server | 1f6269ec0a4aa5a0142a5f81978ef674daf213a7 | e0f043bca8a64478e2ba62f877c9dc28620be22f | refs/heads/master | 2023-09-01T09:34:41.867534 | 2023-09-01T07:21:22 | 2023-09-01T07:21:22 | 16,416,867 | 920 | 590 | BSD-3-Clause | 2023-09-14T16:15:01 | 2014-01-31T18:44:15 | Python | UTF-8 | Python | false | false | 441 | py | 0003_auto_20200427_1211.py | # Generated by Django 2.2.12 on 2020-04-27 12:11
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('git', '0002_auto_20200420_1525'),
]
operations = [
migrations.AlterModelOptions(
name='gitextractionentry',
options={'base_... |
ff42b2b06294d0d059f46b4ad251e2e9eaa27a3b | b13c8608893085fab623cd827b68162e2baebf23 | /bert_seq2seq/model/bart_model.py | 555cf694cb08f0aacc74ff968c378b10d1cc2eff | [
"Apache-2.0"
] | permissive | 920232796/bert_seq2seq | 0c21cb2ce2ddda803264c1f276588e98777a9b3c | c7988b01e3e69d66a061b28974ff9cc8fc4a36de | refs/heads/master | 2022-06-23T23:50:32.625851 | 2022-06-18T12:34:11 | 2022-06-18T12:34:11 | 246,974,265 | 1,195 | 202 | Apache-2.0 | 2022-06-18T12:34:12 | 2020-03-13T02:43:18 | Python | UTF-8 | Python | false | false | 53,515 | py | bart_model.py | # coding=utf-8
# Copyright 2021 The Fairseq Authors and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/... |
329bbceb911c527659432d90161a9312228e6f4b | e3cb932d22853fe684c1b490adeabb55b810bb4b | /t5/models/gin/sequence_lengths/cnn_dailymail_v002.gin | 5802062c67b4c15dc1fc42df8002f9fadbb2b2b1 | [
"Apache-2.0"
] | permissive | google-research/text-to-text-transfer-transformer | b2b621ec9b8b28e96819533d9f52cf86e2a8be06 | 24d9d3b89b129e586bbfe35cffbc5926d88adc5e | refs/heads/main | 2023-08-25T05:02:00.519242 | 2023-08-15T16:55:47 | 2023-08-15T16:56:21 | 215,890,886 | 5,702 | 807 | Apache-2.0 | 2023-08-26T09:00:52 | 2019-10-17T21:45:14 | Python | UTF-8 | Python | false | false | 230 | gin | cnn_dailymail_v002.gin | # -*-Python-*-
# The 99th %ile input sequence length for CNN/DM is actually longer than this,
# but AFAICT no one actually trains CNN/DM with super long input sequences.
utils.run.sequence_length = {'inputs': 512, 'targets': 512}
|
9c084e8f802b6811a1eaae72626de579503423a7 | 767dae79df18f9868855774464d08864a1d8629b | /protonfixes/gamefixes/638970.py | 7d948d8f477f27cd1e4f67286462c0f4e50e8c67 | [
"BSD-2-Clause"
] | permissive | simons-public/protonfixes | 05cd9c2c37c35ce56ec4c3cdcdba375c6eadf530 | 681411ba8ceb5d2d790e674eb7a5b98951d426e6 | refs/heads/master | 2022-11-16T04:16:32.764931 | 2022-11-15T00:24:24 | 2022-11-15T00:24:24 | 150,211,569 | 245 | 75 | NOASSERTION | 2022-11-15T00:24:25 | 2018-09-25T05:20:02 | Python | UTF-8 | Python | false | false | 193 | py | 638970.py | """ Game fix for Yakuza 0
"""
#pylint: disable=C0103
from protonfixes import util
def main():
""" Disable FSYNC
"""
# Disable fsync to fix saving issues
util.disable_fsync()
|
5c407b6abc3c9d8b0c520b708f428d24c6034154 | 1658f312f3aee37c6c4e2714ac081e081e73a7b8 | /examples/llama2/chat.py | 90577571df4a3620364723bba04ddc8eadbd2ec7 | [
"MIT"
] | permissive | OpenNMT/CTranslate2 | c96ac260e5a910ba8c7bec1f2ad7945599d90ec4 | 61d34502325bfa3c5ef8a11cd2e391d0efed1bf9 | refs/heads/master | 2023-08-16T03:02:30.003902 | 2023-08-04T13:33:06 | 2023-08-04T13:33:06 | 210,299,376 | 1,744 | 185 | MIT | 2023-09-13T07:58:59 | 2019-09-23T08:10:42 | C++ | UTF-8 | Python | false | false | 4,661 | py | chat.py | import os
import sys
import ctranslate2
import sentencepiece as spm
def main():
model_dir = sys.argv[1]
print("Loading the model...")
generator = ctranslate2.Generator(model_dir, device="cuda")
sp = spm.SentencePieceProcessor(os.path.join(model_dir, "tokenizer.model"))
context_length = 4096
... |
3b3b82414fd66359bf8c81ddabcb67d4c1ef64f0 | 4daab5ba90185bae65169ebb8183c635385ab3f8 | /autode/wrappers/ORCA.py | 0d2cf1cf7ee7c9b5c3c385149190ef40f2c5cf0a | [
"MIT"
] | permissive | duartegroup/autodE | bcf69440bd04411f97d39df0df0ae1f2bf6feb8c | 4d6667592f083dfcf38de6b75c4222c0a0e7b60b | refs/heads/master | 2023-09-01T15:08:16.028378 | 2023-07-25T08:09:05 | 2023-07-25T08:09:05 | 196,085,570 | 132 | 42 | MIT | 2023-09-12T15:20:54 | 2019-07-09T21:20:27 | Python | UTF-8 | Python | false | false | 20,665 | py | ORCA.py | import numpy as np
import os
import autode.wrappers.keywords as kws
import autode.wrappers.methods
from typing import List, TYPE_CHECKING
from autode.utils import run_external
from autode.hessians import Hessian
from autode.opt.optimisers.base import ExternalOptimiser
from autode.values import PotentialEnergy, Gradien... |
c08527614094f288f807d71dbec783188cf383db | 85c668af40853f5ee48fbe8c4045df1a5dd4104e | /tests/common/test_shapes.py | 80da49add72fb459b08706fc77517c4deb6855ce | [
"MIT",
"LicenseRef-scancode-public-domain",
"OFL-1.1"
] | permissive | marcomusy/vedo | 771db91bca05cda864fc7d1776d9140726676704 | 9a9f7c5e9ebf135e5c745c521c898866e3ede0ef | refs/heads/master | 2023-08-21T12:56:35.545713 | 2023-08-14T14:39:37 | 2023-08-14T14:39:37 | 110,261,047 | 1,419 | 206 | MIT | 2023-09-02T18:38:22 | 2017-11-10T15:17:47 | Python | UTF-8 | Python | false | false | 385 | py | test_shapes.py |
from vedo import Arc, vtk_version
import numpy as np
print('-----------------------------------------------------')
print('VTK Version', vtk_version, "test_shapes.py")
print('-----------------------------------------------------')
#####################################
arc = Arc(center=None, point1=(1, 1, 1), point2=... |
ee53a3632eab74bbddf47a8ce4206acee28dabd8 | 532ad1aedff8528b2e8af4e4e752f32d58b92b0d | /tests/link/c/test_type.py | 603dfb28d39fe5aa7db2187b68e7ccead5ef23b4 | [
"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 | 8,730 | py | test_type.py | import os
import numpy as np
import pytest
import aesara
from aesara import scalar as aes
from aesara.graph.basic import Apply
from aesara.link.c.op import COp
from aesara.link.c.type import CDataType, CEnumType, EnumList, EnumType
from aesara.tensor.type import TensorType, continuous_dtypes
class ProdOp(COp):
... |
858b0567e8d5fc89eafc5d2394c99badd11441f6 | 279f415dd1e06c594c6c87deda57e201c73c4542 | /espnet2/text/abs_tokenizer.py | 21d727d6153eac1db3fb9f880c5013c1002dbcb5 | [
"Apache-2.0"
] | permissive | espnet/espnet | f7ba47271c1a6b1ed606dbbfb04a7f14220bb585 | bcd20948db7846ee523443ef9fd78c7a1248c95e | refs/heads/master | 2023-08-28T23:43:34.238336 | 2023-08-23T02:51:39 | 2023-08-23T02:51:39 | 114,054,873 | 7,242 | 2,244 | Apache-2.0 | 2023-09-14T08:01:11 | 2017-12-13T00:45:11 | Python | UTF-8 | Python | false | false | 314 | py | abs_tokenizer.py | from abc import ABC, abstractmethod
from typing import Iterable, List
class AbsTokenizer(ABC):
@abstractmethod
def text2tokens(self, line: str) -> List[str]:
raise NotImplementedError
@abstractmethod
def tokens2text(self, tokens: Iterable[str]) -> str:
raise NotImplementedError
|
bac52f0d8d6781be18628527e9eae4d107f813c1 | 3a7fcd9f16304b258b7db0c78ce59116ad4e206e | /setup.py | 1e2f005e358c7f64d6530ce3f0f039f6175d150c | [
"MIT"
] | permissive | wdecoster/NanoPlot | 09c7fa1ac37bed5b03d1a88f56171a675cc69559 | 3c45efbf7d2d06b911e63ceca820a5dd92ef4234 | refs/heads/master | 2023-07-07T19:49:49.333839 | 2023-07-01T10:56:21 | 2023-07-01T10:56:21 | 90,007,962 | 329 | 54 | MIT | 2023-05-25T09:46:32 | 2017-05-02T08:11:23 | Python | UTF-8 | Python | false | false | 1,788 | py | setup.py | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
exec(open("nanoplot/version.py").read())
setup(
name="NanoPlot",
version=__version__, # noqa: F821
... |
0b965c88682632d0c9a71512f9d5d908caf8392b | 0e5291307525916f95faecaaa175fd7839eddbf8 | /SySeVR_docker/docker_build/home/SySeVR/softdir/py2neo-py2neo-2.0/py2neo/ext/neobox/__init__.py | 67eb679194daba135a269fc0363024f072c97076 | [
"Apache-2.0"
] | permissive | SySeVR/SySeVR | 9d7df721ac4964c4746e18938b4383e4a8142cc8 | 5e195d0bc63a76a298b65c9c3460fed0ee3082c7 | refs/heads/master | 2022-06-16T22:17:21.117906 | 2021-10-29T08:59:23 | 2021-10-29T08:59:23 | 141,377,750 | 255 | 125 | null | 2022-06-05T03:02:06 | 2018-07-18T03:45:49 | HTML | UTF-8 | Python | false | false | 1,407 | py | __init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2011-2014, Nigel Small
#
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.