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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7e0357f2ae4526370c589848cf13f75364459aa9 | 7d232f51e2330a4f537c50ede9c6bc023d656fd4 | /examples/python/hellostreamingworld/hellostreamingworld_pb2_grpc.py | b0ba42dfc229098504726e6cf9ab2b6ec7757e75 | [
"BSD-3-Clause",
"MPL-2.0",
"Apache-2.0"
] | permissive | grpc/grpc | 6975af3ba6f07a6fe965b875a0c09abf18999a52 | e4d598ab64aa54f1da78c6ed6133b741742d11d4 | refs/heads/master | 2023-08-31T01:10:22.666618 | 2023-08-30T22:35:17 | 2023-08-30T22:35:17 | 27,729,880 | 42,330 | 13,022 | Apache-2.0 | 2023-09-14T21:54:19 | 2014-12-08T18:58:53 | C++ | UTF-8 | Python | false | false | 2,455 | py | hellostreamingworld_pb2_grpc.py | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import hellostreamingworld_pb2 as hellostreamingworld__pb2
class MultiGreeterStub(object):
"""The greeting service definition.
"""
def __init__(se... |
6a88b57c2fccc8fbdb4aef20a3ecb324d4340cfd | 74fa258218004bcdb3f33459800f82c9d7097afb | /cli/__init__.py | 6b35179571762b935bf4ddb1a131638b1b62f7dd | [
"MIT"
] | permissive | algolia/docsearch-scraper | 1f1524e67585454c0d9e101fadf5aaaf429781e4 | 70509a564fe76b34ab28a81189ee5abd99b1a440 | refs/heads/master | 2023-08-10T15:26:07.762797 | 2022-01-31T08:29:21 | 2022-01-31T09:29:12 | 43,568,573 | 293 | 117 | NOASSERTION | 2023-07-20T00:41:27 | 2015-10-02T18:14:25 | Python | UTF-8 | Python | false | false | 102 | py | __init__.py | from sys import path
from os.path import dirname, join
path.insert(0, join(dirname(__file__), ".."))
|
3ca6c969c488ce8be6574970f8c1d9e02657e20f | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /L1TriggerConfig/L1GtConfigProducers/test/L1GtTester_cfg.py | 96f9d2474b13d22a22f8c45358a9ff134a8a9bd1 | [
"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 | 6,152 | py | L1GtTester_cfg.py | from __future__ import print_function
# cfg file to test L1 GT records
#
# V M Ghete 2008 - 2010 - 2012
import FWCore.ParameterSet.Config as cms
# choose a valid global tag for the release you are using
#
# 5_2_X
#useGlobalTag='GR_R_52_V9'
useGlobalTag='START52_V10'
# run number to retrieve the records - irrelevan... |
11ccacd0e9b298d583c74febbe2fcb0a5b3768e6 | e40ae10cf7e780a38105c02560985450fb4e41fd | /pipelines/skylab/slideseq/test_inputs/Plumbing/slideseq_downsample.py | 1443730e65902957bdce9005b3082de9fd5b0858 | [
"BSD-3-Clause"
] | permissive | broadinstitute/warp | 4deed8cb985ed48490fafe2431fe04cf19efdd4b | 9d0097a1ac17cd97dc58aab52ba8d7d42062b212 | refs/heads/develop | 2023-08-16T19:19:20.421128 | 2023-08-15T15:42:52 | 2023-08-15T15:42:52 | 271,609,826 | 165 | 83 | BSD-3-Clause | 2023-09-12T12:57:56 | 2020-06-11T17:42:11 | WDL | UTF-8 | Python | false | false | 4,771 | py | slideseq_downsample.py | #!/usr/bin/env python3
import argparse
import re
import pandas as pd
import numpy as np
def main():
description = """This script downsamples data for the SlideSeq pipeline for use in testing."""
parser = argparse.ArgumentParser(description=description)
# Input file arguments
parser.add_argument("--x... |
ef307b08e15bf158cfcaf4a9f48ab0557431502e | 4d330238c7eb97fac95f3674ab4ddb5114fdf3d7 | /tests/test_facilities.py | 7ae68caa19e89baf8fd0e115da541f67c3cb2fce | [
"LicenseRef-scancode-unknown-license-reference",
"NCSA",
"MIT"
] | permissive | BioSTEAMDevelopmentGroup/biosteam | d064c7d5a16d79a966caa68ed3f4cca089f9c49c | 0501214b7e7fb16b89d1e45c94938b0e08b1331f | refs/heads/master | 2023-08-20T04:47:10.816994 | 2023-08-12T19:22:20 | 2023-08-12T19:22:20 | 164,639,830 | 115 | 29 | NOASSERTION | 2023-06-10T15:56:37 | 2019-01-08T12:02:16 | Python | UTF-8 | Python | false | false | 2,659 | py | test_facilities.py | # -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020-2023, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details... |
a48ec74cb1529c42bf162502f93437c85981fd8d | df1254b56f35b24644e00493c50d4b6eb3c15b7b | /colour/recovery/datasets/otsu2018.py | 791c16ab8a75316efc1105bb3ca2c4579b833242 | [
"BSD-3-Clause"
] | permissive | colour-science/colour | 908400b227cf81668675e41099256ce50b23ae4b | 1fdf3b3042922e8d4f86b989b00a06e7e5d81102 | refs/heads/develop | 2023-09-01T23:17:07.186869 | 2023-08-26T09:40:45 | 2023-08-26T09:40:45 | 17,114,363 | 1,756 | 301 | BSD-3-Clause | 2023-09-14T10:24:37 | 2014-02-23T18:55:40 | Python | UTF-8 | Python | false | false | 47,600 | py | otsu2018.py | """
Otsu et al. (2018) - Reflectance Recovery
=========================================
Defines the datasets for reflectance recovery using *Otsu et al. (2018)*
method.
References
----------
- :cite:`Otsu2018` : Otsu, H., Yamamoto, M., & Hachisuka, T. (2018).
Reproducing Spectral Reflectances From Tristimulus C... |
8f2ff713b4cab0ca0a2ba2e36193625b9fba8e74 | 6c37d1d2437a08e43b13d621d4a8da4da7135b3a | /yt_dlp/extractor/seeker.py | 65eb16a09d7b98f5f0918e94829de2db80c4adb4 | [
"Unlicense",
"GPL-2.0-or-later",
"MPL-2.0",
"BSD-3-Clause",
"GPL-3.0-or-later",
"LGPL-2.1-only",
"BSD-2-Clause",
"MIT"
] | permissive | yt-dlp/yt-dlp | be040bde10cc40258c879c75ab30215686352824 | d3d81cc98f554d0adb87d24bfd6fabaaa803944d | refs/heads/master | 2023-09-05T21:15:21.050538 | 2023-09-05T20:35:23 | 2023-09-05T20:35:23 | 307,260,205 | 52,742 | 5,376 | Unlicense | 2023-09-14T05:22:08 | 2020-10-26T04:22:55 | Python | UTF-8 | Python | false | false | 2,240 | py | seeker.py | import re
from .common import InfoExtractor
from ..utils import (
get_element_by_class,
strip_or_none,
)
class SeekerIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?seeker\.com/(?P<display_id>.*)-(?P<article_id>\d+)\.html'
_TESTS = [{
'url': 'http://www.seeker.com/should-trump-be-require... |
a2bec0dbacdaf9e60cd163c1fb78727e49140382 | c1b8b6080f29c8037100080298b897618a826475 | /gammapy/stats/tests/test_variability.py | 31e59a2053fc9dedc14030d1d1e97e817e2d3e24 | [
"BSD-3-Clause"
] | permissive | gammapy/gammapy | a5d7acbdde848e92e124fefbce9716faa296f572 | 60f03adb8fc7851b9f3ca039512c03a669e3fe10 | refs/heads/main | 2023-08-16T21:19:06.624561 | 2023-08-04T12:13:08 | 2023-08-04T12:13:08 | 10,073,640 | 204 | 184 | BSD-3-Clause | 2023-09-14T15:26:05 | 2013-05-15T07:50:40 | Python | UTF-8 | Python | false | false | 2,704 | py | test_variability.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import numpy as np
from numpy.testing import assert_allclose
from astropy.table import Column, Table
from astropy.time import Time
from gammapy.estimators import FluxPoints
from gammapy.stats.variability import compute_chisq, compute_fvar
fro... |
021ed57f240d9239f72a48d07c98edd3acffd3ce | dc1f176cdb1d6658430582c3b8dbeec2559ce074 | /tests/urlconfs/additional_fields_checks.py | c7cea8e6b33191c0b36535095f6668974548753c | [
"BSD-3-Clause"
] | permissive | axnsan12/drf-yasg | 662b5c4b079c44107d46fee7c88eb9d21f14f171 | 78031f0c189585c30fccb5005a6899f2d34289a9 | refs/heads/master | 2023-08-31T02:20:29.467209 | 2023-07-20T14:29:45 | 2023-07-20T14:29:45 | 112,461,400 | 3,320 | 518 | NOASSERTION | 2023-09-07T09:51:28 | 2017-11-29T10:30:22 | Python | UTF-8 | Python | false | false | 1,655 | py | additional_fields_checks.py | from django.urls import re_path
from rest_framework import serializers
from testproj.urls import required_urlpatterns
from .url_versioning import SnippetList, SnippetSerializer, VersionedSchemaView, VERSION_PREFIX_URL
class SnippetsSerializer(serializers.HyperlinkedModelSerializer, SnippetSerializer):
ipv4 = se... |
4410b3ee592087d34b5fd5ea2d029d611550ba2a | 29c88ae9d8ac5e498c28f747f54d265408011857 | /tests/api/test_controller.py | 08a0f3f5a8ee3b7e1c683c4856275c4da0c5e84e | [
"Apache-2.0"
] | permissive | getsentry/freight | 049878d4fdfc1ec7ba35caca094cd3f8c78f364a | 17a9c819504f25f1e01178a43018dd660be1e879 | refs/heads/master | 2023-08-22T06:01:00.378812 | 2023-02-03T03:07:48 | 2023-02-03T03:07:48 | 29,835,895 | 571 | 55 | Apache-2.0 | 2023-05-01T21:03:31 | 2015-01-25T23:17:09 | Python | UTF-8 | Python | false | false | 386 | py | test_controller.py | from freight.testutils import TestCase
class CatchallTest(TestCase):
def test_simple(self):
path = "/api/0/not-a-real-endpoint"
for method in ("get", "post", "put", "delete", "patch"):
resp = getattr(self.client, method)(path)
assert resp.status_code == 404
ass... |
5b2b977287bbf116fbc87159b6d51242ce746e96 | 3ca67d69abd4e74b7145b340cdda65532f90053b | /BOJ/3040.백설 공주와 일곱 난쟁이/6047198844.py | 3b7121936e8557f66c39cafada4eede6435e53df | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 744 | py | 6047198844.py | # 문제
# 아홉 난쟁이의 모자에 쓰여 있는 수가 주어졌을 때, 일곱 난쟁이를 찾는 프로그램을 작성하시오. (아홉 개의 수 중 합이 100이 되는 일곱 개의 수를 찾으시오)
#
# 입력
# 총 아홉개 줄에 1보다 크거나 같고 99보다 작거나 같은 자연수가 주어진다. 모든 숫자는 서로 다르다. 또, 항상 답이 유일한 경우만 입력으로 주어진다.
#
# 출력
# 일곱 난쟁이가 쓴 모자에 쓰여 있는 수를 한 줄에 하나씩 출력한다.
from itertools import combinations
dwalfs = [int(input()) for _ in range(9)]
for... |
3d38f1483a58285dc179f31c93c98e3d9814d9d8 | b74320ad439e37dfa48cd8db38dab3b7a20a36ff | /examples/unconditional_image_generation/train_unconditional.py | bfa48269026a9f555c3e2e34aeac8dab7e4f53a1 | [
"Apache-2.0"
] | permissive | huggingface/diffusers | c82beba1ec5f0aba01b6744040a5accc41ec2493 | 5eeedd9e3336882d598091e191559f67433b6427 | refs/heads/main | 2023-08-29T01:22:52.237910 | 2023-08-28T18:16:27 | 2023-08-28T18:16:27 | 498,011,141 | 17,308 | 3,158 | Apache-2.0 | 2023-09-14T20:57:44 | 2022-05-30T16:04:02 | Python | UTF-8 | Python | false | false | 30,039 | py | train_unconditional.py | import argparse
import inspect
import logging
import math
import os
import shutil
from datetime import timedelta
from pathlib import Path
from typing import Optional
import accelerate
import datasets
import torch
import torch.nn.functional as F
from accelerate import Accelerator, InitProcessGroupKwargs
from accelerate... |
6150fd8893ef2b8cc9184adcfc52b7a99858566d | e22eeb5256e17a96a98b3ff25433aec2d641cd2c | /openstack/clustering/v1/cluster.py | 618d7af3bd8e9f9ac9af880a13a51028a6dc0e76 | [
"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 | 6,608 | py | cluster.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 unde... |
501d83860f75406871835865bddccfc022750268 | 9b0160854984c06c76697e41c8912ea0507776d0 | /scripts/ml_transferKeytimes.py | b86ca2eee84ff73424d504672ac96739e1e709f4 | [
"MIT"
] | permissive | morganloomis/ml_tools | 1909ac410b91b76e4892bc21d13f70bb23faf972 | 347e28eeb7d99f6e8cd478a7d70a6644c5238e0b | refs/heads/master | 2023-07-06T09:02:05.883016 | 2023-04-21T23:05:52 | 2023-04-21T23:05:52 | 63,684,121 | 163 | 60 | MIT | 2020-04-30T09:58:44 | 2016-07-19T10:20:38 | Python | UTF-8 | Python | false | false | 5,280 | py | ml_transferKeytimes.py | # -= ml_transferKeytimes.py =-
# __ by Morgan Loomis
# ____ ___ / / http://morganloomis.com
# / __ `__ \/ / Revision 3
# / / / / / / / 2018-05-13
# /_/ /_/ /_/_/ _________
# /_________/
#
# ______________
# - -/__ License __/- - - - - - - - - - - - - - - - - - - - - - ... |
132b20af8c2799e683c321b035d4639fd839bb7d | 1bc67a91d85a7106106ca31307ef9ee93f1d1a20 | /src/py/flwr/common/typing.py | 4257bf8e3279fee21560a1ec9287d05f2bd9697a | [
"Apache-2.0"
] | permissive | adap/flower | 4915d143c674eb675504d585e1e90ed06833812f | 55be690535e5f3feb33c888c3e4a586b7bdbf489 | refs/heads/main | 2023-08-17T01:18:12.168723 | 2023-08-16T17:17:48 | 2023-08-16T17:17:48 | 241,095,326 | 2,999 | 658 | Apache-2.0 | 2023-09-14T15:43:22 | 2020-02-17T11:51:29 | Python | UTF-8 | Python | false | false | 3,952 | py | typing.py | # Copyright 2020 Adap GmbH. 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 applicable law or ag... |
32b959db57e2f921017ff2bdddeb4ca48b58529c | bd2dce4de0473673b8b553b31963ae34c123b94c | /pecan/commands/base.py | 1cb92c82423af486c9973ac095d9248a80758b43 | [
"BSD-3-Clause"
] | permissive | pecan/pecan | 538d3f39acc4041ee2346fd2e06ae6cd6fe7947c | 606ff430696f493bd00fc3532c3997d4753c3564 | refs/heads/master | 2023-08-21T10:03:24.017804 | 2023-07-15T15:26:32 | 2023-07-15T15:26:45 | 39,793,378 | 119 | 49 | BSD-3-Clause | 2023-07-14T16:09:07 | 2015-07-27T19:24:58 | Python | UTF-8 | Python | false | false | 4,783 | py | base.py | import pkg_resources
import argparse
import logging
import sys
from warnings import warn
log = logging.getLogger(__name__)
class HelpfulArgumentParser(argparse.ArgumentParser):
def error(self, message): # pragma: nocover
"""error(message: string)
Prints a usage message incorporating the messag... |
dc8e365f27018e8e4d8a83070848f903fd097cc8 | d87acfc6fa8dcf71ac26eebbd6069a938222efc3 | /captum/insights/attr_vis/widget/__init__.py | 82f0af8d40acba40a629f0030ca1346af22fd364 | [
"BSD-3-Clause"
] | permissive | pytorch/captum | aedeec58d34c7611ae8928144e9f2314f820c1ca | 945c582cc0b08885c4e2bfecb020abdfac0122f3 | refs/heads/master | 2023-09-04T08:49:54.120380 | 2023-07-08T00:30:37 | 2023-07-08T00:30:37 | 204,734,444 | 4,230 | 491 | BSD-3-Clause | 2023-09-08T17:58:15 | 2019-08-27T15:34:41 | Python | UTF-8 | Python | false | false | 394 | py | __init__.py | from captum.insights.attr_vis.widget._version import __version__, version_info # noqa
from captum.insights.attr_vis.widget.widget import * # noqa
def _jupyter_nbextension_paths():
return [
{
"section": "notebook",
"src": "static",
"dest": "jupyter-captum-insights",
... |
0de5c69de292c1f33c8b77aa5310efac4b200c4e | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/icloud/const.py | 231f2cc1d0a0a1529026ba0474621e2fb064d4ae | [
"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,972 | py | const.py | """iCloud component constants."""
from homeassistant.const import Platform
DOMAIN = "icloud"
CONF_WITH_FAMILY = "with_family"
CONF_MAX_INTERVAL = "max_interval"
CONF_GPS_ACCURACY_THRESHOLD = "gps_accuracy_threshold"
DEFAULT_WITH_FAMILY = False
DEFAULT_MAX_INTERVAL = 30 # min
DEFAULT_GPS_ACCURACY_THRESHOLD = 500 # ... |
a79da4a67d52a2b92022af25dd85781a9763d0e5 | 270dec496b274c98dcc6b1b6d163c8f09166ad15 | /lib/tests/py_test/test_protofile.py | 887b0c9005327c1236b84d7bc10c8d0fd6295dd4 | [
"MIT"
] | permissive | nccgroup/blackboxprotobuf | c4b96d2939a723e81774e17d654756d50e51c25c | c5fdc580735cead4b17dbf13a4481360b14247e6 | refs/heads/master | 2023-07-08T04:11:47.929673 | 2023-05-08T20:49:54 | 2023-05-08T20:49:54 | 133,435,465 | 396 | 61 | MIT | 2023-08-22T16:22:11 | 2018-05-15T00:07:03 | Python | UTF-8 | Python | false | false | 12,063 | py | test_protofile.py | # Copyright (c) 2018-2022 NCC Group Plc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, ... |
b977a54bc2968fe949364c1d0e115a72832271c9 | e61e664d95af3b93150cda5b92695be6551d2a7c | /vega/networks/tensorflow/necks/mask_rcnn_box.py | b4a9be84b5e3d8825fcd75e91172434914c32c52 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | huawei-noah/vega | 44aaf8bb28b45f707ed6cd4e871ba70fc0c04846 | 12e37a1991eb6771a2999fe0a46ddda920c47948 | refs/heads/master | 2023-09-01T20:16:28.746745 | 2023-02-15T09:36:59 | 2023-02-15T09:36:59 | 273,667,533 | 850 | 184 | NOASSERTION | 2023-02-15T09:37:01 | 2020-06-20T08:20:06 | Python | UTF-8 | Python | false | false | 3,430 | py | mask_rcnn_box.py | # -*- coding: utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. 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/LICENS... |
5258f9a571708d49bbc50b4442a145082cbf7084 | dd221d1ab80a49190a0c93277e2471debaa2db95 | /hanlp/components/mtl/tasks/ner/biaffine_ner.py | f463d8d0d138f6f443fa815d4daff58acff0df14 | [
"Apache-2.0",
"CC-BY-NC-SA-4.0"
] | permissive | hankcs/HanLP | 29a22d4e240617e4dc67929c2f9760a822402cf7 | be2f04905a12990a527417bd47b79b851874a201 | refs/heads/doc-zh | 2023-08-18T12:48:43.533453 | 2020-02-15T17:19:28 | 2023-03-14T02:46:03 | 24,976,755 | 32,454 | 9,770 | Apache-2.0 | 2023-08-13T03:11:39 | 2014-10-09T06:36:16 | Python | UTF-8 | Python | false | false | 5,782 | py | biaffine_ner.py | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2020-08-05 01:49
import logging
from copy import copy
from typing import Dict, Any, Union, Iterable, List
import torch
from torch.utils.data import DataLoader
from hanlp.common.dataset import SamplerBuilder, PadSequenceDataLoader
from hanlp.common.transform import Vocab... |
5765457f9c1667f21ac2879fa324a103b396dc39 | db64e76033c80eaa0ad12d4877d808d60a62b57d | /tests/test_symspellpy_word_segmentation.py | 2322d05abb3b3fe45c1ec11f28e06130a58792bc | [
"MIT"
] | permissive | mammothb/symspellpy | 3389006d8b9af8510bc1fba5c5830e37e9c6c550 | 142c2c70255701e37d92d661c8779b2629d6f2a6 | refs/heads/master | 2023-07-07T03:02:37.550709 | 2023-04-14T01:06:59 | 2023-04-14T01:06:59 | 144,558,951 | 712 | 132 | MIT | 2023-06-30T02:30:49 | 2018-08-13T09:37:59 | Python | UTF-8 | Python | false | false | 2,675 | py | test_symspellpy_word_segmentation.py | import pytest
from symspellpy import SymSpell
@pytest.fixture
def symspell_edit_distance_load(dictionary_path, request):
sym_spell = SymSpell(request.param)
sym_spell.load_dictionary(dictionary_path, 0, 1)
return sym_spell, request.param
class TestSymSpellPyWordSegmentation:
@pytest.ma... |
923b3a300a8f04ae2741de5d7acecf5c7f3dbad0 | 6bf3efa384abc11398ab9c6cc902c6415bf7e478 | /example/driver.py | c304e72035b518e18b1bedbe1ee7036862120279 | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | dropbox/pyannotate | d9ab4919672e69853c6aa47f6b8d4ba85696de98 | a7a46f394f0ba91a1b5fbf657e2393af542969ae | refs/heads/master | 2022-08-14T03:55:19.082430 | 2021-10-12T20:53:49 | 2021-10-12T20:53:49 | 110,597,280 | 1,482 | 73 | Apache-2.0 | 2023-02-01T22:35:54 | 2017-11-13T20:18:08 | Python | UTF-8 | Python | false | false | 232 | py | driver.py | from gcd import main
from pyannotate_runtime import collect_types
if __name__ == '__main__':
collect_types.init_types_collection()
with collect_types.collect():
main()
collect_types.dump_stats('type_info.json')
|
d0af92f19a548b1e174388150731b9675d9921ef | 3a6a211ea0d32405497fbd6486c490bb147e25f9 | /third_party/gsutil/gslib/utils/encryption_helper.py | b6e984420c7623d541277b101c3192201772ec5d | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"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 | 7,178 | py | encryption_helper.py | # -*- coding: utf-8 -*-
# Copyright 2015 Google 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 require... |
548b91984a98a1483f6ebaeee52f5f608d5182d7 | 533fe9cb56a370acf7600d538495a615efbc561c | /minibatch/contrib/mongodb.py | fc27fb2bdee082e94a92a57046626e67366acb8c | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"AGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"MPL-1.0",
"SSPL-1.0"
] | permissive | omegaml/minibatch | 38c6fbc99a6205b11e35c159958023abeae74622 | a45f477136c62f1e1ad6d745b621fe1083fcc95a | refs/heads/master | 2023-06-07T06:17:40.363182 | 2023-06-06T18:13:29 | 2023-06-06T18:13:29 | 237,193,338 | 192 | 14 | Apache-2.0 | 2023-06-06T18:13:30 | 2020-01-30T10:52:40 | Python | UTF-8 | Python | false | false | 3,926 | py | mongodb.py | import pymongo
from time import sleep
from minibatch import logger
class MongoSource:
"""
A mongodb collection source
Usage:
# start consuming from mongo collection
stream = mb.stream('test')
source = MongoSource(collection)
stream.attach(source)
# stream to a python calla... |
06258bd9f7b11b1164ed56add74031a5ea9e7034 | 751fe2de18f00596e4f1ed342b56bd6f38ee2053 | /wisdem/test/test_ccblade/test_ccblade.py | 3048051ce966b6b05ed7ea28d0d62f5ffdd08138 | [
"Apache-2.0"
] | permissive | WISDEM/WISDEM | 42fa780915d62fd4e4203050e886093ecc806c8a | d7270ebe1c554293a9d36730d67ab555c071cb17 | refs/heads/master | 2023-08-04T01:22:43.215105 | 2023-06-22T23:36:07 | 2023-06-22T23:36:07 | 23,678,280 | 120 | 86 | Apache-2.0 | 2023-06-22T19:26:34 | 2014-09-04T20:30:24 | Python | UTF-8 | Python | false | false | 7,775 | py | test_ccblade.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 the License ... |
9727cebd393cddc24120426ea4c4f4de6de033eb | 8b4d84fcf32c03783dcaca0dd470dc60ed829282 | /Chap18ProjAutoFormFiller.py | ff6417806caf568f5d1e43e19bc5fca211080800 | [
"MIT"
] | permissive | lotspaih/automateBoringstuffPython | 1776c1054e3d3e6babf76f64e9147c32f6295e1a | 51a402e31df01c36ae45dccad662d04b30378fea | refs/heads/master | 2020-04-29T00:36:05.267875 | 2019-03-14T21:18:20 | 2019-03-14T21:18:20 | 60,571,508 | 107 | 51 | CC0-1.0 | 2018-01-10T06:54:00 | 2016-06-07T01:11:38 | Python | UTF-8 | Python | false | false | 2,111 | py | Chap18ProjAutoFormFiller.py | #! python3
# Chapter 18 Project Automatic Form Filler
# Automatically fills in the form (http://autbor.com/form)
import pyautogui
import time
nameField = (648, 319)
submitButton = (651, 817)
submitButtonColor = (75, 141, 249)
submitAnotherLink = (760, 224)
formData = [{'name': 'Alice', 'fear': 'eavesdroppers', 'sou... |
e4c46a788f1eff89cb7991383320724c392b0a6d | 9d8948ba3c48ad50db0b33e4db69722516ff2451 | /kubernetes_asyncio/stream/ws_client.py | 5337d5c0024909220578e3d75d588a3cb4c1f459 | [
"Apache-2.0"
] | permissive | tomplus/kubernetes_asyncio | f8d38b4f4546868499a19f5e2338f0c0cff0c68a | 9a41443088b999c00b6fbc7a88dcfbb86bf5c1c5 | refs/heads/master | 2023-08-31T07:45:33.728246 | 2023-08-21T11:58:21 | 2023-08-21T11:58:21 | 128,578,499 | 296 | 64 | Apache-2.0 | 2023-09-05T06:10:05 | 2018-04-07T23:55:49 | Python | UTF-8 | Python | false | false | 3,369 | py | ws_client.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... |
71b7d6f95d3aacd6ac72225e1e99f8b61cf0e84d | fb369693686cbd93799f68bcd0b4fdcf4c65d49a | /zavod/zavod/helpers/dates.py | 7032549de2351267be6df48fece32ad162ac273a | [
"MIT",
"CC-BY-NC-4.0"
] | permissive | opensanctions/opensanctions | 8a43c173bd9c1422b5ca3e2ec35bcac70f8f1573 | 229b59247e67ad0661abb0a6f7155a61042a32ea | refs/heads/main | 2023-09-03T23:59:34.785846 | 2023-09-03T08:46:14 | 2023-09-03T08:46:14 | 47,451,451 | 155 | 32 | MIT | 2023-09-14T05:46:11 | 2015-12-05T10:19:57 | Python | UTF-8 | Python | false | false | 1,996 | py | dates.py | import re
from typing import Iterable, Set, Optional, List
from prefixdate import parse_formats
from datetime import datetime, timedelta
from functools import cache
NUMBERS = re.compile(r"\d+")
__all__ = ["parse_date", "check_no_year", "parse_formats", "extract_years"]
def extract_years(text: str) -> List[str]:
... |
b9f6cca6f3cbbc29ac1e372adf23bac784d88a3f | b3950a2a6912c9b494d22b9353322c3357df0110 | /tock/organizations/admin.py | 9208e96de58775d86df781339c6d312007632bfd | [
"CC0-1.0",
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | 18F/tock | df1fa5e817e690ce0bff315a15799e2f78915882 | 99005d8f6c4605a69fbb620c41f38447ecbee459 | refs/heads/main | 2023-08-31T01:34:55.299577 | 2023-08-23T18:49:10 | 2023-08-23T18:49:10 | 30,162,008 | 135 | 50 | NOASSERTION | 2023-09-07T18:40:30 | 2015-02-01T22:19:32 | Python | UTF-8 | Python | false | false | 478 | py | admin.py | from django.contrib import admin
from .models import Organization, Unit
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('name', 'description', 'active',)
list_filter = ('active',)
search_fields = ('name',)
class UnitAdmin(admin.ModelAdmin):
list_display = ('name', 'description', 'org',)
... |
47ac46862c1f3ec3ab34d2c21ad3d2cba21eaf4f | de5a4d1d7f49d22b62e26d9d38db5a7c49a6ccb9 | /tests/test_api.py | 23c18e1751623260881ff8c8d03a5a2aa36c07ca | [
"LicenseRef-scancode-proprietary-license",
"MIT-0"
] | permissive | aws-samples/aws-aurora-serverless-data-api-sam | 77dc858de6d01395d78f70053193c4f114e02a71 | d80d6a2e6c767b4ce11eabf6e4ff746ec2995a79 | refs/heads/master | 2022-09-04T04:54:42.215880 | 2022-08-05T15:28:55 | 2022-08-05T15:28:55 | 177,176,982 | 112 | 35 | MIT-0 | 2022-08-05T15:29:40 | 2019-03-22T16:44:42 | Python | UTF-8 | Python | false | false | 4,001 | py | test_api.py | '''
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the righ... |
d854e714c097c665d4082e7e6566d0113a9df949 | 5b0ff689a3e14f42bdf688864cae40c931a5f685 | /msa/voto/controllers/voto.py | a9479d8645dc32d8badf443a2d1d52891311b967 | [] | no_license | prometheus-ar/vot.ar | cd7012f2792a2504fb7f0ee43796a197fc82bd28 | 72d8fa1ea08fe417b64340b98dff68df8364afdf | refs/heads/2017-ago-salta | 2021-01-02T22:19:41.591077 | 2017-08-25T11:55:49 | 2017-08-25T11:55:49 | 37,735,555 | 171 | 110 | null | 2020-06-30T13:33:49 | 2015-06-19T17:15:52 | JavaScript | UTF-8 | Python | false | false | 26,862 | py | voto.py | # -*- coding: utf-8 -*-
import os
from urllib2 import quote
from random import shuffle
from time import sleep
from zaguan.actions import BaseActionController
from zaguan import WebContainerController
from msa.constants import COD_LISTA_BLANCO
from msa.core import get_tipo_elec, get_config
from msa.core.clases import... |
d0177891c27bae512256e1a1211a2a8d69e9e176 | 27b86f422246a78704e0e84983b2630533a47db6 | /src/ezdxf/explode.py | 0e57542d71da832527bd6489882ea42ed13ce4a7 | [
"MIT"
] | permissive | mozman/ezdxf | 7512decd600896960660f0f580cab815bf0d7a51 | ba6ab0264dcb6833173042a37b1b5ae878d75113 | refs/heads/master | 2023-09-01T11:55:13.462105 | 2023-08-15T11:50:05 | 2023-08-15T12:00:04 | 79,697,117 | 750 | 194 | MIT | 2023-09-14T09:40:41 | 2017-01-22T05:55:55 | Python | UTF-8 | Python | false | false | 13,554 | py | explode.py | # Copyright (c) 2020-2022, Manfred Moitzi
# License: MIT License
from __future__ import annotations
import logging
from typing import (
TYPE_CHECKING,
Iterable,
Callable,
Optional,
cast,
)
from ezdxf.lldxf import const
from ezdxf.entities import factory
from ezdxf.entities.boundary_paths import (
... |
67b23a234e5c270b539a1870cfe26ecdd058396f | e78c8e9aa0468e5d0cd8f33fbc2f09f7a580feeb | /tasks/multi_length_sequences.py | 12b54e6b64bdf30fa3e84acced6d03260ef79d61 | [
"MIT"
] | permissive | philipperemy/keras-tcn | 213b3219d765490a141bb490cc671b06fcf045bf | f612f6e4a4320d168655c5c6c437d666aa4695a1 | refs/heads/master | 2023-09-03T10:09:28.794148 | 2023-08-08T04:48:33 | 2023-08-08T04:48:33 | 126,269,318 | 1,792 | 465 | MIT | 2023-08-07T08:32:29 | 2018-03-22T02:40:06 | Python | UTF-8 | Python | false | false | 1,416 | py | multi_length_sequences.py | import numpy as np
from tensorflow.keras import Sequential
from tensorflow.keras.layers import Dense
from tcn import TCN
# if you increase the sequence length make sure the receptive field of the TCN is big enough.
MAX_TIME_STEP = 30
"""
Input: sequence of length 7
Input: sequence of length 25
Input: sequence of len... |
6312bef192c427cae15926d64697a5016f7852fd | 7343ece3b82ac87a594865c4074623b45b0297b4 | /synapse/storage/databases/main/transactions.py | efd21b5bfceb32ba182eb029c7ad0e13071abe34 | [
"Apache-2.0"
] | permissive | matrix-org/synapse | a00111f83310783b78e2996557f8bbae4d9fb229 | d35bed8369514fe727b4fe1afb68f48cc8b2655a | refs/heads/develop | 2023-09-05T05:24:20.808942 | 2023-09-04T16:14:09 | 2023-09-04T16:14:09 | 22,844,864 | 12,215 | 2,869 | Apache-2.0 | 2023-09-14T15:20:48 | 2014-08-11T15:51:42 | Python | UTF-8 | Python | false | false | 20,420 | py | transactions.py | # Copyright 2014-2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... |
083479bbc1849f0663934bbfe1e03af69dd0fb8c | 6647c484a6601f70dd348076c484843807238ddf | /solutionbox/ml_workbench/test_tensorflow/test_training.py | 976d4fae35fe1e8b1d5a53e54f541013a8a35a6a | [
"Apache-2.0"
] | permissive | googledatalab/pydatalab | 43624c271e25edfd97ac0ecf39ec4f55e9ad27b2 | 8bf007da3e43096aa3a3dca158fc56b286ba6f5c | refs/heads/master | 2022-09-13T10:23:59.112507 | 2022-09-02T21:16:23 | 2022-09-02T21:16:23 | 58,776,721 | 200 | 91 | Apache-2.0 | 2023-03-28T20:55:15 | 2016-05-13T22:42:57 | Python | UTF-8 | Python | false | false | 38,306 | py | test_training.py | from __future__ import absolute_import
import base64
import glob
import json
import logging
import os
import pandas as pd
from PIL import Image
import random
import shutil
from six.moves.urllib.request import urlopen
import subprocess
import sys
import tempfile
import unittest
import tensorflow as tf
from tensorflow.... |
94cc40e21a79530d355de72cb7eb5fa2321c79ce | 18e7a4e8005cfd514b6c624133db172172857713 | /im2im_pred/model_segnet_mtan.py | a565f911ea0f986b7f00bc781cf190f5522215a0 | [
"MIT"
] | permissive | lorenmt/mtan | 4eb3be0b5bfbf1c303f6c85eabacba6dd1bd09ed | c36c30baa18968dec74fe9039abcfd4f132edfa1 | refs/heads/master | 2022-07-29T04:57:48.453497 | 2022-02-07T21:46:43 | 2022-02-07T21:46:43 | 164,354,872 | 623 | 120 | null | null | null | null | UTF-8 | Python | false | false | 11,114 | py | model_segnet_mtan.py | import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import argparse
import torch.utils.data.sampler as sampler
from create_dataset import *
from utils import *
parser = argparse.ArgumentParser(description='Multi-task: Attention Network')
parser.add_argument('--weight', default='equal', t... |
9a542b798a5b9aeed132b1235e51db64ccc111dc | 462b8a2326486dd41bf0d1ddbb19bbcee9532411 | /blender/arm/logicnode/miscellaneous/LN_set_time_scale.py | 77bc3f5932472a8a992f67c6028c3ff72c39bc2a | [
"Zlib",
"GPL-2.0-only"
] | permissive | armory3d/armory | b751fb23d6590f2ca421ace7cf7cbeaef91f472c | 511657981bd2716eddcee8dff26820d27f2bc610 | refs/heads/main | 2023-08-12T02:57:02.898742 | 2023-08-04T18:55:45 | 2023-08-04T18:55:45 | 45,202,654 | 3,077 | 530 | Zlib | 2023-09-12T11:24:38 | 2015-10-29T18:27:56 | Python | UTF-8 | Python | false | false | 418 | py | LN_set_time_scale.py | from arm.logicnode.arm_nodes import *
class SetTimeScaleNode(ArmLogicTreeNode):
"""Sets the global time scale."""
bl_idname = 'LNSetTimeScaleNode'
bl_label = 'Set Time Scale'
arm_version = 1
def arm_init(self, context):
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('Ar... |
e5f6ce977d0593ac8c9a907ac1ff64ccda43e226 | 13a9fba2e0b8edbb4af771f3fb0ee2ec905ea067 | /torchprofile/handlers.py | cded54a94399a33b06000627906a074f1d21de37 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | zhijian-liu/torchprofile | 81f17f3a649e6fcd021080b61f1635d1d3926823 | 6d80fe57bb8c6bc9f789da7925fac6547fa9502b | refs/heads/master | 2023-02-26T06:21:05.684585 | 2023-02-21T22:22:04 | 2023-02-21T22:22:04 | 205,957,008 | 258 | 26 | MIT | 2023-02-21T22:22:05 | 2019-09-03T00:30:33 | Python | UTF-8 | Python | false | false | 5,152 | py | handlers.py | from .utils import math
__all__ = ['handlers']
def addmm(node):
# [n, p] = aten::addmm([n, p], [n, m], [m, p], *, *)
n, m = node.inputs[1].shape
m, p = node.inputs[2].shape
return n * m * p
def addmv(node):
# [n] = aten::addmv([n], [n, m], [m], *, *)
n, m = node.inputs[1].shape
return n... |
33472e59d82d5548c37aede5151939b2d96f1c01 | de527d4dcbad261226e4bdc2742ef2a901fa119d | /tf_verify/__main__.py | 82c19fe0538b5623c743d7059bad6a7750dbc458 | [
"Apache-2.0"
] | permissive | eth-sri/eran | 6c131079686f87b83d771b20a53a500e480a57d6 | 8771d3158b2c64a360d5bdfd4433490863257dd6 | refs/heads/master | 2023-02-07T06:29:26.827401 | 2022-05-30T11:08:38 | 2022-05-30T11:08:38 | 157,565,932 | 306 | 128 | Apache-2.0 | 2023-01-27T01:14:21 | 2018-11-14T15:03:42 | Python | UTF-8 | Python | false | false | 76,847 | py | __main__.py | """
Copyright 2020 ETH Zurich, Secure, Reliable, and Intelligent Systems Lab
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requi... |
fa9bf707da56183fcff92b1e1b39f94249925b9d | 74eec44040b840653b8c1fbdb208f373bdadbbde | /scripts/release/utils/http_helper.py | cd993453b2e4223cfdc719b0904b9ed5c00dcc4f | [
"Apache-2.0"
] | permissive | jbosstm/narayana | a2296b0043ac9358255861d2bdcc98ab2a724569 | d7abcb8009f3fac5e8cad1816659ac680be1a409 | refs/heads/main | 2023-09-03T05:01:52.562054 | 2023-07-10T14:56:05 | 2023-09-01T11:02:18 | 3,010,630 | 204 | 158 | Apache-2.0 | 2023-09-14T20:22:31 | 2011-12-19T08:13:03 | Java | UTF-8 | Python | false | false | 674 | py | http_helper.py | import http.client
def request(method, host, path, body=None, headers={}):
"""
Generic HTTP request method
"""
connection = http.client.HTTPConnection(host)
connection.request(method, path, body, headers)
return connection.getresponse()
def get(host, path, body=None, headers={}):
"""
... |
8b85ba36b88b94e727c6663210f6db355acba4f4 | 6f247f5400c6a840b6dfcb12388116dc3bb7bd49 | /rnn/lookup.py | f071213003968aa4b5c277ec423837289b66eba5 | [
"MIT"
] | permissive | envytools/envytools | c062fbc3b8af90d3df9c6e0f57e9abbfc5690d01 | e11d670a70ae0455261ead53cdd09c321974cc64 | refs/heads/master | 2023-08-26T23:44:47.131591 | 2022-04-30T21:15:56 | 2022-04-30T21:15:56 | 11,620,001 | 402 | 103 | MIT | 2022-12-07T01:35:18 | 2013-07-23T21:43:43 | C | UTF-8 | Python | false | false | 3,203 | py | lookup.py | #!/usr/bin/env python3
# Copyright (C) 2010 Marcelina Kościelnicka <mwk@0x04.net>
# Copyright (C) 2011 Martin Peres <martin.peres@ensi-bourges.fr>
# Copyright (C) 2011 Witold Waligóra <witold.waligora@gmail.com>
# All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy o... |
056efe073ae3c5ba57b7598d7d492e5d7756d529 | 44d1936bbc8e256534f3946f100bb0028e92fee5 | /src/hatch/project/utils.py | 641c4edfdea91f97ba9bbb467f1a8972a723a3b7 | [
"MIT"
] | permissive | pypa/hatch | aeb72e6a465a39073a020f63a931def16ce90ce8 | 7dac9856d2545393f7dd96d31fc8620dde0dc12d | refs/heads/master | 2023-09-04T04:04:25.079348 | 2023-09-03T23:48:21 | 2023-09-03T23:48:21 | 92,997,800 | 1,869 | 125 | MIT | 2023-09-13T19:39:25 | 2017-05-31T23:37:53 | Python | UTF-8 | Python | false | false | 576 | py | utils.py | def parse_script_command(command):
possible_script, _, args = command.partition(' ')
if possible_script == '-':
ignore_exit_code = True
possible_script, _, args = args.partition(' ')
else:
ignore_exit_code = False
return possible_script, args, ignore_exit_code
def format_scrip... |
6dc31df39f61f45a50bfe62428b981524897e16c | 549270020f6c8724e2ef1b12e38d11b025579f8d | /recipes/gsoap/all/conanfile.py | 38b4629ae4211b4ee673c8a7850a6ae0d193f625 | [
"MIT"
] | permissive | conan-io/conan-center-index | 1bcec065ccd65aa38b1fed93fbd94d9d5fe6bc43 | 3b17e69bb4e5601a850b6e006e44775e690bac33 | refs/heads/master | 2023-08-31T11:34:45.403978 | 2023-08-31T11:13:23 | 2023-08-31T11:13:23 | 204,671,232 | 844 | 1,820 | MIT | 2023-09-14T21:22:42 | 2019-08-27T09:43:58 | Python | UTF-8 | Python | false | false | 3,854 | py | conanfile.py | from conan import ConanFile
from conan.tools.build import cross_building
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import copy, get
import os
required_conan_version = ">=1.52.0"
class GsoapConan(ConanFile):
name... |
c897bfd4d5fcf8050e63251c32f5c4e8c0261ebf | ed576926efb18a7383e84327b4c626b8c9482a0f | /tests/test_binding.py | ce53cf1b2126112dc88a197b9288d10b673e4d28 | [
"Apache-2.0"
] | permissive | edmBernard/pybind11_opencv_numpy | 8c29503ec6f992994f5f0b220234f8e84a7f6e21 | ad25cbacca30b31e249884dfb0ed3f99ea2cb5d4 | refs/heads/master | 2022-02-05T05:20:36.898223 | 2022-01-17T07:34:07 | 2022-01-17T07:35:26 | 75,200,590 | 193 | 47 | Apache-2.0 | 2021-09-22T12:16:45 | 2016-11-30T15:33:52 | C++ | UTF-8 | Python | false | false | 1,887 | py | test_binding.py | import numpy as np
from tests import test_module as tm
from tests.utils import generate_matrix, check_matrix_content
import copy
def test_pass_py2cpp():
mat = generate_matrix()
assert(mat.shape == (10, 12, 3))
assert(mat.flags['C_CONTIGUOUS'])
assert(mat.dtype == np.uint16)
assert(tm.check_matrix_content(mat... |
77d2bd61017842ac0cba2ead083ce7e63bf48485 | 916c1313c623c799e98d1bd897b3aef510172639 | /py/phl/phlsys_pid.py | 2a4059af99891b0f3e724d1c0ef5651bdeeb54e8 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | bloomberg/phabricator-tools | 377ba3dba299c5d21a015bb039ae920fae5478ef | 09bd1587fe8945d93a891162fd4c89640c6fada7 | refs/heads/master | 2021-01-02T19:43:48.274684 | 2019-01-11T13:34:55 | 2019-01-11T13:34:55 | 8,464,182 | 154 | 40 | Apache-2.0 | 2022-02-14T09:57:48 | 2013-02-27T20:02:50 | Python | UTF-8 | Python | false | false | 2,539 | py | phlsys_pid.py | """Work with process ids easily."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# phlsys_pid
#
# Public Functions:
# get
# is_running
# request_terminate
#
# -----------------------------... |
d9ab5d8c967e16c274cd7674f27461fec0cf927f | 72f6d3ad72b2a4a9b6c5f93c5d1b744e2940b884 | /deps/quicly/misc/find-cids.py | 35f5441ee28710a79d3a95cd1ee9a8cc163f9cac | [
"MIT"
] | permissive | h2o/h2o | 70012b6527ceb54e9e2819c9c75242b18e381485 | b165770ce704c782ddee7428ea4a0b23c8bb7894 | refs/heads/master | 2023-08-16T13:16:35.018003 | 2023-08-16T03:56:28 | 2023-08-16T03:56:28 | 23,029,617 | 9,377 | 983 | MIT | 2023-09-12T04:49:14 | 2014-08-16T23:59:03 | C | UTF-8 | Python | false | false | 354 | py | find-cids.py | #!/usr/bin/env python
import sys
import json
if len(sys.argv) != 2:
print "Usage: find-cids.py inTrace.jsonl"
sys.exit(1)
cids = {}
f = open(sys.argv[1], 'r')
for line in f:
event = json.loads(line)
if event["type"] != "" and event["type"] == "accept":
cids[event["conn"]] = None
print "Connec... |
41635d714f783bf5c868ad5ddc8d19d47470621d | 39568e19301a7a112398be542154950af25591de | /util/py/packages/lib/register_usage_report.py | eecf6e604b97a6994b7a1203c77f65d470248eb0 | [
"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 | 10,612 | py | register_usage_report.py | # Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
import collections
import dataclasses
import functools
import pickle
from typing import Optional
import clang.cindex
from util.py.packages.lib import ot_logging
log = ot... |
2ae03e5c9820d7a30a2f0dbb373ba75cd4179760 | 407d194b52fe9cf75cca9d6f3c162a565549a1ae | /TestHandlerLinux/bin/disable.py | 5fe7ac60e7ac7848efc4bb52fefe487771f2635e | [
"Apache-2.0"
] | permissive | Azure/azure-linux-extensions | 808761f927045f00548aa68e38d4bec8651c0eba | 3cea1567fc4f4eb5beea9884153e92d70610394d | refs/heads/master | 2023-08-27T14:06:05.775617 | 2023-08-23T01:56:05 | 2023-08-23T01:56:05 | 19,841,123 | 300 | 314 | Apache-2.0 | 2023-09-14T04:21:26 | 2014-05-16T01:38:49 | Python | UTF-8 | Python | false | false | 3,241 | py | disable.py | #!/usr/bin/env python
"""
Example Azure Handler script for Linux IaaS
Diable example
"""
import os
import imp
import time
import json
waagent=imp.load_source('waagent','/usr/sbin/waagent')
from waagent import LoggerInit
hutil=imp.load_source('HandlerUtil','./resources/HandlerUtil.py')
LoggerInit('/var/log/waagent.l... |
73f93eff2eaa6ecd99f15e540263e0c411dbd20e | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client/gui/scaleform/daapi/view/meta/cybersportunitslistmeta.py | 5bf8b21d065e67710badf4905a27a6d63d6e37fc | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 1,342 | py | cybersportunitslistmeta.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client/gui/Scaleform/daapi/view/meta/CyberSportUnitsListMeta.py
from gui.Scaleform.daapi.view.lobby.rally.BaseRallyListView import BaseRallyListView
class CyberSportUnitsListMeta(BaseRallyListView):
def getTeamData(self, index):
... |
5888dd0ec6a856fad3e806b72f7ef69dcce68118 | dd40ae522aee10d0e9e6ddacda0b86502512cbf3 | /src/models/multi_stage.py | a8b2bc3e4fe0e70a39ac5be304dd75e01ba77dd2 | [
"MIT"
] | permissive | weecology/DeepTreeAttention | b6900f74e435f8267d3dd19715d7dcd25c7798d5 | cae13f1e4271b5386e2379068f8239de3033ec40 | refs/heads/main | 2023-09-01T13:36:43.905518 | 2023-03-13T18:49:18 | 2023-03-13T18:49:18 | 268,541,551 | 101 | 38 | MIT | 2022-04-04T20:25:56 | 2020-06-01T14:14:29 | Python | UTF-8 | Python | false | false | 24,465 | py | multi_stage.py | #Multiple stage model
from functools import reduce
from src.models.year import learned_ensemble
from src.data import TreeDataset
from src import utils
from pytorch_lightning import LightningModule
import pandas as pd
import math
import numpy as np
from torch.nn import Module
from torch.nn import functional as F
from t... |
a0975bf4e5b5eb3e8e10c993551abbc3beab3ff8 | 263170e7dca79883314273bb35aef1449e018361 | /tests/fixtures/examples/nested.py | 68b03c2b79bdbd6a76a24a687edd107351dda3a2 | [
"CC-BY-4.0",
"LGPL-2.1-or-later",
"MIT"
] | permissive | se2p/pynguin | 029cfd9c43c08a2f687a816749828054e409646e | cc083252c7054824bfaf200533a8b7ad45f7c4fb | refs/heads/main | 2023-08-23T16:58:04.568755 | 2023-08-18T13:11:44 | 2023-08-18T13:11:44 | 282,944,472 | 1,223 | 65 | MIT | 2023-08-18T13:12:29 | 2020-07-27T15:50:19 | Python | UTF-8 | Python | false | false | 304 | py | nested.py | # This file is part of Pynguin.
#
# SPDX-FileCopyrightText: 2019–2023 Pynguin Contributors
#
# SPDX-License-Identifier: MIT
#
def test_me(x, y):
if x <= y:
if x == y:
print("Some output")
if x > 0:
if y == 17:
return True
return False
|
e37aeb46f99437f4d7cfbd1693ef8a446a6c10f3 | 9cdd1751bc27310f486427aaaae901ca06b79003 | /bin/jenkins/critique-gerrit-review.py | c165017c4c6abb73aa02c1d2a87276c39b4cc3d6 | [
"Apache-2.0",
"OpenSSL",
"bzip2-1.0.6",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-ssleay-windows",
"LicenseRef-scancode-google-patent-license-webrtc",
"PSF-2.0",
"BSD-3-Clause",
"dtoa",
"MIT",
"LicenseRef-scancode-mit-modification-obligations",
"Minpack",
"BSL-1.0",
"LicenseRef-s... | permissive | apache/impala | bb9970c64a43824950ec5b69f2ef4b50158a1e8a | b718d63860356a04814e07d91711c3c748b3e769 | refs/heads/master | 2023-09-03T04:29:12.639452 | 2023-06-07T23:51:15 | 2023-08-30T04:56:51 | 56,128,733 | 985 | 475 | Apache-2.0 | 2023-08-31T14:15:44 | 2016-04-13T07:00:08 | C++ | UTF-8 | Python | false | false | 9,658 | py | critique-gerrit-review.py | #!/usr/bin/python
# 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
# "Licens... |
91559679671202d5199e5a549a865f4a64552160 | 6be59c81f3f6a17c14b812be0de3346a82eb33dd | /network/logic_gates.py | 2a33d164f9a894095ecfb855d554e458676c1004 | [] | no_license | chunhuizhang/bilibili_vlogs | 6851fdcd43f08fcf7195e345b0bc85d99c0b9128 | 0efd921b24f2af43f5972ea6909deb2fc069d305 | refs/heads/master | 2023-08-17T15:47:04.299072 | 2023-08-14T13:46:31 | 2023-08-14T13:46:31 | 220,612,967 | 170 | 70 | null | null | null | null | UTF-8 | Python | false | false | 233 | py | logic_gates.py | import torch
def and_gate():
and_weights = torch.tensor([1, 1, -2])
if __name__ == '__main__':
# x1, x2, b
X = torch.tensor([(0, 0, 1), (0, 1, 1), (1, 0, 1), (1, 1, 1)], dtype=torch.double)
print(X)
pass
|
743816c82442619c8f662d8cdc321a16f9a4da45 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/经典题/index+remain(k)/2463. 最小移动总距离.py | b06d68cfa12817fa503c99339de3dcbe868f5393 | [] | 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 | 2,877 | py | 2463. 最小移动总距离.py | from functools import lru_cache
from typing import List
# 1 <= robot.length, factory.length <= 100
# factory[j].length == 2
# -109 <= robot[i], positionj <= 109
# 0 <= limitj <= robot.length
# !暗示O(n*m*k)的解法1e6
# 老鼠进洞模型 / 安排邮筒模型 / 最小移动距离
INF = int(1e18)
class Solution:
def minimumTotalDistance3(se... |
e73b80581e0efc94bc8cf3a5b3aa1f55cac9e146 | 4207698ab3d15c6d81bb205264b7de8297ba47e3 | /deep_learning/seq2seq/translation_mt5/seq2seq_eval.py | abe913c6b384d064af8e8a90890a6c19f5caee14 | [
"MIT",
"Python-2.0"
] | permissive | ethen8181/machine-learning | f86c52389ea41d3da2f66720dc3459eee4aebcf6 | efbc9b8d5c56b2ce4780d8b10ab62cb884352122 | refs/heads/master | 2023-08-31T00:35:57.532536 | 2023-08-23T22:19:48 | 2023-08-23T22:19:48 | 39,610,055 | 2,704 | 657 | MIT | 2023-07-10T04:39:36 | 2015-07-24T03:35:49 | HTML | UTF-8 | Python | false | false | 5,512 | py | seq2seq_eval.py | """
Run a seq2seq Marian translation model evaluation on wmt16 dataset.
"""
import os
import torch
import random
import evaluate
import numpy as np
from datasets import load_dataset
from dataclasses import dataclass
from transformers import (
AutoTokenizer,
AutoModelForSeq2SeqLM,
Seq2SeqTrainingArguments,
... |
a0a50d7e278bc056adbac469c244751b53ae93c9 | 652d0577d5f9716423cf7f1aae116a7bfd190c6f | /LASS-Simulator/test/test.py | 9a0aa9fb16ed693719d8cb666334a830ab7da4bd | [
"MIT"
] | permissive | LinkItONEDevGroup/LASS | 714cf74a07840161ce6a3cd9a9ac525a3d5d88d3 | f06bd202f37f2a8fafe932feabcb119a292f016e | refs/heads/master | 2023-04-30T09:03:36.609950 | 2023-04-27T00:03:26 | 2023-04-27T00:03:26 | 38,099,296 | 174 | 108 | MIT | 2021-02-05T10:09:21 | 2015-06-26T08:14:22 | C | UTF-8 | Python | false | false | 848 | py | test.py | import urllib
import requests
import simplejson
import wget
def test_json():
response = urllib.request.urlopen("http://nrl.iis.sinica.edu.tw/LASS/last-all-lass.json")
#print(response.read())
#data = simplejson.load(response)
print( data)
#print(data["version"])
#print(data["feeds"])
#prin... |
2093f4664a0f590efc1270e2b160e55982347b5a | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /PhysicsTools/PatExamples/test/analyzePatMuons_edm_cfg.py | a6b9382960aed8f61fb32fdd7c459213e49b43c3 | [
"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 | 1,182 | py | analyzePatMuons_edm_cfg.py | import FWCore.ParameterSet.Config as cms
process = cms.Process("Test")
process.source = cms.Source("PoolSource",
fileNames = cms.untracked.vstring(
"file:patTuple_standard.root"
)
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
process.MessageLogger = cms.Service("MessageLogger")... |
e920e7dfdf7026c83202a3367196b2ff9649d966 | 5475ca8d4ad2b0b68135d3ea70f32c1c55d21b65 | /lore/pipelines/__init__.py | 529548bce4ed65310ef0bc79437e8601e644bae9 | [
"MIT"
] | permissive | instacart/lore | e5c9aa49439a635ba80d66ecf5d76dc763e88308 | a14f65a96d0ea2513a35e424b4e16d948115b89c | refs/heads/master | 2023-05-25T08:09:53.463945 | 2022-09-27T19:41:48 | 2022-09-27T19:41:48 | 107,602,547 | 1,578 | 139 | MIT | 2023-05-13T02:26:19 | 2017-10-19T21:51:45 | Python | UTF-8 | Python | false | false | 126 | py | __init__.py | from __future__ import absolute_import
from collections import namedtuple
Observations = namedtuple('Observations', 'x y')
|
b5b30acba10d82a7d81d4ca1de64c533edff6e29 | 1194fe679b552cf1c8b63282cf59ffefa3923288 | /app/api/cms/log.py | 8da23436902dbe3fcc8089a76c74ef7ce0a08391 | [
"MIT",
"ISC"
] | permissive | TaleLin/lin-cms-flask | 531b0a32b925bbfc2c24dc1d57564cd514084917 | ae4a649a678e9e57d537d92c9a634648d6985e2d | refs/heads/master | 2023-09-05T17:48:21.866364 | 2023-07-04T07:11:03 | 2023-07-04T07:11:03 | 165,864,588 | 881 | 260 | NOASSERTION | 2023-06-14T02:39:47 | 2019-01-15T14:25:50 | Python | UTF-8 | Python | false | false | 2,634 | py | log.py | import math
from flask import Blueprint, g
from lin import DocResponse, Log, db, group_required, permission_meta
from sqlalchemy import text
from app.api import AuthorizationBearerSecurity, api
from app.api.cms.schema.log import LogPageSchema, LogQuerySearchSchema, UsernameListSchema
log_api = Blueprint("log", __nam... |
58b3b642d496d42ef62800327ab1a897d68fecb3 | 6f2fef1b207299681f8d67d3831c400bb91de04b | /data_collection/gazette/spiders/pb_associacao_municipios.py | 3356ee0eabe96efc1a458c7fb7e730e34db37299 | [
"MIT"
] | permissive | okfn-brasil/querido-diario | 76177747aa5ad47e99514f38402e6bc747b9a715 | 548a9b1b2718dc78ba8ccb06b36cf337543ad71d | refs/heads/main | 2023-08-22T04:26:30.798196 | 2023-08-18T14:12:37 | 2023-08-18T14:12:37 | 127,598,755 | 402 | 233 | MIT | 2023-09-14T18:56:02 | 2018-04-01T05:01:21 | Python | UTF-8 | Python | false | false | 248 | py | pb_associacao_municipios.py | from gazette.spiders.base.sigpub import SigpubGazetteSpider
class PbAssociacaoMunicipiosSpider(SigpubGazetteSpider):
name = "pb_associacao_municipios"
TERRITORY_ID = "2500000"
CALENDAR_URL = "https://www.diariomunicipal.com.br/famup"
|
a4ff7c29bbce35556c2fa88659c960668e03d74d | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayCommerceDataHotelServiceSyncResponse.py | accd576946880cd6db447a35ab9c76f378da2912 | [
"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 | 3,131 | py | AlipayCommerceDataHotelServiceSyncResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayCommerceDataHotelServiceSyncResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceDataHotelServiceSyncResponse, self).__init__()
self._audit_msg = N... |
786d06927420b3ded7f282b2d0511d0547d634cb | 2b0c04c439f5130bab3d1d983018c9f06947f296 | /helper.py | b6d63dd2cd7d060719df405ec526b647ead5ba41 | [] | no_license | swordest/mec_drl | 1c5677fc8c694895146274a17abd0f0d617d62c1 | 10d03702080bba6f4e4c4d0b4be0a7ba249eaaca | refs/heads/master | 2022-10-06T09:48:03.571529 | 2022-09-02T04:05:52 | 2022-09-02T04:05:52 | 166,520,752 | 290 | 115 | null | null | null | null | UTF-8 | Python | false | false | 13,997 | py | helper.py | import os
import numpy as np
import tensorflow as tf
from ddpg_lib import *
import ipdb as pdb
import matplotlib.pyplot as plt
state_avg = np.array([0.031,0.153,0.399,0.772,1.274,1.911,2.694,3.630,4.730,6.021,7.902])
trans_p = np.array([[0.514,0.514,1.000,],
[0.513,0.696,1.000,],
[0.513,0.745,1.000,],
[0.515,0.776,1.... |
76fa6eefb4c028f7e5c4dc3641611a3333c4d49d | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /checkov/terraform/checks/resource/azure/AzureBatchAccountUsesKeyVaultEncryption.py | 5b67c3c733b9397d2d5ece61bbf0726e74f730d9 | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 810 | py | AzureBatchAccountUsesKeyVaultEncryption.py | from checkov.common.models.consts import ANY_VALUE
from checkov.common.models.enums import CheckCategories
from checkov.terraform.checks.resource.base_resource_value_check import BaseResourceValueCheck
class AzureBatchAccountUsesKeyVaultEncryption(BaseResourceValueCheck):
def __init__(self):
name = "Ensur... |
e252f3aae3086f6d4bc373b05e46fa8ef02af837 | 8bd04e1685be72706b3c28a159cc8f744a4a5f65 | /tests/test_compression.py | 845e7734414be71fe116538bdf5a580a8a57c9cf | [
"MIT"
] | permissive | theopolis/uefi-firmware-parser | e55384b638026d79c03f51e2760ada6047db3269 | f05ed14eaf4013f62aa19e74c434a6a465583423 | refs/heads/master | 2023-08-24T03:14:54.480442 | 2023-08-12T15:59:06 | 2023-08-12T15:59:06 | 16,303,018 | 656 | 171 | NOASSERTION | 2023-08-12T17:12:01 | 2014-01-28T05:25:47 | Python | UTF-8 | Python | false | false | 2,367 | py | test_compression.py | import unittest
import struct
from uefi_firmware import efi_compressor
class CompressionTest(unittest.TestCase):
def _test_compress(self, compress_algorithm):
default_buffer = b"AAAAAAAA" * 90
compressed_buffer = compress_algorithm(
default_buffer, len(default_buffer))
self.... |
2bf271353b8b0e2dca381d7a39cd725916b7ba06 | 6630694f401f6f475dd81bb01ff9368db844ccff | /configs/repvgg/repvgg-D2se_8xb32_in1k.py | f532dcd79686a119e1bed528a1e7c36195e70857 | [
"Apache-2.0"
] | permissive | open-mmlab/mmpretrain | 98a4d6b3bb747efc3d50decebf84fc3ffa41076a | d2ccc44a2c8e5d49bb26187aff42f2abc90aee28 | refs/heads/main | 2023-08-30T19:11:24.771498 | 2023-08-23T02:45:18 | 2023-08-23T02:45:18 | 278,415,292 | 652 | 186 | Apache-2.0 | 2023-09-08T08:01:40 | 2020-07-09T16:25:04 | Python | UTF-8 | Python | false | false | 675 | py | repvgg-D2se_8xb32_in1k.py | _base_ = './repvgg-B3_8xb32_in1k.py'
model = dict(backbone=dict(arch='D2se'), head=dict(in_channels=2560))
param_scheduler = [
# warm up learning rate scheduler
dict(
type='LinearLR',
start_factor=0.0001,
by_epoch=True,
begin=0,
end=5,
# update by iter
c... |
6c436f0d63c82a0c80b2f9cc2d27d1d478b43055 | 42e62cdf4280d70e62522afa4597e9f84b9ce4d6 | /tractseg/experiments/pretrained_models/DmReg_All_xtract_PeakRot4.py | adac1723ad21087afbf042e72b018f5348e68ea8 | [
"Apache-2.0"
] | permissive | MIC-DKFZ/TractSeg | 7f8c224662b7d55cf7668cb3014e777b29caacc7 | 4098bc264bb454431a4a87c76ee1d70f531f3287 | refs/heads/master | 2023-06-25T15:46:01.804643 | 2023-04-14T07:02:25 | 2023-04-14T07:02:25 | 109,972,425 | 211 | 74 | Apache-2.0 | 2022-10-11T13:45:26 | 2017-11-08T12:23:08 | Python | UTF-8 | Python | false | false | 884 | py | DmReg_All_xtract_PeakRot4.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from tractseg.data import dataset_specific_utils
from tractseg.experiments.dm_reg import Config as DmRegConfig
class Config(DmRegConfig):
EXP_NAME = os.path.basename(__file__).split(".")[0]
DATASET = "HCP_all"
DATASET_FOLDER = "HCP_preproc_all"
... |
c201242bc598ee671d780e0c5ef2e2085a71a09b | be7a79f3c590f0923f1e793c6a36cfebd9ca4d01 | /brocolli/converter/onnx_layers/gelu_layer.py | e533a6de583b81e3c2aaf5359acfeea3bdfdbe27 | [
"MIT"
] | permissive | inisis/brocolli | f255d44dc9148fd2b3bc82f6a21e429a579399b4 | 46a3d8c5e19e481746a9c8a85c5e9a71a49b846c | refs/heads/master | 2023-07-22T09:37:19.480983 | 2023-07-17T14:25:35 | 2023-07-17T14:25:35 | 168,733,444 | 326 | 72 | MIT | 2023-06-04T17:03:43 | 2019-02-01T17:17:22 | Python | UTF-8 | Python | false | false | 875 | py | gelu_layer.py | import torch
import torch.nn.functional as F
from loguru import logger
from onnx import helper
from onnxruntime_extensions import onnx_op, PyOp
from .base_layer import BaseLayer
class GELULayer(BaseLayer):
def __init__(self, source_node, module=None, auto_gen=True):
super(GELULayer, self).__init__(source... |
14ca33ec822a6eb8f49685fd6c3aba8fe9b211a5 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/psi/assignment/TuplePack.py | e1b4b0e34d0eb56135f0a76cdd2178d0cc59fb17 | [
"Apache-2.0"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 35 | py | TuplePack.py | <dst>some_tuple = <src1>1, <src2>2
|
6ebab22687dee893894deafef2ea41e435629e2c | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/ios/tests/ShowLldpNeighborsDetail/cli/equal/golden_output_5_expected.py | f2aaa679c885a13b6f55e6922f767cf8b65a3009 | [
"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 | 1,007 | py | golden_output_5_expected.py | expected_output = {
"interfaces": {
"GigabitEthernet1/0/19": {
"if_name": "GigabitEthernet1/0/19",
"port_id": {
"6400.33ff.4444": {
"neighbors": {
"not advertised": {
"neighbor_id": "not advertise... |
b90a31562dbf98acd41ee128eb7abb7b160c66d2 | 7bc1d8634529eac952490399fb71f10bcedf05cc | /tests/scripts/thread-cert/border_router/test_multi_thread_networks.py | 4e0823b0aa3c3817a8110794e198065c51cda92e | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause"
] | permissive | openthread/openthread | 6a9e25d1cd224bde9796d9616f04f423dba27d77 | 102a631cb3f8938389d0d10199a14c59184039cd | refs/heads/main | 2023-08-18T10:46:03.820124 | 2023-08-17T22:20:55 | 2023-08-17T22:20:55 | 55,808,787 | 3,485 | 1,296 | BSD-3-Clause | 2023-09-14T15:50:53 | 2016-04-08T20:47:41 | C++ | UTF-8 | Python | false | false | 6,384 | py | test_multi_thread_networks.py | #!/usr/bin/env python3
#
# Copyright (c) 2020, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... |
cd21bc8588a1c879b3abfe49a20c7ae8c52f2c87 | 85ccd32aa73eecf274a937f1fc3b6f4d484b77da | /mesonbuild/dependencies/dev.py | ec7015103b7ae8147bd2421319ef5b51122702e5 | [
"Apache-2.0"
] | permissive | mesonbuild/meson | 48321cf4235dfcc0194fed90ff43a57367592bf7 | cf5adf0c646474f0259d123fad60ca5ed38ec891 | refs/heads/master | 2023-09-01T05:58:50.807952 | 2023-03-17T20:27:37 | 2023-08-31T11:52:41 | 19,784,232 | 5,122 | 1,848 | Apache-2.0 | 2023-09-14T15:47:23 | 2014-05-14T15:08:16 | Python | UTF-8 | Python | false | false | 30,147 | py | dev.py | # Copyright 2013-2019 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agree... |
c7e7d0447318172a5c68e3614462fe57db27dc6e | 749af8e81d5ccd2d8714a34434a9c77772df551b | /statsmodels/stats/libqsturng/make_tbls.py | 33bc88c05f3d4d0818495bc10b5a5c76e134d6cc | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | statsmodels/statsmodels | 98ca67192c08bcc611ed3a75edaded2c7181ab98 | 01b19d7d111b29c183f620ff0a949ef6391ff8ee | refs/heads/main | 2023-09-05T13:05:49.497076 | 2023-09-01T10:54:50 | 2023-09-01T10:54:50 | 1,885,237 | 8,666 | 3,023 | BSD-3-Clause | 2023-09-13T17:51:48 | 2011-06-12T17:04:50 | Python | UTF-8 | Python | false | false | 63,583 | py | make_tbls.py | """this script builds the T table and A table for the upper
quantile stundentized range algorithm"""
from statsmodels.compat.python import lrange, lmap
import math
import scipy.stats
from scipy.optimize import leastsq
import numpy as np
from numpy.random import random
# The values for p in [.5, .75, .9, .95, .975,... |
e70cbe5683d10027d6fa2845e100adde13f746f9 | ddddaa700e4642f46a2c1e1e0271a7c8ea62ba0f | /e2e_tests/tests/cluster/test_job_queue.py | 75683d5dc04cc3e94eb0a87f15ae87dc64dea42c | [
"Apache-2.0"
] | permissive | determined-ai/determined | 9d563cb5ffd074c88ee5edc9bf22ab9c3cb78c7e | 8239b1993f4f44390f4e88901ffaf3b12429b83c | refs/heads/main | 2023-08-21T12:13:36.651298 | 2023-08-21T08:34:16 | 2023-08-21T08:34:16 | 253,846,879 | 2,531 | 330 | Apache-2.0 | 2023-09-14T21:54:17 | 2020-04-07T16:12:29 | Go | UTF-8 | Python | false | false | 2,269 | py | test_job_queue.py | import subprocess
from time import sleep
from typing import Dict, List, Tuple
import pytest
# from determined.experimental import Determined, ModelSortBy
from tests import config as conf
from tests import experiment as exp
@pytest.mark.e2e_cpu
def test_job_queue_adjust_weight() -> None:
config = conf.tutorials_... |
25dbfbefe977a4295da1205f5ebebf19e6e41c86 | cb293ffb6c0015bf01ac30e6ce1b217a376c2458 | /pacu/modules/route53__enum/main.py | 1ba6970e1458b32c4018849b47eb69f0414a2f4d | [
"BSD-3-Clause"
] | permissive | RhinoSecurityLabs/pacu | 33675ef331858b5ba8ca9cb338b9d129173859da | 79cd7d58f7bff5693c6ae73b30a8455df6136cca | refs/heads/master | 2023-09-03T16:01:05.363049 | 2023-08-07T22:19:47 | 2023-08-07T22:19:47 | 137,276,052 | 3,626 | 624 | BSD-3-Clause | 2023-08-07T22:22:45 | 2018-06-13T21:58:59 | Python | UTF-8 | Python | false | false | 5,324 | py | main.py | #!/usr/bin/env python3
import argparse
from botocore.exceptions import ClientError
module_info = {
# Name of the module (should be the same as the filename).
"name": "route53__enum",
# Name and any other notes about the author.
"author": "Aaron Rea - Scalesec",
# Category of the module. Make sure t... |
72c3e00ca60b0874870786b121d3658c6a881d32 | 84724b34b3f1e84dc53cbca5f3660590dbc34a9f | /nova/tests/functional/db/test_quotas.py | a6ad5af517ff9cfaceeccacd6841b99cf788de59 | [
"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 | 16,573 | py | test_quotas.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
# d... |
bb511785f3010863589739d8e6bb608dd265772a | 017090be7ab186cb6b47f49e1066ac5cfec3a542 | /tests/unit/neptune/new/attributes/series/test_series.py | 5ae07204c7c3a69f53816ad7c3f4d4bcbd92b92b | [
"Apache-2.0"
] | permissive | neptune-ai/neptune-client | 9a79f9d93c84b3a20114e6e49a80652930399ece | 9b697ce548634c30dbc5881d4a0b223c8987515d | refs/heads/master | 2023-08-18T01:48:22.634432 | 2023-08-17T11:55:57 | 2023-08-17T11:55:57 | 170,117,229 | 408 | 55 | Apache-2.0 | 2023-09-13T12:51:03 | 2019-02-11T11:25:57 | Python | UTF-8 | Python | false | false | 7,467 | py | test_series.py | #
# Copyright (c) 2020, Neptune Labs Sp. z o.o.
#
# 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 agr... |
d470d7814b94cec8d13ccd79c03fa23300f2fd08 | 8b6810b3aef58cf2e2d02c95b343472453f1c2a3 | /tests/test_messages.py | 4f99b16119d7c912ff1646cec7cc3ac902b77948 | [
"Apache-2.0"
] | permissive | jodal/pykka | 477ed953685b439c97888066bea6c19034d9360f | 06537a5535b1c9eddfe3535f42ac081f1874bcd1 | refs/heads/main | 2023-08-30T00:45:16.096965 | 2023-08-03T21:21:35 | 2023-08-03T21:21:35 | 1,079,822 | 955 | 119 | Apache-2.0 | 2023-09-14T21:47:57 | 2010-11-14T23:45:50 | Python | UTF-8 | Python | false | false | 903 | py | test_messages.py | from pykka.messages import ProxyCall, ProxyGetAttr, ProxySetAttr, _ActorStop
def test_actor_stop() -> None:
message = _ActorStop()
assert isinstance(message, _ActorStop)
def test_proxy_call() -> None:
message = ProxyCall(attr_path=("nested", "method"), args=(1,), kwargs={"a": "b"})
assert isinstan... |
b3b09c5010cc1eeb63b1c001ec1fa0fda57f3a10 | 391fb5b11425d59ea917c6fed51fe1fa9c672764 | /opytimizer/optimizers/swarm/fso.py | 013ccd3e5e12dbade027fb908a3fbe27b7524705 | [
"Apache-2.0"
] | permissive | gugarosa/opytimizer | 89e60d582dee9e31b1723e35d08103d7f8f5d3e1 | 7326a887ed8e3858bc99c8815048d56d02edf88c | refs/heads/master | 2023-08-01T08:09:12.055317 | 2023-05-11T15:21:58 | 2023-05-11T15:21:58 | 109,152,650 | 602 | 45 | Apache-2.0 | 2023-09-07T14:26:13 | 2017-11-01T16:04:01 | Python | UTF-8 | Python | false | false | 3,198 | py | fso.py | """Flying Squirrel Optimizer.
"""
import copy
from typing import Any, Dict, Optional
import numpy as np
import opytimizer.math.distribution as d
import opytimizer.math.random as r
import opytimizer.utils.exception as e
from opytimizer.core import Optimizer
from opytimizer.core.function import Function
from opytimize... |
52dc98c401029e67d784195f5d946868bae9c3d4 | cceaa3bd21e0402a3cf619ec746e2eba39c0905d | /ma_gym/envs/checkers/__init__.py | 18a93edbaf6251300320059d372a30bd8c4c64f5 | [
"Apache-2.0"
] | permissive | koulanurag/ma-gym | f3785906f57a097752cf36341d98fc60e381626a | 70d3b4d194c7e792bb1baef57d542b2acba2b71d | refs/heads/master | 2023-09-02T15:09:52.841704 | 2023-08-16T16:46:24 | 2023-08-16T16:46:24 | 191,194,671 | 460 | 90 | Apache-2.0 | 2023-05-29T16:28:07 | 2019-06-10T15:28:41 | Python | UTF-8 | Python | false | false | 30 | py | __init__.py | from .checkers import Checkers |
75ed31d8625d27fb669d3b7d415752ace8dc537f | 07434513334237d453faae8972b136f28b8d1e2c | /remme/rpc_api/atomic_swap.py | 80152c48c2a5c01f6e0c87aa034a882582e30426 | [
"Apache-2.0"
] | permissive | Remmeauth/remme-core | 5a595391659e60ce82fbe73883be13df8a52dad9 | 3a8ac8d8f6ba1a1126c028c81d350c9475fe9834 | refs/heads/master | 2021-03-27T14:17:19.966578 | 2019-05-21T17:00:15 | 2019-05-21T17:00:15 | 121,400,220 | 132 | 30 | Apache-2.0 | 2021-12-29T20:13:14 | 2018-02-13T15:36:38 | Python | UTF-8 | Python | false | false | 1,811 | py | atomic_swap.py | # Copyright 2018 REMME
#
# 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, softwa... |
c65d44f99380065820894d5f4340a6fb3975d1fb | f729993e43a8f2031a4ad5c766e63117588b4312 | /tests/test_registry/test_default_scope.py | 0798f4a2c75831dd67559f3df5614fd6431dba3d | [
"Apache-2.0"
] | permissive | open-mmlab/mmengine | d28a41c4b3dac47c58ee19b241c4b963eb14ddb6 | 170758aefe6cb05f61bf9353d03af1b8c1f4f73a | refs/heads/main | 2023-08-29T18:12:33.261889 | 2023-08-28T08:15:00 | 2023-08-28T08:15:00 | 456,857,425 | 708 | 279 | Apache-2.0 | 2023-09-14T09:23:21 | 2022-02-08T09:05:09 | Python | UTF-8 | Python | false | false | 1,976 | py | test_default_scope.py | # Copyright (c) OpenMMLab. All rights reserved.
from collections import OrderedDict
import pytest
from mmengine.registry import DefaultScope
class TestDefaultScope:
def test_scope(self):
default_scope = DefaultScope.get_instance('name1', scope_name='mmdet')
assert default_scope.scope_name == 'm... |
7f1bb946446feb6e7369868872e0c205e074ee11 | 7a5b1039d9dd2e488c361b3141226f6ae5bf76f3 | /rsb_depth_check/plot.py | dfb4d6db33248cfe1af3fe8302f2ae5fa7265b85 | [] | no_license | comsec-group/retbleed | 39066af14fb1adf7ef82754c36002f2bf1cf871f | 32e1eecd7c7a9cb9174c1ae7ce8614a60d39b11d | refs/heads/master | 2023-03-07T11:40:42.759042 | 2022-08-25T22:47:01 | 2022-08-25T22:47:01 | 505,872,974 | 112 | 10 | null | 2022-07-27T18:41:03 | 2022-06-21T14:15:23 | C | UTF-8 | Python | false | false | 1,484 | py | plot.py | import matplotlib
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import sys
if len(sys.argv) < 3:
print(f"useage: {sys.argv[0]} <ret> <jmp>")
exit(1)
file_ret = sys.argv[1]
file_jmp = sys.argv[2]
# matplotlib.rcParams['font.family'] = 'serif'
# sb.set()
fig, ax = plt.subplots()
fig.set_f... |
6f0984a74e586fe9dbcd96c39c7ecd3340c4315e | 03b97977ca4d2e91cb19c9c43385037eff3731ce | /test/TestUtilsHelpers.py | 80658d82e0abee7f4bce07340dd677523f368d32 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | debbiemarkslab/EVcouplings | 17f601e7498fe3e9283b2b729fab7696311575c5 | af27842c5fc72c291831261c9a19849a3e313efd | refs/heads/develop | 2023-08-03T21:29:37.533602 | 2023-03-16T15:02:13 | 2023-03-16T15:02:13 | 63,804,056 | 184 | 74 | NOASSERTION | 2023-08-02T14:29:38 | 2016-07-20T18:15:45 | Jupyter Notebook | UTF-8 | Python | false | false | 4,018 | py | TestUtilsHelpers.py | import unittest
from unittest import TestCase
from evcouplings.utils import *
import tempfile
class TestUtilsHelpers(TestCase):
def test_wrap(self):
"""
Test whether string is correctly wrap
"""
out = wrap("Test", width=2)
self.assertEqual("Te\nst", out)
def test_rang... |
fc8a90092fb6040203ade9f5996a15d971fff379 | bdf0d4d3aac186af3ad0ad6ac9f380f9a0573fba | /aries_cloudagent/protocols/discovery/v1_0/messages/tests/test_query.py | 18af3b6ba7f82acac2ca9acdb5365b52782bb1e4 | [
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] | permissive | hyperledger/aries-cloudagent-python | f25d961e0717a4d703bf43df3e4b4bc8ec07b908 | 39cac36d8937ce84a9307ce100aaefb8bc05ec04 | refs/heads/main | 2023-09-01T15:37:05.353674 | 2023-08-31T14:13:06 | 2023-08-31T14:13:06 | 193,556,007 | 370 | 530 | Apache-2.0 | 2023-09-14T17:59:34 | 2019-06-24T18:12:14 | Python | UTF-8 | Python | false | false | 1,536 | py | test_query.py | from unittest import mock, TestCase
from .....didcomm_prefix import DIDCommPrefix
from ...message_types import QUERY, PROTOCOL_PACKAGE
from ..query import Query
class TestQuery(TestCase):
test_query = "*"
test_comment = "comment"
def test_init(self):
query = Query(query=self.test_query, comment... |
0359c94b2877805866efa681dec11e680102c4f5 | f54739ec8ca9a9012eefda5c4759a62db3fef3c2 | /src/api-engine/api/routes/node/serializers.py | de7dc9d151ade386cdda7eb2fa1a63beeadf6187 | [
"CC-BY-4.0",
"Apache-2.0"
] | permissive | hyperledger/cello | 6e615ab0df9724262ef6c2028d45f2f642254fe2 | cb4d24347228ad9d1ae24cd0d6188bf29b1b8cbe | refs/heads/main | 2023-09-03T15:33:35.844553 | 2023-08-29T03:47:41 | 2023-08-29T03:47:41 | 78,610,786 | 957 | 559 | Apache-2.0 | 2023-09-12T00:53:55 | 2017-01-11T06:47:08 | Python | UTF-8 | Python | false | false | 11,404 | py | serializers.py | #
# SPDX-License-Identifier: Apache-2.0
#
import logging
from rest_framework import serializers
from api.common.enums import (
Operation,
)
from api.common.serializers import PageQuerySerializer
from api.models import (
Node,
Port,
FabricCA,
NodeUser,
FabricPeer,
PeerCa,
PeerCaUser,
)
... |
7e37777a44921b638c0bcebd5dd2004849280748 | ab5d1586266e525eb32823851dd3c774b60fabec | /core/logger.py | 5ac1b9bca952fd7dc71060f204adc35621f5f833 | [
"Apache-2.0"
] | permissive | yeti-platform/yeti | d31fa464582b6d6731a437d7ceab9e730ce09c75 | dccc691d48177f921ef1134c8fd22f064dc085a2 | refs/heads/master | 2023-09-01T13:54:19.258408 | 2023-06-29T12:44:55 | 2023-06-29T12:44:55 | 47,927,876 | 1,444 | 321 | Apache-2.0 | 2023-09-12T14:49:55 | 2015-12-13T16:54:26 | Python | UTF-8 | Python | false | false | 756 | py | logger.py | """Set up logging for Yeti."""
import logging
import os
from logging import FileHandler
from logging import Formatter
from core.config.config import yeti_config
LOG_FORMAT = "%(asctime)s [%(levelname)s]: %(message)s"
LOG_LEVEL = logging.INFO
# user logger
USER_LOG_FILE = yeti_config.get("logging", "filename")
# Fal... |
bd7359f157c2f9a5e44397f96140951619d50fba | 0841643267b9fc1478f6e3d21bfccb17aba67af6 | /gs_quant/api/gs/screens.py | 59408dd61e36f519bc4ed6cb9c7f74bcb42d9bfa | [
"Apache-2.0"
] | permissive | goldmansachs/gs-quant | 55618e0e4e961d4ee50b7393f27c258e2647a957 | 4cf8ec75c4d85b16ec08371c46cc1a9ede9d72a2 | refs/heads/master | 2023-08-20T00:55:43.324547 | 2023-08-16T16:55:22 | 2023-08-16T16:55:22 | 161,840,815 | 2,088 | 596 | Apache-2.0 | 2023-08-16T16:55:23 | 2018-12-14T21:10:40 | Jupyter Notebook | UTF-8 | Python | false | false | 2,098 | py | screens.py | """
Copyright 2019 Goldman Sachs.
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 di... |
ffaa61ee25273ca6b55cd1c977cf070a182b4ccd | da1721d2783ea4d67ff4e73cee6eee71292f2ef7 | /toontown/parties/DistributedPartyCannonActivity.py | a2ee0d2a0d44f303a6a6bb4abadb96525cb2b902 | [
"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 | 40,354 | py | DistributedPartyCannonActivity.py | import math
from panda3d.core import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
from otp.otpbase.PythonUtil import quantizeVec
from direct.task.Task import Task
from toontown.toontowngui import TTDialog
from toontown.toonbase.ToonBaseGlobal import *
from toontown.toonbase... |
1f726fed52fa48fbe105342a95685fb2dc0b7ab7 | b4108cbe9fae763ca6b26ff641fc7cab83e4f385 | /tests/test_autots.py | 89897b1550f8830dbe084cc80e01380dfb597d28 | [
"MIT"
] | permissive | winedarksea/AutoTS | ac66d78168d2becca001eb7bd3aa3f8b343c5e28 | f2a332d2f681cd20ec277a5e1a996e2457e915d3 | refs/heads/master | 2023-08-21T19:28:30.020737 | 2023-08-07T21:24:21 | 2023-08-07T21:24:21 | 224,208,127 | 827 | 83 | MIT | 2023-08-11T00:15:00 | 2019-11-26T14:13:16 | Python | UTF-8 | Python | false | false | 37,499 | py | test_autots.py | # -*- coding: utf-8 -*-
"""Overall testing."""
import unittest
import json
import time
import timeit
import tempfile
import os
import numpy as np
import pandas as pd
from autots.datasets import (
load_daily, load_monthly, load_artificial, load_sine
)
from autots import AutoTS, model_forecast
from autots.evaluator.a... |
331fa2102d987d240ae965ec216ada567c6be13a | a0736beb3269a71b2f5b13cafe8fb5e7f6f540f4 | /src/scripts/schedule_jobs.py | 97ed1658dd4508831ced3e74b67958ea4f30d70a | [
"Apache-2.0",
"CC-BY-4.0"
] | permissive | GoogleCloudPlatform/covid-19-open-data | d9e467fadbfc71686e30e28f3ce1d438e8fd92ba | 1123ce02a0b4059d6acd4c4446f3f9b8335018f1 | refs/heads/main | 2023-08-02T23:57:12.785363 | 2022-10-23T22:26:29 | 2022-10-23T22:26:29 | 282,079,576 | 489 | 146 | Apache-2.0 | 2022-09-05T12:00:37 | 2020-07-23T23:43:51 | Python | UTF-8 | Python | false | false | 10,336 | py | schedule_jobs.py | #!/usr/bin/env python
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
e46389530a8eb74f5a49ce0220a61f1dec69821d | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/botservice/_inputs.py | 6a8116d04f15bfdb4acab2440a5c36cbdae968f4 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 159,145 | py | _inputs.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from ._enu... |
87890e8dcfd1b1d3dd765f5bfe0ecdd9e32631a7 | 028ddc5e85d89c26f8320b70d8ffe80f3d5aec52 | /src/UQpy/sampling/stratified_sampling/strata/VoronoiStrata.py | 76e0bfa03e663c2a77501e02cf08f8f31add7472 | [
"MIT"
] | permissive | SURGroup/UQpy | 3b516706e9072c6fac80da0bdfbd23e2193f5844 | 9e98a6279aa5a2ec2d6d4c61226c34712547bcc6 | refs/heads/master | 2023-09-04T03:38:35.294389 | 2023-08-04T12:55:02 | 2023-08-04T12:55:02 | 112,795,497 | 215 | 70 | MIT | 2023-09-14T14:18:22 | 2017-12-01T23:05:13 | Python | UTF-8 | Python | false | false | 19,271 | py | VoronoiStrata.py | import logging
import math
from UQpy.sampling.stratified_sampling.strata.DelaunayStrata import DelaunayStrata
from UQpy.sampling.stratified_sampling.strata.baseclass.Strata import Strata
from UQpy.sampling.SimplexSampling import *
from UQpy.utilities.ValidationTypes import RandomStateType
import numpy as np
from scipy... |
f66d39f8e1d978d06dfcb1e0da4b5b58dd3bdc85 | d3ef2463f556d6cd166eb29d3a5f5b210a6402e7 | /tests/cupyx_tests/profiler_tests/test_benchmark.py | 7889df39a2d958e26b4de963b12eff2974e44d8a | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | cupy/cupy | ce7a010a57504dbfe4fb5af10d354a22e79f4907 | 96105afb78aa3f8380834d2516184b8365e23fcb | refs/heads/main | 2023-08-31T00:36:47.967611 | 2023-08-30T09:19:27 | 2023-08-30T09:19:27 | 72,523,920 | 7,505 | 1,072 | MIT | 2023-09-14T01:04:42 | 2016-11-01T09:54:45 | Python | UTF-8 | Python | false | false | 5,372 | py | test_benchmark.py | import unittest
from unittest import mock
import numpy
import cupy
from cupy import testing
from cupyx import profiler
from cupyx.profiler import _time
class TestBenchmark(unittest.TestCase):
def test_cpu_routine(self):
with mock.patch('time.perf_counter',
mock.Mock(side_effect=... |
956bbceee173bf63051c8c07951b37c390f4718b | e5ba883c7ae6761e119e245d66b01efc41631d97 | /examples/hitcon2017_sakura/solve.py | 20e483e203cccf07c8d1007c7435a854c051e511 | [
"BSD-2-Clause"
] | permissive | angr/angr-doc | e40ffb5e68a7f08c1d4aa0e27788b985826ff196 | bf380700f2baa092c2970a2dceb0eb2793bd9837 | refs/heads/master | 2023-08-18T15:55:38.508443 | 2023-04-27T22:54:12 | 2023-04-27T22:54:12 | 40,329,995 | 926 | 595 | BSD-2-Clause | 2023-04-12T12:51:06 | 2015-08-06T22:37:54 | TeX | UTF-8 | Python | false | false | 1,650 | py | solve.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Kyle ZENG
# Runtime: ~6 minutes
import hashlib
import angr
def main():
e = open('./sakura', 'rb').read()
# make sure return value is not 0, add corresponding addr to avoid list
avoids = []
index = 0
while True:
# avoid asm('mov byte... |
3c9eb477eeb20cc2275d87668200611951897e69 | 60d6b8501d0be546437b26a6ee1f9fab97ec3897 | /platypush/runner/_app.py | 6ff9207be57944472dd66829b415c1aea560a4e2 | [
"MIT"
] | permissive | BlackLight/platypush | 68284a85b2f9eef303d26b04530f075927b5834a | 446bc2f67493d3554c5422242ff91d5b5c76d78a | refs/heads/master | 2023-08-31T21:01:53.519960 | 2023-08-29T22:05:38 | 2023-08-29T22:05:38 | 109,421,017 | 265 | 25 | MIT | 2023-09-01T23:15:49 | 2017-11-03T16:56:24 | Python | UTF-8 | Python | false | false | 1,390 | py | _app.py | import logging
import os
import signal
import subprocess
import sys
from typing_extensions import override
from platypush.process import ControllableProcess
class ApplicationProcess(ControllableProcess):
"""
Controllable process wrapper interface for the main application.
"""
def __init__(self, *arg... |
8c817bdc1029e695a27a65d8735247d5d9d93315 | 85373d45a83e4096affafa4f4e5b400787413e57 | /test/programytest/parser/template/graph_tests/test_learn.py | c5b1ae0bad8ce17eec1394d8698ec6e334a1528a | [
"MIT"
] | permissive | keiffster/program-y | a02bb9d8278835547cc875f4f9cd668d5b1f44da | fc7b0a3afa4fa6ed683e0c817a9aa89f9543bb20 | refs/heads/master | 2023-08-23T13:55:39.255535 | 2022-12-13T09:51:57 | 2022-12-13T09:51:57 | 74,462,571 | 379 | 173 | NOASSERTION | 2023-05-23T00:51:21 | 2016-11-22T10:43:41 | Python | UTF-8 | Python | false | false | 6,207 | py | test_learn.py | import xml.etree.ElementTree as ET
from programy.parser.exceptions import ParserException
from programy.parser.template.nodes.base import TemplateNode
from programy.parser.template.nodes.learn import TemplateLearnNode, LearnCategory
from programytest.parser.template.graph_tests.graph_test_client import TemplateGraphTe... |
b1f89150260fa8114a71d66f54c7d31e028f02c4 | 9abd182d02355ddf0b79afd4a35f7127a4a66f7a | /scripts/action-recognition/get_flops.py | f32f39ddf1f2f1596219c8dba04fa4d8b07adb57 | [
"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 | 1,055 | py | get_flops.py | """
Script to compute FLOPs of a model
"""
import os
import argparse
import torch
from gluoncv.torch.model_zoo import get_model
from gluoncv.torch.engine.config import get_cfg_defaults
from thop import profile, clever_format
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Compute FLOPs ... |
ba0984b931f2a537b87c1f5bf87c79eedde26f3e | 6d40c76564adacb9c481e87582c239f9b708f592 | /benchmarking/run_remote.py | 63f31ec33dd2e713cb303c6f85c4e7bea7f41bec | [
"Apache-2.0"
] | permissive | facebook/FAI-PEP | 40c9636fcc5f6416783384667449b76d7354d156 | 75ffd8ba91da66987904603a2a13c259c59840c9 | refs/heads/main | 2023-08-31T07:48:53.781883 | 2023-08-29T18:41:53 | 2023-08-29T18:41:53 | 111,588,048 | 390 | 93 | Apache-2.0 | 2023-06-12T23:37:55 | 2017-11-21T18:47:29 | Python | UTF-8 | Python | false | false | 32,554 | py | run_remote.py | #!/usr/bin/env python
##############################################################################
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
################################... |
50442c56d4e034a8779bea85a38ded5befb04c01 | 691b82da7c38a6c109088d8426ffa26175f4ff31 | /apps/comment/__init__.py | cbb4310db14393564be9c625d1ed5268dda44d76 | [
"MIT"
] | permissive | Hopetree/izone | 4072957eb12c7703a235c6df87ab49c7a7fdd84e | 46f90dbaa3968cb3261d60a74765fa462415f000 | refs/heads/master | 2023-08-19T00:21:48.632159 | 2023-08-09T07:36:20 | 2023-08-09T07:36:20 | 115,265,222 | 1,167 | 460 | MIT | 2023-06-25T07:27:10 | 2017-12-24T13:39:43 | Python | UTF-8 | Python | false | false | 49 | py | __init__.py | default_app_config = 'comment.apps.CommentConfig' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.