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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dd1739691d3ca4cfd195ff77c6eb486eff52bafe | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Tensorflow_LightGBM_Scipy_nightly/source/index.py | 359f1907cc26256fc67235fd492d5e917570632b | [
"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 | 77 | py | index.py | import tensorflow
import lightgbm
def handler(event, context):
return 0 |
55381a2ce301e272d1e44395624b8ecc1c2ba531 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/Sixgill-Darkfeed/Scripts/SixgillSearchIndicators/SixgillSearchIndicators.py | 71ee5158567bf057f53858b053496ad531f3e2ef | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 1,192 | py | SixgillSearchIndicators.py | import demistomock as demisto
from CommonServerPython import *
DEFAULT_SIZE = 50
def search_indicators(args):
keys = ['id', 'value', 'CustomFields', 'type', 'score', 'firstSeen', 'lastSeen',
'expiration', 'expirationStatus', 'sourceBrands', 'sourceInstances']
query = args.get('query', None)
... |
3e0e87223b39b25e1bfbcf2e1af8b64b17a8ffcc | 2be164d2b1e34553064b933d4015fae80c1aae18 | /Dk_TanD.py | a4683b5a19738c9b722106721fd3bc4ffaa25120 | [
"MIT"
] | permissive | linmingchih/HowtoSim_Script | a8c14de9f1c70152c1676abb87b15b3d429d6eb9 | 8f6abbcd9c2ad8c76e97357cd622f9f2ca87da7c | refs/heads/master | 2023-04-03T07:27:04.067901 | 2023-03-19T09:35:53 | 2023-03-19T09:35:53 | 168,629,194 | 118 | 100 | null | 2021-07-27T09:58:01 | 2019-02-01T02:19:16 | Python | UTF-8 | Python | false | false | 2,627 | py | Dk_TanD.py | relative_permittivity='4.11483+0.0281238*ln((2.53303e+22+Freq*Freq)/(4.95658e+09+Freq*Freq))'
bulk_conductivity='1e-12+3.12919e-12*Freq*(atan(Freq/70403)-atan(Freq/1.59155e+11))'
import ScriptEnv, random, string
def calculate(relative_permittivity,bulk_conductivity):
from math import *
ln=log
F=... |
6266a969cb65ab23e59c13d4da1182aa2ab19bf2 | 3abc1fef99ac6ce0b845a1090fae7f6875fee729 | /src/ralph/operations/migrations/0002_auto_20151218_1029.py | c1b7208de4551c52b0de7ededa017fe3059b9067 | [
"Apache-2.0"
] | permissive | allegro/ralph | 5ff9165a202e836061c99e8af20214e0d651622f | b4a72356f527b1f12c7babd7465d2d7fa3ffb0d3 | refs/heads/ng | 2023-09-02T01:13:43.672554 | 2023-09-01T09:48:38 | 2023-09-01T09:48:38 | 4,359,038 | 1,970 | 617 | Apache-2.0 | 2023-09-01T09:44:39 | 2012-05-17T14:04:57 | Python | UTF-8 | Python | false | false | 1,772 | py | 0002_auto_20151218_1029.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
OPERATION_TYPES = (
(1, 'Change', []),
(101, 'Incident', []),
(201, 'Problem', []),
(301, 'Failure', [
(302, 'Hardware Failure', [
(303, 'Disk', []),
(304, 'Controller', [])... |
77aee86a09cc03ed876a131cad0473b103de9be8 | f1872915f044e9bc8d6622d529535441ea8aec6a | /tests/opengl/items/common.py | 3e6e078753230dc5972d4f19dab027234d872ee5 | [
"MIT"
] | permissive | pyqtgraph/pyqtgraph | 5dc14ddd513f4f3fdd0e834aba720e61b122c886 | f261280905a74f6cae4a43e39fa1732635b25c63 | refs/heads/master | 2023-08-30T23:24:30.305478 | 2023-08-29T00:35:59 | 2023-08-29T00:35:59 | 12,777,496 | 3,432 | 1,184 | NOASSERTION | 2023-09-14T13:40:51 | 2013-09-12T07:18:21 | Python | UTF-8 | Python | false | false | 211 | py | common.py | from pyqtgraph.opengl.GLGraphicsItem import GLGraphicsItem
def ensure_parentItem(parent: GLGraphicsItem, child: GLGraphicsItem):
assert child in parent.childItems()
assert parent is child.parentItem()
|
83c930c47d120ff3a6ead0adae79c796799a457c | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/perf/cli_tools/tbmv3/trace_downloader.py | f6f0c3fed14b24f73bd979a6b378ea86dc06be6d | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 4,649 | py | trace_downloader.py | # Copyright 2020 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
from py_utils import cloud_storage
_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
DEFAULT_TRACE_DIR = os.path.join(_SCRIPT_DIR, 'traces')
HTM... |
1d35f1aa07311d7750d8c92a5190adff752f71ef | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowMacsecInterface/cli/equal/golden_output_3_expected.py | 5a285a43b52fd922042d502b2ea1ea6430a37bfa | [
"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 | 599 | py | golden_output_3_expected.py | expected_output = {
"macsec-data": {
"status": "disabled"
},
"capabilities": {
"icv-length": "16",
"data-length-change-supported": "yes",
"max-rx-sa": "32",
"max-tx-sa": "32",
"max-rx-sc": "16",
"max-tx-sc": "16",
"validate-frames": ... |
36bb81b7f88ac084b01f9f36c00ff458cb80541f | e5dd9568e49cc88d13e4a1255ca5a7763feafb72 | /theonionbox/tob/system/darwin/__init__.py | f5e165219e0345ea2d92e8600c23a5f55ca573c4 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | ralphwetzel/theonionbox | 21bc8142394a55492ca82dcd1430d22366703bcb | 9812fce48153955e179755ea7a58413c3bee182f | refs/heads/master | 2023-08-09T09:16:21.665677 | 2020-01-19T16:43:13 | 2020-01-19T16:43:13 | 48,622,560 | 130 | 23 | MIT | 2023-07-26T06:46:51 | 2015-12-26T20:20:52 | JavaScript | UTF-8 | Python | false | false | 8,068 | py | __init__.py | from typing import Optional, Callable
from datetime import datetime, timedelta
import logging
import re
import subprocess
import time
from .. import BaseSystem
from .osxtemp import Temperature, Sensors, Units
from .systray import Icon
class Darwin(BaseSystem):
temp_function = None
def __init__(self):
... |
d16633773505edf72490ed3588bd5389cfefc749 | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/networkcloud/azext_networkcloud/tests/latest/test_rack.py | 8bd9116e4f54f3da60a5b9e1632a4f0a457e579f | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-cli-extensions | c1615b19930bba7166c282918f166cd40ff6609c | b8c2cf97e991adf0c0a207d810316b8f4686dc29 | refs/heads/main | 2023-08-24T12:40:15.528432 | 2023-08-24T09:17:25 | 2023-08-24T09:17:25 | 106,580,024 | 336 | 1,226 | MIT | 2023-09-14T10:48:57 | 2017-10-11T16:27:31 | Python | UTF-8 | Python | false | false | 2,989 | py | test_rack.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# ------------------------------------------------------------------... |
34ffb95470460cd55f44a47d72c2af92beca5e36 | e338fad18e9bdd6f0252c9306b05ad7b336c2ecd | /daqhats/hats.py | 4a80889e0c8b9e1007731ad82e37bcaf7524b4dc | [
"MIT"
] | permissive | mccdaq/daqhats | fd22172bf89adff9e2f6d2c4a9198c9d39918ed7 | e6d96c8fb621c83696536a037f1c4fa373c46068 | refs/heads/master | 2022-12-01T16:47:45.491181 | 2022-11-18T15:05:17 | 2022-11-18T15:05:17 | 144,043,320 | 112 | 83 | NOASSERTION | 2022-06-24T18:42:34 | 2018-08-08T16:57:41 | C | UTF-8 | Python | false | false | 12,724 | py | hats.py | """
Wraps the global methods from the MCC Hat library for use in Python.
"""
from collections import namedtuple
from ctypes import cdll, Structure, c_ubyte, c_ushort, c_char, c_int, POINTER, \
CFUNCTYPE, c_void_p
from enum import IntEnum, unique
_HAT_CALLBACK = None
@unique
class HatIDs(IntEnum):
"""Known MCC... |
126b8e68effd60222be11caf39b5ea95e86aca96 | 974d04d2ea27b1bba1c01015a98112d2afb78fe5 | /test/mkldnn/test_fusion_lstm_int8_mkldnn_op.py | 546a30c3046ced360e3ead1ca0a23a111932ac92 | [
"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,251 | py | test_fusion_lstm_int8_mkldnn_op.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 app... |
7358fd17d1ca6ad45a86e585b0794e4682484f3f | 530b180c3aade8e67cc61ad2baddff018f7d59a8 | /robocorp-python-ls-core/src/robocorp_ls_core/__init__.py | a0f0c2082d9cf84959e2adca86fc83ed5fa2cb3b | [
"Apache-2.0"
] | permissive | robocorp/robotframework-lsp | 67a1f35b9268d349045eb8fe930ea381c2d94cae | d72e5310ed4a8165d7ee516d79e0accccaf7748c | refs/heads/master | 2023-08-17T05:12:43.598270 | 2023-08-12T12:11:22 | 2023-08-12T12:13:21 | 235,202,865 | 167 | 72 | Apache-2.0 | 2023-09-13T22:39:09 | 2020-01-20T21:31:20 | Python | UTF-8 | Python | false | false | 122 | py | __init__.py | import os.path
__file__ = os.path.abspath(__file__)
if __file__.endswith((".pyc", ".pyo")):
__file__ = __file__[:-1]
|
6738978d82bdbc182069e58badd7fbccfc8cb64c | 1ad268817e4f048815df6e7b7669c45257a37b0e | /kartothek/io_components/cube/query/_group.py | 8884ff077d1d3fd45e648bcce973ba07eb677916 | [
"MIT"
] | permissive | JDASoftwareGroup/kartothek | 07c7f2fceb3dcee5cf8d0a6a93f4c1060eb0bcf4 | 1821ea5df60d4079d3911b3c2f17be11d8780e22 | refs/heads/master | 2023-05-26T11:43:04.781173 | 2021-12-10T09:15:19 | 2021-12-10T09:15:19 | 184,608,549 | 178 | 59 | MIT | 2023-05-15T21:56:50 | 2019-05-02T15:45:42 | Python | UTF-8 | Python | false | false | 7,998 | py | _group.py | """
Query group code datastructure and load code.
"""
import typing
import attr
import pandas as pd
from kartothek.io_components.metapartition import SINGLE_TABLE, MetaPartition
from kartothek.utils.converters import converter_str
from kartothek.utils.pandas import (
concat_dataframes,
drop_sorted_duplicates_... |
5daf74551dd020acb0add1638037b906b3f7180c | a4d8fcfa8084c5d36a862aeb0978327ff4cfe50f | /prototypes/c2p/c2p_1x1_4bpl_blitter.py | f87ac1548a5eccdd56c64e45585a8f4ced98b0e4 | [
"Artistic-2.0"
] | permissive | cahirwpz/demoscene | a0b548527d89a354b5b8dfd922f39d8b14d61643 | cd4517ba69e26c96a69e505e305a6d0152972982 | refs/heads/master | 2023-03-17T13:06:43.731158 | 2023-03-13T19:48:47 | 2023-03-13T19:48:47 | 3,242,770 | 105 | 21 | Artistic-2.0 | 2022-10-18T09:43:25 | 2012-01-22T23:03:06 | C | UTF-8 | Python | false | false | 2,604 | py | c2p_1x1_4bpl_blitter.py | #!/usr/bin/env python3
from common import Bit, Word, Channel, Blit, Array
def c2p(bitplane_output=True):
m0 = Word.Mask('00ff')
m1 = Word.Mask('0f0f')
m2 = Word.Mask('3333')
m3 = Word.Mask('5555')
print("=[ c2p 1x1 4bpl (blitter) ]=".center(48, '-'))
def MakeWord(chars, color):
bits... |
7d12e7d80c8ed791e46ff25eecae84f45ca96ce4 | 364774e29ef2474552ea3839de0951e63cbae0a6 | /wouso/core/scoring/tests.py | b9f08a25a6acc568d2b0a577c8f8e1b0628e6943 | [
"Apache-2.0"
] | permissive | rosedu/wouso | 66c50ef750cf79d6959768f7df93cc08607cc266 | ed34c62ac925db719388f27fe5acb40376d8d0c1 | refs/heads/master | 2022-10-29T14:28:51.818073 | 2022-09-24T18:54:04 | 2022-09-24T18:54:04 | 2,965,476 | 121 | 97 | NOASSERTION | 2019-11-15T09:33:50 | 2011-12-12T16:15:01 | Python | UTF-8 | Python | false | false | 8,440 | py | tests.py | from django.test import TestCase
from django.db.models.query import QuerySet
from django.contrib.auth.models import User
from wouso.core.config.models import IntegerListSetting
from wouso.core.game.models import Game
from wouso.core import scoring, signals
from wouso.core.tests import WousoTest
from wouso.core.user.mod... |
d11ed7408c2a7ee52c656653f559319f87ef6281 | fd6f11eeba5e7191a115b2f39c930145d7ab83d8 | /FingersExtras/Python/cycle through CC lanes.py | 336e5e383f9c376d3d4fe5155f25112dee3bf2c9 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | reaper-oss/sws | 30792fd38d7e969b0e4fe20ca9b256989452a959 | a3693ad52ed16fe95ac0a570971656b6c9337f26 | refs/heads/master | 2023-09-02T01:43:13.746682 | 2022-10-11T22:21:17 | 2023-01-16T13:30:10 | 21,614,326 | 360 | 86 | MIT | 2023-08-23T11:43:23 | 2014-07-08T13:48:01 | C++ | UTF-8 | Python | false | false | 82 | py | cycle through CC lanes.py | cmdId = RPR_NamedCommandLookup("_FNG_CYCLE_CC_LANE")
RPR_Main_OnCommand(cmdId, 0)
|
f5f392f829b283355bdbc4720b6bef269b3bb826 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/plex/view.py | ba883883ddc850064cdfac66f4e0607ef00e7577 | [
"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,626 | py | view.py | """Implement a view to provide proxied Plex thumbnails to the media browser."""
from __future__ import annotations
from http import HTTPStatus
import logging
from aiohttp import web
from aiohttp.hdrs import CACHE_CONTROL
from aiohttp.typedefs import LooseHeaders
from homeassistant.components.http import KEY_AUTHENTI... |
b34fea38f0d0ff53416073fa9160a8264cc34462 | d91d19da3589c3f69a834bbb9834386e80f100e0 | /datashader/data_libraries/cudf.py | 343a0639e0fe4d564290f8411b27a9f41b9f91cc | [] | permissive | holoviz/datashader | 11d518371e974c02ba3843871e3e0905e0c83956 | b510594eb771d14cff3b69efca8ddd37ca3a1046 | refs/heads/main | 2023-08-18T13:55:24.214980 | 2023-08-17T08:45:48 | 2023-08-17T08:45:48 | 48,504,165 | 1,040 | 133 | BSD-3-Clause | 2023-09-11T09:51:30 | 2015-12-23T18:02:20 | Python | UTF-8 | Python | false | false | 343 | py | cudf.py | from __future__ import annotations
from datashader.data_libraries.pandas import default
from datashader.core import bypixel
import cudf
@bypixel.pipeline.register(cudf.DataFrame)
def cudf_pipeline(df, schema, canvas, glyph, summary, *, antialias=False):
return default(glyph, df, schema, canvas, summary, antialias... |
a2ae09cefa0426601090d026bbbde91a0411655e | f85fd70c36571999d503343cf9e94c479339e980 | /ansible/modules/hashivault/hashivault_identity_entity_alias.py | 6e6f1ef7b1050fe7316fdde9a624f4f513958be4 | [
"MIT"
] | permissive | TerryHowe/ansible-modules-hashivault | 2b1f219e69f7beb8c947ddc4907b7b1836c9e765 | 8ac45bb025a33de6027dca88e8870a67e154cae4 | refs/heads/main | 2023-09-01T01:31:18.124112 | 2023-08-14T14:04:53 | 2023-08-14T14:04:53 | 57,915,238 | 453 | 198 | MIT | 2023-08-14T14:04:55 | 2016-05-02T19:22:57 | Python | UTF-8 | Python | false | false | 7,527 | py | hashivault_identity_entity_alias.py | #!/usr/bin/env python
from ansible.module_utils.hashivault import hashivault_argspec
from ansible.module_utils.hashivault import hashivault_auth_client
from ansible.module_utils.hashivault import hashivault_init
from ansible.module_utils.hashivault import hashiwrapper
ANSIBLE_METADATA = {'status': ['stableinterface'],... |
52f29a16942e8b6e31be5f85b096e2bb78d9f43b | bbd69601912a3361d788efd03a47f9d4e3bac09e | /demo/agw/PyGauge.py | fa05939284c18ea67a2d395b8e05bf9032fcffa4 | [] | no_license | wxWidgets/Phoenix | 56929484460a0399a8f1d9582bc77c20aa14748d | a1184286703cf24c4b88e5bc14cf2979c1b1ea00 | refs/heads/master | 2023-09-01T07:10:17.437093 | 2023-08-31T05:38:01 | 2023-08-31T05:38:01 | 5,078,061 | 2,268 | 677 | null | 2023-09-09T17:06:59 | 2012-07-17T06:22:25 | Python | UTF-8 | Python | false | false | 5,761 | py | PyGauge.py | #!/usr/bin/env python
import wx
import os
import sys
try:
dirName = os.path.dirname(os.path.abspath(__file__))
except:
dirName = os.path.dirname(os.path.abspath(sys.argv[0]))
sys.path.append(os.path.split(dirName)[0])
try:
from agw import pygauge as PG
except ImportError: # if it's not there locally, tr... |
37cd38f593e436022fe5eb9e6997d2f794f8c355 | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/DeprecatedContent/Scripts/HTMLDocsAutomation/HTMLDocsAutomation_test.py | cb8eba43672bdb9fe20fde0c7aa8fa65d92cc3ab | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 7,637 | py | HTMLDocsAutomation_test.py | from CommonServerPython import *
import os
import demistomock as demisto
RETURN_ERROR_TARGET = 'HTMLDocsAutomation.return_error'
def test_get_yaml_obj(mocker):
from HTMLDocsAutomation import get_yaml_obj
return_error_mock = mocker.patch(RETURN_ERROR_TARGET)
# sanity
file_path = os.path.join('test_... |
9275a61fcd2898573e14a2a89e38f0790b56d20d | c5a69158ac5966d8ba8f3b2e2fb4c35d49a0658d | /onelinerizer/__init__.py | 819e70addddb3290dffdeb3c906eab23eb0bcb75 | [
"MIT"
] | permissive | csvoss/onelinerizer | d47202733f1b6935146b05027381bea9fbde0d04 | bad341f261d35e56872b4c22297a44dc6d5cfab3 | refs/heads/master | 2022-07-06T05:51:02.018368 | 2022-01-15T18:43:08 | 2022-01-15T18:43:08 | 29,375,764 | 1,126 | 102 | MIT | 2018-10-20T00:41:35 | 2015-01-17T01:32:08 | Python | UTF-8 | Python | false | false | 38 | py | __init__.py | from .onelinerizer import onelinerize
|
3317fe74c9c02d020ed6ce2cb00bc8c81bbb445f | 857938ac2024b1e37f32a6631e85e179ae04b601 | /src/python/test/test_simplex_tree_serialization.py | 9ba78a5b9ce29bc1ccbe2c5fc9f0c91661442c81 | [
"MIT"
] | permissive | GUDHI/gudhi-devel | a2b08232a2ea66047b7a626d85dff0d50decc71c | 2f76d9416e145282adcd8264438480008bd59f77 | refs/heads/master | 2023-08-31T13:44:17.776336 | 2023-08-29T20:20:16 | 2023-08-29T20:20:16 | 174,304,137 | 212 | 69 | MIT | 2023-09-14T15:34:48 | 2019-03-07T08:34:04 | C++ | UTF-8 | Python | false | false | 747 | py | test_simplex_tree_serialization.py | """ This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
Author(s): Vincent Rouvreau
Copyright (C) 2023 Inria
Modification(s):
- YYYY/MM Author: Description of t... |
4d1b30493599806c44c45eaff7580e650510e392 | cad91ae76d2746a6c28ddda0f33a58f9d461378f | /TensorFlow/Detection/SSD/models/research/object_detection/builders/dataset_builder.py | b71c054a739a3c137d267b3d4b2dde8078c5d0b0 | [
"Apache-2.0"
] | permissive | NVIDIA/DeepLearningExamples | fe677521e7e2a16e3cb0b77e358f9aab72f8c11a | a5388a45f71a949639b35cc5b990bd130d2d8164 | refs/heads/master | 2023-08-31T20:57:08.798455 | 2023-08-23T10:09:12 | 2023-08-23T10:09:12 | 131,881,622 | 11,838 | 3,124 | null | 2023-08-28T16:57:33 | 2018-05-02T17:04:05 | Jupyter Notebook | UTF-8 | Python | false | false | 6,836 | py | dataset_builder.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... |
53207fbb49532c4da6d3d8c8a185a800fbe6a3f7 | 3bcc6467f68abaa8dca7a8c2a544875df42e4164 | /fastai/tabular/transform.py | d7bc255eaf5fd92467b9db28e67590c4981e4356 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | jantic/DeOldify | 82cd4a520b21ebe12ac7f587297001c4ad7ebc56 | 141e873e42eb5e40665d20349f4b8e9a267ba1c4 | refs/heads/master | 2023-08-09T07:20:08.480890 | 2023-04-16T16:39:31 | 2023-04-16T16:39:31 | 155,636,246 | 17,137 | 2,637 | MIT | 2023-07-21T02:35:25 | 2018-10-31T23:32:34 | Python | UTF-8 | Python | false | false | 9,761 | py | transform.py | "Cleaning and feature engineering functions for structured data"
from ..torch_core import *
from pandas.api.types import is_numeric_dtype
from datetime import date, datetime
import calendar
__all__ = ['add_datepart', 'cont_cat_split', 'Categorify', 'FillMissing', 'FillStrategy', 'Normalize', 'TabularProc',
... |
ece677ecdddd910127494826a5515ac6a342b119 | 0e0ddc095823c54877c143adacbfcdd6355261de | /libqtile/widget/countdown.py | 90915477edd88739d85cdcf680ab1b889dc71027 | [
"MIT"
] | permissive | qtile/qtile | b19108ca632871104a0783a4afbe7350a17b97db | 3f8a00082ad880042d396477d9445954e8d29cf2 | refs/heads/master | 2023-09-01T19:31:09.419767 | 2023-09-01T19:10:00 | 2023-09-01T19:10:00 | 47,476 | 4,203 | 986 | MIT | 2023-09-11T21:21:56 | 2008-08-30T00:16:40 | Python | UTF-8 | Python | false | false | 2,363 | py | countdown.py | # Copyright (c) 2014 Sean Vig
# Copyright (c) 2014 roger
# Copyright (c) 2014 Tycho Andersen
# Copyright (c) 2014 Adi Sieker
#
# 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 restrict... |
8d43a82a2f85d9de3fdf789c38ec585ce839d1d5 | 2b5ffa18e7198e45fa77674b96dac8d91159fed7 | /djangae/contrib/locking/admin.py | 404efa8382b32e384caa19ce7c6cc19b6c45adbc | [
"BSD-3-Clause"
] | permissive | potatolondon/djangae | 73681d0c8302ac216f74bc00b980de368e8d4280 | bef308632790bb6f87e71bb91183f57bad6bd149 | refs/heads/master | 2023-09-01T15:27:51.995232 | 2023-08-30T14:40:48 | 2023-08-30T14:40:48 | 10,217,788 | 474 | 155 | BSD-3-Clause | 2023-02-08T01:05:31 | 2013-05-22T10:55:55 | Python | UTF-8 | Python | false | false | 106 | py | admin.py | from django.contrib import admin
from .models import DatastoreLock
admin.site.register(DatastoreLock)
|
b7fc38352e74a9feef42b7e92207b28ca7659157 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /update-server/otupdate/common/ssh_key_management.py | 64ad03210de417beafa1b667399e3f8479b94899 | [
"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 | 7,213 | py | ssh_key_management.py | """
ssh_key_management: Endpoints for managing SSH keys on the robot
"""
import contextlib
import functools
import hashlib
import ipaddress
import logging
import os
from typing import (
Any,
Generator,
IO,
List,
Tuple,
)
from aiohttp import web
from .handler_type import Handler
LOG = logging.get... |
2d5ccfc1c0cd6c6748227f3d6c70180752f1a96b | f2034c76a11ce6296131d2bab89a5dae7d59edfe | /python/dllib/src/bigdl/dllib/feature/dataset/movielens.py | c798769af64e0ff32e0108cfad0b37cf1fd82996 | [
"Apache-2.0"
] | permissive | intel-analytics/BigDL | e22cd917eecc7340bda3df4356acba0623a62ef6 | 4ffa012a426e0d16ed13b707b03d8787ddca6aa4 | refs/heads/main | 2023-08-22T06:31:37.923091 | 2023-08-22T02:58:42 | 2023-08-22T02:58:42 | 66,823,715 | 4,913 | 1,327 | Apache-2.0 | 2023-09-14T10:41:50 | 2016-08-29T07:59:50 | Jupyter Notebook | UTF-8 | Python | false | false | 1,900 | py | movielens.py | #
# Copyright 2016 The BigDL 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 ... |
d0e44a8cdd8c1f11566dd014a6c31c8f04768efb | f2d478767381afe660940cb94f760f476b977d74 | /natasha/const.py | b9393b0a91a571055ee86497bfc18e8fd068bf0e | [
"MIT"
] | permissive | natasha/natasha | 7b434d797a76d740fed8133b4b0241a9096f794b | ebe33ff1be333af0059aa34da825dfd4abb15dc2 | refs/heads/master | 2023-08-02T08:37:09.681688 | 2023-07-24T10:07:57 | 2023-07-24T10:07:57 | 64,834,778 | 1,013 | 107 | MIT | 2023-07-24T10:13:22 | 2016-08-03T09:49:51 | Python | UTF-8 | Python | false | false | 37 | py | const.py |
PER = 'PER'
LOC = 'LOC'
ORG = 'ORG'
|
796e38cc575a37fa7993ec3d7075ffb81e10a0d9 | a9ed175e2cf09ea29fe72b90dc4186ff9515c9b0 | /tests/integration/suite/test_istio.py | 049428186e6d2f3f8a08a29c951a9753433ed6d3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | rancher/rancher | 96d67163506fa4ab219dca4d86d9bfebacb68a6d | 90fc68836fd8d1bd2996283500f954ace40203ba | refs/heads/release/v2.8 | 2023-08-29T06:23:12.480919 | 2023-08-28T21:35:36 | 2023-08-28T21:35:36 | 26,337,322 | 21,773 | 3,508 | Apache-2.0 | 2023-09-14T19:51:31 | 2014-11-07T20:49:31 | Go | UTF-8 | Python | false | false | 5,482 | py | test_istio.py | import os
import pytest
import subprocess
from .common import random_str
from .conftest import cluster_and_client, ClusterContext
kube_fname = os.path.join(os.path.dirname(os.path.realpath(__file__)),
"k8s_kube_config")
istio_crd_url = "https://raw.githubusercontent.com/istio/istio/1.1.5" \
... |
c0f971a88b7bb01c06bbf5d7f5953a9c3f26f39f | 84724b34b3f1e84dc53cbca5f3660590dbc34a9f | /nova/api/validation/validators.py | b0e9478d35e268d2a531b74483065dee4a7133fc | [
"Apache-2.0"
] | permissive | openstack/nova | 2c24b64e3677595611715bae6dda14edd3f90a24 | 065c5906d2da3e2bb6eeb3a7a15d4cd8d98b35e9 | refs/heads/master | 2023-08-28T15:10:05.126314 | 2023-08-25T20:31:27 | 2023-08-25T20:31:27 | 790,031 | 2,287 | 2,320 | Apache-2.0 | 2023-07-08T02:10:29 | 2010-07-22T02:04:27 | Python | UTF-8 | Python | false | false | 13,318 | py | validators.py | # Copyright 2013 NEC 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 ... |
679ea57cb930205fd254f2b5ea2f977d5f5fb6e0 | 9f84d91a8ae3df53b07fe3267992fba00a99ac9e | /test/nn/conv/cugraph/test_cugraph_gat_conv.py | 307b9a780af682322226bf4050f7985f929c640c | [
"MIT"
] | permissive | pyg-team/pytorch_geometric | ebea601eae228f3905465b5c2349d3fb3bb5cb26 | a52af694b8ce6a80811e20966fe6d08a3e7511fe | refs/heads/master | 2023-08-31T04:13:40.943308 | 2023-08-30T12:48:42 | 2023-08-30T12:48:42 | 106,024,057 | 6,775 | 1,563 | MIT | 2023-09-14T17:10:18 | 2017-10-06T16:03:03 | Python | UTF-8 | Python | false | false | 2,158 | py | test_cugraph_gat_conv.py | import pytest
import torch
from torch_geometric.nn import CuGraphGATConv, GATConv
from torch_geometric.testing import onlyCUDA, withPackage
@onlyCUDA
@withPackage('pylibcugraphops>=23.02')
@pytest.mark.parametrize('bias', [True, False])
@pytest.mark.parametrize('bipartite', [True, False])
@pytest.mark.parametrize('c... |
b05447e4e0a84f56ca92d36cd19f9eee08ec602c | 989ab792e4675cb52df0c5864b51512ba8725ac2 | /symfit/core/support.py | 58a4376f4034d8e6333a47e80926ddd6df2c13a9 | [
"MIT"
] | permissive | tBuLi/symfit | 6519edb124f5fed60722d0fe0ad718a54592d181 | f484129e53fbc76fca1f61ce62bc6589083e8fc4 | refs/heads/master | 2023-05-24T21:38:04.299166 | 2023-05-08T13:10:58 | 2023-05-08T13:10:58 | 24,005,390 | 225 | 23 | MIT | 2023-03-14T10:35:23 | 2014-09-13T20:48:28 | Python | UTF-8 | Python | false | false | 11,776 | py | support.py | # SPDX-FileCopyrightText: 2014-2020 Martin Roelfs
#
# SPDX-License-Identifier: MIT
"""
This module contains support functions and convenience methods used
throughout symfit. Some are used predominantly internally, others are
designed for users.
"""
from __future__ import print_function
from collections import OrderedD... |
53a9397649c4f88e2f900fd1eba7f8e98e9a3529 | f7c975bef40f90a1a291b97466e1c81dfe69bae6 | /notifiers/notifier.py | 6c10c3170ff714fbda273503e4e11da451a3949e | [
"BSD-3-Clause"
] | permissive | duo-labs/secret-bridge | 24f2ea9e8a3ad1b6befeae0fd183e772ea5ff645 | c4f8d6e8b1cceae6edfab6f8827f375e4853257c | refs/heads/master | 2023-08-15T03:40:15.622855 | 2023-02-17T17:25:35 | 2023-02-17T17:25:35 | 201,492,192 | 181 | 44 | BSD-3-Clause | 2023-07-25T21:14:10 | 2019-08-09T15:18:28 | Python | UTF-8 | Python | false | false | 215 | py | notifier.py | from abc import ABC, abstractmethod
class Notifier(ABC):
def __init__(self):
pass
@abstractmethod
def process(self, findings, detector_name):
"""Process a found secret."""
pass
|
076a4ed30977eae1b82d15a4e134202e7bc135b8 | cf482a354ef3287f8d80163d12dfd6207220007a | /python/multicorn/imapfdw.py | 7a267ac4801a5f977c2662289d639515760fc571 | [
"PostgreSQL"
] | permissive | Segfault-Inc/Multicorn | f3996a9a01782dafc3ec5dbddf9c03fa40ab9a39 | 3b4da7f9f4ea339e71c6bb7df22d441c980b5aef | refs/heads/master | 2023-07-31T04:02:13.289966 | 2020-08-18T13:56:06 | 2022-04-05T06:33:40 | 1,851,271 | 167 | 42 | PostgreSQL | 2023-09-04T18:50:12 | 2011-06-05T18:37:51 | Python | UTF-8 | Python | false | false | 11,082 | py | imapfdw.py | """
Purpose
-------
This fdw can be used to access mails from an IMAP mailbox.
Column names are mapped to IMAP headers, and two special columns may contain the
mail payload and its flags.
.. api_compat:: :read:
Dependencies
-------------
imaplib
Options
--------
``host`` (required)
The IMAP host to connect to.
... |
e4a939ef2861568ede1ab113be296febcf92c67b | f9f074c44b67a11d4630b5e1cc15e016e8d73cc8 | /factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_pd_deploy_status/migrations/0003_remove_deploystatus_performance.py | 05f91a474583fca3500af70d47efb8b700f3f5ba | [
"MIT"
] | permissive | Azure-Samples/azure-intelligent-edge-patterns | 361694680c7e48d3761c5416175788355b684dcd | 1d2f42cbf9f21157c1e1abf044b26160dfed5b16 | refs/heads/master | 2023-05-26T13:15:47.085088 | 2023-02-28T17:25:53 | 2023-02-28T17:25:53 | 186,706,933 | 193 | 164 | MIT | 2023-02-28T17:25:55 | 2019-05-14T22:02:41 | JavaScript | UTF-8 | Python | false | false | 289 | py | 0003_remove_deploystatus_performance.py | # Generated by Django 3.0.8 on 2020-08-28 07:46
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("azure_pd_deploy_status", "0002_auto_20200828_0616")]
operations = [migrations.RemoveField(model_name="deploystatus", name="performance")]
|
f792ded71cdd879f85ba047710ad2913c9074511 | d6bcc2a87c2e419528c0edc98ebd3d3717a16716 | /test/lib/ufe/testRotatePivot.py | e0ba3df8275e8970b8ec286bd3e6f8b63403b717 | [
"DOC"
] | permissive | Autodesk/maya-usd | ac9e03f39132c6b221032f21dc98805b4aa52d31 | dc1c13a3f8012b2a99a45e46fb30250fd4b82487 | refs/heads/dev | 2023-09-05T07:39:58.640296 | 2023-09-01T19:56:30 | 2023-09-01T19:56:30 | 198,889,624 | 692 | 208 | null | 2023-09-14T20:49:17 | 2019-07-25T19:25:28 | Mathematica | UTF-8 | Python | false | false | 10,199 | py | testRotatePivot.py | #!/usr/bin/env python
#
# Copyright 2019 Autodesk
#
# 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 ... |
20f38fd80d1be3b0f628849d069b5049c0d2abea | d4a88b3b102e20e727cae8fbd4167dcb4b57d1ec | /pymunk/examples/using_sprites.py | 6e7364a329a53753cc5661d37b36d037fab87b5b | [
"MIT"
] | permissive | viblo/pymunk | ca64888e45706db431788368ff8464edf2912d5f | 20ac14f665fb38b4ef1bef5acea36a3d612dd0d5 | refs/heads/master | 2023-08-27T16:37:14.740653 | 2023-08-16T19:26:16 | 2023-08-16T19:26:16 | 13,273,472 | 855 | 255 | MIT | 2023-01-13T10:13:47 | 2013-10-02T14:36:46 | Python | UTF-8 | Python | false | false | 3,794 | py | using_sprites.py | """Very basic example of using a sprite image to draw a shape more similar
how you would do it in a real game instead of the simple line drawings used
by the other examples.
"""
__version__ = "$Id:$"
__docformat__ = "reStructuredText"
import math
import random
from typing import List
import os.path
import pygame
... |
b592f69985a923a502c11dc905bab7864818a6e2 | c618bbf2719431999b1007461df0865bab60c883 | /dali/test/python/reader/test_webdataset_requirements.py | 17462ee1eb9892ade28dba898ef90404ecd1ad0a | [
"Apache-2.0"
] | permissive | NVIDIA/DALI | 3d0d061135d19e092647e6522046b2ff23d4ef03 | 92ebbe5c20e460050abd985acb590e6c27199517 | refs/heads/main | 2023-09-04T01:53:59.033608 | 2023-09-01T13:45:03 | 2023-09-01T13:45:03 | 135,768,037 | 4,851 | 648 | Apache-2.0 | 2023-09-12T18:00:22 | 2018-06-01T22:18:01 | C++ | UTF-8 | Python | false | false | 16,230 | py | test_webdataset_requirements.py | # Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES. 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 ... |
68b211e8c998cf85dfe9f6050666bf307bf54e15 | 341414ede1071e23dd3870e291b6f74f1d02a3bb | /hickle/tests/test_legacy_load.py | 7c0222433f5a7c1e0ccc168562a7079ed63eb479 | [
"MIT"
] | permissive | telegraphic/hickle | 2ef897a9aafee1b1e5c7dd715beda8ea9d08d837 | 2b9142389417153d25bdcb6ec1eaf2fd318cee28 | refs/heads/master | 2023-08-20T18:25:48.898776 | 2023-07-20T01:35:48 | 2023-07-20T01:35:48 | 4,468,869 | 466 | 89 | NOASSERTION | 2023-07-20T01:35:49 | 2012-05-28T09:04:16 | Python | UTF-8 | Python | false | false | 2,450 | py | test_legacy_load.py | # %% IMPORTS
# Built-in imports
import glob
from os import path
import warnings
import pytest
import scipy.sparse
import numpy as np
# Package imports
import h5py
# hickle imports
import hickle as hkl
# %% FUNCTION DEFINITIONS
def test_legacy_load():
dirpath = path.dirname(__file__)
filelist = sorted(glob.g... |
7f15e9e829393765395a71b2d5d3fc662e1b4dbb | 3dc647cd07a7361ed401e40d2b7cce8c826c8f6c | /Lib/test/subprocessdata/fd_status.py | d12bd95abee61ceeb8f944736fc9c4e87ddfbd09 | [
"CC-BY-4.0",
"MIT",
"Python-2.0"
] | permissive | RustPython/RustPython | 5ddce4a9848b9de8c041ffd2634f83c0105d3f39 | b864e5da1f18897fc884180b7093df5aa170024f | refs/heads/main | 2023-09-04T12:38:29.458699 | 2023-09-03T12:33:42 | 2023-09-03T12:33:42 | 135,201,145 | 15,815 | 1,302 | MIT | 2023-09-14T08:11:45 | 2018-05-28T19:27:01 | Rust | UTF-8 | Python | false | false | 835 | py | fd_status.py | """When called as a script, print a comma-separated list of the open
file descriptors on stdout.
Usage:
fd_stats.py: check all file descriptors
fd_status.py fd1 fd2 ...: check only specified file descriptors
"""
import errno
import os
import stat
import sys
if __name__ == "__main__":
fds = []
if len(sys.argv... |
eee41147c28e3cbee6aa3d78e0969aa066ad3a51 | 636849fc7edd9dcb095cf3410a121ab37de69f02 | /SoftLayer/CLI/hardware/notification_add.py | 3592a9d24519f478af2f24acb5cb0d4be753f990 | [
"MIT"
] | permissive | softlayer/softlayer-python | bcb09306c3367fdbd2f1407f770c4959729b074c | 5798373055d9f34dfd531d81638a64d0a7901a13 | refs/heads/master | 2023-08-23T19:32:36.990701 | 2023-08-21T03:29:44 | 2023-08-21T03:29:44 | 622,291 | 126 | 182 | MIT | 2023-09-14T15:04:48 | 2010-04-21T20:36:31 | Python | UTF-8 | Python | false | false | 1,282 | py | notification_add.py | """Create a user hardware notification entry."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import formatting
@click.command(cls=SoftLayer.CLI.command.SLCommand, )
@click.argument('identif... |
9289c5be9120d6769c5caeaa0a347b690e23b708 | d0dcd3d2dd1f561a4fa52910884acdaa15a69a2b | /startop/scripts/app_startup/lib/app_runner_test.py | 33d233b03aab8cf985a5d010b1e77e9486c68b13 | [
"LicenseRef-scancode-unicode",
"Apache-2.0"
] | permissive | LineageOS/android_frameworks_base | dfd3aebe9e241e073ba42986eaa44cd78878ea75 | 0101ae8a47ff484d43af3dde506d19cde4590f65 | refs/heads/lineage-19.1 | 2023-08-31T16:18:48.850305 | 2023-06-03T01:09:31 | 2023-08-08T00:55:35 | 75,641,757 | 471 | 2,457 | NOASSERTION | 2022-10-02T20:14:41 | 2016-12-05T15:58:41 | Java | UTF-8 | Python | false | false | 3,713 | py | app_runner_test.py | # Copyright 2019, The Android Open Source Project
#
# 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... |
7279936509fdc6db8ecda89cb3bf30ab6ce039a5 | 9abd182d02355ddf0b79afd4a35f7127a4a66f7a | /scripts/tracking/siamrpn/benchmark.py | 607d97e6e41a480262fd9dfc727a37f39b21054e | [
"Apache-2.0"
] | permissive | dmlc/gluon-cv | e1303086419a5733661d0fcb9095c09d4f2382ad | 567775619f3b97d47e7c360748912a4fd883ff52 | refs/heads/master | 2023-07-19T12:02:36.824294 | 2023-01-19T00:37:33 | 2023-01-19T00:37:33 | 122,896,249 | 6,064 | 1,458 | Apache-2.0 | 2023-01-19T00:37:35 | 2018-02-26T01:33:21 | Python | UTF-8 | Python | false | false | 2,590 | py | benchmark.py | """ SiamRPN benchmark
Code adapted from https://github.com/STVIR/pysot"""
from glob import glob
import argparse
import os
from multiprocessing import Pool
from tqdm import tqdm
from gluoncv.utils.metrics.tracking import OPEBenchmark
from gluoncv.data.otb.tracking import OTBTracking as OTBDataset
def parse_args():
... |
f4ec8cfba3862056455190657a0a1b987e4c4861 | 0032d988541e85c47b5034c20ecf88220dde5a95 | /openbook_auth/tests/views/test_proxy_auth.py | 7d2e080707bb73a8f274e5d2b68c87eb943081af | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | OkunaOrg/okuna-api | eabd37fef9d2be59b590ed8d72bee084ac377997 | f87d8e80d2f182c01dbce68155ded0078ee707e4 | refs/heads/master | 2022-02-04T21:31:10.577601 | 2021-12-28T18:20:39 | 2021-12-28T18:20:39 | 151,052,951 | 185 | 92 | MIT | 2022-01-13T01:00:40 | 2018-10-01T07:44:46 | Python | UTF-8 | Python | false | false | 3,974 | py | test_proxy_auth.py | from django.urls import reverse
from faker import Faker
from rest_framework import status
from rest_framework.test import APITestCase
import logging
from openbook_common.tests.helpers import make_authentication_headers_for_user, make_user, make_proxy_blacklisted_domain
fake = Faker()
logger = logging.getLogger(__na... |
4a560faaf0d5bdd24231600bd2b8b33eb54bdd34 | 9f2c4290576d17fdb4f0b05f2790a8a300576d44 | /scripts/extract.py | 9e5bcb35a9d91e792b01a0c8f80e4f81885e1f20 | [
"MIT",
"CC-BY-4.0",
"LicenseRef-scancode-proprietary-license",
"CC-BY-3.0"
] | permissive | facebookresearch/esm | 1e00896197f3beaacb66bc6eece7da5df1a57e37 | 2b369911bb5b4b0dda914521b9475cad1656b2ac | refs/heads/main | 2023-08-24T21:11:59.756186 | 2023-06-27T15:29:55 | 2023-06-27T15:29:55 | 291,783,502 | 2,293 | 510 | MIT | 2023-09-07T03:14:39 | 2020-08-31T17:41:48 | Python | UTF-8 | Python | false | false | 5,161 | py | extract.py | #!/usr/bin/env python3 -u
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import argparse
import pathlib
import torch
from esm import Alphabet, FastaBatchedDataset, ProteinBertModel, pre... |
6648a3c03ed5976e198fecf51480de01a31225d5 | 93713f46f16f1e29b725f263da164fed24ebf8a8 | /Library/lib/python3.7/site-packages/astropy-4.0-py3.7-macosx-10.9-x86_64.egg/astropy/io/misc/asdf/tags/table/table.py | 4afaaf3b5fa078b62322e430b2f93c15a3a42c95 | [
"BSD-3-Clause"
] | permissive | holzschu/Carnets | b83d15136d25db640cea023abb5c280b26a9620e | 1ad7ec05fb1e3676ac879585296c513c3ee50ef9 | refs/heads/master | 2023-02-20T12:05:14.980685 | 2023-02-13T15:59:23 | 2023-02-13T15:59:23 | 167,671,526 | 541 | 36 | BSD-3-Clause | 2022-11-29T03:08:22 | 2019-01-26T09:26:46 | Python | UTF-8 | Python | false | false | 4,918 | py | table.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
import numpy as np
from asdf import tagged
from asdf import yamlutil
from asdf.tags.core.ndarray import NDArrayType
from astropy import table
from astropy.io.misc.asdf.types import AstropyType, AstropyAsdfType
class TableType:
... |
a3b18b3a77cd32ce389c1c87cf508d8428237f82 | c1ab5fc6d37749cf7dd693a8f6d5475dfa54cd45 | /kubernetes/__init__.py | 0704940b912a928e2881f9252a8f009e6af8c611 | [
"Apache-2.0"
] | permissive | kubernetes-client/python | 2d10e5d7c1358aa4473c1fcd54d2c5a1085cf56e | 68d5a1479e7d735ea454021bc54e453c9b31baf7 | refs/heads/master | 2023-09-01T11:23:54.508420 | 2023-08-31T21:04:31 | 2023-08-31T21:04:31 | 72,473,727 | 5,792 | 3,654 | Apache-2.0 | 2023-09-13T18:34:16 | 2016-10-31T20:08:03 | Python | UTF-8 | Python | false | false | 853 | py | __init__.py | # Copyright 2022 The Kubernetes 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 ... |
63464b74383dae369a5336cae4c4305593c8acc1 | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/bert_extraction/steal_bert_classifier/embedding_perturbations/mixup_bert_embeddings.py | 2f73a450d2c5b4a3be97e9d4ce9301ad8b3d8825 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google-research/language | e941b1a92ab46d40d8d03bb0c314905cb6902ce2 | ac9447064195e06de48cc91ff642f7fffa28ffe8 | refs/heads/master | 2023-08-24T23:10:13.207294 | 2023-05-25T20:47:18 | 2023-05-25T22:29:27 | 153,201,352 | 1,567 | 371 | Apache-2.0 | 2023-07-06T23:03:15 | 2018-10-16T00:58:14 | Python | UTF-8 | Python | false | false | 6,164 | py | mixup_bert_embeddings.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... |
5ea9e5a97b900e4d5cfadd19380e24f2b1bb5516 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoBTag/PerformanceDB/python/Pool_MISTAGSSVHEM.py | 18f26d600261a52e87deac6f784a1673a9248683 | [
"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 | 737 | py | Pool_MISTAGSSVHEM.py | import FWCore.ParameterSet.Config as cms
from CondCore.DBCommon.CondDBCommon_cfi import *
PoolDBESSource = cms.ESSource("PoolDBESSource",
CondDBCommon,
toGet = cms.VPSet(
#
# working points
#
cms.PSet(
record = cms.string('PerformancePayl... |
8463ccd223e8ae8169d898631fb35733b4635923 | 29b62d060fcb01eca2e319b70f4ca7b5c259d7c4 | /alita/serve/server.py | 06ec05cf7d0b2b9abad70154422625bf44f7b720 | [] | no_license | dwpy/alita | eb4d58372b0d9d2988e63656511c61d8d6f88990 | 1d8a1565bc771e5ff16b454147cb44eadd19d237 | refs/heads/master | 2021-06-17T20:42:23.402187 | 2019-06-12T08:53:19 | 2019-06-12T08:53:19 | 174,462,948 | 119 | 2 | null | 2021-06-11T17:49:16 | 2019-03-08T03:31:05 | Python | UTF-8 | Python | false | false | 19,539 | py | server.py | import os
import logging
import httptools
import signal
import asyncio
import functools
import traceback
from datetime import datetime
from alita.serve.utils import *
from urllib.parse import unquote
from websockets import handshake, InvalidHandshake, WebSocketCommonProtocol
HIGH_WATER_LIMIT = 65536
class ServiceUna... |
3a49ba44fb6bbc19202f2c2e8b98671ff0f93d14 | 2337351b228818e41be3002bd38f68f77c2aa074 | /inv/migrations/0029_interface_profile_match_label.py | ffd4479b399ab6023755deed3272fdd125509e4e | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 3,095 | py | 0029_interface_profile_match_label.py | # ----------------------------------------------------------------------
# Add InterfaceProfile match label to interfaces
# ----------------------------------------------------------------------
# Copyright (C) 2007-2022 The NOC Project
# See LICENSE for details
# -------------------------------------------------------... |
adc92cccf95dc090c5ebfca098a39c6002184b04 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-CloudKit/PyObjCTest/test_ckerror.py | e8f579520edb97a5423081da155f90f617d6c47b | [
"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 | 3,120 | py | test_ckerror.py | from PyObjCTools.TestSupport import TestCase, min_os_level
import CloudKit
class TestCKError(TestCase):
def test_enum_types(self):
self.assertIsEnumType(CloudKit.CKErrorCode)
@min_os_level("10.10")
def testConstants(self):
self.assertIsInstance(CloudKit.CKErrorDomain, str)
self.as... |
401f6ea62f9ea281afde1c4fc33bece1280f2d77 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /H2O/ArchiveH2O/future/tests/base.py | 9f4607b691501b83cb36bc92e9fc7d66b049b85f | [
"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 | 19,706 | py | base.py | from __future__ import print_function, absolute_import
import os
import tempfile
import unittest
import sys
import re
import warnings
import io
from textwrap import dedent
from future.utils import bind_method, PY26, PY3, PY2, PY27
from future.moves.subprocess import check_output, STDOUT, CalledProcessError
if PY26:
... |
47436d3a5d300f28cdca3d7d9d9168b7cb8b6110 | 0760fb4901a75766921a205b55686d6d6f049b30 | /python/ray/serve/tests/test_autoscaling_metrics.py | 36046cb88474e2816040dd122c2cb7de4d0abfaf | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 5,146 | py | test_autoscaling_metrics.py | import time
import ray
from ray import serve
from ray._private.test_utils import wait_for_condition
from ray.serve._private.autoscaling_metrics import InMemoryMetricsStore
from ray.serve._private.common import ReplicaState, DeploymentID
class TestInMemoryMetricsStore:
def test_basics(self):
s = InMemoryM... |
48f3fc913720773338a5653f8ccea3792d64640a | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /CondFormats/EcalObjects/test/fillEcalTimeCorrections_cfg.py | 1b0750739387989796a693a56397b84833f3dee4 | [
"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,083 | py | fillEcalTimeCorrections_cfg.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("InitialData")
process.load("CondCore.DBCommon.CondDBCommon_cfi")
process.CondDBCommon.connect = 'sqlite_file:/tmp/ecal_timebias_corrections.db'
process.source = cms.Source("EmptyIOVSource",
lastValue = cms.uint64(1),
timetype = cms.string('runnum... |
627ef439da49e942b663fdecccd3beb825aae6ef | 0a9ef5c24d912ab52b9a80ed97b5bb1240f6369e | /lastversion/utils.py | 116cb3fba33d7c92bbc2c5e6a812fea7c9ab1b7b | [
"GPL-1.0-or-later",
"BSD-2-Clause"
] | permissive | dvershinin/lastversion | 797e7e7f548d61fc3f3e43e0b383049d409ff58a | e300d10d40c637fb0c405cb43926721f3048fbc4 | refs/heads/master | 2023-08-15T09:28:23.209254 | 2023-07-15T13:00:38 | 2023-07-15T13:00:38 | 187,117,077 | 312 | 34 | BSD-2-Clause | 2023-02-24T04:57:00 | 2019-05-17T00:00:09 | Python | UTF-8 | Python | false | false | 10,860 | py | utils.py | import io
import logging
import os
import platform
import re
import sys
import tarfile
import errno
import distro
import requests
import tqdm
from six.moves import urllib
log = logging.getLogger(__name__)
class ApiCredentialsError(Exception):
"""Raised when there's an API error related to credentials"""
class ... |
ebd0ac700d0192cdab1a0208848457c9cbaa8477 | cf35a104dabc3d3647df66aff9db32d18b002e1b | /alternative_wmiircs/python/pyxp/fields.py | c7f0d617528c6fdce9ce25c3455b1dbe9a3f9f7a | [
"MIT"
] | permissive | 0intro/wmii | ba2dff4be1a049c7d4475218a914585a3f810ab5 | 024f29d1058b58aa4ee6b956500a78f69355fb53 | refs/heads/main | 2023-07-11T18:08:43.660898 | 2023-06-25T18:57:45 | 2023-06-25T18:57:45 | 74,551,919 | 110 | 17 | null | null | null | null | UTF-8 | Python | false | false | 4,084 | py | fields.py | from datetime import datetime
import operator
class Field(object):
idx = 0
def __init__(self):
Field.idx += 1
self.id = Field.idx
def repr(self):
return self.__class__.__name__
def __repr__(self):
if hasattr(self, 'name'):
return '<Field %s "%s">' % (self.... |
ae64eabd9c19d984aee4a2b6cd33855809c3e5e4 | a115d1ea106a890a877d902efc70e3f806525de8 | /maskrcnn_benchmark/modeling/roi_heads/keypoint_head/inference.py | 1f6fe2be3efb883ebd7fe86ccfd00377f1e55c5c | [
"Python-2.0",
"MIT"
] | permissive | KaihuaTang/Scene-Graph-Benchmark.pytorch | 7b59051e78d566f1b94836280ca91a61e2503bb4 | 4b6b71a90d4198d9dae574d42b062a5e534da291 | refs/heads/master | 2023-08-04T18:32:27.979660 | 2022-07-29T06:16:23 | 2022-07-29T06:16:23 | 241,830,209 | 1,002 | 261 | MIT | 2023-07-30T08:37:14 | 2020-02-20T08:23:54 | Jupyter Notebook | UTF-8 | Python | false | false | 4,468 | py | inference.py | import torch
from torch import nn
class KeypointPostProcessor(nn.Module):
def __init__(self, keypointer=None):
super(KeypointPostProcessor, self).__init__()
self.keypointer = keypointer
def forward(self, x, boxes):
mask_prob = x
scores = None
if self.keypointer:
... |
aae442a6ae4ba29396a31fc309ef43feb54a47b1 | b4b031f59c62dfd4b27b757eeb1ecd98941e04df | /django_drf_filepond/migrations/0010_temp_chunked_biginteger.py | a10043f25554dc8610da40ac5324a2ed8c6fc486 | [
"BSD-3-Clause"
] | permissive | ImperialCollegeLondon/django-drf-filepond | 7566df0ee21211f914f9bc8196c7e82ef8e370c1 | aec7581a25de7bc545457a4bb546f3f5a5ac805f | refs/heads/main | 2023-08-02T22:03:49.895305 | 2023-04-25T10:05:50 | 2023-04-25T10:05:50 | 158,591,739 | 101 | 41 | BSD-3-Clause | 2023-07-24T14:29:56 | 2018-11-21T18:39:40 | Python | UTF-8 | Python | false | false | 608 | py | 0010_temp_chunked_biginteger.py | # Generated by Django 3.0.5 on 2021-06-25 16:33
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_drf_filepond', '0009_temporaryuploadchunked_offset_utime'),
]
operations = [
migrations.AlterField(
model_name='temporary... |
62d18606655983ded23b0eb890e0e9dec88c2e3a | 3d589d1c56b55fbd2b45b03564b8a9442ebf142b | /examples/catvdog/run.py | da98df4ad9e30ea434cc81cb8d0a694b2c337609 | [
"Apache-2.0"
] | permissive | spotify/klio | 1aff27412e92c9d699259e5ab1eaeb39dc3e9571 | e625565708ed846201d2e05f782c0ce585554346 | refs/heads/develop | 2023-05-25T14:33:28.348335 | 2022-03-23T20:34:09 | 2022-03-23T20:34:09 | 285,928,366 | 815 | 57 | Apache-2.0 | 2023-05-24T21:07:09 | 2020-08-07T22:02:58 | Python | UTF-8 | Python | false | false | 1,701 | py | run.py | # Copyright 2019-2020 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... |
bfffce116549db51539c57dc939329d911de723d | ca7a8f43442e2c6722ebaf03f0abe9a22575a130 | /autolens/exc.py | 03037d21fd55d46ddb2191415177ad64862f8517 | [
"MIT"
] | permissive | Jammy2211/PyAutoLens | 764f2ccdb76b54eea0b4a8f2a0ae077397fb0315 | b31b9d7c8a55d7232695761a41383cb1cc30bd76 | refs/heads/main | 2023-08-23T10:07:14.015683 | 2023-08-17T15:39:49 | 2023-08-17T15:39:49 | 105,440,853 | 142 | 37 | MIT | 2023-09-13T14:08:23 | 2017-10-01T12:33:03 | Python | UTF-8 | Python | false | false | 2,099 | py | exc.py | import autofit as af
from autofit.exc import *
from autoarray.exc import *
from autogalaxy.exc import *
class RayTracingException(af.exc.FitException):
"""
Raises exceptions associated with the `lens/ray_tracing.py` module and `Tracer` class.
For example if the multiple image positions do not t... |
74709bf3e566cd87e6d835a4e32f419031b0b7d1 | 4f50373a5aada7b188ab8ae7ea04d3aef5c7cebf | /papermerge/test/contrib/admin/test_views_index.py | 3e0d869c1382f7a6ecd555d009621db01330e29f | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | ciur/papermerge | f860a9ee5aa64ae51b6e37c09c37327391f87455 | 79f1d152701f984957f9dee58e8196fc3924871c | refs/heads/master | 2023-04-13T17:15:28.292949 | 2022-12-12T06:56:42 | 2022-12-12T06:56:42 | 232,151,602 | 2,148 | 264 | Apache-2.0 | 2022-04-04T18:51:49 | 2020-01-06T17:34:15 | Python | UTF-8 | Python | false | false | 5,699 | py | test_views_index.py | from django.test import TestCase
from django.test import Client
from django.urls import reverse
from django.http import HttpResponseRedirect
from papermerge.core.models import Document
from papermerge.test.utils import (
create_root_user,
)
class AnonymouseUserIndexAccessView(TestCase):
def setUp(self):
... |
c4226dc89d9d638c3b87f41527e03d879886b1c6 | 39568e19301a7a112398be542154950af25591de | /hw/ip/otbn/dv/otbnsim/test/conftest.py | 3e63f98c6b62c62d8729b9873c97fcce90afa42f | [
"CC-BY-4.0",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lowRISC/opentitan | 493995bc7cf7cb3aee486a5203af3fd62bba3bfc | 51f6017b8425b14d5a4aa9abace8fe5a25ef08c8 | refs/heads/master | 2023-08-31T22:05:09.425796 | 2023-08-14T14:52:15 | 2023-08-31T20:31:13 | 204,516,692 | 2,077 | 634 | Apache-2.0 | 2023-09-14T21:16:21 | 2019-08-26T16:30:16 | SystemVerilog | UTF-8 | Python | false | false | 274 | py | conftest.py | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import os
import sys
# Make tested code available for import
sys.path.append(os.path.join(os.path.dirname(__file__), '../'))
|
493a5bfd20a1a622b2ab11bcd26e7179a313c5a8 | 1eca7ab68f713f9134549be8cff40d953d784326 | /empire/server/core/host_service.py | 7bf1b11e74f388f40916ea3d3cf250e886d90c6b | [
"BSD-3-Clause"
] | permissive | BC-SECURITY/Empire | 65576ac931635cded054912a02ed5d02a1b41f8d | 5b2ad2c2e9b9f996e40c484215dfea36fefc808d | refs/heads/main | 2023-09-04T05:00:52.366894 | 2023-08-27T22:08:54 | 2023-08-27T22:08:54 | 199,975,883 | 3,651 | 601 | BSD-3-Clause | 2023-09-08T05:50:26 | 2019-08-01T04:22:31 | PowerShell | UTF-8 | Python | false | false | 404 | py | host_service.py | from sqlalchemy.orm import Session
from empire.server.core.db import models
class HostService(object):
def __init__(self, main_menu):
self.main_menu = main_menu
@staticmethod
def get_all(db: Session):
return db.query(models.Host).all()
@staticmethod
def get_by_id(db: Session, ui... |
21eecae92442a3d64b05931afb22add2c1060c0f | 767c07db1fb131047af3d9b0a065b8fdc8aac9ab | /55-SQL/py_json.py | 1711ed4e3eca092af590a33c4761913ce5817f08 | [] | no_license | DUanalytics/pyAnalytics | e52c5469da30a5f436ec0f3120d9f15fb82fd9b3 | 107a08bebe46ea51afccfeae4a666213bb405d41 | refs/heads/master | 2023-07-08T04:32:54.758902 | 2023-07-03T14:37:04 | 2023-07-03T14:37:04 | 202,094,535 | 394 | 31 | null | null | null | null | UTF-8 | Python | false | false | 3,272 | py | py_json.py | #json
#-----------------------------
#%
import json
path='/duwork/downloads/pydata/ch02/usagov_bitly_data2012-03-16-1331923249.txt'
open(path).readline()
records=[json.loads(line) for line in open(path)]
records[0]['tz']
print(records[0]['tz'])
#time_zones=[rec['tz'] for rec in records] # error
time_zones=[rec['tz'] f... |
7e1300ef3cd69ba832ff122e005690e979b8f6a0 | 15eb68a30bd1bcd8c153ce3c8774e09ef3f4135d | /NightlyTests/tensorflow/eager/test_keras_transformer.py | 32d01c62fc627fe6045264f005ebf7e1caf41792 | [
"BSD-3-Clause"
] | permissive | quic/aimet | 77a984af68fc3c46d98c707d18a14c95a3efdacf | 5a406e657082b6a4f6e4bf48f0e46e085cb1e351 | refs/heads/develop | 2023-08-21T12:51:10.500286 | 2023-08-18T18:35:39 | 2023-08-18T18:35:39 | 257,688,216 | 1,676 | 339 | NOASSERTION | 2023-09-08T06:59:39 | 2020-04-21T18:57:10 | Python | UTF-8 | Python | false | false | 4,857 | py | test_keras_transformer.py | # /usr/bin/env python3.8
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided... |
42ac747defdb68af125dda3849d769438813009f | 0b134572e3ac3903ebb44df6d4138cbab9d3327c | /app/grandchallenge/workstations/migrations/0010_workstationimage_latest_shimmed_version.py | d0543be23d18f9b7555f93316391de96b726e399 | [
"Apache-2.0"
] | permissive | comic/grand-challenge.org | 660de3bafaf8f4560317f1dfd9ae9585ec272896 | dac25f93b395974b32ba2a8a5f9e19b84b49e09d | refs/heads/main | 2023-09-01T15:57:14.790244 | 2023-08-31T14:23:04 | 2023-08-31T14:23:04 | 4,557,968 | 135 | 53 | Apache-2.0 | 2023-09-14T13:41:03 | 2012-06-05T09:26:39 | Python | UTF-8 | Python | false | false | 447 | py | 0010_workstationimage_latest_shimmed_version.py | # Generated by Django 3.2.13 on 2022-06-02 08:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("workstations", "0009_alter_workstation_logo"),
]
operations = [
migrations.AddField(
model_name="workstationimage",
... |
e65c49e77495d83236cb468f3c91cdcb2c223a47 | ed75170ffe743eea5f2fedd518c21b61de55f879 | /test/bats/BATSSeedFinder_test.py | 10fa1851571ab4c0645c77344eb4d8087c0bb868 | [
"MIT"
] | permissive | intive-DataScience/tbats | d294fe6d3dcb4ec0b2fc0db5e6aaaae08ade14b5 | 184bd635e1aea6bd1dd0ac7fa2339257b9ca6bdb | refs/heads/master | 2023-04-30T02:25:00.961248 | 2023-04-17T10:20:31 | 2023-04-17T10:20:31 | 162,722,338 | 162 | 21 | MIT | 2022-12-09T07:30:53 | 2018-12-21T14:19:21 | Python | UTF-8 | Python | false | false | 8,858 | py | BATSSeedFinder_test.py | import numpy as np
import pytest
from tbats.bats.Components import Components
from tbats.abstract.ComponentMatrix import ComponentMatrix
from tbats.bats.SeedFinder import SeedFinder
class TestBATSSeedFinder(object):
@pytest.mark.parametrize(
"seasonal_periods, expected_mask",
[
[ # ... |
8ea38a43ad69538696419d4316bf86f1159d0b29 | 9a0eb3e292d57b59198c7c66a994372ced9cfa5b | /nodes/1.x/python/System.UserName.py | ac95a8e8027d8e96e5f1e00097c907ba5859cc8a | [
"MIT"
] | permissive | andydandy74/ClockworkForDynamo | 544ddf0893f5c0072fca7934f4e128001771f767 | 528400c667c4c3f2b51814af84e85c8fab8a8059 | refs/heads/master | 2023-08-19T03:07:33.489926 | 2023-08-13T04:31:17 | 2023-08-13T04:31:17 | 15,043,988 | 184 | 100 | MIT | 2023-09-04T18:47:40 | 2013-12-09T10:11:01 | Python | UTF-8 | Python | false | false | 68 | py | System.UserName.py | import clr
from System import Environment
OUT = Environment.UserName |
655fd4faa8ceb97f512b4a08b9be581011fcfc14 | 279f415dd1e06c594c6c87deda57e201c73c4542 | /test/espnet2/schedulers/cosine_anneal_warmup_restart.py | c27bd0e70a74392e989fdade07abab693b8789f8 | [
"Apache-2.0"
] | permissive | espnet/espnet | f7ba47271c1a6b1ed606dbbfb04a7f14220bb585 | bcd20948db7846ee523443ef9fd78c7a1248c95e | refs/heads/master | 2023-08-28T23:43:34.238336 | 2023-08-23T02:51:39 | 2023-08-23T02:51:39 | 114,054,873 | 7,242 | 2,244 | Apache-2.0 | 2023-09-14T08:01:11 | 2017-12-13T00:45:11 | Python | UTF-8 | Python | false | false | 650 | py | cosine_anneal_warmup_restart.py | import pytest
import torch
from espnet2.schedulers.cosine_anneal_warmup_restart import (
CosineAnnealingWarmupRestarts,
)
@pytest.mark.parametrize("first_cycle_steps", [10, 20])
def test_CosineAnnealingWarmupRestarts(first_cycle_steps):
linear = torch.nn.Linear(2, 2)
opt = torch.optim.SGD(linear.paramete... |
cd9b00754f1c2e3ade98b85fcda2f83bd3c6a337 | ec5d1ad8418dd62039e1dd8d6d2129ed3d7504de | /mediator/python/chat_room_mediator.py | 34ef2674c973b8c91c107761c57a7cf8e3f412cc | [] | no_license | yusufyilmazfr/tasarim-desenleri-turkce-kaynak | 88feba7369fd4f2609f9dfe27d314f87a5214a7b | f666e998247d683a9f734f8c8802ab38c7da6915 | refs/heads/master | 2023-09-01T11:29:07.908507 | 2023-07-31T07:08:29 | 2023-07-31T07:08:29 | 244,465,123 | 3,298 | 448 | null | 2023-08-20T10:37:03 | 2020-03-02T20:10:59 | HTML | UTF-8 | Python | false | false | 666 | py | chat_room_mediator.py | from abstract_chat_room_mediator import AbstractChatRoomMediator
from chat_user import ChatUser
class ChatRoomMediator(AbstractChatRoomMediator):
"""
Mediator (IChatRoomMediator) arayüzünü uygular.
Colleague (User) nesneleri arasındaki iletişimi koordine eder.
UML diyagramındaki ConcreteMediator yapıs... |
06b067a75624a672b161513f229f74ad19254b91 | b07a323ef3fd85b895b2804b1340c05cde04ceee | /dotmap/__init__.py | 671b003c922ad91b9d296d6c70f28d9fb17988da | [
"MIT"
] | permissive | drgrib/dotmap | ccb7ac45794dd7941e3b674b65355630f03bcd25 | c7a778a95a01a7a0fd2f816a07c62de2478260c6 | refs/heads/master | 2023-08-27T05:04:15.168913 | 2022-04-06T16:26:33 | 2022-04-06T16:26:33 | 40,564,835 | 454 | 58 | MIT | 2022-04-06T16:25:06 | 2015-08-11T20:56:21 | Python | UTF-8 | Python | false | false | 21,040 | py | __init__.py | from __future__ import print_function
from collections import OrderedDict
try:
from collections.abc import MutableMapping, Iterable
except ImportError:
from collections import MutableMapping, Iterable
from json import dumps
from pprint import pprint
from sys import version_info
from inspect import ismethod
# f... |
2dd88885bde8cd062ea9de97ba2f860d77946641 | a381debad5dbcbfa83b549438ea6294c9e5a122e | /examples/drums.py | cc40c1503edefbe8ee3a81a3b777053c0ec2b9b6 | [
"MIT"
] | permissive | pimoroni/explorer-hat | 6092ac8ab567a526ed27d7307883f26a6a8015ac | b65417f503d35bb74a2be70bfa72940c561f865f | refs/heads/master | 2022-05-01T16:42:00.028028 | 2022-03-16T10:25:30 | 2022-03-16T10:25:30 | 29,976,470 | 165 | 77 | MIT | 2021-11-09T13:00:34 | 2015-01-28T16:25:05 | Python | UTF-8 | Python | false | false | 1,198 | py | drums.py | #!/usr/bin/env python
import signal
from sys import exit
try:
import pygame
except ImportError:
exit("This script requires the pygame module\nInstall with: sudo pip install pygame")
import explorerhat
print("""
This example turns your Explorer HAT into a drum kit!
Hit any touch pad to hear a drum sound.
... |
7b584639696762a5dc3f7d609287c99ac8ba2c48 | 069c2295076c482afadfe6351da5ae02be8e18e6 | /tests/forms_tests/field_tests/test_combofield.py | d433fdf2b3f789846a3c59bf37217578acdcb3b0 | [
"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 | 1,576 | py | test_combofield.py | from django.core.exceptions import ValidationError
from django.forms import CharField, ComboField, EmailField
from django.test import SimpleTestCase
class ComboFieldTest(SimpleTestCase):
def test_combofield_1(self):
f = ComboField(fields=[CharField(max_length=20), EmailField()])
self.assertEqual("... |
66edef2ed3ab76d28d331e964136a06caf1c59d2 | 90d02fee4d02962c9e3d03314cd1597c70bf2f8c | /asdf/__init__.py | 92bbcf0fce2fff803ebd8e41f3793f8279f058fb | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | asdf-format/asdf | 08e19f5d603c738b0ae94ccd1a339ff6b8cf4209 | a5b2b2d94f2fc71746f896c6d322439a27dd0bdd | refs/heads/main | 2023-08-17T17:06:20.828932 | 2023-08-08T10:53:27 | 2023-08-08T10:53:27 | 18,112,754 | 328 | 25 | BSD-3-Clause | 2023-09-13T15:57:22 | 2014-03-25T19:00:43 | Python | UTF-8 | Python | false | false | 653 | py | __init__.py | """
asdf: Python library for reading and writing Advanced Scientific
Data Format (ASDF) files
"""
__all__ = [
"AsdfFile",
"Stream",
"open",
"IntegerType",
"ExternalArrayReference",
"info",
"__version__",
"ValidationError",
"get_config",
"config_context",
]
from ._convenience i... |
f1ad7c4a1624a4874ebb29e2dfce82469f6cfe5e | c703b8ac3b5545857f6c95efa2d61eaf7a664021 | /setup.py | e6737a062b1e82df9c0638549c27794fe234147a | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | iPERDance/iPERCore | d29681d229b3098b3517b1abf4f7ea65f579de73 | fcf9a18ffd66bf3fdd3eea4153a3bc4785131848 | refs/heads/main | 2023-07-30T15:04:15.835396 | 2023-04-12T14:21:23 | 2023-04-12T14:21:23 | 313,664,064 | 2,520 | 339 | Apache-2.0 | 2023-05-12T03:26:52 | 2020-11-17T15:36:25 | Python | UTF-8 | Python | false | false | 15,077 | py | setup.py | # Copyright (c) 2020-2021 impersonator.org authors (Wen Liu and Zhixin Piao). All rights reserved.
import os
from os.path import exists
import platform
from setuptools import find_packages, setup
import subprocess
import sys
import re
TORCH_DIST = "https://download.pytorch.org/whl/torch_stable.html"
MMCV_DIST = "http... |
f73ffa688c47f903e316ab712822adf1dcb8af34 | 572afc77a246acb9483b47fc9e1839f47005d736 | /python/federatedml/model_selection/start_cross_validation.py | 94a5ae608671fcc68b88c88e709e84f549d00091 | [
"Apache-2.0"
] | permissive | FederatedAI/FATE | 7c787c308cca9ff46f287d24569c68de0a1cac07 | 8767db5ec0cb93784f64b290bc39b7b545c530fb | refs/heads/master | 2023-08-17T10:13:00.302529 | 2023-06-14T07:01:38 | 2023-06-14T07:01:38 | 167,349,656 | 4,942 | 1,571 | Apache-2.0 | 2023-09-14T07:02:29 | 2019-01-24T10:32:43 | Python | UTF-8 | Python | false | false | 1,233 | py | start_cross_validation.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE 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/lic... |
a2c1dc15e3f4fec16c059dedac625866a956e52e | 2a1b8a671aceda6bc446f8ce26400aa84fa444a6 | /Packs/Accessdata/Scripts/AccessdataCheckProcessExistsInSnapshot/AccessdataCheckProcessExistsInSnapshot_test.py | bb73e96b947aaf4e42819715c34f93fc6343c704 | [
"MIT"
] | permissive | demisto/content | 6d4722d46f0ff0beea2748e9f7de585bf91a78b4 | 890def5a0e0ae8d6eaa538148249ddbc851dbb6b | refs/heads/master | 2023-09-04T00:02:25.618032 | 2023-09-03T21:56:22 | 2023-09-03T21:56:22 | 60,525,392 | 1,023 | 1,921 | MIT | 2023-09-14T20:55:24 | 2016-06-06T12:17:02 | Python | UTF-8 | Python | false | false | 2,444 | py | AccessdataCheckProcessExistsInSnapshot_test.py | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def test_main_flow_process_exist(mocker):
"""
Given:
- a process ID that exists.
When:
- executing the main flow.
Then:
- Make sure that an entry is returned to the war-room meaning that the proces... |
679a7320b1c92e696db1ad7954f0fde0e41d8f43 | d01fa1b6668c66236405b799e39e529d1492af7c | /tests/base.py | b5cac99461884fd4652fd00de39b816e60c8f302 | [
"MIT"
] | permissive | chrisdev/wagtail-cookiecutter-foundation | 426ffd974aa08ab10e4b0e44d5003476c597f2e4 | e7d56ee01eb5976588129d7bd4d5fc6dab2d794a | refs/heads/master | 2023-08-31T06:05:43.999253 | 2022-03-31T18:44:37 | 2022-03-31T18:44:37 | 33,870,540 | 189 | 72 | MIT | 2023-09-14T03:30:34 | 2015-04-13T13:36:50 | Python | UTF-8 | Python | false | false | 2,227 | py | base.py | import os
import re
import shutil
import unittest
from os.path import exists, dirname, join
import sh
from cookiecutter.main import cookiecutter
class DjangoCookieTestCase(unittest.TestCase):
root_dir = dirname(dirname(__file__))
ctx = {}
destpath = None
def check_paths(self, paths):
"""
... |
bf0bdb886ec78cc67cc844ee859e5f72b77ba65c | e5aff0646237acf3639ac805652143cd8267bf33 | /BlenderToolBox/setMat_ceramic.py | 9de6d3ccd5c00bbce65c6be1f924fe4e11873e21 | [
"Apache-2.0"
] | permissive | HTDerekLiu/BlenderToolbox | 42943cf9fee7277d319ff5baffe7810c4c27dfe4 | 8044e77268ff018514ad1501c291f6deb6a07ec6 | refs/heads/master | 2023-07-20T05:14:58.736225 | 2023-07-10T16:33:17 | 2023-07-10T16:33:17 | 162,408,776 | 408 | 48 | null | null | null | null | UTF-8 | Python | false | false | 1,908 | py | setMat_ceramic.py | # Copyright 2020 Hsueh-Ti Derek Liu
#
# 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 w... |
1ca1ee0107dd7c94f13aaf6c9c63de584888ac43 | 2337351b228818e41be3002bd38f68f77c2aa074 | /sa/profiles/Huawei/MA5300/profile.py | 25699e5b7ca7e45ef260c36cf43e65c3d717eeca | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 3,236 | py | profile.py | # ---------------------------------------------------------------------
# Vendor: Huawei
# OS: MA5300
# ---------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
#... |
ff4db2bae209a5a675da2b01b44937a36e829c0b | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/UserInfoAndBenefitQueryResult.py | ab9789977ea9f20388900f6a9fa8b1c495227bc2 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 2,569 | py | UserInfoAndBenefitQueryResult.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.BenefitGradePoint import BenefitGradePoint
class UserInfoAndBenefitQueryResult(object):
def __init__(self):
self._balance = None
self._benefit_info_list = Non... |
302e86ac804a0c5500e8dfb7835d7d43c109a66f | baa2c6f22ff563d417e34692bf3345077eb8fa5f | /IPython/core/tests/test_ultratb.py | c4de95d564a569378809a22cb8556b2023a96d28 | [
"BSD-3-Clause"
] | permissive | ipython/ipython | c42ea223b6e391bb7dd39888cb959d4d5d6b21a1 | e5103f971233fd66b558585cce7a4f52a716cd56 | refs/heads/main | 2023-08-30T18:27:18.436521 | 2023-08-29T12:16:00 | 2023-08-29T12:16:00 | 658,518 | 13,673 | 4,729 | BSD-3-Clause | 2023-09-12T20:22:09 | 2010-05-10T04:46:06 | Python | UTF-8 | Python | false | false | 12,026 | py | test_ultratb.py | # encoding: utf-8
"""Tests for IPython.core.ultratb
"""
import io
import os.path
import platform
import re
import sys
import traceback
import unittest
from textwrap import dedent
from tempfile import TemporaryDirectory
from IPython.core.ultratb import ColorTB, VerboseTB
from IPython.testing import tools as tt
from IP... |
f25944274674f3337906d1b9be57b3527c35ad5b | af101b467134e10270bb72d02f41f07daa7f57d8 | /mmagic/models/editors/deblurganv2/deblurganv2_generator.py | d0f98aaa9a207b702e07aa46c4d4a61b2bc29cc3 | [
"Apache-2.0"
] | permissive | open-mmlab/mmagic | 4d864853417db300de4dfe7e83ce380fd1557a23 | a382f143c0fd20d227e1e5524831ba26a568190d | refs/heads/main | 2023-08-31T14:40:24.936423 | 2023-08-30T05:05:56 | 2023-08-30T05:05:56 | 203,999,962 | 1,370 | 192 | Apache-2.0 | 2023-09-14T11:39:18 | 2019-08-23T13:04:29 | Jupyter Notebook | UTF-8 | Python | false | false | 19,475 | py | deblurganv2_generator.py | # Copyright (c) OpenMMLab. All rights reserved.
import torch
import torch.nn as nn
import torch.nn.functional as F
from mmagic.registry import MODELS
from .deblurganv2_util import MobileNetV2, get_norm_layer, inceptionresnetv2
backbone_list = ['FPNInception', 'FPNMobileNet', 'FPNInceptionSimple']
class FPNHead(nn.M... |
28a171d9353d1b9a3d1d28508b774ae8e59056a9 | b684bd6c260a0ad43392d5dec4bd919fed686ed9 | /tests/settings.py | 480a744ecb4174d92e2508f8662f21f0de97fd81 | [
"MIT"
] | permissive | codingjoe/django-stdimage | e90a5d9c21653372cdfa8e366c2ea3389b425f2e | 7100350161c540dcd949ab2cb1ea47b1e9de0208 | refs/heads/master | 2023-08-25T08:45:47.670247 | 2023-07-31T21:33:00 | 2023-08-03T07:19:02 | 15,314,657 | 285 | 80 | MIT | 2023-09-12T11:25:14 | 2013-12-19T15:08:05 | Python | UTF-8 | Python | false | false | 983 | py | settings.py | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import os
import tempfile
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
}
INSTALLED_APPS = (
"django.contrib.admin",
"dja... |
09a088a34576eabf2cf99dd7a807804a296f0599 | 813f67f6815d0389589b719625c46b2265ca0f87 | /starlette_exporter/labels.py | 5fcd8807b85109b9adffa74b7c5e0f2a8c6c3553 | [
"Apache-2.0"
] | permissive | stephenhillier/starlette_exporter | c0916acb4c592617c31acbb3616a2f48c41aeb45 | 0de22e78233cf88e746b68db76945965d0bfbedf | refs/heads/master | 2023-08-16T17:29:50.915043 | 2023-08-06T13:50:36 | 2023-08-06T13:50:36 | 217,774,698 | 266 | 30 | Apache-2.0 | 2023-08-06T13:50:37 | 2019-10-26T22:04:25 | Python | UTF-8 | Python | false | false | 1,191 | py | labels.py | """utilities for working with labels"""
from typing import Callable, Iterable, Optional
from starlette.requests import Request
def from_header(key: str, allowed_values: Optional[Iterable] = None) -> Callable:
"""returns a function that retrieves a header value from a request.
The returned function can be pas... |
3e313b8a04b12610995251a43c3d124fab5cd665 | 0c932b52ddb40867419dedd394934c059fc4ef7e | /scripts/dcommand.py | 8182f547547f4030624748ed78b0341b3ed21d44 | [
"MIT"
] | permissive | allenai/allenact | ed614f745cbd8ddb1404af6e8d5e855b5d66908a | 9772eeeb7eacc1f9a83c90d1cf549a3f7e783c12 | refs/heads/main | 2023-09-05T01:33:37.424674 | 2023-06-13T18:13:57 | 2023-06-13T18:13:57 | 233,944,205 | 266 | 58 | NOASSERTION | 2023-07-25T17:05:01 | 2020-01-14T21:58:30 | Python | UTF-8 | Python | false | false | 2,932 | py | dcommand.py | #!/usr/bin/env python3
"""Tool to run command on multiple nodes through SSH."""
import argparse
import glob
import os
def get_argument_parser():
"""Creates the argument parser."""
# noinspection PyTypeChecker
parser = argparse.ArgumentParser(
description="dcommand", formatter_class=argparse.Arg... |
734202481a4ecdf99acaa0ce19031b4a320b7681 | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /third_party/webtest/webtest/utils.py | e6b1cf8ad209ceb856f25cbb5617d4f99cc9d6b2 | [
"MIT",
"BSD-3-Clause"
] | permissive | catapult-project/catapult | e2cbdd5eb89f3b1492fc8752494e62ea1df4bae0 | 53102de187a48ac2cfc241fef54dcbc29c453a8e | refs/heads/main | 2021-05-25T07:37:22.832505 | 2021-05-24T08:01:49 | 2021-05-25T06:07:38 | 33,947,548 | 2,032 | 742 | BSD-3-Clause | 2022-08-26T16:01:18 | 2015-04-14T17:49:05 | HTML | UTF-8 | Python | false | false | 4,214 | py | utils.py | # -*- coding: utf-8 -*-
import re
import six
from json import dumps
from webtest.compat import urlencode
class NoDefault(object):
"""Sentinel to uniquely represent no default value."""
def __repr__(self):
return '<NoDefault>'
NoDefault = NoDefault()
def json_method(method):
"""Do a %(method)s... |
33d186848df999925085d997081f4b01d643756d | e22eeb5256e17a96a98b3ff25433aec2d641cd2c | /openstack/tests/unit/accelerator/v2/test_device.py | c354d522253ed753dea1277a9bf37c7b8dbef2a7 | [
"Apache-2.0"
] | permissive | openstack/openstacksdk | b4b95fd7869653feea5a3b783e9a5c588235c039 | d474eb84c605c429bb9cccb166cabbdd1654d73c | refs/heads/master | 2023-09-03T22:50:03.398512 | 2023-07-27T14:09:35 | 2023-08-29T16:28:46 | 16,223,378 | 124 | 130 | Apache-2.0 | 2023-09-06T02:52:47 | 2014-01-25T02:48:00 | Python | UTF-8 | Python | false | false | 2,030 | py | test_device.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
9dd82380d808a4afb48af1116ba1490823d4d92f | 11cd362cdd78c2fc48042ed203614b201ac94aa6 | /apps/jobbrowser/src/jobbrowser/api2.py | b51fe0f7dc1e159df56d9d94fe8cf172b0203c5f | [
"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 | 6,172 | py | api2.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... |
cea5c23229df01446da78f6892265a0ad343d46c | 439f48720042970a7f9b156fbe9442b3ca66cbd9 | /omrdatasettools/CapitanImageGenerator.py | b14847e8c02dc501394e4f127b91b64baa4fd0ef | [
"MIT",
"CC-BY-SA-3.0",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain",
"CC-BY-NC-SA-4.0",
"GPL-1.0-or-later",
"AGPL-3.0-only",
"CC-BY-SA-4.0"
] | permissive | apacha/OMR-Datasets | 93e73a020044f3432c2239070acd1eb5ae914229 | e950865749e3f7ec20a54db1594f76842f65cc40 | refs/heads/main | 2022-12-02T20:35:58.915823 | 2022-11-27T21:58:25 | 2022-11-27T21:58:25 | 97,099,904 | 261 | 47 | MIT | 2022-11-27T12:39:50 | 2017-07-13T08:38:39 | Python | UTF-8 | Python | false | false | 11,627 | py | CapitanImageGenerator.py | import argparse
import os
from typing import List
import numpy
from PIL import Image, ImageDraw
from tqdm import tqdm
from omrdatasettools.Point2D import Point2D
from omrdatasettools.ExportPath import ExportPath
from omrdatasettools.Rectangle import Rectangle
class SimplePoint2D(object):
def __init__(self, x: f... |
47e483eec18ded57f36b3c4f03bf5f7dae8b311f | ef44147ba4e396987d165d95728c3d9acd531ec0 | /.travis/refresh_license.py | bcd4888f4db2e1715782c51dc5f7a378a549e3ad | [
"MIT"
] | permissive | lexus2k/lcdgfx | e92e5832e883067d6411cb461cb8d4cf6e05d9f2 | 0f772e5a90b559d3b24b3f2a6239ac76bc038cce | refs/heads/master | 2023-08-30T11:05:06.476852 | 2023-08-19T08:59:40 | 2023-08-19T08:59:40 | 204,888,210 | 307 | 49 | MIT | 2023-07-04T14:57:24 | 2019-08-28T08:49:49 | C++ | UTF-8 | Python | false | false | 6,428 | py | refresh_license.py | import os
import datetime
import hashlib
exclude_paths = [
'./.git',
'./.github',
'./.travis',
'./tools/templates',
]
include_files = [
'.cpp',
'.c',
'.inl',
'.py',
'.h',
]
code = []
hash_db = {}
def get_hash(data):
hash_md5 = hashlib.md5()
hash_md5.update(data.encode())... |
cd035ce301827d37f8fbeb6e76d984eb14d1788e | 78e9d3d12e96fd37817e510b7b272d0d08ec4053 | /models/networks.py | 6be74fb043df12a223771c681e40023f83ed39ba | [] | no_license | ly015/intrinsic_flow | 15e3926ccc269d3f37d37ceb74d1a3b2ff41823c | 94ea8f0b6c2e9d6380a29055eaa5b0068e894a25 | refs/heads/master | 2022-01-31T05:58:35.091723 | 2022-01-17T03:58:21 | 2022-01-17T03:58:21 | 178,152,311 | 158 | 26 | null | 2022-01-17T03:58:22 | 2019-03-28T07:45:22 | Python | UTF-8 | Python | false | false | 34,715 | py | networks.py | from __future__ import division
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import os
import numpy as np
from modules import *
from skimage.measure import compare_ssim, compare_psnr
import functools
##############################################
# Image generation networks: U... |
1ee4aa351b0fdf6ec648c54f57361fc024d62e5d | 7e1c4dd6a2cae0597b4f4e961063cf077acdfd4c | /couchbase/collection.py | 2ff547f0bdc6941a03f9975289b23d35f0a05f71 | [
"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 | 118,216 | py | collection.py | # Copyright 2016-2022. 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... |
6877607a7789307c3574f5dd574cc6e28a944b4a | 0869d7edac80e8aebe951682a2cc311a083eade3 | /Python/benchmarking/struct_deserialization.py | 08b8b8fa9553434723ea34aeba2795b4d5319aa1 | [
"BSD-2-Clause"
] | permissive | threedworld-mit/tdw | 7d5b4453832647733ff91ad7a7ce7ec2320454c1 | 9df96fba455b327bb360d8dd5886d8754046c690 | refs/heads/master | 2023-09-01T11:45:28.132298 | 2023-08-31T16:13:30 | 2023-08-31T16:13:30 | 245,492,977 | 427 | 75 | BSD-2-Clause | 2023-09-14T17:36:12 | 2020-03-06T18:42:09 | Python | UTF-8 | Python | false | false | 849 | py | struct_deserialization.py | from tdw.controller import Controller
from tdw.tdw_utils import TDWUtils
from tdw.add_ons.benchmark import Benchmark
"""
Benchmark the speed of deserializing structs (such as Vector3 and Quaternion).
"""
if __name__ == "__main__":
o_id = 0
cmds = [{"$type": "teleport_object",
"position": {"x": 0... |
661c77747485dc2e72dc55f04d7b9aa2ea0909db | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/cognitiveservices/custom.py | 83ddd28c1a77a5ba5ba45f3439cfb38e689c99dd | [
"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 | 11,350 | py | custom.py | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
61ccc578ba7e38fd1b8ca0180d8f757b1ae789b4 | 62179a165ec620ba967dbc20016e890978fbff50 | /nncf/quantization/algorithms/hyperparameter_tuner/algorithm.py | fba7b984278c580802d58535049af14adaa67b76 | [
"Apache-2.0"
] | permissive | openvinotoolkit/nncf | 91fcf153a96f85da166aacb7a70ca4941e4ba4a4 | c027c8b43c4865d46b8de01d8350dd338ec5a874 | refs/heads/develop | 2023-08-24T11:25:05.704499 | 2023-08-23T14:44:05 | 2023-08-23T14:44:05 | 263,687,600 | 558 | 157 | Apache-2.0 | 2023-09-14T17:06:41 | 2020-05-13T16:41:05 | Python | UTF-8 | Python | false | false | 15,350 | py | algorithm.py | # Copyright (c) 2023 Intel Corporation
# 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 writ... |
29fb0f392a94b44499f146b7cc89f67a22b26d51 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/webpubsub/azure-messaging-webpubsubservice/tests/disable_test_smoke_async.py | d7e660ea790a7b0e49d3f5b1629c193e082f3d52 | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 3,697 | py | disable_test_smoke_async.py | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# ---------------------------------------------------------------------... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.