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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dd5c0cd1865b5ad0d1bf1a2dbf519ca17ecc33c8 | da1500e0d3040497614d5327d2461a22e934b4d8 | /third_party/web_platform_tests/XMLHttpRequest/resources/conditional.py | 42dfecdfbc3d8090dca55c2e78280d3a3d24e2f0 | [
"BSD-3-Clause",
"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 | 620 | py | conditional.py | def main(request, response):
tag = request.GET.first("tag", None)
match = request.headers.get("If-None-Match", None)
date = request.GET.first("date", "")
modified = request.headers.get("If-Modified-Since", None)
if tag:
response.headers.set("ETag", '"%s"' % tag)
elif date:
respon... |
30dcbd5cdec4eb03751956e60aad4255c0787e73 | 34305ef03fffd872195fced3d946fcaccbc79ddf | /skrf/vi/vna/keysight/__init__.py | 93c9b83d7d1415a86868267e374a82db704d02c3 | [
"BSD-3-Clause"
] | permissive | scikit-rf/scikit-rf | 20477c643883b6b46dca50fca31ad1010a9512e9 | 26243ffc45160f17612badc880ad5d022036537a | refs/heads/master | 2023-08-19T03:34:42.208425 | 2023-07-28T13:56:06 | 2023-07-28T13:56:06 | 3,218,028 | 555 | 276 | BSD-3-Clause | 2023-09-12T21:56:17 | 2012-01-19T14:25:58 | Python | UTF-8 | Python | false | false | 226 | py | __init__.py | """
.. module:: skrf.vi.vna.keysight
===========================================
Keysight VNAs (:mod:`skrf.vi.vna.keysight`)
===========================================
"""
from .fieldfox import FieldFox
from .pna import PNA
|
abe0f294df3576255b0ae66c52833843d961de7c | 568fa58296378fa129ab3349adf010daa44ed45b | /tests/common/test_op/ascend/apply_ftrl.py | 51f8450c789a4db34d0e8e1889afd17afbd53054 | [
"Apache-2.0",
"BSD-3-Clause",
"NCSA",
"X11-distribute-modifications-variant",
"Zlib",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | mindspore-ai/akg | 37f471badc66de6a831f1f45ad84344f34d23ef2 | 99f33858d6972741748cbfc9ab0bf9600428fef7 | refs/heads/master | 2023-07-25T23:03:17.672665 | 2023-07-11T07:33:57 | 2023-07-11T07:33:57 | 274,077,856 | 319 | 36 | Apache-2.0 | 2021-12-30T13:43:08 | 2020-06-22T08:09:05 | Python | UTF-8 | Python | false | false | 6,209 | py | apply_ftrl.py | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
5f2b6b239d4f6a0a68d408265a74cbf81f3115fc | 40ca168bbb9c865a13c83ef479838981c5b7a1c0 | /packages/syft/src/syft/types/datetime.py | c03e1433fd0b5526d1426109785c53ffb4d405be | [
"Python-2.0",
"Apache-2.0"
] | permissive | OpenMined/PySyft | 6907171bc35062d04c1b6320097c3bcafb65ae68 | 1833278212d89e66853f28a7ca365261550bbe4f | refs/heads/dev | 2023-09-05T05:50:48.773703 | 2023-09-05T04:00:44 | 2023-09-05T04:00:44 | 97,641,933 | 9,473 | 2,530 | Apache-2.0 | 2023-09-14T12:50:53 | 2017-07-18T20:41:16 | Python | UTF-8 | Python | false | false | 1,041 | py | datetime.py | # stdlib
from datetime import datetime
from functools import total_ordering
from typing import Optional
# third party
from typing_extensions import Self
# relative
from ..serde.serializable import serializable
from .syft_object import SYFT_OBJECT_VERSION_1
from .syft_object import SyftObject
from .uid import UID
@s... |
ad9195879182f610d46d5fb338499b07f234fcc1 | c46da4655eb03ddf1444476f26b3b9e9474a45e7 | /excalibur/utils/database.py | c4d0604ec3fd8906eafc0e0ec2645f57f9164ba4 | [
"MIT"
] | permissive | camelot-dev/excalibur | 7e4c892d5f16d1861840ccadd99ed5886ae84d4c | 2a8e6cabfe8fa1fb2265da0756cf0130d5e52025 | refs/heads/master | 2023-08-30T03:10:35.837139 | 2023-07-15T11:04:02 | 2023-07-15T11:04:02 | 153,899,105 | 1,356 | 222 | MIT | 2023-07-15T11:04:04 | 2018-10-20T11:34:49 | HTML | UTF-8 | Python | false | false | 243 | py | database.py | from ..settings import engine
def initialize_database():
from ..models import Base
Base.metadata.create_all(engine)
def reset_database():
from ..models import Base
Base.metadata.drop_all(engine)
initialize_database()
|
938d85229eab01b9736d9cb02c0d4d42e3ff6767 | 5e9576c368e98927e2965bd2fb23bd35d9993d69 | /featuretools/primitives/standard/transform/binary/multiply_numeric.py | 176eed3bc405905de6e8eb1301b06cb614e46915 | [
"BSD-3-Clause"
] | permissive | alteryx/featuretools | c6e319e063e8e84e7684bf232376f95dc5272160 | c284c2d27a95b81e0bae913ac90df2b02c8f3b37 | refs/heads/main | 2023-08-25T12:21:33.945418 | 2023-08-23T16:30:25 | 2023-08-23T16:30:25 | 102,908,804 | 1,783 | 201 | BSD-3-Clause | 2023-09-07T18:53:19 | 2017-09-08T22:15:17 | Python | UTF-8 | Python | false | false | 1,158 | py | multiply_numeric.py | import numpy as np
from woodwork.column_schema import ColumnSchema
from featuretools.primitives.base.transform_primitive_base import TransformPrimitive
from featuretools.utils.gen_utils import Library
class MultiplyNumeric(TransformPrimitive):
"""Performs element-wise multiplication of two lists.
Descriptio... |
52c08dbd8f23451732d465bc8ff35b17765845e7 | 2d9a3ce2a04190d0032e8a298829022260b1d76b | /indra/preassembler/__init__.py | c08362655bd48a1f694fe2f4a211e4851cc3f550 | [
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | sorgerlab/indra | f127a0f9bdd2d3f48df14575883fd31e2f4de4bf | 6d6ca1174792b6c5a05cbf3afcb9f138fabcec6a | refs/heads/master | 2023-08-21T13:25:54.654995 | 2023-06-11T16:46:41 | 2023-06-11T16:46:41 | 22,848,436 | 158 | 61 | BSD-2-Clause | 2023-08-30T21:47:59 | 2014-08-11T17:44:05 | Python | UTF-8 | Python | false | false | 37,882 | py | __init__.py | import time
import tqdm
import logging
import itertools
import functools
import collections
import networkx as nx
from indra.util import fast_deepcopy
from indra.statements import *
from indra.statements import stmt_type as indra_stmt_type
from .refinement import *
logger = logging.getLogger(__name__)
class Preassem... |
d7b70300a993375a9d08dd7c0cf5bb59e0510036 | e7252e004fcc5f6f1c290c65a8612fa68ed9a17c | /tests/test_suggest_column_types.py | e36c58fa8716937759e4ed4407de2cbb3e01a378 | [
"Apache-2.0"
] | permissive | simonw/sqlite-utils | 30978f99d921afa9e9dae741d0197a7c647e033b | 1260bdc7bfe31c36c272572c6389125f8de6ef71 | refs/heads/main | 2023-09-03T22:26:14.952114 | 2023-08-18T17:47:10 | 2023-08-18T17:47:10 | 140,912,432 | 1,288 | 93 | Apache-2.0 | 2023-09-09T00:45:31 | 2018-07-14T03:21:46 | Python | UTF-8 | Python | false | false | 989 | py | test_suggest_column_types.py | import pytest
from collections import OrderedDict
from sqlite_utils.utils import suggest_column_types
@pytest.mark.parametrize(
"records,types",
[
([{"a": 1}], {"a": int}),
([{"a": 1}, {"a": None}], {"a": int}),
([{"a": "baz"}], {"a": str}),
([{"a": "baz"}, {"a": None}], {"a": ... |
0cb77a55f0d838d78635090b228c7e6e2cf194aa | 8c39ba92cc71ff78242477d3256f6ee3daa872c7 | /conans/model/options.py | 478b15034cf28f859decdc195ea035bc6c5cf977 | [
"MIT"
] | permissive | conan-io/conan | eb4427e534a0edbb1fb06c753d5d9587faaef93c | bac455d1329b6744cdc41747354a727c9233179f | refs/heads/release/2.0 | 2023-09-03T18:51:54.345761 | 2023-09-03T17:30:43 | 2023-09-03T17:30:43 | 47,190,624 | 7,754 | 1,182 | MIT | 2023-09-14T15:16:09 | 2015-12-01T13:17:02 | Python | UTF-8 | Python | false | false | 17,135 | py | options.py | from conans.errors import ConanException
from conans.model.recipe_ref import ref_matches
_falsey_options = ["false", "none", "0", "off", ""]
def option_not_exist_msg(option_name, existing_options):
""" Someone is referencing an option that is not available in the current package
options
"""
result = ... |
182ddbdc2f0693d5634c5af2765a23ea808ef595 | 61673ab9a42f7151de7337608c442fa6247f13bb | /tkinter/__canvas__/canvas-solar-system/main.py | 0ecc842cffc120c097b9f588b0ad82d31728d935 | [
"MIT"
] | permissive | furas/python-examples | 22d101670ecd667a29376d7c7d7d86f8ec71f6cf | 95cb53b664f312e0830f010c0c96be94d4a4db90 | refs/heads/master | 2022-08-23T23:55:08.313936 | 2022-08-01T14:48:33 | 2022-08-01T14:48:33 | 45,575,296 | 176 | 91 | MIT | 2021-02-17T23:33:37 | 2015-11-04T23:54:32 | Python | UTF-8 | Python | false | false | 2,090 | py | main.py | #!/usr/bin/env python3
import tkinter as tk
import math
# --- functions ---
def calculate_position(data):
#unpack data
center_x, center_y, radius, distance, angle, angle_speed, x, y = data
# calculate new position of object
x = center_x - distance * math.sin(math.radians(-angle))
y = center_y - ... |
3c915cb810a71d285f04f60ecf52f5c4f6105491 | 84bdf2b9e7a684b3322f08fe995fec0fb6ef0b43 | /pycaret/utils/time_series/forecasting/models.py | 87a653550ac66f5e758ff255f0b7f1e3c358f835 | [
"MIT"
] | permissive | pycaret/pycaret | ea613de9b8da2e38b1988ff7a2952abe59a3b93c | ea88b2d3ee22c080ca5059f2f6f1547952b9451c | refs/heads/master | 2023-08-31T23:33:50.953586 | 2023-08-30T09:31:32 | 2023-08-30T09:31:32 | 223,636,350 | 7,915 | 1,994 | MIT | 2023-09-11T03:58:59 | 2019-11-23T18:40:48 | Jupyter Notebook | UTF-8 | Python | false | false | 4,817 | py | models.py | import pandas as pd
from sktime.forecasting.base import BaseForecaster
from pycaret.utils.time_series import TSExogenousPresent
# from pycaret.time_series import TSForecastingExperiment
def _disable_pred_int_enforcement(forecaster, enforce_pi: bool) -> bool:
"""Checks to see if prediction interval should be enf... |
a6293be14e0f977010683aa057ae04ce7f56e34d | 4d28185e7a78a569f9a449f39f183cac3024f711 | /packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py | fbb8bff412879c88f8451739a8706f331d1a97d8 | [
"NCSA",
"Apache-2.0",
"LLVM-exception"
] | permissive | apple/swift-lldb | 2789bf44f648609a1674ee520ac20b64c95de072 | d74be846ef3e62de946df343e8c234bde93a8912 | refs/heads/stable | 2023-04-06T00:28:15.882479 | 2019-10-25T22:46:59 | 2019-10-25T22:46:59 | 44,838,862 | 780 | 291 | Apache-2.0 | 2020-01-10T19:28:43 | 2015-10-23T21:13:18 | C++ | UTF-8 | Python | false | false | 4,125 | py | TestRegistersIterator.py | """
Test the iteration protocol for frame registers.
"""
from __future__ import print_function
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class RegistersIteratorTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
... |
1b72b160d54cb6b98b0dcc08a4dd4e6b301ad0b2 | 56d6257e932e1397ab03b1e7ccc6231378665b04 | /Push2/settings.py | c344b053269958ce47a2926de4b280a10a1fa059 | [] | no_license | gluon/AbletonLive10.1_MIDIRemoteScripts | e6c8dc4956cff9630aaa36f3667994387ad1d0cf | 2468b51eba7e5082b06f9e381b3e72027c5f272c | refs/heads/master | 2023-01-10T18:37:46.504180 | 2022-12-23T09:21:48 | 2022-12-23T09:21:48 | 213,423,555 | 205 | 59 | null | 2021-02-12T16:15:01 | 2019-10-07T15:44:52 | Python | UTF-8 | Python | false | false | 496 | py | settings.py | #Embedded file name: /Users/versonator/Jenkins/live/output/Live/mac_64_static/Release/python-bundle/MIDI Remote Scripts/Push2/settings.py
from __future__ import absolute_import, print_function, unicode_literals
from pushbase.setting import OnOffSetting
def create_settings(preferences = None):
preferences = prefere... |
7cde62188710f3d5e4b3ff07da5d1ee8072cc234 | 755d990ce11af7d4f76d9fa858bd00dc6c249b16 | /ai_economist/foundation/entities/endogenous.py | b6eb42a8bb5487d4cfffb0ef1d3ca6f2b30c25e6 | [
"BSD-3-Clause"
] | permissive | salesforce/ai-economist | 50703073355e3ec8428531c5d21790a7b39254e7 | a84d5f3fdcabb207d9fde7754d34906903b3e184 | refs/heads/master | 2023-09-05T07:32:13.070833 | 2022-05-09T21:28:55 | 2022-05-09T21:28:55 | 276,688,708 | 1,063 | 227 | BSD-3-Clause | 2023-08-20T13:42:31 | 2020-07-02T15:56:47 | Python | UTF-8 | Python | false | false | 1,153 | py | endogenous.py | # Copyright (c) 2020, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: BSD-3-Clause
# For full license text, see the LICENSE file in the repo root
# or https://opensource.org/licenses/BSD-3-Clause
from ai_economist.foundation.base.registrar import Registry
class Endogenous:
"""Base class fo... |
e341bfe1fb160c3165fb30223e0a76500b81500d | 364774e29ef2474552ea3839de0951e63cbae0a6 | /wouso/core/common.py | 53b62cd668477903600a9135270f15a817d0d4aa | [
"Apache-2.0"
] | permissive | rosedu/wouso | 66c50ef750cf79d6959768f7df93cc08607cc266 | ed34c62ac925db719388f27fe5acb40376d8d0c1 | refs/heads/master | 2022-10-29T14:28:51.818073 | 2022-09-24T18:54:04 | 2022-09-24T18:54:04 | 2,965,476 | 121 | 97 | NOASSERTION | 2019-11-15T09:33:50 | 2011-12-12T16:15:01 | Python | UTF-8 | Python | false | false | 4,832 | py | common.py | from django.core.cache import cache
import sys
class App:
""" Interface extended by Game and by Top and Qproposal Activity"""
@classmethod
def name(kls):
return kls.__name__.lower()
@classmethod
def disabled(kls):
""" Search for a disabled config setting.
"""
from... |
02f47ef4c9841eba2fdbf77eabcfb4caf958aebb | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/subaru/__init__.py | 26b81c84a1ea6285d76587c28143be8509df223a | [
"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 | 40 | py | __init__.py | """Tests for the Subaru integration."""
|
c95b6cd93adf7e447b74be8bcb8b8524cb0f9370 | 2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5 | /tools/mo/unit_tests/mo/front/Log1p_test.py | ae3b23e0ae774780cd8e6cb82c612066e32e7573 | [
"Apache-2.0"
] | permissive | openvinotoolkit/openvino | 38ea745a247887a4e14580dbc9fc68005e2149f9 | e4bed7a31c9f00d8afbfcabee3f64f55496ae56a | refs/heads/master | 2023-08-18T03:47:44.572979 | 2023-08-17T21:24:59 | 2023-08-17T21:24:59 | 153,097,643 | 3,953 | 1,492 | Apache-2.0 | 2023-09-14T21:42:24 | 2018-10-15T10:54:40 | C++ | UTF-8 | Python | false | false | 1,637 | py | Log1p_test.py | # Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
from openvino.tools.mo.front.Log1p import Log1p
from openvino.tools.mo.utils.ir_engine.compare_graphs import compare_graphs
from unit_tests.utils.graph import build_graph
nodes_attributes = {
'pl... |
65926ad29ad9d3501de6abbaeeb4beb43b2bb6a0 | 3d74f759ee48d383aa82eeff0a55864a93a001ba | /tools/fuchsia/interpolate_test_suite.py | bfa386954661487e6560a6050bf1ddb44e8bc21b | [
"BSD-3-Clause"
] | permissive | flutter/engine | 78be5418a9b2f7730dda9ca9fcb25b7055f3da85 | 902ece7f89d7730cc69f35e098b223cbbf4e25f1 | refs/heads/main | 2023-09-04T06:12:34.462953 | 2023-09-04T05:33:32 | 2023-09-04T05:33:32 | 39,211,337 | 7,090 | 6,862 | BSD-3-Clause | 2023-09-14T21:58:17 | 2015-07-16T17:39:56 | C++ | UTF-8 | Python | false | false | 806 | py | interpolate_test_suite.py | #!/usr/bin/env python3
#
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Interpolates test suite information into a cml file.
"""
from argparse import ArgumentParser
import sys
def main():
# Parse ... |
234c8e7d4055152014d1451f369a189f25008405 | 0760fb4901a75766921a205b55686d6d6f049b30 | /rllib/core/learner/reduce_result_dict_fn.py | 47ca597d2b11f08d9b008afee1d65af6d4118880 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 508 | py | reduce_result_dict_fn.py | """The following is set of default rllib reduction methods for ResultDicts"""
from typing import List
import numpy as np
import tree # pip install dm-tree
from ray.rllib.utils.typing import ResultDict
def _reduce_mean_results(results: List[ResultDict]) -> ResultDict:
"""Takes the average of all the leaves in th... |
d09931910e8d21e26583f3f4fce373df4fc13309 | 2d05050d0ada29f7680b4df20c10bb85b0530e45 | /python/tvm/runtime/script_printer.py | 2ed2b8ddd4bcbe4a707860ea7f74256c2ed45cc1 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"Zlib",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | apache/tvm | 87cb617f9a131fa44e1693303aaddf70e7a4c403 | d75083cd97ede706338ab413dbc964009456d01b | refs/heads/main | 2023-09-04T11:24:26.263032 | 2023-09-04T07:26:00 | 2023-09-04T07:26:00 | 70,746,484 | 4,575 | 1,903 | Apache-2.0 | 2023-09-14T19:06:33 | 2016-10-12T22:20:28 | Python | UTF-8 | Python | false | false | 11,126 | py | script_printer.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 u... |
0b14165234464e979ff164b3233a243899d21c7f | fce81b804cae23f525a5ad4370b684bf0dc531a5 | /numpy/typing/tests/data/fail/nested_sequence.pyi | 6301e51769fee30db50bfaf1e2777bf894166de8 | [
"Zlib",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | numpy/numpy | ba2abcc1d2d46affbb6aabe5aed6407b4b57507e | dc2ff125493777a1084044e6cd6857a42ee323d4 | refs/heads/main | 2023-09-05T10:10:52.767363 | 2023-09-04T18:03:29 | 2023-09-04T18:03:29 | 908,607 | 25,725 | 11,968 | BSD-3-Clause | 2023-09-14T21:26:09 | 2010-09-13T23:02:39 | Python | UTF-8 | Python | false | false | 427 | pyi | nested_sequence.pyi | from collections.abc import Sequence
from numpy._typing import _NestedSequence
a: Sequence[float]
b: list[complex]
c: tuple[str, ...]
d: int
e: str
def func(a: _NestedSequence[int]) -> None:
...
reveal_type(func(a)) # E: incompatible type
reveal_type(func(b)) # E: incompatible type
reveal_type(func(c)) # E: i... |
45c17869cbfe8872b39bd915f19a811d15a7bd85 | 450916eee7580beb928ed8f387db4f0a8c1aa508 | /src/amuse/test/suite/ext_tests/test_orbital_elements.py | 966328f8228230fce6cbc8ceb54aae2c7f9512bb | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | amusecode/amuse | 42095545893f5a86ea79c2a52ce54d3ce8eb204f | b57c1e2fda1457d5025307be105c2aa59b19b574 | refs/heads/main | 2023-08-31T04:50:48.880044 | 2023-08-30T12:00:20 | 2023-08-30T12:00:20 | 18,516,331 | 158 | 118 | Apache-2.0 | 2023-08-30T12:00:22 | 2014-04-07T12:35:07 | AMPL | UTF-8 | Python | false | false | 27,092 | py | test_orbital_elements.py | import numpy
from amuse.test import amusetest
from amuse.ext.orbital_elements import (
generate_binaries,
get_orbital_elements_from_binaries,
new_binary_from_orbital_elements,
# get_orbital_elements_from_binary,
orbital_elements_for_rel_posvel_arrays,
orbital_elements,
... |
820dd92848bd9c95639780605d659181566b2be7 | 94d3ef554f7931d2aad799eb6bcfa18104dc9bed | /ndlib/models/epidemics/__init__.py | e1f92c3075f2f245814b3034983648a7ccd1fa97 | [
"BSD-2-Clause"
] | permissive | GiulioRossetti/ndlib | 76b5a86a2b521cd68197218aea235e20bcb8d1f4 | 900cb3727795c97a73e59fdb736aa736c4d17157 | refs/heads/master | 2023-09-03T17:09:00.069129 | 2023-07-21T13:57:29 | 2023-07-21T13:57:29 | 59,556,819 | 265 | 82 | BSD-2-Clause | 2023-08-17T03:54:33 | 2016-05-24T08:53:47 | Python | UTF-8 | Python | false | false | 1,374 | py | __init__.py | """
The :mod:`ndlib.models.epidemic` module contains common network models from epidemic research literature.
"""
from .GeneralisedThresholdModel import GeneralisedThresholdModel
from .IndependentCascadesModel import IndependentCascadesModel
from .KerteszThresholdModel import KerteszThresholdModel
from .ProfileModel i... |
39c84a9b11262e2525db209e0685c881737ae2d3 | b347bc4b850dee4a8a9a171b563a3f31230ce1c7 | /sktime/forecasting/base/adapters/_pmdarima.py | d3bf2b0904e1fb765b14ac32998f01caf6ab2694 | [
"BSD-3-Clause"
] | permissive | sktime/sktime | 5963962df338c5931a2f9f1794d1203c50ddc27e | 70b2bfaaa597eb31bc3a1032366dcc0e1f4c8a9f | refs/heads/main | 2023-08-22T18:20:08.022950 | 2023-08-22T15:24:39 | 2023-08-22T15:24:39 | 156,401,841 | 1,117 | 268 | BSD-3-Clause | 2023-09-14T20:44:21 | 2018-11-06T15:08:24 | Python | UTF-8 | Python | false | false | 13,695 | py | _pmdarima.py | # !/usr/bin/env python3 -u
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Implements adapter for pmdarima forecasters to be used in sktime framework."""
__author__ = ["mloning", "hyang1996", "kejsitake", "fkiraly"]
__all__ = ["_PmdArimaAdapter"]
import pandas as pd
from sktime.datatypes._... |
08f2cc0870db9b1ea8dc8953e7fbee7c23957cfe | 79834b0f4bd34f1110b4ae127ff6aaaa72fa864d | /twitch/api/search.py | d2cb3cc00a8d1b7fb928a259f94d7a71fdaab4f3 | [
"MIT"
] | permissive | tsifrer/python-twitch-client | c4040ef03549e789667c2c23cdf56d743c9bb929 | bd2d79135f62bf45acd244079e0873f4987a6352 | refs/heads/master | 2022-07-26T13:34:21.578695 | 2021-03-16T09:12:45 | 2021-03-16T09:12:45 | 81,694,031 | 182 | 73 | MIT | 2021-10-02T19:18:21 | 2017-02-12T01:05:03 | Python | UTF-8 | Python | false | false | 1,309 | py | search.py | from twitch.api.base import TwitchAPI
from twitch.exceptions import TwitchAttributeException
from twitch.resources import Channel, Game, Stream
class Search(TwitchAPI):
def channels(self, query, limit=25, offset=0):
if limit > 100:
raise TwitchAttributeException(
"Maximum numbe... |
b053223f5c2da325335f71b217eecfc49df9da9b | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/completion/heavyStarPropagation/lib/_pkg1/_pkg1_1/_pkg1_1_1/_pkg1_1_1_0/_pkg1_1_1_0_0/_mod1_1_1_0_0_4.py | 9e5b4419a3960ee68d279607ac56b5eccbf18574 | [
"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 | 128 | py | _mod1_1_1_0_0_4.py | name1_1_1_0_0_4_0 = None
name1_1_1_0_0_4_1 = None
name1_1_1_0_0_4_2 = None
name1_1_1_0_0_4_3 = None
name1_1_1_0_0_4_4 = None |
62560da1feed7e41383a05c0f72745824fc5b2fb | 8b28c83f5b915d42e0f645247234153836aa47df | /flaskfile/server.py | 50e94630d5fbf2d5508272b965dae7a1b7cd0e38 | [] | no_license | 1165048017/BlogLearning | 8dae3637112f52c9a0daa619c94ed982c57744e6 | 45887e232c7441159319ad76014c90cc03709e36 | refs/heads/master | 2022-02-26T16:15:21.969535 | 2022-02-11T12:56:12 | 2022-02-11T12:56:12 | 253,278,238 | 214 | 68 | null | null | null | null | UTF-8 | Python | false | false | 1,653 | py | server.py | from werkzeug.utils import secure_filename
from flask import Flask,render_template,jsonify,request,url_for,send_from_directory,redirect
import time
import os
import base64
app = Flask(__name__)
UPLOAD_FOLDER='upload'
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
basedir = os.path.abspath(os.path.dirname(__file__))
ALLO... |
dd621c0c686432f40120ce85c3df617409f1086b | 52a677b94056d3397b4a499bc9185adb68a63f05 | /data/model/oci/test/test_oci_label.py | 6be431f7946b6344c656859beb260d0402433b9f | [
"Apache-2.0"
] | permissive | quay/quay | 9b6fcff54efc0dbf7c6d91fa80676950555b6f1a | e400a0c22c5f89dd35d571654b13d262b1f6e3b3 | refs/heads/master | 2023-08-28T15:08:38.001842 | 2023-08-28T13:52:31 | 2023-08-28T13:52:31 | 220,517,730 | 2,363 | 322 | Apache-2.0 | 2023-09-14T17:43:48 | 2019-11-08T17:37:05 | Python | UTF-8 | Python | false | false | 3,447 | py | test_oci_label.py | from test.fixtures import *
import pytest
from playhouse.test_utils import assert_query_count
from data.database import Manifest, ManifestLabel
from data.model.oci.label import (
DataModelException,
create_manifest_label,
delete_manifest_label,
get_manifest_label,
list_manifest_labels,
)
@pytest... |
e3251cb644122848f09715ccf62ca8ea0674da95 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/synapse/azure-synapse/azure/synapse/spark/aio/operations_async/_spark_session_operations_async.py | 624bc2ae298ff66ab1d917c2fa486b3be5454952 | [
"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 | 25,661 | py | _spark_session_operations_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.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
10b4c17595b09b8f84e4047edde3c0bd45ab8477 | 2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5 | /tools/mo/openvino/tools/mo/middle/AttributedTileNormalizer.py | c889e73b5f87b07ce4da4bb7197febbe37cbfbe0 | [
"Apache-2.0"
] | permissive | openvinotoolkit/openvino | 38ea745a247887a4e14580dbc9fc68005e2149f9 | e4bed7a31c9f00d8afbfcabee3f64f55496ae56a | refs/heads/master | 2023-08-18T03:47:44.572979 | 2023-08-17T21:24:59 | 2023-08-17T21:24:59 | 153,097,643 | 3,953 | 1,492 | Apache-2.0 | 2023-09-14T21:42:24 | 2018-10-15T10:54:40 | C++ | UTF-8 | Python | false | false | 1,436 | py | AttributedTileNormalizer.py | # Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from openvino.tools.mo.front.common.partial_infer.utils import int64_array
from openvino.tools.mo.graph.graph import Graph
from openvino.tools.mo.middle.replacement import MiddleReplacementPattern
from openvino.tools.... |
a1e7f71fede19bf663a5ceb19aa3541519d8f284 | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-datacatalog-lineage/google/cloud/datacatalog/lineage_v1/services/lineage/transports/rest.py | 0d855cc91e907f005bc04fc0881a5cab4f878994 | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 103,864 | py | rest.py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
93ca140de4ec291084f1742913dbd45c44423a3d | 36df4a9eb074bd06ae95f0e534043818b47acd91 | /streaming/language_support/python/test_install.py | a923bb1ae2463aa3f82ef2bfb059e757b476dfb2 | [] | no_license | mongodb/mongo-hadoop | 1356805ebfd5d7073e225a6adfdb4bf21f18329e | 20208a027ad8638e56dfcf040773f176d6ee059f | refs/heads/master | 2023-08-28T03:59:09.626489 | 2022-01-28T19:28:02 | 2022-01-28T19:28:02 | 856,703 | 1,057 | 421 | null | 2023-03-09T01:55:32 | 2010-08-23T14:05:51 | Java | UTF-8 | Python | false | false | 366 | py | test_install.py | #!/usr/bin/env python
try:
import pymongo
from bson import _elements_to_dict, InvalidBSON
except:
raise Exception("Cannot find a valid pymongo installation.")
try:
from pymongo_hadoop import BSONInput
except:
raise Exception("Cannot find a valid pymongo_hadoop installation.")
print "*** Everythin... |
5a399a2bbde19fb8d7f538f1bd45d225141356ba | b85e5263563af92ea888ddc74c97785501e4a7bd | /python_examples/pair_distribution.py | 22fddb23fe152028ca50c8150e8202826d8d7a6b | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | Allen-Tildesley/examples | 4e9a2f7bc574d1dd823caceef995d623d5b8255e | 9e71fb31b4eb6421cc1936149e882e7dd47dd927 | refs/heads/master | 2023-09-04T08:44:00.488422 | 2023-09-01T14:32:50 | 2023-09-01T14:32:50 | 32,993,797 | 255 | 109 | CC0-1.0 | 2022-08-20T14:12:51 | 2015-03-27T15:28:35 | Fortran | UTF-8 | Python | false | false | 6,271 | py | pair_distribution.py | #!/usr/bin/env python3
# pair_distribution.py
#------------------------------------------------------------------------------------------------#
# This software was written in 2016/17 #
# by Michael P. Allen <m.p.allen@warwick.ac.uk>/<m.p.allen@bristol.ac.uk> ... |
2fffbc1969e6b6f0e2973b163001d882f3a00b28 | b38247a5d84d8b52ce8363f8dd81629cfbe17f65 | /serving/reagent/serving/config/operators.py | 2a4e368776121ce5535f5b649939fe97ae3203a0 | [
"BSD-3-Clause"
] | permissive | facebookresearch/ReAgent | 7f2b82eaaf7a19e58cc50aacc307d7b001231440 | c5f1a8371a677b4f8fb0882b600bf331eba5259d | refs/heads/main | 2023-09-05T15:56:49.175072 | 2023-08-29T21:48:40 | 2023-08-29T21:48:40 | 98,565,575 | 1,480 | 290 | BSD-3-Clause | 2023-09-12T23:09:30 | 2017-07-27T17:53:21 | Python | UTF-8 | Python | false | false | 1,683 | py | operators.py | #!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
from typing import Dict
import reagent.serving.config.namespace as namespace
# Track things we don't want to export
__globals = set(globals())
def ActionValueScoring(model_id: int, snapshot_id: int):
"""The operator calls predictor... |
facfeaf4a0c10b7664f5893a6b3c3b92d19af65e | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/Scaleform/daapi/view/lobby/vehicle_preview/info/__init__.py | cdd2c662d1aa29fe291a414ca4e8e1f2db129a30 | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 157 | py | __init__.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/Scaleform/daapi/view/lobby/vehicle_preview/info/__init__.py
pass
|
9659ef1236c4132492f5ed787c1d41ed98720c2f | 7343ece3b82ac87a594865c4074623b45b0297b4 | /synapse/config/spam_checker.py | f22784f9c95a56885d11b07a84409a23ea72a76a | [
"Apache-2.0"
] | permissive | matrix-org/synapse | a00111f83310783b78e2996557f8bbae4d9fb229 | d35bed8369514fe727b4fe1afb68f48cc8b2655a | refs/heads/develop | 2023-09-05T05:24:20.808942 | 2023-09-04T16:14:09 | 2023-09-04T16:14:09 | 22,844,864 | 12,215 | 2,869 | Apache-2.0 | 2023-09-14T15:20:48 | 2014-08-11T15:51:42 | Python | UTF-8 | Python | false | false | 2,585 | py | spam_checker.py | # Copyright 2017 New Vector 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 in writin... |
209c68eae5130d9e135fd3547a1018c346e78880 | f71ea031e1df51e8fbf20899788830ac079c7609 | /spidermon/contrib/actions/email/__init__.py | 3a415b7f41101802f7316eb874997d4a517e6502 | [
"BSD-3-Clause"
] | permissive | scrapinghub/spidermon | d4177399a38610f876842e1a6b6d47b19381f716 | ea21cee8f42261c99278a6b4582a19b32224ef47 | refs/heads/master | 2023-08-31T17:06:04.520859 | 2023-08-31T09:10:51 | 2023-08-31T09:10:51 | 46,345,612 | 492 | 105 | BSD-3-Clause | 2023-09-13T20:41:43 | 2015-11-17T12:27:38 | Python | UTF-8 | Python | false | false | 5,532 | py | __init__.py | from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import logging
logger = logging.getLogger(__name__)
from spidermon.contrib.actions.templates import ActionWithTemplates
from spidermon.exceptions import NotConfigured
from premailer import transform
class SendEmail(ActionWithTempla... |
b3bf9b42a7688edc0c0e7524a52ae474a1f54a9f | 069c2295076c482afadfe6351da5ae02be8e18e6 | /django/contrib/redirects/migrations/0002_alter_redirect_new_path_help_text.py | 99763660056376f9d60b077fdaad024a2bb02774 | [
"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 | 635 | py | 0002_alter_redirect_new_path_help_text.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("redirects", "0001_initial"),
]
operations = [
migrations.AlterField(
model_name="redirect",
name="new_path",
field=models.CharField(
blank... |
c9aafa688e148a333a96db25df9ce3b7f72a7e59 | e22eeb5256e17a96a98b3ff25433aec2d641cd2c | /openstack/key_manager/v1/container.py | eebe5d038365eccba4c5c39e6ef28267e57a660b | [
"Apache-2.0"
] | permissive | openstack/openstacksdk | b4b95fd7869653feea5a3b783e9a5c588235c039 | d474eb84c605c429bb9cccb166cabbdd1654d73c | refs/heads/master | 2023-09-03T22:50:03.398512 | 2023-07-27T14:09:35 | 2023-08-29T16:28:46 | 16,223,378 | 124 | 130 | Apache-2.0 | 2023-09-06T02:52:47 | 2014-01-25T02:48:00 | Python | UTF-8 | Python | false | false | 1,715 | py | container.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 t... |
8bccdc9de06813276416e1b639dbcc84b5d64b66 | 6ffd23679939f59f0a09c9507a126ba056b239d7 | /imperative/python/megengine/traced_module/_passes/const_pass.py | f21b95cb67349ebd888bb343ad60aa0e9a615ba3 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | MegEngine/MegEngine | 74c1c9b6022c858962caf7f27e6f65220739999f | 66b79160d35b2710c00befede0c3fd729109e474 | refs/heads/master | 2023-08-23T20:01:32.476848 | 2023-08-01T07:12:01 | 2023-08-11T06:04:12 | 248,175,118 | 5,697 | 585 | Apache-2.0 | 2023-07-19T05:11:07 | 2020-03-18T08:21:58 | C++ | UTF-8 | Python | false | false | 6,729 | py | const_pass.py | from ... import functional as F
from ... import module as M
from ...core.ops.builtin import GetVarShape
from ...logger import get_logger
from ...tensor import Tensor
from ..expr import Constant, Expr, is_apply_def, is_constant, is_getattr
from ..node import Node, NodeMixin, TensorNode
from .matcher import PatternMatche... |
36d25c309388f87a846aa6558afb8ec17d874b8c | b86358e1f01f1eb51e44bb419c7889bee34b6893 | /tools/etnaviv/parse_rng.py | 18a8fe5399cc496948d2f15d1ef8ed15c03a72c4 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | etnaviv/etna_viv | 77a113036b1390cbeba7349a34100ea577acebc1 | 678505ad8f3cfdebe39a431e5e7e85cee0a3e57c | refs/heads/master | 2023-08-09T09:31:53.703245 | 2023-07-05T11:19:08 | 2023-07-05T11:19:08 | 22,278,924 | 124 | 24 | NOASSERTION | 2020-03-02T17:47:34 | 2014-07-26T05:06:21 | C | UTF-8 | Python | false | false | 27,875 | py | parse_rng.py | '''
Parse rules-ng-ng XML format.
See rules-ng-ng.xsd and rules-ng-ng.xml for documentation of the format.
'''
# Copyright (c) 2012-2013 Wladimir J. van der Laan
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to... |
9502007cf2a5467a1d43d008b372fda736eb5a90 | 17af9c355b71a8d92dbfda9d57e335778aef36b0 | /sklego/notinstalled.py | 165893ed61d1b981dc86fde0d20af9114027d47f | [
"MIT"
] | permissive | koaning/scikit-lego | 34aea637a190facaca0a34b898af66f1184b23b7 | c1d413e8ae24350527f3b5bafa7d55b82e95c0cb | refs/heads/main | 2023-08-30T03:45:58.479238 | 2023-07-18T19:07:12 | 2023-07-18T19:07:12 | 166,836,939 | 1,067 | 133 | MIT | 2023-09-08T07:30:45 | 2019-01-21T15:30:15 | Python | UTF-8 | Python | false | false | 1,592 | py | notinstalled.py | KNOWN_PACKAGES = {"cvxpy": {"version": ">=1.0.24", "extra_name": "cvxpy"}}
class NotInstalledPackage:
"""
Class to gracefully catch ImportErrors for modules and packages that are not installed
:param package_name (str): Name of the package you want to load
:param version (str, Optional): Version of t... |
ac14564422f6c69e551bcefc0af4627df1ee53f7 | 3ab0ce5a37683744fca77c0ee7172eea7b839feb | /galpy/potential/EllipsoidalPotential.py | 0be932e3778e7cc235e5bacf90c7cf9731e250fa | [
"BSD-3-Clause"
] | permissive | jobovy/galpy | 8ee6c00a2796e6bdb920625ce7c5cb32b47b5bc9 | a46619fd4f5979acfccad23f4d57503033f440c5 | refs/heads/main | 2023-08-25T04:18:39.588870 | 2023-08-14T02:34:26 | 2023-08-14T02:34:26 | 2,375,854 | 182 | 119 | BSD-3-Clause | 2023-09-11T03:28:59 | 2011-09-13T03:20:30 | Python | UTF-8 | Python | false | false | 22,607 | py | EllipsoidalPotential.py | ###############################################################################
# EllipsoidalPotential.py: base class for potentials corresponding to
# density profiles that are stratified on
# ellipsoids:
#
# \rho(x,y,z) ~ \rho(m)
#
# ... |
6a59b2169b7002d15dd52b6cca9499f4fbf9aa51 | 7a0e1ed4c4ae6cbfaba63cc38a3b64ac6029b9c5 | /src/astral/location.py | 21622807425fa44155699425df2ef30ce459e797 | [
"Apache-2.0"
] | permissive | sffjunkie/astral | 68db1d7832ead79af3bb7d56f0a7fe5c17f3be30 | bc6885b0685e6dc629f6d1131df26d8beea57e8d | refs/heads/master | 2023-07-31T09:06:19.711829 | 2022-11-09T11:34:09 | 2022-11-09T11:34:09 | 65,539,122 | 204 | 54 | Apache-2.0 | 2023-06-27T19:18:02 | 2016-08-12T08:58:17 | Python | UTF-8 | Python | false | false | 31,305 | py | location.py | import dataclasses
import datetime
try:
import zoneinfo
except ImportError:
from backports import zoneinfo # type: ignore
from typing import Any, Dict, Optional, Tuple, Union
import astral.moon
import astral.sun
from astral import (
Depression,
Elevation,
LocationInfo,
Observer,
SunDirec... |
efeb10f4c7a599da7a0fecf1f131b16697879dad | 13800b7827598e76428a335559b7bf11867ec2f0 | /python/ccxt/async_support/lbank.py | a46476292258482200877b37a1d9e98d33bae1e1 | [
"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 | 34,074 | py | lbank.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.lbank import ImplicitAPI
from ccxt.base.types import OrderSide
fro... |
9bd1a7830dba885b2a7f9c3a34ae2df040f55ffa | 1a47fe8a56854bfad6b54917ff04885c49538bd5 | /test/holes_test.py | f569a08804e1da44f09a0992019bc4d7f5cc09fd | [
"Apache-2.0"
] | permissive | spotify/annoy | 02b4c866ed819140969bd9835f1ed0afc299d5c7 | 2be37c9e015544be2cf60c431f0cccc076151a2d | refs/heads/main | 2023-09-03T03:31:28.329246 | 2023-08-20T17:38:53 | 2023-08-20T17:38:53 | 9,155,431 | 11,966 | 1,230 | Apache-2.0 | 2023-08-20T17:38:55 | 2013-04-01T20:29:40 | C++ | UTF-8 | Python | false | false | 1,837 | py | holes_test.py | # Copyright (c) 2013 Spotify AB
#
# 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, s... |
66b470fa2f99f1debc94627811e1c4f3741b0613 | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands_thru_mock.py | ebeeb6838f05120879115fdeac4c027d0a1c95bc | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | Azure/azure-cli | 13340eeca2e288e66e84d393fa1c8a93d46c8686 | a40fd14ad0b6e89720a2e58d4d9be3a6ce1535ca | refs/heads/dev | 2023-08-17T06:25:37.431463 | 2023-08-17T06:00:10 | 2023-08-17T06:00:10 | 51,040,886 | 4,018 | 3,310 | MIT | 2023-09-14T11:11:05 | 2016-02-04T00:21:51 | Python | UTF-8 | Python | false | false | 26,631 | py | test_functionapp_commands_thru_mock.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
b5a63efaaf400d898de5f3161a8580f0bae6768b | 574661105b08044688f287c45c917b1e0cfa0cfb | /__init__.py | 2a1473b44ae1a3e9f7ef55ff7763b61e09564da3 | [] | no_license | elupus/hass_nibe | 64a97316ff25eb3f2cf20adf4d5cf2f73d6cd913 | b32e6f256cee4727d1c830075acfa607adc15dc7 | refs/heads/master | 2023-09-04T12:00:36.403723 | 2023-08-11T20:29:06 | 2023-08-11T20:29:24 | 93,442,181 | 169 | 60 | null | 2023-08-30T06:53:01 | 2017-06-05T20:08:06 | Python | UTF-8 | Python | false | false | 12,759 | py | __init__.py | """Support for nibe uplink."""
from __future__ import annotations
import asyncio
import logging
from dataclasses import dataclass
from datetime import timedelta
from typing import Callable, Optional, cast
import homeassistant.helpers.config_validation as cv
import homeassistant.helpers.device_registry as device_regis... |
07ecebe8c1b692546dd525617411d7791b2a0181 | 01e5ff7ae1bdd5ed8b048f4586c5d76d35ca2253 | /aiobotocore/config.py | 8d7cc6e1f66d55bea316156181089588c132ae2b | [
"Apache-2.0"
] | permissive | aio-libs/aiobotocore | 870fb8055eee462e5e15218517dcdaff59441730 | 1d341d79e01d6459aaa6f023d808782f81fc122c | refs/heads/master | 2023-09-04T05:25:02.675573 | 2023-08-31T16:07:35 | 2023-08-31T16:07:35 | 36,618,494 | 993 | 200 | Apache-2.0 | 2023-09-07T05:18:33 | 2015-05-31T19:28:54 | Python | UTF-8 | Python | false | false | 2,698 | py | config.py | import copy
import botocore.client
from botocore.exceptions import ParamValidationError
class AioConfig(botocore.client.Config):
def __init__(self, connector_args=None, **kwargs):
super().__init__(**kwargs)
self._validate_connector_args(connector_args)
self.connector_args = copy.copy(con... |
09515c33b783d36e838ce3f6c53f27c11739ff95 | 52107637d2687db30f168ba15ffd1e1e534f4cb4 | /tests/datasets/test_four_way_tabla.py | 343e818d396b424bceff47ba8863a0f131ba6d8a | [
"BSD-3-Clause"
] | permissive | mir-dataset-loaders/mirdata | 9be10e0201b08abf51fc72338ccaaacc8216145b | 496eb4a9120aa16ff6963792f0c8b738a0c3f310 | refs/heads/master | 2023-05-07T13:15:16.517429 | 2023-03-27T13:54:37 | 2023-03-27T13:54:37 | 170,765,267 | 297 | 65 | BSD-3-Clause | 2023-08-05T22:48:48 | 2019-02-14T22:11:33 | Python | UTF-8 | Python | false | false | 4,104 | py | test_four_way_tabla.py | import os
import numpy as np
from tests.test_utils import run_track_tests
from mirdata import annotations
from mirdata.datasets import four_way_tabla
def test_track():
default_trackid = "AHK_solo-tintal-1"
data_home = os.path.normpath("tests/resources/mir_datasets/four_way_tabla")
dataset = four_way_tab... |
d39223f515f340583ecca46586dcde8ef52f51e4 | c9f67929f734dc27b9e1b0e2ff106319ee9fd86b | /workflow/rules/metabat_single.smk | 5678faf2364616a0190994e7853d8467b9de5aaa | [
"MIT"
] | permissive | franciscozorrilla/metaGEM | b6a91df36dcbbf334a5dafc0a3ae75206bb413ee | cb099b7a557af8bddbd3b257670d263be3ac5a1f | refs/heads/master | 2023-08-25T20:52:04.928295 | 2023-08-12T10:30:49 | 2023-08-12T10:30:49 | 137,376,259 | 137 | 36 | MIT | 2023-06-30T11:34:02 | 2018-06-14T15:26:05 | Python | UTF-8 | Python | false | false | 2,803 | smk | metabat_single.smk | rule metabat_single:
input:
assembly = rules.megahit.output,
R1 = rules.qfilter.output.R1,
R2 = rules.qfilter.output.R2
output:
directory(f'{config["path"]["root"]}/{config["folder"]["metabat"]}/{{IDs}}/{{IDs}}.metabat-bins')
benchmark:
f'{config["path"]["root"]}/{con... |
6f25144bd48d9e3a394626746caed20438e5c165 | c530897cb72b6943c7226b25824444cad5f3503b | /usaspending_api/awards/v2/filters/filter_helpers.py | 8f31bcd74ed9177e84efacc37c43f4d6bbbda690 | [
"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 | 11,872 | py | filter_helpers.py | import logging
from collections import namedtuple
from copy import deepcopy
from datetime import datetime
from datetime import timedelta
from django.db.models import Q
from usaspending_api.common.exceptions import InvalidParameterException
from usaspending_api.common.helpers.generic_helper import dates_are_month_book... |
2ce36c0fb3a0439c0a209e58837ff1db84cf1471 | e8846f706a428a91659ac6e24974dc696089fe4a | /pandapower/converter/cim/pp_classes.py | f78211cb07bafc8a6e2480da3030f51854d0773e | [
"BSD-3-Clause"
] | permissive | e2nIEE/pandapower | 3e434bf81b29e9c88905abbd82fd0309e2191ffb | 5592ba1f6fcd727053a37dcf246b9bf36874c24a | refs/heads/develop | 2023-09-03T23:21:25.979973 | 2023-08-31T11:00:17 | 2023-08-31T11:00:17 | 78,748,060 | 608 | 481 | NOASSERTION | 2023-09-14T18:22:08 | 2017-01-12T13:27:53 | Python | UTF-8 | Python | false | false | 5,060 | py | pp_classes.py | # -*- coding: utf-8 -*-
# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. All rights reserved.
import logging
from typing import Dict
import json
import pandapower as pp
import pandapower.auxiliary
from . import cim_tools
cla... |
3815b07ea1b50b2cc44596c173874635742922f1 | 4b823e3338c56d38c7fda32b1900591cbb10dfc0 | /bindings/python/tests/mesh/test-py-euclidean-distance-transform.py | 3ac6fb6f005ebe11be009706b065951a4a8c18fe | [
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | Geode-solutions/OpenGeode | 475e63ca5f33b039b9f010dc5ae09870f4d628a1 | 7d8d581ecf0556af7820b0b37707f3695798b3b3 | refs/heads/master | 2023-08-20T23:42:54.775348 | 2023-08-11T12:37:41 | 2023-08-11T12:37:41 | 200,015,280 | 141 | 13 | MIT | 2023-09-14T09:43:29 | 2019-08-01T08:58:36 | C++ | UTF-8 | Python | false | false | 4,965 | py | test-py-euclidean-distance-transform.py | # -*- coding: utf-8 -*-
# Copyright (c) 2019 - 2023 Geode-solutions
#
# 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, co... |
83b4c751482c3f4e5907e5b68e2b63553043f6e9 | 80a3d98eae1d755d6914b5cbde63fd10f5cc2046 | /autox/autox_video/mmaction2/mmaction/models/recognizers/audio_recognizer.py | 6d5c828207778c906edcbeab160b312c39be2162 | [
"Apache-2.0"
] | permissive | 4paradigm/AutoX | efda57b51b586209e1d58e1dab7d0797083aadc5 | 7eab9f4744329a225ff01bb5ec360c4662e1e52e | refs/heads/master | 2023-05-24T00:53:37.109036 | 2023-02-14T14:21:50 | 2023-02-14T14:21:50 | 388,068,949 | 752 | 162 | Apache-2.0 | 2022-07-12T08:28:09 | 2021-07-21T09:45:41 | Jupyter Notebook | UTF-8 | Python | false | false | 3,680 | py | audio_recognizer.py | # Copyright (c) OpenMMLab. All rights reserved.
from ..builder import RECOGNIZERS
from .base import BaseRecognizer
@RECOGNIZERS.register_module()
class AudioRecognizer(BaseRecognizer):
"""Audio recognizer model framework."""
def forward(self, audios, label=None, return_loss=True):
"""Define the compu... |
523c392a1b5f7322eb8de06e18f377b89ff89627 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/nxos/tests/ShowIpInterfaceVrfAll/cli/equal/golden_output7_expected.py | ce31b1173b62f51d29ea36bd1eb190bf2b7401d4 | [
"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 | 68,328 | py | golden_output7_expected.py | expected_output = {
"Ethernet1/3": {
"directed_broadcast": "disabled",
"icmp_port_unreachable": "enabled",
"icmp_redirects": "enabled",
"icmp_unreachable": "disabled",
"int_stat_last_reset": "never",
"interface_status": "protocol-up/link-up/admin-up",
"iod": 7... |
317b73d7e683639b1f8079ec92c48f3753b05d43 | 472c0ba1911619f8e2e1a68b4f956fad05be4e94 | /src/matlab2cpp/rules/_string.py | 88b8385abfbd4bc2a426c298941822a4965da744 | [
"BSD-3-Clause"
] | permissive | jonathf/matlab2cpp | f8b9541cf79507ec764b04b8211e73c47a20c131 | b6e2cbaedb36c909952911adfe44fe26252a36a1 | refs/heads/master | 2022-08-08T21:28:23.028072 | 2022-07-15T19:58:01 | 2022-07-15T19:58:01 | 31,599,354 | 197 | 68 | BSD-3-Clause | 2022-07-15T19:58:02 | 2015-03-03T13:20:32 | Python | UTF-8 | Python | false | false | 245 | py | _string.py | from .assign import Assign
from .variables import *
Declare = "string %(name)s ;"
def String(node):
if node.name or node.parent.backend != "matrix":
return '"%(value)s"'
else:
return 'std::string("%(value)s")'
|
99aec74f586fb872994b2771df44eb4a88644d87 | 346f1d8818237116f759290b43ef881eb58464ed | /GPaCo/Seg/mmseg/models/decode_heads/uper_head_ceco.py | 253936918f0c8df7b78dfe3600a64dd1d4b7a620 | [
"Apache-2.0",
"MIT"
] | permissive | dvlab-research/Parametric-Contrastive-Learning | a35cd210692a69293c68297c01d8af3312ac986f | e5f8436c67b3860a18578da3290eb582e6a27c25 | refs/heads/main | 2023-08-04T15:03:59.422489 | 2023-07-24T15:17:37 | 2023-07-24T15:17:37 | 373,351,085 | 170 | 24 | null | null | null | null | UTF-8 | Python | false | false | 10,598 | py | uper_head_ceco.py | # Copyright (c) OpenMMLab. All rights reserved.
import math
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.nn.init as init
from mmcv.cnn import ConvModule
from mmcv.runner import BaseModule, auto_fp16, force_fp32
from mmseg.ops import resize
from ..builder import H... |
142d146d179d63728f968e13028b00c724a6b110 | 89420cda57f03791a5448ed4eeb967d06a4aade3 | /arviz/plots/backends/bokeh/traceplot.py | 05d83f1546339c1f2a7342569624a7f48ec7cc3c | [
"Apache-2.0"
] | permissive | arviz-devs/arviz | fa2423e28f7a8c1b22986dbef317579c00744f75 | 24c260a0390d030e106943f21811652ea82aebc7 | refs/heads/main | 2023-09-03T12:22:12.075948 | 2023-07-18T22:29:35 | 2023-07-18T22:29:35 | 39,890,704 | 1,421 | 413 | Apache-2.0 | 2023-09-13T15:53:19 | 2015-07-29T11:51:10 | Python | UTF-8 | Python | false | false | 14,207 | py | traceplot.py | """Bokeh Traceplot."""
import warnings
from collections.abc import Iterable
from itertools import cycle
import bokeh.plotting as bkp
import matplotlib.pyplot as plt
import numpy as np
from bokeh.models import ColumnDataSource, DataRange1d, Span
from bokeh.models.glyphs import Scatter
from bokeh.models.annotations impo... |
0e69f686ef0a9c34ead724ae27e87b6a4991a0f1 | 30b004cad2c14b47b5f66c3a4a0015e05ca4a27e | /python/paddle_fl/paddle_fl/examples/k8s_deployment/server/fl_server.py | 6d60f463a5275ae62e906e4a9c1bdc501ea8d412 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleFL | 66c26f774eeadc25c12e74056ac389e0c1f61b84 | dcc00c5dff62c3dd0092801f4e9b89d8c0957d3d | refs/heads/master | 2023-08-07T22:05:24.806573 | 2023-03-21T01:15:10 | 2023-03-21T01:15:10 | 210,873,203 | 486 | 136 | Apache-2.0 | 2023-07-26T22:30:57 | 2019-09-25T15:01:39 | Python | UTF-8 | Python | false | false | 1,467 | py | fl_server.py | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
edb24f474107deec45e470649f8063e599fa0b87 | b04cc98a746d1df457183bc14908094a8be00ba1 | /example/auto_compression/nlp/paddle_inference_eval_uie.py | 2f378ef0254dafea2a3a580491bf71a2c11a5340 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSlim | a3bcaef0c92016b7f6946d58787f87c7db8ff3f8 | bb02b103a89a09635941bc0bbbd38506d7412468 | refs/heads/develop | 2023-08-31T01:47:27.824722 | 2023-08-25T08:06:08 | 2023-08-25T08:06:08 | 228,290,594 | 1,534 | 402 | Apache-2.0 | 2023-08-29T09:37:55 | 2019-12-16T02:56:50 | Python | UTF-8 | Python | false | false | 14,268 | py | paddle_inference_eval_uie.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 by appli... |
0807c5131485161d25bc77ab48885f6c373b69b3 | b5ce6908490cfb8e6a1e1cbe4745d675122ddce0 | /questions/partition-labels/Solution.py | 003bfb72ed44c02b4820847f4db817b085030eb2 | [
"MIT"
] | permissive | franklingu/leetcode-solutions | 8895910f13208e1d8e604100d84c2dd35684cde4 | 7ad7e5c1c040510b7b7bd225ed4297054464dbc6 | refs/heads/master | 2023-01-09T01:34:08.097518 | 2023-01-02T02:05:35 | 2023-01-02T02:05:35 | 43,345,677 | 155 | 66 | MIT | 2020-10-02T03:41:36 | 2015-09-29T04:54:38 | Python | UTF-8 | Python | false | false | 1,279 | py | Solution.py | """
A string S of lowercase English letters is given. We want to partition this string into as many parts as possible so that each letter appears in at most one part, and return a list of integers representing the size of these parts.
Example 1:
Input: S = "ababcbacadefegdehijhklij"
Output: [9,7,8]
Explanation:
The... |
3c997f6a2c37d5ec0436619cd4e280df0628457d | 66fc3d58e94e8340a0d825501776a1dea37c0198 | /share/nuke/menu.py | 0ee592654bffd3879367f76766ce8392facd8242 | [
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | AcademySoftwareFoundation/OpenColorIO | dad370b54be147ae94f18ed6414d53bd76e9ef74 | 96f528fdfb7f9fb24388e33f6a968d29a3909cf8 | refs/heads/main | 2023-08-29T08:51:45.625957 | 2023-08-29T01:42:37 | 2023-08-29T01:42:37 | 775,131 | 843 | 236 | BSD-3-Clause | 2023-09-14T02:56:01 | 2010-07-14T18:22:06 | C++ | UTF-8 | Python | false | false | 1,190 | py | menu.py | # SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenColorIO Project.
import os
import nuke
import ocionuke.cdl
def ocio_populate_menu():
"""Adds OCIO nodes to a menu in Color
"""
m_nodes = nuke.toolbar('Nodes')
m_color = m_nodes.findItem("Color")
m_ocio = m_color.addMenu(... |
a63591cbeb175bb53a48b4122b3842d78f3f0f36 | 6b4dbc04e8b2513634e8d25b9f8b69c82c07b6fe | /udsoncan/ResponseCode.py | a91f828cec007c9ee357bcb753d23a2ab1bcf984 | [
"MIT"
] | permissive | pylessard/python-udsoncan | 57c62b59a88907c6a988501c65efa14cfb8153a0 | 1b93cc3cd0e09a21d48881ba53aed257f841bb89 | refs/heads/master | 2023-08-29T21:49:55.403246 | 2023-06-24T15:46:46 | 2023-06-24T15:46:46 | 99,459,987 | 477 | 181 | MIT | 2023-06-30T15:29:30 | 2017-08-06T02:40:37 | Python | UTF-8 | Python | false | false | 7,612 | py | ResponseCode.py | import inspect
from typing import Dict
class ResponseCode:
PositiveResponse = 0
GeneralReject = 0x10
ServiceNotSupported = 0x11
SubFunctionNotSupported = 0x12
IncorrectMessageLengthOrInvalidFormat = 0x13
ResponseTooLong = 0x14
BusyRepeatRequest = 0x21
ConditionsNotCorrect = 0x22
Re... |
33643631f0056ff266d794774538003a2499be45 | 3d589d1c56b55fbd2b45b03564b8a9442ebf142b | /lib/src/klio/metrics/logger.py | 82beba5a49bdd00bc9d640d63a327983cd0edfe6 | [
"Apache-2.0"
] | permissive | spotify/klio | 1aff27412e92c9d699259e5ab1eaeb39dc3e9571 | e625565708ed846201d2e05f782c0ce585554346 | refs/heads/develop | 2023-05-25T14:33:28.348335 | 2022-03-23T20:34:09 | 2022-03-23T20:34:09 | 285,928,366 | 815 | 57 | Apache-2.0 | 2023-05-24T21:07:09 | 2020-08-07T22:02:58 | Python | UTF-8 | Python | false | false | 9,580 | py | logger.py | # Copyright 2019-2020 Spotify AB
#
# 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 writin... |
324e96c848fbdd591dd561e33e3e290ec21acabc | 80f94bea418d7956df1ba19d4d6a1d7715a94ade | /lib/tool_shed/webapp/api/__init__.py | efe9257b639e892e07962787c35df82fd6afc06d | [
"CC-BY-2.5",
"MIT",
"CC-BY-3.0",
"AFL-3.0"
] | permissive | galaxyproject/galaxy | 5748409eb6693b1611f289d164f85e20c3237495 | b9ae7a16ba0465995e880ae9701b7e87226b9bab | refs/heads/dev | 2023-08-28T22:35:51.248138 | 2023-08-26T08:02:33 | 2023-08-26T08:02:33 | 31,211,061 | 1,277 | 1,137 | NOASSERTION | 2023-09-14T19:39:01 | 2015-02-23T14:18:06 | Python | UTF-8 | Python | false | false | 254 | py | __init__.py | from galaxy.webapps.base.controller import BaseAPIController
from tool_shed.structured_app import ToolShedApp
class BaseShedAPIController(BaseAPIController):
app: ToolShedApp
def __init__(self, app: ToolShedApp):
super().__init__(app)
|
082ace2fd8cfb24a3dce74b804c241f93e3db311 | f9f074c44b67a11d4630b5e1cc15e016e8d73cc8 | /factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_settings/exceptions.py | ca7731b690bcab307905bfbde5430a94d769cd68 | [
"MIT"
] | permissive | Azure-Samples/azure-intelligent-edge-patterns | 361694680c7e48d3761c5416175788355b684dcd | 1d2f42cbf9f21157c1e1abf044b26160dfed5b16 | refs/heads/master | 2023-05-26T13:15:47.085088 | 2023-02-28T17:25:53 | 2023-02-28T17:25:53 | 186,706,933 | 193 | 164 | MIT | 2023-02-28T17:25:55 | 2019-05-14T22:02:41 | JavaScript | UTF-8 | Python | false | false | 1,030 | py | exceptions.py | """App exceptions.
"""
from rest_framework.exceptions import APIException
# pylint: disable=line-too-long
class SettingEmptyKeyError(APIException):
"""SettingEmptyKeyError."""
status_code = 400
default_detail = "Setting Key is empty."
default_code = "setting_empty_key_error"
class SettingEmptyEndp... |
6870db2bedce5778bed8d21c65060e708650f99c | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-das/huaweicloudsdkdas/v3/model/__init__.py | c8418cdf820b88e39ad1a6c2e3f0c8199f404016 | [
"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 | 9,070 | py | __init__.py | # coding: utf-8
from __future__ import absolute_import
# import models into model package
from huaweicloudsdkdas.v3.model.advice_result import AdviceResult
from huaweicloudsdkdas.v3.model.api_version import ApiVersion
from huaweicloudsdkdas.v3.model.cancel_share_connections_request import CancelShareConnectionsReques... |
81c855df6cbdde996b6d2a3ae7ed959d11008006 | c6759b857e55991fea3ef0b465dbcee53fa38714 | /utils/bin/binary-size | 8bba5397653227d0d241b165f1818a7f242f41ca | [
"Apache-2.0"
] | permissive | GreenWaves-Technologies/gap_sdk | 1b343bba97b7a5ce62a24162bd72eef5cc67e269 | 3fea306d52ee33f923f2423c5a75d9eb1c07e904 | refs/heads/master | 2023-09-01T14:38:34.270427 | 2023-08-10T09:04:44 | 2023-08-10T09:04:44 | 133,324,605 | 145 | 96 | Apache-2.0 | 2023-08-27T19:03:52 | 2018-05-14T07:50:29 | C | UTF-8 | Python | false | false | 7,210 | binary-size | #!/usr/bin/env python3
import argparse
from subprocess import Popen, PIPE
import re
parser = argparse.ArgumentParser(
description='Report PulpOS footprint'
)
parser.add_argument("--binary", dest="binary", default=None, type=str, help="Specify the input binary")
parser.add_argument("--depth", dest="depth", defaul... | |
b3e395563a7364b4cd138a8ba0496950329ae9b1 | 26004343b9839c082b3df8ecd2b32845ee0b4c7e | /tests/distributions/test_shape_utils.py | 2c2598145b2863581708f67aa475f892e414f01f | [
"Apache-2.0",
"AFL-2.1",
"MIT"
] | permissive | pymc-devs/pymc | b75df84ab084f9fa5d7c8ad927f7fa42fe4af14c | ddd1d4bf05a72895c67265f541585ae02bd338a3 | refs/heads/main | 2023-08-29T19:33:06.631697 | 2023-08-27T22:27:13 | 2023-08-27T22:27:13 | 31,075,313 | 1,046 | 291 | AFL-3.0 | 2020-07-30T17:37:04 | 2015-02-20T17:12:00 | Fortran | UTF-8 | Python | false | false | 25,966 | py | test_shape_utils.py | # Copyright 2023 The PyMC Developers
#
# 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 ag... |
d0de979fde89963bece5abba3dd99e895e916461 | d139ef8d18fcde584b06c1d7d25477d7d31ee59b | /google/ads/googleads/v14/common/types/metric_goal.py | c2909a3efed5f7c8a21b8d1a311687772a23bf1f | [
"Apache-2.0"
] | permissive | googleads/google-ads-python | a53993e6be057d3aa61f276b69e97b8b338d1c12 | 146d7070c1ea2140555d49d73c77892430b37314 | refs/heads/main | 2023-08-31T01:58:16.738997 | 2023-06-05T08:18:42 | 2023-08-28T19:08:38 | 143,435,091 | 422 | 525 | Apache-2.0 | 2023-09-12T17:46:52 | 2018-08-03T14:08:04 | Python | UTF-8 | Python | false | false | 2,025 | py | metric_goal.py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
a33787e8b8a7c20998ce0f9afced3ca94540e238 | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /qt__pyqt__pyside__pyqode/clickable_image/main.py | 85792d283affb06bd8f1daa1df51452c6b5639ce | [
"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 | 549 | py | main.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
from PyQt5 import Qt
app = Qt.QApplication([])
button = Qt.QToolButton()
button.setIcon(Qt.QIcon("img.png"))
button.setAutoRaise(True)
button.setMinimumSize(40, 50)
button.setIconSize(button.minimumSize())
layout = Qt.QVBoxLayout()
layout.add... |
79f2365a8168224bda568ae2ef02af13f4cb8759 | 67efebf179c4ef948a506b5c468ae717c958c8f8 | /chapter7/utils/__init__.py | a7ecb871a41e557a6c93e06d8ff467a8470568a3 | [
"MIT"
] | permissive | miyamotok0105/pytorch_handbook | 9ed1e90f24d4f21452f84c231b880e72b75546d0 | 1a5f1549c4049d819a0f74f3287879c981ec7f6c | refs/heads/master | 2023-03-05T01:39:02.453098 | 2023-02-23T12:44:05 | 2023-02-23T12:44:05 | 150,241,921 | 127 | 68 | MIT | 2023-02-23T12:44:06 | 2018-09-25T09:42:20 | Jupyter Notebook | UTF-8 | Python | false | false | 42 | py | __init__.py | from .augmentations import SSDAugmentation |
e0a326171210d7b89abbca3f3c30b182fe890cf5 | 11cd362cdd78c2fc48042ed203614b201ac94aa6 | /desktop/core/ext-py3/boto-2.49.0/tests/unit/s3/test_key.py | 26e2fc82c943303e938bd3122908957756365ffb | [
"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 | 8,633 | py | test_key.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 restricti... |
ecae0561fa061291b06a515428eb10984b164266 | 52a677b94056d3397b4a499bc9185adb68a63f05 | /util/test/test_workers.py | 6a3e39afc9eb133c77df89dcc5a39d0020bdd92f | [
"Apache-2.0"
] | permissive | quay/quay | 9b6fcff54efc0dbf7c6d91fa80676950555b6f1a | e400a0c22c5f89dd35d571654b13d262b1f6e3b3 | refs/heads/master | 2023-08-28T15:08:38.001842 | 2023-08-28T13:52:31 | 2023-08-28T13:52:31 | 220,517,730 | 2,363 | 322 | Apache-2.0 | 2023-09-14T17:43:48 | 2019-11-08T17:37:05 | Python | UTF-8 | Python | false | false | 2,859 | py | test_workers.py | import pytest
from mock import patch
from util.workers import get_worker_count
@pytest.mark.parametrize(
"kind_name,env_vars,cpu_affinity,multiplier,minimum,maximum,expected",
[
# No override and CPU affinity * multiplier is between min and max => cpu affinity * multiplier.
("registry", {}, [... |
6f2ad449684a736fefe9c9bd820aff9900477ed5 | 019f03d6713a2bc5344b644aeb5ebe70aaf7cfd0 | /tests/unit_tests/save_ckpt_test.py | dcb5208744cff8f9ca64a2c01cb2109187974a1b | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | Deci-AI/super-gradients | 6f52cd15bc2f9f39e3cdc6067292b6512aba5dd0 | 7240726cf6425b53a26ed2faec03672f30fee6be | refs/heads/master | 2023-08-25T17:47:02.595029 | 2023-08-24T11:50:50 | 2023-08-24T11:50:50 | 432,652,408 | 3,237 | 331 | Apache-2.0 | 2023-09-14T11:24:46 | 2021-11-28T07:58:02 | Jupyter Notebook | UTF-8 | Python | false | false | 1,855 | py | save_ckpt_test.py | import unittest
import os
from super_gradients.training import Trainer, models
from super_gradients.training.dataloaders.dataloaders import classification_test_dataloader
from super_gradients.training.metrics import Accuracy, Top5
from super_gradients.common.object_names import Models
class SaveCkptListUnitTest(unitt... |
113493800c86b00e2457fac21821079c3803bf75 | a85c048a4ae820beb2bc265d1845e23842fc8c2a | /learning/pytorch/utils/messages.py | 54e2ca05fc3e701997ac7f327fb89ba504c9bdf4 | [
"MIT"
] | permissive | ithemal/Ithemal | e549856538c7b1f2c50d0f40b51b9bb97baf6379 | b3c39a8942b8b3d92c0fa81815b34fa9b6cbe683 | refs/heads/master | 2021-12-10T11:50:00.058462 | 2021-11-30T16:18:30 | 2021-11-30T16:18:30 | 151,625,735 | 124 | 33 | MIT | 2020-06-26T15:11:01 | 2018-10-04T19:33:52 | Python | UTF-8 | Python | false | false | 457 | py | messages.py | from typing import NamedTuple, Tuple, Union
LossReportMessage = NamedTuple('LossReportMessage', [
('rank', int),
('loss', float),
('n_items', int),
])
EpochAdvanceMessage = NamedTuple('EpochAdvanceMessage', [
('epoch', int),
('n_trainers', int),
])
TrainerDeathMessage = NamedTuple('TrainerDeathMe... |
b40b8cd30034473a33a16823acdccc8a3f4699ef | 7c857119fe1505b1d80d6e62969661c06dc1a2f4 | /BaseTools/Source/Python/Common/MultipleWorkspace.py | ad5d48588b483c9797bc8ee20fe9689d3567e9c1 | [
"BSD-2-Clause"
] | permissive | CloverHackyColor/CloverBootloader | 7042ca7dd6b513d22be591a295e49071ae1482ee | 2711170df4f60b2ae5aa20add3e00f35cf57b7e5 | refs/heads/master | 2023-08-30T22:14:34.590134 | 2023-08-27T19:14:02 | 2023-08-27T19:14:02 | 205,810,121 | 4,734 | 770 | BSD-2-Clause | 2023-09-03T12:41:33 | 2019-09-02T08:22:14 | C | UTF-8 | Python | false | false | 5,042 | py | MultipleWorkspace.py | ## @file
# manage multiple workspace file.
#
# This file is required to make Python interpreter treat the directory
# as containing package.
#
# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
import Common.LongFilePathOs as os
from Com... |
fecfc866247bebd2fa0b38c0e4d1514f34a6b91d | bb71e927dc2429abf551b44874ee990cb3a93f7a | /python/asynchrous_mapping/sync_sleep.py | 790bf59b39179670738df2b2a55c49bd80670947 | [] | no_license | khuyentran1401/Data-science | c37021349bb407ed50d891dab780463e0b243de5 | be59f5959be9f5944e12260fbb4548c85ef6aabe | refs/heads/master | 2023-08-31T13:46:58.212459 | 2023-08-09T15:46:11 | 2023-08-09T15:46:11 | 280,508,180 | 3,809 | 943 | null | 2023-05-23T02:38:37 | 2020-07-17T19:25:27 | Jupyter Notebook | UTF-8 | Python | false | false | 203 | py | sync_sleep.py | from time import sleep
def add_one(x):
print(f"add_one({x})")
sleep(5)
return x + 1
def main(nums=[1, 2, 3]):
return list(map(add_one, nums))
if __name__ == "__main__":
main()
|
89531b3b7a5b2263cc14d625cfa650a531e9267d | 57c5298a3d0dcf656dc7822d6cdd9c2c00ba1f72 | /models/UBNeck.py | 89adf1ad07d0e3eff1f510a7258e83ff314724d7 | [
"BSD-3-Clause"
] | permissive | iArunava/ENet-Real-Time-Semantic-Segmentation | e5830251936fe09b0748913c6ac4c418ff1cc9d3 | 8e3e86c4c4eb8392d72962e393d992294d8fc8ae | refs/heads/master | 2021-06-11T08:34:13.175152 | 2021-04-30T20:50:20 | 2021-04-30T20:50:20 | 165,788,748 | 286 | 79 | BSD-3-Clause | 2020-12-29T06:34:28 | 2019-01-15T05:06:05 | Jupyter Notebook | UTF-8 | Python | false | false | 2,785 | py | UBNeck.py | import torch
import torch.nn as nn
class UBNeck(nn.Module):
def __init__(self, in_channels, out_channels, relu=False, projection_ratio=4):
super().__init__()
# Define class variables
self.in_channels = in_channels
self.reduced_depth = int(in_channels / projection_r... |
07b51a84dbc30ac2c60207aaa9dd9b79658f94e6 | c1b8b6080f29c8037100080298b897618a826475 | /gammapy/maps/wcs/core.py | af558508504348852c180573f942ea1fc5d0b1c3 | [
"BSD-3-Clause"
] | permissive | gammapy/gammapy | a5d7acbdde848e92e124fefbce9716faa296f572 | 60f03adb8fc7851b9f3ca039512c03a669e3fe10 | refs/heads/main | 2023-08-16T21:19:06.624561 | 2023-08-04T12:13:08 | 2023-08-04T12:13:08 | 10,073,640 | 204 | 184 | BSD-3-Clause | 2023-09-14T15:26:05 | 2013-05-15T07:50:40 | Python | UTF-8 | Python | false | false | 10,152 | py | core.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import json
import numpy as np
import astropy.units as u
from astropy.io import fits
from ..core import Map
from ..io import JsonQuantityEncoder, find_bands_hdu, find_hdu
from .geom import WcsGeom
from .io import identify_wcs_format
__all__ = ["WcsMap"]
... |
01dcb6899f437415fa94ae5b1404e65fa20ce10d | 2b39d6f15cb85690c8e6e5c086362916a7df01bd | /graveyard/ngt_utils/mars.py | e726839005760f16603dafe460ef982e021a92be | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | NeoGeographyToolkit/StereoPipeline | 3649ba23fb5a07a8e3f13811a21ba12e0bd6c70a | 80ba3b2a1fc4d5acbd47621ba117852fef6687bf | refs/heads/master | 2023-08-31T02:28:40.247866 | 2023-08-27T03:06:35 | 2023-08-27T03:06:35 | 714,891 | 414 | 124 | Apache-2.0 | 2023-03-09T03:10:29 | 2010-06-11T02:11:55 | C++ | UTF-8 | Python | false | false | 825 | py | mars.py | ## __BEGIN_LICENSE__
## Copyright (C) 2006-2010 United States Government as represented by
## the Administrator of the National Aeronautics and Space Administration
## All Rights Reserved.
## __END_LICENSE__
import math
import lonlat
MARS_MAJOR_RADIUS = 3396200.0
MARS_MINOR_RADIUS = 3376200.0
MARS_G2C_FACTOR = (MARS_... |
7609c8953b73d594a6cf94ee13b01d792bcd17bb | efe44bbc64cf788768d73e35cfb1baa2098181f6 | /mlperf/models/convert_tf_weights.py | 2e0372ee1fed677631e30037744a36ca707d1667 | [
"Apache-2.0"
] | permissive | plaidml/plaidml | d2dd18f8228d3959ec875b66aa4ff31f6c29ef00 | 49fbaa5ac387e621f11ba0b81f49461e4b2d02ef | refs/heads/plaidml-v1 | 2023-08-09T18:38:07.681422 | 2023-07-23T20:15:07 | 2023-07-23T20:15:07 | 100,326,126 | 4,779 | 516 | Apache-2.0 | 2023-02-14T21:33:05 | 2017-08-15T01:43:24 | C++ | UTF-8 | Python | false | false | 3,992 | py | convert_tf_weights.py | import torch
import re
from collections import OrderedDict
def remap_tf_base_names(orig_weights):
prefix = "backbone."
# convs
weights = {k: v for k, v in orig_weights.items() if "FeatureExtractor/MobilenetV1" in k}
convs = {k: v for k, v in weights.items() if "batchnorm" not in k and "pointwise_" n... |
b13fdb5a50432f37e55328597b641f9454c45f9f | 76f23cc69dc10c44bc7cf00b78e37db04c7a9c45 | /datalad/customremotes/ria_remote.py | a11d05e7ccf1fe9e250809c8ff52695dd722a3fe | [
"BSD-3-Clause",
"MIT"
] | permissive | datalad/datalad | 2d9c247344d340325ba84e7ab674ac320e57f30c | 40332b5ad25bf8744f7399f6c3575f7d28f71384 | refs/heads/maint | 2023-09-04T11:03:02.264714 | 2023-08-10T15:56:19 | 2023-08-10T15:56:19 | 14,052,034 | 453 | 134 | NOASSERTION | 2023-09-14T19:10:18 | 2013-11-01T19:40:08 | Python | UTF-8 | Python | false | false | 1,878 | py | ria_remote.py | from datalad.customremotes.main import main as super_main
from datalad.distributed.ora_remote import ORARemote
from datalad.support.annexrepo import AnnexRepo
class DeprecatedRIARemote(ORARemote):
"""This is a shim for backwards compatibility with the old and archived
git-annex-ria-remote, which the current O... |
5eb1d4699c52dce824e02922c240583fce560b33 | 9e891f81f31204e4d4aa3c91ab469ba3cdce059b | /semi/denoise.py | b65833accd80a6bb06bcf22c3f6098c059dc9567 | [] | no_license | haofuml/cyclical_annealing | 0a78e1d1b2845fe37ded6c124db1c12f4db6051c | 6ef4ebabb631df696cf4bfc333a965283eba1958 | refs/heads/master | 2022-11-26T08:32:56.912005 | 2020-10-16T18:22:09 | 2020-10-16T18:22:09 | 177,511,947 | 158 | 20 | null | 2022-11-22T17:30:40 | 2019-03-25T04:04:47 | OpenEdge ABL | UTF-8 | Python | false | false | 3,559 | py | denoise.py | """
Yizhe Zhang
Perturbation to the input
"""
import numpy as np
import os
import scipy.io as sio
from math import floor
import pdb
def add_noise(sents, opt):
if opt.substitution == 's':
sents_permutated= substitute_sent(sents, opt)
elif opt.substitution == 'p':
sents_permutated= permutate_sen... |
d1d562b28669ff2a5cea1aa5dd47d9d9cec0f637 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /api/tests/opentrons/hardware_control/test_api_helpers.py | bc3d161a2d323a9b6573384eaedb69bfea678411 | [
"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 | 1,295 | py | test_api_helpers.py | import pytest
from opentrons.calibration_storage.types import (
SourceType,
CalibrationStatus,
)
from opentrons.hardware_control.util import DeckTransformState
from opentrons.hardware_control.robot_calibration import (
RobotCalibration,
DeckCalibration,
)
@pytest.mark.ot2_only # ot3 attitude is alway... |
d4a0a5f309fe4206c44e6cd50ee2aeb11c329ae3 | d8572b8c1015f62c9eedf2a29b0f2c4277c62903 | /bashhub/bashhub_globals.py | 9d7bf28e413be7ac09d3fba898160674d41d0f1b | [
"Apache-2.0"
] | permissive | rcaloras/bashhub-client | 2ba1f4205513116f6669ac6557e47350e5b862f5 | 043846909d57428a1a30d47fd5f8a727b574e20c | refs/heads/master | 2023-09-03T20:29:37.579652 | 2023-08-26T21:17:34 | 2023-08-26T21:17:34 | 12,858,849 | 1,232 | 98 | Apache-2.0 | 2023-08-26T21:17:51 | 2013-09-16T04:54:15 | Python | UTF-8 | Python | false | false | 2,662 | py | bashhub_globals.py | """
This file should be used for declaring any global variables that need to be
pulled in from environment variables or are just used across multiple files.
"""
import os
import re
import time
import stat
# Support for Python 2 and 3
try:
import configparser
from configparser import NoSectionError, NoOptionEr... |
44d9fdbc8a5fc4619263ed796f0402f2bdf5bd0b | f1973e136f49f0b5ea2ec63c4d862188d197e5a5 | /core/management/commands/_color.py | 4eb8a91e6e0667fbfbe335cdba7b168c3f4fca51 | [
"Apache-2.0"
] | permissive | erigones/esdc-ce | 65dc7d84e1bca3e3fcec668f54acae20183096a2 | 7e3dedddbe821283d909393f333eed4acd452953 | refs/heads/master | 2023-02-07T17:57:15.970089 | 2022-02-03T12:55:14 | 2022-02-03T12:55:14 | 73,122,985 | 123 | 36 | Apache-2.0 | 2023-01-24T23:22:54 | 2016-11-07T21:34:53 | Python | UTF-8 | Python | false | false | 674 | py | _color.py | def _color(code):
# noinspection PyUnusedLocal
def inner(self, text, bold=False):
c = code
if bold:
c = '1;%s' % c
return '\033[%sm%s\033[0m' % (c, text)
return inner
class NoColor(object):
"""
Dummy color function.
"""
# noinspection PyUnusedLocal
d... |
0ec5e72239c8f38dadc473e9a29d10c96376ffa9 | d5a3aa96b30a5a6a355b4e004e494a6ef41a339c | /pudzu/sandbox/markov.py | 7b683a77e9dab248d813bf87b91fc610041517db | [
"MIT"
] | permissive | Udzu/pudzu | 4c1c134503f62fd1cc08a56e257b864033b38561 | df5019802bc32064870f31cda8397ad14868cda0 | refs/heads/master | 2023-07-10T06:16:35.342990 | 2023-07-04T06:28:00 | 2023-07-04T06:28:00 | 97,936,607 | 120 | 28 | MIT | 2021-02-21T16:15:31 | 2017-07-21T10:34:16 | Roff | UTF-8 | Python | false | false | 5,078 | py | markov.py | import argparse
import bisect
import functools
import itertools
import operator as op
import pickle
import random
import string
import sys
import unicodedata
from collections import Counter
# Simple Markov n-gram based generator.
def generate_ngrams(iterable, n):
"""Generator that yields n-grams from a sequence.... |
6d7d0c600de24d6c35139b7687dd06070d31b3b3 | e96889bdfc11b1fefe00b23ca3ef0944f6cce3e6 | /flask-backend/api/models/management.py | 1fc9766ea9a29bb2e40ede5365d6802bdd1153e6 | [
"Apache-2.0"
] | permissive | scorelab/OpenMF | d8decd210bc46336a3a9d4b74d692e32f9946e2e | f26a5d853c783029b626f558ec3b1827c3212cf7 | refs/heads/master | 2023-04-13T13:41:00.787410 | 2022-09-05T07:18:36 | 2022-09-05T07:18:36 | 126,325,350 | 118 | 101 | Apache-2.0 | 2023-07-03T13:10:08 | 2018-03-22T11:30:00 | JavaScript | UTF-8 | Python | false | false | 1,012 | py | management.py | """
Class definition of management user model.
"""
# Importing Depedencies
from api.models.base_user import BaseUser
from api.extansions import db
# Model Class Definition
class Management(BaseUser):
__tablename__="management"
# Property Declaration
id = db.Column(db.Integer, unique=True, primary_key=Tr... |
401ba0fcf25d1ce99971c942c0f8006e76c95dcc | 2337351b228818e41be3002bd38f68f77c2aa074 | /sa/profiles/Alcatel/7324RU/get_interfaces.py | 0aa45de68e0e792c3fc451ca1b72e896f6d6c3f7 | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 5,498 | py | get_interfaces.py | # ----------------------------------------------------------------------
# Alcatel.7324RU.get_interfaces
# ----------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
... |
30303887bbd4d65092c45d339a75269fa779e2a0 | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/1406. Stone Game III/1406-2.py | d9a3a73a474fb155f5a31eedc26a26174c141886 | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 487 | py | 1406-2.py | class Solution:
def stoneGameIII(self, stoneValue: List[int]) -> str:
n = len(stoneValue)
# dp[i] := max "relative score" Alice can make w/ stoneValue[i:]
dp = [-math.inf] * n + [0]
for i in reversed(range(n)):
summ = 0
for j in range(i, i + 3):
if j == n:
break
... |
bbc30a42e95a450be5d30632c0df01afcd02ff99 | 07df6279388a17192eb4e4e417383a1f56208839 | /mmdet3d/models/fusion_layers/point_fusion.py | 97b4177763e7bb0cf4aae9c92016203a6cb2afd2 | [
"Apache-2.0"
] | permissive | HuangJunJie2017/BEVDet | 11d4ca45286739c9bd099f715cb0edc9408a914f | f71858d02eb0fbd09860150ade67558d7984b1be | refs/heads/dev2.1 | 2023-05-23T15:35:45.216750 | 2023-05-07T16:35:04 | 2023-05-07T16:35:04 | 432,979,408 | 985 | 192 | Apache-2.0 | 2023-04-28T15:06:51 | 2021-11-29T09:28:12 | Python | UTF-8 | Python | false | false | 12,265 | py | point_fusion.py | # Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmcv.cnn import ConvModule
from mmcv.runner import BaseModule
from torch import nn as nn
from torch.nn import functional as F
from mmdet3d.core.bbox.structures import (get_proj_mat_by_coord_type,
points_cam2img)... |
94f16eca0ddd298e209160333df40f5518e57064 | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /common/util/remote_base.py | c17253b1c5da3d0265357fb7b8464c0a030fff66 | [
"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 | 2,973 | py | remote_base.py |
import dill
import logging
import urllib.parse
import socket
import traceback
import threading
import multiprocessing
import queue
import time
import json
import abc
import mimetypes
import re
import bs4
import copy
import sys
import base64
import urllib.request
import urllib.parse
import urllib.error
import WebReque... |
ba762ff9c700b4c5168459ff4d14ebde4ff76be2 | 61673ab9a42f7151de7337608c442fa6247f13bb | /__scraping__/nba.com/main.py | 4864c1faec41a89d3af8d6cb9d0cc6af6c4ad08b | [
"MIT"
] | permissive | furas/python-examples | 22d101670ecd667a29376d7c7d7d86f8ec71f6cf | 95cb53b664f312e0830f010c0c96be94d4a4db90 | refs/heads/master | 2022-08-23T23:55:08.313936 | 2022-08-01T14:48:33 | 2022-08-01T14:48:33 | 45,575,296 | 176 | 91 | MIT | 2021-02-17T23:33:37 | 2015-11-04T23:54:32 | Python | UTF-8 | Python | false | false | 1,341 | py | main.py | #!/usr/bin/env python3
# date: 2019.11.19,
# https://stackoverflow.com/questions/58938589/python-scrape-nba-tracking-drives-data
# date: 2020.08.15
import requests
headers = {
'User-Agent': 'Mozilla/5.0',
#'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0',
'Referer': ... |
a553f3af2c137ac5f649e461c108bf146a5144f0 | 9be283dfdcc52d56066dc54743e06c618a7c14ce | /humans/tasks.py | 004c8926d2a8af2746cc53150625fc01b095947a | [
"MIT"
] | permissive | whitesmith/hawkpost | e5dd1d18f5f8197b138720917a4c4e6bc83d96e0 | 6a5b3ac532fbacb603d9daf7364ed963e4d5bfe5 | refs/heads/master | 2023-08-12T17:47:38.058926 | 2023-05-14T20:55:24 | 2023-05-14T20:55:24 | 55,302,159 | 982 | 68 | MIT | 2023-08-07T04:46:35 | 2016-04-02T15:38:13 | Python | UTF-8 | Python | false | false | 4,583 | py | tasks.py | from celery import shared_task
from celery.utils.log import get_task_logger
from django.core.mail import EmailMultiAlternatives
from django.conf import settings
from django.db.models import Q
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
from .models import ... |
46f513d1f69b1db0e113bc6e9c97aa514dd38caf | 9c54b9ea3e9fe208457bf64ad53eba8889f4b057 | /Problem014/Python/solution_slow_1.py | bab288d57bada7296cfbc7991becad102a8a2af2 | [
"MIT"
] | permissive | DestructHub/ProjectEuler | e0d77c02f0646a85d09af64127e92ac907ebad2a | efba582f976cd59748566c19799d84984c77ea61 | refs/heads/master | 2022-12-21T13:08:00.128200 | 2021-10-06T12:47:48 | 2022-12-15T20:33:12 | 36,625,177 | 179 | 87 | MIT | 2022-12-15T20:33:14 | 2015-05-31T22:36:19 | Python | UTF-8 | Python | false | false | 1,164 | py | solution_slow_1.py | #!/usr/bin/env python
# coding=utf-8
# Python Script
#
# Copyleft © Manoel Vilela
#
#
# problem14.py dumb solution (not efficient)
"""
Longest Collatz sequence
Problem 14
The following iterative sequence is defined for the set of positive integers:
n → n/2 (n is even)
n → 3n + 1 (n is odd)
Using the rule above ... |
502a71b200baa128df18c16019d8d5755e78899a | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorWrapLambdaInParentheses_after.py | 387490817aab87d35663fd3e330e419db57df3a3 | [
"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 | 20 | py | percentOperatorWrapLambdaInParentheses_after.py | f'{(lambda: None)}'
|
02fb2a1fd8db20be76f00bafa73f711b266dd59b | 66bc394ad0aeb94298c9b0a0d16812d5408332e9 | /tests/samplers/test_batch.py | 05b0cf0b3a8a8e15f051ba8e98a80464006f29dd | [
"MIT"
] | permissive | microsoft/torchgeo | e058a74ef51ba29aefd6ba8f0eb5e6070db310a7 | 29985861614b3b93f9ef5389469ebb98570de7dd | refs/heads/main | 2023-08-20T01:11:41.549866 | 2023-08-18T22:58:31 | 2023-08-18T22:58:31 | 369,428,935 | 1,724 | 225 | MIT | 2023-09-14T20:33:24 | 2021-05-21T05:58:56 | Python | UTF-8 | Python | false | false | 5,453 | py | test_batch.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
import math
from collections.abc import Iterator
from itertools import product
import pytest
from _pytest.fixtures import SubRequest
from rasterio.crs import CRS
from torch.utils.data import DataLoader
from torchgeo.dataset... |
dbfca3c691fa08ccb8763d3783a35cc4a516097e | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/junos/tests/ShowOspfDatabaseOpaqueArea/cli/equal/golden_output_expected.py | 72ca66a2de838686815f0e0f2233d6bc92676191 | [
"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 | 4,811 | py | golden_output_expected.py | expected_output = {
"ospf-database-information": {
"ospf-area-header": {"ospf-area": "0.0.0.8"},
"ospf-database": [
{
"advertising-router": "10.49.194.125",
"age": "359",
"checksum": "0x6f5d",
"lsa-id": "10.1.0.1",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.