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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34ba6608b9bed0a944ce118809285d7b6cfdae46 | b32df2ffae14c3ca8083f36f93165c220aef5e44 | /tests/unit/networks_tests/classification_test/test_lmnet_quantize.py | 8fb022989264d8732cae01d15a0182cdac0f4e18 | [
"Apache-2.0"
] | permissive | blue-oil/blueoil | 213659909b6eac26dd249f878a03ed732b639539 | 0c9160b524b17482d59ae48a0c11384f1d26dccc | refs/heads/master | 2023-01-24T05:10:54.825811 | 2021-04-22T08:46:56 | 2021-04-22T08:46:56 | 153,597,157 | 252 | 111 | Apache-2.0 | 2021-05-10T05:02:45 | 2018-10-18T09:19:36 | Python | UTF-8 | Python | false | false | 2,874 | py | test_lmnet_quantize.py | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... |
6d268f3af02370f7e0ad29dc91c2b2b371710650 | 9f48878caa37ac5f2ccf938fc476efa47c89c644 | /tests/Unit/PointwiseFunctions/AnalyticData/GrMhd/RiemannProblem.py | 790c73a478c48853ba9d3fa512aae1c5c74898b9 | [
"MIT"
] | permissive | sxs-collaboration/spectre | 34f7733ab4c75dbca2f432028145fed110c9ef24 | 96f573cf158201f712da2bfb3378edf497a35a0d | refs/heads/develop | 2023-08-19T11:18:18.465609 | 2023-08-19T04:24:25 | 2023-08-19T04:24:25 | 87,570,510 | 149 | 190 | NOASSERTION | 2023-09-14T20:10:35 | 2017-04-07T17:28:20 | C++ | UTF-8 | Python | false | false | 3,811 | py | RiemannProblem.py | # Distributed under the MIT License.
# See LICENSE.txt for details.
import numpy as np
def rest_mass_density(
x,
adiabatic_index,
left_density,
right_density,
left_pressure,
right_pressure,
left_velocity,
right_velocity,
left_magnetic_field,
right_magnetic_field,
lapse,
... |
e1c7c1483062065d40b1982e7c7330265bcb45a3 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/uptime/test_sensor.py | 41c097badd1b0e6fdba102e1208894252a257beb | [
"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 | 1,311 | py | test_sensor.py | """The tests for the uptime sensor platform."""
import pytest
from syrupy.assertion import SnapshotAssertion
from syrupy.filters import props
from homeassistant.components.uptime.const import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as... |
7fff0de9a071e2cb909635790684254a5209b05a | 2bb96128322c0307742c6809f0d8c7eddb09c523 | /thread_process_tutorial/demo_process_non_join.py | 0d1a287e7de00a2c3d39edcb533949fd5b39188e | [
"MIT"
] | permissive | twtrubiks/python-notes | 2390c66d25b39f5a73968829702d4fd02ccf1b28 | 042a651aaa04c07f76c52bc52bace665d0df99d7 | refs/heads/master | 2023-08-17T11:50:13.122573 | 2023-08-05T04:14:56 | 2023-08-05T04:14:56 | 90,001,387 | 122 | 49 | MIT | 2021-12-21T07:18:06 | 2017-05-02T06:55:21 | Python | UTF-8 | Python | false | false | 594 | py | demo_process_non_join.py | import multiprocessing as mp
import time
def main(url, num):
print('開始執行', url)
time.sleep(2)
print('結束', num)
url_list1 = ['www.yahoo.com.tw, www.google.com']
url_list2 = ['www.yahoo.com.tw, www.google.com']
url_list3 = ['www.yahoo.com.tw, www.google.com']
# 定義線程
p_list = []
p1 = mp.Process(target=mai... |
56c68b32ce817356a2397fb6016947dba06e0b6e | 48d1002394d233cf5932c7ef69300400af79118a | /kivy/core/clipboard/clipboard_android.py | 426a4ca1d6a6fa461daffd07229a29ab1bdf3b24 | [
"LGPL-2.1-only",
"MIT",
"Apache-2.0"
] | permissive | kivy/kivy | ba2668bffe4e125fd1c5aace54f671343802850e | ca1b918c656f23e401707388f25f4a63d9b8ae7d | refs/heads/master | 2023-09-04T02:27:05.311875 | 2023-08-26T08:00:20 | 2023-08-26T08:00:20 | 1,049,095 | 16,076 | 4,161 | MIT | 2023-09-09T07:55:18 | 2010-11-03T20:27:32 | Python | UTF-8 | Python | false | false | 2,874 | py | clipboard_android.py | '''
Clipboard Android
=================
Android implementation of Clipboard provider, using Pyjnius.
'''
__all__ = ('ClipboardAndroid', )
from kivy import Logger
from kivy.core.clipboard import ClipboardBase
from jnius import autoclass, cast
from android.runnable import run_on_ui_thread
from android import python_ac... |
e2d5de78c49458e073f0843970130a18f8b39d4c | 4c4deee160ee4a3056b2973f6202e5cbaafb5925 | /oio/event/filters/notify.py | 50731e4dc1d1e9e6d82f8edc339888f4d69cb9e0 | [
"AGPL-3.0-only",
"LGPL-3.0-only"
] | permissive | open-io/oio-sds | b9bc7cec283838a59b83b5279cb181cded69034f | 08abd65aac86e47cf324826487ab9b475e014938 | refs/heads/master | 2023-09-05T05:09:29.653325 | 2023-08-01T16:37:37 | 2023-08-31T16:05:19 | 32,169,193 | 663 | 121 | MIT | 2022-03-04T13:08:03 | 2015-03-13T17:06:25 | Python | UTF-8 | Python | false | false | 11,404 | py | notify.py | # Copyright (C) 2015-2020 OpenIO SAS, as part of OpenIO SDS
# Copyright (C) 2023 OVH SAS
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your... |
51980b232ee11fe3ff411eadf9cad9d720bc6aee | 73a81a822dc8fd3edfc3a4cf2b383ea4d10b828c | /uvicorn/middleware/message_logger.py | 0174bcce6d48de946214d59bcae5543d38d89c3a | [
"BSD-3-Clause"
] | permissive | encode/uvicorn | 8731dc29de6aac471f6fe287992a62077dfdc747 | fc2130bf1a740acaa502530079bfbd595fa7a94c | refs/heads/master | 2023-08-31T04:56:03.181678 | 2023-08-25T18:52:05 | 2023-08-25T18:52:05 | 92,946,971 | 6,936 | 769 | BSD-3-Clause | 2023-09-14T11:13:29 | 2017-05-31T13:13:43 | Python | UTF-8 | Python | false | false | 2,859 | py | message_logger.py | import logging
from typing import Any
from uvicorn._types import (
ASGI3Application,
ASGIReceiveCallable,
ASGIReceiveEvent,
ASGISendCallable,
ASGISendEvent,
WWWScope,
)
from uvicorn.logging import TRACE_LOG_LEVEL
PLACEHOLDER_FORMAT = {
"body": "<{length} bytes>",
"bytes": "<{length} by... |
7452dd25a4c8be0b6dd998bd1093f0d16f355480 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/tools/python/src/Lib/compiler/transformer.py | ba5c03ce754eabba00d0a40635388bb0da7d6374 | [
"Apache-2.0"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 53,116 | py | transformer.py | """Parse tree transformation module.
Transforms Python source code into an abstract syntax tree (AST)
defined in the ast module.
The simplest ways to invoke this module are via parse and parseFile.
parse(buf) -> AST
parseFile(path) -> AST
"""
# Original version written by Greg Stein (gstein@lyra.org)
# ... |
46933b0c6ee2d4c0221eba01111ae11596190eef | d629e0d6ca0a3bb0c270879b2388ad5e23ed7e9d | /tests/mypy/module/fail.py | 0bb5ca64506b4007fb8f644c6e601fa0586e42c6 | [
"MIT"
] | permissive | seandstewart/typical | 942645157dcd70a69fbe1957f88b7b0a850528b7 | 97eec305c094f265abc49051150be56a2fe17a07 | refs/heads/main | 2023-08-18T00:35:48.713176 | 2023-04-26T16:56:57 | 2023-04-26T16:56:57 | 175,726,271 | 190 | 15 | MIT | 2023-07-25T21:39:11 | 2019-03-15T01:24:36 | Python | UTF-8 | Python | false | false | 97 | py | fail.py | import typic
@typic.klass
class Klass:
attr: str
if __name__ == "__main__":
Klass()
|
49189eb176bdde1e112aebe8f7191c2fb14647b5 | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/prompt-toolkit/py2/tests/test_cli.py | 68ca3d03f05fc4e202da46d6b35e1f98dce52972 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 20,127 | py | test_cli.py | # encoding: utf-8
"""
These are almost end-to-end tests. They create a CommandLineInterface
instance, feed it with some input and check the result.
"""
from __future__ import unicode_literals
from prompt_toolkit.application import Application
from prompt_toolkit.buffer import Buffer, AcceptAction
from prompt_toolkit.cl... |
6bffa9b5080967d27e179b0b28a042b56d92cf72 | 9b391863599ecc26a6804f9f272f8c7f2aee8a8c | /tick/solver/tests/scpg_test.py | 2277f7d69b9ecca74a1c53e4d9f4afe09f2e006c | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | X-DataInitiative/tick | 4db1bce7471bb48757b54e86b0f7946f36e78dde | 04dbb377b47783036a8343c6a61b60fc9f430dc3 | refs/heads/master | 2023-08-13T10:28:15.560632 | 2023-03-05T00:16:57 | 2023-03-05T00:16:57 | 75,284,069 | 475 | 120 | BSD-3-Clause | 2023-03-05T00:16:58 | 2016-12-01T10:59:08 | Python | UTF-8 | Python | false | false | 1,486 | py | scpg_test.py | # License: BSD 3 clause
import unittest
import numpy as np
from tick.hawkes import ModelHawkesExpKernLogLik, SimuHawkesExpKernels
from tick.prox import ProxL2Sq
from tick.solver import SCPG
from tick.solver.tests.solver import TestSolver
class Test(TestSolver):
def test_solver_scpg(self):
"""...Check S... |
c4e97fa29661d0e162bb1b7b664af133d7b21847 | 0577a46d8d28e1fd8636893bbdd2b18270bb8eb8 | /chromium/components/device_signals/core/browser/DEPS | b5db53237dd0dd8ace2ca2a1325bbe2c232a33ec | [
"BSD-3-Clause"
] | permissive | ric2b/Vivaldi-browser | 388a328b4cb838a4c3822357a5529642f86316a5 | 87244f4ee50062e59667bf8b9ca4d5291b6818d7 | refs/heads/master | 2022-12-21T04:44:13.804535 | 2022-12-17T16:30:35 | 2022-12-17T16:30:35 | 86,637,416 | 166 | 41 | BSD-3-Clause | 2021-03-31T18:49:30 | 2017-03-29T23:09:05 | null | UTF-8 | Python | false | false | 139 | DEPS | include_rules = [
"+components/keyed_service/core",
"+components/signin/public",
"+components/policy/core",
"+components/prefs",
]
| |
f3cac1f5c47b37101cc3a27955108d186d86d587 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-Quartz/PyObjCTest/test_qlpreviewpanel.py | ea4483a98c0e590beb871e8056d4d8dff0903596 | [
"MIT"
] | permissive | ronaldoussoren/pyobjc | 29dc9ca0af838a56105a9ddd62fb38ec415f0b86 | 77b98382e52818690449111cd2e23cd469b53cf5 | refs/heads/master | 2023-09-01T05:15:21.814504 | 2023-06-13T20:00:17 | 2023-06-13T20:00:17 | 243,933,900 | 439 | 49 | null | 2023-06-25T02:49:07 | 2020-02-29T08:43:12 | Python | UTF-8 | Python | false | false | 1,764 | py | test_qlpreviewpanel.py | import objc
from Foundation import NSObject, NSRect
from PyObjCTools.TestSupport import TestCase, min_os_level
import Quartz
class TestQLPreviewPanelHelper(NSObject):
def acceptsPreviewPanelControl_(self, panel):
return 1
def previewPanel_handleEvent_(self, panel, event):
return 1
def p... |
94a55f7c3f1b722ce8633bd9d2e8cfa4b8719559 | 14f6dcada0935e21cc983acd1cc906d4a4752fa1 | /caliban/util/metrics.py | 4a45202217a38927b5f60ef611d2598714e4fccd | [
"Apache-2.0"
] | permissive | google/caliban | 48b4b35881086f1f7b99631cecd92e389c794d1b | d0e792a8e72fe5cbc186c47a2541e94d5b94c319 | refs/heads/main | 2023-08-17T19:12:20.652212 | 2023-08-01T21:46:06 | 2023-08-01T21:46:06 | 268,875,034 | 499 | 79 | Apache-2.0 | 2023-08-17T15:06:43 | 2020-06-02T18:12:50 | Python | UTF-8 | Python | false | false | 5,782 | py | metrics.py | #!/usr/bin/python
#
# Copyright 2020 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 ag... |
76bf89a7cdfdd2f829e3f2dc831639a90377ccde | 490f57a6d8dfc6dde28c8caf553b1c1b18e7dfd3 | /nilmtk/tests/test_combinatorial_optimisation.py | b2b945ddb758ab5a90dff85cc70827c2105ad056 | [
"Apache-2.0"
] | permissive | nilmtk/nilmtk | 280358b257f70e1e893ff4d21cc01c08e0ad17e0 | b2c514479cef478cab872cb635056da08d5352a1 | refs/heads/master | 2023-08-12T09:45:58.010261 | 2023-06-07T06:59:36 | 2023-06-07T06:59:36 | 14,891,877 | 769 | 549 | Apache-2.0 | 2023-06-07T06:59:37 | 2013-12-03T11:39:12 | Python | UTF-8 | Python | false | false | 1,030 | py | test_combinatorial_optimisation.py | import unittest
from os.path import join
from os import remove
import pandas as pd
from .testingtools import data_dir
from nilmtk.datastore import HDFDataStore
from nilmtk import DataSet
from nilmtk.legacy.disaggregate import CombinatorialOptimisation
class TestCO(unittest.TestCase):
@classmethod
def setUpCl... |
98882d78fae96d4dd5c6a1d746c690a68b6dc6a7 | 3e970915d5274064e156fbd747a3ec247d926201 | /phidl/path.py | b3656adc5a00b4b46cb0fb376cbc3dfebe7cac49 | [
"MIT"
] | permissive | amccaugh/phidl | d6b5cca06f3ad24a8f5227f4b6f92569e2c02200 | eff9101035d969d16c224dfd9266a93f511839e6 | refs/heads/master | 2023-08-06T00:44:41.182514 | 2023-07-20T18:18:53 | 2023-07-20T18:18:53 | 65,043,733 | 158 | 61 | MIT | 2023-09-13T14:45:28 | 2016-08-05T19:25:11 | Python | UTF-8 | Python | false | false | 15,306 | py | path.py | import numpy as np
from phidl.device_layout import CrossSection, Path, _rotate_points
def arc(radius=10, angle=90, num_pts=720):
"""Create a circular arc Path
Parameters
----------
radius : int or float
Radius of arc
angle : int or float
Total angle of arc
num_pts : int
... |
e82468825afe4a187dc015a03c7d59ba2cde1cca | 29c88ae9d8ac5e498c28f747f54d265408011857 | /bin/worker | 8513ebd804d0ed11b485cb7b13212aebaa9be8c6 | [
"Apache-2.0"
] | permissive | getsentry/freight | 049878d4fdfc1ec7ba35caca094cd3f8c78f364a | 17a9c819504f25f1e01178a43018dd660be1e879 | refs/heads/master | 2023-08-22T06:01:00.378812 | 2023-02-03T03:07:48 | 2023-02-03T03:07:48 | 29,835,895 | 571 | 55 | Apache-2.0 | 2023-05-01T21:03:31 | 2015-01-25T23:17:09 | Python | UTF-8 | Python | false | false | 2,185 | worker | #!/usr/bin/env python
import argparse
import sys
from rq.worker import logger
from rq.logutils import setup_loghandlers
from multiprocessing import Process
def main(argv=sys.argv[1:]):
parser = argparse.ArgumentParser()
parser.add_argument("--dev", dest="dev", action="store_true", default=False)
parser... | |
9ad2fb6b1c7d3d686a2b5724f571840a3929e4e7 | 94a9151461546883c43192527d12a36126b1003b | /test/testAssertionExtension.py | d55c56b16abfa1cb92cd43269ee594ac1538f10c | [
"MIT"
] | permissive | terryyin/lizard | b4a0805ab05eea7d1a25be27155d87113794c2e6 | 3f4c17fdfd625d7c6860379a77af56813e901026 | refs/heads/master | 2023-09-01T15:35:23.888140 | 2023-08-18T02:10:09 | 2023-08-18T02:10:09 | 4,738,329 | 1,595 | 248 | NOASSERTION | 2023-08-18T02:10:11 | 2012-06-21T11:31:46 | Python | UTF-8 | Python | false | false | 1,255 | py | testAssertionExtension.py | import unittest
from .testHelpers import get_cpp_function_list_with_extension
from lizard_ext.lizardignoreassert import LizardExtension
class TestAssertionExtension(unittest.TestCase):
def test_exclusion_of_assert(self):
result = get_cpp_function_list_with_extension("void fun() { assert(a && b && c); }", L... |
128d3fccd38fef4609506a8c9ec3a4f47c700bfb | dea1c40b5bac7e8dfbcc33e587b15b4487fe25f4 | /setup.py | 83732a5fc04f89034f1087864317ed0038b0ba1c | [
"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 | 2,353 | py | setup.py | """Setup for the durable function module."""
import pathlib
import os
import shutil
import subprocess
import sys
from glob import glob
from setuptools import setup, find_packages
from distutils.command import build
with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()
class BuildModul... |
a95122d6fd724becdfe576f4edb628eef5dfe8af | 5693aed52c4d61cc9f3369e8b7bfaa4474a84cdd | /sourcing/cc_pseudo_crawl/python_scripts/redownload_warc.py | 672c93ac8b756f93314a2b84139a2ed78c307a76 | [
"Apache-2.0"
] | permissive | bigscience-workshop/data-preparation | 74d0cdcc91fa375547bc512137006e63e394c734 | 9d0588419073cc5bf0fb92b58f37f2a1016572c3 | refs/heads/main | 2023-04-02T03:54:09.131411 | 2023-02-20T12:21:59 | 2023-02-20T12:21:59 | 485,318,608 | 203 | 26 | Apache-2.0 | 2022-11-10T16:43:53 | 2022-04-25T10:08:43 | Jupyter Notebook | UTF-8 | Python | false | false | 1,514 | py | redownload_warc.py | import logging
from argparse import ArgumentParser
from pathlib import Path
import datasets
from datasets import config, load_from_disk
from datasets.utils.logging import set_verbosity_info
from .download_warc import download_warcs
set_verbosity_info()
logger = logging.getLogger(__name__)
def get_args():
parse... |
6542c93b6820fdd5b511f67f1afc03da3cbebec0 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /api/src/opentrons/drivers/smoothie_drivers/simulator.py | ad1197f4aa5f1912d58d403018acb0cc4b32abe3 | [
"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 | 2,692 | py | simulator.py | from typing import Optional, Dict, Union
from opentrons.drivers.smoothie_drivers.constants import (
HOMED_POSITION,
Y_BOUND_OVERRIDE,
DISABLE_AXES,
AXES,
)
from opentrons.drivers.types import MoveSplits
class SimulatingDriver:
def __init__(self) -> None:
self._steps_per_mm: Dict[str, floa... |
73b03f87ae8ed3dc2dfcd995f04a97e325236968 | e7f2a8c466c14b9821e59740ed0407107e1254a4 | /rasa/nlu/convert.py | 6b8cbf7fe8b8588ba5ffae893adca97c84b17c47 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"MIT"
] | permissive | RasaHQ/rasa | 4a31134308a9a4d8824fe7faef02526accdd0f19 | 50857610bdf0c26dc61f3203a6cbb4bcf193768c | refs/heads/main | 2023-08-28T01:53:56.981600 | 2023-08-25T10:20:49 | 2023-08-25T10:20:49 | 70,908,208 | 13,167 | 3,739 | Apache-2.0 | 2023-09-14T09:54:40 | 2016-10-14T12:27:49 | Python | UTF-8 | Python | false | false | 1,317 | py | convert.py | import os
from typing import Text, Union
from rasa.shared.nlu.training_data.formats.rasa_yaml import RasaYAMLWriter
from rasa.shared.utils.cli import print_error
import rasa.shared.nlu.training_data.loading
from rasa.nlu.utils import write_to_file
def convert_training_data(
data_file: Union[list, Text], out_file... |
80dce1a99eb4832d37db2f89f91e8231a43c2b61 | 52a677b94056d3397b4a499bc9185adb68a63f05 | /endpoints/test/test_webhooks.py | 51c454b202734a60f10ca4ceb1fe2d75f9ed385d | [
"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 | 676 | py | test_webhooks.py | import base64
from test.fixtures import *
import pytest
from flask import url_for
from data import model
from endpoints.test.shared import conduct_call, gen_basic_auth
def test_start_build_disabled_trigger(app, client):
trigger = model.build.list_build_triggers("devtable", "building")[0]
trigger.enabled = F... |
1fdcee700f11d8aa0de619ba3248bdf9d7eb4c67 | 05b0c763ab92086e69a8d00ae6465009c596f6bc | /intel_extension_for_pytorch/cpu/hypertune/objective.py | a39263faca74848f204d62264bfdcf5e589aa81c | [
"Apache-2.0"
] | permissive | intel/intel-extension-for-pytorch | 60ce2af2ec3a1dacae0d0db13dd51a5b44512e61 | 7f9266789de7ca9d8bcf55606f3204f1a3640640 | refs/heads/master | 2023-09-01T09:13:16.866410 | 2023-08-31T08:00:37 | 2023-08-31T08:00:37 | 256,061,008 | 991 | 144 | Apache-2.0 | 2023-08-13T13:56:07 | 2020-04-15T23:35:29 | Python | UTF-8 | Python | false | false | 4,077 | py | objective.py | # reference: https://github.com/intel/neural-compressor/blob/\
# 15477100cef756e430c8ef8ef79729f0c80c8ce6/neural_compressor/objective.py
import subprocess
class MultiObjective(object):
def __init__(self, program, program_args, tune_launcher):
self.program = program
self.program_... |
4f72bbb4e5902700c3c3240c257c7ca5d12e5fea | 9b391863599ecc26a6804f9f272f8c7f2aee8a8c | /tick/hawkes/simulation/tests/hawkes_kernel_sum_exp_test.py | 730aa24a5154c43a3c1d16109a439c97c5270ee5 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | X-DataInitiative/tick | 4db1bce7471bb48757b54e86b0f7946f36e78dde | 04dbb377b47783036a8343c6a61b60fc9f430dc3 | refs/heads/master | 2023-08-13T10:28:15.560632 | 2023-03-05T00:16:57 | 2023-03-05T00:16:57 | 75,284,069 | 475 | 120 | BSD-3-Clause | 2023-03-05T00:16:58 | 2016-12-01T10:59:08 | Python | UTF-8 | Python | false | false | 2,404 | py | hawkes_kernel_sum_exp_test.py | # License: BSD 3 clause
import unittest
import numpy as np
from tick.hawkes import HawkesKernelSumExp
class Test(unittest.TestCase):
def setUp(self):
self.decays = np.array([1., 2., 0.2])
self.intensities = np.array([0.3, 4., 2.])
self.hawkes_kernel_sumexp = HawkesKernelSumExp(self.inte... |
6d886c14d640ef8978145095b6ce961cfc30b583 | 9577725de28e621e4b0ec275251a2b2e7ecb0261 | /boxsdk/config.py | c58290d6145db69d5e0c1d0275c3648d996ed00f | [
"Apache-2.0"
] | permissive | box/box-python-sdk | 0b7014d69da14baacf9ac777c347664b924325b5 | 4f11d7596488194fc740936fe987f42864003d41 | refs/heads/main | 2023-08-17T04:33:23.692675 | 2023-08-11T11:24:36 | 2023-08-11T11:24:36 | 30,386,388 | 424 | 285 | Apache-2.0 | 2023-09-14T11:43:27 | 2015-02-06T00:30:55 | Python | UTF-8 | Python | false | false | 899 | py | config.py | from sys import version_info as py_version
from . import version
class API:
"""Configuration object containing the URLs for the Box API."""
BASE_API_URL = 'https://api.box.com/2.0'
UPLOAD_URL = 'https://upload.box.com/api/2.0'
OAUTH2_API_URL = 'https://api.box.com/oauth2' # <https://developer.box.co... |
67e8b5cc6c462f189375605557289a79ad040ffa | aae782b6f6037570ceca0925adcaf75d8876b995 | /pyswarms/backend/swarms.py | f3817cb35af7b6ba131861ee5844a67c5b864f2e | [
"MIT"
] | permissive | ljvmiranda921/pyswarms | af308358cc2a45524d1ab4e74dfc6205ac67e8f8 | 70c969d929bb2dab6211765def0431680fc5cb01 | refs/heads/master | 2023-06-09T08:19:50.000532 | 2023-06-06T09:46:40 | 2023-06-06T09:46:40 | 97,002,861 | 1,194 | 401 | MIT | 2023-06-06T09:41:53 | 2017-07-12T12:04:45 | Python | UTF-8 | Python | false | false | 4,509 | py | swarms.py | # -*- coding: utf-8 -*-
"""
Swarm Class Backend
This module implements a Swarm class that holds various attributes in
the swarm such as position, velocity, options, etc. You can use this
as input to most backend cases.
"""
# Import modules
import numpy as np
from attr import attrib, attrs
from attr.validators import... |
a0aa9487a6e372c52c3b9a6cb5868db62bee9dd3 | a838c711a218bbdb661132eaf252fa417ca8f273 | /influxdb_client/client/exceptions.py | 48681addc36e016583bad0bacc60dde3c6a43392 | [
"MIT"
] | permissive | influxdata/influxdb-client-python | 9ae84038c1145466dd40c3a9096a74983f29bedb | 1ec64b7e1039c891ac3a667ee6697731c61ddbaf | refs/heads/master | 2023-08-23T09:14:38.727662 | 2023-08-09T03:59:54 | 2023-08-09T03:59:54 | 192,689,401 | 623 | 215 | MIT | 2023-09-11T05:46:26 | 2019-06-19T08:17:20 | Python | UTF-8 | Python | false | false | 1,367 | py | exceptions.py | """Exceptions utils for InfluxDB."""
import logging
from urllib3 import HTTPResponse
logger = logging.getLogger('influxdb_client.client.exceptions')
class InfluxDBError(Exception):
"""Raised when a server error occurs."""
def __init__(self, response: HTTPResponse = None, message: str = None):
"""I... |
bf80cdaadf461faaff4ce353dcf3989c937710c6 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/smhi/const.py | cc1c4550723c40cd7b26446692240f7d5a38497a | [
"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 | 319 | py | const.py | """Constants in smhi component."""
from typing import Final
from homeassistant.components.weather import DOMAIN as WEATHER_DOMAIN
ATTR_SMHI_THUNDER_PROBABILITY: Final = "thunder_probability"
DOMAIN = "smhi"
HOME_LOCATION_NAME = "Home"
DEFAULT_NAME = "Weather"
ENTITY_ID_SENSOR_FORMAT = WEATHER_DOMAIN + ".smhi_{}"
|
182f730b80d36ddc7399951faa5294313805427a | 759b671e6b37617a2782f991d233d262e6a794ad | /skorch/history.py | da053188cf50e42bf387b331adfe9719e57f6897 | [
"BSD-3-Clause"
] | permissive | skorch-dev/skorch | 0412bb221cb7c39505208deaa12d4912ccf77a4d | b8185cf1f7ef196ecadd6df37f6875d638087e55 | refs/heads/master | 2023-08-29T12:54:02.021160 | 2023-08-28T19:18:26 | 2023-08-28T19:18:26 | 97,533,515 | 3,645 | 261 | BSD-3-Clause | 2023-09-07T16:21:03 | 2017-07-18T00:13:54 | Jupyter Notebook | UTF-8 | Python | false | false | 18,268 | py | history.py | """Contains history class and helper functions."""
import json
import pickle
from skorch.utils import open_file_like
# pylint: disable=invalid-name
class _none:
"""Special placeholder since ``None`` is a valid value."""
def _not_none(items):
"""Whether the item is a placeholder or contains a placeholder."... |
940829d0f49f5da38596c0164926a49d8f2162d5 | 4570d4339e498fa8caaaad6db7296704562d0532 | /python/automate-modeling-at-scale/params_box.py | 9474da84b5ea33fa785b26c3e521b5b845d749e7 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | sassoftware/sas-viya-programming | 81e024035a2fec55a17006672fd15069dcdfc8a5 | 947f16955fc7e94b73b5aa5a59010e90abd11130 | refs/heads/master | 2023-05-24T22:21:07.696235 | 2023-05-12T19:26:58 | 2023-05-12T19:26:58 | 62,091,838 | 146 | 154 | Apache-2.0 | 2023-03-25T01:24:58 | 2016-06-27T22:11:06 | Jupyter Notebook | UTF-8 | Python | false | false | 46,698 | py | params_box.py | # Jupyter widget for visual input of model parameters
import ipywidgets as widgets
from IPython.display import display
import copy
from ipywidgets import Layout
from xgboost import XGBClassifier
from sklearn.metrics import roc_curve
from sklearn.metrics import accuracy_score
import tensorflow as tf
from imblearn.over... |
02e25b5bf634f21c6e4cead14cf6696dac9443c1 | 2d6d5424e881252898b898fbfbc47fe1487371cf | /pyvista/core/utilities/transformations.py | 59eae4215db6a05f05fc7162dce8285e7ef24c28 | [
"MIT"
] | permissive | pyvista/pyvista | 333e55bfaa6b8bcdb47e2df04c823d35f05db364 | 1b450b23340f367315fc914075d551e0a4df8cc3 | refs/heads/main | 2023-08-20T08:04:27.146062 | 2023-08-20T01:14:03 | 2023-08-20T01:14:03 | 92,974,124 | 1,885 | 389 | MIT | 2023-09-14T21:09:28 | 2017-05-31T18:01:42 | Python | UTF-8 | Python | false | false | 9,689 | py | transformations.py | """Module implementing point transformations and their matrices."""
import numpy as np
def axis_angle_rotation(axis, angle, point=None, deg=True):
r"""Return a 4x4 matrix for rotation about any axis by given angle.
Rotations around an axis that contains the origin can easily be
computed using Rodrigues' ... |
e533c59fc43bfb033cb4fe4689b31268b2e1a18b | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-paypal-transaction/bin/fixture_helper.py | cf9d8d86e92ddc85331b7abc3af20f33037d352b | [
"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 | 2,037 | py | fixture_helper.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
import logging
from pprint import pprint
# %%
import requests
logging.basicConfig(level=logging.DEBUG)
# %%
specification = {
"client_id": "REPLACE_ME",
"secret": "REPLACE_ME",
"start_date": "2021-06-01T00:00:00+00:00",
"end_date": "2021-0... |
33465f8c2d841a69d3d71c7a33dc02e454e86c6d | e9f0510faac898afc09eb5bb664ac6048f72c33a | /py34/bacpypes/service/test.py | fb075ddaea47332ba30f7d99460a9c5732795b21 | [
"MIT"
] | permissive | JoelBender/bacpypes | c9ddf9a4f56dd0d012046a9e4ffad19bd580cb45 | a5be2ad5ac69821c12299716b167dd52041b5342 | refs/heads/master | 2023-05-28T05:03:17.980236 | 2023-05-10T05:33:01 | 2023-05-10T05:33:01 | 39,159,799 | 284 | 161 | MIT | 2023-05-15T15:11:27 | 2015-07-15T20:33:51 | Python | UTF-8 | Python | false | false | 284 | py | test.py | #!/usr/bin/env python
"""
Test Service
"""
from ..debugging import bacpypes_debugging, ModuleLogger
# some debugging
_debug = 0
_log = ModuleLogger(globals())
@bacpypes_debugging
def some_function(*args):
if _debug: some_function._debug("f %r", args)
return args[0] + 1
|
67d55d7aa2bf6638033d3b3bd6f139c6f204e342 | 11d0cc8470722b737ac1d83610f227ffb98ea71a | /old_code/fb_vweb.py | 0bf39c98a4efba2e57858cfa2b04d2b2b1690244 | [] | no_license | EdoardoCarlesi/PyRCODIO | d86e5298877f08b597f92a07aac0c9b634dbfa39 | d3f84efb7aeec0032ef6bde839fe9440ee82b392 | refs/heads/master | 2021-04-03T04:58:26.219884 | 2021-03-21T12:22:19 | 2021-03-21T12:22:19 | 125,036,704 | 148 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,624 | py | fb_vweb.py | from libcosmo.track_halos import *
from libcosmo.utils import *
from libcosmo.mtree import *
from libcosmo.units import *
from libcosmo.halos import *
from libcosmo.find_halo import *
from libcosmo.particles import *
from libcosmo.lg_plot import *
from libio.read_ascii import *
from libio.find_files import *
from pygad... |
b5b129250a95ab756a40858ea2b49ff30e3032e0 | 633121f5ef2a2a1f2ed89dbb255fd18cb7ca6087 | /marshmallow_jsonschema/__init__.py | 3e60b2ab980e44d4d8c60cc602a6392e4baf5c21 | [
"MIT"
] | permissive | fuhrysteve/marshmallow-jsonschema | fa255007232d24c9ed6c8057deafbfa6d4bf421f | 7446d3dffec8656d37151fd577b1330e2209b370 | refs/heads/master | 2023-03-15T18:50:27.713194 | 2023-03-14T20:59:29 | 2023-03-14T20:59:29 | 47,362,774 | 208 | 79 | MIT | 2023-04-22T21:45:36 | 2015-12-03T21:44:46 | Python | UTF-8 | Python | false | false | 256 | py | __init__.py | from pkg_resources import get_distribution
__version__ = get_distribution("marshmallow-jsonschema").version
__license__ = "MIT"
from .base import JSONSchema
from .exceptions import UnsupportedValueError
__all__ = ("JSONSchema", "UnsupportedValueError")
|
14a41ddc35022d1943f2e52a87d37b0a0913dffd | 8f267fe1157904023004aa1fcee8cdcaf1d69f74 | /tempest/lib/services/identity/v3/role_assignments_client.py | f6157097a0d84e1b377b8833d10004dd1f5989c7 | [
"Apache-2.0"
] | permissive | openstack/tempest | a65737f3e62d4ebeb7e387feac7bcc636d3f5fe0 | 3932a799e620a20d7abf7b89e21b520683a1809b | refs/heads/master | 2023-08-28T15:04:21.241805 | 2023-08-28T10:16:57 | 2023-08-28T10:16:57 | 2,356,406 | 270 | 407 | Apache-2.0 | 2022-06-29T15:52:45 | 2011-09-09T15:56:02 | Python | UTF-8 | Python | false | false | 1,793 | py | role_assignments_client.py | # Copyright 2016 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
d85b1cd26c6fe426a26482df5f15dab94c1c2b4f | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /HLTrigger/Configuration/python/HLT_75e33/modules/ticlTrackstersHAD_cfi.py | f6405f3c93083e74b54720c38c1e02c59e71487b | [
"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 | 3,358 | py | ticlTrackstersHAD_cfi.py | import FWCore.ParameterSet.Config as cms
ticlTrackstersHAD = cms.EDProducer("TrackstersProducer",
detector = cms.string('HGCAL'),
filtered_mask = cms.InputTag("filteredLayerClustersHAD","HAD"),
itername = cms.string('HAD'),
layer_clusters = cms.InputTag("hgcalMergeLayerClusters"),
layer_clusters_hf... |
3eb228815f6522e5f68f624081e08eb4f1433f48 | ffb0b623455f22af81a03eb52889bd1bfed50566 | /src/bandersnatch/tests/plugins/test_storage_plugins.py | 992507d98f5264b5076117aba99ba2c645c5eaf1 | [
"AFL-3.0"
] | permissive | pypa/bandersnatch | c5ba356caae55e4edb80005da625b04e7fb70500 | bf19ea547086c1b9dd997d1dc00081109b5cd626 | refs/heads/main | 2023-09-03T03:27:19.538217 | 2023-08-28T23:55:04 | 2023-08-28T23:55:04 | 133,377,409 | 405 | 157 | AFL-3.0 | 2023-09-13T10:46:33 | 2018-05-14T14:52:22 | Python | UTF-8 | Python | false | false | 36,275 | py | test_storage_plugins.py | import atexit
import contextlib
import datetime
import hashlib
import json
import mimetypes
import os
import pathlib
import shutil
import sys
import tempfile
import unittest
from collections.abc import Iterator
from pathlib import Path
from typing import TYPE_CHECKING, Any
from unittest import TestCase, mock
import ba... |
ebf9f06eba2aebf4c54d30ae1acde7678f2f8095 | 25c5d243ffac4b4f4f9efcd6a28cb41d51b23c90 | /scripts/staging/hmm/HMM.py | d9eb187128fe8009518e7198eb7cf0352d6aadc6 | [
"Apache-2.0"
] | permissive | apache/systemds | 5351e8dd9aa842b693e8c148cf3be151697f07a7 | 73555e932a516063c860f5d05c84e6523cc7619b | refs/heads/main | 2023-08-31T03:46:03.010474 | 2023-08-30T18:25:59 | 2023-08-30T18:34:41 | 45,896,813 | 194 | 167 | Apache-2.0 | 2023-09-13T08:43:37 | 2015-11-10T08:00:06 | Java | UTF-8 | Python | false | false | 2,536 | py | HMM.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... |
d3c6025f280687801a85a29d2bb13b26db1c9ae5 | 16d430421e56ef878bf0d39d873931ffdbf2a523 | /examples/plot_online_kmeans_s2.py | 51e8722afafef9ae4ebb4a6c835e09bc2aa081af | [
"MIT"
] | permissive | geomstats/geomstats | c0b24527e2b0c66f5dffdd40419660d5db84dc03 | 78a5778b5d5ce85225fd97e765d43047fb4526d1 | refs/heads/master | 2023-09-04T03:34:41.740174 | 2023-08-30T05:27:08 | 2023-08-30T05:27:08 | 108,200,238 | 1,017 | 237 | MIT | 2023-09-10T09:17:34 | 2017-10-25T00:44:57 | Jupyter Notebook | UTF-8 | Python | false | false | 1,476 | py | plot_online_kmeans_s2.py | """Plot the result of online K-means, i.e. optimal quantization.
This is online K-means of the von Mises Fisher distribution
on the sphere using online k-means clustering of a sample.
"""
import logging
import os
import matplotlib.pyplot as plt
import geomstats.visualization as visualization
from geomstats.geometry... |
89ed4a673c0e9917c9a8773ec37a9d73283a4f58 | 6cbbfda7ae42a23e8e82607612f9cd58b868ed1f | /benchmarks/scripts/cub/bench/bench.py | c9fae0cec115ac77fab4e3e4e8d6b32bf469309a | [
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown"
] | permissive | NVIDIA/cub | 4f8e5df5f2b0381d59f82f75ff6bf454daa99c33 | b2e8bccb8c0cd15279974fe4b9b8d6fcd1842b57 | refs/heads/main | 2023-09-04T10:53:03.540197 | 2023-06-22T14:12:46 | 2023-06-22T14:12:46 | 8,225,159 | 866 | 178 | BSD-3-Clause | 2023-09-07T18:07:33 | 2013-02-15T20:01:28 | Cuda | UTF-8 | Python | false | false | 16,346 | py | bench.py | import os
import json
import time
import fpzip
import signal
import itertools
import subprocess
import numpy as np
from .cmake import CMake
from .config import *
from .storage import Storage
from .score import *
from .logger import *
class JsonCache:
_instance = None
def __new__(cls):
if cls._instan... |
bf5893e5e0a28b55b2c50bae2446c0f4bb5a27f3 | c9bc99866cfab223c777cfb741083be3e9439d81 | /tools/gen_module_code.py | 2240397defa3151cf90610cef2a232c68af42b81 | [
"BSD-3-Clause"
] | permissive | ARM-software/SCP-firmware | 4738ca86ce42d82588ddafc2226a1f353ff2c797 | f6bcca436768359ffeadd84d65e8ea0c3efc7ef1 | refs/heads/master | 2023-09-01T16:13:36.962036 | 2023-08-17T13:00:20 | 2023-08-31T07:43:37 | 134,399,880 | 211 | 165 | NOASSERTION | 2023-09-13T14:27:10 | 2018-05-22T10:35:56 | C | UTF-8 | Python | false | false | 4,340 | py | gen_module_code.py | #!/usr/bin/env python3
#
# Arm SCP/MCP Software
# Copyright (c) 2015-2021, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Description:
# This tool takes a list of module names and generates two files:
# * fwk_modules_idx.h: Contains an enumeration giving the modules... |
6a80466ad407e58ea41549192f4e88546d940521 | 11cd362cdd78c2fc48042ed203614b201ac94aa6 | /apps/jobbrowser/src/jobbrowser/apis/beat_api.py | 1788f21113da8ebf97d6d6989d00f026ba5085d2 | [
"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 | 5,160 | py | beat_api.py | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
5957a5a79dcff037417f660ddc0867024aad40b5 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/services/core.py | 42334bb4f64d0514c99f16ccb186de94542881a3 | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 6,593 | py | core.py | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
aab0f694a1c24fbfa23813ac32583bc8a135d1b4 | 7678a802e83ba88cc0ca59066493a581cf3ae009 | /Giveme5W1H/extractor/root.py | 7e3412469133d73005fdf71a7cad6f7f6f4d9df6 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | fhamborg/Giveme5W1H | 152145eee92062ae227da910080bcd6c6b24db4a | 657738781fe387d76e6e0da35ed009ccf81f4290 | refs/heads/master | 2023-08-24T21:58:50.638812 | 2022-03-31T19:00:28 | 2022-03-31T19:00:28 | 91,314,968 | 495 | 95 | Apache-2.0 | 2023-08-15T09:10:43 | 2017-05-15T08:43:39 | HTML | UTF-8 | Python | false | false | 319 | py | root.py | import os
"""
the only purpose of this file is to resolve path always relative to this file,
because the python path system is a mess
"""
def path(x):
"""
return a path relative to the give file
:param x: a path
:return:
"""
return os.path.abspath(os.path.join(os.path.dirname(__file__), x))
|
752febf72d665b403c61ea4debdbdb1b09b09dee | 5917ffcb780cfcfe4e2b87b11fca1f68f387b239 | /plenum/test/primary_selection/test_add_node_to_pool_with_large_ppseqno.py | 7832d83b05424b132c840c82ded8d37f81966527 | [
"Apache-2.0"
] | permissive | hyperledger/indy-plenum | 6ff9f705af80dfa28d4cb92743683f78bb937aa3 | 698b9500ad3a7a15993af72a1c35a406c5673262 | refs/heads/main | 2023-08-29T01:32:26.384729 | 2023-06-20T16:42:11 | 2023-06-20T16:42:11 | 51,585,028 | 171 | 420 | Apache-2.0 | 2023-06-20T16:42:14 | 2016-02-12T12:03:16 | Python | UTF-8 | Python | false | false | 3,567 | py | test_add_node_to_pool_with_large_ppseqno.py | import pytest
from plenum.common.messages.node_messages import Checkpoint
from plenum.common.util import randomString
from plenum.test.helper import get_pp_seq_no
from plenum.test.node_request.helper import sdk_ensure_pool_functional
from plenum.test.view_change.helper import ensure_several_view_change
from plenum.tes... |
b304c8220ce53437ca1bfd7c0a290a5b2559f3b6 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/testRunner/env/pytest/testdir/test_foo.py | 34be752486d5bf27c422aa4f6a726abb4f07da14 | [
"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 | 181 | py | test_foo.py | pytest_plugins = "pytester"
def test_foo(testdir):
testdir.makefile(".py", test_bar="""
def test_bar():pass
""")
res = testdir.runpytest()
assert res.ret == 0
|
d0cf5a0eb6f33bd50d947b1e6d60d460472017b8 | 68a76875beffd7636bb6913f8e97b83b1638a3cb | /flaskshop/dashboard/views/discount.py | e4f8f7eaecc1ffddddf46ca93db301efb9a5e22f | [] | 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 | 3,666 | py | discount.py | from flask import redirect, render_template, request, url_for, flash
from flask_babel import lazy_gettext
from flaskshop.constant import DiscountValueTypeKinds, VoucherTypeKinds
from flaskshop.dashboard.forms import SaleForm, VoucherForm
from flaskshop.dashboard.utils import wrap_partial, item_del
from flaskshop.disco... |
f20a45fe18b5dffc8183d479967d55a624d58265 | 150a7b11cb531f8bc2a045aefcf2ebe1d151efa3 | /tests/manage/monitoring/prometheus/test_alerting_works.py | eb465ea0f902316cb289421fed5eb520c29b1cea | [
"MIT"
] | permissive | red-hat-storage/ocs-ci | c7ac414e1b86552da0439223dfa9bca39977f31a | 5e9e504957403148e413326f65c3769bf9d8eb39 | refs/heads/master | 2023-08-17T16:19:51.154403 | 2023-08-17T13:27:12 | 2023-08-17T13:27:12 | 179,558,938 | 146 | 210 | MIT | 2023-09-14T16:38:44 | 2019-04-04T19:00:02 | Python | UTF-8 | Python | false | false | 1,365 | py | test_alerting_works.py | import logging
import pytest
from ocs_ci.framework.pytest_customization.marks import bugzilla, tier1
from ocs_ci.ocs import constants
from ocs_ci.ocs.ocp import OCP
import ocs_ci.utility.prometheus
log = logging.getLogger(__name__)
def test_alerting_works():
"""
If alerting works then there is at least on... |
2493f064f2f4ee7fc54b28c4f90cf90f20593890 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Spacy/source2.7/tqdm/__init__.py | d6b251fe7ecbbec5ca9efc8c92aa006f918b5a0d | [
"MIT"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 1,268 | py | __init__.py | from ._tqdm import tqdm
from ._tqdm import trange
from ._tqdm_gui import tqdm_gui
from ._tqdm_gui import tgrange
from ._tqdm_pandas import tqdm_pandas
from ._main import main
from ._monitor import TMonitor, TqdmSynchronisationWarning
from ._version import __version__ # NOQA
from ._tqdm import TqdmTypeError, TqdmKeyErr... |
30ecf21b84158aba82b08a1850734fca1d410ed6 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/mako/mako/test/module_to_import.py | 11ffb986471eb465cf6bec91e8c5847ebbb05134 | [
"LicenseRef-scancode-proprietary-license",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"Apache-2.0"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 30 | py | module_to_import.py | def some_function():
pass
|
dd1a045a3cc95baf6c8837c5ec46b5b89cbd27d5 | d7febe73a54d1d3cefa63b7d120593908d7bb9fa | /stevedore/named.py | 1be3922b3f7d5d58d0bc70b23eeb53a2cb62771f | [
"Apache-2.0"
] | permissive | openstack/stevedore | 9b2122630d51ce28746761aea9964ea34292c663 | 2d99cccf9a6c04509785e76a5c8e89ae2824c939 | refs/heads/master | 2023-09-03T22:50:10.026655 | 2023-05-08T11:15:48 | 2023-05-08T11:15:48 | 16,626,958 | 172 | 45 | Apache-2.0 | 2021-08-30T06:16:32 | 2014-02-07T20:45:48 | Python | UTF-8 | Python | false | false | 7,234 | py | named.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 u... |
f4a6c38da122cf7e222e0864a0ce15433fa0265c | f5f7f333d578925d808dff68ce8f5c31386fe37f | /notebooks/abstract_model.py | 1ec03a06e48c5fd5e97321cd6c099e979896eba1 | [
"MIT"
] | permissive | cemoody/simple_mf | a56c50b40ac6c60c4f4012d5d70f8a11bd41a6b9 | 328350a98389e141b890717146974e8cb14a6338 | refs/heads/master | 2022-04-30T19:36:52.843479 | 2022-04-22T19:44:46 | 2022-04-22T19:44:46 | 144,871,925 | 131 | 42 | MIT | 2022-03-18T20:03:17 | 2018-08-15T15:40:09 | Jupyter Notebook | UTF-8 | Python | false | false | 1,696 | py | abstract_model.py | import torch
import numpy as np
from random import shuffle
from torch import from_numpy
import pytorch_lightning as pl
from torch.utils.data import DataLoader
from torch.utils.data import TensorDataset
from torch.utils.data import BatchSampler
from torch.utils.data import RandomSampler
class AbstractModel(pl.Lightnin... |
f757c8872da6b8876f950f14f4dd2d1dd2e49523 | 65078b8087c2040cf0188e2550ea298d20518f62 | /src/bentoml/_internal/monitoring/base.py | fecd5b8693f9af202956337ccffb5be052ea9247 | [
"Apache-2.0"
] | permissive | bentoml/BentoML | 20ab6f8351b1c5cd116d6d60a28098246a1581b3 | 4a14f073d8a3e700aff29483b17ea053058c0c63 | refs/heads/main | 2023-09-05T16:03:08.909692 | 2023-09-04T18:54:33 | 2023-09-04T18:54:33 | 178,976,529 | 5,712 | 732 | Apache-2.0 | 2023-09-14T20:07:54 | 2019-04-02T01:39:27 | Python | UTF-8 | Python | false | false | 5,758 | py | base.py | from __future__ import annotations
import collections
import contextvars
import logging
import typing as t
MON_COLUMN_VAR: contextvars.ContextVar[
"dict[str, dict[str, str]] | None"
] = contextvars.ContextVar("MON_COLUMN_VAR", default=None)
MON_DATAS_VAR: contextvars.ContextVar[
"dict[str, collections.deque[t... |
5d1e1c88ffd6d19e0051759b01ddca08071265f4 | b2fef77e77f77b6cfd83da4ec2f89cbe73330844 | /monai/networks/blocks/warp.py | 10a115eff8c2994860799745869462fce49fa8a1 | [
"Apache-2.0"
] | permissive | Project-MONAI/MONAI | 8ef2593cc5fd1cd16e13464f927fe563fe3f5bac | e48c3e2c741fa3fc705c4425d17ac4a5afac6c47 | refs/heads/dev | 2023-09-02T00:21:04.532596 | 2023-09-01T06:46:45 | 2023-09-01T06:46:45 | 214,485,001 | 4,805 | 996 | Apache-2.0 | 2023-09-14T15:19:30 | 2019-10-11T16:41:38 | Python | UTF-8 | Python | false | false | 6,656 | py | warp.py | # Copyright (c) MONAI Consortium
# 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, so... |
4b5b14319fe5f3e83454032d550c6ad53e987f02 | e22fd36933c9114a9df1694e7a6274bf059de2a6 | /selfdrive/controls/tests/test_leads.py | bd8baf096e21aa12c4cb3e6026e26773a0eda21e | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | commaai/openpilot | 66dfb7f31290bc8f58c9ead95d56697a52b45afb | a0b49d54222c52ff0112c402bc0e0d9262e77a66 | refs/heads/master | 2023-09-05T21:34:14.076796 | 2023-09-05T21:15:18 | 2023-09-05T21:15:18 | 74,627,617 | 46,071 | 9,878 | MIT | 2023-09-14T21:51:23 | 2016-11-24T01:33:30 | Python | UTF-8 | Python | false | false | 1,296 | py | test_leads.py | #!/usr/bin/env python3
import unittest
import cereal.messaging as messaging
from selfdrive.test.process_replay import replay_process_with_name
from selfdrive.car.toyota.values import CAR as TOYOTA
class TestLeads(unittest.TestCase):
def test_radar_fault(self):
# if there's no radar-related can traffic, radard... |
da56ec3299fbe15bc74bd6149691bdcbd1ec413e | 069c2295076c482afadfe6351da5ae02be8e18e6 | /tests/forms_tests/models.py | d6d0725b32b3697369f12a7e150c35276ac0a583 | [
"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 | 3,399 | py | models.py | import datetime
import itertools
import tempfile
from django.core.files.storage import FileSystemStorage
from django.db import models
callable_default_counter = itertools.count()
def callable_default():
return next(callable_default_counter)
temp_storage = FileSystemStorage(location=tempfile.mkdtemp())
class... |
483941f6774d3b0d2756287d91e954435fe384f6 | 2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5 | /src/frontends/paddle/tests/test_models/gen_scripts/generate_where_index.py | 369162cbdba38ee6a221eda8b1cbcf22cbdbd7c1 | [
"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 | 2,180 | py | generate_where_index.py | # Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# where paddle model generator
#
import numpy as np
from save_model import saveModel
import sys
import paddle
paddle.enable_static()
def where_index(name: str, x, force_boolean=False):
with paddle.static.program_guard(paddle.sta... |
e51cc77e3c735be792b9fd5c034ceb137ff784df | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /checkov/cloudformation/checks/resource/aws/APIGatewayV2AccessLogging.py | a1fa1cfdf7c3f05585a6aa41dce3f6039e24f461 | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 816 | py | APIGatewayV2AccessLogging.py | from checkov.cloudformation.checks.resource.base_resource_value_check import BaseResourceValueCheck
from checkov.common.models.enums import CheckCategories
from checkov.common.models.consts import ANY_VALUE
class APIGatewayV2AccessLogging(BaseResourceValueCheck):
def __init__(self):
name = "Ensure API Gat... |
079df5d25e127d1d676bbfa15eb965b3044ba599 | b2bcf07493b5a1bbfb7e29c7f13ac0b380cefead | /deprecated/scripts/shrinkcov_plots.py | 4e96f1124518fd438c9083129be94e6a271f982e | [
"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 | 2,795 | py | shrinkcov_plots.py | # Based on https://github.com/probml/pmtk3/blob/master/demos/shrinkcovDemo.m
# Converted by John Fearns - jdf22@infradead.org
# Demo of the quality of shrinkage estimation of a covariance matrix
import superimport
import numpy as np
import matplotlib.pyplot as plt
from pyprobml_utils import save_fig
# Ensure stochas... |
2c0ab3ad228718c318c325aa5d4ac025523aedde | e210c28eeed9d38eb78c14b3a6388eca1e0e85d8 | /nvflare/fuel/f3/qat/net_config.py | 40130ae2db086af440ade3dbea23316965c08e51 | [
"Apache-2.0"
] | permissive | NVIDIA/NVFlare | 5a2d2e4c85a3fd0948e25f1ba510449727529a15 | 1433290c203bd23f34c29e11795ce592bc067888 | refs/heads/main | 2023-08-03T09:21:32.779763 | 2023-07-05T21:17:16 | 2023-07-05T21:17:16 | 388,876,833 | 442 | 140 | Apache-2.0 | 2023-09-14T19:12:35 | 2021-07-23T17:26:12 | Python | UTF-8 | Python | false | false | 1,562 | py | net_config.py | # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
cb9e3a7c1955a5836299f31abcc6447b0c9f059c | bdf7fa08c8e623641dca6f30c2b5bc4bdb23e773 | /electrum/plugins/jade/__init__.py | a09bcd2e110fc766af7df91c1647ab75a44f13b7 | [
"MIT"
] | permissive | spesmilo/electrum | d6cbfdeca60a347c60b6b0426ba567a21128193e | a740a20fc2677d54e99fa981b7968b877a7b53a3 | refs/heads/master | 2023-09-04T01:30:19.633217 | 2023-09-01T13:44:24 | 2023-09-01T13:44:24 | 5,274,894 | 7,132 | 2,516 | MIT | 2023-09-10T08:51:24 | 2012-08-02T16:24:30 | Python | UTF-8 | Python | false | false | 268 | py | __init__.py | from electrum.i18n import _
fullname = 'Blockstream Jade Wallet'
description = 'Provides support for the Blockstream Jade hardware wallet'
#requires = [('', 'github.com/')]
registers_keystore = ('hardware', 'jade', _("Jade wallet"))
available_for = ['qt', 'cmdline']
|
17119f1ab05f7041f992403af02c4eefae3829f9 | 61b1380f8e6cc00a2dcab0280deff8c18c4812c2 | /pydis_site/apps/api/migrations/0011_auto_20181020_1904.py | bb5a63251aec773777991fb4fb6441ed441d8f33 | [
"MIT"
] | permissive | python-discord/site | 969ada9c7d70edeaadb781e630c8896b4a207f90 | cb6326cabee6570a5725702cb2893ae39f752279 | refs/heads/main | 2023-09-04T07:17:58.116382 | 2023-08-31T14:20:38 | 2023-08-31T14:20:38 | 120,370,405 | 746 | 224 | MIT | 2023-09-14T10:23:08 | 2018-02-05T22:31:04 | Python | UTF-8 | Python | false | false | 450 | py | 0011_auto_20181020_1904.py | # Generated by Django 2.1.2 on 2018-10-20 19:04
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0010_snakeidiom'),
]
operations = [
migrations.AlterField(
model_name='snakeidiom',
name='idiom',
... |
2dc5a553e29ce309605e1cfe9c007a58ba6e37e8 | 06f65e7b12be94c6210b358aef06bb51f02e9ded | /pyscreenshot/plugins/gnome_dbus.py | 4becac6857e0ffe29b929589c1670217c2be75a1 | [
"BSD-2-Clause"
] | permissive | ponty/pyscreenshot | 17a5f91eddbf6fcf7568a15f959749e7a8c09a74 | c9f6051fe339b4b4c59ef75aa17140211e51606f | refs/heads/master | 2023-03-12T10:28:08.054142 | 2023-03-12T06:38:57 | 2023-03-12T06:38:57 | 1,316,096 | 473 | 93 | BSD-2-Clause | 2023-03-11T13:36:12 | 2011-02-01T13:02:51 | Python | UTF-8 | Python | false | false | 2,476 | py | gnome_dbus.py | import logging
from pyscreenshot.plugins.backend import UNKNOWN_VERSION, CBackend
from pyscreenshot.tempexport import read_func_img
log = logging.getLogger(__name__)
class GnomeDBusError(Exception):
pass
class GnomeDBusWrapper(CBackend):
name = "gnome_dbus"
is_subprocess = True
def grab(self, bbo... |
2d03aec6a5e5cea9b13e4376415c5aee83bfb839 | 5ef8d88edec24bec573e53bb6e28bcddd060e701 | /calibration/utils.py | f462f252a6c29f03fe33c7d765390615559d7048 | [
"MIT"
] | permissive | p-lambda/verified_calibration | 7d14c2915543f302d4403257709cf87213dd1a8e | ee81c346895e3377653bd347c429a95bd631058d | refs/heads/master | 2022-11-25T05:30:39.863750 | 2022-11-10T22:09:24 | 2022-11-10T22:09:24 | 216,448,197 | 112 | 21 | MIT | 2022-11-10T22:09:25 | 2019-10-21T00:45:08 | Python | UTF-8 | Python | false | false | 22,268 | py | utils.py |
import bisect
from typing import List, Tuple, NewType, TypeVar
import numpy as np
import pickle
from sklearn.linear_model import LogisticRegression
# Define data types.
Data = List[Tuple[float, float]] # List of (predicted_probability, true_label).
Bins = List[float] # List of bin boundaries, excluding 0.0, but in... |
06be3241061cc2c03e4552f89ad2ad7f570e71f5 | b26c41926fa3a7c2c061132d80e91a2750f2f468 | /tensorflow_probability/python/internal/auto_composite_tensor.py | a61aa3638b837d34e117005494e9dd94aee0a025 | [
"Apache-2.0"
] | permissive | tensorflow/probability | 22e679a4a883e408f8ef237cda56e3e3dfa42b17 | 42a64ba0d9e0973b1707fcd9b8bd8d14b2d4e3e5 | refs/heads/main | 2023-09-04T02:06:08.174935 | 2023-08-31T20:30:00 | 2023-08-31T20:31:33 | 108,053,674 | 4,055 | 1,269 | Apache-2.0 | 2023-09-13T21:49:49 | 2017-10-23T23:50:54 | Jupyter Notebook | UTF-8 | Python | false | false | 30,700 | py | auto_composite_tensor.py | # Copyright 2020 The TensorFlow Probability 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 o... |
341f6065b261cd5eade1e1da9b654412573950ee | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /ai/mmdetection/tests/test_models/test_roi_heads/test_scnet_roi_head.py | 9f14530ba7be05ae1cf3903402ff98055a25eb5a | [
"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 | 4,592 | py | test_scnet_roi_head.py | # Copyright (c) OpenMMLab. All rights reserved.
import unittest
from unittest import TestCase
import torch
from parameterized import parameterized
from mmdet.models.roi_heads import SCNetRoIHead # noqa
from mmdet.registry import MODELS
from mmdet.testing import demo_mm_inputs, demo_mm_proposals, get_roi_head_cfg
c... |
b7ae185e427c9189b744359b4e1897adbb30a32e | e4e7461d012360b32779a851f8734c0a18289bf1 | /tests/logic/alias_test.py | 55e07dbaf66116bd03fa2cf1164ed541b78e101f | [
"MIT"
] | permissive | Yelp/love | 3650755da9e6cae20b1a0ea98d580daad0aab6b6 | f9f1c47616c247c20110f60a876049d9908d0e03 | refs/heads/master | 2023-09-04T09:53:46.720336 | 2021-11-08T19:10:51 | 2021-11-08T19:10:51 | 55,083,938 | 165 | 41 | MIT | 2023-05-01T20:16:11 | 2016-03-30T17:41:25 | Python | UTF-8 | Python | false | false | 1,438 | py | alias_test.py | # -*- coding: utf-8 -*-
import unittest
import logic.alias
from models import Alias
from testing.factories import create_alias_with_employee_username
from testing.factories import create_employee
class AliasTest(unittest.TestCase):
nosegae_datastore_v3 = True
def test_get_alias(self):
create_employ... |
d7e93e5db7e380ff901e6fbbe87f74dbc4ac84d6 | 69d0fc881923e1702d2b887ee9e60a6924f92712 | /main.py | 3d0fdfe31bb4b4862aeb218ee58d9f88890e1260 | [
"MIT"
] | permissive | lfz/DSB2017 | 5c8ca9fc66fa1cf1ce0306f6e0d9c6f20bccd5fa | 0ac3eb9f383bf0127c587e0502c59ac84d9ba6a2 | refs/heads/master | 2023-07-06T01:25:29.692511 | 2023-06-28T10:35:43 | 2023-06-28T10:35:43 | 90,292,301 | 1,355 | 522 | null | 2017-11-10T21:10:19 | 2017-05-04T17:48:05 | Python | UTF-8 | Python | false | false | 3,441 | py | main.py | from preprocessing import full_prep
from config_submit import config as config_submit
import torch
from torch.nn import DataParallel
from torch.backends import cudnn
from torch.utils.data import DataLoader
from torch import optim
from torch.autograd import Variable
from layers import acc
from data_detector import Dat... |
3501fc7ee9ba23c225e8335846106baf61181364 | 7d52b1853b4099ee96e5c44296d2ab30d9ccea47 | /pkg/win32/mod_tools/tools/scripts/Units.py | 3ff078d2bdadb384cbb67abe1500c5d489529a54 | [
"MIT"
] | permissive | kleientertainment/ds_mod_tools | 858e81c2b48b2025516cc499a061248230689a50 | 3fe0cad89848c9d0fca8a4139a0491d188497636 | refs/heads/master | 2023-05-26T02:33:34.069420 | 2021-02-08T15:00:32 | 2021-02-08T15:00:32 | 13,852,231 | 129 | 37 | NOASSERTION | 2023-05-14T10:35:21 | 2013-10-25T05:25:15 | Python | UTF-8 | Python | false | false | 26 | py | Units.py | PixelsPerMeter = 150.0
|
e7b7a878f4d2733e1e47789ae166dc8ace095f96 | 091a6200be74bf6577c86f623665bcc24e16b02b | /Owl_IR_TV_Remote/code.py | 44647fb29586f6d4d2c8a6a712e3a7cb52fb5e82 | [
"MIT"
] | permissive | adafruit/Adafruit_Learning_System_Guides | b5f7bce40a16da64e7a79d4b39de032f2cca41d4 | 5eaa7a15a437c533b89f359a25983e24bb6b5438 | refs/heads/main | 2023-09-05T18:31:41.621956 | 2023-09-05T15:36:09 | 2023-09-05T15:36:09 | 105,065,494 | 937 | 937 | MIT | 2023-09-12T18:48:53 | 2017-09-27T20:22:44 | C | UTF-8 | Python | false | false | 2,593 | py | code.py | # SPDX-FileCopyrightText: 2022 Liz Clark for Adafruit Industries
# SPDX-License-Identifier: MIT
import array
import pulseio
import board
from digitalio import DigitalInOut, Direction, Pull
from adafruit_debouncer import Debouncer
import neopixel
# button setup with Debouncer
pin = DigitalInOut(board.A2)
pin.directio... |
a831a9da4cacc155bc040dde925283ac271bc581 | ea7e87037d0a859250b3b0768fe657ab8520c8be | /Python/tigre/utilities/io/__init__.py | 69ce932eea6b37fefbaf320284f8db208d9d0fb7 | [
"BSD-3-Clause"
] | permissive | CERN/TIGRE | 80e99d4a49a2af2ec2248db8be3c48142df37134 | aa4651538e9bce7d0fee2cd2fcf0baa9fcb2ae19 | refs/heads/master | 2023-09-03T15:12:02.100453 | 2023-08-16T09:54:34 | 2023-08-16T09:54:34 | 61,034,131 | 473 | 194 | BSD-3-Clause | 2023-09-11T11:41:49 | 2016-06-13T12:22:21 | MATLAB | UTF-8 | Python | false | false | 137 | py | __init__.py | from .NikonDataLoader import NikonDataLoader
from .BrukerDataLoader import BrukerDataLoader
from .YXLONDataLoader import YXLONDataLoader
|
d247a270d1b9159cb2a327db6b6df003df2e4d0e | 2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5 | /src/frontends/onnx/tests/tests_python/utils/model_importer.py | bacc0a7ab83cee1eadb7f83049ac9ea2dd4c7b7d | [
"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 | 7,125 | py | model_importer.py | # -*- coding: utf-8 -*-
# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import onnx
import onnx.backend.test
import unittest
import dataclasses
from collections import defaultdict, namedtuple
from onnx import numpy_helper, NodeProto, ModelProto
from onnx.backend.ba... |
4a8c55e2498a192f658138f0a18213e9156e15ba | e5beafe9aac8a90eb360ca46628d547d5c50677c | /tests/api/test_auth.py | aebe2376dcbe2ffa1ebc1899d6cb31cc0c20f7ce | [
"MIT"
] | permissive | flask-dashboard/Flask-MonitoringDashboard | 84c3a479d6eb2bc16201984d3988e52091b23208 | bd41a2396d0770ad14e5b739db42c69ecd85cd49 | refs/heads/master | 2023-09-01T03:09:12.583145 | 2023-08-22T21:16:55 | 2023-08-22T21:16:55 | 87,939,708 | 747 | 168 | MIT | 2023-08-22T21:07:23 | 2017-04-11T13:50:14 | Python | UTF-8 | Python | false | false | 6,787 | py | test_auth.py | import uuid
import pytest
from flask_monitoringdashboard.database import User
BAD_REQUEST = 400
@pytest.mark.parametrize('user__is_admin', [False])
def test_users_guest(dashboard_user):
response = dashboard_user.get('dashboard/api/users')
assert response.status_code == 200
assert response.json == []
... |
bbe155900cbfa15f64b2764a158876f443d7b646 | bd1226fc185cb96ec2725d973cc550d7edd3f1b8 | /tests/test_only.py | f3245fc994a5a42af456843790b2bee5a765a95a | [
"Apache-2.0"
] | permissive | tortoise/tortoise-orm | bf56d74a9b7f714f21fc7fcff483a9b9494ccc93 | c030c9cebd7aba2697832d9c4769428805238f73 | refs/heads/develop | 2023-09-02T21:23:33.979954 | 2023-08-30T02:01:45 | 2023-08-30T02:01:45 | 127,320,882 | 3,964 | 442 | Apache-2.0 | 2023-08-30T13:56:28 | 2018-03-29T16:52:10 | Python | UTF-8 | Python | false | false | 2,598 | py | test_only.py | from tests.testmodels import SourceFields, StraightFields
from tortoise.contrib import test
from tortoise.exceptions import IncompleteInstanceError
class TestOnlyStraight(test.TestCase):
async def asyncSetUp(self) -> None:
await super(TestOnlyStraight, self).asyncSetUp()
self.model = StraightField... |
e6ec6b00f06dabaf7d71cff63388acb27448ff17 | 6181fcd4a266d963a0ee85971768c97922ca77cd | /src/garage/envs/dm_control/dm_control_env.py | 5c47b4634f079ab38b2aa96eeb733733b1b4de54 | [
"MIT"
] | permissive | rlworkgroup/garage | 5d215bbecb3a4e74b504988d6684a7b04df69a80 | 2d594803636e341660cab0e81343abbe9a325353 | refs/heads/master | 2023-08-21T22:58:49.338034 | 2023-01-04T06:06:27 | 2023-01-04T06:06:27 | 136,846,372 | 1,832 | 363 | MIT | 2023-09-11T11:36:40 | 2018-06-10T21:31:23 | Python | UTF-8 | Python | false | false | 6,592 | py | dm_control_env.py | """DM control environment."""
import akro
from dm_control import suite
from dm_control.rl.control import flatten_observation
from dm_env import StepType as dm_StepType
import numpy as np
from garage import Environment, EnvSpec, EnvStep, StepType
from garage.envs.dm_control.dm_control_viewer import DmControlViewer
de... |
42196b974b55cba7442f56a347acf323dc5a72bc | 9a60f186cc6f30db1c23b86ecec6ca91434955e3 | /src/tools/eval_kitti_track/munkres.py | 2a1965a289ba506644ef3aac943153ef73965834 | [
"LicenseRef-scancode-proprietary-license",
"MIT",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | xingyizhou/CenterTrack | 4afd447d22681cd5d31f104d5280cc00828c141b | e4e7534cc2ebfbd31e0cde680988f286c65fe34f | refs/heads/master | 2023-03-16T17:03:16.987445 | 2022-11-16T06:12:04 | 2022-11-16T06:12:04 | 252,565,065 | 2,399 | 590 | MIT | 2023-03-11T23:58:03 | 2020-04-02T21:11:47 | Python | UTF-8 | Python | false | false | 24,941 | py | munkres.py | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# Documentation is intended to be processed by Epydoc.
"""
Introduction
============
The Munkres module provides an implementation of the Munkres algorithm
(also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
useful for solving the Assignment Problem... |
8d6b48b47359747dde518b35404e865fe9e361f5 | 50d9229ef110418e273552209133a7432ce3118a | /Solutions/CofenseIntelligence/Data Connectors/CofenseIntelligenceDataConnector/CofenseToSentinel/cofense_to_sentinel_mapping.py | f793da7f803a1dc582998dc1de5c810a5d5fb344 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | Azure/Azure-Sentinel | c441c8fa371371077b396f374d843e2598c1796b | 4536a3f6b9bdef902312b3d96f9c2e66b8bf52c1 | refs/heads/master | 2023-08-28T00:24:46.490167 | 2023-08-25T11:13:44 | 2023-08-25T11:13:44 | 145,183,271 | 3,697 | 2,758 | MIT | 2023-09-14T21:53:20 | 2018-08-18T02:25:15 | Jupyter Notebook | UTF-8 | Python | false | false | 2,820 | py | cofense_to_sentinel_mapping.py | """This file contains methods for mapping between cofense and sentinel."""
import inspect
from ..SharedCode import consts
from ..SharedCode.logger import applogger
from ..SharedCode.cofense_intelligence_exception import CofenseIntelligenceException
def map_indicator_fields(indicator):
"""Map indicator fields for ... |
5be6636814d2977ff8e589b97dbc68edc7189715 | 2d060e1cedc1ca6224e7ff9e8236c015489456aa | /src/pychatgpt/main.py | 2798402ce48c5643cb18555f2abcb4dfc18aaf38 | [
"MIT"
] | permissive | rawandahmad698/PyChatGPT | bb37dc411fb960aeecdf97f43ae4a6492c5f5c80 | a00babdad3ccb97d4c7aba622a16917a5d3bcf55 | refs/heads/master | 2023-01-18T23:58:46.247209 | 2023-01-05T19:45:36 | 2023-01-05T19:45:36 | 574,428,530 | 4,143 | 454 | MIT | 2022-12-11T19:01:49 | 2022-12-05T09:41:51 | Python | UTF-8 | Python | false | false | 13,753 | py | main.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Builtins
import sys
import time
import os
from queue import Queue
from typing import Tuple
# Local
from .classes import openai as OpenAI
from .classes import chat as ChatHandler
from .classes import spinner as Spinner
from .classes import exceptions as Exceptions
# Fa... |
b6753d211cf5d497b9fa2d1d02086a04ff413c70 | 50203b4a349dcb2ed1e72c9f5463d84db8a6e983 | /skyline/webapp/api_get_fp_timeseries.py | 29a02eea135a1eeaab0beb53f06593cc3d7f1528 | [
"MIT"
] | permissive | earthgecko/skyline | 97e43df824d7c92d68086f529f0f3d051a7debb0 | c2edc451e63d5eb57117ddcfbc6e79100e706460 | refs/heads/master | 2023-08-30T08:36:50.740285 | 2023-06-28T15:33:47 | 2023-06-28T15:33:47 | 20,475,900 | 482 | 74 | NOASSERTION | 2023-06-28T15:33:49 | 2014-06-04T08:33:15 | Python | UTF-8 | Python | false | false | 8,033 | py | api_get_fp_timeseries.py | """
api_get_fp_timeseries.py
"""
import logging
# @added 20220722 - Task #4624: Change all dict copy to deepcopy
import copy
from flask import request
from functions.database.queries.get_ionosphere_fp_row import get_ionosphere_fp_db_row
from functions.metrics.get_base_name_from_metric_id import get_base_name_from_met... |
082bd059c13959bf3f3c8d9e513abb49e860e484 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowIdprom/cli/equal/golden_output1_expected.py | a0826e18ea167289453a865d0439d62cb7d4631f | [
"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 | 12,312 | py | golden_output1_expected.py | expected_output = {
"switch": {
"1": {
"fantray_idprom": {
"0": {
"clei_code": "TBD",
"controller_type": "4421",
"deviation_number": 0,
"hardware_revision": "0.1",
"manufacturing_t... |
a07a97b8ae54e88042327f3693ff60a8326fd032 | 59886a1143cc4043b19e398fae1fddb5742b4b55 | /src/main/python/rlbot/botmanager/bot_helper_process.py | 251ff581f1f4c0e65fa5269333ba30786be44478 | [
"MIT"
] | permissive | RLBot/RLBot | a6c4f502403f02822b3e4078b27583226584432e | c2f7c9a07911691b112b5338008e2ec932e7aee0 | refs/heads/master | 2023-08-16T06:04:35.384448 | 2023-07-01T11:21:26 | 2023-07-01T11:21:26 | 80,671,678 | 482 | 138 | MIT | 2023-07-01T11:21:28 | 2017-02-01T22:36:52 | Python | UTF-8 | Python | false | false | 855 | py | bot_helper_process.py | from multiprocessing import Event, Queue
class BotHelperProcess:
"""
This is a base class for a process that can be shared by two or more bots. For example, if those bots are using
a non-python language like Scratch or Java, the bots will likely want to share a single process that interfaces
with that... |
b4f857934c5cd7071322716442237c265f908d8e | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /src/transformers/models/speech_encoder_decoder/convert_mbart_wav2vec2_seq2seq_original_to_pytorch.py | 89690a5729c9dd90de105d0659e7c3d9b1d86f57 | [
"Apache-2.0"
] | permissive | huggingface/transformers | ccd52a0d7c59e5f13205f32fd96f55743ebc8814 | 4fa0aff21ee083d0197a898cdf17ff476fae2ac3 | refs/heads/main | 2023-09-05T19:47:38.981127 | 2023-09-05T19:21:33 | 2023-09-05T19:21:33 | 155,220,641 | 102,193 | 22,284 | Apache-2.0 | 2023-09-14T20:44:49 | 2018-10-29T13:56:00 | Python | UTF-8 | Python | false | false | 14,754 | py | convert_mbart_wav2vec2_seq2seq_original_to_pytorch.py | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# 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... |
cb58dc5ebf25081ee3d06a2ed467e3bc084f33c7 | 41198b450282c36a1d39f361dd99fe423de989da | /mantraml/models/pytorch/callbacks.py | 60d87c71aa598ef77e82c09874fffa9041638a51 | [
"Apache-2.0"
] | permissive | RJT1990/mantra | 4ff49742e68471a11fc6b6060a9b8b1cd3ab3b88 | 7db4d272a1625c33eaa681b8c2e75c0aa57c6952 | refs/heads/master | 2022-12-10T07:29:27.803262 | 2019-12-10T23:05:23 | 2019-12-10T23:05:23 | 146,776,545 | 332 | 22 | Apache-2.0 | 2022-12-08T03:00:07 | 2018-08-30T16:25:10 | Python | UTF-8 | Python | false | false | 2,348 | py | callbacks.py | import matplotlib.pyplot as plt
import os
import torch
class EvaluateTask:
def __init__(self, mantra_model):
task = mantra_model.task
if task:
task.latest_loss = task.evaluate(mantra_model)
print('%s: %s' % (task.evaluation_name, task.latest_loss))
if hasat... |
a00a8bf9d6d28abf7d0681e2bdd7e922d1548d35 | 7be9b6b58a91f6656909851b1fa846b48c3d59c7 | /icecream/coloring.py | b577be354ab1304d6661ce2e253abacadff0e094 | [
"MIT",
"Unlicense"
] | permissive | gruns/icecream | 114380e4cb719865af60378351b6fe0943ad8150 | fc409817197f2c1e23cc5f0fe4d9e7ba9d6e6ad6 | refs/heads/master | 2023-08-22T04:42:33.766024 | 2022-12-04T22:09:17 | 2022-12-04T22:09:17 | 121,422,840 | 7,076 | 191 | MIT | 2023-08-04T09:25:28 | 2018-02-13T18:56:12 | Python | UTF-8 | Python | false | false | 3,623 | py | coloring.py | # -*- coding: utf-8 -*-
#
# IceCream - Never use print() to debug again
#
# Ansgar Grunseid
# grunseid.com
# grunseid@gmail.com
#
# License: MIT
#
from pygments.style import Style
from pygments.token import (
Text, Name, Error, Other, String, Number, Keyword, Generic, Literal,
Comment, Operator, Whitespace, P... |
4288ae4a6829e6f76130b5324c69de7135e1bb2f | fd615ed0fcfdff07770024f7ebf0fb0539b933bd | /share/ci/windeploy.py | 923e8206b13f1eb2431e9822c8a5251ed5f78e53 | [
"MIT"
] | permissive | OneMoreGres/ScreenTranslator | 7eec8d6ff0efd87f170ee58bbcba709649311dcd | 29ee5dda900902b7df11d5522c82bf22173d56ce | refs/heads/master | 2023-05-25T19:20:47.826644 | 2023-05-19T20:30:44 | 2023-05-19T20:30:44 | 16,645,559 | 773 | 117 | MIT | 2020-01-07T14:27:47 | 2014-02-08T15:09:17 | Inno Setup | UTF-8 | Python | false | false | 2,040 | py | windeploy.py | import common as c
from config import *
import os
import sys
import shutil
from glob import glob
tag = os.environ.get('TAG', '')
artifact_name = '{}-{}{}-{}.zip'.format(app_name, app_version, tag, os_name)
if len(sys.argv) > 1 and sys.argv[1] == 'artifact_name': # subcommand
c.print(artifact_name)
exit(0)
art... |
126b04593904a4d033c49b9dbf019759dfd43d0e | 952dc66c61966f099756cdb6c2d13b40352f63cc | /zerver/views/realm_domains.py | c27de2cdbcd532e7740958401253b0916864bcf1 | [
"Apache-2.0",
"LicenseRef-scancode-free-unknown"
] | permissive | zulip/zulip | 5ae6aad35fd9f72996c0a2a9cdd674400966ebf6 | 965a25d91b6ee2db54038f5df855215fa25146b0 | refs/heads/main | 2023-08-28T23:43:00.971110 | 2023-08-28T16:47:09 | 2023-08-28T19:33:02 | 43,160,685 | 20,239 | 8,996 | Apache-2.0 | 2023-09-14T20:57:47 | 2015-09-25T16:37:25 | Python | UTF-8 | Python | false | false | 2,770 | py | realm_domains.py | from django.core.exceptions import ValidationError
from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext as _
from zerver.actions.realm_domains import (
do_add_realm_domain,
do_change_realm_domain,
do_remove_realm_domain,
)
from zerver.decorator import require_realm... |
d8a43b5697aaf17e652534a112ebb69f3d96b276 | e1e5c596f4ae06f8fddef063857fdd2961febb4d | /telnetlib3/slc.py | 3d2eaad85037fd08fc97b18a2f0a97dd724b5772 | [
"BSD-3-Clause",
"ISC"
] | permissive | jquast/telnetlib3 | 3ffcfd08f98c1bb90372273ce6cd5f5b922d3d50 | 5fbc6f723a6cb37651e782f6b35bd7e6cebabd5a | refs/heads/master | 2023-07-29T21:34:56.668753 | 2023-07-23T16:03:53 | 2023-07-23T16:03:53 | 9,489,978 | 134 | 35 | NOASSERTION | 2023-06-16T17:28:24 | 2013-04-17T05:30:03 | Python | UTF-8 | Python | false | false | 14,974 | py | slc.py | """
Special Line Character support for Telnet Linemode Option (:rfc:`1184`).
"""
from .accessories import eightbits, name_unicode
from .telopt import theNULL
__all__ = (
"SLC",
"SLC_AYT",
"NSLC",
"BSD_SLC_TAB",
"generate_slctab",
"Linemode",
"LMODE_MODE_REMOTE",
"SLC_SYNCH",
"SLC_IP... |
1148f4c8ebb2dcd46a203f3cd2b18570327b906c | afd2087e80478010d9df66e78280f75e1ff17d45 | /torch/distributed/_shard/sharding_plan/api.py | fa92bf70788876216f6b6c139f6c4389bd42747a | [
"BSD-3-Clause",
"BSD-2-Clause",
"LicenseRef-scancode-secret-labs-2011",
"LicenseRef-scancode-generic-cla",
"BSL-1.0",
"Apache-2.0"
] | permissive | pytorch/pytorch | 7521ac50c47d18b916ae47a6592c4646c2cb69b5 | a6f7dd4707ac116c0f5fb5f44f42429f38d23ab4 | refs/heads/main | 2023-08-03T05:05:02.822937 | 2023-08-03T00:40:33 | 2023-08-03T04:14:52 | 65,600,975 | 77,092 | 24,610 | NOASSERTION | 2023-09-14T21:58:39 | 2016-08-13T05:26:41 | Python | UTF-8 | Python | false | false | 3,664 | py | api.py | import abc
import torch.nn as nn
from dataclasses import dataclass
from typing import Dict, List, Optional, Union
from torch.distributed._shard.sharder import Sharder
from torch.distributed._shard.sharding_spec import ShardingSpec
@dataclass
class ShardingPlan:
"""
Representation of a sharding plan, describe... |
716e12b1f52ff5c0fa686237772acc80aa0b63ab | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/mutable/test_const_arg_tensor.py | 672eb804b3b48212af4e6b895ebe83cbac1aa59c | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 5,894 | py | test_const_arg_tensor.py | # Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
0e4f27f38f3b780c0f162dfaf97a13f076e216a7 | 4dda533296b83fd2cba4345993aa9d4cc16aba33 | /tests/test_crawler.py | 0a73247642cd61a4eef9890385f2868dc2d2cd44 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | frgfm/torch-scan | 4be64acc8a544ff0b8d6c99d9c11b3fb6708c02e | 1c83a802fd9fde43e669ab6b92920b20f6cea678 | refs/heads/main | 2023-04-04T08:08:05.766828 | 2022-12-20T15:51:53 | 2022-12-20T15:51:53 | 247,824,251 | 176 | 21 | Apache-2.0 | 2023-03-26T19:06:48 | 2020-03-16T21:57:33 | Python | UTF-8 | Python | false | false | 2,603 | py | test_crawler.py | import io
import sys
from collections import OrderedDict
import pytest
import torch.nn as nn
from torchscan import crawler
def test_apply():
multi_convs = nn.Sequential(nn.Conv2d(16, 32, 3), nn.Conv2d(32, 64, 3))
mod = nn.Sequential(nn.Conv2d(3, 16, 3), multi_convs)
# Tag module attributes
def tag_... |
544d155debcb2d1ec97d7473f81dec9814a19ebf | f9be237f3a7e03318636de79f6d96f40583c7cb1 | /example/email_source_example.py | 414819c8c56a5de328d7c7dbe694a5d9d5f4f2ef | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | obsei/obsei | 7173d32b90ee6ab09089a9ab001ee5cb0cdc8d8e | 80b7782ba488583faf63951d20abad73eda98e5b | refs/heads/master | 2023-09-01T00:32:07.593921 | 2023-08-25T17:08:56 | 2023-08-25T17:08:56 | 307,191,665 | 773 | 100 | Apache-2.0 | 2023-09-13T03:30:59 | 2020-10-25T21:00:48 | Python | UTF-8 | Python | false | false | 1,234 | py | email_source_example.py | import logging
import os
import sys
from datetime import datetime, timedelta
import pytz
from obsei.misc.utils import DATETIME_STRING_PATTERN
from obsei.source.email_source import EmailConfig, EmailCredInfo, EmailSource
logger = logging.getLogger(__name__)
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
... |
cad3d867c7de459c27fb76e6f24f56f0f3a1981f | ec85250addb7357dfe7bb3e0680d53fc7b0fd8fb | /examples/development_to_production/development_to_production/resources.py | 0ad4d87583728aac9877912b8092249e965fe319 | [
"Apache-2.0"
] | permissive | dagster-io/dagster | 6adb5deee8bcf3ea1866a6a64f2ed81e1db5e73a | fe21995e0402878437a828c6a4244025eac8c43b | refs/heads/master | 2023-09-05T20:46:08.203794 | 2023-09-05T19:54:52 | 2023-09-05T19:54:52 | 131,619,646 | 8,565 | 1,154 | Apache-2.0 | 2023-09-14T21:57:37 | 2018-04-30T16:30:04 | Python | UTF-8 | Python | false | false | 2,051 | py | resources.py | from abc import ABC, abstractmethod
from typing import Any, Dict, Optional, Sequence
import requests
class HNClient(ABC):
"""Base class for a Hacker News Client."""
@abstractmethod
def fetch_item_by_id(self, item_id: int) -> Optional[Dict[str, Any]]:
...
@abstractmethod
def fetch_max_it... |
16b7e7bdf8edb510b04d496b6d1d8ddd7465a52d | f4a2917e70be48528f0f4b40476eef6c39ab523d | /utils_cv/tracking/references/fairmot/tracker/basetrack.py | a7130b5cc08ac55705c155594d0f2a1d09f96774 | [
"BSD-3-Clause",
"LGPL-2.1-or-later",
"Apache-2.0",
"MIT"
] | permissive | microsoft/computervision-recipes | d732e6c73d0cef6b7fb9f639d27540cce8df77fb | 679f1bf82b22b8c948f3703933557a2ba090739d | refs/heads/staging | 2023-09-04T09:22:55.209926 | 2022-10-31T17:12:47 | 2022-10-31T17:12:47 | 170,161,374 | 8,758 | 1,169 | MIT | 2023-02-09T18:47:36 | 2019-02-11T16:23:51 | Jupyter Notebook | UTF-8 | Python | false | false | 950 | py | basetrack.py | import numpy as np
from collections import OrderedDict
class TrackState(object):
New = 0
Tracked = 1
Lost = 2
Removed = 3
class BaseTrack(object):
_count = 0
track_id = 0
is_activated = False
state = TrackState.New
history = OrderedDict()
features = []
curr_feature = No... |
c6aa15ce6bd38745c51e1a556d0441b6e0dc50eb | 4129d5b10c0ac8288db205f91ed45a40b812ef5c | /photutils/psf/tests/test_groupstars.py | 333c3d248b16b5ec6d98f4052fc775f5d1111f6c | [
"BSD-3-Clause"
] | permissive | astropy/photutils | 163762aa560fd13c8a4a49aff2d6b0a522cedbcc | a6d629774c52cc82af18d0444c6e5584e5d0b492 | refs/heads/main | 2023-09-01T20:51:05.823954 | 2023-08-28T19:35:54 | 2023-08-28T19:35:54 | 2,640,766 | 204 | 130 | BSD-3-Clause | 2023-09-13T22:46:41 | 2011-10-25T02:39:28 | Python | UTF-8 | Python | false | false | 20,387 | py | test_groupstars.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Tests for the groupstars module.
"""
import numpy as np
import pytest
from astropy.table import Table, vstack
from astropy.utils.exceptions import AstropyDeprecationWarning
from numpy.testing import assert_almost_equal
from photutils.psf.groupstars i... |
728da90d1b25bde9440b4bec488205fa73094d43 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/orvibo/switch.py | 9e86d3787afc50764ae25deabc62b5849caf7ca6 | [
"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 | 3,221 | py | switch.py | """Support for Orvibo S20 Wifi Smart Switches."""
from __future__ import annotations
import logging
from typing import Any
from orvibo.s20 import S20, S20Exception, discover
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity
from homeassistant.const import (
CONF_D... |
b108f12f6afa1af5855628ae3e34c7b19d861864 | f77bcd1e8e2c8c49a4d60219950fc943acac5d91 | /nlpcda/tools/Equivalent_char.py | d00764d17ed37afe1e83c0f66db2d16bfb68dbc9 | [
"Apache-2.0"
] | permissive | 425776024/nlpcda | acde6ea420d4075fde0302c691cb8b296e0913a3 | da96d1ef2d94e43dbc110a1eadb097f535312bb6 | refs/heads/master | 2023-05-27T19:25:05.899003 | 2022-05-22T13:37:21 | 2022-05-22T13:37:21 | 230,702,807 | 1,529 | 159 | Apache-2.0 | 2022-06-22T02:59:08 | 2019-12-29T04:33:10 | Python | UTF-8 | Python | false | false | 2,448 | py | Equivalent_char.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from nlpcda.tools.Basetool import Basetool
from nlpcda.config import Equivalent_char_path
class EquivalentChar(Basetool):
'''
等价字,用于随机替换等价字,【字级别的】,增强数据
'''
def __init__(self, base_file=Equivalent_char_path, create_num=5, change_rate=0.05, seed=1):
s... |
3bbfafbeb070d69f0b5a65c855c948ea3dde0667 | dc387b1d0c247aca4d6227a2dcc34c30cd2558fd | /recommendation/dlrm/tf/common.py | 20e0ce70a5cf3aa1c6ef0c78a1c91bb008cb336b | [
"Apache-2.0"
] | permissive | mlcommons/inference | 6f0c725fb3a8d65c349bbd60be23e1db7f8dea74 | c540fcc99eeacfb5c51de8daa0f8cca339f50799 | refs/heads/master | 2023-08-29T11:09:18.621119 | 2023-08-25T16:22:26 | 2023-08-25T16:22:26 | 148,566,613 | 575 | 253 | Apache-2.0 | 2023-09-11T11:26:45 | 2018-09-13T01:53:57 | Python | UTF-8 | Python | false | false | 7,846 | py | common.py | # Copyright 2020 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... |
e6c89bf384975eaee93f59265e6bed0afdd03055 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /6_tree/前缀树trie/6183. 字符串的前缀分数和.py | 470756f0fd076d428edbf56113d175846e15665a | [] | 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 | 1,935 | py | 6183. 字符串的前缀分数和.py | # 1 <= words.length <= 1000
# 1 <= words[i].length <= 1000
# words[i] 由小写英文字母组成
from collections import defaultdict
from typing import List
from Trie import Trie
class Solution:
def sumPrefixScores(self, words: List[str]) -> List[int]:
"""1. 字典树"""
trie = Trie(words)
res ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.