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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a5efc8fceda774f00ffd1f55d10a779d6bd33bbb | 52439d16e492fc072a8fbec462f886a9327da0ba | /internalblue/hcicore.py | 97b8fd9dc76c176019b213940ed583d6bdcddd58 | [
"MIT"
] | permissive | seemoo-lab/internalblue | 73a90b874a1f2035201c9217bf8582568cfd1441 | 9a7ddea09ef045ca1cd36e39be1c6775cfce40f4 | refs/heads/master | 2023-09-03T04:23:25.718196 | 2022-11-25T15:03:43 | 2022-11-25T15:03:43 | 147,357,670 | 618 | 83 | null | 2022-11-25T15:03:45 | 2018-09-04T14:17:46 | Python | UTF-8 | Python | false | false | 16,542 | py | hcicore.py | #!/usr/bin/env python2
from __future__ import absolute_import
import datetime
import fcntl
import queue as queue2k
import socket
import struct
import threading
from builtins import range
from builtins import str
from builtins import zip
from ctypes import *
from typing import List, cast, TYPE_CHECKING
from future ... |
80e66e3d65f791312617d876c7271cdc34482c3f | 2d18e7bdf1875240d77739b91e748eaeda6edc95 | /drain3/redis_persistence.py | b2cfd67809ee19405065ef09098269116ad0dec1 | [
"MIT"
] | permissive | logpai/Drain3 | dc3c74d3e3f9530794e3b2a0868f7de4e58f598f | 76d12defdeec14da3794d451875b781669f62acf | refs/heads/master | 2023-09-01T21:02:04.078069 | 2023-08-31T22:16:14 | 2023-08-31T22:16:14 | 243,277,573 | 111 | 31 | NOASSERTION | 2023-08-31T22:16:16 | 2020-02-26T14:06:21 | Python | UTF-8 | Python | false | false | 842 | py | redis_persistence.py | # SPDX-License-Identifier: MIT
import redis
from drain3.persistence_handler import PersistenceHandler
class RedisPersistence(PersistenceHandler):
def __init__(self, redis_host, redis_port, redis_db, redis_pass, is_ssl, redis_key):
self.redis_host = redis_host
self.redis_port = redis_port
... |
5256c613cd6f06fdbed5c056a46b4c3ef4e39440 | 4570d4339e498fa8caaaad6db7296704562d0532 | /deeplearning/twitter_sentiment/twitter_glove.py | 772b701144eff348d814deb382e1eaa735758e42 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | sassoftware/sas-viya-programming | 81e024035a2fec55a17006672fd15069dcdfc8a5 | 947f16955fc7e94b73b5aa5a59010e90abd11130 | refs/heads/master | 2023-05-24T22:21:07.696235 | 2023-05-12T19:26:58 | 2023-05-12T19:26:58 | 62,091,838 | 146 | 154 | Apache-2.0 | 2023-03-25T01:24:58 | 2016-06-27T22:11:06 | Jupyter Notebook | UTF-8 | Python | false | false | 3,920 | py | twitter_glove.py | # Python 3
# Reads stdin: python preprocess-twitter.py
#
# Script for preprocessing tweets by Romain Paulus
# with small modifications by Jeffrey Pennington
# Converted to python by Sam leeman-Munk
#"tokenize" has been renamed to "normalize" with a helper function that normalizes and calls split
# http://nlp.stanford... |
ba64dbfa864159fe074e2046b19e86f8a8f5de03 | ddaa20f2ff0aaed4c6beeba888c4213405fdd586 | /package/make-deb.py | 790248e57ea50863c364ce7cb42db5c22f1e44f4 | [
"MIT"
] | permissive | mosquito/pypi-server | 689fb84dd0cc56a70c7bfa6157b8defa76d774d8 | 825571aae6fd17616e404ad8a9b72ef791a4fc46 | refs/heads/master | 2023-08-17T14:17:50.177008 | 2021-11-14T17:11:52 | 2021-11-14T17:11:52 | 47,583,364 | 129 | 58 | MIT | 2021-11-14T17:11:53 | 2015-12-07T22:30:53 | Python | UTF-8 | Python | false | false | 1,851 | py | make-deb.py | import os
from subprocess import check_output
import plumbum
from plumbum.cmd import grep, fpm, ln, sort, find, virtualenv
import logging
log = logging.getLogger()
logging.basicConfig(level=logging.INFO)
ENV_PATH = os.getenv("ENV_PATH", "/usr/share/python3/pypi-server")
SRC_PATH = os.getenv("SRC_PATH", "/mnt")
pip =... |
78fe6eb0038a886009fbf51e67294d4ecab78058 | 1095cfe2e29ddf4e4c5e12d713bd12f45c9b6f7d | /configs/common/Options.py | 8344d9fd44a44b4dede50a756e74f2b6f97dedb4 | [
"BSD-3-Clause",
"LicenseRef-scancode-proprietary-license",
"LGPL-2.0-or-later",
"MIT"
] | permissive | gem5/gem5 | 9ec715ae036c2e08807b5919f114e1d38d189bce | 48a40cf2f5182a82de360b7efa497d82e06b1631 | refs/heads/stable | 2023-09-03T15:56:25.819189 | 2023-08-31T05:53:03 | 2023-08-31T05:53:03 | 27,425,638 | 1,185 | 1,177 | BSD-3-Clause | 2023-09-14T08:29:31 | 2014-12-02T09:46:00 | C++ | UTF-8 | Python | false | false | 27,682 | py | Options.py | # Copyright (c) 2013-2020 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... |
b05084838d1d69857e4c3b5b9b0c62b2cf830a1c | 2ddbb1e257155ac583ac2caa08d4e0bbfdb35e2d | /models/GAN3D.py | 6a5feaf6c9bba14ca24e39040e0edf2e804627c9 | [
"MIT"
] | permissive | black0017/3D-GAN-pytorch | 703d0d3675ca8e206f2dd22a79bffd6ff0ac9f34 | 47c338a9787b190c76001f8c6d4f154ddb84a831 | refs/heads/master | 2022-07-11T13:50:55.882918 | 2022-07-04T09:34:41 | 2022-07-04T09:34:41 | 252,830,682 | 128 | 21 | MIT | 2022-07-04T09:34:42 | 2020-04-03T20:10:49 | Jupyter Notebook | UTF-8 | Python | false | false | 5,379 | py | GAN3D.py | import torch
import torch.nn as nn
from torchsummary import summary
"""
Implementation based on original paper NeurIPS 2016
https://papers.nips.cc/paper/6096-learning-a-probabilistic-latent-space-of-object-shapes-via-3d-generative-adversarial-modeling.pdf
"""
class Discriminator(torch.nn.Module):
def __init__(se... |
6f836ab3686942afcbcdebc3df332634655fe24e | d110546d747d7e3865ce5742d5fca09f404623c0 | /tests/pytests/functional/modules/test_aptpkg.py | 7d4933875d411249a69795af447e26c969383490 | [
"Apache-2.0",
"MIT",
"BSD-2-Clause"
] | permissive | saltstack/salt | 354fc86a7be1f69514b3dd3b2edb9e6f66844c1d | 1ef90cbdc7203f97775edb7666db86a41eb9fc15 | refs/heads/master | 2023-07-19T20:56:20.210556 | 2023-06-29T23:12:28 | 2023-07-19T11:47:47 | 1,390,248 | 11,026 | 6,296 | Apache-2.0 | 2023-09-14T20:45:37 | 2011-02-20T20:16:56 | Python | UTF-8 | Python | false | false | 11,150 | py | test_aptpkg.py | import os
import pathlib
import shutil
import pytest
import salt.exceptions
import salt.modules.aptpkg as aptpkg
import salt.modules.cmdmod as cmd
import salt.modules.config as config
import salt.modules.cp as cp
import salt.modules.file as file
import salt.modules.gpg as gpg
import salt.utils.files
import salt.utils... |
06116dfe480007bb0c6223c3b91c5f05296b2820 | fbebc09f50a6ac0749e68d5dcab20afd009de71f | /snippets/ch04/loader.py | 96b5010a8996b2ab1e02effb1492873380abeb80 | [
"Apache-2.0"
] | permissive | foxbook/atap | 7e9adbaa1f64ff4e7a2e58a5d9b1717150f063ba | 43fd3317b641e0830905a734226afad3a0ea19f6 | refs/heads/master | 2023-08-17T06:37:34.571614 | 2022-12-01T14:41:35 | 2022-12-01T14:41:35 | 88,289,875 | 401 | 316 | Apache-2.0 | 2020-08-06T12:54:54 | 2017-04-14T17:48:37 | Python | UTF-8 | Python | false | false | 1,973 | py | loader.py | from sklearn.cross_validation import KFold
class CorpusLoader(object):
def __init__(self, corpus, folds=None, shuffle=True):
self.n_docs = len(corpus.fileids())
self.corpus = corpus
self.folds = folds
if folds is not None:
# Generate the KFold cross validation for the... |
1186ab3eaff44668fe0cde4d9d08a833c150078c | 6be59c81f3f6a17c14b812be0de3346a82eb33dd | /learn_torch/learn_nn/custom_module.py | 7052b14b9faf052b5bd4e089f7cb43433a46456a | [] | 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 | 440 | py | custom_module.py | import torch
from torch import nn
class MySeq(torch.nn.Module):
def __init__(self, *args):
super().__init__()
for block in args:
self._modules[block] = block
def forward(self, X):
for block in self._modules.values():
X = block(X)
return X
if __name__ ... |
0c62422540420b43c29c4c9c60d89044e3f034aa | 94724578994ab1438dcefb51b7ef4d8570da5d4c | /calibre/os重学操作系统.recipe | a47459dce17365863b71371048b1dbcb055a898d | [] | no_license | PegasusWang/collection_python | 6648d83203634abf44fd42c0b37b0bf7cc406d8f | 9ef019a737a0817860d3184924c67a0833bd1252 | refs/heads/master | 2023-09-01T23:15:39.813635 | 2023-08-24T06:46:12 | 2023-08-24T06:46:12 | 43,693,872 | 130 | 90 | null | 2021-04-26T15:12:55 | 2015-10-05T15:28:15 | JavaScript | UTF-8 | Python | false | false | 14,299 | recipe | os重学操作系统.recipe | #!/usr/bin/python
# encoding: utf-8
from calibre.web.feeds.recipes import BasicNewsRecipe # 引入 Recipe 基础类
"""
教程:
- https://bookfere.com/tools#calibre
- https://www.jianshu.com/p/0bcb92509309
- https://snowdreams1006.github.io/myGitbook/advance/export.html
命令:
ebook-convert os重学操作系统.recipe os重学操作系统.mobi --output-pr... |
aeb9980f493078a2884c0f1e8a1fb49d55601771 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/surround/SurroundNewline_after.py | c07bad2792c86b2f47f320ac4bcae2ae2a91c07d | [
"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 | 25 | py | SurroundNewline_after.py | if True:
a = 1
a = 2 |
a95f21f3ff351d356f752430a13b77d48bbc2d13 | e85453bcff9bb2a4b817d5c9157ac0894f98c1b1 | /packages/aws-cdk/lib/init-templates/app/python/tests/unit/test_%name.PythonModule%_stack.template.py | 2bf2309dca779162c05259ff607985153a099067 | [
"CC0-1.0",
"CC-BY-SA-4.0",
"MIT",
"BSD-3-Clause",
"0BSD",
"ISC",
"Apache-2.0",
"BSD-2-Clause",
"MIT-0"
] | permissive | aws/aws-cdk | 8e96f775b25d4ee193e2dbcee79c81e6b9f1a403 | 408f1f663ee300a783e36a35b5f103a514d8c12e | refs/heads/main | 2023-09-04T00:59:05.308636 | 2023-09-01T19:41:23 | 2023-09-01T19:41:23 | 105,808,767 | 8,448 | 3,869 | Apache-2.0 | 2023-09-14T20:29:14 | 2017-10-04T19:22:36 | JavaScript | UTF-8 | Python | false | false | 560 | py | test_%name.PythonModule%_stack.template.py | import aws_cdk as core
import aws_cdk.assertions as assertions
from %name.PythonModule%.%name.PythonModule%_stack import %name.PascalCased%Stack
# example tests. To run these tests, uncomment this file along with the example
# resource in %name.PythonModule%/%name.PythonModule%_stack.py
def test_sqs_queue_created():
... |
89bb86d91bd6065305c34315cbfb681511083da9 | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/lite/test/st/python/import_ms_and_mslite/test_predict_backend_lite_lenet.py | 7c20679e8982544af07f76f6477670ad045fe03e | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 3,735 | py | test_predict_backend_lite_lenet.py | # Copyright 2023 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
ef8a7bfb8ba38a97f719294d477482818b233cb9 | 2a64017ddbf28d00109ed4e3105e1f7ccc78ccc1 | /workflow101/config/settings.py | 056f93f392b668640e94742fb8e670e786a8d050 | [] | no_license | viewflow/cookbook | 25f9379510ced08dbdbae9d5cfb3df0c68f95a08 | 04189977cd894b5166d088949f30e07189889189 | refs/heads/main | 2023-08-17T09:22:26.226335 | 2023-08-11T15:12:23 | 2023-08-11T15:12:23 | 35,273,541 | 286 | 179 | null | 2023-01-19T10:44:18 | 2015-05-08T10:32:49 | Python | UTF-8 | Python | false | false | 4,273 | py | settings.py | import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/
# SECURITY WARNING: keep the... |
ff087e3a9ced7f44946bdf9c69175bfb3c3afb90 | 5be3a03ca2d74e0263338af3cc91d2cf1b7f75d9 | /正则表达式/output.py | 2dfcc83996f4d17e7bb6af90e39470c6c0879ead | [] | no_license | secondtonone1/python- | d969a1bbc5c8c2b27a0bb75f91159da6d1ce83f7 | 19a66d70c20293875ad29a868f42a9b3a5826422 | refs/heads/master | 2022-11-05T00:31:53.300764 | 2022-09-26T03:10:11 | 2022-09-26T03:10:11 | 98,652,204 | 177 | 154 | null | 2022-10-30T08:55:38 | 2017-07-28T13:29:05 | Python | UTF-8 | Python | false | false | 4,799 | py | output.py | #-*-coding:utf-8-*-
from multiprocessing import Process
import os
import re
s = 'AB\\-001'
print(s)
s = r'AB\-001'
print(s)
import re
result = re.match(r'^\d{3}\-\d{3,8}$','010-12345')
print(result)
result2 = re.match(r'^\d{3}\-\d{3,8}$','010 12345')
print(result2)
#切串
s1 = 'a b c'
print(s1.split(' ') )
s2 = re.spl... |
e4e4b3a7fb9cb386f925b10d779e3127400d3ca3 | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/battle_royale/scripts/client/battle_royale/gui/impl/lobby/tooltips/test_drive_info_tooltip_view.py | 5cbff65242aa6465fe2606d211df4ff831084c68 | [] | 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 | 2,204 | py | test_drive_info_tooltip_view.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: battle_royale/scripts/client/battle_royale/gui/impl/lobby/tooltips/test_drive_info_tooltip_view.py
from battle_royale.gui.impl.gen.view_models.views.lobby.tooltips.test_drive_info_tooltip_view_model import TestDriveInfoTooltipViewModel
from framew... |
a8245b01c18d3182bbe05cfc7f69691ff88d9ece | cdfa1fbbbbccc87771401125ad8460344118fe30 | /hassio-google-drive-backup/backup/file/__init__.py | 1f3f3f6dbe33eb65f89b7733325a06722c007db0 | [
"MIT"
] | permissive | sabeechen/hassio-google-drive-backup | f97409292f8fe02a8b7078e42b7da242b45fe8a5 | f55390bf2e26e3b28d6a9ce4587e119d58db4b73 | refs/heads/master | 2023-09-04T20:39:11.846549 | 2023-07-16T17:47:47 | 2023-07-16T17:47:47 | 176,825,504 | 2,581 | 188 | MIT | 2023-09-13T06:56:18 | 2019-03-20T22:16:20 | Python | UTF-8 | Python | false | false | 63 | py | __init__.py | from .jsonfilesaver import JsonFileSaver
from .file import File |
bfd35649383c8ea6c76d8b70a23bf505d0f18165 | 47ef6997d03f4d5c921c83cc09aef1dfc6828e2c | /zeus/networks/pytorch/customs/deepfm.py | 85f83c1b61776bb1646a2c369a7b2c8fbd5c67a0 | [
"MIT"
] | permissive | huawei-noah/xingtian | 620c9f245183d636e0a65659fd99a984397ecbd4 | e4ef3a1c92d19d1d08c3ef0e2156b6fecefdbe04 | refs/heads/master | 2023-09-03T01:10:21.768245 | 2022-03-21T03:39:39 | 2022-03-21T03:39:39 | 287,759,621 | 308 | 91 | MIT | 2023-09-12T11:33:22 | 2020-08-15T14:13:06 | Python | UTF-8 | Python | false | false | 3,255 | py | deepfm.py | # -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the ... |
5750121112f0b45a9fd94899970e7194350751da | 77f85a550c28212071067cb122ebfd93eb705190 | /pde/pdes/kuramoto_sivashinsky.py | 024de1c2a29002cda340472a928726044dfe4036 | [
"MIT"
] | permissive | zwicker-group/py-pde | baf215a733508fe86093ea9e818228bbb3b34c58 | d9c931a8361eaf27bc3766daba26edc11756b5f5 | refs/heads/master | 2023-08-31T06:36:34.514617 | 2023-08-30T18:15:44 | 2023-08-30T18:15:44 | 242,093,001 | 327 | 45 | MIT | 2023-08-31T13:16:24 | 2020-02-21T08:42:23 | Python | UTF-8 | Python | false | false | 5,098 | py | kuramoto_sivashinsky.py | """
The Kardar–Parisi–Zhang (KPZ) equation describing the evolution of an interface
.. codeauthor:: David Zwicker <david.zwicker@ds.mpg.de>
"""
from typing import Callable, Optional
import numba as nb
import numpy as np
from ..fields import ScalarField
from ..grids.boundaries.axes import BoundariesData
from ..tool... |
e4b43c7667ae829dddd6eac4d84f8e235a7a20fb | 3dbefd3d97d6a6fe1c60b9639cb92ce070ff772f | /Source/StockProcessing/Filter_Stock_CHN_1.py | 43e5b8ba233a55ed708fbe925135038c96471173 | [
"MIT"
] | permissive | doncat99/StockRecommendSystem | 69b3bcf7edfe4c85894e09fd22bc173c0e349cda | 306534fc0705ff0037f45115de3bffa835c42f71 | refs/heads/master | 2022-01-02T08:58:29.125564 | 2021-12-30T05:25:22 | 2021-12-30T05:25:22 | 93,833,946 | 148 | 68 | null | null | null | null | UTF-8 | Python | false | false | 14,986 | py | Filter_Stock_CHN_1.py | import sys, os, time, datetime, warnings, configparser
import pandas as pd
import numpy as np
import talib
import concurrent.futures
import tushare as ts
import matplotlib.pyplot as plt
from stockstats import StockDataFrame as Sdf
from tqdm import tqdm
cur_path = os.path.dirname(os.path.abspath(__file__))
for _ in ran... |
109376ad6ad0af92719313f3c033d9c8fa8941e7 | 40dd8330e5f78c4348bbddc2c5acfd59d793dd51 | /configs/swin/swin-large-patch4-window7-in22k-pre_upernet_8xb2-160k_ade20k-512x512.py | c93cdfeaaeb91a3aaefe8019afffd0d380b8f761 | [
"Apache-2.0"
] | permissive | open-mmlab/mmsegmentation | 0d12092312e2c465ede1fd7dd9847b6f2b37049c | 30a3f94f3e2916e27fa38c67cc3b8c69c1893fe8 | refs/heads/main | 2023-09-04T10:54:52.299711 | 2023-07-24T07:28:21 | 2023-07-24T07:28:21 | 272,133,018 | 6,534 | 2,375 | Apache-2.0 | 2023-09-14T01:22:32 | 2020-06-14T04:32:33 | Python | UTF-8 | Python | false | false | 625 | py | swin-large-patch4-window7-in22k-pre_upernet_8xb2-160k_ade20k-512x512.py | _base_ = [
'swin-tiny-patch4-window7-in1k-pre_upernet_8xb2-160k_'
'ade20k-512x512.py'
]
checkpoint_file = 'https://download.openmmlab.com/mmsegmentation/v0.5/pretrain/swin/swin_large_patch4_window7_224_22k_20220412-aeecf2aa.pth' # noqa
model = dict(
backbone=dict(
init_cfg=dict(type='Pretrained', c... |
177b109e41870508aee009203a945236f8aff798 | 4f93f5a27b6c872903b9acf8d20fb736716a26df | /clair3/model.py | 04193041d6ee2affdbd54827f998a8b02104ad5b | [
"BSD-3-Clause"
] | permissive | HKU-BAL/Clair3 | cf388ae3d0b0332eb8df125fb1e1a97120a90ed1 | 181f55d7a741855597d083baffc4551949d2837e | refs/heads/main | 2023-07-28T05:34:32.917498 | 2023-07-20T02:58:19 | 2023-07-20T02:58:19 | 352,969,947 | 162 | 18 | null | 2023-06-01T14:15:31 | 2021-03-30T11:02:58 | Python | UTF-8 | Python | false | false | 18,212 | py | model.py | import warnings
with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=DeprecationWarning)
warnings.filterwarnings("ignore", category=FutureWarning)
from tensorflow.python.util import deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False
import tensorflow as tf
import loggi... |
05c20dbc680700f41b4341b19e4ed1c7124b2725 | 9d3ac4621657b395396a133c85b3161cb2f2c4ea | /examples/single_attack_pytorch_resnet18.py | 77ca6fcc802f90ed0613183c27e0b8477bb69d78 | [
"MIT"
] | permissive | bethgelab/foolbox | e34ff931a855dab74c9bf99a60a9b469524c5de8 | 12abe74e2f1ec79edb759454458ad8dd9ce84939 | refs/heads/master | 2023-09-06T06:25:42.730283 | 2022-05-25T09:55:55 | 2022-05-25T09:55:55 | 94,331,757 | 2,684 | 528 | MIT | 2023-03-25T01:35:14 | 2017-06-14T13:05:48 | Python | UTF-8 | Python | false | false | 2,459 | py | single_attack_pytorch_resnet18.py | #!/usr/bin/env python3
"""
A simple example that demonstrates how to run a single attack against
a PyTorch ResNet-18 model for different epsilons and how to then report
the robust accuracy.
"""
import torchvision.models as models
import eagerpy as ep
from foolbox import PyTorchModel, accuracy, samples
from foolbox.atta... |
7e18d1ca067fe9b41588825e1a52e6801508bda5 | 048c5e3f4f0b7a0d1d63714b0b58be4e297167c1 | /dbus_next/auth.py | db91c86e47e2e74aa6b2d721ac631ef07bd587a8 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | altdesktop/python-dbus-next | 17b3ceec366ba20b9377ad3b5c88cb7175ac017d | ab566e16a71bfc9d7e0d29676aa459ec060e72c5 | refs/heads/master | 2023-09-02T15:47:29.360808 | 2022-09-11T20:22:45 | 2022-09-11T20:22:45 | 181,604,924 | 156 | 55 | MIT | 2023-07-04T08:53:10 | 2019-04-16T03:05:45 | Python | UTF-8 | Python | false | false | 3,598 | py | auth.py | from .errors import AuthError
import enum
import os
# The auth interface here is unstable. I would like to eventually open this up
# for people to define their own custom authentication protocols, but I'm not
# familiar with what's needed for that exactly. To work with any message bus
# implementation would require ab... |
46d938131520a63358f8bd257b454aa39837bacc | 01857ef455ea60eccaf03b5a9059ec83e9803c2e | /nicegui/functions/refreshable.py | c5625134c25fba8d998c56e258adb56fc089979e | [
"MIT"
] | permissive | zauberzeug/nicegui | f08312cc1f393deca79e0e84a2506d3a35efff16 | c61b1315f29d51e26cc1168207f5616b302f8df0 | refs/heads/main | 2023-08-18T18:09:30.937322 | 2023-08-18T15:04:00 | 2023-08-18T15:04:00 | 365,250,183 | 5,128 | 271 | MIT | 2023-09-14T01:50:56 | 2021-05-07T13:55:05 | Python | UTF-8 | Python | false | false | 3,731 | py | refreshable.py | from dataclasses import dataclass
from typing import Any, Awaitable, Callable, Dict, List, Tuple, Union
from typing_extensions import Self
from .. import background_tasks, globals
from ..element import Element
from ..helpers import KWONLY_SLOTS, is_coroutine_function
@dataclass(**KWONLY_SLOTS)
class RefreshableTarg... |
6176b0de4042a7e82a72f3eb05da231a660aceac | f2034c76a11ce6296131d2bab89a5dae7d59edfe | /python/nano/test/automl/pytorch/test_searcher.py | d67d023343294e78320390c4da1e484639394afc | [
"Apache-2.0"
] | permissive | intel-analytics/BigDL | e22cd917eecc7340bda3df4356acba0623a62ef6 | 4ffa012a426e0d16ed13b707b03d8787ddca6aa4 | refs/heads/main | 2023-08-22T06:31:37.923091 | 2023-08-22T02:58:42 | 2023-08-22T02:58:42 | 66,823,715 | 4,913 | 1,327 | Apache-2.0 | 2023-09-14T10:41:50 | 2016-08-29T07:59:50 | Jupyter Notebook | UTF-8 | Python | false | false | 4,036 | py | test_searcher.py | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
81a41ca47b2123c34ca3eaacbea00b03299caacc | 2212a32833776a5d5d2164d8efd11bd18bd3f768 | /tf_agents/utils/test_utils.py | f42c1ff696b6624f7943effa00e96013bd6652eb | [
"Apache-2.0"
] | permissive | tensorflow/agents | f39805fb98ef9af712dcaff3ba49e1ac6d42804b | eca1093d3a047e538f17f6ab92ab4d8144284f23 | refs/heads/master | 2023-08-14T04:56:30.774797 | 2023-08-02T17:43:44 | 2023-08-02T17:44:09 | 157,936,206 | 2,755 | 848 | Apache-2.0 | 2023-07-26T02:35:32 | 2018-11-17T00:29:12 | Python | UTF-8 | Python | false | false | 2,691 | py | test_utils.py | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
01d7e38cd4ea666f82fb42afbf9ab02044782d9f | 8d6f97d71518ea4e32bbb4c332f55aac1fbfefb9 | /pyvex/expr.py | ff2f07e63e1b73467fdf0202889162dd0310b14b | [
"BSD-2-Clause"
] | permissive | angr/pyvex | acb80c39d42622e930a1fa0cb774a95f1452467a | 40f151e54e75b5ad57856675b4c4c70247d0cd9c | refs/heads/master | 2023-08-28T18:41:00.203041 | 2023-08-25T19:40:56 | 2023-08-25T19:40:56 | 13,027,352 | 304 | 130 | BSD-2-Clause | 2023-09-11T22:08:43 | 2013-09-23T05:02:20 | Python | UTF-8 | Python | false | false | 25,516 | py | expr.py | import logging
import re
from typing import List, Optional
from archinfo import RegisterOffset, TmpVar
from .const import U8, U16, U32, U64, IRConst, get_type_size
from .enums import IRCallee, IRRegArray, VEXObject, get_enum_from_int, get_int_from_enum
from .errors import PyVEXError
from .native import ffi, pvc
log ... |
848824b8494eaa2112380226266ae0482512fb82 | db12b990924703cd74748d8585cd9c11fafa6746 | /h2o-py/tests/testdir_algos/glm/pyunit_link_functions_tweedie_basic_glm.py | 3e07337b50dabf4beeb426e54c51f276c6c6511f | [
"Apache-2.0"
] | permissive | h2oai/h2o-3 | 919019a8f297eec676011a9cfd2cc2d97891ce14 | d817ab90c8c47f6787604a0b9639b66234158228 | refs/heads/master | 2023-08-17T18:50:17.732191 | 2023-08-17T16:44:42 | 2023-08-17T16:44:42 | 17,371,412 | 6,872 | 2,345 | Apache-2.0 | 2023-09-14T18:05:40 | 2014-03-03T16:08:07 | Jupyter Notebook | UTF-8 | Python | false | false | 1,268 | py | pyunit_link_functions_tweedie_basic_glm.py | from past.utils import old_div
import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.glm import H2OGeneralizedLinearEstimator
def link_functions_tweedie_basic():
print("Read in prostate data.")
hdf = h2o.upload_file(pyunit_utils.locate("smalldata/prostate/prostate... |
73a256ac3161626940fbc1cb11f396e3c77a9aa6 | 8f2c55a2530c3e59dab5907c0044c618b88dd09b | /third_party/cython_json.py | ed112b888492297d4cd7ec15956f7194391ffe24 | [
"Apache-2.0",
"EPL-1.0"
] | permissive | fabioz/PyDev.Debugger | 5a9c6d4c09be85a0e2d9fb93567fd65faf04c81d | 26864816cbfcf002a99913bcc31ebef48042a4ac | refs/heads/main | 2023-08-18T01:08:34.323363 | 2023-04-15T11:15:47 | 2023-04-15T11:15:47 | 21,870,144 | 363 | 126 | Apache-2.0 | 2023-07-30T23:03:31 | 2014-07-15T18:01:12 | Python | UTF-8 | Python | false | false | 9,498 | py | cython_json.py | import Cython
from Cython.Compiler import Nodes
from Cython.Compiler.Errors import CompileError
import sys
import json
import traceback
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Note: Cython has some recursive structures in some classes, so, parsing only what we really
#... |
725085615fdfec15df6aa0bdb3e087c029ce992a | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/brick-wall.py | 958ee11d6a02a9d3af3f7b8f3abeb80f891027e1 | [
"MIT"
] | permissive | kamyu104/LeetCode-Solutions | f54822059405ef4df737d2e9898b024f051fd525 | 4dc4e6642dc92f1983c13564cc0fd99917cab358 | refs/heads/master | 2023-09-02T13:48:26.830566 | 2023-08-28T10:11:12 | 2023-08-28T10:11:12 | 152,631,182 | 4,549 | 1,651 | MIT | 2023-05-31T06:10:33 | 2018-10-11T17:38:35 | C++ | UTF-8 | Python | false | false | 579 | py | brick-wall.py | # Time: O(n), n is the total number of the bricks
# Space: O(m), m is the total number different widths
import collections
class Solution(object):
def leastBricks(self, wall):
"""
:type wall: List[List[int]]
:rtype: int
"""
widths = collections.defaultdict(int)
re... |
ebba924d5585ea2a6d869331890fc939422bdabc | 14990fe6493928adb17f401895a25a66391f2cef | /customtkinter/windows/widgets/appearance_mode/appearance_mode_base_class.py | b7f757ab3557f49dbd3c96e031d8cf61baca7e37 | [
"MIT"
] | permissive | TomSchimansky/CustomTkinter | 3e9db4d9b7f2f8b2f8dda4c8a5b665b813e5d334 | d719950f80eb2768db96bd4cc627523e99603b1b | refs/heads/master | 2023-08-27T10:13:43.672181 | 2023-07-27T12:40:19 | 2023-07-27T12:40:19 | 344,554,014 | 8,506 | 1,069 | MIT | 2023-09-11T11:23:31 | 2021-03-04T17:24:00 | Python | UTF-8 | Python | false | false | 2,602 | py | appearance_mode_base_class.py | from typing import Union, Tuple, List
from .appearance_mode_tracker import AppearanceModeTracker
class CTkAppearanceModeBaseClass:
"""
Super-class that manages the appearance mode. Methods:
- destroy() must be called when sub-class is destroyed
- _set_appearance_mode() abstractmethod, gets called wh... |
a0ae92f4b4ab4d09860affacfd9b345ff3a7909f | 7a9beade653ebec41c8b6751057f97b199daddd6 | /gputools/utils/histogram.py | 113ee06a4b2521caa8f987daaecc81852f2c5583 | [
"BSD-3-Clause"
] | permissive | maweigert/gputools | 4939bdbf0ecd4891f79827203b565fcf4b2b0ecf | 4ca3b013879c18cf8d4c8b1d91b5681a3287616c | refs/heads/master | 2023-01-24T09:24:03.924781 | 2021-12-03T17:18:20 | 2021-12-03T17:18:20 | 39,986,100 | 101 | 18 | BSD-3-Clause | 2021-12-02T23:31:10 | 2015-07-31T04:11:05 | Python | UTF-8 | Python | false | false | 1,210 | py | histogram.py | import numpy as np
from gputools.core.ocltypes import OCLArray, OCLProgram, get_device
from gputools.core.ocltypes import cl_buffer_datatype_dict
from ._abspath import abspath
def histogram(x, n_bins = 256):
if not x.dtype.type in cl_buffer_datatype_dict:
raise ValueError("dtype %s not supported" % x.dtyp... |
bd1a53ce53bb48020d61646c35399d776364c0ef | 0ea52d558d0d6720f2278d406dd50431e5141ba5 | /aiohttp_security/session_identity.py | 3936d076c0c7abcd744520c7b02403dba360c4af | [
"Apache-2.0"
] | permissive | aio-libs/aiohttp-security | 8a87108ded6b85f378274d05abe22d73f9e4361d | 2648daddff3375fc84a0c357468c29aaa399dda6 | refs/heads/master | 2023-08-09T16:04:39.680128 | 2023-08-02T11:35:58 | 2023-08-02T11:35:58 | 38,769,230 | 222 | 80 | Apache-2.0 | 2023-09-14T11:22:56 | 2015-07-08T17:29:47 | Python | UTF-8 | Python | false | false | 1,319 | py | session_identity.py | """Identity policy for storing info into aiohttp_session session.
aiohttp_session.setup() should be called on application initialization
to configure aiohttp_session properly.
"""
from typing import Optional
from aiohttp import web
try:
from aiohttp_session import get_session
HAS_AIOHTTP_SESSION = True
excep... |
90e7ee77a3c807cec83f6957d2fc2e9ef4dbfa2c | 2be0425abb1b3fffd1fe5522550d6e2eed0b1c21 | /PAT (Advanced Level) Practice/1119_Pre- and Post-order Traversals (30).py | 8bafbe2163ad184cf43bbfef1269b4b260ec6487 | [] | no_license | tiny656/PAT | 184fe85faa01493057e74ec415b627a64a756e8a | 1fd038bb96401c048a9496d890a2c172c04a88bf | refs/heads/master | 2023-05-25T04:39:04.591197 | 2023-05-15T13:17:50 | 2023-05-15T13:17:50 | 6,883,938 | 270 | 76 | null | 2016-01-04T01:02:55 | 2012-11-27T13:40:03 | C++ | UTF-8 | Python | false | false | 1,438 | py | 1119_Pre- and Post-order Traversals (30).py | #coding: utf-8
# 树的先序和后序构造中序,遍历分左右子树可能存在多解
def build(preLeft, preRight, postLeft, postRight):
global max_find_count
root = preOrder[preLeft]
preLeft += 1
postRight -= 1
size = preRight - preLeft + 1
pos, find_count = -1, 0
for i in xrange(size+1):
preLeftList = preOrder[preLeft : ... |
d6a1991c210a339db5d58bbe427be94d15a0eec7 | 231a6e79e408ec2851a558f0864a67f62028fb65 | /control/ctrlutil.py | aeb0c30f1ce3724f7865d464c05558c8fdc757cd | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | python-control/python-control | d917bc7d1ba61d3182d41bf98debcacad0f7f5ff | 42c6fb1498aa9f5d542113da288c7c4e3547c117 | refs/heads/main | 2023-08-24T21:31:48.990585 | 2023-07-13T13:48:08 | 2023-07-13T13:48:08 | 22,791,752 | 1,447 | 441 | BSD-3-Clause | 2023-09-10T22:24:38 | 2014-08-09T17:48:36 | Python | UTF-8 | Python | false | false | 4,694 | py | ctrlutil.py | # ctrlutil.py - control system utility functions
#
# Author: Richard M. Murray
# Date: 24 May 09
#
# These are some basic utility functions that are used in the control
# systems library and that didn't naturally fit anyplace else.
#
# Copyright (c) 2009 by California Institute of Technology
# All rights reserved.
#
# ... |
e5989051fe1fea7b5c16146cb6cbe59df6c4515a | 3816f1ba0ff7eca9cc324f4ad5ac8c5b54028eeb | /fuzz/scripts/send_testcase.py | 1c1a214c3ec23ddbd0b62ff19cb57f03248d1d7b | [
"BSD-3-Clause"
] | permissive | EIPStackGroup/OpENer | d70064ad8d99406afab648a5985aacf3f3ef38fe | fc0179e9969a85a20fb907e3043062755b7a38d2 | refs/heads/master | 2023-08-26T10:09:49.085224 | 2022-03-08T21:05:02 | 2023-07-11T16:57:43 | 12,129,915 | 573 | 263 | NOASSERTION | 2023-09-03T21:47:47 | 2013-08-15T08:22:41 | C | UTF-8 | Python | false | false | 1,269 | py | send_testcase.py | import sys
import socket
import struct
if len(sys.argv) != 3:
print("python {} IP TESTCASE_PATH".format(sys.argv[0]))
sys.exit(1)
HOST_IP = sys.argv[1]
HOST_PORT = 44818
TESTCASE_PATH = sys.argv[2]
ENIP_SESSION_CONTEXT = b"\x92\x83J\x0b=\x9e\x0cW"
ENIP_INIT_SESSION_PACKET = b"e\x00\x04\x00\x00\x00\x00\x00\x00\x00\... |
ef33e254eeb87a00716ba171b0f0353ca2f55238 | 6c37d1d2437a08e43b13d621d4a8da4da7135b3a | /yt_dlp/networking/__init__.py | 5e8876484403af15345afd7812eb7d3d23b8ebd8 | [
"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 | 238 | py | __init__.py | # flake8: noqa: 401
from .common import (
HEADRequest,
PUTRequest,
Request,
RequestDirector,
RequestHandler,
Response,
)
# isort: split
# TODO: all request handlers should be safely imported
from . import _urllib
|
c88b564fb16816edee028b9feb51f9f45ed04a6d | 4292b0c439255ec73529dcb29a3a7c8a3167600a | /records/08-15/test.py | fa746c225f4137714ea6461ba1713cd7be094392 | [
"Apache-2.0"
] | permissive | AaronYang2333/CSCI_570 | 478bddfaf20ede5e0b982e9dce0070d7009eb425 | 03e34ce5ff192fc94612bc3afb51dcab3e854462 | refs/heads/master | 2021-06-10T18:40:12.204272 | 2021-06-05T08:52:12 | 2021-06-05T08:52:12 | 148,282,810 | 115 | 37 | null | null | null | null | UTF-8 | Python | false | false | 382 | py | test.py | __author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '8/15/2020 7:42 PM'
class Solution:
def minOperations(self, n: int) -> int:
avg = n
data = [2 * i + 1 for i in range(n)]
res = sum(list(map(lambda val: abs(val - avg), data)))
return res / 2
if __name__ == '__... |
e1d5ec752714fd7969fc52483b8736649c1a0ac4 | 2337351b228818e41be3002bd38f68f77c2aa074 | /core/topology/goal/level.py | a099008f5abbebe8f0243f9916cf85b9dc12fb93 | [
"BSD-3-Clause"
] | permissive | nocproject/noc | 57d40c680a1499374463e472434f9595ed6d1374 | 6e6d71574e9b9d822bec572cc629a0ea73604a59 | refs/heads/master | 2023-08-31T01:11:33.544573 | 2023-08-30T17:31:11 | 2023-08-30T17:31:11 | 107,815,776 | 105 | 33 | BSD-3-Clause | 2023-07-31T07:57:45 | 2017-10-21T21:04:33 | Python | UTF-8 | Python | false | false | 1,371 | py | level.py | # ----------------------------------------------------------------------
# ManagedObjectLevel goal
# ----------------------------------------------------------------------
# Copyright (C) 2007-2020 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Thir... |
5b887ce649fb596a53f87113890b9255944ff9e5 | 95d304114b6c5e47c564c95718e09030d6584c7e | /winsandbox/folder_mapper.py | 7eb3963ce025ba08b8823b7848f4847dfeb99021 | [
"MIT"
] | permissive | karkason/pywinsandbox | d05ad0092aa709b3d6ad59124b9891d5edd53d13 | 85d82fdd3054d844268c012d25b9862b9c4f949f | refs/heads/master | 2022-10-01T05:31:19.434493 | 2022-09-01T08:36:32 | 2022-09-01T08:36:32 | 248,972,006 | 109 | 16 | MIT | 2022-09-01T08:36:33 | 2020-03-21T12:31:40 | Python | UTF-8 | Python | false | false | 867 | py | folder_mapper.py | import sys
import pathlib
import site
class FolderMapper:
"""
Generic Folder Mapper. Enables to map a folder to the new sandbox.
"""
def __init__(self, folder_path, read_only=True):
self._folder_path = pathlib.Path(folder_path)
self._read_only = read_only
def path(self):
... |
1366e6708266e184ddf86fe22b917c8954241b7b | e7aad0b1c5d8907dbb52000c482c396d1b801751 | /test/functional/tests/fault_injection/test_primary_device_error.py | 069e15d1cc2c5565af1506bf2f7900ac1c64521a | [
"BSD-3-Clause",
"MIT"
] | permissive | Open-CAS/open-cas-linux | c57d60f860702d7bc380c5d85cf502c0bf5e1bae | 93334b4675afee8815f8ea12bb7297e0fd2a4195 | refs/heads/master | 2023-07-12T10:32:26.921455 | 2023-07-03T12:24:47 | 2023-07-03T12:24:47 | 178,356,155 | 202 | 84 | BSD-3-Clause | 2023-07-03T12:24:49 | 2019-03-29T07:37:15 | Python | UTF-8 | Python | false | false | 5,141 | py | test_primary_device_error.py | #
# Copyright(c) 2019-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
import pytest
from test_tools.fio.fio import Fio
from test_tools.fio.fio_param import ReadWrite, IoEngine, ErrorFilter, VerifyMethod
from test_tools.device_mapper import ErrorDevice, DmTable
from core.test_run import TestRun
from a... |
ce2cb4698ad5cb09bfea8384082d8852827ff9b4 | 2b8f195b10e8e12db1252318922668cb432ea8ab | /mvlearn/model_selection/__init__.py | 01146950652d21f8133f48b3f7ab5ea5a326f923 | [
"MIT"
] | permissive | mvlearn/mvlearn | 70fba0fc52e1467101adadf46cf61e7076838c2f | 003dccea563926fca5d957f5bbf39c1494acfe94 | refs/heads/main | 2023-04-18T15:47:53.716354 | 2022-04-05T22:17:18 | 2022-04-05T22:17:18 | 206,838,300 | 136 | 17 | MIT | 2023-03-08T17:37:59 | 2019-09-06T16:56:51 | Python | UTF-8 | Python | false | false | 127 | py | __init__.py | from .split import train_test_split
from .validation import cross_validate
__all__ = ["train_test_split", "cross_validate", ]
|
0c72cecddc5bf0ca89189730f2c0c4bdd7b8a8de | 9ca7f9130f9cbe3737b29143c506a43bc731fe36 | /src/tests/lib/curses_api.py | ce88cc22cd90c4c9eb9613e7c651b8d4a8ea459d | [
"MIT"
] | permissive | facebook/PathPicker | 06b0763759d148834a6274903a456088bd3d5e3f | cc032b2b2fa2fa8ab2fedc93766b2bf2303781d2 | refs/heads/main | 2023-07-30T22:56:26.708321 | 2022-07-03T18:09:54 | 2022-07-03T18:09:54 | 34,887,588 | 5,445 | 401 | MIT | 2023-09-01T11:43:13 | 2015-05-01T03:05:54 | Python | UTF-8 | Python | false | false | 1,307 | py | curses_api.py | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from pathpicker.curses_api import CursesApiBase
class CursesForTest(CursesApiBase):
"""The dependency-injected curses wrapper which simp... |
d2dc2b14603cff9e192d6b1d865d3beaba2870da | af7d77930fed903a613fd3f70c65ef037798a985 | /tests/test_penalties.py | a67de838684d77cb5b3b008269d75702bed5add5 | [
"BSD-3-Clause"
] | permissive | openopt/copt | f9fae01b6764bd568151ad6470fb8ca616bc64a3 | 5423537e41fd4b566910d7bdd3abca9638111bb5 | refs/heads/master | 2023-04-06T05:35:57.234868 | 2023-03-26T07:36:30 | 2023-03-26T07:36:30 | 46,262,908 | 141 | 32 | NOASSERTION | 2023-03-26T07:35:28 | 2015-11-16T08:53:00 | Python | UTF-8 | Python | false | false | 4,156 | py | test_penalties.py | import numpy as np
import copt as cp
import copt.constraint
import copt.penalty
from copt import tv_prox
from numpy import testing
import pytest
proximal_penalties = [
copt.penalty.L1Norm(1.0),
copt.penalty.GroupL1(1.0, np.array_split(np.arange(16), 5)),
copt.penalty.TraceNorm(1.0, (4, 4)),
copt.constr... |
17ab9f50dea7a0d97f8011d1ae64bfd251ea928d | 704976ea552111c6a5af9cd7cb62b9d9abaf3996 | /pypy/module/cpyext/test/test_typeobject.py | 045ee28c4fcbda518cc96b09207e84d2ff226171 | [
"BSD-3-Clause"
] | permissive | mesalock-linux/mesapy | 4f02c5819ce7f2f6e249d34840f1aa097577645d | ed546d59a21b36feb93e2309d5c6b75aa0ad95c9 | refs/heads/mesapy2.7 | 2023-08-16T21:33:02.239581 | 2019-08-13T10:29:43 | 2019-08-13T18:06:45 | 136,080,721 | 396 | 33 | NOASSERTION | 2020-04-01T03:05:18 | 2018-06-04T20:45:17 | Python | UTF-8 | Python | false | false | 66,086 | py | test_typeobject.py | import pytest
from pypy.interpreter import gateway
from rpython.rtyper.lltypesystem import rffi
from pypy.module.cpyext.test.test_cpyext import AppTestCpythonExtensionBase
from pypy.module.cpyext.test.test_api import BaseApiTest
from pypy.module.cpyext.api import generic_cpy_call
from pypy.module.cpyext.pyobject import... |
e9327ae6c226592477aedeac329293f57bc89afa | b74320ad439e37dfa48cd8db38dab3b7a20a36ff | /tests/pipelines/stable_diffusion/test_stable_diffusion_pix2pix_zero.py | c513fb1c0b33547d8274e1a50690963247541861 | [
"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 | 23,907 | py | test_stable_diffusion_pix2pix_zero.py | # coding=utf-8
# Copyright 2023 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
b023f77d7340b37c6f8c42a5ef95c5ae178e9547 | 0dddc0508138396c740901be4a0f9eebefb8fded | /ax/modelbridge/transforms/trial_as_task.py | b91f1857c5dfb88f7aa2f8d018b365a3513dc030 | [
"MIT"
] | permissive | facebook/Ax | 473beb143016f95f4ec381ed1bd95b32c1ca31f8 | 6443cee30cbf8cec290200a7420a3db08e4b5445 | refs/heads/main | 2023-09-01T09:29:13.684709 | 2023-08-31T21:49:30 | 2023-08-31T21:49:30 | 169,880,381 | 2,207 | 315 | MIT | 2023-09-14T21:26:51 | 2019-02-09T15:23:44 | Jupyter Notebook | UTF-8 | Python | false | false | 6,437 | py | trial_as_task.py | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Dict, List, Optional, TYPE_CHECKING, Union
import numpy as np
from ax.core.observation import Obs... |
cc00fb6afab40eb73cdd01ad972ec2bdaddd9bf0 | 8188f026dcfa3ca6c4e2d58e6c56d04d24e37a18 | /projectq/tests/_factoring_test.py | 541c1492c9ae531c547a6aa3ae64cfe566b039f4 | [
"Apache-2.0"
] | permissive | ProjectQ-Framework/ProjectQ | 2e342da0622d4b5d513c15504556e95d3d0e2aea | 67c660ca18725d23ab0b261a45e34873b6a58d03 | refs/heads/develop | 2023-09-04T02:18:25.581119 | 2023-03-09T16:03:57 | 2023-03-09T16:03:57 | 77,520,796 | 886 | 335 | Apache-2.0 | 2023-07-24T07:07:15 | 2016-12-28T09:31:53 | Python | UTF-8 | Python | false | false | 2,856 | py | _factoring_test.py | # Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
6dfb1c6695316b046a64403f905c23a337c2c0ce | af20739e34a39f0a0a99537ce047f502a3531ea5 | /jupyter_server/extension/serverextension.py | 6cd8dc14a30f8ac1f99258949a7c119e2d43af0a | [
"BSD-3-Clause"
] | permissive | jupyter-server/jupyter_server | 66cf0ac45804aa5dd6bf8dff7050db02f3696b92 | 93fde1ad9fece22607960184501f5c9c80cd3765 | refs/heads/main | 2023-09-04T03:44:41.696097 | 2023-08-31T08:20:36 | 2023-08-31T08:20:36 | 68,849,978 | 237 | 186 | BSD-3-Clause | 2023-09-09T02:42:25 | 2016-09-21T19:18:45 | Python | UTF-8 | Python | false | false | 12,932 | py | serverextension.py | """Utilities for installing extensions"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import logging
import os
import sys
from jupyter_core.application import JupyterApp
from jupyter_core.paths import ENV_CONFIG_PATH, SYSTEM_CONFIG_PATH, jupyter_config_dir
from ... |
6e9538540960fd66a1df961fca20a8e4328f294f | 769f6d88fd777459eb60eb1bbb0fba17cb20d963 | /Chapter07/12_scrape_job_stackoverflow.py | b9d35afbb9da1caf760491201d1cc3d2b5d9e8bd | [
"MIT"
] | permissive | PacktPublishing/Python-Web-Scraping-Cookbook | 141379d09abe2c7d8f408858a2eb44ff0fe3ef26 | 030eb974ba1437b2590b59d38f19fb697bbf9d4c | refs/heads/master | 2023-02-16T04:29:49.942243 | 2023-01-30T04:19:03 | 2023-01-30T04:19:03 | 120,744,571 | 115 | 105 | MIT | 2019-10-03T17:38:37 | 2018-02-08T10:08:48 | HTML | UTF-8 | Python | false | false | 493 | py | 12_scrape_job_stackoverflow.py | from bs4 import BeautifulSoup
import json
with open("spacex-job-listing.html", "r") as file:
content = file.read()
bs = BeautifulSoup(content, "lxml")
script_tag = bs.find("script", {"type": "application/ld+json"})
job_listing_contents = json.loads(script_tag.contents[0])
print(job_listing_contents)
stop_list =... |
16213c9802f90ab38a068b655ba98513fdc3f77d | 6a8bc7da3104726f894ae360fce6a43a54b30812 | /demo/blocks_inputs/run.py | b259312d8ecab627ab77007ddb964da528438921 | [
"Apache-2.0"
] | permissive | gradio-app/gradio | 0b6b29bb0029ad3b8fc1b143f111b1230b29d23a | e4e7a4319924aaf51dcb18d07d0c9953d4011074 | refs/heads/main | 2023-09-01T10:56:50.822550 | 2023-09-01T00:28:01 | 2023-09-01T00:28:01 | 162,405,963 | 21,224 | 1,537 | Apache-2.0 | 2023-09-14T21:42:00 | 2018-12-19T08:24:04 | Python | UTF-8 | Python | false | false | 982 | py | run.py | import gradio as gr
import os
def combine(a, b):
return a + " " + b
def mirror(x):
return x
with gr.Blocks() as demo:
txt = gr.Textbox(label="Input", lines=2)
txt_2 = gr.Textbox(label="Input 2")
txt_3 = gr.Textbox(value="", label="Output")
btn = gr.Button(value="Submit")
btn.click(com... |
9609019bf359e954e410463aa260a736372424ed | e876a1e237ba2c7602191df4618ea5d3f2d581ee | /tests/middleware/test_errors.py | 392c2ba16a6d8074314aa4267c6f4071047b1366 | [
"BSD-3-Clause"
] | permissive | encode/starlette | f10ae42d3065ac04aeca504c4ac1c968919b33c4 | a8b8856ce393a82ab4a714131085dbc4d658e34d | refs/heads/master | 2023-08-17T02:18:09.168263 | 2023-07-24T15:46:24 | 2023-07-24T15:46:24 | 138,597,372 | 8,951 | 1,072 | BSD-3-Clause | 2023-09-13T11:50:46 | 2018-06-25T13:16:21 | Python | UTF-8 | Python | false | false | 3,233 | py | test_errors.py | import pytest
from starlette.applications import Starlette
from starlette.background import BackgroundTask
from starlette.middleware.errors import ServerErrorMiddleware
from starlette.responses import JSONResponse, Response
from starlette.routing import Route
def test_handler(test_client_factory):
async def app(... |
daf893d1c996ea0a0c2ab2276d64ee42d036a167 | f487532281c1c6a36a5c62a29744d8323584891b | /sdk/python/pulumi_azure/signalr/shared_private_link_resource.py | 48ec7abef8737deb3351c63c473ae239daac59fb | [
"MPL-2.0",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure | a8f8f21c46c802aecf1397c737662ddcc438a2db | c16962e5c4f5810efec2806b8bb49d0da960d1ea | refs/heads/master | 2023-08-25T00:17:05.290397 | 2023-08-24T06:11:55 | 2023-08-24T06:11:55 | 103,183,737 | 129 | 57 | Apache-2.0 | 2023-09-13T05:44:10 | 2017-09-11T20:19:15 | Java | UTF-8 | Python | false | false | 23,299 | py | shared_private_link_resource.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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
fr... |
32fce36b73bad818d58f641e0826e9adfad5b0f4 | 113977ddcc6be6e8cb71e3c594dc373918202b8c | /deezer_downloader/web/music_backend.py | c354bde9f62109afdde760ba99de63af9be383a4 | [
"MIT"
] | permissive | kmille/deezer-downloader | 33030ee0903a869b30c5951442eef36e7d9f5dc5 | 4c4674a6532be7676650c8f715f7596bd991c62e | refs/heads/master | 2023-08-08T19:09:44.982478 | 2023-08-01T10:37:04 | 2023-08-01T10:37:04 | 154,390,777 | 490 | 88 | MIT | 2023-08-01T10:37:06 | 2018-10-23T20:14:27 | Python | UTF-8 | Python | false | false | 11,048 | py | music_backend.py | import time
import os.path
from os.path import basename
import mpd
import platform
from zipfile import ZipFile, ZIP_DEFLATED
from deezer_downloader.configuration import config
from deezer_downloader.youtubedl import youtubedl_download
from deezer_downloader.spotify import get_songs_from_spotify_website
from deezer_dow... |
41cfee23b53d7a9690f9d05217fa96e6d3f3ef5d | a63d907ad63ba6705420a6fb2788196d1bd3763c | /src/api/dataflow/stream/cluster_config/util/ScheduleHandler.py | 0d7f2c01dc71a673ce15c0fa6173d81fc1c06c4b | [
"MIT"
] | permissive | Tencent/bk-base | a38461072811667dc2880a13a5232004fe771a4b | 6d483b4df67739b26cc8ecaa56c1d76ab46bd7a2 | refs/heads/master | 2022-07-30T04:24:53.370661 | 2022-04-02T10:30:55 | 2022-04-02T10:30:55 | 381,257,882 | 101 | 51 | NOASSERTION | 2022-04-02T10:30:56 | 2021-06-29T06:10:01 | Python | UTF-8 | Python | false | false | 3,451 | py | ScheduleHandler.py | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-BASE 蓝鲸基础平台 is licensed under the MIT License.
License for BK-BASE 蓝鲸基础平台:
------------------------------------------... |
ae2864c8512f013f458ade69e245176d91b2ce31 | 002d925a46fef6867c7092935a5a4113a11cf0c5 | /care/facility/migrations_old/0034_facilitypatientstatshistory.py | 74e4c7b66ec2d72cf8ef9565c2160d7f272cbb5c | [
"MIT"
] | permissive | coronasafe/care | ba74c06c6486e8cd3c11e0f8b3d948e99d304746 | c000eea7f1c79a37b0fa53eba09696cd95122202 | refs/heads/master | 2023-08-31T12:52:08.181541 | 2023-08-29T13:43:33 | 2023-08-29T13:43:33 | 247,995,671 | 216 | 218 | MIT | 2023-09-13T14:52:59 | 2020-03-17T14:48:11 | Python | UTF-8 | Python | false | false | 1,613 | py | 0034_facilitypatientstatshistory.py | # Generated by Django 2.2.11 on 2020-03-27 18:39
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("facility", "0033_ambulance_service_charge"),
]
operations = [
migrations.CreateModel(
name="Fac... |
10676bac24972cc1f0733baa36a526ae0a99324c | ea57d267ab31480d8d731b2c095e9da9ad989133 | /aea/aea.py | 7ea67601f8ebcd03677789c84189d214166c7ee5 | [
"Apache-2.0"
] | permissive | fetchai/agents-aea | 6d034f1db6f3beacf31dac2f5a1baaa60c8edb7d | bec49adaeba661d8d0f03ac9935dc89f39d95a0d | refs/heads/main | 2023-08-08T23:19:06.276643 | 2023-02-04T10:46:39 | 2023-02-04T10:46:39 | 203,558,879 | 192 | 58 | Apache-2.0 | 2023-07-19T04:45:26 | 2019-08-21T10:12:47 | Python | UTF-8 | Python | false | false | 18,133 | py | aea.py | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2023 Fetch.AI Limited
#
# 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 ... |
360d0b680c596f10522af390cd51938ba047968e | 51771bc8bd5a7717fdc5916b3367444cebec09f1 | /examples/testBandit.py | a6f9860d94e7d5ce429b1a521e7fad502dbdacb2 | [] | no_license | intohole/moodstyle | 951c70df2c2f5c038a58535ee941853a038a42d7 | 1d06fc565c0df4bf07196854f3efb94bbefd1bfb | refs/heads/master | 2021-01-18T22:43:23.002705 | 2017-12-22T09:36:18 | 2017-12-22T09:36:18 | 12,214,343 | 249 | 27 | null | 2017-11-28T12:31:00 | 2013-08-19T10:56:55 | Python | UTF-8 | Python | false | false | 500 | py | testBandit.py | #coding=utf-8
from moodstyle.alg import Bandit
import random
N = 100
# 随机生成N个概率
p = [random.random() for i in range(N)]
# 0.1 进行explor
greedy = Bandit.Greedy(0.05,N)
# 重复实验次数
TIMES = 100000
COUNT = 0
for _ in range(TIMES):
index = greedy.getIndex()
prop = random.random()
if prop <= p[in... |
6e4db4c7da5756edf6ef8eec1303a660b1d26569 | 9cb4f0813068fe326ef15f05cd983578f8ae8e55 | /src/ruptures/__init__.py | 8a2ecbfa11fb1bf2b6d9a15d0b8541545598740a | [
"BSD-2-Clause"
] | permissive | deepcharles/ruptures | 9a3619e6d3bf147a77e6b5029424ab58b78aef52 | 0eb34388df2096d22fb1afd6e33ec511fb64cfa6 | refs/heads/master | 2023-08-29T10:43:59.775941 | 2023-07-05T08:52:41 | 2023-07-05T08:52:41 | 118,264,731 | 1,299 | 169 | BSD-2-Clause | 2023-09-05T14:50:16 | 2018-01-20T17:25:20 | Python | UTF-8 | Python | false | false | 339 | py | __init__.py | """Offline change point detection for Python."""
from .datasets import pw_constant, pw_linear, pw_normal, pw_wavy
from .detection import Binseg, BottomUp, Dynp, KernelCPD, Pelt, Window
from .exceptions import NotEnoughPoints
from .show import display
# Convenient access to the version number
from .version import vers... |
9150a460f5ad10c5f49729ba91f87ae5e3d376bd | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/keras/backend_config.py | ad2adba81f23e29d90655eaa01048573120259be | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla",
"BSD-2-Clause"
] | permissive | tensorflow/tensorflow | 906276dbafcc70a941026aa5dc50425ef71ee282 | a7f3934a67900720af3d3b15389551483bee50b8 | refs/heads/master | 2023-08-25T04:24:41.611870 | 2023-08-25T04:06:24 | 2023-08-25T04:14:08 | 45,717,250 | 208,740 | 109,943 | Apache-2.0 | 2023-09-14T20:55:50 | 2015-11-07T01:19:20 | C++ | UTF-8 | Python | false | false | 3,777 | py | backend_config.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
00ed905513baa58b24ff91a1bdb3865bcad113fb | 05b0c763ab92086e69a8d00ae6465009c596f6bc | /tests/cpu/test_linear_reorder.py | 1fb6c11716ef7011926d592998d77088a073eece | [
"Apache-2.0"
] | permissive | intel/intel-extension-for-pytorch | 60ce2af2ec3a1dacae0d0db13dd51a5b44512e61 | 7f9266789de7ca9d8bcf55606f3204f1a3640640 | refs/heads/master | 2023-09-01T09:13:16.866410 | 2023-08-31T08:00:37 | 2023-08-31T08:00:37 | 256,061,008 | 991 | 144 | Apache-2.0 | 2023-08-13T13:56:07 | 2020-04-15T23:35:29 | Python | UTF-8 | Python | false | false | 2,659 | py | test_linear_reorder.py | import unittest
from common_utils import VerboseTestCase
import subprocess
class TestLinearReorder(VerboseTestCase):
def test_linear_reorder(self):
with subprocess.Popen(
"DNNL_VERBOSE=1 python -u linear_reorder.py",
shell=True,
stdout=subprocess.PIPE,
stder... |
4889a252ca565bc9bf2b5acf4e521e410aeb14a3 | 0760fb4901a75766921a205b55686d6d6f049b30 | /python/ray/tune/tests/test_tune_server.py | 8ad7a59963f7c8f908ef998fff359b8d7e63bc67 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 5,468 | py | test_tune_server.py | import requests
import socket
import subprocess
import unittest
import json
import ray
from ray.rllib import _register_all
from ray.tune import PlacementGroupFactory
from ray.tune.experiment.trial import Trial
from ray.tune.web_server import TuneClient
from ray.tune.execution.tune_controller import TuneController
fro... |
4af8d841db18ef76744765fdbb80884c558d1685 | 554718851656376ad2bceb282de30459167ffeb2 | /tests/tensorflow2/test_keras_lstm.py | 5e3426d834f394987565377ad9569eb37f89c2dd | [
"Apache-2.0"
] | permissive | awslabs/sagemaker-debugger | d6ae6a6177a6cb457972772e2b3021e8a9dcc621 | 37ecf0aaeb24ab2adbe7f0ad664d0e50fa4154f2 | refs/heads/master | 2023-09-05T05:20:02.458427 | 2023-04-20T20:48:11 | 2023-04-20T20:48:11 | 222,554,670 | 162 | 89 | Apache-2.0 | 2023-08-23T14:31:27 | 2019-11-18T22:12:36 | Python | UTF-8 | Python | false | false | 4,136 | py | test_keras_lstm.py | # Standard Library
# Third Party
import numpy as np
import pytest
import tensorflow.compat.v2 as tf
from tensorflow.keras.layers import LSTM, Activation, Dense, Dropout, Embedding, TimeDistributed
from tensorflow.keras.models import Sequential
from tensorflow.keras.utils import to_categorical
from packaging import ver... |
8348743d34743f09bc8209ba5af061795a96b8d2 | bca49447a0757f4a1ab22898d8391ebd0a3af262 | /typings/kazoo/exceptions.pyi | db6f4ed111809a2a40f7c9470b47652826005d77 | [
"MIT"
] | permissive | zalando/patroni | ccba2a34f7aa659e334f6aabf8fafd735839b3a9 | 6b7f914da7fd4974ca091c8f55c769b2ad0f58a3 | refs/heads/master | 2023-09-04T11:06:43.490117 | 2023-09-04T08:03:37 | 2023-09-04T08:03:37 | 38,744,670 | 5,866 | 916 | MIT | 2023-09-14T17:36:28 | 2015-07-08T09:27:19 | Python | UTF-8 | Python | false | false | 286 | pyi | exceptions.pyi | class KazooException(Exception):
...
class ZookeeperError(KazooException):
...
class SessionExpiredError(ZookeeperError):
...
class ConnectionClosedError(SessionExpiredError):
...
class NoNodeError(ZookeeperError):
...
class NodeExistsError(ZookeeperError):
...
|
0e357a27f1f73fc69d80b272ddfd58757d53259c | 0d48db33dc6c69b1f6e339defbf3b99b2e20f4e7 | /lib/svtplay_dl/utils/getmedia.py | 979cd7d62384c739b55c66bd214153f5b310b27f | [
"MIT"
] | permissive | spaam/svtplay-dl | 082464969cb180fb71d5db1f3df06754027398d1 | 9d27fe86d162c92ca55cceafbe0678ee1f1f638c | refs/heads/master | 2023-09-02T15:41:16.522035 | 2023-07-18T22:28:53 | 2023-07-18T22:41:44 | 1,426,859 | 636 | 159 | MIT | 2023-07-11T22:28:27 | 2011-03-01T16:49:18 | Python | UTF-8 | Python | false | false | 8,419 | py | getmedia.py | import copy
import logging
import os
import sys
from datetime import datetime
from shutil import which
from svtplay_dl.error import UIException
from svtplay_dl.fetcher import VideoRetriever
from svtplay_dl.postprocess import postprocess
from svtplay_dl.service import Generic
from svtplay_dl.service import service_hand... |
b7a24472a842ccaae07413887453e9622ef8d3e4 | 6946f9a3e9d57b00ea275b2303ced0dedcdba1d4 | /demo_scripts/ib_examples/order_samples.py | 7d38f22d4c36d795600fd828c67687444f603808 | [
"Apache-2.0"
] | permissive | quarkfin/qf-lib | 8eaf76e3db385295ff8845b3250ba64a6fcfc7a6 | f707e51bc2ff45f6e46dcdd24d59d83ce7dc4f94 | refs/heads/master | 2023-08-31T17:41:57.213680 | 2023-08-29T10:01:49 | 2023-08-29T10:01:49 | 202,696,503 | 379 | 51 | Apache-2.0 | 2023-09-05T06:11:35 | 2019-08-16T09:10:20 | Python | UTF-8 | Python | false | false | 46,641 | py | order_samples.py | """
Copyright (C) 2016 Interactive Brokers LLC. All rights reserved. This code is
subject to the terms and conditions of the IB API Non-Commercial License or the
IB API Commercial License, as applicable.
"""
# Copyright 2016-present CERN – European Organization for Nuclear Research
#
# Licensed under the Apa... |
f8f2a273793675f4b8909bbea9c818e6ae3569fd | 817029694b5a4fe0783ae56b1d5a27a4ce768205 | /pin_to_hud_sample.py | 5b95631449264e5a9eef67952b0c2d5a36b2cec6 | [
"Apache-2.0"
] | permissive | phantomcyber/playbooks | da8f6d11a8a608be3f2d58ab9f83258977989c3b | 277814cde4f0b61e3ae922d5ba61ff1392b8558b | refs/heads/6.1 | 2023-08-31T04:34:58.947648 | 2023-08-30T15:15:09 | 2023-08-30T15:15:09 | 41,704,030 | 442 | 197 | Apache-2.0 | 2023-09-14T16:19:09 | 2015-08-31T22:35:12 | Python | UTF-8 | Python | false | false | 7,795 | py | pin_to_hud_sample.py | """
Demonstrate updating the Heads-Up Display from a Playbook using a variety of indicator types, styles, and sizes.
"""
import phantom.rules as phantom
import json
from datetime import datetime, timedelta
##############################
# Start - Global Code Block
def is_ioc(value):
import phantom.utils as phutil... |
3e9ba982b43319a2d4f2f6febeaa573e2d96d0c3 | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/perf/core/external_modules.py | 663a03e53db60e38a84843028aac1ca1e0b1803f | [
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 1,592 | py | external_modules.py | # Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Allow importing external modules which may be missing in some platforms.
These modules are normally provided by the vpython environment manager. But
some platforms, e.g. Crome... |
db2ed6b51cb2144b1f5cdf5b6b6f9346d464b5ac | c641636e184c0ec1dcc7b851bad678c898cdd05d | /apps/PGLBox/src/distributed_program.py | 07264c23095c434881451b00e78d3fc57b410537 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PGL | d8f0a82854a141bee1afdddd9a77bdd723c83ed8 | 7a55649d46d7ad93de31eb9b3ebf71b82d1fcffb | refs/heads/main | 2023-08-17T10:33:02.425526 | 2023-08-04T02:52:06 | 2023-08-04T02:52:06 | 191,286,408 | 1,719 | 341 | Apache-2.0 | 2023-08-04T02:52:07 | 2019-06-11T03:23:28 | Python | UTF-8 | Python | false | false | 3,172 | py | distributed_program.py | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
7d0ef0f5a493a57a9ff2c257623943ff609a01bf | 1d0613fb401e92b6861ea3f615561df854603db6 | /KiBuzzard/deps/fonttools/Lib/fontTools/cffLib/width.py | 303c94620aaef73579428216784c10e40dc4605a | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"OFL-1.1",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | gregdavill/KiBuzzard | 8c84a4339108c9942e1ec0e05e4110bba49fd265 | 88c4129b3fbed2cad718c01e5e2d29204e2f2071 | refs/heads/main | 2023-09-01T19:46:45.146077 | 2023-08-31T11:55:10 | 2023-08-31T11:55:10 | 328,686,533 | 358 | 36 | MIT | 2023-08-31T12:12:45 | 2021-01-11T14:16:42 | Python | UTF-8 | Python | false | false | 5,221 | py | width.py | # -*- coding: utf-8 -*-
"""T2CharString glyph width optimizer.
CFF glyphs whose width equals the CFF Private dictionary's ``defaultWidthX``
value do not need to specify their width in their charstring, saving bytes.
This module determines the optimum ``defaultWidthX`` and ``nominalWidthX``
values for a font, when pro... |
e26153c811e913db0b02d365f1cc79b2f25c0849 | 110044654f706e920380dad2779bb32a77f1f26f | /bin/docs-create-example-outputs.py | e5d40ce4cce3b6e30ff9f9f0b31f40ff689f4a15 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SCons/scons | 89327bb9635cee6e7cc59249edca9cd859d7d1ff | b2a7d7066a2b854460a334a5fe737ea389655e6e | refs/heads/master | 2023-09-01T19:37:03.603772 | 2023-08-28T04:32:42 | 2023-08-28T04:32:42 | 104,670,160 | 1,827 | 342 | MIT | 2023-09-14T15:13:21 | 2017-09-24T19:23:46 | Python | UTF-8 | Python | false | false | 607 | py | docs-create-example-outputs.py | #!/usr/bin/env python
#
# Searches through the whole doc/user tree and creates
# all output files for the single examples.
#
import os
import sys
import SConsExamples
if __name__ == "__main__":
print("Checking whether all example names are unique...")
if SConsExamples.exampleNamesAreUnique(os.path.join('doc', ... |
c52b39db8d807d2e761b46ebe19ba39ba97cf2b7 | 7d0ec90fa17c202d71290a526fb11b1c5f6a7a92 | /asv/benchmarks.py | 7e25616331e9f3f878c502d4f345c83da2063064 | [
"BSD-3-Clause"
] | permissive | airspeed-velocity/asv | 511aeb5730bfb017fcb56dc626b356ba3255c9a6 | 880a237ab39e566383e93340a3c895616f553f1d | refs/heads/master | 2023-08-28T09:13:26.092337 | 2023-08-23T22:37:04 | 2023-08-23T22:37:04 | 14,215,348 | 614 | 112 | BSD-3-Clause | 2023-09-11T04:46:14 | 2013-11-07T20:43:31 | Python | UTF-8 | Python | false | false | 11,486 | py | benchmarks.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import json
import os
import re
import tempfile
import itertools
from .console import log
from . import util, runner
from .repo import NoSuchNameError
class Benchmarks(dict):
"""
Manages and runs the set of benchmarks in the project.
"""
... |
07246819224d8b91876b7bf8f20b519735ceabb6 | 36ef50b45089f974e254537079474b1e732cd799 | /archivy/click_web/resources/cmd_exec.py | 88631ffb7f9733147b61e6cab8f7552ef9266426 | [
"MIT"
] | permissive | archivy/archivy | f7ba6ca142dceaa65c4163f90a9714c31d94c3ae | bdcdd39ac6cf9f7b3709b984d8be2f0fa898139e | refs/heads/master | 2023-08-20T22:53:51.001707 | 2023-07-25T23:32:46 | 2023-07-25T23:32:46 | 269,419,089 | 2,335 | 103 | MIT | 2023-06-25T17:23:23 | 2020-06-04T17:11:44 | Python | UTF-8 | Python | false | false | 14,879 | py | cmd_exec.py | import os
import shutil
import subprocess
import sys
import tempfile
import traceback
from pathlib import Path
from typing import List
from flask import Response, request
from werkzeug.utils import secure_filename
from archivy import click_web
from .input_fields import FieldId
logger = None
def... |
adfa2a8204948e0b2a85541cc8ab203d45a53a0c | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Alignment/MuonAlignmentAlgorithms/scripts/geometryDiffVisualizer.py | bdc7d3a40399924a4da56ce4316b2e921ca56efe | [
"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,789 | py | geometryDiffVisualizer.py | #! /usr/bin/env python3
from __future__ import print_function
import sys, ROOT
from geometryDiffVisualization import *
ROOT.gROOT.SetBatch(1)
cargs = sys.argv[:]
if len(cargs) != 5:
print("Makes schematic drawings of the detector in various projections with overlayed chambers")
print("shifted and rotated by th... |
e37da497144485e596f92a103c0f20d0015e1472 | 6b3cc22e7b8d356b01d638dffc820322312da3e4 | /pkg_blender/blendtorch/btb/__init__.py | 22b5f9d0b9f7853af93ac053155f314a5d5ba143 | [
"MIT"
] | permissive | cheind/pytorch-blender | 911961f760dde82a591f7cb26c0c648b120ad570 | d2386df70e14c190669509e28009f46aed561c88 | refs/heads/develop | 2023-04-08T01:44:09.341680 | 2022-04-03T09:37:17 | 2022-04-03T09:37:17 | 169,447,021 | 509 | 43 | MIT | 2023-03-20T03:06:22 | 2019-02-06T17:32:38 | Python | UTF-8 | Python | false | false | 402 | py | __init__.py | # flake8: noqa
from .animation import AnimationController
from .offscreen import OffScreenRenderer
from .renderer import CompositeRenderer, CompositeSelection
from .arguments import parse_blendtorch_args
from .paths import add_scene_dir_to_path
from .publisher import DataPublisher
from .camera import Camera
from .duple... |
c1fa9adb6694e497a0b5adddaa1050e9602a5c00 | 110044654f706e920380dad2779bb32a77f1f26f | /test/option/option_profile.py | 19e68f6b20d1906e17d6ab0cba85b63e3429276e | [
"MIT",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | SCons/scons | 89327bb9635cee6e7cc59249edca9cd859d7d1ff | b2a7d7066a2b854460a334a5fe737ea389655e6e | refs/heads/master | 2023-09-01T19:37:03.603772 | 2023-08-28T04:32:42 | 2023-08-28T04:32:42 | 104,670,160 | 1,827 | 342 | MIT | 2023-09-14T15:13:21 | 2017-09-24T19:23:46 | Python | UTF-8 | Python | false | false | 3,012 | py | option_profile.py | #!/usr/bin/env python
#
# MIT License
#
# Copyright The SCons Foundation
#
# 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 us... |
b36d9f2e12c520ff8515c5dd15b313108e519a2c | 554718851656376ad2bceb282de30459167ffeb2 | /tests/tensorflow/hooks/test_training_end.py | ce59c14dc9121d9f1b2558159309b8aa2a953cef | [
"Apache-2.0"
] | permissive | awslabs/sagemaker-debugger | d6ae6a6177a6cb457972772e2b3021e8a9dcc621 | 37ecf0aaeb24ab2adbe7f0ad664d0e50fa4154f2 | refs/heads/master | 2023-09-05T05:20:02.458427 | 2023-04-20T20:48:11 | 2023-04-20T20:48:11 | 222,554,670 | 162 | 89 | Apache-2.0 | 2023-08-23T14:31:27 | 2019-11-18T22:12:36 | Python | UTF-8 | Python | false | false | 674 | py | test_training_end.py | # Standard Library
import subprocess
import sys
# Third Party
import pytest
import tensorflow as tf
# First Party
from smdebug.core.access_layer.utils import has_training_ended
@pytest.mark.slow # 0:03 to run
def test_training_job_has_ended(out_dir):
tf.reset_default_graph()
subprocess.check_call(
... |
5e7efb0090ba13b2eb1961f92b02d91d8079aa1e | d066f7fe739fb78f74ec2de8ccbfefdd4270f60f | /appimagebuilder/modules/setup/helpers/gtk.py | 510388c9fad99376913bb54ec3f96b9a2f7fe8b5 | [
"MIT"
] | permissive | AppImageCrafters/appimage-builder | 666e75363a74f615cdb3673b3ca9d51a6d292a49 | f38699ef3644fa5409a5a262b7b6d99d6fb85db9 | refs/heads/main | 2023-08-17T06:34:54.029664 | 2023-06-03T17:51:04 | 2023-06-03T17:51:04 | 218,847,680 | 270 | 54 | MIT | 2023-09-06T17:04:18 | 2019-10-31T19:44:17 | Python | UTF-8 | Python | false | false | 1,421 | py | gtk.py | # Copyright 2020 Alexis Lopez Zubieta
#
# 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, publi... |
1bfee0a18a54933565de27f2c43b7d57197bdf1d | 3982e6daf88e453c726f6b39a081fc37ce15a08a | /discovery-provider/integration_tests/tasks/entity_manager/test_utils.py | e5da8fbb40b85f8d4f985d01d184c8a0667999ce | [
"Apache-2.0"
] | permissive | AudiusProject/audius-protocol | 45808e11082608ad5b76a425d287cb6d94a6dab0 | 7cf1d8e378520460d24a7cc8c29e9927c0944cb3 | refs/heads/main | 2023-08-09T10:34:28.850436 | 2023-08-09T04:28:17 | 2023-08-09T04:28:17 | 201,821,771 | 531 | 108 | NOASSERTION | 2023-09-14T21:27:52 | 2019-08-11T22:31:43 | TypeScript | UTF-8 | Python | false | false | 16,730 | py | test_utils.py | import json
from datetime import datetime
from typing import List
import pytest
from sqlalchemy import desc
from web3.datastructures import AttributeDict
from integration_tests.utils import populate_mock_db
from src.models.indexing.cid_data import CIDData
from src.models.users.user import User
from src.tasks.entity_m... |
48d53c014374fc449768ebc08100a75ffc1069b5 | 27d00032088ccb3beca2718612b0129623e73fc2 | /tests/unit/test_config.py | a030d069d148c4cf774c125cd1e9c7fdcb6120f8 | [
"Apache-2.0"
] | permissive | intel/CPU-Manager-for-Kubernetes | 9831391c36cdcc33237da55ed80e4cede22f5381 | c08228e0a9445237e35afef648cb8ea98a3143db | refs/heads/master | 2023-05-27T13:25:43.399473 | 2023-01-18T10:05:25 | 2023-01-18T10:05:25 | 76,979,646 | 177 | 89 | Apache-2.0 | 2022-12-27T15:48:18 | 2016-12-20T17:59:39 | Python | UTF-8 | Python | false | false | 8,190 | py | test_config.py | # Copyright (c) 2017 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... |
1195aed41323c1e63d570b5d2f3ec431e0e39fdf | c46754b9600a12df4f9d7a6320dfc19aa96b1e1d | /tests/models/barthez/test_tokenization_barthez.py | fa128f5091b9f40fa2c436feaaf710a3a231604f | [
"Apache-2.0"
] | permissive | huggingface/transformers | ccd52a0d7c59e5f13205f32fd96f55743ebc8814 | 4fa0aff21ee083d0197a898cdf17ff476fae2ac3 | refs/heads/main | 2023-09-05T19:47:38.981127 | 2023-09-05T19:21:33 | 2023-09-05T19:21:33 | 155,220,641 | 102,193 | 22,284 | Apache-2.0 | 2023-09-14T20:44:49 | 2018-10-29T13:56:00 | Python | UTF-8 | Python | false | false | 5,573 | py | test_tokenization_barthez.py | # coding=utf-8
# Copyright 2020 Ecole Polytechnique and HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... |
1743538a2c8016ad8205da95e2452269e130eb58 | b2fef77e77f77b6cfd83da4ec2f89cbe73330844 | /tests/test_se_block.py | de129f4d557119573e611af5a02fb2d46a32dc4a | [
"Apache-2.0"
] | permissive | Project-MONAI/MONAI | 8ef2593cc5fd1cd16e13464f927fe563fe3f5bac | e48c3e2c741fa3fc705c4425d17ac4a5afac6c47 | refs/heads/dev | 2023-09-02T00:21:04.532596 | 2023-09-01T06:46:45 | 2023-09-01T06:46:45 | 214,485,001 | 4,805 | 996 | Apache-2.0 | 2023-09-14T15:19:30 | 2019-10-11T16:41:38 | Python | UTF-8 | Python | false | false | 2,875 | py | test_se_block.py | # Copyright (c) MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, so... |
e79ee614bed7f63a42bd9a8aef60d52d91c1effc | 9c54b9ea3e9fe208457bf64ad53eba8889f4b057 | /Problem062/Python/solution_1.py | 7d244687a7d57e2345d702f03c047df9b0abfbcd | [
"MIT"
] | permissive | DestructHub/ProjectEuler | e0d77c02f0646a85d09af64127e92ac907ebad2a | efba582f976cd59748566c19799d84984c77ea61 | refs/heads/master | 2022-12-21T13:08:00.128200 | 2021-10-06T12:47:48 | 2022-12-15T20:33:12 | 36,625,177 | 179 | 87 | MIT | 2022-12-15T20:33:14 | 2015-05-31T22:36:19 | Python | UTF-8 | Python | false | false | 2,097 | py | solution_1.py | #!/usr/bin/env python
# coding=utf-8
# Python Script
#
# Copyleft © Manoel Vilela
#
#
"""
Cubic permutations
Problem 62
The cube, 41063625 (345^3), can be permuted to produce two other cubes: 56623104 (384^3) and 66430125 (405^3). In fact, 41063625 is the smallest cube which has exactly three permutations of its ... |
1ca1c3a3dc6727d2a7797555cf36d3640c58ca3f | 8eb7e2224cd81cd21fd5b0c4dd54abe85ba07e49 | /netmiko/netapp/__init__.py | 23d5259fdda50d435abdcdb3e44157d412541ab4 | [
"MIT"
] | permissive | ktbyers/netmiko | f8b980569fd863f0a7bfe28580366339c4bd31ec | 2e56b40ec639da130471c59dd1f3c93983471e41 | refs/heads/develop | 2023-08-30T20:33:05.554926 | 2023-08-29T21:50:45 | 2023-08-29T21:50:45 | 27,283,062 | 3,397 | 1,594 | MIT | 2023-09-04T03:04:31 | 2014-11-28T21:42:52 | Python | UTF-8 | Python | false | false | 86 | py | __init__.py | from netmiko.netapp.netapp_cdot_ssh import NetAppcDotSSH
__all__ = ["NetAppcDotSSH"]
|
6ddba63a794d10d02c14f4cf6b06a24d9135d85f | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /tests/st/ops/test_func_interpolate.py | fb12bcda05e5a298053c8327dd1e050d9b84b683 | [
"Apache-2.0",
"LicenseRef-scancode-proprietary-license",
"MPL-1.0",
"OpenSSL",
"LGPL-3.0-only",
"LicenseRef-scancode-warranty-disclaimer",
"BSD-3-Clause-Open-MPI",
"MIT",
"MPL-2.0-no-copyleft-exception",
"NTP",
"BSD-3-Clause",
"GPL-1.0-or-later",
"0BSD",
"MPL-2.0",
"LicenseRef-scancode-f... | permissive | mindspore-ai/mindspore | ca7d5bb51a3451c2705ff2e583a740589d80393b | 54acb15d435533c815ee1bd9f6dc0b56b4d4cf83 | refs/heads/master | 2023-07-29T09:17:11.051569 | 2023-07-17T13:14:15 | 2023-07-17T13:14:15 | 239,714,835 | 4,178 | 768 | Apache-2.0 | 2023-07-26T22:31:11 | 2020-02-11T08:43:48 | C++ | UTF-8 | Python | false | false | 24,600 | py | test_func_interpolate.py | # Copyright 2023 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
5bbaabe6003f65b841cf80cb5596044c1b84c9fc | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/conpono/cpc/bilin_model_builder.py | 011fcf61e4b94053e3a6fc187ce3e2b683b3aa38 | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google-research/language | e941b1a92ab46d40d8d03bb0c314905cb6902ce2 | ac9447064195e06de48cc91ff642f7fffa28ffe8 | refs/heads/master | 2023-08-24T23:10:13.207294 | 2023-05-25T20:47:18 | 2023-05-25T22:29:27 | 153,201,352 | 1,567 | 371 | Apache-2.0 | 2023-07-06T23:03:15 | 2018-10-16T00:58:14 | Python | UTF-8 | Python | false | false | 4,973 | py | bilin_model_builder.py | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
b0f45e935d4824814cff43ffb24282c1e2c2c60f | 704649e236cd2977bfe4b5ee5184a592cc252f4d | /setup.py | 67c68922a2f99e9014f70487dced8ecab0f49850 | [
"MIT"
] | permissive | soraxas/echo360 | a5a443954bdc3b7d60a2c87a302feb625cb30c13 | 1d01827e444e0871cb6cb031078c8e22c92a25f8 | refs/heads/master | 2022-12-24T16:10:50.483825 | 2022-12-15T05:35:24 | 2022-12-15T05:35:24 | 106,752,621 | 224 | 58 | MIT | 2022-10-25T00:17:47 | 2017-10-12T22:41:37 | Python | UTF-8 | Python | false | false | 1,431 | py | setup.py | import setuptools
with open("README.md", "r", encoding="utf8") as fh:
long_description = fh.read()
with open("requirements.txt") as f:
required = f.read().splitlines()
setuptools.setup(
name="echo360",
version="v2.1",
description="Commandline tool for automated downloads of echo360 videos",
l... |
cf55b002c23cce04b929728df5109a24cf888cac | e0484f74a89ae3f9bb52bef299a717d6e38b3acc | /rotary.py | b599e749ef8ad5ed2b7851330b9188e2143f1dd6 | [
"MIT"
] | permissive | miketeachman/micropython-rotary | 8346e3add4a5782bd5f88c126e31b333fc455301 | b4c8ce53ee2413bdad41d24a2fcf91fac6ab2d32 | refs/heads/master | 2023-07-24T06:05:25.392114 | 2023-07-22T04:33:43 | 2023-07-22T04:33:43 | 152,363,249 | 219 | 56 | MIT | 2023-07-22T04:33:44 | 2018-10-10T04:31:27 | Python | UTF-8 | Python | false | false | 5,408 | py | rotary.py | # MIT License (MIT)
# Copyright (c) 2022 Mike Teachman
# https://opensource.org/licenses/MIT
# Platform-independent MicroPython code for the rotary encoder module
# Documentation:
# https://github.com/MikeTeachman/micropython-rotary
import micropython
_DIR_CW = const(0x10) # Clockwise step
_DIR_CCW = const(0x20)... |
4c15bbc0705ec7f1b649fa630391906035cbf536 | 47d69d21f53333d93d5ba9973840ef192808a090 | /tests/config/test_types.py | e859ea18bc95cf8a57be98934b203ff4f019f667 | [
"MIT"
] | permissive | tox-dev/tox | 27ce3072e7faf5c88ed5305bbd66359369bba13d | da0885cd162fb02de866831a75eca9dcfe87eb36 | refs/heads/main | 2023-09-01T11:45:18.097559 | 2023-08-31T14:51:57 | 2023-08-31T14:51:57 | 68,465,360 | 3,512 | 624 | MIT | 2023-09-11T20:58:32 | 2016-09-17T16:54:22 | Python | UTF-8 | Python | false | false | 1,234 | py | test_types.py | from __future__ import annotations
from tox.config.types import Command, EnvList
def tests_command_repr() -> None:
cmd = Command(["python", "-m", "pip", "list"])
assert repr(cmd) == "Command(args=['python', '-m', 'pip', 'list'])"
assert cmd.ignore_exit_code is False
def tests_command_repr_ignore() -> N... |
2d38da54b7269713f3219bb2c6e57c6b2fd1676f | a33e380ba70fa915bd3a6199cf88dcfa38ca5fab | /backpack/extensions/secondorder/diag_hessian/convtranspose3d.py | 9b83eba9bdb9e4beee6762490241d22a76c11706 | [
"MIT"
] | permissive | f-dangel/backpack | 1c90aaacad4569dd3153342ad68864466389767c | 1ebfb4055be72ed9e0f9d101d78806bd4119645e | refs/heads/master | 2023-08-14T05:49:31.904383 | 2023-07-12T18:17:34 | 2023-07-12T18:17:34 | 196,406,270 | 505 | 61 | MIT | 2023-09-05T14:06:32 | 2019-07-11T14:03:56 | Python | UTF-8 | Python | false | false | 610 | py | convtranspose3d.py | from backpack.core.derivatives.conv_transpose3d import ConvTranspose3DDerivatives
from backpack.extensions.secondorder.diag_hessian.convtransposend import (
BatchDiagHConvTransposeND,
DiagHConvTransposeND,
)
class DiagHConvTranspose3d(DiagHConvTransposeND):
def __init__(self):
super().__init__(
... |
a9fe92894e459c4d96a9b0fde9bb2012a2de58cf | 27b86f422246a78704e0e84983b2630533a47db6 | /examples/blocks/multi_insert.py | 2c1f58db6af49bd8bf29adb049f4f99e807ff77f | [
"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 | 1,825 | py | multi_insert.py | # Copyright (c) 2020-2022 Manfred Moitzi
# License: MIT License
import pathlib
import ezdxf
CWD = pathlib.Path("~/Desktop/Outbox").expanduser()
if not CWD.exists():
CWD = pathlib.Path(".")
# ------------------------------------------------------------------------------
# This example shows how to render a single ... |
01957e79428f08c84a8ccbd575dcdc47829d9707 | 933b0eef6909e52fb086015e1f73e9507aad9c3f | /Mathematical_Algorithms/src/Kadane_Algorithm.py | c39655bbd58dd8051bc7abed0fdbf70536e58c96 | [] | no_license | codezoned/ScriptsDump | c105641ee06b8bf148b9c2779b04eb1d0369a85f | df6fcc47f5a73c7a5c3522f985e23b89fe56117e | refs/heads/master | 2023-04-29T03:12:40.610817 | 2022-11-26T12:22:33 | 2022-11-26T12:22:33 | 141,881,901 | 157 | 221 | null | 2023-08-10T07:00:05 | 2018-07-22T09:17:56 | Jupyter Notebook | UTF-8 | Python | false | false | 1,370 | py | Kadane_Algorithm.py | # Kadane's Algorithm by Master-Fury
# Worst and Average Case Time Complexity: O(n)
from sys import maxsize # importing maximum int from sys module
def kadane_algorithm(arr: int):
len_arr = len(arr) # Finding the len of array
max_so_far = -maxsize - 1 # Setting max value as maximum negative value
max... |
d82255d7a553e659a391358cfdc2f828fd5edbc6 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /20_杂题/1165. 单行键盘_磁道寻址.py | 7a449ba66b35d26b0dd2599fd2b0670d44ad2c89 | [] | 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 | 668 | py | 1165. 单行键盘_磁道寻址.py | from collections import defaultdict
class Solution:
def calculateTime(self, keyboard: str, word: str) -> int:
chr_idx = defaultdict(int)
for index, char in enumerate(keyboard):
chr_idx[char] = index
res, pre = 0, 0
for char in word:
res += abs(ch... |
dffd0c830114bef9883fa7c9badf596f6923d4e7 | 5eb52c07e5b1bd00af77306f927f382b684cd6ff | /indy_node/server/request_handlers/read_req_handlers/get_claim_def_handler.py | d3297da8385e0eb1e74b8a2b319bf716824b1788 | [
"Apache-2.0"
] | permissive | hyperledger/indy-node | bce39486988f5114581cff4f6d14fc1b7684143c | e6bb87d4c605aff9914491d062248b6ec857334c | refs/heads/main | 2023-09-03T15:33:08.187153 | 2023-05-08T22:48:21 | 2023-05-08T22:48:21 | 77,021,566 | 691 | 783 | Apache-2.0 | 2023-05-09T15:42:43 | 2016-12-21T05:45:04 | Python | UTF-8 | Python | false | false | 2,290 | py | get_claim_def_handler.py | from indy_common.constants import CLAIM_DEF_SIGNATURE_TYPE, GET_CLAIM_DEF
from indy_common.req_utils import get_read_claim_def_from, get_read_claim_def_signature_type, \
get_read_claim_def_schema_ref, get_read_claim_def_tag
from indy_node.server.request_handlers.domain_req_handlers.claim_def_handler import ClaimDef... |
08c34a0a03777ebe4b75559210016711e238d78a | 2ed0210bc41f848a0e67fce3ad6b7a3e85228261 | /src/pykeen/evaluation/classification_evaluator.py | f4c4c451b404955d425810ce177e05e0122d530c | [
"MIT"
] | permissive | pykeen/pykeen | f7483445bd99d3a404bc4ff42538550d56702b66 | 5ff3597b18ab9a220e34361d3c3f262060811df1 | refs/heads/master | 2023-08-25T20:29:55.021639 | 2023-08-24T20:05:20 | 2023-08-24T20:05:20 | 242,672,435 | 1,308 | 199 | MIT | 2023-09-13T18:18:36 | 2020-02-24T07:26:03 | Python | UTF-8 | Python | false | false | 4,331 | py | classification_evaluator.py | # -*- coding: utf-8 -*-
"""Implementation of wrapper around sklearn metrics."""
from typing import Mapping, MutableMapping, Optional, Tuple, Type, cast
import numpy as np
import torch
from .evaluator import Evaluator, MetricResults
from ..constants import TARGET_TO_INDEX
from ..metrics.classification import Classif... |
163b5b68e2be398707a3bb5e6958e54908466687 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/export/management/commands/rebuild_schemas_subase_repeat_bug.py | b2792728531382a00ab7cc642a143b92104c28b3 | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 1,736 | py | rebuild_schemas_subase_repeat_bug.py | import logging
from collections import defaultdict
from django.core.management.base import BaseCommand
from corehq.apps.export.models import FormExportDataSchema
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = """"Once-off command to rebuild schemas affected by subcase in repeat bug
... |
21bb690f812d2b8b17122a2e491d2468505e93ae | 38bed8ec0229b2d42ebdb33e09930ba8ee6ba5b7 | /torchvision/io/__init__.py | 8427095cea62068d19718f31e3898d0eda856c11 | [
"BSD-3-Clause",
"CC-BY-NC-4.0"
] | permissive | pytorch/vision | 10443ac1eddf7a32ecb288fe8f58e28cab2a60a1 | 1f94320d8db8d102214a7dc02c22fa65ee9ac58a | refs/heads/main | 2023-09-06T03:48:02.303020 | 2023-09-04T18:25:36 | 2023-09-04T18:25:36 | 73,328,905 | 15,620 | 8,564 | BSD-3-Clause | 2023-09-14T17:52:49 | 2016-11-09T23:11:43 | Python | UTF-8 | Python | false | false | 1,478 | py | __init__.py | from typing import Any, Dict, Iterator
import torch
from ..utils import _log_api_usage_once
try:
from ._load_gpu_decoder import _HAS_GPU_VIDEO_DECODER
except ModuleNotFoundError:
_HAS_GPU_VIDEO_DECODER = False
from ._video_opt import (
_HAS_VIDEO_OPT,
_probe_video_from_file,
_probe_video_from_me... |
b261ee409cc54f085a9955178b352bc956ef81c4 | 5068bc927a7fff73923ce95862ff70120160c491 | /contrib/axe/osx.spec | f7bbcd5d662ceee4d7676edc36debee7b0ec0ea2 | [
"MIT"
] | permissive | AXErunners/electrum-axe | cdbce2dbb92e23e32e9f9b733ae9f65f51c0ae9f | 7ef05088c0edaf0688fb167df353d6da619ebf2f | refs/heads/master | 2021-04-03T09:40:37.109317 | 2020-08-27T16:53:18 | 2020-08-27T16:53:18 | 124,705,752 | 336 | 75 | MIT | 2020-10-17T18:30:25 | 2018-03-10T23:00:48 | Python | UTF-8 | Python | false | false | 5,885 | spec | osx.spec | # -*- mode: python -*-
import os
import os.path
import sys
from PyInstaller.utils.hooks import collect_data_files, collect_submodules
for i, x in enumerate(sys.argv):
if x == '--name':
cmdline_name = sys.argv[i+1]
break
else:
raise Exception('no name')
PY36BINDIR = os.environ.get('PY36BINDIR'... |
7a170d1ec4d9ec303f741d965d91a8aac9d0e6d7 | 4feb5744ab5a26aeeb04573e4944d2bf4d1a6a2a | /peeringdb_server/search.py | ee3e2c4c06f1e8bed81f84093817a2e6f754bd5f | [
"BSD-2-Clause"
] | permissive | peeringdb/peeringdb | cb79f809c4bb8cc5192180366df1f05d8fc0111f | 3f62b2d97c78ccf151fb1a5761637e28463b9541 | refs/heads/master | 2023-09-04T09:26:43.741086 | 2023-08-22T19:20:34 | 2023-08-22T19:20:34 | 60,563,174 | 311 | 121 | BSD-2-Clause | 2023-09-13T02:13:42 | 2016-06-06T21:49:25 | Python | UTF-8 | Python | false | false | 11,239 | py | search.py | """
Search implementation used for the peeringdb top search bar, name
searches through the api `name_search` filter, as well as advanced
search functionality.
Search logic is handled by django-haystack and whoosh.
Refer to search_indexes.py for search index definition.
"""
# import time
import re
import unidecode
f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.