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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10c59f0cd6e1f09c725478e829a1e86b68eb2d07 | c26304a54824faa7c1b34bb7882ee7a335a8e7fb | /flink-python/pyflink/table/tests/test_types.py | d3bd37c6ffd8fa2c08572a6199c4a5f0a9def8dd | [
"BSD-3-Clause",
"OFL-1.1",
"ISC",
"MIT",
"Apache-2.0"
] | permissive | apache/flink | 905e0709de6389fc9212a7c48a82669706c70b4a | fbef3c22757a2352145599487beb84e02aaeb389 | refs/heads/master | 2023-09-04T08:11:07.253750 | 2023-09-04T01:33:25 | 2023-09-04T01:33:25 | 20,587,599 | 23,573 | 14,781 | Apache-2.0 | 2023-09-14T21:49:04 | 2014-06-07T07:00:10 | Java | UTF-8 | Python | false | false | 39,663 | py | test_types.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... |
b7f4020697dfedb5a1021564f4317816092e04f2 | f9587ccd1dbf6b9dcdedc1333db8d05c62c5011b | /utils/constants.py | 206b7a0e4dd421ae227db4090434f4e1d08273ba | [
"MIT"
] | permissive | gordicaleksa/pytorch-learn-reinforcement-learning | 472e9146dec592554c9143746aa8a1b09bacd276 | 26dd439e73bb804b2065969caa5fa5429becfdd5 | refs/heads/main | 2023-04-25T05:19:26.368001 | 2021-05-09T12:01:17 | 2021-05-09T12:01:17 | 355,128,000 | 138 | 26 | null | null | null | null | UTF-8 | Python | false | false | 419 | py | constants.py | import os
BINARIES_PATH = os.path.join(os.path.dirname(__file__), os.pardir, 'models', 'binaries')
CHECKPOINTS_PATH = os.path.join(os.path.dirname(__file__), os.pardir, 'models', 'checkpoints')
DATA_DIR_PATH = os.path.join(os.path.dirname(__file__), os.pardir, 'data')
# Make sure these exist as the rest of the code... |
283e985b3352395a4bd72cc8b571c15aa2f55916 | 274d099df5e08c56de00fe7fade47854a056ab4c | /CI/src/integration_tests/test_mount_hook.py | 66bef3c2f369715822e73576a34078cf51dd7128 | [
"BSD-3-Clause"
] | permissive | eth-cscs/sarus | 95e36bf21c77f2bb822ea0a97dfd7d64a71f6971 | 9c01d76736940feb360175c515e5778e408e631e | refs/heads/master | 2023-08-31T02:33:19.008492 | 2023-05-05T12:09:57 | 2023-05-05T12:09:57 | 160,826,280 | 116 | 11 | BSD-3-Clause | 2023-03-01T13:11:28 | 2018-12-07T13:19:07 | C++ | UTF-8 | Python | false | false | 6,434 | py | test_mount_hook.py | # Sarus
#
# Copyright (c) 2018-2023, ETH Zurich. All rights reserved.
#
# Please, refer to the LICENSE file in the root directory.
# SPDX-License-Identifier: BSD-3-Clause
import unittest
import os
import shutil
import pytest
import common.util as util
class TestMountHook(unittest.TestCase):
"""
These tests ... |
880cf60db35d739f599be62883611d92b352b457 | c3e0a6919caf85c35239ef23084df9bbf8dd61c3 | /pypeit/core/coadd.py | 6a4dd41db9002eef00f4c87fc9a3d2eb8ccd7cae | [
"BSD-3-Clause"
] | permissive | pypeit/PypeIt | 6eb9e5afd62acc9d363e497cd9e367d620f86ea4 | 0d2e2196afc6904050b1af4d572f5c643bb07e38 | refs/heads/release | 2023-08-25T21:15:59.113114 | 2023-06-04T15:23:39 | 2023-06-04T15:23:39 | 36,958,428 | 136 | 98 | BSD-3-Clause | 2023-09-12T17:42:15 | 2015-06-05T22:25:37 | Python | UTF-8 | Python | false | false | 160,195 | py | coadd.py | """
Coadding module.
.. include common links, assuming primary doc root is up one directory
.. include:: ../include/links.rst
"""
import os
import sys
from IPython import embed
import numpy as np
import scipy
import matplotlib.pyplot as plt
from matplotlib.ticker import NullFormatter, NullLocator, MaxNLocator
fr... |
979086e14c7103bcf1f69c16ba439d55d235f28c | b40d1a26ea04a19ec0da7bf55db84b7ee36cc898 | /leetcode.com/python/322_Coin_Change.py | 7a91b618af090bed2cccd08eb2d18a1df784d94b | [
"MIT"
] | permissive | partho-maple/coding-interview-gym | 5e8af7d404c28d4b9b52e5cffc540fd51d8025cf | 20ae1a048eddbc9a32c819cf61258e2b57572f05 | refs/heads/master | 2022-09-11T16:36:01.702626 | 2022-03-14T08:39:47 | 2022-03-14T08:39:47 | 69,802,909 | 862 | 438 | MIT | 2022-08-18T06:42:46 | 2016-10-02T14:51:31 | Python | UTF-8 | Python | false | false | 3,568 | py | 322_Coin_Change.py | import sys
# Top-Down approach. But solution has Excedd the Time Limit
class Solution(object):
def coinChange(self, coins, amount):
"""
:type coins: List[int]
:type amount: int
:rtype: int
"""
if amount < 1:
return 0
numOfCoins = [float('inf') f... |
0a4fc5b1510f25614a3d6b4ab12c8b01588c63b2 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/refactoring/extractmethod/ConditionOfConditionalExpression.before.py | 5df14f415ca9c5d4e57bad98ca3af8d78d809e47 | [
"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 | 65 | py | ConditionOfConditionalExpression.before.py | def f(n):
return n * 2 if <selection>n</selection> else n + 1 |
bb1c0eab206bd2b74ca57865ccfa628088e46ed8 | 5130754859e274cd06f63260439e5203c2000a11 | /core/domain/platform_parameter_domain_test.py | 799fae7124288cde365047d2f87f3877126024da | [
"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 | 74,262 | py | platform_parameter_domain_test.py | # coding: utf-8
#
# Copyright 2020 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... |
f31935407947a2b11d06d6023da684f84852c8d6 | ac2f43c8e0d9649a7f063c59b3dffdfed9fd7ed7 | /tests2/tools/gen_i2c_tree.py | e00c858b223ffb576ffb84f858e6efe729d51dbe | [] | no_license | facebook/openbmc | bef10604ced226288600f55248b7f1be9945aea4 | 32777c66a8410d767eae15baabf71c61a0bef13c | refs/heads/helium | 2023-08-17T03:13:54.729494 | 2023-08-16T23:24:18 | 2023-08-16T23:24:18 | 31,917,712 | 684 | 331 | null | 2023-07-25T21:19:08 | 2015-03-09T19:18:35 | C | UTF-8 | Python | false | false | 4,018 | py | gen_i2c_tree.py | #!/usr/bin/env python3
#
# Copyright 2019-present Facebook. All Rights Reserved.
#
# This program file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; version 2 of the License.
#
# This program is distributed ... |
ed6f8054861ef205eb6dad2f2172d2fe6fe17df7 | 6d54a7b26d0eb82152a549a6a9dfde656687752c | /src/controller/python/py_matter_yamltest_repl_adapter/matter_yamltest_repl_adapter/adapter.py | 916a30ea00385394bb53d9079feebeeaf89a837b | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | project-chip/connectedhomeip | 81a123d675cf527773f70047d1ed1c43be5ffe6d | ea3970a7f11cd227ac55917edaa835a2a9bc4fc8 | refs/heads/master | 2023-09-01T11:43:37.546040 | 2023-09-01T08:01:32 | 2023-09-01T08:01:32 | 244,694,174 | 6,409 | 1,789 | Apache-2.0 | 2023-09-14T20:56:31 | 2020-03-03T17:05:10 | C++ | UTF-8 | Python | false | false | 1,262 | py | adapter.py | # Copyright (c) 2023 Project CHIP 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 ... |
a02c5d6459e0492f901502be70a24baf5e45e6fd | 52245910f830dbfb2b1432ad2a967df7321ee6de | /panel/tests/ui/widgets/test_tabulator.py | bca6ff646a196ff00f205a45e2d1996f4972807b | [
"BSD-3-Clause"
] | permissive | holoviz/panel | 92c19f979353d456512abbce5a027dff6ddb3a5c | 2c6e165e2bba96c0cb97947aa072d4429133cf7a | refs/heads/main | 2023-08-17T11:28:06.581979 | 2023-08-17T11:23:09 | 2023-08-17T11:23:09 | 145,848,899 | 2,544 | 373 | BSD-3-Clause | 2023-09-14T17:13:31 | 2018-08-23T12:14:24 | Python | UTF-8 | Python | false | false | 110,863 | py | test_tabulator.py | from __future__ import annotations
import datetime as dt
import time
import numpy as np
import pandas as pd
import param
import pytest
from bokeh.models.widgets.tables import (
BooleanFormatter, CheckboxEditor, DateEditor, DateFormatter,
HTMLTemplateFormatter, IntEditor, NumberEditor, NumberFormatter,
Sc... |
88b3ca8a90f78716349af3736318385bb68c3ffc | 9ed4d46aedd4d4acadb48d610e940594b5b7b3fd | /project_euler/problem_113/sol1.py | 2077c0fa62f3468a2da5e3606efa937ca0f215dc | [
"CC-BY-NC-4.0",
"CC-BY-NC-SA-4.0",
"MIT"
] | permissive | TheAlgorithms/Python | 7596a0e236ed12a61f9db19a7ea68309779cc85b | 421ace81edb0d9af3a173f4ca7e66cc900078c1d | refs/heads/master | 2023-09-01T17:32:20.190949 | 2023-08-29T13:18:10 | 2023-08-29T13:18:10 | 63,476,337 | 184,217 | 48,615 | MIT | 2023-09-14T02:05:29 | 2016-07-16T09:44:01 | Python | UTF-8 | Python | false | false | 1,872 | py | sol1.py | """
Project Euler Problem 113: https://projecteuler.net/problem=113
Working from left-to-right if no digit is exceeded by the digit to its left it is
called an increasing number; for example, 134468.
Similarly if no digit is exceeded by the digit to its right it is called a decreasing
number; for example, 66420.
We ... |
89a3177aa2884eef02736d30a7c0cb301e34652e | 117aaf186609e48230bff9f4f4e96546d3484963 | /templates/TemplateQmlWidget.py | f8af17db2102fd8c6e8e2012e55c1bf7462009bc | [
"MIT"
] | permissive | eyllanesc/stackoverflow | 8d1c4b075e578496ea8deecbb78ef0e08bcc092e | db738fbe10e8573b324d1f86e9add314f02c884d | refs/heads/master | 2022-08-19T22:23:34.697232 | 2022-08-10T20:59:17 | 2022-08-10T20:59:17 | 76,124,222 | 355 | 433 | MIT | 2022-08-10T20:59:18 | 2016-12-10T16:29:34 | C++ | UTF-8 | Python | false | false | 489 | py | TemplateQmlWidget.py | from PyQt5 import QtCore, QtGui, QtQml
if __name__ == '__main__':
import os
import sys
# sys.argv += ['--style', 'material']
app = QtGui.QGuiApplication(sys.argv)
engine = QtQml.QQmlApplicationEngine()
# engine.rootContext().setContextProperty()
file = os.path.join(os.path.dirname(
... |
2c1e1e102b22c13fca2d72813670425ad133cbf9 | fc01018efee841513e097bd1609a07b0f1c9a6a9 | /scripts/bot/gui.py | 8d1618eec9896efd4c65aad9dfbf882b9629cda9 | [
"Apache-2.0"
] | permissive | baidu/amis | f50c09267a1994448c95b0d3eae48f97a3f9029b | cdaeb01902e73047519b89c7ba82c78d00713f4f | refs/heads/master | 2023-09-05T23:45:28.887028 | 2023-09-04T10:36:20 | 2023-09-04T10:36:20 | 183,874,244 | 15,321 | 2,373 | Apache-2.0 | 2023-09-14T12:38:14 | 2019-04-28T07:42:14 | TypeScript | UTF-8 | Python | false | false | 3,536 | py | gui.py | from vector_store import get_client
from split_markdown import split_markdown
from embedding import get_embedding
import gradio as gr
import os
import pickle
from llm.wenxin import Wenxin, ModelName
from dotenv import load_dotenv
load_dotenv()
chroma_client = get_client()
collection = chroma_client.get_collection(nam... |
bfd459329d25f1178e946f9373cc842822bd1450 | 7ae27ce9a8c477855f8fd5fac54685716d868349 | /invokeai/backend/image_util/__init__.py | 0be5a78a9373bebd2b9e2a53cfed61bcc45467f2 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | invoke-ai/InvokeAI | 5f7a2c1f19b1f686099a8cf4cec85aa9c7b6d81d | 2bd3cf28eabff2dcf3339669be222061dd208cb8 | refs/heads/main | 2023-08-31T07:06:56.721576 | 2023-08-30T19:05:17 | 2023-08-30T19:05:17 | 525,592,995 | 15,987 | 1,678 | Apache-2.0 | 2023-09-14T20:29:39 | 2022-08-17T01:04:27 | TypeScript | UTF-8 | Python | false | false | 770 | py | __init__.py | """
Initialization file for invokeai.backend.image_util methods.
"""
from .patchmatch import PatchMatch # noqa: F401
from .pngwriter import PngWriter, PromptFormatter, retrieve_metadata, write_metadata # noqa: F401
from .seamless import configure_model_padding # noqa: F401
from .txt2mask import Txt2Mask # noqa: F40... |
87a69191ee521c9ffcc50f15d1b1f12d30107294 | 51819802a13fbf4c71ea0f6ee3771b86fcf1834c | /srsly/tests/cloudpickle/cloudpickle_test.py | b293c53f2b2b6c2242fb415c93780ffbdefa6002 | [
"MIT"
] | permissive | explosion/srsly | 1860eda76b79bce49e46a8edeb39828774d1d900 | 1aa4ae1b690b513092ce1e58257427cddf38e97f | refs/heads/master | 2023-08-23T00:56:04.762619 | 2023-07-24T11:40:07 | 2023-07-24T11:40:07 | 159,904,634 | 383 | 43 | MIT | 2023-07-25T12:13:06 | 2018-12-01T03:21:56 | Python | UTF-8 | Python | false | false | 106,164 | py | cloudpickle_test.py | import _collections_abc
import abc
import collections
import base64
import functools
import io
import itertools
import logging
import math
import multiprocessing
from operator import itemgetter, attrgetter
import pickletools
import platform
import random
import re
import shutil
import subprocess
import sys
import tempf... |
675a7556fd424779f2d8106d5b1f29675d79fb38 | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/vm/aaz/latest/capacity/reservation/_list.py | 3834e4a6a90f6db4c0d9d30568596ce320e48c9a | [
"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 | 10,333 | py | _list.py | # --------------------------------------------------------------------------------------------
# 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 aaz-dev-tools
# --------------------------------... |
93444a20ace5ad627fff839d28d96cc87b160b6e | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Keras_tensorflow_nightly/source2.7/tensorflow/contrib/quantize/python/quantize.py | d2d0426d233aaadb4ffd0fb222c77ade0a98278c | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 20,855 | py | quantize.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
1c5102a23d9cc3031a2a16761c880e58fb9fa720 | a61bf859ceeb1ba98de3863225e07b29e1d7ce8a | /thonny/locale/register_updates.py | 9974850ea6dc04564015534d6c062ee29a81e367 | [
"MIT"
] | permissive | thonny/thonny | 3974b1860703e8450b837863682117f525a886c6 | 8fc9f5c7cbbe1d1c82aa5503ec4b684e28aa608c | refs/heads/master | 2023-08-31T03:04:34.685140 | 2023-08-24T11:38:36 | 2023-08-24T11:38:36 | 163,728,962 | 2,788 | 1,048 | MIT | 2023-08-10T18:59:37 | 2019-01-01T10:29:50 | Python | UTF-8 | Python | false | false | 1,554 | py | register_updates.py | import json
import os.path
import polib
import pyperclip
locale_dir = os.path.dirname(__file__)
def register_locale(name: str) -> None:
print(f"Processing {name}")
po_path = os.path.join(locale_dir, name, "LC_MESSAGES", "thonny.po")
po = polib.pofile(po_path)
registered_path = os.path.join(locale_d... |
5855490725f0f94cc7bec638489bf2cd70cdfc40 | 9784a90cac667e8e0aaba0ca599b4255b215ec67 | /gluon/gluoncv2/models/crunet.py | 38409e79421febc9e21ecbadc68e756106494888 | [
"MIT"
] | permissive | osmr/imgclsmob | d2f48f01ca541b20119871393eca383001a96019 | f2993d3ce73a2f7ddba05da3891defb08547d504 | refs/heads/master | 2022-07-09T14:24:37.591824 | 2021-12-14T10:15:31 | 2021-12-14T10:15:31 | 140,285,687 | 3,017 | 624 | MIT | 2022-07-04T15:18:37 | 2018-07-09T12:57:46 | Python | UTF-8 | Python | false | false | 21,164 | py | crunet.py | """
CRU-Net, implemented in Gluon.
Original paper: 'Sharing Residual Units Through Collective Tensor Factorization To Improve Deep Neural Networks,'
https://www.ijcai.org/proceedings/2018/88.
"""
__all__ = ['CRUNet', 'crunet56', 'crunet116']
import os
import math
from mxnet import cpu
from mxnet.gluon imp... |
5f0d1b987c2726efb211cf861c277753d90622a6 | 975b2d421d3661e6770b601929d5f11d981d8985 | /msgraph/generated/models/mobile_app_content_file.py | d487143c68cf245982ab22403f848783c817854b | [
"MIT"
] | permissive | microsoftgraph/msgraph-sdk-python | a7c551b85daadeebf76ec4ae12668664ea639b42 | 27de7ccbe688d7614b2f6bde0fdbcda4bc5cc949 | refs/heads/main | 2023-09-03T21:45:27.989672 | 2023-08-31T06:22:18 | 2023-08-31T06:22:18 | 534,665,999 | 135 | 18 | MIT | 2023-09-14T11:04:11 | 2022-09-09T14:00:17 | Python | UTF-8 | Python | false | false | 4,470 | py | mobile_app_content_file.py | from __future__ import annotations
import datetime
from dataclasses import dataclass, field
from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter
from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union
if TYPE_CHECKING:
from .entity import Entity
from .mobil... |
81c6bac6151560187fa410c73ea06cb74abd7200 | 89420cda57f03791a5448ed4eeb967d06a4aade3 | /arviz/data/converters.py | 2961f0aaf1f35f3ccac1472b024cb8942978f056 | [
"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 | 7,662 | py | converters.py | """High level conversion functions."""
import numpy as np
import xarray as xr
from .base import dict_to_dataset
from .inference_data import InferenceData
from .io_beanmachine import from_beanmachine
from .io_cmdstan import from_cmdstan
from .io_cmdstanpy import from_cmdstanpy
from .io_emcee import from_emcee
from .io_... |
1a8ed51b31b9014c642e0f1a2c2a1d60f7f8b5cd | c2fd38213935cc65cdb6df69aee6960f1c9b2afb | /tests_integration/helpers/get_advertiser_by_name.py | 4b71b33112888988cac031283b1fe67be9f4fcdb | [
"MIT"
] | permissive | kmjennison/dfp-prebid-setup | 5b1cf7fce94f019693c7f024fe1e48df3ab366cf | f17baee334e9b5c9ec70a3b1d3585bd6ca4826fc | refs/heads/master | 2022-10-27T06:13:17.854584 | 2022-10-11T19:50:17 | 2022-10-11T19:50:17 | 83,600,304 | 117 | 92 | MIT | 2023-08-24T21:46:49 | 2017-03-01T20:49:55 | Python | UTF-8 | Python | false | false | 746 | py | get_advertiser_by_name.py | #!/usr/bin/env python
import logging
from googleads import ad_manager
from dfp.client import get_client
def get_advertiser_by_name(advertiser_name):
"""
Returns a DFP company ID from company name.
Args:
name (str): the name of the DFP advertiser
Returns:
an integer: the advertiser's DFP ID
"""
... |
4b5e17d22aef4ab8b3b862d71bb7f423dc8f9c07 | 90e76adae07c81392d64fdfcb95f659e8a0c3f11 | /tests/unit/retries/test_quota.py | 9a735950c382a8a6589e19b9f4540d3b7c3ea397 | [
"Apache-2.0",
"MPL-2.0",
"MIT"
] | permissive | boto/botocore | b9468d08c83372cf6930643a15f87801b79ffddd | 7275c5d6e9273caf3804e0ce9491af080518798c | refs/heads/develop | 2023-09-01T18:11:40.617674 | 2023-08-31T18:58:50 | 2023-08-31T18:58:50 | 6,670,942 | 1,289 | 1,234 | Apache-2.0 | 2023-09-13T17:23:42 | 2012-11-13T13:25:36 | Python | UTF-8 | Python | false | false | 1,289 | py | test_quota.py | from botocore.retries import quota
from tests import unittest
class TestRetryQuota(unittest.TestCase):
def setUp(self):
self.retry_quota = quota.RetryQuota(50)
def test_can_acquire_amount(self):
self.assertTrue(self.retry_quota.acquire(5))
self.assertEqual(self.retry_quota.available_c... |
8660c177c18005e7f04795c095860bd847fe7bd8 | e8e934415e66ff45c22eecd37c3201c64dfd955b | /vocab/wd/test_frames.py | 766d97845f6e3f7036a1c53ecda95194d6431b51 | [] | no_license | w3c/web-annotation | 883156ca37a31e679db32391bba759d442047b0a | 74992e5d3ca3ac10b3289f6c855c876cc9b024a1 | refs/heads/gh-pages | 2021-04-22T06:43:12.205460 | 2017-05-04T09:27:14 | 2017-05-04T09:27:14 | 24,441,429 | 149 | 49 | null | 2017-03-24T10:59:09 | 2014-09-25T02:59:09 | HTML | UTF-8 | Python | false | false | 1,100 | py | test_frames.py | from pyld import jsonld
from pyld.jsonld import compact, expand, frame
import json
import os
contextUri = "http://www.w3.org/ns/anno.jsonld"
contextmap = {
contextUri: "../../jsonld/anno.jsonld"
}
# Stop code from looking up the contexts online EVERY TIME
def load_document_local(url):
doc = {
'contextUrl... |
df1fbcdfce60e7891887c5a323a50726aca2dc5f | 74967d0f8d918b86993a18aa5727753ff841070c | /src/wechaty/user/mini_program.py | 4d6b2466c4e712eb3ef13fb955e6ee7b729b738a | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | wechaty/python-wechaty | 799969661efa70f2b0ba448a80163f685e406e07 | e9a04a98a3b01f287760e2d2a4514e4a80ecd15f | refs/heads/main | 2023-09-05T21:30:49.806145 | 2023-07-15T10:11:02 | 2023-07-15T10:11:02 | 146,103,950 | 1,266 | 239 | Apache-2.0 | 2023-08-16T10:02:57 | 2018-08-25T14:51:18 | Python | UTF-8 | Python | false | false | 3,871 | py | mini_program.py | """
Python Wechaty - https://github.com/wechaty/python-wechaty
Authors: Huan LI (李卓桓) <https://github.com/huan>
Jingjing WU (吴京京) <https://github.com/wj-Mcat>
2020-now @ Copyright Wechaty
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance wit... |
48b4aad10abfa0b6d66406df04ff8acc77d87cad | 3c2ee998c99a693b3b04d44f8c5af0fc5fb2c49d | /migrations/versions/ee5315dcf3e1_.py | e78b03d4747d0dab127be0e272d5eb1f04e5a3f8 | [
"BSD-2-Clause"
] | permissive | hotosm/tasking-manager | 4520a56b31b35ebfc82a337bc7e676f1f8bc946a | 45bf3937c74902226096aee5b49e7abea62df524 | refs/heads/develop | 2023-09-01T02:43:43.875659 | 2023-08-16T21:26:02 | 2023-08-29T13:15:52 | 80,733,077 | 526 | 316 | BSD-2-Clause | 2023-09-14T10:15:55 | 2017-02-02T14:31:35 | JavaScript | UTF-8 | Python | false | false | 1,170 | py | ee5315dcf3e1_.py | """empty message
Revision ID: ee5315dcf3e1
Revises: 9f5b73af01db
Create Date: 2017-05-24 10:39:46.586986
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "ee5315dcf3e1"
down_revision = "9f5b73af01db"
branch_labels = None
depends_on = None
def upgrade():
# ... |
158a761dc20d935cabb85e51622a3f2bbf96820a | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/compiler/tests/einsum_op_test.py | 445420723116e49ab821be0a2218021ca5f9b8c2 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | tensorflow/tensorflow | 906276dbafcc70a941026aa5dc50425ef71ee282 | a7f3934a67900720af3d3b15389551483bee50b8 | refs/heads/master | 2023-08-25T04:24:41.611870 | 2023-08-25T04:06:24 | 2023-08-25T04:14:08 | 45,717,250 | 208,740 | 109,943 | Apache-2.0 | 2023-09-14T20:55:50 | 2015-11-07T01:19:20 | C++ | UTF-8 | Python | false | false | 3,332 | py | einsum_op_test.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
82a930f739e72f6da303b4cfa3f015d7718d3ce3 | 04142fdda9b3fb29fb7456d5bc3e504985f24cbe | /mmcv/ops/three_interpolate.py | 286bd0472ebae83f405534178a19fefe9ffbc384 | [
"Apache-2.0"
] | permissive | open-mmlab/mmcv | 419e301bbc1d7d45331d67eccfd673f290a796d5 | 6e9ee26718b22961d5c34caca4108413b1b7b3af | refs/heads/main | 2023-08-31T07:08:27.223321 | 2023-08-28T09:02:10 | 2023-08-28T09:02:10 | 145,670,155 | 5,319 | 1,900 | Apache-2.0 | 2023-09-14T02:37:16 | 2018-08-22T07:05:26 | Python | UTF-8 | Python | false | false | 2,240 | py | three_interpolate.py | from typing import Any, Tuple
import torch
from torch.autograd import Function
from ..utils import ext_loader
ext_module = ext_loader.load_ext(
'_ext', ['three_interpolate_forward', 'three_interpolate_backward'])
class ThreeInterpolate(Function):
"""Performs weighted linear interpolation on 3 features.
... |
35289967afbb81a7cdcafdebb49bfb5090467759 | 66a9c25cf0c53e2c3029b423018b856103d709d4 | /sleekxmpp/plugins/xep_0045.py | 858b3cbeda840167b52a9d1f4a7e505b084f28a1 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | fritzy/SleekXMPP | 1b02d3e2b22efeb6bf3f8f487e6c0343b9b85baf | cc1d470397de768ffcc41d2ed5ac3118d19f09f5 | refs/heads/develop | 2020-05-22T04:14:58.568822 | 2020-02-18T22:54:57 | 2020-02-18T22:54:57 | 463,405 | 658 | 254 | NOASSERTION | 2023-06-27T20:05:54 | 2010-01-08T05:54:45 | Python | UTF-8 | Python | false | false | 15,689 | py | xep_0045.py | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from __future__ import with_statement
import logging
from sleekxmpp import Presence
from sleekxmpp.plugins import BasePlugin, register_plugin
fr... |
f975f5a6f9bc487f0a6cd1b82b88ebe552ebee21 | 68a76875beffd7636bb6913f8e97b83b1638a3cb | /flaskshop/product/views.py | b1b1e374e3bc835a4960114afda4411c498bd66b | [] | permissive | hjlarry/flask-shop | 57d0d7f4ee82753041bdfbbcdd8c75517cffffc3 | 3ef48ed3b1899438df9ca9ae4a8ca8c722eab1f7 | refs/heads/master | 2023-07-20T07:19:13.168919 | 2023-07-16T09:35:18 | 2023-07-16T09:35:18 | 137,964,415 | 257 | 117 | BSD-3-Clause | 2023-07-16T09:35:19 | 2018-06-20T01:30:23 | Python | UTF-8 | Python | false | false | 2,018 | py | views.py | # -*- coding: utf-8 -*-
"""Product views."""
from flask import Blueprint, jsonify, redirect, render_template, request, url_for
from flask_login import login_required
from pluggy import HookimplMarker
from flaskshop.checkout.models import Cart
from .forms import AddCartForm
from .models import Category, Product, Produ... |
3ab41de242ae496e897c542a35d7dfff6956a6f8 | abe6c00f9790df7e6ef20dc02d0b1b225b5020cb | /src/prefect/server/database/migrations/versions/postgresql/2022_06_29_135432_813ddf14e2de_add_descriptions_to_deployments.py | 20265f886952c08b695e79ef3bbbfc90eeb1fe37 | [
"Apache-2.0"
] | permissive | PrefectHQ/prefect | 000e6c5f7df80f76a181f0a30f8661c96417c8bd | 2c50d2b64c811c364cbc5faa2b5c80a742572090 | refs/heads/main | 2023-09-05T20:25:42.965208 | 2023-09-05T18:58:06 | 2023-09-05T18:58:06 | 139,199,684 | 12,917 | 1,539 | Apache-2.0 | 2023-09-14T20:25:45 | 2018-06-29T21:59:26 | Python | UTF-8 | Python | false | false | 483 | py | 2022_06_29_135432_813ddf14e2de_add_descriptions_to_deployments.py | """Add descriptions to deployments.
Revision ID: 813ddf14e2de
Revises: 2f46fc3f3beb
Create Date: 2022-06-29 13:54:32.981105
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "813ddf14e2de"
down_revision = "2f46fc3f3beb"
branch_labels = None
depends_on = None
def... |
59b3a03ba54fa9bef2ea13101d9b75d687bc0f7c | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /winapi__windows__ctypes/ctypes__MessageBox.py | beaa1d2ec605be422ff76663ae45b6bfef375a87 | [
"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 | 838 | py | ctypes__MessageBox.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
import ctypes
# SOURCE: https://docs.microsoft.com/en-us/windows/desktop/api/Winuser/nf-winuser-messagebox
# int MessageBox(
# HWND hWnd,
# LPCTSTR lpText,
# LPCTSTR lpCaption,
# UINT uType
# );
MessageBox = ctypes.windll.user3... |
e2ff8ff67c0b25d633fa4b7d5245cb51fd44794a | 55c5ebdfa89ba924fe81323de79002d597d5f4c1 | /arraytool/src/misc/Fourier_related.py | 034ecf85171a3c801554ff988a70c69797242c8a | [
"BSD-3-Clause"
] | permissive | zinka/arraytool | 4ce31dc17a25e457974e7220e4024f47f167a051 | 9acc5a90a1771750e70590a3d508e2c24a55be87 | refs/heads/master | 2021-01-18T15:18:56.202570 | 2016-10-22T05:42:27 | 2016-10-22T05:42:27 | 871,685 | 116 | 30 | null | null | null | null | UTF-8 | Python | false | false | 2,017 | py | Fourier_related.py | #! /usr/bin/env python
# Author: Srinivasa Rao Zinka (srinivas . zinka [at] gmail . com)
# Copyright (c) 2014 Srinivasa Rao Zinka
# License: New BSD License.
import numpy as np
from scipy import integrate
def FS(fun_str_re, fun_str_im='0', T0=2 * np.pi, m_start= -5, m_stop=5, err_lim=1e-8):
"""Function to genera... |
dddb5e43d6793a97e9dc12e4ff92f4e97d2dfe10 | 98e36c61361f94c37a909e7c28b5978a232e8748 | /deepgp/inference/svi_ratio.py | 9958c4b6ab338fc43d736ec20a305be7459bf798 | [
"BSD-3-Clause"
] | permissive | SheffieldML/PyDeepGP | 327e8b7ad6496fc523021a070b41eb0d7585aa7d | f2a1f568a7462633a58ed433520dcf7f0c98515c | refs/heads/master | 2023-04-12T11:53:58.712752 | 2021-05-04T14:29:51 | 2021-05-04T14:29:51 | 57,047,931 | 227 | 64 | BSD-3-Clause | 2019-10-08T19:07:50 | 2016-04-25T14:21:54 | Python | UTF-8 | Python | false | false | 7,212 | py | svi_ratio.py |
#from .posterior import Posterior
from GPy.util.linalg import jitchol, backsub_both_sides, tdot, dtrtrs, dtrtri,pdinv
from GPy.util import diag
from GPy.core.parameterization.variational import VariationalPosterior
import numpy as np
from GPy.inference.latent_function_inference import LatentFunctionInference
from GP... |
46e5ebcffc8aa30d6e8a59b1215f9277bc17eda3 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/search/azure-search-documents/tests/async_tests/test_search_indexer_client_live_async.py | 0a59e36daa6fdc4a474f3519b85e8afa0d686dd0 | [
"MIT",
"LicenseRef-scancode-generic-cla",
"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 | 8,005 | py | test_search_indexer_client_live_async.py | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import py... |
5ff9d312895efc0043353f9673e703ba6d1a187a | 974d04d2ea27b1bba1c01015a98112d2afb78fe5 | /test/legacy_test/test_dist_tree_index.py | b336de40cb02296de94e88c650daccef277a6b79 | [
"Apache-2.0"
] | permissive | PaddlePaddle/Paddle | b3d2583119082c8e4b74331dacc4d39ed4d7cff0 | 22a11a60e0e3d10a3cf610077a3d9942a6f964cb | refs/heads/develop | 2023-08-17T21:27:30.568889 | 2023-08-17T12:38:22 | 2023-08-17T12:38:22 | 65,711,522 | 20,414 | 5,891 | Apache-2.0 | 2023-09-14T19:20:51 | 2016-08-15T06:59:08 | C++ | UTF-8 | Python | false | false | 5,876 | py | test_dist_tree_index.py | # Copyright (c) 2020 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... |
e22126b163cfbb7b1ff137d14beb67498c62f84e | 86f3973554eb61b12528835851cbdc96aba9ccc0 | /io_scene_xray/prefs/ops.py | 76bc7ee288dd8937b1447a0683e923be097f1c67 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | PavelBlend/blender-xray | 02d68e424ae9088221bafc1d0d9019690323d9da | a3abb9eb805182eec8ed8de4058dd744aee0e291 | refs/heads/develop | 2023-09-03T15:10:56.022070 | 2023-08-22T17:50:23 | 2023-08-22T17:50:23 | 20,459,902 | 150 | 40 | BSD-2-Clause | 2023-08-10T15:01:24 | 2014-06-03T21:12:53 | Python | UTF-8 | Python | false | false | 1,889 | py | ops.py | # blender modules
import bpy
# addon modules
from . import props
from .. import utils
class XRAY_OT_reset_prefs_settings(utils.ie.BaseOperator):
bl_idname = 'io_scene_xray.reset_preferences_settings'
bl_label = 'Reset All Settings'
def execute(self, context):
prefs = utils.version.get_preference... |
14bcdcbc9211b037794363f441dd96eea5d406d5 | f7fc6aef0330115cc46af1ad7e68f98402bda86c | /src/package-py/02/zipf.py | c004bc8cbb0943448e5259ed4c17e56c1b751c02 | [
"LicenseRef-scancode-other-permissive",
"MIT",
"CC-BY-4.0",
"LicenseRef-scancode-public-domain"
] | permissive | merely-useful/py-rse | 56a55ebbca21bb16a4800b26c000cf903d50874f | f732112a4a6569f08d92eb10d95ab289f22a442f | refs/heads/book | 2023-05-23T03:44:48.319108 | 2021-11-09T21:55:12 | 2021-11-09T21:55:12 | 144,218,444 | 212 | 51 | NOASSERTION | 2021-11-09T21:55:16 | 2018-08-10T00:52:26 | TeX | UTF-8 | Python | false | false | 742 | py | zipf.py | import sys
from pytest import approx
USAGE = '''zipf num [num...]: are the given values Zipfy?'''
RELATIVE_ERROR = 0.05
def make_zipf(length):
assert length > 0, 'Zipf distribution must have at least one element'
result = [1/(1 + i) for i in range(length)]
return result
def is_zipf(hist, rel=RELATIVE_... |
226927449c9371d22851a45b2e650bd054bbbbc7 | 3a50c0712e0a31b88d0a5e80a0c01dbefc6a6e75 | /thrift/test/py/adapter_test.py | 71e81b8607b58e63dd479f11d3d2e263fe9ac74b | [
"Apache-2.0"
] | permissive | facebook/fbthrift | 3b7b94a533666c965ce69cfd6054041218b1ea6f | 53cf6f138a7648efe5aef9a263aabed3d282df91 | refs/heads/main | 2023-08-24T12:51:32.367985 | 2023-08-24T08:28:35 | 2023-08-24T08:28:35 | 11,131,631 | 2,347 | 666 | Apache-2.0 | 2023-09-01T01:44:39 | 2013-07-02T18:15:51 | C++ | UTF-8 | Python | false | false | 3,977 | py | adapter_test.py | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
0f635979a404081e61d0074fbfdd74530d909fd1 | 568910f475177d168c4a0cf7bf2744ad782e37b3 | /docs/source/code_snippets/tg51_class.py | f9f0bedfbfc4f74d78fd15e305d0ee47f9769651 | [
"MIT"
] | permissive | jrkerns/pylinac | 2366304d318d3a274d8236cb9c3fa0245265c5ed | 5c2cfe971f2f6a8d27b0d81159e0f1bacba007b8 | refs/heads/master | 2023-08-13T15:02:07.959095 | 2023-08-08T21:21:26 | 2023-08-08T21:21:26 | 25,171,290 | 129 | 96 | MIT | 2023-09-12T16:58:59 | 2014-10-13T18:17:21 | Python | UTF-8 | Python | false | false | 1,158 | py | tg51_class.py | """A script to calculate TG-51 dose using pylinac classes and following the TG-51 photon form"""
from pylinac.calibration import tg51
ENERGY = 6
TEMP = 22.1
PRESS = tg51.mmHg2kPa(755.0)
CHAMBER = "30013" # PTW
P_ELEC = 1.000
ND_w = 5.443 # Gy/nC
MU = 200
CLINICAL_PDD = 66.5
tg51_6x = tg51.TG51Photon(
unit="True... |
67e44407a01b63a65c613d4c34b3a98e7ca7ce8c | 99fcc34c668b9728fc8488d30774d4dcbb7da6fd | /backend/django/core/migrations/0070_merge_20220727_1406.py | f5f4fcb8c9ab4af61d0ebae16622ffea6afeaffc | [
"MIT"
] | permissive | RTIInternational/SMART | 7ce21daafb94b698bde2147b2859ef791271af8e | cfbb7f001cb1774f9cd6cc9e72b8abdf74cb1323 | refs/heads/master | 2023-09-04T08:12:04.525439 | 2023-04-28T19:30:02 | 2023-04-28T19:30:02 | 150,633,826 | 221 | 35 | MIT | 2023-08-25T19:35:14 | 2018-09-27T18:53:25 | Python | UTF-8 | Python | false | false | 274 | py | 0070_merge_20220727_1406.py | # Generated by Django 3.2.9 on 2022-07-27 14:06
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("core", "0069_externaldatabase_daily_ingest"),
("core", "0069_merge_20220628_1849"),
]
operations = []
|
4fbc3f598e8e992a25a604f865b5c026ede553d7 | ce1c91c33d9b612e97361527e5a974996208c90d | /glue/utils/geometry.py | 2b6ae1dbaf33dea02a6998beddff9b9872baf1b3 | [
"BSD-3-Clause"
] | permissive | glue-viz/glue | 5f52faaf91e1ca4822d3983b6a4b9b60e8807f38 | 1a5c7676c025a1a025068b806f6f90ed53bba543 | refs/heads/main | 2023-09-04T09:24:00.519833 | 2023-08-17T09:40:04 | 2023-08-17T09:40:04 | 1,768,238 | 609 | 149 | NOASSERTION | 2023-09-13T20:56:14 | 2011-05-18T20:58:54 | Python | UTF-8 | Python | false | false | 4,865 | py | geometry.py | import numpy as np
from glue.utils import unbroadcast
__all__ = ['points_inside_poly', 'polygon_line_intersections', 'floodfill', 'rotation_matrix_2d']
def rotation_matrix_2d(alpha):
"""
Return rotation matrix for angle alpha around origin.
Parameters
----------
alpha : float
Rotation a... |
fdb256073de785149322a6ad9b1151fda638591d | 082cb56436631f16585dc6c667a8b384cee3335f | /script/talk/source/t400131.py | 23bdb120d783398fd5ea7bc3f54355f9629c926c | [] | no_license | vawser/Cinders-DS3 | abf2c5e1c163f2e556a0d89e437eead3ddd6992c | d086ebce45b27806f757e04778dad1615e405dab | refs/heads/master | 2023-09-01T00:48:00.500866 | 2023-08-07T12:25:24 | 2023-08-07T12:25:24 | 230,333,994 | 192 | 203 | null | 2022-02-13T21:09:26 | 2019-12-26T22:08:06 | Python | UTF-8 | Python | false | false | 8,702 | py | t400131.py | # -*- coding: utf-8 -*-
def t400131_1():
""" State 0,1 """
assert GetCurrentStateElapsedTime() > 1
""" State 2 """
while True:
call = t400131_x11()
assert IsClientPlayer() == 1
""" State 3 """
call = t400131_x12()
assert not IsClientPlayer()
def t400131_x0(weapon... |
6a7998b6bff821faa26da8742be93c5555a0d681 | 8e6bb9c1a620a162b7d017c2373dd01be54ea86d | /utils/datavzrd/wrapper.py | 4159f810d422c66e9665e9f82036a915c3009798 | [] | no_license | snakemake/snakemake-wrappers | 5d0963502c26eb709513567e25422871fe477cf2 | 996bdcf2a96535b967dfa483c363a5496f4b3906 | refs/heads/master | 2023-08-19T05:18:44.337503 | 2023-08-18T12:03:38 | 2023-08-18T12:03:38 | 213,319,194 | 184 | 189 | null | 2023-09-12T11:38:35 | 2019-10-07T07:20:59 | CAP CDS | UTF-8 | Python | false | false | 373 | py | wrapper.py | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2017, Johannes Köster"
__email__ = "johannes.koester@protonmail.com"
__license__ = "MIT"
from snakemake.shell import shell
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
extra = snakemake.params.get("extra", "")
shell("datavzrd {snakemake.input.conf... |
3160c00532ba5cd31a389acc18b77de1d7b6982b | b08798b5b9b1aefa557fcf5aae2d7fcfc8310f32 | /test/test_vfs.py | 4cd04e21314154617072970c844e58b32ff64a09 | [
"MIT"
] | permissive | beetbox/beets | f0f361fafd57977497e1981f27946fd52d428b27 | 0e5ade4f711dbf563d35c290affb0254eee41235 | refs/heads/master | 2023-09-01T20:50:06.125904 | 2023-08-27T19:07:13 | 2023-08-27T19:07:13 | 827,590 | 8,977 | 1,768 | MIT | 2023-09-13T02:33:14 | 2010-08-09T23:17:20 | Python | UTF-8 | Python | false | false | 1,615 | py | test_vfs.py | # This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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, ... |
50fe7c4fcbc99f7fb154c40dbca78f360c566d5b | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /7_graph/带权图最短路和最小生成树/floyd多源/acwing习题/343. 排序-传递闭包/拓扑排序.py | cbd4c352fe01b7e3f7dd3027a2d9cde1ac8c3fcf | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 577 | py | 拓扑排序.py | # 2≤n≤26
# 变量只可能为大写字母 A∼Z
# 这题拓扑排序也可以
# m次循环,`每次加入一条边到图中`,再跑一遍拓扑排序
# 排序后,排序数组不为n个,则表示有环,矛盾,跳出循环
# 排序后,排序数组为n个,但是在过程中,有2个或以上的点在队列中,表示拓扑序并不唯一,那么此时并不能确定所有点的顺序,因此进行下一次循环
# 排序后,排序数组为n个,且在过程中,队列中一直只有一个,拓扑序唯一,输出结果,跳出循环
|
f23f8f4846575acc3b863d246af13e53e71bf6ef | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/0485. Max Consecutive Ones/0485.py | f9b4afde74425f2b2fce40369d60031e66104484 | [
"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 | 236 | py | 0485.py | class Solution:
def findMaxConsecutiveOnes(self, nums: List[int]) -> int:
ans = 0
summ = 0
for num in nums:
if num == 0:
summ = 0
else:
summ += num
ans = max(ans, summ)
return ans
|
02ce96546a9f47bbd9db499413c27d4370a08251 | 2989f47a57cf23935a159180283463bc92d0ac18 | /tests/learning/test_evaluators.py | 44e4ea6866df933964c5fa39a2b2db8210dc0647 | [
"Apache-2.0"
] | permissive | Rostlab/nalaf | a5d9fa7931242c8b757064da4870a176a6364994 | f266480174107d5c8fbff0f4431b2bb54565907e | refs/heads/develop | 2022-12-13T22:08:56.464434 | 2021-06-02T11:32:07 | 2021-06-02T11:32:07 | 33,038,465 | 112 | 29 | Apache-2.0 | 2022-12-08T05:12:45 | 2015-03-28T15:27:20 | Python | UTF-8 | Python | false | false | 26,003 | py | test_evaluators.py | import unittest
from nalaf.structures.data import Dataset, Document, Part, Entity, Relation
from nalaf.learning.evaluators import Evaluator, MentionLevelEvaluator, DocumentLevelRelationEvaluator
from nalaf.preprocessing.spliters import NLTKSplitter
from nalaf.preprocessing.tokenizers import NLTK_TOKENIZER
STUB_E_ID_1... |
d6bbfc3f90daa01f7a1fb8777f6ff0ac7659e351 | 448bf7d804b6300514c15d43468e591414baead9 | /voila/tornado/handler.py | 13d8756a65bdf318fbaf41ebe9a80ddf354d7ab2 | [
"BSD-3-Clause"
] | permissive | voila-dashboards/voila | f505122f7b7534eb1dbbbfc65e9a14c1cac78ed6 | d52a6486e2b99481c5ca8e2a4ac69fc8d5fb6929 | refs/heads/main | 2023-09-04T19:35:51.729159 | 2023-09-04T09:40:15 | 2023-09-04T09:40:15 | 145,574,616 | 3,930 | 435 | NOASSERTION | 2023-09-14T10:00:24 | 2018-08-21T14:21:42 | Python | UTF-8 | Python | false | false | 919 | py | handler.py | #############################################################################
# Copyright (c) 2018, Voilà Contributors #
# Copyright (c) 2018, QuantStack #
# #
# Distri... |
b6430888af7c233b7c29da2c106d1d9d9ee8c55d | d28eb4c3c4bc8c3e3fa8714a8ee34400cd3b1b65 | /script/deploy_platform.py | 635ee4b52630351eb770e68d52e759942dce266e | [
"Apache-2.0"
] | permissive | JetBrains/skija | 98d0c18a7ca2b9885b4a038db180e63288ae347a | 8581a6c04808c0ada7863aabed9f2a9d77353b39 | refs/heads/master | 2023-08-29T22:47:49.168005 | 2023-08-14T13:50:36 | 2023-08-14T13:50:36 | 253,568,386 | 2,768 | 143 | Apache-2.0 | 2023-08-14T13:50:38 | 2020-04-06T17:25:23 | Java | UTF-8 | Python | false | false | 1,746 | py | deploy_platform.py | #! /usr/bin/env python3
import argparse, build, clean, common, glob, os, platform, revision, subprocess, sys
def main():
parser = argparse.ArgumentParser()
parser.add_argument("--dry-run", action="store_true")
(args, _) = parser.parse_known_args()
# Build
build.main()
# Update poms
rev = revision.revis... |
5e03706e6d4aaf513fd3785b0e555b537b02f9f6 | 92768f2f4c732583d469212c7e1b00a9ab136752 | /rplugin/python/floobits/view.py | 04d360208292d63320129a4fe826314d7d381ff9 | [
"Apache-2.0"
] | permissive | Floobits/floobits-neovim | c02e7ccfcb32c80cd1adece8b1896e3defbe120e | dbfa051e4f097dfa3f46997a2019556a62861258 | refs/heads/master | 2021-11-22T19:23:22.984948 | 2021-10-18T05:48:14 | 2021-10-18T05:48:14 | 26,030,646 | 170 | 11 | Apache-2.0 | 2021-11-03T16:41:50 | 2014-10-31T19:40:06 | Python | UTF-8 | Python | false | false | 8,238 | py | view.py | import editor
from common import msg, utils, shared as G
from collections import defaultdict
vim = None
# Foreground: background
COLORS = (
('white', 'red'),
('black', 'yellow'),
('black', 'green'),
('white', 'blue'),
)
HL_RULES = ['ctermfg=%s ctermbg=%s guifg=%s guibg=%s' % (fg, bg, fg, bg) for fg, ... |
518520c995c6a523a20ed6cd5a2dcedc95234e4f | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-meta/OpenMetadata/ingestion/src/metadata/ingestion/source/dashboard/metabase/metadata.py | 6b8bf78849036a89a9d9ab8a0364c62143bc44b4 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 12,537 | py | metadata.py | # Copyright 2021 Collate
# 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... |
28833bd99ec5db07523c8f1d9a511f0dfb03ace0 | dab10c721000fd9eb38676d6b2730f155eedd54e | /recirq/kpz/experiment.py | 49d0cc5d9a662052e8c30b33d768e0d668417640 | [
"Apache-2.0"
] | permissive | quantumlib/ReCirq | f45e55e432f2e29fb8f2fe35a3d436a629219e86 | d021621a3837693ae9c5fdc5c05058de20fba314 | refs/heads/master | 2023-09-03T19:35:55.281836 | 2023-09-01T01:12:40 | 2023-09-01T01:12:40 | 246,951,354 | 260 | 116 | Apache-2.0 | 2023-09-09T00:41:35 | 2020-03-12T23:51:33 | Python | UTF-8 | Python | false | false | 23,807 | py | experiment.py | # Copyright 2023 Google
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, soft... |
e304c4afec0cf3ab95cb8475a22860871c34973a | c001930958cb94f8b91b1f734108671f1db9e9f1 | /tests/integration/dash/org.py | 9cf7a3aecabadee88b6f638a55fcee4bef0c3408 | [
"MIT"
] | permissive | plotly/dash | 73c752135937e27975071fbd144e3fb21618e7b4 | 6eaf2e17c25f7ca1847c41aafeb18e87c586cb9f | refs/heads/dev | 2023-08-30T21:21:06.056499 | 2023-08-29T16:49:04 | 2023-08-29T16:49:04 | 33,702,544 | 20,553 | 2,355 | MIT | 2023-08-31T20:51:14 | 2015-04-10T01:53:08 | Python | UTF-8 | Python | false | false | 140 | py | org.py | # used implicitly by dash_import_test
# to test https://github.com/plotly/dash/issues/1143
import dash_core_components as dcc # noqa: F401
|
f0968572f50a97d3b31a4f7fe18292b3e7e72488 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-cdk/python/airbyte_cdk/sources/declarative/extractors/__init__.py | 5c361598d351d2508a8d64eb6fe476b7f14deb30 | [
"MIT",
"Elastic-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 478 | py | __init__.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
from airbyte_cdk.sources.declarative.extractors.dpath_extractor import DpathExtractor
from airbyte_cdk.sources.declarative.extractors.http_selector import HttpSelector
from airbyte_cdk.sources.declarative.extractors.record_filter import RecordFilter
from air... |
7e74f16b6489e386bc86b71abfc67dc4e366643d | c5d140c4e6ba0c98c34a76048a819bca84f30026 | /docs/code.py | e8cc92763944bf89e4c915a0f6dded959527c73f | [
"MIT"
] | permissive | tadeuzagallo/verve-lang | 76af344ed1a5f17de244cbddbe17767f99870837 | c7db1f5d4bb399b6c2623dd2444a981b5aba1aa4 | refs/heads/master | 2021-12-03T06:09:56.044643 | 2021-11-30T02:18:36 | 2021-11-30T02:18:36 | 54,283,802 | 378 | 12 | MIT | 2018-01-10T21:31:29 | 2016-03-19T19:37:51 | Haskell | UTF-8 | Python | false | false | 936 | py | code.py | import cgi
from docutils import nodes
from docutils.parsers.rst import Directive, directives
class code_node(nodes.Structural, nodes.Element):
pass
class CodeDirective(Directive):
has_content = True
required_arguments = 1
optional_arguments = 0
final_argument_whitespace = False
option_spec = {... |
804002f2e3202eda04c364e2fa2010fdea5f1ea2 | b04cc98a746d1df457183bc14908094a8be00ba1 | /demo/models/__init__.py | 4c9deb0855393b41c7cd55046fd8ff7992513f2f | [
"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 | 737 | py | __init__.py | from __future__ import absolute_import
from .mobilenet import MobileNet
from .resnet import ResNet34, ResNet50
from .resnet_vd import ResNet50_vd, ResNet101_vd
from .mobilenet_v2 import MobileNetV2_x0_25, MobileNetV2
from .pvanet import PVANet
from .slimfacenet import SlimFaceNet_A_x0_60, SlimFaceNet_B_x0_75, SlimFaceN... |
4cb990acec9eea0be3f056bcdfb00b4ca523f522 | e7e536df0263ae2a7ac44ef30f19110f891213a9 | /src/tests/schedule/test_schedule_models_slot.py | c0a9ac506d20b8ac6674edb6b3936a6c869a5081 | [
"Apache-2.0"
] | permissive | pretalx/pretalx | b3b3808266f4810dfc8445dc1ed33ba398e7a9c2 | 269dce90a6fb1ce0064008c40ce5dd4dad61e2e3 | refs/heads/main | 2023-09-05T11:09:23.538325 | 2023-09-04T19:57:47 | 2023-09-04T19:57:47 | 83,081,285 | 563 | 195 | Apache-2.0 | 2023-09-13T19:12:28 | 2017-02-24T20:46:51 | Python | UTF-8 | Python | false | false | 3,735 | py | test_schedule_models_slot.py | import datetime as dt
import pytest
from django.utils.timezone import now
from django_scopes import scope
from pretalx.schedule.models import TalkSlot
@pytest.mark.django_db
@pytest.mark.parametrize(
"start,end,duration,has_submission",
(
(None, None, "sub", True),
(0, None, "sub", True),
... |
25aa7e4c9acec1226445a5133279a2875845e1ce | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/braintree/braintree/disbursement.pyi | fc4634d3eedf8d3c0cd4cf5ff86ce291ee9a7ad9 | [
"Apache-2.0",
"MIT"
] | 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 | 504 | pyi | disbursement.pyi | from typing import Any
from braintree.merchant_account import MerchantAccount as MerchantAccount
from braintree.resource import Resource as Resource
from braintree.transaction_search import TransactionSearch as TransactionSearch
class Disbursement(Resource):
class Type:
Credit: str
Debit: str
... |
b4b3d692e9af7c0de03b9a3cb31c7843ecd766d8 | 077ad1330f77172a59c7e7621c72bb653d9ff40a | /gfauto/gfauto/recipe_pb2.pyi | 463f04b8c74e4a37250c4ec8d38a6ded84e4581a | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google/graphicsfuzz | 48e82803e0354c4a92dc913fe36b8f6bae2eaa11 | aa32d4cb556647ddaaf2048815bd6bca07d1bdab | refs/heads/master | 2023-08-22T18:28:49.278862 | 2022-03-10T09:08:51 | 2022-03-10T09:08:51 | 150,133,859 | 573 | 155 | Apache-2.0 | 2023-09-06T18:14:58 | 2018-09-24T16:31:05 | Java | UTF-8 | Python | false | false | 3,045 | pyi | recipe_pb2.pyi | # @generated by generate_proto_mypy_stubs.py. Do not edit!
import sys
from gfauto.common_pb2 import (
ArchiveSet as gfauto___common_pb2___ArchiveSet,
)
from google.protobuf.descriptor import (
Descriptor as google___protobuf___descriptor___Descriptor,
FileDescriptor as google___protobuf___descriptor___Fil... |
72524f60253a4cc9792e52737b0d2cc2da6219c6 | d1c2d00078520cd556f60b7213c27856f8b3460d | /sdks/python/apache_beam/runners/direct/consumer_tracking_pipeline_visitor.py | 2a6fc3ee6093496d16b66b8b5ef3ea4ac85fe412 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-protobuf",
"Apache-2.0",
"Python-2.0"
] | permissive | apache/beam | ed11b9e043465c720659eac20ac71b5b171bfa88 | 6d5048e05087ea54abc889ce402ae2a0abb9252b | refs/heads/master | 2023-09-04T07:41:07.002653 | 2023-09-01T23:01:05 | 2023-09-01T23:01:05 | 50,904,245 | 7,061 | 4,522 | Apache-2.0 | 2023-09-14T21:43:38 | 2016-02-02T08:00:06 | Java | UTF-8 | Python | false | false | 2,709 | py | consumer_tracking_pipeline_visitor.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
ba4465c9d5d77d325386e2a050f1c832a4cdad2c | c1ff870879152fba2b54eddfb7591ec322eb3061 | /plugins/languageAPI/jsAPI/3rdParty/nbind/src/nbind.gypi | 49c9f42f40044c6e77b5d864e86eaec9454bb776 | [
"LicenseRef-scancode-free-unknown",
"MIT"
] | permissive | MTASZTAKI/ApertusVR | 1a9809fb7af81c3cd7fb732ed481ebe4ce66fefa | 424ec5515ae08780542f33cc4841a8f9a96337b3 | refs/heads/0.9 | 2022-12-11T20:03:42.926813 | 2019-10-11T09:29:45 | 2019-10-11T09:29:45 | 73,708,854 | 188 | 55 | MIT | 2022-12-11T08:53:21 | 2016-11-14T13:48:00 | C++ | UTF-8 | Python | false | false | 2,075 | gypi | nbind.gypi | {
"variables": {
"asmjs%": 0
},
"target_name": "nbind",
"type": "loadable_module",
"sources": [
"common.cc",
"reflect.cc"
],
"include_dirs": [
"../include"
],
"conditions": [
['asmjs==1', {
"product_name": "nbind.js",
"type": "executable",
"sources": [ "em/Binding.cc" ],
"l... |
4e598ab69b3f94051f5c3ff8839ee8daf6db7c0f | 0f3125015ab1f484d22ff77705e464f1ff844370 | /projects/causal_scene_generation/causal_model/game_characters/vae_svi/utils/game_character_dataloader.py | d2465abb0c96e0b7c590ed9497ef053eac66a6cc | [
"MIT"
] | permissive | altdeep/causalML | 8498ff2abc38b992593c1ae9e96a9652ba2ae9d7 | 06c825c30b56a13d2092be2df7e06dbfc2f54cdb | refs/heads/master | 2023-08-22T03:51:55.707797 | 2023-08-15T17:50:41 | 2023-08-15T17:50:41 | 162,078,689 | 318 | 78 | MIT | 2023-07-20T13:37:09 | 2018-12-17T05:22:47 | Jupyter Notebook | UTF-8 | Python | false | false | 4,239 | py | game_character_dataloader.py | import os
import torch
import pandas as pd
import numpy as np
from PIL import Image
from torch.utils.data import Dataset, DataLoader ,random_split
from torchvision import datasets ,models , transforms
from torch import nn
import torch.nn.functional as F
from functools import reduce
def split_tensor(idx, sample, length... |
517c7db8f6a25b1d0f71e488d66811a587e3348c | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-quality/soda-core/soda/core/soda/sodacl/antlr/SodaCLAntlrVisitor.py | 3c4bfd4d808d35e803803fd89cedf190e90d14ad | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 8,712 | py | SodaCLAntlrVisitor.py | # Generated from /Users/vijay/work/soda/code/soda-core/soda/core/soda/sodacl/antlr/SodaCLAntlr.g4 by ANTLR 4.11.1
from antlr4 import *
if __name__ is not None and "." in __name__:
from .SodaCLAntlrParser import SodaCLAntlrParser
else:
from SodaCLAntlrParser import SodaCLAntlrParser
# This class defines a compl... |
bf0121bddb63ed61a74523b05ffc06b3ee6b4176 | b2bcf07493b5a1bbfb7e29c7f13ac0b380cefead | /deprecated/scripts/ica_demo_uniform.py | 0213484484ff108ff8f4fdfcf4ce5c7f8c341924 | [
"MIT"
] | permissive | probml/pyprobml | e1952927bceec676eb414f9342470ba4b8e6703b | 9cc22f3238ae092c2b9bff65d6283c93d38d25d4 | refs/heads/master | 2023-08-31T07:36:11.603301 | 2023-08-13T02:47:12 | 2023-08-13T02:47:12 | 65,924,871 | 6,263 | 1,598 | MIT | 2023-01-20T23:34:23 | 2016-08-17T16:42:24 | Jupyter Notebook | UTF-8 | Python | false | false | 1,264 | py | ica_demo_uniform.py | # Comparing ICA and PCA on data from a 2d uniform distribution
# Author : Aleyna Kara
# This file is based on https://github.com/probml/pmtk3/blob/master/demos/icaDemoUniform.m
import superimport
from sklearn.decomposition import PCA, FastICA
import numpy as np
import matplotlib.pyplot as plt
import pyprobml_utils as... |
217c4077a32ac64f55b3bd2fa8e9308f7a643385 | e5e0d729f082999a9bec142611365b00f7bfc684 | /tensorflow/contrib/model_pruning/python/layers/rnn_cells_test.py | 586c6c7bfcbd188fc6fca4a9accbe0e5533c90c7 | [
"Apache-2.0"
] | permissive | NVIDIA/tensorflow | ed6294098c7354dfc9f09631fc5ae22dbc278138 | 7cbba04a2ee16d21309eefad5be6585183a2d5a9 | refs/heads/r1.15.5+nv23.03 | 2023-08-16T22:25:18.037979 | 2023-08-03T22:09:23 | 2023-08-03T22:09:23 | 263,748,045 | 763 | 117 | Apache-2.0 | 2023-07-03T15:45:19 | 2020-05-13T21:34:32 | C++ | UTF-8 | Python | false | false | 3,613 | py | rnn_cells_test.py | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
1141ee781f35cb009f1124dd059214817d297925 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/escea/discovery.py | 0d7f3024bfc2254f297d6a73bb4825d583073003 | [
"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,469 | py | discovery.py | """Internal discovery service for Escea Fireplace."""
from __future__ import annotations
from pescea import (
AbstractDiscoveryService,
Controller,
Listener,
discovery_service as pescea_discovery_service,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.dispatcher import asyn... |
29226e5956f063d18d6e5fde7ad19b65eeb5a7a7 | ffd5befd5ac5cc31b8ee41cb0992c1ad33c101f3 | /stacker/blueprints/variables/types.py | 53e20a9b852f45668f449e277b9be350b444ee75 | [
"BSD-2-Clause"
] | permissive | cloudtools/stacker | 53334320b858a83a4b9f130902cca6805e4c6549 | b357f83596e0f2044a147553ac4fbc16fe3ef97c | refs/heads/master | 2023-08-28T21:55:41.064554 | 2023-08-15T16:22:56 | 2023-08-15T16:22:56 | 28,885,080 | 396 | 104 | BSD-2-Clause | 2023-08-15T16:22:58 | 2015-01-06T21:46:05 | Python | UTF-8 | Python | false | false | 8,785 | py | types.py |
class TroposphereType(object):
def __init__(self, defined_type, many=False, optional=False,
validate=True):
"""Represents a Troposphere type.
:class:`Troposphere` will convert the value provided to the variable to
the specified Troposphere type.
Both resource an... |
c2d175830a1bcad21e63ba9075acc2bb49beed83 | 977f7a7386899a5d0152b29b57ec26682b430437 | /tools/tbl2gff3/tbl2gff3.py | 29c622e8e93222e1e23cca18c8baf0e74a0460c2 | [
"GPL-3.0-only",
"MIT"
] | permissive | galaxyproject/tools-iuc | 0b87e21e1cb075ca6dc6b12622bc4e538a7c6507 | 96f8a533278b4b6394aebd7a8f537513b0d29b1a | refs/heads/main | 2023-08-31T16:14:34.563541 | 2023-08-31T04:31:22 | 2023-08-31T04:31:22 | 23,992,530 | 164 | 508 | MIT | 2023-09-13T19:41:14 | 2014-09-13T11:18:49 | HTML | UTF-8 | Python | false | false | 2,986 | py | tbl2gff3.py | #!/usr/bin/env python
import argparse
import collections
import csv
import sys
from BCBio import GFF
from Bio.Seq import Seq
from Bio.SeqFeature import FeatureLocation, SeqFeature
from Bio.SeqRecord import SeqRecord
def c(row, v, default=None):
if v is None:
return default
try:
_ = int(v)
... |
d64d3ef95a878a152653353d4c08a4245aa6f714 | 3395a234e7c80d011607e79c49cd48bf516f256b | /dependencies/jedi/inference/compiled/__init__.py | b5d435fc4e2f3802928043ee3f809ab1829bcbcb | [
"MIT"
] | permissive | srusskih/SublimeJEDI | 67329b72e184bc9584843968dcc534a002c797a1 | 95c185d778425c04536d53517b0e3fe6dedf8e59 | refs/heads/master | 2023-08-24T11:30:37.801834 | 2022-08-30T09:04:17 | 2022-08-30T09:04:17 | 6,241,108 | 669 | 125 | MIT | 2022-08-30T09:04:18 | 2012-10-16T08:23:57 | Python | UTF-8 | Python | false | false | 2,590 | py | __init__.py | from jedi._compatibility import unicode
from jedi.inference.compiled.value import CompiledValue, CompiledName, \
CompiledValueFilter, CompiledValueName, create_from_access_path
from jedi.inference.base_value import LazyValueWrapper
def builtin_from_name(inference_state, string):
typing_builtins_module = infer... |
09c3e033224070c58ab14e0d39e2c73effa625b1 | 9b1a345a2377bbac949856f2aac8947ab2e26205 | /tests/unit-tests/mocks/gdblib.py | 0d5fdf71b19372e557035ce3bef30b029d8e893d | [
"MIT"
] | permissive | pwndbg/pwndbg | 4577c02d213fa347891d7e0f5415beb2a497c002 | f642efbd92e30c7b892b5e816d353cc5a03e5cb5 | refs/heads/dev | 2023-08-31T10:48:45.172197 | 2023-08-27T09:55:46 | 2023-08-27T10:12:02 | 31,181,767 | 5,954 | 1,080 | MIT | 2023-09-11T11:03:02 | 2015-02-22T21:35:19 | Python | UTF-8 | Python | false | false | 1,012 | py | gdblib.py | from __future__ import annotations
import sys
import types
from unittest.mock import MagicMock
from mocks.arch import Amd64Arch
from mocks.config import Config
from mocks.typeinfo import Amd64TypeInfo
class GdbLib(types.ModuleType):
def __init__(self, module_name):
super().__init__(module_name)
... |
36838f739fbad35a7970639f2d9c3d6cd4bd95e2 | 767b09cdf51803d533ebb5906042ed1f92f91a7c | /tests/lm/modules/token_embedders/bidirectional_lm_test.py | 2151baafaa3ea2e80e47ee3331c781d1c1135933 | [
"Apache-2.0"
] | permissive | allenai/allennlp-models | e93bb3b084e99e211d5ebb515b765de117e41970 | b1f372248c17ad12684d344955fbcd98e957e77e | refs/heads/main | 2023-09-05T01:57:37.434101 | 2022-11-24T00:06:05 | 2022-11-24T00:06:05 | 246,170,605 | 520 | 172 | Apache-2.0 | 2022-11-24T00:06:06 | 2020-03-10T00:22:21 | Python | UTF-8 | Python | false | false | 911 | py | bidirectional_lm_test.py | from tests import FIXTURES_ROOT
from tests.lm.modules.token_embedders.language_model_test import TestLanguageModelTokenEmbedder
class TestBidirectionalLanguageModelTokenEmbedder(TestLanguageModelTokenEmbedder):
def setup_method(self):
super().setup_method()
self.set_up_model(
FIXTURES_... |
26d4a54dba1da8255e067b19957ad060d125b831 | b8d80a23cb27af08a1c4d34b478c76228ae5fbb4 | /insights/parsers/initscript.py | 863e310a89fc6ef323ddb0f632460d28ee6ad401 | [
"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 | 3,456 | py | initscript.py | """
InitScript - files ``/etc/rc.d/init.d/*``
=========================================
InitScript is a parser for the initscripts in ``/etc/rc.d/init.d``.
Because this parser read multiple files, the initscripts are stored as a list
within the parser and need to be iterated through in order to find specific
initscri... |
dc39f36d442bf78f5b575b2a2ea63c44fd19bf58 | 2c6e9374fe1216a99d833354213ca676407e1197 | /mqtt_as/esp32_gateway/gwconfig.py | 8e1293f9d3bab9e90cb62893fe7850bfe1461421 | [
"MIT"
] | permissive | peterhinch/micropython-mqtt | 7729d2b00ad2e41440fe278a0aec938537edebf8 | 041b0213caee0d990cb0eb454b9e627bf515edde | refs/heads/master | 2023-09-01T08:37:26.372051 | 2023-08-24T09:52:42 | 2023-08-24T09:52:42 | 94,690,722 | 456 | 118 | MIT | 2023-02-03T14:54:07 | 2017-06-18T14:00:48 | Python | UTF-8 | Python | false | false | 967 | py | gwconfig.py | # gwconfig.py Config file for ESPNow gateway
from collections import namedtuple, defaultdict
PubIn = namedtuple('PubIn', 'topic qos') # Publication to gateway/nodes from outside
PubOut = namedtuple('PubOut', 'topic retain qos') # Publication by gateway
gwcfg = defaultdict(lambda : None)
# Mandatory keys
gwcfg["deb... |
8b134c9bf252998443a7424f17256cf119944f7c | 1c790b0adc648ff466913cf4aed28ace905357ff | /model_zoo/jag_utils/python/sanity.py | 01f5c7e9636e8ed30a3755a6074ddfd87397b9f1 | [
"Apache-2.0"
] | permissive | LLNL/lbann | 04d5fdf443d6b467be4fa91446d40b620eade765 | e8cf85eed2acbd3383892bf7cb2d88b44c194f4f | refs/heads/develop | 2023-08-23T18:59:29.075981 | 2023-08-22T22:16:48 | 2023-08-22T22:16:48 | 58,576,874 | 225 | 87 | NOASSERTION | 2023-09-11T22:43:32 | 2016-05-11T20:04:20 | C++ | UTF-8 | Python | false | false | 4,409 | py | sanity.py | #!/usr/tce/bin/python
'''
quick script to test that sample lists generated by build_trainer_lists.py
contain unique indices.
usage: sanity.py id_mapping_fn bar_fn t0_fn [t1_fn, ...]
'''
import sys
if len(sys.argv) == 1 :
print '''
usage: sanity.py id_mapping_fn sample_list_dir sample_list_base_name num_sampl... |
f559846f0c5383ee2f163ed85d151ef98e0741da | f623b9536e91b7f2e4303e3f59a012432c3eef44 | /tests/test_archive.py | 637800b76a0fe2ee1e54ea08b68fb1ecdde38c63 | [
"MIT"
] | permissive | ezbz/gitlabber | 511480e8181127c0decf7143763ac614f3011e21 | 15e5c011c65ae4b92bf2ef3e9e84f14cd1fc21fc | refs/heads/master | 2023-08-21T14:55:54.238535 | 2023-06-18T09:19:39 | 2023-06-18T09:19:39 | 255,058,951 | 451 | 78 | MIT | 2023-09-06T18:27:30 | 2020-04-12T10:31:58 | Python | UTF-8 | Python | false | false | 688 | py | test_archive.py | from gitlabber.archive import ArchivedResults
import pytest
import re
def test_archive_parse():
assert ArchivedResults.INCLUDE == ArchivedResults.argparse("include")
def test_archive_string():
assert "exclude" == ArchivedResults.__str__(ArchivedResults.EXCLUDE)
def test_repr():
retval = repr(ArchivedResu... |
bf88a8c0cbdbfd02a53d6976764ad768bec4c668 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/es/tests/test_esqueryset.py | e9cad4658dfac52a739f39b22f95f3bff7cd7aaa | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 3,830 | py | test_esqueryset.py | from unittest import TestCase, skipIf
from django.conf import settings
from corehq.apps.es.es_query import ESQuerySet, HQESQuery
from corehq.apps.es.tests.utils import es_test
from corehq.elastic import ESError
@es_test
class TestESQuerySet(TestCase):
example_response = {
'_shards': {'failed': 0, 'succes... |
c218b3ad6665c0b85a37259689647332578a2178 | 4ae34a5179d7adf1037eb9a3cb249f9a5c06684e | /cmd/metricscollector/v1beta1/tfevent-metricscollector/main.py | 29c95849bff7a1707d60ce351282fba8f33cb91f | [
"Apache-2.0"
] | permissive | kubeflow/katib | 367373c0452d49a7a115b86893f4dab9e1f278ea | e3e0aa24aeea1edfab0fd42f55392af651d2b3ae | refs/heads/master | 2023-09-04T05:02:05.752156 | 2023-08-24T22:40:54 | 2023-08-24T22:40:54 | 127,941,481 | 1,385 | 422 | Apache-2.0 | 2023-09-14T13:17:29 | 2018-04-03T17:07:12 | Go | UTF-8 | Python | false | false | 3,132 | py | main.py | # Copyright 2022 The Kubeflow 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 ... |
c3ad30793e917280d2908ec08495ab097a0d9291 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Geometry/RPCGeometry/test/rpcgeo2.py | bf88e43458466c257b5be145dba4853abd865917 | [
"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 | 517 | py | rpcgeo2.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("Demo")
process.load("Geometry.MuonCommonData.muonIdealGeometryXML_cfi")
process.load("Geometry.RPCGeometry.rpcGeometry_cfi")
process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi")
process.maxEvents = cms.untracked.PSet(
input = cms.... |
8f9284e02e2f675cd4bfdd754c230275f262ff58 | 86092e7c45eeb677576edab301cebb592a8baa31 | /anycastcheck.py | 71621efa596323521963a04660f2c267008cbf2f | [] | no_license | RIPE-Atlas-Community/ripe-atlas-community-contrib | 73b745aec4845452ba7eaa30932e7bee934171e8 | 2fb7d7e8143ee3884d0ad556612ba759ee414955 | refs/heads/master | 2023-06-08T18:13:14.845089 | 2023-06-06T14:08:08 | 2023-06-06T14:08:08 | 8,092,696 | 144 | 31 | null | 2021-11-25T14:15:35 | 2013-02-08T11:52:59 | Python | UTF-8 | Python | false | false | 5,742 | py | anycastcheck.py | #!/usr/bin/env python
#
# https://atlas.ripe.net/contrib/root_anycast.json?msm_id=1&af=6&qst=IS
# https://atlas.ripe.net/contrib/root_anycast.json?msm_id=1&af=4&qst=IS
#
# http://www.infornografia.net/atlas/anycastcheck.html
# http://www.infornografia.net/atlas/anycastcheck.kml
#
# UNK/UNK -> invalid
# inst4 = inst6 ->... |
c28d138366be0150354cf48683293c1102125967 | 6fd2ab69501d71844a7329f62a3e62718fe9a9dd | /tests/test_fast_scan_ivf.py | 5a57a39ca9d53282ea68d29b109a477e2b4e6adf | [
"MIT"
] | permissive | facebookresearch/faiss | f6a7b9df838309e8a231653df2dc764ef43d355e | 9dc75d026d25b340771a7ef5d99b0f81a0dc5e34 | refs/heads/main | 2023-09-02T15:12:01.311542 | 2023-09-01T14:06:14 | 2023-09-01T14:06:14 | 81,227,005 | 24,723 | 3,437 | MIT | 2023-09-14T20:41:39 | 2017-02-07T16:07:05 | C++ | UTF-8 | Python | false | false | 26,274 | py | test_fast_scan_ivf.py | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import unittest
import tempfile
import numpy as np
import faiss
from faiss.contrib import datasets
from faiss.contrib.inspect_too... |
06f172396b3314995ad3e352e29118a7d059a82c | e145f05e919cad040c23587eadd11bed1e6bd5e8 | /test/functional/feature_evm_transferdomain.py | 4f3f763eafcb005f212d6d42f7b1e68ab4ad8606 | [
"MIT"
] | permissive | DeFiCh/ain | f819ea586a9c17f99f8f8ea32982554b7c4fb5e2 | 6908107c4a7ee0e30dabc4ea773820637b42bbfe | refs/heads/master | 2023-08-16T18:51:18.460486 | 2023-08-16T14:11:56 | 2023-08-16T14:11:56 | 228,198,960 | 435 | 146 | MIT | 2023-09-14T16:23:37 | 2019-12-15T14:37:57 | C++ | UTF-8 | Python | false | false | 39,024 | py | feature_evm_transferdomain.py | #!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Copyright (c) DeFi Blockchain Developers
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import DefiTestFramework
fro... |
d6fb87034a42778e86c5b18c810468d337090f2c | dea1c40b5bac7e8dfbcc33e587b15b4487fe25f4 | /azure/durable_functions/models/actions/ActionType.py | a7bea219c5582fa2e311edb64606f13b8eaf51d6 | [
"MIT"
] | permissive | Azure/azure-functions-durable-python | 93503441d7ec26c7a54acc0843a88440765def1d | 5d30ae3b6b1158b021eb848629c1399381d783a8 | refs/heads/dev | 2023-08-10T22:22:33.381414 | 2023-08-04T17:41:38 | 2023-08-04T17:41:38 | 167,911,661 | 104 | 54 | MIT | 2023-09-07T22:58:23 | 2019-01-28T06:38:12 | Python | UTF-8 | Python | false | false | 489 | py | ActionType.py | from enum import IntEnum
class ActionType(IntEnum):
"""Defines the values associated to the types of activities that can be scheduled."""
CALL_ACTIVITY: int = 0
CALL_ACTIVITY_WITH_RETRY: int = 1
CALL_SUB_ORCHESTRATOR: int = 2
CALL_SUB_ORCHESTRATOR_WITH_RETRY: int = 3
CONTINUE_AS_NEW: int = 4
... |
d0204b4259b6b129a0406c1a16b2460ee046abab | 2c1ab7305ef08008d07bd30836d5bf25e717fc18 | /python/sparsemap/layers_pt/tests/test_tree_layer.py | 4110f7676e346f91534b5fc9cbcd5e51ef706409 | [
"MIT"
] | permissive | vene/sparsemap | b08e05ea9c0a2c60822125f0694a65c653046f5b | 98128d5065dcdc5325fe741ccb6ce9dd27da31b7 | refs/heads/master | 2020-03-19T03:35:55.026844 | 2018-11-08T10:43:04 | 2018-11-08T10:43:04 | 135,742,630 | 106 | 11 | MIT | 2019-02-10T22:04:04 | 2018-06-01T16:53:27 | C++ | UTF-8 | Python | false | false | 1,323 | py | test_tree_layer.py | from ..tree_layer import TreeSparseMarginalsFast
import torch
from torch.autograd import gradcheck, Variable
def test_fasttree_sparse_decode():
torch.manual_seed(42)
n_nodes = 5
tsm = TreeSparseMarginalsFast(n_nodes, max_iter=1000)
for _ in range(20):
W = torch.randn(n_nodes, n_nodes + 1).vi... |
251c4132ded0425fdf9a8037a8a9999b7ed32b9d | f50f63aafee2b41fa51fd012af66da5fdd93e3f4 | /unyt/tests/test_unyt_array.py | b2b53623606a791394fefb9717f7e55b0c0e9b9e | [
"BSD-3-Clause"
] | permissive | yt-project/unyt | 7f11c6a9806b37026c1ebc1519a59844142a830c | 369d1c9858ec733428632c9381e67d5377645dd0 | refs/heads/main | 2023-09-01T17:01:10.439740 | 2023-08-30T18:21:00 | 2023-08-30T18:21:00 | 127,202,410 | 353 | 59 | BSD-3-Clause | 2023-09-09T12:30:29 | 2018-03-28T21:46:56 | Python | UTF-8 | Python | false | false | 90,499 | py | test_unyt_array.py | """
Test ndarray subclass that handles symbolic units.
"""
import copy
import itertools
import math
import operator
import os
import pickle
import re
import shutil
import tempfile
from importlib.metadata import version
from pathlib import Path
import numpy as np
import pytest
from numpy import array
from numpy.tes... |
e0f59d54664cc530146f63becf82d1a4bc1be7ea | 1e4c5a3412e4acdebe87d9a374515b058fc8d99c | /chembl_structure_pipeline/standardizer.py | a71429b7c6879535b89cab5d0a03acb19f1c090a | [
"MIT"
] | permissive | chembl/ChEMBL_Structure_Pipeline | 38c88a87dd2557b7611adf0f60ce2363cf9f4def | 02fae41903d35e6bb853ee56cf6b799d774bfe92 | refs/heads/master | 2023-05-25T16:54:18.007029 | 2022-11-25T16:21:04 | 2022-11-25T16:21:04 | 169,412,514 | 164 | 35 | MIT | 2023-05-02T13:39:09 | 2019-02-06T13:43:57 | Python | UTF-8 | Python | false | false | 17,834 | py | standardizer.py | #
# Copyright (c) 2019 Greg Landrum
# All rights reserved.
#
# This file is part of the ChEMBL_StructurePipeline project.
# The contents are covered by the terms of the MIT license
# which is included in the file LICENSE, found at the root
# of the source tree.
import os
from rdkit import Chem
from rdkit.Chem.Mol... |
1620dc6b043a1b2cb3c551b7f6f80bf874bff468 | 4e558281ab352b745e970936650e479bbb687982 | /videoflow/processors/vision/pose.py | 343859b270f7ecf18eecf931392be70c32c8d5e3 | [
"MIT"
] | permissive | videoflow/videoflow | e3b84b3acd3591837d30ce51d5023f3dee9823f3 | c49d3fe6c814574bcda1a4e907ce52ea86e1617c | refs/heads/master | 2023-01-24T06:51:56.141621 | 2022-01-20T14:23:58 | 2022-01-20T14:23:58 | 181,554,939 | 1,065 | 96 | MIT | 2022-01-20T14:23:59 | 2019-04-15T19:47:22 | Python | UTF-8 | Python | false | false | 108 | py | pose.py | from __future__ import print_function
from __future__ import division
from __future__ import absolute_import |
987a0efb3aa852e73165c6efd6b5db98a52f6ecb | 9b1eda0abdc5dea7c6e9695ff4e1098abe0a708b | /tests/test_message_pump.py | c6f9d921ca2890090f7f1dd8984f9daa54681f89 | [
"MIT"
] | permissive | Textualize/textual | b8cf4b5d18069fccc7623b3116436f479e1ef446 | b74ac1e47fdd16133ca567390c99ea19de278c5a | refs/heads/main | 2023-08-30T21:40:21.563823 | 2023-08-30T10:18:27 | 2023-08-30T10:18:27 | 355,959,597 | 14,818 | 588 | MIT | 2023-09-14T20:22:02 | 2021-04-08T15:24:47 | Python | UTF-8 | Python | false | false | 3,510 | py | test_message_pump.py | import pytest
from textual.app import App, ComposeResult
from textual.errors import DuplicateKeyHandlers
from textual.events import Key
from textual.widget import Widget
from textual.widgets import Input
class ValidWidget(Widget):
called_by = None
def key_x(self):
self.called_by = self.key_x
de... |
0560c5f188b45701df3ea452289d521c81e79b08 | d4be43f95987606c377a9ecedf3f3ce4080dc268 | /linguee_api/utils.py | 2440ef89025b709e39522a9bb8a4e970b87034e1 | [
"MIT"
] | permissive | imankulov/linguee-api | 0220b655037c750a683fe0373d17d447467d8f9c | be2c6a496f547f71931a3b51ecbaf7732c729fd3 | refs/heads/master | 2023-07-20T05:17:32.046813 | 2023-07-15T01:23:37 | 2023-07-19T22:01:23 | 74,171,706 | 165 | 45 | MIT | 2023-07-19T22:01:25 | 2016-11-18T22:34:06 | Python | UTF-8 | Python | false | false | 592 | py | utils.py | import importlib
def import_string(import_name: str):
"""
Import an object based on the import string.
Separate module name from the object name with ":". For example,
"linuguee_api.downloaders:HTTPXDownloader"
"""
if ":" not in import_name:
raise RuntimeError(
f'{import_n... |
9a23d87a654a908a8252d60912a30685d6b5dca2 | 11f7558e56bcfb742495cec766baeea7650a3103 | /python/Multi-Service/content_moderator_cs.py | c12dd1c744e5dea194f9d1c35589412955d565fb | [
"MIT"
] | permissive | Azure-Samples/cognitive-services-quickstart-code | ee6936fae3bdfc902e6e8c74080f598845eb9c49 | 3ec40229ae753720605319e2e4d0955f9039449a | refs/heads/master | 2023-08-21T21:19:28.114774 | 2023-06-06T20:12:38 | 2023-06-06T20:12:38 | 198,896,181 | 323 | 511 | MIT | 2023-09-08T06:29:25 | 2019-07-25T20:20:09 | Jupyter Notebook | UTF-8 | Python | false | false | 3,063 | py | content_moderator_cs.py | import os
from pprint import pprint
from msrest.authentication import CognitiveServicesCredentials
from azure.cognitiveservices.vision.contentmoderator import ContentModeratorClient
from azure.cognitiveservices.vision.contentmoderator.models import ( Evaluate, OCR, FoundFaces )
'''
This quickstart uses Content Modera... |
1ccc56b1d943d20577152cfd3120663262326445 | e5de04caeb8ae7fae9a0c0604aa93008c27569fd | /examples/calculations/Parse_Angles.py | ac2a9cdac3f26fc1564705f88c8c6e01ada43983 | [
"BSD-3-Clause"
] | permissive | Unidata/MetPy | 2c92c93173ce2458b54212fa7c18761048a8520e | c7124e6f375eb5810ce49d53c9d5501c2efdfb75 | refs/heads/main | 2023-08-31T15:37:55.649855 | 2023-08-30T18:48:58 | 2023-08-30T18:48:58 | 1,409,621 | 1,041 | 395 | BSD-3-Clause | 2023-09-14T13:47:18 | 2011-02-25T04:20:25 | Python | UTF-8 | Python | false | false | 1,063 | py | Parse_Angles.py | # Copyright (c) 2015-2018 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""
============
Parse angles
============
Demonstrate how to convert direction strings to angles.
The code below shows how to parse directional text into angles.
I... |
9d9c45d3eddac28ef34bdbc90c150d3ff350c739 | 7e1c4dd6a2cae0597b4f4e961063cf077acdfd4c | /tests/environments/analytics_environment.py | 490072ac3ba458251f3b8461bbe108da42820280 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | couchbase/couchbase-python-client | 753fa434db910d175bf9ea53a5829a40ba36e938 | c7d80434be3f917d6f25439a918aed30273f63f4 | refs/heads/master | 2023-08-29T14:04:13.532717 | 2023-08-24T22:53:30 | 2023-08-25T03:35:21 | 2,122,194 | 223 | 87 | Apache-2.0 | 2023-05-30T16:05:59 | 2011-07-29T04:24:46 | Python | UTF-8 | Python | false | false | 13,159 | py | analytics_environment.py | # Copyright 2016-2023. Couchbase, Inc.
# 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 a... |
d48469d441e1f6d07951ff8b5237e22cf25f6f6f | 40195e6f86bf8620850f0c56e98eae5693e88277 | /coremltools/converters/mil/mil/passes/defs/optimize_conv.py | f31360f12657532014772926b4466e86e3c5fc31 | [
"MIT",
"BSD-3-Clause"
] | permissive | apple/coremltools | 009dfa7154d34cab8edcafa618e689e407521f50 | feed174188f7773631a3d574e1ff9889a135c986 | refs/heads/main | 2023-09-01T23:26:13.491955 | 2023-08-31T18:44:31 | 2023-08-31T18:44:31 | 95,862,535 | 3,742 | 705 | BSD-3-Clause | 2023-09-14T17:33:58 | 2017-06-30T07:39:02 | Python | UTF-8 | Python | false | false | 41,725 | py | optimize_conv.py | # Copyright (c) 2023, Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can be
# found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import copy
import numpy as np
from coremltools import _logger as logger
from coremltools.converter... |
871c35613a93a9e32a94a2397ecba40e3ce23d6b | ac2f43c8e0d9649a7f063c59b3dffdfed9fd7ed7 | /common/recipes-rest/rest-api/files/redfish_session_service.py | 0ee827e24250582d2ca7ef19d23f7176f30df514 | [] | no_license | facebook/openbmc | bef10604ced226288600f55248b7f1be9945aea4 | 32777c66a8410d767eae15baabf71c61a0bef13c | refs/heads/helium | 2023-08-17T03:13:54.729494 | 2023-08-16T23:24:18 | 2023-08-16T23:24:18 | 31,917,712 | 684 | 331 | null | 2023-07-25T21:19:08 | 2015-03-09T19:18:35 | C | UTF-8 | Python | false | false | 1,208 | py | redfish_session_service.py | from aiohttp import web
from common_utils import dumps_bytestr
from redfish_base import validate_keys
async def get_session_service(request: web.Request) -> web.Response:
body = {
"@odata.type": "#SessionService.v1_1_8.SessionService",
"Id": "SessionService",
"Name": "Session Service",
... |
dce87e925a73f960b5e3433f93fd1aab5b510e62 | 7b8f1903ca25b20f2d62c8a49222e9ae9c3cb35b | /RST/ODSAextensions/odsa/odsatoctree/__init__.py | 79303de421309ee24ae6991cee09a6fb31f6d83e | [
"MIT"
] | permissive | OpenDSA/OpenDSA | 21c1bc9b170e2143dec8c7c209783d2852be73e0 | 13c4d2c614c495b2f9c000f3e6734831698d3c8a | refs/heads/master | 2023-09-06T09:58:51.148497 | 2023-09-05T02:16:37 | 2023-09-05T02:16:37 | 3,028,364 | 271 | 126 | NOASSERTION | 2023-08-27T20:45:33 | 2011-12-21T17:20:24 | JavaScript | UTF-8 | Python | false | false | 28 | py | __init__.py |
from .odsatoctree import *
|
9b6990e999ba66ab49b580404d6679c5cc886afc | 682459e3cea53ef14e531597dd612d4b5733fbea | /examples/multiple_linear_regression.py | a5f759cde44df004893db168a71837acc023e76c | [
"BSD-3-Clause"
] | permissive | pymanopt/pymanopt | 4bcdc2983631befcf88b194449158d5163df37be | acb52b216538ba5ed4871f025a0e49080b4475da | refs/heads/master | 2023-09-01T01:50:27.468578 | 2023-04-04T17:52:10 | 2023-04-04T17:52:10 | 45,385,612 | 647 | 155 | BSD-3-Clause | 2023-09-13T05:41:44 | 2015-11-02T09:45:08 | Python | UTF-8 | Python | false | false | 3,011 | py | multiple_linear_regression.py | import autograd.numpy as np
import jax.numpy as jnp
import tensorflow as tf
import torch
import pymanopt
from examples._tools import ExampleRunner
from pymanopt.manifolds import Euclidean
from pymanopt.optimizers import TrustRegions
SUPPORTED_BACKENDS = ("autograd", "jax", "numpy", "pytorch", "tensorflow")
def cre... |
e8fd5ac85389eb2c08fec389de03abc205a59661 | 438f82adbaa27bcb97cce0171f377ddc92586f48 | /pulumi/hcl2_type_reflection/hcl2_type_reflection/hcl2_type_reflection.py | 49a3ebce9f812c05ee76d4e16098825d5db4ad13 | [
"Apache-2.0"
] | permissive | grapl-security/grapl | 5f93599969ec604df25712c1d16648d16de67072 | b2c7ef263fb8134add2febb770da164ea7b4936f | refs/heads/main | 2023-08-12T11:38:11.167343 | 2022-12-26T15:28:55 | 2022-12-26T15:28:55 | 151,994,099 | 386 | 60 | Apache-2.0 | 2022-12-10T05:56:55 | 2018-10-07T23:28:27 | Rust | UTF-8 | Python | false | false | 2,305 | py | hcl2_type_reflection.py | from typing import Any
from lark import Lark, Transformer
class HCL2TypeTransformer(Transformer):
def hcl2_type(self, item: list) -> Any:
return item[0]
def value(self, item: list) -> Any:
return item[0]
def map(self, item: list) -> dict[str, Any]:
return {"string": item[0]}
... |
fa23891fe01f2a82da3da272c9c150ff0365cc9d | 3405736c71d6224374437dba141815d03e95b89f | /test/sanity/user-agent/echo-user-agent.py | 95326a24830cb2ebe466f632260be9c55d56e56d | [
"MIT"
] | permissive | nwjs/nw.js | dd1338335ec7306b94203f46629fa83081e1c364 | c2184a6edae6d6cca99d199ad5fedd37e4af3fad | refs/heads/nw78 | 2023-08-31T13:00:22.395612 | 2023-07-30T22:47:46 | 2023-07-30T22:47:46 | 3,100,121 | 28,744 | 3,512 | MIT | 2023-08-17T22:23:55 | 2012-01-04T06:21:10 | JavaScript | UTF-8 | Python | false | false | 599 | py | echo-user-agent.py | #!/usr/bin/env python
from http.server import HTTPServer, BaseHTTPRequestHandler
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
request_path = self.path
print(self.headers['User-Agent'])
self.send_response(200)
self.send_header("Set-... |
f774119e676a42a0c2bd067551e85c04f24faf2d | 66a9c25cf0c53e2c3029b423018b856103d709d4 | /tests/test_stanza_error.py | d95a33ce2fc4c0b9f7c5e7a083240b9cd7113767 | [
"MIT",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | fritzy/SleekXMPP | 1b02d3e2b22efeb6bf3f8f487e6c0343b9b85baf | cc1d470397de768ffcc41d2ed5ac3118d19f09f5 | refs/heads/develop | 2020-05-22T04:14:58.568822 | 2020-02-18T22:54:57 | 2020-02-18T22:54:57 | 463,405 | 658 | 254 | NOASSERTION | 2023-06-27T20:05:54 | 2010-01-08T05:54:45 | Python | UTF-8 | Python | false | false | 2,520 | py | test_stanza_error.py | import unittest
from sleekxmpp.test import SleekTest
class TestErrorStanzas(SleekTest):
def setUp(self):
# Ensure that the XEP-0086 plugin has been loaded.
self.stream_start()
self.stream_close()
def testSetup(self):
"""Test setting initial values in error stanza."""
... |
1039d7976791fe7cba700507abb37e2b7a3555c5 | fa3f6d4e9169fb95f828013d179d03accdff381b | /grr/server/grr_response_server/databases/mem_flows.py | ef8051deb8a871330ab87d68084f516ad187f6c0 | [
"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 | 36,743 | py | mem_flows.py | #!/usr/bin/env python
"""The in memory database methods for flow handling."""
import collections
import logging
import sys
import threading
import time
from typing import Dict
from typing import Iterable
from typing import List
from typing import Optional
from typing import Sequence
from typing import Text
from grr_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.