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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2d187fb956b0be7288f7c4d671abb7300d0dfefa | 99dcb18a9e3ea367272f740b8cbf3c34285a0c08 | /google/cloud/aiplatform/docker_utils/errors.py | 39760921f3c9eb631a78c6231ba25becc47462f3 | [
"Apache-2.0"
] | permissive | googleapis/python-aiplatform | 926a4873f35dbea15b2fd86c0e16b5e6556d803e | 76b95b92c1d3b87c72d754d8c02b1bca652b9a27 | refs/heads/main | 2023-08-19T23:49:02.180075 | 2023-08-19T13:25:59 | 2023-08-19T13:27:27 | 298,017,988 | 418 | 240 | Apache-2.0 | 2023-09-14T21:08:33 | 2020-09-23T15:43:39 | Python | UTF-8 | Python | false | false | 1,847 | py | errors.py | # -*- coding: utf-8 -*-
# Copyright 2022 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 o... |
fcb4b7b0b522050ac31889918ec6161b46ee9406 | b58b6b1400676b2a62ce4611dd62c906beaeb50c | /bfxapi/utils/logger.py | 6ebac5a64741132a8d470c3e22bc37597ff55af1 | [
"Apache-2.0"
] | permissive | bitfinexcom/bitfinex-api-py | caf5254c2273ea35cc5887de10e2b13e60e178f8 | e281f7be9ec36cb601094082711d86cf5ca4fa68 | refs/heads/master | 2023-08-04T23:46:35.901385 | 2023-06-23T07:42:47 | 2023-06-23T07:42:47 | 157,535,962 | 195 | 155 | Apache-2.0 | 2023-07-28T13:19:59 | 2018-11-14T11:03:37 | Python | UTF-8 | Python | false | false | 1,611 | py | logger.py | import logging, sys
BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE = range(8)
COLOR_SEQ, ITALIC_COLOR_SEQ = "\033[1;%dm", "\033[3;%dm"
COLORS = {
"DEBUG": CYAN,
"INFO": BLUE,
"WARNING": YELLOW,
"ERROR": RED
}
RESET_SEQ = "\033[0m"
class _ColorFormatter(logging.Formatter):
def __init__(se... |
2528164a7d096e3600207663680774e9cc673872 | e60427c9aed40554579fb7497f6a1583c6819d00 | /androidemu/emulator.py | a7e0f737996972c2813782df4d5de53713a05169 | [] | no_license | maiyao1988/ExAndroidNativeEmu | 3d21da0edee6168b58f3cba10d0cb667a6b9615f | 0915507b92699685af5dc266114f01451aed0fd2 | refs/heads/master | 2023-08-11T05:58:04.324095 | 2022-06-29T10:29:36 | 2022-06-29T10:29:36 | 236,504,849 | 551 | 165 | null | 2021-08-11T15:43:05 | 2020-01-27T14:10:24 | Python | UTF-8 | Python | false | false | 11,902 | py | emulator.py | import logging
import os
import time
import importlib
import inspect
import pkgutil
import sys
import os.path
from random import randint
from unicorn import *
from unicorn.arm_const import *
from unicorn.arm64_const import *
from . import config
from . import pcb
from .const import emu_const
from .cpu.syscall_handler... |
a450edab6d3283d244544c232cfabc356dddfe0e | e1cddfd754d952134e72dfd03522c5ea4fb6008e | /test/test_policer_input.py | 6b4ab54a37e2683f485df36adf32a9127bd83a9f | [
"Apache-2.0"
] | permissive | FDio/vpp | 0ad30fa1bec2975ffa6b66b45c9f4f32163123b6 | f234b0d4626d7e686422cc9dfd25958584f4931e | refs/heads/master | 2023-08-31T16:09:04.068646 | 2022-03-14T09:49:15 | 2023-08-31T09:50:00 | 96,556,718 | 1,048 | 630 | Apache-2.0 | 2023-06-21T05:39:17 | 2017-07-07T16:29:40 | C | UTF-8 | Python | false | false | 8,034 | py | test_policer_input.py | #!/usr/bin/env python3
# Copyright (c) 2021 Graphiant, Inc.
import unittest
import scapy.compat
from scapy.layers.inet import IP, UDP
from scapy.layers.l2 import Ether
from scapy.packet import Raw
from framework import VppTestCase, VppTestRunner
from vpp_papi import VppEnum
from vpp_policer import VppPolicer, PolicerA... |
0673e6613e98c7339a095d9c85f20ac8d9ed3ce9 | 4ccc4879839b3d2a71908ead145c884b0e525927 | /tests/test_blobxfer_operations_azure.py | 7af007aa84d698b961ce6f4e5a004f8754ea8001 | [
"MIT"
] | permissive | Azure/blobxfer | 185c565aa51d2bad3fc177203c62cd1c8b4e1730 | 0ac1212326a43dfd6cb2b8525ff95f1c4ae540af | refs/heads/master | 2023-08-28T22:23:38.915857 | 2022-10-24T21:48:51 | 2022-10-24T21:48:51 | 64,148,806 | 155 | 55 | MIT | 2023-08-27T19:08:47 | 2016-07-25T16:03:06 | Python | UTF-8 | Python | false | false | 21,232 | py | test_blobxfer_operations_azure.py | # coding=utf-8
"""Tests for operations azure"""
# stdlib imports
import unittest.mock as mock
import pathlib
# non-stdlib imports
import azure.storage.blob
import azure.storage.file
import pytest
# local imports
import blobxfer.models.metadata as md
import blobxfer.models.options
# module under test
import blobxfer.mo... |
d4f2fce9732580061de81674d0528818e6e25dd4 | 3febe9bd6d3f0240754239bca7c02720a53dbe22 | /pyblazing/pyblazing/apiv2/__init__.py | 482e64babdf1b5d7b63ae729069ef86cc2f45111 | [
"Apache-2.0"
] | permissive | BlazingDB/blazingsql | 9c7b1bdad1538a4478332de57375830090069e85 | a35643d4c983334757eee96d5b9005b8b9fbd21b | refs/heads/branch-21.08 | 2023-08-17T16:10:36.051621 | 2021-09-30T21:51:09 | 2021-09-30T21:51:09 | 150,149,024 | 854 | 114 | Apache-2.0 | 2022-09-16T23:58:36 | 2018-09-24T18:25:45 | C++ | UTF-8 | Python | false | false | 462 | py | __init__.py | from enum import IntEnum, unique
# NOTE Same values from ral (bsqlengine) DataType (DataType.h and cio.pdx)
@unique
class DataType(IntEnum):
UNDEFINED = (999,)
PARQUET = (0,)
ORC = (1,)
CSV = (2,)
JSON = (3,)
CUDF = (4,)
DASK_CUDF = 5
ARROW = 6
MYSQL = 7,
POSTGRESQL = 8,
SQ... |
93681abec494d1ac25ddca0e8db5c8e95ae1327a | 9c87c7ddaf5011cc475ec6f4343cc1c7ff290b33 | /wetterdienst/boot.py | 0167fdb36d3afd00bc49e3581aa400ff87dfe667 | [
"MIT"
] | permissive | earthobservations/wetterdienst | c74d80bbb4ce178f3e42936ca7364f9bee66d83b | 448fbd56b67978cf8f4215dedc02a11b89f66b01 | refs/heads/main | 2023-08-08T12:02:45.115090 | 2023-07-30T16:13:41 | 2023-07-30T16:37:09 | 160,953,150 | 283 | 42 | MIT | 2023-09-10T22:36:33 | 2018-12-08T15:39:42 | Python | UTF-8 | Python | false | false | 1,313 | py | boot.py | # """Wetterdienst - Open weather data for humans"""
# -*- coding: utf-8 -*-
# Copyright (C) 2018-2023, earthobservations developers.
# Distributed under the MIT License. See LICENSE for more info.
def monkeypatch():
from wetterdienst.monkeypatch import fsspec_monkeypatch
fsspec_monkeypatch.activate()
def g... |
710698844db5bc53a757fdae5b41449a7b56c2c1 | 4d191dd155a746e2d1fb876c2a615b662d3ca8b6 | /events/utils/default_events_builder.py | 6a326f454f5e880d1c45cb7da2fa28eccd760ddf | [
"MIT"
] | permissive | jeffshek/betterself | cf82fda5e9c62d22c882c0fe13409069a0f6273e | 51468253fc31373eb96e0e82189b9413f3d76ff5 | refs/heads/master | 2023-09-01T02:13:17.917643 | 2020-08-10T18:50:54 | 2020-08-10T18:50:54 | 56,734,453 | 107 | 14 | MIT | 2023-09-12T19:22:22 | 2016-04-21T01:57:40 | Python | UTF-8 | Python | false | false | 2,596 | py | default_events_builder.py | from events.models import UserActivity
from supplements.models import Ingredient, Measurement, IngredientComposition, Supplement, UserSupplementStack, \
UserSupplementStackComposition
DEFAULT_ACTIVITIES = [
'Meditated',
'Went to Gym'
]
SPECIAL_ACTIVITIES = [
'Started New Job',
]
class DefaultEventsB... |
8ea64b2384f220346d992b58c896bab1bc61da82 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Alignment/SurveyAnalysis/test/run-converter_cfg.py | 329f3b2dda5ff66d453594fc01090dbd1936a5ae | [
"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 | 2,930 | py | run-converter_cfg.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("DATACONVERTER")
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = 'auto:phase1_2022_realistic'
process.load("Configuration.Geometry.GeometryDB_cff")
process.load("Alignment.SurveyAnalysis.Surv... |
e92437c5ed6feb1a913b6721bcac3f81c3aba01d | 99fa07ff170c4b5f880013a58f20a6412bd88dbf | /tests/_test_process_executor.py | f58af9f832dac30d0f89396d9f7bc9679fca506c | [
"BSD-3-Clause"
] | permissive | joblib/loky | 72df8afddfc55a6d2575a13730a1973bd71a49bb | 05da9a84b6bae8dd4370f553ffcd06df99b54f86 | refs/heads/master | 2023-08-23T00:35:06.989283 | 2023-06-29T13:07:28 | 2023-06-29T13:07:28 | 48,578,152 | 244 | 32 | BSD-3-Clause | 2023-06-29T13:43:09 | 2015-12-25T11:16:10 | Python | UTF-8 | Python | false | false | 42,704 | py | _test_process_executor.py | from loky import process_executor
import os
import gc
import sys
import time
import shutil
import platform
import pytest
import weakref
import tempfile
import traceback
import threading
import faulthandler
import warnings
from math import sqrt
from pickle import PicklingError
from threading import Thread
from collecti... |
540843dbe6db7f4b225d6211108f9cba963d7fcf | f1c2e4b3147af77e23306f841610aafd6db1c6b0 | /submarine-sdk/pysubmarine/example/tracking.py | 678e5986ff2e980f4c4a3103ff15ec426ae07a34 | [
"Apache-2.0",
"LicenseRef-scancode-unknown",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"BSD-2-Clause",
"GPL-2.0-only",
"LicenseRef-scancode-public-domain",
"MIT",
"CDDL-1.1",
"Classpath-exception-2.0"
] | permissive | apache/submarine | a2927f5f4f7f5faff4701139f2f0f88a98195e7f | 0c10613f39b707d5e446c515c12fa28295c8052e | refs/heads/master | 2023-08-30T14:35:43.145942 | 2023-08-20T00:19:54 | 2023-08-24T23:50:49 | 209,459,144 | 663 | 269 | Apache-2.0 | 2023-09-03T09:05:06 | 2019-09-19T04:00:17 | Java | UTF-8 | Python | false | false | 1,201 | py | tracking.py | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use t... |
d5f77dce1b071872e8c442d8b43bcb07adff3b23 | c26483bc1399e7879471a9e53d0288cb2c756088 | /onnxmltools/convert/coreml/operator_converters/neural_network/Softmax.py | 8c9987f64ad82066786bab16c1b3a2d9a6b41ad5 | [
"Apache-2.0"
] | permissive | onnx/onnxmltools | 6782d9e1d2c75be7618b1378405d31198a310027 | 024a62f6915e6c3b9e040befaf058c7e60c271de | refs/heads/main | 2023-09-04T04:57:10.943548 | 2023-08-28T16:43:37 | 2023-08-28T16:43:37 | 121,798,175 | 827 | 189 | Apache-2.0 | 2023-09-13T16:07:20 | 2018-02-16T20:37:33 | Python | UTF-8 | Python | false | false | 452 | py | Softmax.py | # SPDX-License-Identifier: Apache-2.0
from ....common._registration import register_converter
def convert_softmax(scope, operator, container):
op_type = "Softmax"
inputs = [variable.full_name for variable in operator.inputs]
outputs = [variable.full_name for variable in operator.outputs]
attrs = {"na... |
b4618d4b432984edd069141ce566132ba419af1e | da8471ad2f90a3efa31acb0c986020357cdb5e4c | /confidant/scripts/migrate.py | 3d60d0ad415fbbce26e77b19099404b05493e559 | [
"Apache-2.0"
] | permissive | lyft/confidant | af18cc7085303ee5bab873c78567e14ae48630ab | 8033824e0b3c156ee5588e5b31f8dff8e421a01e | refs/heads/master | 2023-09-01T20:46:07.051295 | 2023-08-21T17:01:49 | 2023-08-21T17:01:49 | 42,324,225 | 1,918 | 146 | Apache-2.0 | 2023-09-06T21:20:59 | 2015-09-11T18:02:12 | Python | UTF-8 | Python | false | false | 3,822 | py | migrate.py | import sys
import logging
from flask_script import Command
from confidant.models.blind_credential import BlindCredential
from confidant.models.service import Service
import json
import six
from pynamodb.attributes import Attribute, UnicodeAttribute
from pynamodb.constants import STRING_SET
from pynamodb.models import... |
7a94e8766a6dc91e72f3a449ed837196dde7baa8 | c1eb1cf7ab9b416ecf455c2f75b46ab21ee8f8b4 | /library/api/tFlask.py | 29ed643edb0b5d2619e3733510e84fe708b3c9fe | [
"Apache-2.0"
] | permissive | JunManYuanLong/TcloudServer | 1b9b45765cb9bfb9bcbde505b80378be657b61a6 | 6b26d7d2d31c0fa8d3954370f8714157f0f610d0 | refs/heads/master | 2022-07-30T19:35:07.776461 | 2022-01-26T02:34:16 | 2022-01-26T02:34:16 | 284,940,707 | 359 | 86 | NOASSERTION | 2021-04-01T06:10:45 | 2020-08-04T09:54:37 | Python | UTF-8 | Python | false | false | 2,548 | py | tFlask.py | from flask import Flask, jsonify
from library.api.db import db
# from library.api.db import cache
from library.api.parse import format_response
from library.api.tMiddleware import t_middleware
from library.tlogger import logger_create
try:
from public_config import SERVER_ENV
except ImportError:
SERVER_ENV = ... |
b512b3a21e9eaafc571ed79a9860f36cc5b41dfc | 5da5473ff3026165a47f98744bac82903cf008e0 | /packages/google-cloud-securitycenter/google/cloud/securitycenter_v1/types/cloud_dlp_inspection.py | e3e863f45d9436f67be889f5c82e32ecfebb05ff | [
"Apache-2.0"
] | permissive | googleapis/google-cloud-python | ed61a5f03a476ab6053870f4da7bc5534e25558b | 93c4e63408c65129422f65217325f4e7d41f7edf | refs/heads/main | 2023-09-04T09:09:07.852632 | 2023-08-31T22:49:26 | 2023-08-31T22:49:26 | 16,316,451 | 2,792 | 917 | Apache-2.0 | 2023-09-14T21:45:18 | 2014-01-28T15:51:47 | Python | UTF-8 | Python | false | false | 2,087 | py | cloud_dlp_inspection.py | # -*- coding: utf-8 -*-
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
4d2bf795958f5e1299fa83439a0aa8e5c5274dd2 | 568fa58296378fa129ab3349adf010daa44ed45b | /tests/common/test_op/ascend/elemwise_sum.py | b7d142874576925e47df7becae7a3a020b57fc0a | [
"Apache-2.0",
"BSD-3-Clause",
"NCSA",
"X11-distribute-modifications-variant",
"Zlib",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | mindspore-ai/akg | 37f471badc66de6a831f1f45ad84344f34d23ef2 | 99f33858d6972741748cbfc9ab0bf9600428fef7 | refs/heads/master | 2023-07-25T23:03:17.672665 | 2023-07-11T07:33:57 | 2023-07-11T07:33:57 | 274,077,856 | 319 | 36 | Apache-2.0 | 2021-12-30T13:43:08 | 2020-06-22T08:09:05 | Python | UTF-8 | Python | false | false | 2,695 | py | elemwise_sum.py | # Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... |
d6451816c6a3c153cecf6b044599c81ef0875a42 | 3081774fbe534fc6d9d40de68f368eda09bad4fa | /ServerInstall.py | de3da9b5dee1562c8481fff3a5c1531bb35fe5b3 | [] | no_license | AngelSecurityTeam/Recreator-Phishing | c916d4039fbda5c5b45ad7b6ec7e14f72d7391e4 | 0ef1e7c5c9551247399ba24a27022fb881647700 | refs/heads/master | 2023-04-03T13:23:04.283354 | 2021-04-17T22:38:06 | 2021-04-17T22:38:06 | 208,916,591 | 287 | 70 | null | null | null | null | UTF-8 | Python | false | false | 1,484 | py | ServerInstall.py |
from subprocess import check_output
import os
from platform import system as systemos, architecture
from wget import download
# NGROK
def Ngrok():
if True:
if 'Android' in str(check_output(('uname', '-a'))) or 'arm' in str(check_output(('uname', '-a'))):
filename = 'ngrok-stable-linux-arm.zip... |
c480c4767f25be96f724cf45cb42eb5fe4ac977f | 2853845c003d03db22f67c3303fa1ec333180ae7 | /test/trainer/test_step_trainer.py | 77771364615be07cb74cfacbf8bd32e96efe3711 | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | bytedance/fedlearner | fc1dd2ba2ec88092e83a32732eccea52451ce552 | 436e4959952c970917ee8f47b920f0a76cd4dd05 | refs/heads/master | 2023-08-14T23:01:02.875453 | 2023-05-23T03:44:03 | 2023-05-23T03:44:03 | 235,348,659 | 893 | 243 | Apache-2.0 | 2023-06-08T07:37:18 | 2020-01-21T13:26:35 | Python | UTF-8 | Python | false | false | 13,110 | py | test_step_trainer.py |
# Copyright 2020 The FedLearner 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 applic... |
fac5944ed45d470dfc9b4fcfb8be9dbe98e14416 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/tensor/reshape/tests/test_reshape.py | bf0a25944210d2e0faa223c83b723afbc942f0a0 | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 2,083 | py | test_reshape.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... |
94845278f783a644a243ed829affc042abf5500b | 32e910f5440c10b384bb26b5555ac7adb77540ee | /tools/infrastructure/install_hooks.py | 1e1f63de43e76ba57ebf35ef3fec882b653719e5 | [] | permissive | smartdevicelink/sdl_core | 76658282fd85b16ed6d91d8d4087d8cd1353db76 | 7343fc72c12edc8ac42a62556c9e4b29c9408bc3 | refs/heads/master | 2022-11-04T12:17:58.725371 | 2022-10-26T15:34:13 | 2022-10-26T15:34:13 | 24,724,170 | 269 | 306 | BSD-3-Clause | 2022-10-26T15:34:15 | 2014-10-02T15:16:26 | C++ | UTF-8 | Python | false | false | 978 | py | install_hooks.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Install (copy) git hooks
"""
import os
import glob
import shutil
from utils import setup_working_dir
def uninstall_hooks(hooks_dir):
print('Deleting existing pre-commit hooks from {}'.format(hooks_dir))
files = glob.glob(os.path.join(hooks_dir, 'pre-commit*... |
60fbecdd159e278f0459573b947c7f5bab885f8b | e24f602d08fa2bdffde52abc5c33dce3480cb403 | /src/harvesters/_private/core/subject.py | af8edc7dd01421ed66459d1be92eb91033662638 | [
"CC0-1.0",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | genicam/harvesters | 0a7a1b61ea275e6705ba19453d2a3f13d3b890da | b97fec3c0972007b1a15a2b6a8b7e5582d6d72d7 | refs/heads/master | 2023-08-14T15:19:54.533436 | 2023-04-10T09:17:50 | 2023-04-10T09:17:50 | 133,908,095 | 462 | 88 | Apache-2.0 | 2023-08-02T04:25:30 | 2018-05-18T05:40:35 | Python | UTF-8 | Python | false | false | 1,354 | py | subject.py | #!/usr/bin/env python3
# ----------------------------------------------------------------------------
#
# Copyright 2018 EMVA
#
# 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://ww... |
2c3e15131d0fddb7764d02213f2e87be4c270b7b | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /14_并查集/经典题/2076. 处理含限制条件的好友请求.py | f14cbbdba22a00487f308241e38d44035d2497a2 | [] | 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 | 3,693 | py | 2076. 处理含限制条件的好友请求.py | from collections import defaultdict
from typing import DefaultDict, List
from 可撤销并查集 import RevocableUnionFindArray
# restrictions[i] = [xi, yi] 意味着用户 xi 和用户 yi 不能 成为 朋友
# 如果第 j 个好友请求 成功 ,那么 result[j] 就是 true
# 2 <= n <= 1000
# 0 <= restrictions.length <= 1000
# 1 <= requests.length <= 1000
class UnionF... |
743032888e6de6f1b996f5d47c5b96c9b6c5edf2 | afd2087e80478010d9df66e78280f75e1ff17d45 | /torch/package/_package_pickler.py | cabc6a82164fb3aaf767f14cf60bca58535fcf61 | [
"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 | 4,622 | py | _package_pickler.py | """isort:skip_file"""
from pickle import ( # type: ignore[attr-defined]
_compat_pickle,
_extension_registry,
_getattribute,
_Pickler,
EXT1,
EXT2,
EXT4,
GLOBAL,
Pickler,
PicklingError,
STACK_GLOBAL,
)
from struct import pack
from types import FunctionType
from .importer impo... |
4b1c27472b9d78bcac874203cbc1c52a34fc0eab | 7f0ed84404abb57c3bc062cd986b67c6a254d3f3 | /check.py | 40c6aa979b88d37df35bdcc5b9453e708d28cfa3 | [
"BSD-3-Clause"
] | permissive | abhinavsingh/proxy.py | ad8eff50476815c4654cade3b6fe628e1ecea2eb | 30574fd0414005dfa8792a6e797023e862bdcf43 | refs/heads/develop | 2023-09-01T03:40:13.473734 | 2023-04-17T04:12:18 | 2023-04-17T04:12:18 | 12,228,178 | 2,691 | 657 | BSD-3-Clause | 2023-09-08T11:56:39 | 2013-08-19T21:33:51 | Python | UTF-8 | Python | false | false | 2,934 | py | check.py | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... |
6cd0af7afb580dc7e428bf195f777e845da35086 | 8d585fa3b2419d9b993be2f2652e448cfeedc8b2 | /checks/wmi_check.py | 2ae2fdd911f5c74b15a7331b4b70a110e20a81ca | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | DataDog/dd-agent | bd4ef0edb234293b51d30894a529ce94b37060f8 | 16fa4ec9ae11ca0adfffbd260c5b4899dc73509f | refs/heads/master | 2023-08-16T09:52:21.816487 | 2023-07-11T15:37:34 | 2023-07-11T15:37:34 | 1,210,071 | 1,227 | 991 | NOASSERTION | 2023-06-28T12:20:19 | 2010-12-31T03:02:47 | Python | UTF-8 | Python | false | false | 436 | py | wmi_check.py | # provided for backward compatibility. wmi_check.py renamed to winwmi_check.py
# to prevent collision with the actual wmi check; provide the redirect for
# any agent check that uses the base library
#
# this file will be deprecated in Agent6
from checks.winwmi_check import ( # noqa: F401
WMIMetric,
InvalidWMI... |
a50d617b1350bc45c9ad022b26f38042dceb2ba2 | ce1c91c33d9b612e97361527e5a974996208c90d | /glue/core/tests/test_pandas.py | 282597ddbb3e720ef6a488c3a32898735ee5282c | [
"BSD-3-Clause"
] | permissive | glue-viz/glue | 5f52faaf91e1ca4822d3983b6a4b9b60e8807f38 | 1a5c7676c025a1a025068b806f6f90ed53bba543 | refs/heads/main | 2023-09-04T09:24:00.519833 | 2023-08-17T09:40:04 | 2023-08-17T09:40:04 | 1,768,238 | 609 | 149 | NOASSERTION | 2023-09-13T20:56:14 | 2011-05-18T20:58:54 | Python | UTF-8 | Python | false | false | 2,204 | py | test_pandas.py | import numpy as np
import pandas as pd
from unittest.mock import MagicMock
from pandas.testing import (assert_series_equal,
assert_frame_equal)
from ..component import Component, DerivedComponent, CategoricalComponent
from ..data import Data
class TestPandasConversion(object):
d... |
a9292ccfcdfe3a0b92ba8d9dfe25f139ae3005f6 | b49e949f8e6dff23c82be162c6fe5562c7a0afdd | /Projection/DataUtils/eval.py | b7acf41667ceefd06d707bb26c0c106c01674bc6 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | scofield7419/XSRL-ACL | 8bb2e5bb445611b02a2377b75dbbaa73d01c18d9 | ea918bfecb360dfcf741a9a7dc59cc6d7eae6628 | refs/heads/master | 2023-06-24T09:36:44.696791 | 2023-06-15T09:15:25 | 2023-06-15T09:15:25 | 254,301,176 | 281 | 4 | null | null | null | null | UTF-8 | Python | false | false | 2,166 | py | eval.py | class Eval:
def __init__(self):
self.predict_num = 0
self.correct_num = 0
self.gold_num = 0
self.precision = 0
self.recall = 0
self.fscore = 0
self.acc = 0
def clear_PRF(self):
self.predict_num = 0
self.correct_num = 0
self.gold_... |
7ddae8e13746428ed53cbc9de57c4b4b271b03df | 3537abc0aac3a8e4184572a290039bdde8e2d3f6 | /src/tests/older_versions/v100/test_list_union_remove_and_increment.py | 204d15107920a71a36e25d120823001ae17b41ad | [
"Apache-2.0"
] | permissive | octabytes/FireO | 859ba0baecbd339c7cdc0cdf8b145f3b2b81ce3a | cd019ef140fa8f9f32316ab4dce99ea0cd230284 | refs/heads/master | 2023-09-03T07:06:35.567277 | 2023-07-18T06:24:14 | 2023-07-18T06:24:14 | 211,646,730 | 274 | 43 | Apache-2.0 | 2023-09-05T07:55:25 | 2019-09-29T10:37:00 | Python | UTF-8 | Python | false | false | 910 | py | test_list_union_remove_and_increment.py | import fireo
from fireo.fields import ListField, NumberField
from fireo.models import Model
class SpecCity(Model):
states = ListField()
population = NumberField()
def test_list_union():
city = SpecCity.collection.create(states=['LA', 'DC'], population=100)
city.states = fireo.ListUnion(['AB'])
c... |
811a0f04247b76feff55588b487c469368258173 | cb387354b5c160f31e16baec5eda433538b2bd4f | /setup.py | 4458676e9412fab84a5e074d22c735bfd5f3808b | [
"BSD-2-Clause-Views"
] | permissive | fzlee/alipay | 88a93077d0f64b0d64f9d9fc57f6c74814e789b9 | 79cc3067e3accbbfd31e54e95281060421fc3c57 | refs/heads/master | 2023-08-07T16:18:54.903696 | 2023-06-10T06:11:34 | 2023-06-10T06:11:34 | 74,120,580 | 1,416 | 442 | NOASSERTION | 2023-01-10T10:38:03 | 2016-11-18T10:37:16 | Python | UTF-8 | Python | false | false | 1,131 | py | setup.py | #!/usr/bin/env python
# coding: utf-8
"""
setup.py
~~~~~~~~~~
"""
from setuptools import setup
import unittest
def alipay_test_suite():
test_loader = unittest.TestLoader()
test_suite = test_loader.discover('tests')
return test_suite
setup(
name="python-alipay-sdk",
version="3.3.0",
a... |
187aa50d0a7ef3b1280c27814c5763a85995b931 | 8b41d9bcc3367c5532193f3e3015987cfb378713 | /hparams.py | ad0b0d11df2466d21cf480fea09e8d3a8485d47e | [
"MIT"
] | permissive | BogiHsu/Tacotron2-PyTorch | 063ef7da8a8943395bac38aec98ab34b7df3c330 | b1761fd7660e56adf39f3c8d02852fbaec1da2c5 | refs/heads/master | 2022-05-10T05:13:57.226182 | 2022-04-12T10:40:56 | 2022-04-12T10:40:56 | 189,844,891 | 155 | 38 | null | null | null | null | UTF-8 | Python | false | false | 1,868 | py | hparams.py | from text import symbols
class hparams:
seed = 0
################################
# Data Parameters #
################################
text_cleaners=['english_cleaners']
################################
# Audio #
################################
... |
bf40a9c75e0b5c2d963c99c1c4296f16337f0660 | c085f61a0f9da8ccd2f56ab9142799a4dcfd1052 | /bindings/pydeck-carto/examples/scripts/carto_layer_geo_query.py | feb90e8c8aeaa12959225e33a6ff2b224e636a7b | [
"MIT",
"BSD-3-Clause"
] | permissive | visgl/deck.gl | 148ec752c02cf6d0a35d7e11dbb44b5e341553c2 | 1c4f9a99596b3f913426f7d5df3d7e831b4e99c0 | refs/heads/master | 2023-09-01T00:08:12.457341 | 2023-08-29T22:19:23 | 2023-08-29T22:19:23 | 48,030,204 | 3,929 | 1,012 | MIT | 2023-09-14T17:42:01 | 2015-12-15T08:38:29 | TypeScript | UTF-8 | Python | false | false | 744 | py | carto_layer_geo_query.py | """
CartoLayer
==========
Render cloud data from a query.
"""
import pydeck as pdk
import pydeck_carto as pdkc
from carto_auth import CartoAuth
carto_auth = CartoAuth.from_oauth()
pdkc.register_carto_layer()
layer = pdk.Layer(
"CartoLayer",
data="SELECT geom, name FROM carto-demo-data.demo_tables.airports",... |
be47b21795c50737baef34bcdca0c08138ceebf6 | ec718413230ea285ce6d4fbcc5241483e7a604da | /torch/remove_classes.py | 4d5f2f47cb343dbd2af811c27ee1760a40fd4422 | [
"MIT"
] | permissive | ctongfei/nexus | 04ab9b24d6b822d59f6ff961e0b74198ac3cfa45 | a9998d346036ec521f494f447001105cae21cdbc | refs/heads/master | 2023-03-23T15:43:24.420404 | 2019-08-18T04:09:37 | 2019-08-18T04:09:37 | 92,866,653 | 260 | 20 | MIT | 2019-05-11T15:25:09 | 2017-05-30T19:03:48 | Scala | UTF-8 | Python | false | false | 259 | py | remove_classes.py | #! /usr/bin/env python3
import sys
in_class = False
for l in sys.stdin:
if l.startswith("class"):
in_class = True
if in_class:
if l.startswith("};"):
in_class = False
continue
else:
print(l, end='')
|
437375c657f950dec5ad43a059a473c4dd392817 | 80456bf94b56da863d6a62a4a7acf48b6aa2384f | /fabric/set_hosts.py | 87d750981b8fb6947d5e316b401cace722e1b326 | [
"Apache-2.0"
] | permissive | k8sp/sextant | 464d490908ebc42efbd275b58320f8dc60e23050 | 0f4fec9ae68aa5eba689aeb1b7584977033ab907 | refs/heads/develop | 2020-04-04T21:42:14.275150 | 2017-10-10T03:38:11 | 2017-10-10T03:38:11 | 63,209,168 | 106 | 34 | null | 2017-11-13T12:04:14 | 2016-07-13T02:54:51 | Shell | UTF-8 | Python | false | false | 2,111 | py | set_hosts.py | from __future__ import with_statement
from fabric.api import *
from fabric.contrib.console import confirm
import fabric.operations as op
import yaml
import sys
import re
mac_ip={}
host_ip={}
set_type=""
def modify_mac_hosts(path, ips):
import copy
local = copy.deepcopy(ips)
#hostname->ip
hosts = []
... |
ccff9601fb6f6e1384b008c3e0c216014a7eae0d | f27e3fdc97290b1db6d3fa7039ad59e4f8b5a760 | /keras/comet-keras-lstm-example.py | cd5b899fbff97f893efa2f3a33a71c8efc917c2c | [] | no_license | comet-ml/comet-examples | 9c7bcea8b97986fb7987cbe0f4533f619e2a0939 | 9da5d4f296e633bb7e63b47dc2d3f7a0780c0a4e | refs/heads/master | 2023-08-19T03:32:51.864273 | 2023-08-09T09:30:34 | 2023-08-09T09:30:34 | 158,587,515 | 134 | 55 | null | 2023-09-13T16:58:41 | 2018-11-21T18:00:34 | Jupyter Notebook | UTF-8 | Python | false | false | 2,640 | py | comet-keras-lstm-example.py | # coding: utf-8
'''Trains an LSTM model on the IMDB sentiment classification task.
Example adapted from https://github.com/keras-team/keras/tree/master/examples
'''
# import comet_ml in the top of your file(before all other Machine learning libs)
from comet_ml import Experiment
from keras.preprocessing import sequence... |
016b8fb7c146d4c178a909e02d3deceb1c4859a8 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/request/AlipayWeiboPucChargeRequest.py | 992935c4e86e28a6a09cc8a9105b73f6d63f1ab4 | [
"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 | 9,708 | py | AlipayWeiboPucChargeRequest.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
class AlipayWeiboPucChargeRequest(object):
def __init__(self, biz_model=None):
self._biz_model = biz_model
self._apd_id = None
sel... |
228efb733d4b73df5c55264075cbe4d385dd359f | 67ca269e39935d0c439329c3a63df859e40168bb | /autoPyTorch/constants.py | 3d77f77bc56911c3b8a2df628a6d0d1803845cd9 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-philippe-de-muyter"
] | permissive | automl/Auto-PyTorch | 2e67ffb44f40d9993470ded9b63f10a5164b41df | 56a2ac1d69c7c61a847c678879a67f5d3672b3e8 | refs/heads/master | 2023-07-14T22:55:57.826602 | 2022-08-23T16:43:15 | 2022-08-23T16:43:15 | 159,791,040 | 2,214 | 280 | Apache-2.0 | 2023-04-04T14:41:15 | 2018-11-30T08:18:34 | Python | UTF-8 | Python | false | false | 3,406 | py | constants.py | TABULAR_CLASSIFICATION = 1
IMAGE_CLASSIFICATION = 2
TABULAR_REGRESSION = 3
IMAGE_REGRESSION = 4
TIMESERIES_FORECASTING = 5
REGRESSION_TASKS = [TABULAR_REGRESSION, IMAGE_REGRESSION]
CLASSIFICATION_TASKS = [TABULAR_CLASSIFICATION, IMAGE_CLASSIFICATION]
FORECASTING_TASKS = [TIMESERIES_FORECASTING] # TODO extend FORECAST... |
696749582efedfc6b62db7c67c117f2661c07b60 | f7381953d4b6b5ed7efd181b21a07e73f6950f04 | /src/salt/base/ext/_utils/can_obd_conn.py | 6ea2873ea55e8b1b0cf5b21e05a478e9ebf1994a | [
"Apache-2.0"
] | permissive | autopi-io/autopi-core | 75a50c03bee9d575eb1f25832644fe701f18d1d3 | ab42459602787e9a557c3a00df40b20a52879fc7 | refs/heads/master | 2023-06-01T06:32:00.772505 | 2023-04-27T14:32:47 | 2023-04-27T14:32:47 | 136,908,152 | 141 | 33 | Apache-2.0 | 2020-01-10T09:09:58 | 2018-06-11T10:02:02 | Python | UTF-8 | Python | false | false | 30,191 | py | can_obd_conn.py | import binascii
import can
import collections
import datetime
import logging
import sys
from obd import OBD, OBDStatus, commands, OBDCommand, ECU, decoders
from obd.utils import bytes_to_int
from obd.protocols import UnknownProtocol, CANProtocol
from obd.interfaces.stn11xx import STN11XX, STN11XXError
from six import ... |
063be4358ed0bad55bc53a2bca303caef0559980 | 23c0a6071860971616326ffeeac0b56135c5c6ee | /xmlschema/helpers.py | 4165188f5dd4e797040d4ceb38da28008a4e55ae | [
"MIT"
] | permissive | sissaschool/xmlschema | 36d74acb2a36459512855ea0264cc4d1ebbef8f5 | 6bf6d8e6d19cfc0ba151effb25cc57c3789d16fd | refs/heads/master | 2023-08-31T11:07:35.750326 | 2023-08-07T09:47:09 | 2023-08-07T09:47:09 | 70,905,710 | 272 | 55 | MIT | 2023-08-25T20:03:20 | 2016-10-14T11:52:54 | Python | UTF-8 | Python | false | false | 11,595 | py | helpers.py | #
# Copyright (c), 2016-2021, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... |
7e6493bd629587b786e64095847dd2d56fc72a88 | a0447b03ad89a41a5c2e2073e32aeaf4d6279340 | /ironic/tests/unit/drivers/test_drac.py | 6af1c2de67e87810c4108253b20d77afe7de7ca8 | [
"Apache-2.0"
] | permissive | openstack/ironic | 2ae87e36d7a62d44b7ed62cad4e2e294d48e061b | ab76ff12e1c3c2208455e917f1a40d4000b4e990 | refs/heads/master | 2023-08-31T11:08:34.486456 | 2023-08-31T04:45:05 | 2023-08-31T04:45:05 | 10,066,301 | 411 | 365 | Apache-2.0 | 2023-07-25T02:05:53 | 2013-05-14T22:28:24 | Python | UTF-8 | Python | false | false | 8,258 | py | test_drac.py | # Copyright (c) 2017-2019 Dell Inc. or its subsidiaries.
#
# 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 l... |
1d9518e0eaf737d6a901cd600cf22fc7c2372343 | 8d44e796eaf0c8e11bbc2a27ef093e97a25b6f4a | /test/agents/test_memory.py | 92bf79d13978d2e1e796ea2f38613e2a8374476a | [
"Apache-2.0"
] | permissive | deepset-ai/haystack | caa5287051d1771395ea624b58097000825bad81 | 5f1256ac7e5734c2ea481e72cb7e02c34baf8c43 | refs/heads/main | 2023-09-01T02:41:23.490526 | 2023-08-31T15:33:12 | 2023-08-31T15:33:12 | 221,654,678 | 10,599 | 1,558 | Apache-2.0 | 2023-09-14T17:09:42 | 2019-11-14T09:05:28 | Python | UTF-8 | Python | false | false | 1,578 | py | test_memory.py | import pytest
from typing import Dict, Any
from haystack.agents.memory import NoMemory, ConversationMemory
@pytest.mark.unit
def test_no_memory():
no_mem = NoMemory()
assert no_mem.load() == ""
no_mem.save({"key": "value"})
no_mem.clear()
@pytest.mark.unit
def test_conversation_memory():
conv_me... |
5153e4c30abb0dcf272c99ce157b3854817c47ea | c6759b857e55991fea3ef0b465dbcee53fa38714 | /utils/gapy/errors.py | 0067e4a5eb27f8662f0233583b07eec6aec0a265 | [
"Apache-2.0"
] | permissive | GreenWaves-Technologies/gap_sdk | 1b343bba97b7a5ce62a24162bd72eef5cc67e269 | 3fea306d52ee33f923f2423c5a75d9eb1c07e904 | refs/heads/master | 2023-09-01T14:38:34.270427 | 2023-08-10T09:04:44 | 2023-08-10T09:04:44 | 133,324,605 | 145 | 96 | Apache-2.0 | 2023-08-27T19:03:52 | 2018-05-14T07:50:29 | C | UTF-8 | Python | false | false | 1,422 | py | errors.py | #
# Copyright (C) 2019 GreenWaves Technologies
#
# 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 t... |
89ce4b5193ec4c7865284906b95a4151f8f9665d | c7e0c86a24521a13c3b06c73244e9f5854f47284 | /scenarios/sumo/intersections/2lane_circle/scenario.py | 5295dcb110da1d46721641658df7795db243c890 | [
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"CC-BY-NC-4.0",
"GPL-1.0-or-later",
"LicenseRef-scancode-generic-exception",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.0-or-later",
"GPL-3.0-or-later",
"BSD-3-Clause",
"MIT",
"LGPL-... | permissive | huawei-noah/SMARTS | 243d1f1fa4d3afe52a1dd8f7c6c500054d4a1a97 | 2ae8bd76a0b6e4da5699629cec0fefa5aa47ce67 | refs/heads/master | 2023-08-31T05:06:29.064270 | 2023-08-28T23:11:31 | 2023-08-28T23:11:31 | 301,903,883 | 824 | 212 | MIT | 2023-08-08T14:52:00 | 2020-10-07T02:11:23 | Python | UTF-8 | Python | false | false | 1,943 | py | scenario.py | from pathlib import Path
import smarts.sstudio.types as t
from smarts.sstudio import gen_scenario
laner_agent = t.SocialAgentActor(
name="laner-agent",
agent_locator="scenarios.sumo.intersections.2lane_circle.agent_prefabs:laner-agent-v0",
)
buddha_agent = t.SocialAgentActor(
name="buddha-agent",
agen... |
52f2d79531a2151a1e7dadd26d35f3992169ff75 | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/0575. Distribute Candies/0575.py | 2e3a80a31ba04cebafe53c07bd7d735be2a07faf | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 127 | py | 0575.py | class Solution:
def distributeCandies(self, candies: List[int]) -> int:
return min(len(candies) // 2, len(set(candies)))
|
865393fa87fa40552250272d24be88b9ee3f987f | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/braintree/braintree/local_payment.pyi | 355a1c486abd97cb7d2ff76d8d1c92aafd4f36a1 | [
"Apache-2.0",
"MIT"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 87 | pyi | local_payment.pyi | from braintree.resource import Resource as Resource
class LocalPayment(Resource): ...
|
6ae2544e00f6dfdce92d8cc6f95ea50c835bc078 | 518bf342bc4138982af3e2724e75f1d9ca3ba56c | /solutions/2235. Add Two Integers/2235.py | bfd0ca7411f1f29fa9dabd2b5ce2290d47ea4758 | [
"MIT"
] | permissive | walkccc/LeetCode | dae85af7cc689882a84ee5011f0a13a19ad97f18 | a27be41c174565d365cbfe785f0633f634a01b2a | refs/heads/main | 2023-08-28T01:32:43.384999 | 2023-08-20T19:00:45 | 2023-08-20T19:00:45 | 172,231,974 | 692 | 302 | MIT | 2023-08-13T14:48:42 | 2019-02-23T15:46:23 | C++ | UTF-8 | Python | false | false | 37 | py | 2235.py | class Solution:
sum = operator.add
|
075c92fd1a2f4048376a6feb17da48bfbe9ebe12 | 6c5afeeb3eefbfcf5ba6cfc2e7895d8c9dbf83c5 | /python/prophet/make_holidays.py | 44da48fbe76d3a03d7989e869224cb5880734bef | [
"MIT"
] | permissive | facebook/prophet | 59a74aa92d27bdc673ceaede02016a9218556cc4 | 2ac9e8fa760e587371e1d1260f3e9f1fac9d76cb | refs/heads/main | 2023-09-01T12:43:34.236541 | 2023-08-21T22:27:06 | 2023-08-21T22:27:06 | 73,872,834 | 13,093 | 4,448 | MIT | 2023-08-24T21:49:59 | 2016-11-16T01:50:08 | Python | UTF-8 | Python | false | false | 2,063 | py | make_holidays.py | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import absolute_import, division, print_function
import numpy as np
import pandas as pd
import holida... |
46de3c6f3e1484178cf1bbee2635a473050f8e2e | da1721d2783ea4d67ff4e73cee6eee71292f2ef7 | /toontown/fishing/GenusPanel.py | 7f1f65d7834e84fbf5a4541bcd6fc76477fbca51 | [
"BSD-3-Clause"
] | permissive | open-toontown/open-toontown | bbdeb1b7bf0fb2861eba2df5483738c0112090ca | 464c2d45f60551c31397bd03561582804e760b4a | refs/heads/develop | 2023-07-07T01:34:31.959657 | 2023-05-30T23:49:10 | 2023-05-30T23:49:10 | 219,221,570 | 143 | 104 | BSD-3-Clause | 2023-09-11T09:52:34 | 2019-11-02T22:24:38 | Python | UTF-8 | Python | false | false | 3,620 | py | GenusPanel.py | from toontown.toonbase import ToontownGlobals
from direct.directnotify import DirectNotifyGlobal
from direct.gui.DirectGui import *
from panda3d.core import *
from toontown.toonbase import TTLocalizer
from . import FishBase
from . import FishGlobals
from . import FishPhoto
class GenusPanel(DirectFrame):
notify = D... |
e7a2acf6833906687cd7c63da40c3d7949cb6931 | bb4e12f9155e7f67cb3974c8405253a0a5ffa516 | /examples/ports/multi_receive.py | 7217019c901c22061b07a7d116b91639662119e7 | [
"MIT",
"CC-BY-4.0"
] | permissive | mido/mido | 80c5c05e3eb38051253ccf40caf6ac7b917cc066 | 6970e045f1e66314ee266e8fb16432df75f6e87e | refs/heads/main | 2023-08-15T09:47:38.967908 | 2023-08-07T18:46:25 | 2023-08-07T18:47:14 | 10,889,417 | 937 | 160 | MIT | 2023-08-08T07:11:05 | 2013-06-23T18:11:38 | Python | UTF-8 | Python | false | false | 522 | py | multi_receive.py | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2013 Ole Martin Bjorndalen <ombdalen@gmail.com>
#
# SPDX-License-Identifier: MIT
"""
Receive messages from multiple ports.
"""
import mido
from mido.ports import multi_receive
# Open all available inputs.
ports = [mido.open_input(name) for name in mido.get_input_names... |
bf77f9251420310334e2968e74e9731d34c7ecc8 | 524d27085e9e424d06b13c5ce7b5337559da9281 | /src/dnadiffusion/utils/train_util.py | 4c87efc29956382bae41d6a19577194ccd5206d8 | [
"MIT"
] | permissive | pinellolab/DNA-Diffusion | 6ae3822ea71b24345d1e2ab47faa9d6a92058af7 | 4c31977bc8102beab9e14e82073d62099e48f47e | refs/heads/main | 2023-08-08T02:16:01.787934 | 2023-07-13T03:14:33 | 2023-07-13T03:14:33 | 537,093,072 | 260 | 46 | MIT | 2023-09-14T21:04:24 | 2022-09-15T15:35:12 | Jupyter Notebook | UTF-8 | Python | false | false | 5,916 | py | train_util.py | import copy
from typing import Any, Dict
import torch
import torchvision.transforms as T
from accelerate import Accelerator
from torch.optim import Adam
from torch.utils.data import DataLoader
from tqdm import tqdm
from dnadiffusion.data.dataloader import SequenceDataset
from dnadiffusion.metrics.metrics import compa... |
d2c420cc10c1ba2d7c37098d98d4d15ce4ef6854 | 787022de03a2dd6998c1518673830395b389e3df | /migration/migrator/migrations/system/20190625135839_email_enabled_field.py | e66758a2fa54e3e9324daf01149fc69ad6327f6b | [
"BSD-3-Clause",
"MIT"
] | permissive | Submitty/Submitty | e6b8731656291a025aa77f928eb067bc9a307540 | b223d9e952bcdb8664721a55593bc75e0e3c8c4f | refs/heads/main | 2023-08-31T23:56:11.291752 | 2023-08-31T19:12:18 | 2023-08-31T19:12:18 | 16,236,118 | 592 | 727 | BSD-3-Clause | 2023-09-13T05:36:08 | 2014-01-25T17:43:57 | PHP | UTF-8 | Python | false | false | 1,076 | py | 20190625135839_email_enabled_field.py | """
Migration for the Submitty system.
adds email_enabled boolean to config/email.json
"""
from pathlib import Path
import json
import os
def up(config):
email_filename = str(Path(config.submitty['submitty_install_dir'], 'config', 'email.json'))
# read json and add email_enabled field
try:
with op... |
1e7e12dec093425791a91bc58864ebda2412a14b | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Pdf_docx_pptx_xlsx_epub_png/source/docx/shape.py | e4f885d7344cfdd6c358012d9881d8f74cbaf158 | [
"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 | 2,811 | py | shape.py | # encoding: utf-8
"""
Objects related to shapes, visual objects that appear on the drawing layer of
a document.
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals
)
from .enum.shape import WD_INLINE_SHAPE
from .oxml.ns import nsmap
from .shared import Parented
class Inline... |
6741fc8a9593ed299b4b11438cbf730249faf7e8 | 364774e29ef2474552ea3839de0951e63cbae0a6 | /wouso/core/magic/admin.py | d22a68f7fb012c98f2a752f1983ac7fa2779f675 | [
"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 | 330 | py | admin.py | from django.contrib import admin
from models import Artifact, ArtifactGroup, Spell
class SpellAdmin(admin.ModelAdmin):
list_display = ('name', 'title', 'type', 'percents', 'price', 'level_required', 'available', 'mass')
admin.site.register(Artifact)
admin.site.register(ArtifactGroup)
admin.site.register(Spell, Sp... |
696af55cebf107db0eaa3c49fe48d1d8b5d4279e | 21be7833b4935fb4a8f39b816fe868d6cda78b07 | /termius/porting/__init__.py | c1e83a072087f14d46be3267186cc025716fa5ec | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | termius/termius-cli | dd45295dada12ee5dbd7a864e6fcf634dfbd02a3 | 2664d0c70d3d682ad931b885b4965447b156c280 | refs/heads/master | 2023-09-05T18:53:04.812354 | 2021-04-05T04:10:56 | 2021-04-05T04:10:56 | 10,905,793 | 262 | 41 | NOASSERTION | 2023-03-30T21:40:42 | 2013-06-24T11:00:03 | Python | UTF-8 | Python | false | false | 188 | py | __init__.py | # -*- coding: utf-8 -*-
"""Synchronize SaaS and IaaS hosts with application hosts.
Retrieve service complete host list by service's name and merge the hosts
into application storage.
"""
|
e98dd28c5a78790e322343a2514e3adf9d5b184a | 3093dd966d4019f5e96f335677716afd6ffad7ac | /test/test_dep_versioning.py | 415f9188c20bb7ed84e05904e12cbade289210e6 | [
"MIT"
] | permissive | sourcegraph/python-langserver | db62fda4e025d5a3241e33b63d5380f585cb444d | 214b2717b44a5bd7aaf4ac077ac1b9054de064ec | refs/heads/master | 2021-10-24T16:33:53.998475 | 2019-03-26T23:10:36 | 2019-03-26T23:10:36 | 66,597,766 | 118 | 11 | MIT | 2018-06-29T20:40:13 | 2016-08-25T22:32:13 | Python | UTF-8 | Python | false | false | 1,180 | py | test_dep_versioning.py | from .harness import Harness
import uuid
import pytest
@pytest.fixture(params=[
# tuples of the repo for the test, along
# with the expected doc_string for the hover
# in that repo
("repos/dep_versioning_fixed", "this is version 0.1"),
("repos/dep_versioning_between", "this is version 0.4"),
(... |
44b45eee2e843f6644788f858fe0ef8e3d9b32c8 | 906ee9b2b75e48b05c7ec181bc02e019da24a162 | /node/flatpak_node_generator/providers/yarn.py | e18c26e844ed0ba1f7b33885a922a13c78baf5c0 | [] | no_license | flatpak/flatpak-builder-tools | ff401c4c074533119d879f79c0ac35b5fc8ff7c7 | de56f4702638739f930f4afa648686f12ac4d724 | refs/heads/master | 2023-09-01T20:51:19.727717 | 2023-08-24T16:38:04 | 2023-08-24T17:42:59 | 114,991,815 | 164 | 114 | null | 2023-09-09T18:55:37 | 2017-12-21T10:08:07 | Python | UTF-8 | Python | false | false | 6,677 | py | yarn.py | from pathlib import Path
from typing import Any, Dict, Iterator, List, Optional, Tuple, Type
import os
import re
import shlex
import types
import urllib.parse
from ..integrity import Integrity
from ..manifest import ManifestGenerator
from ..package import GitSource, LocalSource, Package, PackageSource, ResolvedSource... |
fdcb82d9a69296e7ca152837aed6a360b00d0c21 | 29f18e8ddde0379cef7fa00b1a50058be3cafa79 | /numba/tests/test_parfors.py | 2fc5db6feabe070969584a84bb86d6e9890f2833 | [
"LicenseRef-scancode-secret-labs-2011",
"BSD-3-Clause",
"LicenseRef-scancode-python-cwi",
"LicenseRef-scancode-free-unknown",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Python-2.0",
"BSD-2-Clause"
] | permissive | numba/numba | 9a8345ff5f7d57f0ffec40e39941ebf2684df0d1 | 46059957ad416e68476d1e5f32ccd59f7d5df2bb | refs/heads/main | 2023-08-09T22:29:38.170300 | 2023-08-07T15:00:27 | 2023-08-07T15:00:27 | 3,659,275 | 8,247 | 1,151 | BSD-2-Clause | 2023-09-13T14:43:48 | 2012-03-08T11:12:43 | Python | UTF-8 | Python | false | false | 158,774 | py | test_parfors.py | #
# Copyright (c) 2017 Intel Corporation
# SPDX-License-Identifier: BSD-2-Clause
#
import math
import re
import dis
import numbers
import os
import platform
import sys
import subprocess
import types as pytypes
import warnings
from functools import reduce
import numpy as np
from numpy.random import randn
import operat... |
789f9f7cae89bdba1a614249b54e547af573aad6 | e8b38b8dfa348ff006eb197a7906ca8e491a23dc | /tests/codegen/fcode/scripts/classes_3.py | 26776c85fed1b14fbfd8fce0a2c7e8beb4c80917 | [
"MIT"
] | permissive | pyccel/pyccel | d79a81dbdff1172839a6a1227abfcc1f97e6c97b | 1896b761ba662c90b14c195bbb6eb5cddc57cbfc | refs/heads/devel | 2023-08-30T12:15:25.244401 | 2023-08-28T09:31:32 | 2023-08-28T09:31:32 | 100,463,736 | 307 | 39 | MIT | 2023-09-14T19:29:26 | 2017-08-16T07:59:14 | Python | UTF-8 | Python | false | false | 735 | py | classes_3.py | # pylint: disable=missing-function-docstring, missing-module-docstring, missing-class-docstring
from numpy import ones
#$ header class Point(public)
#$ header method __init__(Point, [double])
#$ header method __del__(Point)
#$ header method translate(Point, [double])
#$ header class Points(public)
#$ header method __i... |
e4e0b279d16f0740cdc22613de89629688054e5d | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/virtual_network_peering_py3.py | fc3489a026b3ddbee39643f330bb79846ad039bf | [
"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 | 4,750 | py | virtual_network_peering_py3.py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
fbc68882dd01fe980bb1aa48e14cc6d899022d41 | bede13ba6e7f8c2750815df29bb2217228e91ca5 | /subscription_package/models/sale_order.py | ad6b854e2623bae7cd82197476576a4a53580408 | [] | no_license | CybroOdoo/CybroAddons | f44c1c43df1aad348409924603e538aa3abc7319 | 4b1bcb8f17aad44fe9c80a8180eb0128e6bb2c14 | refs/heads/16.0 | 2023-09-01T17:52:04.418982 | 2023-09-01T11:43:47 | 2023-09-01T11:43:47 | 47,947,919 | 209 | 561 | null | 2023-09-14T01:47:59 | 2015-12-14T02:38:57 | HTML | UTF-8 | Python | false | false | 3,440 | py | sale_order.py | # -*- coding: utf-8 -*-
#############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
#
# Copyright (C) 2022-TODAY Cybrosys Technologies(<https://www.cybrosys.com>)
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>)
#
# You can modify it under... |
c52fa231cc5272c6bba1ec9296f6f5eaddd5d329 | fb1e852da0a026fb59c8cb24aeb40e62005501f1 | /beit2/run_vqkd_training.py | f68854bd49eb0a674a51a21c42f6d7a4568931d3 | [
"LGPL-2.1-or-later",
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | microsoft/unilm | 134aa44867c5ed36222220d3f4fd9616d02db573 | b60c741f746877293bb85eed6806736fc8fa0ffd | refs/heads/master | 2023-08-31T04:09:05.779071 | 2023-08-29T14:07:57 | 2023-08-29T14:07:57 | 198,350,484 | 15,313 | 2,192 | MIT | 2023-08-19T11:33:20 | 2019-07-23T04:15:28 | Python | UTF-8 | Python | false | false | 15,480 | py | run_vqkd_training.py | # --------------------------------------------------------
# BEiT v2: Masked Image Modeling with Vector-Quantized Visual Tokenizers (https://arxiv.org/abs/2208.06366)
# Github source: https://github.com/microsoft/unilm/tree/master/beitv2
# Copyright (c) 2022 Microsoft
# Licensed under The MIT License [see LICENSE for d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.