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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79334c1b3de67a9558cd1c4488e11dc968109696 | 0d4e2ba5b8a137be3e865302b1d4c86eb63402b9 | /ogb/version.py | 2fa2618d418d115065d53375ab166e1e12ca12f4 | [
"MIT"
] | permissive | snap-stanford/ogb | bdedd2e58e45658b1db12d88157d5793b161c558 | 745531be13c5403a93c80e21a41848e38ea7637c | refs/heads/master | 2023-08-29T13:47:29.491563 | 2023-06-10T14:30:23 | 2023-06-10T14:30:23 | 223,495,162 | 1,805 | 437 | MIT | 2023-06-24T05:35:39 | 2019-11-22T22:13:57 | Python | UTF-8 | Python | false | false | 621 | py | version.py | import os
import logging
from threading import Thread
__version__ = '1.3.6'
try:
os.environ['OUTDATED_IGNORE'] = '1'
from outdated import check_outdated # noqa
except ImportError:
check_outdated = None
def check():
try:
is_outdated, latest = check_outdated('ogb', __version__)
if is_... |
97b9cd5584c6e0ebbe6cb940bf9bc30b4d0c10d3 | 0009c76a25c89a0d61d3bc9e10071da58bdfaa5a | /py/ztools/lib/python_pick.py | 5135b8ef7d9281263bc28783970c7ee0a0f972ad | [
"MIT"
] | permissive | julesontheroad/NSC_BUILDER | 84054e70a80b572088b0806a47ceb398302451b5 | e9083e83383281bdd9e167d3141163dcc56b6710 | refs/heads/master | 2023-07-05T05:23:17.114363 | 2021-11-15T19:34:47 | 2021-11-15T19:34:47 | 149,040,416 | 1,249 | 143 | MIT | 2022-12-15T03:19:33 | 2018-09-16T22:18:01 | Python | UTF-8 | Python | false | false | 7,032 | py | python_pick.py | #-*-coding:utf-8-*-
'''
Based on python-pick
python-pick - Library Data:
* Name: python-pick
* Author: wong2
* License: MIT -> https://github.com/wong2/pick/blob/master/LICENSE
* Modifications by julesontheroad for:
https://github.com/julesontheroad/NSC_BUILDER/
Currently the only modification was to add intro (459) to... |
4e878655cd6a84768e378d89f49b7c80ec2744d7 | 5e9576c368e98927e2965bd2fb23bd35d9993d69 | /featuretools/primitives/standard/transform/binary/or_primitive.py | e426a1544e3386d82336a3c95b037befe3afcc76 | [
"BSD-3-Clause"
] | permissive | alteryx/featuretools | c6e319e063e8e84e7684bf232376f95dc5272160 | c284c2d27a95b81e0bae913ac90df2b02c8f3b37 | refs/heads/main | 2023-08-25T12:21:33.945418 | 2023-08-23T16:30:25 | 2023-08-23T16:30:25 | 102,908,804 | 1,783 | 201 | BSD-3-Clause | 2023-09-07T18:53:19 | 2017-09-08T22:15:17 | Python | UTF-8 | Python | false | false | 1,586 | py | or_primitive.py | import numpy as np
from woodwork.column_schema import ColumnSchema
from woodwork.logical_types import Boolean, BooleanNullable
from featuretools.primitives.base.transform_primitive_base import TransformPrimitive
from featuretools.utils.gen_utils import Library
class Or(TransformPrimitive):
"""Performs element-wi... |
1f56c89db61c094add76cd2bb78062bf275d07a4 | fc8ffd2f74d63024145e0628c700461765797c1c | /custom_components/edgeos/select.py | facfc33a1205ea2c9756cf885c4f2f1e9665890f | [] | no_license | elad-bar/ha-edgeos | a22edeb4429c2bd581e74cc535ce5ce3583ce84f | 62e66ac5d67d2704cd8d602db9b5f1f490ed8f1f | refs/heads/master | 2023-08-23T17:57:52.953761 | 2023-03-30T07:58:02 | 2023-03-30T07:58:02 | 169,467,285 | 129 | 31 | null | 2023-08-13T08:46:35 | 2019-02-06T19:53:18 | Python | UTF-8 | Python | false | false | 792 | py | select.py | """
Support for select.
"""
from __future__ import annotations
import logging
from .core.components.select import CoreSelect
from .core.helpers.setup_base_entry import async_setup_base_entry
_LOGGER = logging.getLogger(__name__)
async def async_setup_entry(hass, config_entry, async_add_devices):
"""Set up the ... |
0fc9aa514856079a6a22481541f4c26964f0996b | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Configuration/DataProcessing/python/Impl/cosmicsEra_Run2_2017.py | 9946b56997b79d97fa1892c082c92295916af233 | [
"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 | 499 | py | cosmicsEra_Run2_2017.py | #!/usr/bin/env python3
"""
_cosmicsEra_Run2_2017_
Scenario supporting cosmic data taking
"""
import os
import sys
from Configuration.Eras.Era_Run2_2017_cff import Run2_2017
from Configuration.DataProcessing.Impl.cosmics import cosmics
class cosmicsEra_Run2_2017(cosmics):
def __init__(self):
cosmics.__i... |
73963577c9c9a5f9442a82c05be020280cacc839 | 1180c0bfe29959d95f3c131e6e839950e528d4ee | /03/d3prof3t/tags.py | 424fbe29155c4a1c2a557a3f6d7945e28fe8ddf6 | [] | no_license | pybites/challenges | e3e461accd8e7f890aee8007ba5070086ef983fc | 02b77652d0901e6e06cb9b1e7cb3e59c675445c2 | refs/heads/community | 2023-08-20T18:19:02.982214 | 2022-11-17T09:23:31 | 2022-11-17T09:23:31 | 78,264,928 | 764 | 3,115 | null | 2023-07-21T05:58:19 | 2017-01-07T07:17:50 | Jupyter Notebook | UTF-8 | Python | false | false | 1,892 | py | tags.py | from collections import Counter
from difflib import SequenceMatcher
from itertools import product
import re
import string
IDENTICAL = 1.0
TOP_NUMBER = 10
RSS_FEED = 'rss.xml'
SIMILAR = 0.87
TAG_HTML = re.compile(r'<category>([^<]+)</category>')
def get_tags():
"""Find all tags (TAG_HTML) in RSS_FEED.
Replace... |
c6b603b69a6093c8521a6525791a4906c6818729 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /11_动态规划/经典题/dfs+cache/1575. 统计所有可行路径.py | 9c846a43fbbe7a698a622109d0c37f004add9a8a | [] | no_license | 981377660LMT/algorithm-study | f2ada3e6959338ae1bc21934a84f7314a8ecff82 | 7e79e26bb8f641868561b186e34c1127ed63c9e0 | refs/heads/master | 2023-09-01T18:26:16.525579 | 2023-09-01T12:21:58 | 2023-09-01T12:21:58 | 385,861,235 | 225 | 24 | null | null | null | null | UTF-8 | Python | false | false | 1,748 | py | 1575. 统计所有可行路径.py | from typing import List
from functools import lru_cache
# 2 <= locations.length <= 100
# locations[i] 表示第 i 个城市的位置
# 给你 start,finish 和 fuel 分别表示出发城市、目的地城市和你初始拥有的汽油总量
# 每一步中,如果你在城市 i ,你可以选择任意一个城市 j ,满足 j != i 且 0 <= j < locations.length ,并移动到城市 j
# 从城市 i 移动到 j 消耗的汽油量为 |locations[i] - locations[j]|
# 请注意, f... |
2bdb85e001ab74bb690d4b2664719924a760d60f | d09a90f5b62c28bfe363e66ef6195f8313933d50 | /utility/models_util.py | 94ff2623240b89ae907a4217931d67b6719c64dd | [
"BSD-2-Clause",
"Python-2.0"
] | permissive | borzacchiello/seninja | 1caaa6088050b6d6c2a4869f1830be29da0ea016 | 7a0d939d9e58bed832b88da1e75546f4f2d11868 | refs/heads/master | 2023-06-09T12:46:22.695364 | 2023-06-01T18:02:04 | 2023-06-01T18:02:04 | 195,441,771 | 202 | 18 | BSD-2-Clause | 2023-05-27T18:35:03 | 2019-07-05T16:50:03 | Python | UTF-8 | Python | false | false | 669 | py | models_util.py | from ..arch.arch_x86 import x86Arch
from .expr_wrap_util import symbolic
from .bninja_util import get_function
def get_arg_k(state, k, size, view):
ip = state.get_ip()
func = get_function(view, ip)
calling_convention = func.calling_convention.name
args = state.arch.get_argument_regs(calling_conventi... |
dc5400a5712c8c8b35e662243f1e0e7d3046b27a | e22eeb5256e17a96a98b3ff25433aec2d641cd2c | /openstack/network/v2/firewall_rule.py | 04a84eadb93be4e0b725d7b47634cf0d45d9b0a0 | [
"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 | 3,157 | py | firewall_rule.py | # Copyright (c) 2018 China Telecom Corporation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... |
6d76584c6234c68520e7f2c8b024674cbe103832 | fb5c5d50d87a6861393d31911b9fae39bdc3cc62 | /Scripts/sims4communitylib/enums/common_currency_modify_reasons.py | f973802af6154d3962d738e07b43b017665bdd38 | [
"CC-BY-4.0"
] | permissive | ColonolNutty/Sims4CommunityLibrary | ee26126375f2f59e5567b72f6eb4fe9737a61df3 | 58e7beb30b9c818b294d35abd2436a0192cd3e82 | refs/heads/master | 2023-08-31T06:04:09.223005 | 2023-08-22T19:57:42 | 2023-08-22T19:57:42 | 205,197,959 | 183 | 38 | null | 2023-05-28T16:17:53 | 2019-08-29T15:48:35 | Python | UTF-8 | Python | false | false | 3,673 | py | common_currency_modify_reasons.py | """
The Sims 4 Community Library is licensed under the Creative Commons Attribution 4.0 International public license (CC BY 4.0).
https://creativecommons.org/licenses/by/4.0/
https://creativecommons.org/licenses/by/4.0/legalcode
Copyright (c) COLONOLNUTTY
"""
from protocolbuffers import Consts_pb2
from sims4communityl... |
f7a3dde2744e80d2e27cf95fb889c5466acce303 | cd2a10f149babe29d2d3c3199ce5e6c14c906440 | /testing/testone.py | 2436b69f34366eef80eb33561c7326b29184ae53 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | parrt/dtreeviz | afcad7c1f09108df7d16742f2354cc4dd22f0477 | a3d02a5fd382bb8e70af92cc9110d9ef73bc86a0 | refs/heads/master | 2023-07-24T12:49:08.622792 | 2023-07-13T17:20:36 | 2023-07-13T17:20:36 | 144,636,984 | 2,505 | 322 | MIT | 2023-09-13T00:27:33 | 2018-08-13T21:45:15 | Jupyter Notebook | UTF-8 | Python | false | false | 7,207 | py | testone.py | import graphviz
from dtreeviz.shadow import *
from gen_samples import *
import tempfile
from sklearn.tree import export_graphviz
def viz_iris(orientation="TD", max_depth=5, random_state=666, fancy=True):
clf = tree.DecisionTreeClassifier(max_depth=max_depth, random_state=random_state)
iris = load_iris()
... |
82c5c855af6e6998d0d1159ed51b80fe3441cd5f | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /RecoBTag/SecondaryVertex/python/pfInclusiveSecondaryVertexFinderAK8TagInfos_cfi.py | 8c6136b17b9be62cf914e49f0850373acac20e23 | [
"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 | 442 | py | pfInclusiveSecondaryVertexFinderAK8TagInfos_cfi.py | import FWCore.ParameterSet.Config as cms
from RecoBTag.SecondaryVertex.pfInclusiveSecondaryVertexFinderTagInfos_cfi import *
pfInclusiveSecondaryVertexFinderAK8TagInfos = pfInclusiveSecondaryVertexFinderTagInfos.clone(
trackIPTagInfos = "pfImpactParameterAK8TagInfos",
extSVDeltaRToJet = 0.8,
trackSelecti... |
98ddb51e9062b6f6fb9be6a79ce3c73f86303349 | 4bc83047ebef789d46f948eb07b8b771a9eab996 | /httpx/_transports/base.py | f6fdfe694340ab00e0759c2cfb1a2ea53ed65736 | [
"BSD-3-Clause"
] | permissive | encode/httpx | 3d227e56cdf9141dec60a4222b3f954da25758dd | 053bc57c3799801ff11273dd393cb0715e63ecf9 | refs/heads/master | 2023-08-31T00:42:31.360625 | 2023-08-29T09:27:23 | 2023-08-29T09:27:23 | 179,492,861 | 11,116 | 931 | BSD-3-Clause | 2023-09-13T19:49:01 | 2019-04-04T12:27:00 | Python | UTF-8 | Python | false | false | 2,510 | py | base.py | import typing
from types import TracebackType
from .._models import Request, Response
T = typing.TypeVar("T", bound="BaseTransport")
A = typing.TypeVar("A", bound="AsyncBaseTransport")
class BaseTransport:
def __enter__(self: T) -> T:
return self
def __exit__(
self,
exc_type: typing... |
ed79f55a3ffc95e30365879465205da58cc85de8 | 53da5088e9856600eea25dc82e62a062e86e8719 | /tests/test_tools.py | 20985d39e9f1c5a2c3e60c77442ba83bb27fdf44 | [
"Apache-2.0"
] | permissive | NLeSC/mcfly | 0d84731282b24b7e08908e2331b950ab3f6224e8 | 958aa1c115ca55a50272e39f3855086a8fb59309 | refs/heads/main | 2023-08-30T01:15:41.822669 | 2023-05-30T07:39:57 | 2023-05-30T07:39:57 | 59,207,352 | 377 | 99 | Apache-2.0 | 2023-02-08T13:03:22 | 2016-05-19T13:09:26 | JavaScript | UTF-8 | Python | false | false | 111 | py | test_tools.py | import os
def safe_remove(path):
try:
os.remove(path)
except FileNotFoundError:
pass
|
597f6ca8ebca41d9c35a298d1c4b65806f63b4c9 | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/making-a-large-island.py | 1156ca1d2c5dbf1fb71263aa936b007999f262a0 | [
"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 | 1,457 | py | making-a-large-island.py | # Time: O(n^2)
# Space: O(n^2)
class Solution(object):
def largestIsland(self, grid):
"""
:type grid: List[List[int]]
:rtype: int
"""
directions = [(0, -1), (0, 1), (-1, 0), (1, 0)]
def dfs(r, c, index, grid):
if not (0 <= r < len(grid) and
... |
c0181a608520efedfcd545dcb3664dc19dbfdfdb | 9b1a345a2377bbac949856f2aac8947ab2e26205 | /pwndbg/commands/ipython_interactive.py | d73fa02fc2fb93089a99a3aa1ccab7b93ec3de0b | [
"MIT"
] | permissive | pwndbg/pwndbg | 4577c02d213fa347891d7e0f5415beb2a497c002 | f642efbd92e30c7b892b5e816d353cc5a03e5cb5 | refs/heads/dev | 2023-08-31T10:48:45.172197 | 2023-08-27T09:55:46 | 2023-08-27T10:12:02 | 31,181,767 | 5,954 | 1,080 | MIT | 2023-09-11T11:03:02 | 2015-02-22T21:35:19 | Python | UTF-8 | Python | false | false | 1,532 | py | ipython_interactive.py | """
Command to start an interactive IPython prompt.
"""
from __future__ import annotations
import sys
from contextlib import contextmanager
import gdb
import pwndbg.color.message as M
import pwndbg.commands
import pwndbg.lib.stdio
@contextmanager
def switch_to_ipython_env():
"""We need to change stdout/stderr ... |
08e69ac861832a1b9c26c6da01d0c8108c442b00 | 0fa67bbf0a669ea3e68cc2e8d474ff2b1c9d8641 | /train.py | 4e8659b6a3c9244302847e4327392782e041e0f6 | [
"MIT"
] | permissive | SeanNaren/deepspeech.pytorch | 90bc4c17282937f2edd5b35ddd1d2ab5de968fc8 | b88a631ef6b96553e16bbaa5bd6a621435bed278 | refs/heads/master | 2023-08-20T08:38:23.593110 | 2022-10-24T12:11:50 | 2022-10-24T12:11:50 | 78,508,757 | 2,193 | 747 | MIT | 2022-12-13T15:02:28 | 2017-01-10T07:28:18 | Python | UTF-8 | Python | false | false | 878 | py | train.py | import hydra
from hydra.core.config_store import ConfigStore
from deepspeech_pytorch.configs.lightning_config import ModelCheckpointConf
from deepspeech_pytorch.configs.train_config import DeepSpeechConfig, AdamConfig, SGDConfig, BiDirectionalConfig, \
UniDirectionalConfig
from deepspeech_pytorch.training import t... |
3a715a053064e5408d8b152e9e803d474de644aa | 5a361fd402b330189792b592465c1fc48c6a5fb4 | /application/flicket/scripts/flicket_user_details.py | 5e0177f9db6ba299ec03ee216bcee29256c54373 | [
"MIT"
] | permissive | evereux/flicket | a807e4a3cabce45b42cf02acceee1deb023b0487 | ef1330dca9bcc75cedd9fb68a0ecb4de67f2e6cc | refs/heads/master | 2023-05-10T17:14:05.116769 | 2023-05-01T11:20:23 | 2023-05-01T11:20:23 | 74,390,774 | 120 | 64 | MIT | 2023-05-02T00:13:00 | 2016-11-21T17:58:26 | Python | UTF-8 | Python | false | false | 1,023 | py | flicket_user_details.py | #! usr/bin/python3
# -*- coding: utf-8 -*-
#
# Flicket - copyright Paul Bourne: evereux@gmail.com
from application.flicket.models.flicket_models import FlicketTicket, FlicketPost
class FlicketUserDetails:
"""
class returns various details about user from user object input.
"""
def __init__(self, use... |
eb0267923849d6eef2e52797e352d5b987ac3688 | c4a119311ac01bbe7d5ab81b1d3d663ad0900ab6 | /python3-alpha/python-libs/gdata/tlslite/VerifierDB.py | 792bd5d6d1531b05f68bf678838e039c0a7a8d92 | [
"Apache-2.0"
] | permissive | kuri65536/python-for-android | 1d8d99e81e64bc87805c2c58ee0dcf43d413e72e | 26402a08fc46b09ef94e8d7a6bbc3a54ff9d0891 | refs/heads/master | 2021-06-02T01:17:29.685199 | 2018-05-05T00:12:13 | 2018-05-05T01:36:22 | 32,235,625 | 280 | 122 | Apache-2.0 | 2020-05-15T06:47:36 | 2015-03-14T22:44:36 | Python | UTF-8 | Python | false | false | 3,114 | py | VerifierDB.py | """Class for storing SRP password verifiers."""
from .utils.cryptomath import *
from .utils.compat import *
from . import mathtls
from .BaseDB import BaseDB
class VerifierDB(BaseDB):
"""This class represent an in-memory or on-disk database of SRP
password verifiers.
A VerifierDB can be passed to a server... |
4f9035d32883cdea1feaf540ed58f36d44c6d16d | 753cd066a9bd26b6c37c8d53a86c7a9c659ec18c | /vision/swin/pytorch/swin_test.py | c67601aca5ff80c10b6c43c7b54cfb0fc43e82e4 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | graphcore/examples | ac872015808ed2a913d4d7bf0d63202ce15ebbae | e2f834dd60e7939672c1795b4ac62e89ad0bca49 | refs/heads/master | 2023-08-05T02:08:12.341836 | 2023-07-27T11:13:10 | 2023-07-27T11:13:10 | 143,977,106 | 311 | 80 | MIT | 2023-09-11T16:42:56 | 2018-08-08T07:29:17 | Python | UTF-8 | Python | false | false | 7,134 | py | swin_test.py | # Copyright (c) 2022 Graphcore 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/LICENSE-2.0
#
# Unless required by applicable law... |
99f13d8f00c0b4fbb9f6805e21e0c27d5274fbbd | e228abda54dc7ab992ba634997b0d21b7200d091 | /dynamic_rest/__init__.py | 4366be935b7d5c08739d5d1f9f89ee4ac71acb19 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | AltSchool/dynamic-rest | 3fd2456d72fdf84e75556bc0fea7303e496b7ec7 | ed69e5af4ddf153e6eb304b7db80cc6adbf4d654 | refs/heads/master | 2023-09-06T01:57:47.555537 | 2023-03-27T16:15:22 | 2023-03-27T16:15:22 | 31,736,312 | 812 | 131 | MIT | 2023-05-28T09:15:45 | 2015-03-05T21:05:17 | Python | UTF-8 | Python | false | false | 363 | py | __init__.py | """Dynamic REST (or DREST) is an extension of Django REST Framework.
DREST offers the following features on top of the standard DRF kit:
- Linked/embedded/sideloaded relationships
- Field inclusions/exlusions
- Field-based filtering/sorting
- Directory panel for the browsable API
- Optimizations
"""
default_app_conf... |
e5558f2a8220dc75ec5b191d8ab1348e83e13004 | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/minimum-adjacent-swaps-to-reach-the-kth-smallest-number.py | 7b8bb0085f73d3df25f0029198db6ba37074bc41 | [
"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 | 1,641 | py | minimum-adjacent-swaps-to-reach-the-kth-smallest-number.py | # Time: O((k + n) * n)
# Space: O(n)
class Solution(object):
def getMinSwaps(self, num, k):
"""
:type num: str
:type k: int
:rtype: int
"""
def next_permutation(nums, begin, end):
def reverse(nums, begin, end):
left, right = begin, end-1
... |
634fafc11b8770030093ca1854275bfb9b1a32ea | 15eb68a30bd1bcd8c153ce3c8774e09ef3f4135d | /Docs/torch_code_examples/quant_analyzer_code_example.py | 803f43dff282d2539437d991186382e3b421b7f8 | [
"BSD-3-Clause"
] | permissive | quic/aimet | 77a984af68fc3c46d98c707d18a14c95a3efdacf | 5a406e657082b6a4f6e4bf48f0e46e085cb1e351 | refs/heads/develop | 2023-08-21T12:51:10.500286 | 2023-08-18T18:35:39 | 2023-08-18T18:35:39 | 257,688,216 | 1,676 | 339 | NOASSERTION | 2023-09-08T06:59:39 | 2020-04-21T18:57:10 | Python | UTF-8 | Python | false | false | 6,557 | py | quant_analyzer_code_example.py | # /usr/bin/env python3.6
# -*- mode: python -*-
# =============================================================================
# @@-COPYRIGHT-START-@@
#
# Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification,... |
ba4f9f4c6234d1f3818d8cbbee6c0013764db4b6 | c50e7eb190802d7849c0d0cea02fb4d2f0021777 | /src/connection-monitor-preview/azext_connection_monitor_preview/custom.py | 61afca26e02187dc861d04a60df2193c69231b45 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | Azure/azure-cli-extensions | c1615b19930bba7166c282918f166cd40ff6609c | b8c2cf97e991adf0c0a207d810316b8f4686dc29 | refs/heads/main | 2023-08-24T12:40:15.528432 | 2023-08-24T09:17:25 | 2023-08-24T09:17:25 | 106,580,024 | 336 | 1,226 | MIT | 2023-09-14T10:48:57 | 2017-10-11T16:27:31 | Python | UTF-8 | Python | false | false | 40,175 | py | custom.py | # pylint: disable=unused-argument,too-many-locals
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ------------------... |
fb81989702b68a6eb56a8cc96c87650c7b38bfe2 | 79914e3d51c52fce1b9638c5b15e77b8769aaa01 | /bull/__init__.py | 91032385649a4d7f9a654d45d1eeab35494459bc | [] | no_license | jeffknupp/bull | aaf1ab62842fcce2a62936d3e8e0b5c2744c8ebc | f3c5f33ec59810d4ee8febf7f9bd769541527f49 | refs/heads/develop | 2021-03-12T20:00:27.328797 | 2015-08-20T22:50:04 | 2015-08-20T22:50:04 | 16,057,005 | 105 | 38 | null | 2019-10-22T23:52:22 | 2014-01-19T23:50:53 | Python | UTF-8 | Python | false | false | 716 | py | __init__.py | """Bull library, used for selling digital goods."""
import os
from flask import Flask
from jinja2 import Environment, FileSystemLoader, ChoiceLoader, PackageLoader
import stripe
from .bull import bull, mail, login_manager, bcrypt
from .models import Product, Purchase, db
app = Flask(__name__)
app.config['SECRET_KE... |
605b47932d315340ae7f49db429ab575e113d663 | 1f61e06271f8e9582669686457c40336235d1eee | /Module 1/Chapter 10/face_recognizer.py | e37aac64d21e0515991ce725a652afc9942fb643 | [
"MIT"
] | permissive | PacktPublishing/Python-Real-World-Machine-Learning | f1747fdd73937544a243059ac7476bfbfac6d113 | 669e793cf80c35b6d2028f74bff2cd87b9458791 | refs/heads/master | 2023-04-13T11:48:13.459731 | 2023-01-30T09:21:10 | 2023-01-30T09:21:10 | 70,907,139 | 108 | 111 | MIT | 2023-04-04T14:38:41 | 2016-10-14T12:13:47 | Jupyter Notebook | UTF-8 | Python | false | false | 3,759 | py | face_recognizer.py | import os
import cv2
import numpy as np
from sklearn import preprocessing
# Class to handle tasks related to label encoding
class LabelEncoder(object):
# Method to encode labels from words to numbers
def encode_labels(self, label_words):
self.le = preprocessing.LabelEncoder()
self.le.fit(label... |
c3c3d0a31bfe8bd8fc57f357bb86e42242835741 | 6958f617af0c5a76304ceb1006c77bc70ca0e195 | /python/taichi/tools/video.py | 70f734efe9cafe726b0792b74b2f84b915c5bb83 | [
"Apache-2.0"
] | permissive | taichi-dev/taichi | 3fae315a494f1c97392d5b931c939abbbfba1bdc | b30b511f55e3d0ebff765ee048d0aaa4ba9e7667 | refs/heads/master | 2023-09-02T13:28:18.208792 | 2023-08-23T23:22:43 | 2023-08-23T23:22:43 | 74,660,642 | 17,231 | 1,841 | Apache-2.0 | 2023-09-14T11:29:32 | 2016-11-24T10:00:05 | C++ | UTF-8 | Python | false | false | 9,296 | py | video.py | import os
import shutil
from taichi._lib.utils import get_os_name
from taichi.tools.image import imwrite
FRAME_FN_TEMPLATE = "%06d.png"
FRAME_DIR = "frames"
# Write the frames to the disk and then make videos (mp4 or gif) if necessary
def scale_video(input_fn, output_fn, ratiow, ratioh):
os.system(f'ffmpeg -i ... |
2e036da25f32c58a0fd6082232d8cb8a769348fc | 607dc8df19fc5248f6289cdda97857b5d58ca16f | /benchmark/src/wrappers/wrapper.py | fe325ca4edf9a1300ff61e3c12a1c9e50d5bac41 | [
"BSD-3-Clause",
"LicenseRef-scancode-philippe-de-muyter",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | automl/SMAC3 | 7dce243a33023c52d6819deff966f7b502e90ed0 | 541ee7e0383b491b86d1a23dcff669f2efad616d | refs/heads/main | 2023-08-31T17:36:06.067579 | 2023-08-01T13:02:51 | 2023-08-01T13:02:51 | 65,900,469 | 943 | 259 | NOASSERTION | 2023-09-11T02:36:57 | 2016-08-17T10:58:05 | Python | UTF-8 | Python | false | false | 1,179 | py | wrapper.py | from __future__ import annotations
from abc import abstractmethod
from src.datasets.dataset import Dataset
from src.models.model import Model
from src.tasks.task import Task
class Wrapper:
supported_versions: list[str] = []
def __init__(self, task: Task, seed: int = 0) -> None:
if len(task.objectiv... |
c9fe96e7b19d99bc8625cbd6fd2d949c1e0ef805 | 855b013907d33b7e1bb74f688e5314b0e9bae510 | /python-package/setup.py | 60a27cdb14da93218bfd1405a5fcc757936fbab2 | [
"Apache-2.0"
] | permissive | aksnzhy/xlearn | 5b3f3aa29b31c7080a3e0835f073d34157878c44 | 4c240aa0aa63c1d105fb9aec583adc2ad2840368 | refs/heads/master | 2023-09-01T08:44:21.447056 | 2022-06-05T10:44:18 | 2022-06-05T10:44:18 | 93,925,242 | 3,261 | 624 | Apache-2.0 | 2023-08-28T05:18:27 | 2017-06-10T08:09:31 | C++ | UTF-8 | Python | false | false | 1,903 | py | setup.py | # Copyright (c) 2018 by contributors. 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... |
6da6ff743f45435342065a6bdc080cf9a6b2906f | fac6bd9d5ca6b068e9ec5ce8a6e703c9261476a3 | /roletools/menus.py | 8826146a5cb41a24a5de6168e822fa9f661db164 | [
"MIT"
] | permissive | TrustyJAID/Trusty-cogs | b72b48a7da37d6985cfc7924dae3a2ff4fcbb39f | 5b4c87d461065ef55af4f012a89501925a34a8d5 | refs/heads/master | 2023-09-04T22:55:34.235209 | 2023-09-04T22:52:25 | 2023-09-04T22:52:25 | 160,604,179 | 170 | 252 | MIT | 2023-06-10T17:01:00 | 2018-12-06T02:02:25 | Python | UTF-8 | Python | false | false | 23,704 | py | menus.py | from __future__ import annotations
from typing import Any, List, Optional
import discord
from red_commons.logging import getLogger
# from discord.ext.commands.errors import BadArgument
from redbot.core import bank
from redbot.core.commands import commands
from redbot.core.i18n import Translator
from redbot.core.util... |
784e4be2f03edda6a3302d4925ba59f0b5bb56a3 | f576f0ea3725d54bd2551883901b25b863fe6688 | /sdk/maps/azure-maps-search/azure/maps/search/models/_models.py | f2808ee58e393e03152235b8f2999a675807f65e | [
"LicenseRef-scancode-generic-cla",
"MIT",
"LGPL-2.1-or-later"
] | permissive | Azure/azure-sdk-for-python | 02e3838e53a33d8ba27e9bcc22bd84e790e4ca7c | c2ca191e736bb06bfbbbc9493e8325763ba990bb | refs/heads/main | 2023-09-06T09:30:13.135012 | 2023-09-06T01:08:06 | 2023-09-06T01:08:06 | 4,127,088 | 4,046 | 2,755 | MIT | 2023-09-14T21:48:49 | 2012-04-24T16:46:12 | Python | UTF-8 | Python | false | false | 46,889 | py | _models.py | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
# pylint: disable=unused-import,ungrouped-imports, C0302, C0203
from typing import List, Optional, Union, NamedTuple
import msrest.serialization
from .._generated.mode... |
9ab84dcae54eab8f6fa95e817d36f6f98380fed5 | 1534531d248728e583310214c84cd329cfeb243b | /accelerator/standard_methods/a_dataset_filter_columns.py | 5412a85706ddd22d8abad31b272501109784a9f8 | [
"Apache-2.0"
] | permissive | eBay/accelerator | 415a006d18283940661c0f3cbae2c311acc1ffaa | 8376d289e39cd90562de7dc2e3cdaa0bf080587b | refs/heads/master | 2023-03-10T11:08:58.828517 | 2022-07-14T19:15:46 | 2022-07-14T19:15:46 | 130,265,539 | 146 | 30 | null | null | null | null | UTF-8 | Python | false | false | 2,318 | py | a_dataset_filter_columns.py | ############################################################################
# #
# Copyright (c) 2017 eBay Inc. #
# Modifications copyright (c) 2018-2020 Carl Drougge #
# Modificati... |
220c12d959032fda6f135ccf9c5d9e96e0d21972 | 0cd893fddf3a43459030292dad953c3810713513 | /clif/testing/python/non_raising_test.py | 7f6a1f010e2c6b89450d1613545964b3724e0ebe | [
"Apache-2.0"
] | permissive | google/clif | 8fc6d75f7e4a1a443f9bd596d05ea3e4c820e1c4 | 7501b3ca70a92a7a15022b3035bc4b1706f7569a | refs/heads/main | 2023-08-19T06:26:17.321706 | 2023-08-18T23:18:45 | 2023-08-18T23:20:30 | 88,560,371 | 1,026 | 146 | Apache-2.0 | 2023-08-31T23:41:41 | 2017-04-17T23:36:06 | C++ | UTF-8 | Python | false | false | 1,692 | py | non_raising_test.py | # Copyright 2021 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 agreed to in writing, ... |
14a3f9d929b5c875808b1df24fcdeb708a7192dc | 7eb606a7957e5500f163c93dc4b19418cf9cf335 | /ludwig/utils/structural_warning.py | c8702a0d501afe952bcdb1b1d298840ea0fb515c | [
"Apache-2.0",
"MIT"
] | permissive | ludwig-ai/ludwig | 024f74da86567a57ec8e30efcb4600f0c52333a1 | e1d023e41606c9b76b35e1d231c2f13368a30eca | refs/heads/master | 2023-09-03T08:07:32.978301 | 2023-09-01T19:39:32 | 2023-09-01T19:39:32 | 163,346,054 | 2,567 | 285 | Apache-2.0 | 2023-09-14T20:34:52 | 2018-12-27T23:58:12 | Python | UTF-8 | Python | false | false | 1,107 | py | structural_warning.py | import warnings
from ludwig.utils.logging_utils import log_once
def warn_structure_refactor(old_module: str, new_module: str, direct: bool = True) -> None:
"""Create structure refactor warning to indicate modules new location post.
Only creates a warning once per module.
"""
old_module = old_module.... |
fde06aa8ae49416670f0bc2985745ce8ced45593 | 8a87f5b889a9ce7d81421515f06d9c9cbf6ce64a | /scripts/toolbox/modules/ArangodEnvironment/Agent.py | 63e46c2b4b06b7640bfe489060848c8d50ae9c91 | [
"Apache-2.0",
"BSD-3-Clause",
"ICU",
"Zlib",
"GPL-1.0-or-later",
"OpenSSL",
"ISC",
"LicenseRef-scancode-gutenberg-2020",
"MIT",
"GPL-2.0-only",
"CC0-1.0",
"BSL-1.0",
"LicenseRef-scancode-autoconf-simple-exception",
"LicenseRef-scancode-pcre",
"Bison-exception-2.2",
"LicenseRef-scancode... | permissive | arangodb/arangodb | 0980625e76c56a2449d90dcb8d8f2c485e28a83b | 43c40535cee37fc7349a21793dc33b1833735af5 | refs/heads/devel | 2023-08-31T09:34:47.451950 | 2023-08-31T07:25:02 | 2023-08-31T07:25:02 | 2,649,214 | 13,385 | 982 | Apache-2.0 | 2023-09-14T17:02:16 | 2011-10-26T06:42:00 | C++ | UTF-8 | Python | false | false | 549 | py | Agent.py | from .ArangodServer import ArangodServer
class Agent(ArangodServer):
def __init__(self, environment):
super().__init__(environment)
environment.register_agent(self)
def collect_parameters(self, param):
param["--agency.activate"] = "true"
param["--agency.my-address"] = self.get_... |
9aad7b61d307d435f5934743a861dc7378cf85d4 | 7bb974bb16651a2749282c5bae7016ea4f72be63 | /sudoku_solver/sudoku_solve_backtrace_recursive.py | 8b2aa9895131e7ed4ded2d113628d21580ab1705 | [] | no_license | jadijadi/programming_class_cheats | 9736225b23b3c09de7241c3fd2f14f33739b3079 | 1e9b943b3cad15e5ef7bf6d2f270cb1f6a3f0aa3 | refs/heads/master | 2023-01-08T14:37:56.085140 | 2022-01-11T12:35:58 | 2022-01-11T12:35:58 | 46,111,971 | 166 | 108 | null | 2023-06-25T06:20:24 | 2015-11-13T09:15:07 | Jupyter Notebook | UTF-8 | Python | false | false | 1,649 | py | sudoku_solve_backtrace_recursive.py | puzzle = [
[5, 3, 0, 0, 7, 0, 0, 0, 0],
[6, 0, 0, 0, 9, 5, 0, 0, 0],
[0, 9, 8, 0, 0, 0, 0, 6, 0],
[8, 0, 0, 0, 6, 0, 0, 0, 3],
[4, 0, 0, 8, 0, 3, 0, 0, 1],
[7, 0, 0, 0, 2, 0, 0, 0, 6],
[0, 6, 0, 0, 0, 0, 2, 8, 0],
[0, 0, 0, 4, 1, 9, 0, 0, 5],
[0, 0, 0, 0, 8, 0, 0, 7, 9]
]
guess = [
... |
3ee72f3a2d7e4f3d131fb94aa783101cdceb8e03 | bed34365a9dab825fd9f4a4ff1b0863f441266ac | /neutron/tests/unit/objects/test_securitygroup.py | 53a7901d3ac3adf8746b110fc536babf03ce6d06 | [
"Apache-2.0"
] | permissive | openstack/neutron | 0913ee3cd69d5bdb9c10aa084d4e1803abee320c | dde31aae392b80341f6440eb38db1583563d7d1f | refs/heads/master | 2023-08-31T13:09:41.831598 | 2023-08-31T11:37:30 | 2023-08-31T11:37:30 | 2,400,289 | 1,174 | 1,325 | Apache-2.0 | 2022-06-29T08:00:05 | 2011-09-16T16:04:08 | Python | UTF-8 | Python | false | false | 11,784 | py | test_securitygroup.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... |
8fd16b7cc9182a31c16934a8ee1bb7111db13fb2 | a5d20c1d3d0f402b34f15081c8d41ec7291f292d | /src/demos/python/vehicle/demo_VEH_SuspensionTestRig.py | d8812d05de606c7b9d8ef32c94798bf46c83ee9a | [
"BSD-3-Clause"
] | permissive | projectchrono/chrono | 3535b1a22b3f9ac55cd3bb6c3015f1ee7c78308e | 6a96ca61e232088d9eb5a286e5a12f5b7747ac16 | refs/heads/main | 2023-09-03T21:00:45.434375 | 2023-09-02T13:41:05 | 2023-09-02T13:41:05 | 12,567,717 | 1,874 | 460 | BSD-3-Clause | 2023-09-10T10:30:18 | 2013-09-03T15:34:23 | C++ | UTF-8 | Python | false | false | 4,975 | py | demo_VEH_SuspensionTestRig.py | # =============================================================================
# PROJECT CHRONO - http://projectchrono.org
#
# Copyright (c) 2022 projectchrono.org
# All rights reserved.
#
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file at the top level of the distr... |
2ce1eb70bf422d81b567989ad9887f8463486de2 | f425ebe567930eda1bea606eb1b5149611f825fd | /scripts/so6_clip_sector.py | 8471df648578288a67c0ef8ed52924446b102f0f | [
"MIT"
] | permissive | xoolive/traffic | 4f479dcdac86b7850d68e01f6f09ce60e1a69295 | e64fe6dbd205c2b56d4ec1f1fada5e524e73982e | refs/heads/master | 2023-09-04T10:54:03.122322 | 2023-09-02T08:45:31 | 2023-09-02T08:45:31 | 127,042,768 | 319 | 87 | MIT | 2023-09-02T08:46:31 | 2018-03-27T20:32:46 | Python | UTF-8 | Python | false | false | 2,299 | py | so6_clip_sector.py | import argparse
from concurrent.futures import ProcessPoolExecutor, as_completed
from pathlib import Path
from tqdm import tqdm
from traffic.core import Airspace
from traffic.data import SO6, nm_airspaces
def clip(so6: SO6, airspace: Airspace) -> SO6:
return so6.inside_bbox(airspace).intersects(airspace)
def u... |
c064a5b523afca6934f921c15f5ae7d323c23bc2 | 771c1e2011a85a287c766b1a3d299ced2e6f799f | /src/electionguard_cli/encrypt_ballots/encrypt_ballots_input_retrieval_step.py | a62952316215ae1e9703296f77828175ed57e4f8 | [
"MIT"
] | permissive | microsoft/electionguard-python | f50f64a473a8d77984a2faf4aa8db40cebb5c201 | b3ddc2a732f6c5f078a3afbe05b00d632a2ff5e0 | refs/heads/main | 2023-08-03T12:44:35.322716 | 2022-10-28T12:47:18 | 2022-10-28T12:47:18 | 246,392,956 | 143 | 117 | MIT | 2023-08-02T00:24:32 | 2020-03-10T19:46:06 | Python | UTF-8 | Python | false | false | 992 | py | encrypt_ballots_input_retrieval_step.py | from io import TextIOWrapper
from electionguard.ballot import PlaintextBallot
from electionguard.manifest import Manifest
from .encrypt_ballot_inputs import EncryptBallotInputs
from ..cli_steps import (
InputRetrievalStepBase,
)
class EncryptBallotsInputRetrievalStep(InputRetrievalStepBase):
"""Responsible ... |
9fdf54049e7d624aec1d6e12196e94a04d116287 | 486fa0a987ab1648de91efeb4b7ba8be3dd6b016 | /tests/test.generic.007.timer.py | 720af1e9253d57aba256ce20a76fda1b9537e3da | [
"MIT"
] | permissive | ceccopierangiolieugenio/pyTermTk | 9f5103d6af9e93fe2572b61486919020d2007550 | f9c2a4d97f2cd04f0b86cf10661f63a61edae48e | refs/heads/main | 2023-08-30T20:58:39.239718 | 2023-08-02T22:51:02 | 2023-08-02T22:51:02 | 339,475,110 | 414 | 16 | MIT | 2023-08-31T23:16:10 | 2021-02-16T17:23:36 | Python | UTF-8 | Python | false | false | 4,434 | py | test.generic.007.timer.py | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2023 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com>
#
# 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 restricti... |
a22e3e714119c93887c9f1af9d8b861b6282a5ff | af395c3cb83dfd489565c1f516743b8eec0b547c | /appendix_argparse/choices.py | b7450096a303e850f6e9b04bba1a4172ad1c8186 | [
"MIT"
] | permissive | kyclark/tiny_python_projects | 0b2b15a78daa4c1d42f3804840592c5ca4a287fb | 0e73a0d1d9301ffd5179d895baf60d8899bf2d34 | refs/heads/master | 2023-01-12T11:02:30.077085 | 2021-12-08T02:10:02 | 2021-12-08T02:10:02 | 187,108,291 | 1,221 | 2,393 | MIT | 2023-01-02T13:44:03 | 2019-05-16T22:15:27 | Python | UTF-8 | Python | false | false | 953 | py | choices.py | #!/usr/bin/env python3
"""Choices"""
import argparse
# --------------------------------------------------
def get_args():
"""get args"""
parser = argparse.ArgumentParser(
description='Choices',
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('color',
... |
a269fa0ce3a214438f06f81e8aab6550b6a35298 | 6d54a7b26d0eb82152a549a6a9dfde656687752c | /scripts/build/builders/cc13x2x7_26x2x7.py | 907d92fe1575b4d1564ee21648db8a67891864cc | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | project-chip/connectedhomeip | 81a123d675cf527773f70047d1ed1c43be5ffe6d | ea3970a7f11cd227ac55917edaa835a2a9bc4fc8 | refs/heads/master | 2023-09-01T11:43:37.546040 | 2023-09-01T08:01:32 | 2023-09-01T08:01:32 | 244,694,174 | 6,409 | 1,789 | Apache-2.0 | 2023-09-14T20:56:31 | 2020-03-03T17:05:10 | C++ | UTF-8 | Python | false | false | 3,924 | py | cc13x2x7_26x2x7.py | # Copyright (c) 2021 Project CHIP 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 ... |
14a093bcbc0a86699ee8134a7fb9338a0ca7c13b | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipaySecurityDataAmlassetBatchqueryResponse.py | b1cc32e1d2c020f731965c5d61e4429579cdf38e | [
"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 | 1,122 | py | AlipaySecurityDataAmlassetBatchqueryResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.AmlAssetRecord import AmlAssetRecord
class AlipaySecurityDataAmlassetBatchqueryResponse(AlipayResponse):
def __init__(self):
super(AlipaySecurityDataAmla... |
02bdb9be534bbd7a42b22f13444b4d63b69d2321 | a1657a0c5c8f3f8b51b98074293e2f2e9b16e6f4 | /libs/pipeline_model/pipeline_model/__init__.py | b778c1973cdf12a3eba6aca8c72beff35b6cc60d | [
"Apache-2.0"
] | permissive | PipelineAI/pipeline | e8067636f5844dea0653aef84bd894ca2e700fc6 | 0f26e3eaad727c1d10950f592fe1949ece8153aa | refs/heads/master | 2023-01-07T15:27:33.741088 | 2022-10-25T23:01:51 | 2022-10-25T23:01:51 | 38,730,494 | 2,596 | 512 | Apache-2.0 | 2020-01-30T23:00:08 | 2015-07-08T03:49:23 | Jsonnet | UTF-8 | Python | false | false | 2,782 | py | __init__.py | from grpc.beta import implementations
#import tensorflow as tf
# These are generated from the TF serving source
# or copied from various places such as the following:
# https://github.com/Vetal1977/tf_serving_example
# https://github.com/tobegit3hub/tensorflow_template_application
from tensorflow_serving.api... |
ad67e086458b5eb8dded238362c79ffad3ad489d | 71b8b60c5627ace1bbda39f679f93f60b55543ca | /tensorflow_federated/python/aggregators/factory.py | 90efa74096de4f3faafd094d3a005d9a70e72b5d | [
"Apache-2.0"
] | permissive | tensorflow/federated | ff94b63e9f4af448795bae77cee5b627dcae9051 | ad4bca66f4b483e09d8396e9948630813a343d27 | refs/heads/main | 2023-08-31T11:46:28.559047 | 2023-08-31T02:04:38 | 2023-08-31T02:09:59 | 161,556,784 | 2,297 | 631 | Apache-2.0 | 2023-09-13T22:54:14 | 2018-12-12T23:15:35 | Python | UTF-8 | Python | false | false | 2,926 | py | factory.py | # Copyright 2020, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
b97fbd071c7665d734df8307f9d93675609743a1 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayCommerceOperationUserBenefitBatchqueryResponse.py | c6d9160389048734bdf54178bdec8928793550c6 | [
"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 | 1,928 | py | AlipayCommerceOperationUserBenefitBatchqueryResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.UserBenefitInfo import UserBenefitInfo
class AlipayCommerceOperationUserBenefitBatchqueryResponse(AlipayResponse):
def __init__(self):
super(AlipayCommer... |
6134b515bbfabb175acb281e8f902768da659674 | 8245320cd0ccd28d9e8670a80e848ef4a61c8f69 | /modelzoo/vision/pytorch/unet/utils.py | a10c26e826b125e4acc2c9213db1697845ef2c4c | [
"Apache-2.0"
] | permissive | Cerebras/modelzoo | b7d3e097dc77b9958db47ddc7029aeef8cd11e19 | 97bdaf4460ace1681ad437b07ba33f0e179f5ca4 | refs/heads/main | 2023-08-02T09:44:00.573057 | 2023-07-28T01:15:20 | 2023-07-28T01:15:20 | 479,424,977 | 644 | 78 | Apache-2.0 | 2023-07-28T01:15:21 | 2022-04-08T14:35:05 | Python | UTF-8 | Python | false | false | 5,943 | py | utils.py | # Copyright 2022 Cerebras Systems.
#
# 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 wri... |
29fd2ba63b0a25a268396b61669a62117d7d75e8 | a716f48abe52957cca6013246ef6fce800af2dd1 | /pythonbuild/docker.py | 905340c800012c91f2ac8d7b216c8645476da33f | [
"OpenSSL",
"X11-distribute-modifications-variant",
"MIT",
"LicenseRef-scancode-public-domain",
"Zlib",
"MIT-open-group",
"Python-2.0",
"bzip2-1.0.6",
"Sleepycat",
"LGPL-2.0-or-later",
"LGPL-2.1-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-public-domain-disclaime... | permissive | indygreg/python-build-standalone | 3793ead5df9f2a98c172a2a29082df58726573f3 | 93ee2633c5a182f364672d73c4e0437bc6475d47 | refs/heads/main | 2023-08-30T22:44:59.639556 | 2023-08-25T03:45:31 | 2023-08-26T05:10:26 | 162,334,160 | 1,056 | 97 | BSD-3-Clause | 2023-07-26T01:57:50 | 2018-12-18T19:10:32 | Python | UTF-8 | Python | false | false | 4,695 | py | docker.py | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import contextlib
import io
import operator
import os
import pathlib
import tarfile
import docker
import jinja2
from ... |
779e27d57c3a76b6977aea4c07d52131d8af9d31 | 41e424bc0476fe67c22e5f4e9255932a5de277b3 | /caffe/data/make_cub2011.py | cb48dce43dea6c937c02704c22ad3a9bcc4a3e09 | [] | no_license | abhimanyudubey/confusion | a1228823ee33d5d5e439a6c069e87a6163e43f01 | bbc47c305fcca4c462d7852ad306b09d904e12e0 | refs/heads/master | 2021-01-19T14:52:29.193396 | 2018-09-11T00:42:39 | 2018-09-11T00:42:39 | 100,933,177 | 219 | 46 | null | null | null | null | UTF-8 | Python | false | false | 1,282 | py | make_cub2011.py | #!/usr/bin/env python
import argparse
import glob
import random
import os
if __name__ == '__main__':
parser = argparse.ArgumentParser('Make CUB dataset text files')
parser.add_argument('-i', '--input', help='Path to dataset parent directory', required=True, type=str, default=None)
parser.add_argument('-o',... |
9abae4ac901e2e4fa659abcf15d8d1e767873051 | 993f18c21402d7a4ff21ddb7ff2ec6c80e466f20 | /onnx/backend/test/case/node/constant.py | b376079ad5617a92dfe0ee95a4446da794154dbd | [
"Apache-2.0"
] | permissive | onnx/onnx | 10d3916803c7babff89ec0fa9045127bcccad376 | 8a475b34cb3875df311a46f57571646498f5bda7 | refs/heads/main | 2023-08-18T18:50:03.388353 | 2023-08-16T22:18:46 | 2023-08-16T22:18:46 | 102,692,863 | 16,164 | 4,150 | Apache-2.0 | 2023-09-14T17:10:38 | 2017-09-07T04:53:45 | Python | UTF-8 | Python | false | false | 766 | py | constant.py | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import onnx
from onnx.backend.test.case.base import Base
from onnx.backend.test.case.node import expect
class Constant(Base):
@staticmethod
def export() -> None:
values = np.random.randn(5, 5).astype... |
94320399ea8e108ea53744eb8b122a8effd150e2 | b8441dc1987be9e64fa3081d456b2a3060ec44d1 | /mars/oscar/backends/router.py | 96d3e5cedd6ad3356ca744a4410f7d3bf2e40224 | [
"BSD-3-Clause",
"MIT",
"ISC",
"Apache-2.0",
"CC0-1.0",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | mars-project/mars | f99fefbce999d58a9249bc72046787a9731c9c73 | c36c53fa22e10ef9477d9c454401a2f281375f31 | refs/heads/master | 2023-07-23T00:23:55.133015 | 2023-07-03T11:44:54 | 2023-07-03T11:44:54 | 160,543,708 | 2,704 | 362 | Apache-2.0 | 2023-09-11T07:57:35 | 2018-12-05T16:04:03 | Python | UTF-8 | Python | false | false | 4,428 | py | router.py | # Copyright 1999-2021 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
8e021f9b2fbb6b68f461bc438144cf6dff84f4db | 787022de03a2dd6998c1518673830395b389e3df | /migration/migrator/migrations/system/20180817164339_enable_docker.py | c77c8b1718b46650d35c0d89b36c4ef6a187114f | [
"BSD-3-Clause",
"MIT"
] | permissive | Submitty/Submitty | e6b8731656291a025aa77f928eb067bc9a307540 | b223d9e952bcdb8664721a55593bc75e0e3c8c4f | refs/heads/main | 2023-08-31T23:56:11.291752 | 2023-08-31T19:12:18 | 2023-08-31T19:12:18 | 16,236,118 | 592 | 727 | BSD-3-Clause | 2023-09-13T05:36:08 | 2014-01-25T17:43:57 | PHP | UTF-8 | Python | false | false | 2,246 | py | 20180817164339_enable_docker.py | import os
import json
import shutil
from pathlib import Path
from subprocess import call
# The changes in this pull request change the interface/arguments to
# the autograding scripts, thus it requires that all gradeables be
# rebuilt/recompiled
def up(config):
# ================================================... |
4d498cc71441731f0323c7f5758352e49df90e61 | e3bb1df7fa4c51900dec7e9ddf5295e1a80938bd | /hummingbot/client/platform.py | 80dd039c38b0af0ce92c572b2f8cdc380e6a07ec | [
"Apache-2.0"
] | permissive | CoinAlpha/hummingbot | 0d1e2bd94de1280748647108c7d7800a09546eb8 | c3f101759ab7e7a2165cd23a3a3e94c90c642a9b | refs/heads/development | 2023-09-01T11:24:43.322137 | 2023-08-31T03:08:06 | 2023-08-31T03:08:06 | 439,330,952 | 135 | 98 | Apache-2.0 | 2023-08-30T13:55:08 | 2021-12-17T12:50:42 | Python | UTF-8 | Python | false | false | 516 | py | platform.py | import os
import platform
from pathlib import Path
def get_system():
return platform.system()
def get_installation_type():
if os.environ.get("INSTALLATION_TYPE", "").lower() == "docker":
return "docker"
package_dir = Path(__file__).resolve().parent.parent.parent
bin_dir = [f for f in os.scan... |
d56df35bfc7a4cdf4c5a3df4a7c06017c5a9c307 | 5ae0b5c15dda392ea9786394deb6e106b5a156c0 | /tests/test_assignment.py | ea194f70daa72a0650b3cd14febf6deae97f9b78 | [
"MIT"
] | permissive | dgk/django-business-logic | f68108dd0f3d82c514c09c764455bf6e48cdd916 | 2372ca9076b06a21bdf4bb6266b8f1e0ace0ed91 | refs/heads/develop | 2023-09-01T05:24:37.672687 | 2019-12-20T17:49:46 | 2019-12-20T17:49:46 | 47,394,841 | 201 | 42 | MIT | 2023-09-12T15:29:57 | 2015-12-04T09:37:53 | CSS | UTF-8 | Python | false | false | 1,797 | py | test_assignment.py | # -*- coding: utf-8 -*-
#
from .common import *
class AssignmentTest(TestCase):
def test_assignment(self):
context = Context()
root = Node.add_root()
var_def = VariableDefinition(name='K1')
root.add_child(content_object=var_def)
root = Node.objects.get(id=root.id)
... |
1620397a0d4deafa12eb9ccda7d5740ecd9ba928 | 704976ea552111c6a5af9cd7cb62b9d9abaf3996 | /pypy/module/_cffi_backend/__init__.py | 76e7369d16638ce8b40f59b0e901ba2f5d374564 | [
"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 | 3,161 | py | __init__.py | import sys
from pypy.interpreter.mixedmodule import MixedModule
from rpython.rlib import rdynload, clibffi
from rpython.rtyper.lltypesystem import rffi
VERSION = "1.11.5"
FFI_DEFAULT_ABI = clibffi.FFI_DEFAULT_ABI
try:
FFI_STDCALL = clibffi.FFI_STDCALL
has_stdcall = True
except AttributeError:
has_stdcall ... |
97a9ea684e48b4ecd14b80bc30f8340c4acf9146 | e7efae2b83216d9621bd93390959d652de779c3d | /ddev/src/ddev/cli/release/agent/integrations.py | 9c8281baebe4c7f8f815f027b4501c2af2ef0dc0 | [
"MIT",
"BSD-3-Clause",
"BSD-3-Clause-Modification",
"Unlicense",
"Apache-2.0",
"LGPL-3.0-only",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"CC0-1.0"
] | permissive | DataDog/integrations-core | ee1886cc7655972b2791e6ab8a1c62ab35afdb47 | 406072e4294edff5b46b513f0cdf7c2c00fac9d2 | refs/heads/master | 2023-08-31T04:08:06.243593 | 2023-08-30T18:22:10 | 2023-08-30T18:22:10 | 47,203,045 | 852 | 1,548 | BSD-3-Clause | 2023-09-14T16:39:54 | 2015-12-01T16:41:45 | Python | UTF-8 | Python | false | false | 2,522 | py | integrations.py | # (C) Datadog, Inc. 2023-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations
from io import StringIO
from typing import TYPE_CHECKING
import click
if TYPE_CHECKING:
from ddev.cli.application import Application
@click.command(short_help="G... |
2863b00b4aa384b43feaf07bf7fd631abf68329b | db12b990924703cd74748d8585cd9c11fafa6746 | /h2o-py/tests/testdir_algos/modelselection/pyunit_PUBDEV_8785_8758_maxrSweep_fix_replacement_large.py | 1f9d40969d6755c6c6d453d42b6eb90bbe8b7a63 | [
"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 | 3,329 | py | pyunit_PUBDEV_8785_8758_maxrSweep_fix_replacement_large.py | import sys
sys.path.insert(1, "../../../")
import h2o
from tests import pyunit_utils
from h2o.estimators.model_selection import H2OModelSelectionEstimator
def test_maxrsweep_replacement():
correct_pred_subsets = [["C78",'Intercept'], ["C78","C97",'Intercept'], ["C78","C97","C75",'Intercept'],
... |
1a8a0888575abd56891ae662bfa9ac4d3180019b | 5917ffcb780cfcfe4e2b87b11fca1f68f387b239 | /plenum/test/pool_transactions/test_txn_pool_manager.py | 827ac57f19bc0924cf7229b7201168c223b3a38a | [
"Apache-2.0"
] | permissive | hyperledger/indy-plenum | 6ff9f705af80dfa28d4cb92743683f78bb937aa3 | 698b9500ad3a7a15993af72a1c35a406c5673262 | refs/heads/main | 2023-08-29T01:32:26.384729 | 2023-06-20T16:42:11 | 2023-06-20T16:42:11 | 51,585,028 | 171 | 420 | Apache-2.0 | 2023-06-20T16:42:14 | 2016-02-12T12:03:16 | Python | UTF-8 | Python | false | false | 2,938 | py | test_txn_pool_manager.py | import pytest
from plenum.common.config_helper import PNodeConfigHelper
from plenum.test.test_node import TestNode
from stp_core.loop.eventually import eventually
from plenum.test.helper import sdk_send_random_and_check, assertExp
from plenum.common.txn_util import get_type, get_payload_data
from plenum.common.cons... |
ad0601f29ad4e2f74f69d48b22c9a0d61e682dfe | 010279e2ba272d09e9d2c4e903722e5faba2cf7a | /contrib/python/plotly/py2/plotly/validators/layout/geo/lataxis/__init__.py | 228d2eabea733a1c143f219d7a9e5e256851cc00 | [
"Apache-2.0",
"MIT"
] | permissive | catboost/catboost | 854c1a1f439a96f1ae6b48e16644be20aa04dba2 | f5042e35b945aded77b23470ead62d7eacefde92 | refs/heads/master | 2023-09-01T12:14:14.174108 | 2023-09-01T10:01:01 | 2023-09-01T10:22:12 | 97,556,265 | 8,012 | 1,425 | Apache-2.0 | 2023-09-11T03:32:32 | 2017-07-18T05:29:04 | Python | UTF-8 | Python | false | false | 3,037 | py | __init__.py | import _plotly_utils.basevalidators
class Tick0Validator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="tick0", parent_name="layout.geo.lataxis", **kwargs):
super(Tick0Validator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... |
2d0311751bd459523c32eafdf5de430c52e227df | 9734c93c86c982b1ce046340bac9e53645b261b8 | /tests/multi_process/base_process.py | 009e8487f7597749e0d1d35e002a2eae958ec034 | [
"Apache-2.0"
] | permissive | log2timeline/plaso | cd72dd407d6c5627506c14f58cb8f6a6926aa808 | d6022f8cfebfddf2d08ab2d300a41b61f3349933 | refs/heads/main | 2023-09-02T08:43:48.241198 | 2023-08-19T07:28:12 | 2023-08-19T07:28:12 | 23,812,315 | 1,506 | 421 | Apache-2.0 | 2023-09-04T08:24:53 | 2014-09-08T23:29:28 | Python | UTF-8 | Python | false | false | 1,681 | py | base_process.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Tests for the multi-processing base process."""
import unittest
from plaso.engine import configurations
from plaso.multi_process import base_process
from tests import test_lib as shared_test_lib
class TestProcess(base_process.MultiProcessBaseProcess):
"""Implemen... |
f83e42972698c7ec73e796e0cf97999b56c0fcbb | 445b3666585565b9a4a3ed82df0d80bfe859d988 | /scripts/extract_embeddings.py | fec8fcbd426bca168534ec5176d663696f1be314 | [
"Apache-2.0",
"MIT"
] | permissive | dbiir/UER-py | 11d669ee6eb94d648039d60e8f7fba91ebc42f77 | 3ce0127ba8630f978304ea98833eb39ef55fc506 | refs/heads/master | 2023-09-02T14:50:44.011889 | 2023-08-25T04:39:53 | 2023-08-25T04:39:53 | 180,572,200 | 2,865 | 535 | Apache-2.0 | 2023-08-24T08:30:53 | 2019-04-10T12:00:20 | Python | UTF-8 | Python | false | false | 2,185 | py | extract_embeddings.py | """
This script provides an example to wrap UER-py for embedding extraction.
"""
import sys
import os
import argparse
import torch
uer_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
sys.path.append(uer_dir)
from uer.utils.vocab import Vocab
if __name__ == '__main__':
parser = argparse.Ar... |
f8363364438007e5eec67d30e7cae1ea571c1245 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /DQM/SiStripCommissioningDbClients/python/OfflineDbClient_cff.py | 6e4f4a2e7bbe3fa9debc0cfcc0679b24945a96b2 | [
"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 | 5,860 | py | OfflineDbClient_cff.py | import FWCore.ParameterSet.Config as cms
db_client = cms.EDAnalyzer("SiStripCommissioningOfflineDbClient",
# general parameters
FilePath = cms.untracked.string('/tmp'),
RunNumber = cms.untracked.uint32(0),
UseClientFile = cms.untracked.bool(False),
UploadHwConfig = cms.untracked.bool(Fals... |
01949bb4cd0084b2e5f3d9d554fe986ab45b0629 | 0e80605f998d065816a79f5b153f66e4769a1105 | /tests/common.py | a9094347ddb43255ac079c20e76851d5722433ee | [
"MIT"
] | permissive | sergionr2/RacingRobot | 1874da5fc78d5885647e7490a38d6f703f0f7f2f | 6885ddb37407dff15845d29f641bc7c39279b216 | refs/heads/master | 2023-07-19T20:49:01.541721 | 2020-05-24T12:33:33 | 2020-05-24T12:33:33 | 95,389,808 | 237 | 99 | MIT | 2023-07-06T21:15:47 | 2017-06-25T22:44:19 | Python | UTF-8 | Python | false | false | 350 | py | common.py | from __future__ import print_function, division, absolute_import
NUM_EPOCHS = 2
DATASET = 'datasets/test_dataset/'
TEST_IMAGE_PATH = DATASET + '170.jpg'
SEED = 0
BATCHSIZE = 4
def assertEq(left, right):
assert left == right, "{} != {}".format(left, right)
def assertNeq(left, right):
assert left != right, "... |
16e50fcc3c35b7fdec1323b4e16e5d45f8c79909 | c45f99d4fb86a54a81da796d6345d6572e7bc9c4 | /bitmapist/__init__.py | 8f943595c9c6b1de2f013cf93a04833bc844f1fc | [
"BSD-3-Clause"
] | permissive | Doist/bitmapist | df323f28b68667b1cedeb70b173c0f792db54605 | 0acd5580dcbe6d8841726c087a96f975cced2249 | refs/heads/main | 2023-07-05T16:26:58.696494 | 2023-05-05T00:19:26 | 2023-05-05T00:19:26 | 6,390,826 | 567 | 60 | null | 2023-05-05T00:16:49 | 2012-10-25T16:50:33 | Python | UTF-8 | Python | false | false | 22,543 | py | __init__.py | # -*- coding: utf-8 -*-
"""
bitmapist
~~~~~~~~~
Implements a powerful analytics library on top of Redis's support for bitmaps and bitmap operations.
This library makes it possible to implement real-time, highly scalable analytics that can answer following questions:
* Has user 123 been online today? This week? This m... |
99bb6227cba88b8e76554a960dbb633733e51062 | a1fc902d48c476c342014f6399fc03a180d9ac04 | /keras_csp/data_generators.py | 37018b5d5a07c5460b58b70733c208eeb2f40d11 | [] | no_license | liuwei16/CSP | 574441fe34ee4741e2db118ff7fb20ab448839d0 | 9d5a0bcc7d44bfb27dbeef85ef92320cce5bae68 | refs/heads/master | 2022-12-04T02:19:02.147004 | 2021-10-07T05:04:39 | 2021-10-07T05:04:39 | 179,669,192 | 829 | 218 | null | 2022-11-22T01:39:09 | 2019-04-05T11:26:44 | Jupyter Notebook | UTF-8 | Python | false | false | 11,664 | py | data_generators.py | from __future__ import absolute_import
from __future__ import division
# import numpy as np
# import cv2
import random
from . import data_augment
from .bbox_transform import *
def calc_gt_center(C, img_data,r=2, down=4,scale='h',offset=True):
def gaussian(kernel):
sigma = ((kernel-1) * 0.5 - 1) * 0.3 + 0.8
s = 2*... |
aaa0ef917667b7c133f0d2c3c6f87031f74e7751 | 3dc647cd07a7361ed401e40d2b7cce8c826c8f6c | /Lib/sqlite3/dbapi2.py | 56fc0461e6c92249a9bbe6e9a775ac8b4a28bd59 | [
"Python-2.0",
"CC-BY-4.0",
"MIT"
] | permissive | RustPython/RustPython | 5ddce4a9848b9de8c041ffd2634f83c0105d3f39 | b864e5da1f18897fc884180b7093df5aa170024f | refs/heads/main | 2023-09-04T12:38:29.458699 | 2023-09-03T12:33:42 | 2023-09-03T12:33:42 | 135,201,145 | 15,815 | 1,302 | MIT | 2023-09-14T08:11:45 | 2018-05-28T19:27:01 | Rust | UTF-8 | Python | false | false | 3,631 | py | dbapi2.py | # pysqlite2/dbapi2.py: the DB-API 2.0 interface
#
# Copyright (C) 2004-2005 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from the use of this sof... |
21376acda89fba0869fb222c80e365bf52d62f6d | e7e536df0263ae2a7ac44ef30f19110f891213a9 | /src/pretalx/common/language.py | 9505490a25879f0fbe6121f651798150d84e522c | [
"Apache-2.0"
] | permissive | pretalx/pretalx | b3b3808266f4810dfc8445dc1ed33ba398e7a9c2 | 269dce90a6fb1ce0064008c40ce5dd4dad61e2e3 | refs/heads/main | 2023-09-05T11:09:23.538325 | 2023-09-04T19:57:47 | 2023-09-04T19:57:47 | 83,081,285 | 563 | 195 | Apache-2.0 | 2023-09-13T19:12:28 | 2017-02-24T20:46:51 | Python | UTF-8 | Python | false | false | 727 | py | language.py | from django.conf import global_settings, settings
from django.utils.translation import get_language
LANGUAGE_CODES_MAPPING = {
language.lower(): language for language in settings.LANGUAGES_INFORMATION
}
LANGUAGE_NAMES = dict(global_settings.LANGUAGES)
LANGUAGE_NAMES.update(
(language["code"], language["natural... |
54def90cc3ce33a1e2bf5d4b8d5dd5ba0b7a6dfa | ab4011a43c040f57919a5c4aabf413515f04262e | /aio_pika/patterns/__init__.py | 1d83cdd4d37c7773f5183094f53bd1cb588aef5c | [
"Apache-2.0"
] | permissive | mosquito/aio-pika | e75a4994d947c1f72c3f587b484ca2c11d392eed | 8cad8ee92b91e406c0bcb0c12450e84d79350433 | refs/heads/master | 2023-08-24T16:44:21.979691 | 2023-08-14T14:08:07 | 2023-08-14T14:08:07 | 69,458,400 | 1,078 | 230 | Apache-2.0 | 2023-09-12T06:51:24 | 2016-09-28T11:54:18 | Python | UTF-8 | Python | false | false | 233 | py | __init__.py | from .master import JsonMaster, Master, NackMessage, RejectMessage, Worker
from .rpc import RPC, JsonRPC
__all__ = (
"Master",
"NackMessage",
"RejectMessage",
"RPC",
"Worker",
"JsonMaster",
"JsonRPC",
)
|
98d40ab8370f54e95e070b6da37d475680819178 | 88d555a009f9075e59177fac70036892f397b439 | /basenji/archive/seqnn_util.py | ea1dd94e3f35456cafcce7986857d858d908cf80 | [
"Apache-2.0"
] | permissive | calico/basenji | f9f406971d355dda81821dcf274696a7d27e332d | 615b9eec8a591783b16d959029ddad08edae853d | refs/heads/master | 2023-09-04T11:14:15.620786 | 2023-07-27T00:05:13 | 2023-07-27T00:05:13 | 96,346,574 | 326 | 143 | Apache-2.0 | 2023-08-16T00:36:32 | 2017-07-05T17:54:18 | Python | UTF-8 | Python | false | false | 41,308 | py | seqnn_util.py | """
General utility code for test-time interraction with a SeqNN model.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pdb
import sys
import numpy as np
import tensorflow as tf
from basenji.dna_io import hot1_augment
from basenji import accurac... |
98f880d851d7eb19bfbf5e3c542eb971ce71eaa6 | 4bcc9806152542ab43fc2cf47c499424f200896c | /tensorflow/python/distribute/cluster_resolver/sagemaker_cluster_resolver_test.py | 19d067aceb76f0c848a843e9dc94c1ded9081a22 | [
"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 | 4,373 | py | sagemaker_cluster_resolver_test.py | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
d12671233992db9a7312d35e4ae4cbeee2173435 | d110546d747d7e3865ce5742d5fca09f404623c0 | /pkg/tests/integration/test_salt_output.py | e05cf457ded0ffbcc4f221a9e5f952ab6b5e1c98 | [
"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 | 444 | py | test_salt_output.py | import pytest
pytestmark = [
pytest.mark.skip_on_windows,
]
@pytest.mark.parametrize("output_fmt", ["yaml", "json"])
def test_salt_output(salt_cli, salt_minion, output_fmt):
"""
Test --output
"""
ret = salt_cli.run(
f"--output={output_fmt}", "test.fib", "7", minion_tgt=salt_minion.id
... |
9a31a8b0acb4e43841b8ed946380e1caa557715f | 97efdfac795c44f9a2a62e48ba71bf1783c523bf | /message_ix/tests/test_feature_storage.py | 8d44f804ed0b3e77d91e71a091ef813d36424092 | [
"CC-BY-4.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"Apache-2.0"
] | permissive | iiasa/message_ix | 1e96ee254b6f67117faf4fb78ef8fd75d9ee0a6c | bf4469111a2d10c5dbc2c921e6a7e502e96aea34 | refs/heads/main | 2023-08-17T20:36:23.055462 | 2023-08-14T08:46:24 | 2023-08-14T08:46:24 | 113,015,968 | 103 | 162 | Apache-2.0 | 2023-09-08T11:56:21 | 2017-12-04T08:29:06 | Jupyter Notebook | UTF-8 | Python | false | false | 12,826 | py | test_feature_storage.py | """Test storage representation.
This is a unit test for representing storage in the MESSAGEix model, and testing the
functionality of storage equations. The workflow is as follows:
- Build a stylized MESSAGEix model.
- Add seasonality and modify parameters for timesteps accordingly.
- Add storage implementation (dam:... |
85990588fd22d4c8dba0b4a5bde8a1aebc157b6b | 01b61d78d99c3a6caeda65cf770e87a794b5689d | /Chapter08/Code/parameters.py | cd65f685be1442b924b9362079f1892fb39e00f7 | [
"MIT"
] | permissive | PacktPublishing/TensorFlow-Machine-Learning-Projects | b62b6e945f9272b92c164eb1610684ba8a5b2bc1 | 157d13317780d845fd2c781a036c8281c780ab30 | refs/heads/master | 2023-03-02T20:25:02.245771 | 2023-01-30T09:58:37 | 2023-01-30T09:58:37 | 139,389,726 | 104 | 65 | MIT | 2023-03-01T20:33:32 | 2018-07-02T04:14:29 | Jupyter Notebook | UTF-8 | Python | false | false | 289 | py | parameters.py | import os
#DATA_DIR = '/Users/ankit.jain/Documents/Teaching&Learning/Packt/Book/BNN/Data'
DATA_DIR = os.path.join(os.getcwd(),"..","Data")
NUM_CLASSES = 43
IMG_SIZE = 32
#Training Parameters
BATCH_SIZE =128
EPOCHS =1000
LEARNING_RATE = 0.001
# Inference Parameters
NUM_MONTE_CARLO = 50
|
1c305445fa2d5226ff6794429191adb5218d6c4c | b8d80a23cb27af08a1c4d34b478c76228ae5fbb4 | /insights/tests/combiners/test_ceph_version.py | 881d25469dc0cd47a4714fd59ced8ff284d09582 | [
"Apache-2.0"
] | permissive | RedHatInsights/insights-core | bb243e2bf8a52446fefb95ebe05478d6e35efe2e | b0ea07fc3f4dd8801b505fe70e9b36e628152c4a | refs/heads/master | 2023-09-04T21:15:40.456257 | 2023-09-04T10:46:56 | 2023-09-04T10:46:56 | 92,518,221 | 144 | 290 | Apache-2.0 | 2023-09-14T02:40:13 | 2017-05-26T14:23:11 | Python | UTF-8 | Python | false | false | 4,682 | py | test_ceph_version.py | from insights.parsers.ceph_version import CephVersion as CephV
from insights.parsers.ceph_insights import CephInsights
from insights.parsers.ceph_cmd_json_parsing import CephReport
from insights.combiners import ceph_version
from insights.combiners.ceph_version import CephVersion
from insights.tests import context_wrap... |
12447efd747278c8703ec3615bd23c860b6c29f5 | cf8182ecc88888719cfaff79751834500800151a | /applications/tapkee/samples/dm.py | 036028dfd44d1158abf77b19d6c977c858d3af08 | [
"BSD-3-Clause",
"DOC",
"GPL-3.0-only"
] | permissive | shogun-toolbox/shogun | 17beb82a04fbf1179d300c4fcd16ee68850ad994 | 9b8d856971af5a295dd6ad70623ae45647a6334c | refs/heads/develop | 2023-03-11T04:46:36.167073 | 2020-12-08T16:56:38 | 2020-12-08T16:56:38 | 1,555,094 | 2,938 | 1,246 | BSD-3-Clause | 2022-08-12T11:12:34 | 2011-04-01T10:44:32 | C++ | UTF-8 | Python | false | false | 952 | py | dm.py | import shogun as sg
import data
import numpy as np
# load data
feature_matrix = data.swissroll()
# create features instance
features = sg.RealFeatures(feature_matrix)
# create Diffusion Maps converter instance
converter = sg.DiffusionMaps()
# set target dimensionality
converter.set_target_dim(2)
# set number of time... |
4e64ac8421f1fe7e4d68c331ea3c46c2a3567a46 | 9c8de4dbc6c7e4411fa3b8088fe630e6db67146f | /gym_collision_avoidance/envs/policies/RVOPolicy.py | 15eed12b20acd0f1e3258d132a804a0290392528 | [
"MIT"
] | permissive | mit-acl/gym-collision-avoidance | 8379c1f022b7e01f30d98dcb701fbda429bd7ba8 | 903564097509e3fbdbbb850a3a89729a28377b81 | refs/heads/release | 2023-05-29T06:56:19.482580 | 2023-04-28T18:18:22 | 2023-04-28T18:18:22 | 241,484,799 | 212 | 68 | MIT | 2022-06-07T18:50:32 | 2020-02-18T22:52:24 | OpenEdge ABL | UTF-8 | Python | false | false | 5,487 | py | RVOPolicy.py | import numpy as np
from gym_collision_avoidance.envs.policies.InternalPolicy import InternalPolicy
from gym_collision_avoidance.envs import Config
from gym_collision_avoidance.envs.util import *
import rvo2
import matplotlib.pyplot as plt
class RVOPolicy(InternalPolicy):
def __init__(self):
InternalPolicy... |
65606d46e47241851fb31df0a348fa23cdbc7d33 | b3cde44e48d293d94b612a34506e03feb2ab7fcc | /scripts/fsqio/python3-port-utils/pants/update_decode_encode.py | 3e7db1779d48a691782f3dc0e47fd31ab75fcdf6 | [
"Apache-2.0"
] | permissive | foursquare/fsqio | 0cfd51e71d572f9f5682c03fdaba7c79ffff6785 | f5a5699c18babaa6810de84bcc6dd1522bcfe259 | refs/heads/master | 2022-08-10T10:29:28.004139 | 2022-06-28T22:42:39 | 2022-06-28T22:42:39 | 48,192,426 | 267 | 66 | Apache-2.0 | 2022-06-28T22:42:40 | 2015-12-17T18:53:44 | Scala | UTF-8 | Python | false | false | 1,478 | py | update_decode_encode.py | #!/usr/bin/env python3
import argparse
import re
from pathlib import Path
from typing import Sequence, Set
ENCODING_REGEX = r"""('utf-8'|"utf-8"|'UTF-8'|"UTF-8")"""
DECODE_REGEX = rf".decode\({ENCODING_REGEX}\)"
ENCODE_REGEX = rf".encode\({ENCODING_REGEX}\)"
def main() -> None:
folders = create_parser().parse_ar... |
186e0317e9ce8aa37fcbf6deb9198e248ac6b1e4 | c3351062731885d604a39856b2f933144cac70bc | /tools/Sikuli/ClickUITab.sikuli/ClickUITab.py | 5c198c738e6e3f045a385af2db8a28937b4c9100 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-3-Clause"
] | permissive | Pr-Mex/vanessa-automation | 4efb7924242b70d86f1ef34b48de638602a6d8f3 | e9fcb486384a3c96db8ee7218294550c78bf096c | refs/heads/develop | 2023-09-04T00:48:40.953195 | 2023-08-30T19:28:16 | 2023-08-30T19:28:16 | 133,170,708 | 395 | 356 | BSD-3-Clause | 2023-09-11T17:17:02 | 2018-05-12T17:55:53 | 1C Enterprise | UTF-8 | Python | false | false | 89 | py | ClickUITab.py | if not exists("Pa60TacUI.png"):
exit(1)
click("Pa60TacUI.png")
sleep(1)
exit(0)
|
afb29497d4771ca314b652401e47ab4d8f7031e8 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /19_数学/组合/直角三角形的个数.py | be87d10a23ecb20deb4ee7fcf2f72b2288d7c8b3 | [] | 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 | 881 | py | 直角三角形的个数.py | from typing import List, Tuple
def cal(points: List[Tuple[int, int]]) -> int:
"""求点集组成的不同直角三角形个数"""
n = len(points)
res = 0
for i in range(n): # 枚举直角顶点
x0, y0 = points[i]
for j in range(n):
if j == i:
continue
x1, y1 = points[j]
... |
a15e375de35e894f4b91e08e46e06029a0763180 | 8287ced5b14dd2a0060545b1fb53aa8a8deb878b | /precise/pocketsphinx/scripts/listen.py | b2381a234f0bcb2989c035a3b983f3700ba81f00 | [
"Apache-2.0"
] | permissive | MycroftAI/mycroft-precise | 30fa89e632189e27d9fa2dabcef82a7867d4f6ae | e1a635e9675047eb86f64ca489a1b941321c489a | refs/heads/dev | 2023-07-19T06:19:58.303669 | 2020-08-05T02:09:50 | 2020-08-05T02:09:50 | 101,455,393 | 777 | 233 | Apache-2.0 | 2023-06-22T16:14:39 | 2017-08-26T01:56:48 | Python | UTF-8 | Python | false | false | 1,990 | py | listen.py | #!/usr/bin/env python3
# Copyright 2019 Mycroft AI 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... |
a76eb14c20cd8ba3819410020da7d5505b411d6a | b60f84142c6a704621a49522ed1364439a38be19 | /litedram/phy/rpc/basephy.py | e3247699bc4866e6e7a1cc0b9a413dceb5127f13 | [
"BSD-2-Clause",
"BSD-3-Clause"
] | permissive | enjoy-digital/litedram | cf0ad16a6a7b22b5b5257af313ed59f3f2bba477 | ed81c8cc861ae14e44b2df83adce3ff39ca7f7ac | refs/heads/master | 2023-09-04T06:27:33.897454 | 2023-08-29T14:48:10 | 2023-08-29T14:48:10 | 31,147,284 | 321 | 111 | NOASSERTION | 2023-07-07T06:53:26 | 2015-02-22T00:43:35 | Python | UTF-8 | Python | false | false | 27,428 | py | basephy.py | #
# This file is part of LiteDRAM.
#
# Copyright (c) 2020-2021 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: BSD-2-Clause
from math import ceil
from operator import and_
from migen import *
from litex.gen.genlib.misc import WaitTimer
from litex.soc.interconnect.csr import AutoCSR, CSR, CSRStatus, CSRStorag... |
3b6d593b2cdfe8492c5c1ad82ba6931830d5628e | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-meta/OpenMetadata/ingestion/src/metadata/orm_profiler/sink/file.py | 05c456e407d7dbb625d42675c718568b1728ed7b | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | alldatacenter/alldata | 7bc7713c9f1d56ad6b8e59ea03206d1073b7e047 | 8d5f9a2d49ab8f9e85ccf058cb02c2fda287afc6 | refs/heads/master | 2023-08-05T07:32:25.442740 | 2023-08-03T13:17:24 | 2023-08-03T13:17:24 | 213,321,771 | 774 | 250 | Apache-2.0 | 2023-09-06T17:35:32 | 2019-10-07T07:36:18 | null | UTF-8 | Python | false | false | 2,405 | py | file.py | # Copyright 2021 Collate
# 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... |
7728727cefb5f7cdb300a670b3ef6e8b9b1a7f26 | 2e6b87dccfaf95eded0c26215f42b584cc0ce393 | /tina/pars/simple.py | acdae04ea07dab65382771411e4029120e81dbdd | [
"MIT"
] | permissive | taichi-dev/taichi_three | 2d3c4022436777bbd6005a38f8cc27cd1f442430 | 62596cf36fba1c5a528796c51942ce44ed76292a | refs/heads/master | 2023-06-20T19:59:09.218689 | 2021-07-10T09:32:09 | 2021-07-10T09:32:09 | 272,924,688 | 204 | 30 | MIT | 2021-07-10T09:32:10 | 2020-06-17T08:52:31 | Python | UTF-8 | Python | false | false | 1,485 | py | simple.py | from ..common import *
@ti.data_oriented
class SimpleParticles:
def __init__(self, maxpars=65536, radius=0.02):
self.verts = ti.Vector.field(3, float, maxpars)
self.sizes = ti.field(float, maxpars)
self.colors = ti.Vector.field(3, float, maxpars)
self.npars = ti.field(int, ())
... |
e1af4812989c89f38f31e5563b1d0bbcb6c54f1f | 2853845c003d03db22f67c3303fa1ec333180ae7 | /fedlearner/model/crypto/gmpy_math.py | a5d698eb17e06f8b92af923e61d414fd91387737 | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | bytedance/fedlearner | fc1dd2ba2ec88092e83a32732eccea52451ce552 | 436e4959952c970917ee8f47b920f0a76cd4dd05 | refs/heads/master | 2023-08-14T23:01:02.875453 | 2023-05-23T03:44:03 | 2023-05-23T03:44:03 | 235,348,659 | 893 | 243 | Apache-2.0 | 2023-06-08T07:37:18 | 2020-01-21T13:26:35 | Python | UTF-8 | Python | false | false | 1,466 | py | gmpy_math.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
d5fe30ed26f4347188ce3c3c905ede60974aa235 | d1c2d00078520cd556f60b7213c27856f8b3460d | /sdks/python/apache_beam/utils/windowed_value_test.py | 1e4892aa9bd32893c3f88e416549df5ae7d18347 | [
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-protobuf",
"Apache-2.0",
"Python-2.0"
] | permissive | apache/beam | ed11b9e043465c720659eac20ac71b5b171bfa88 | 6d5048e05087ea54abc889ce402ae2a0abb9252b | refs/heads/master | 2023-09-04T07:41:07.002653 | 2023-09-01T23:01:05 | 2023-09-01T23:01:05 | 50,904,245 | 7,061 | 4,522 | Apache-2.0 | 2023-09-14T21:43:38 | 2016-02-02T08:00:06 | Java | UTF-8 | Python | false | false | 6,410 | py | windowed_value_test.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
5cfc61169126ab13e2c276fd44b8e30e032d866c | 90b974771cff3addd43ded8c62c3667c64045976 | /tensorflow_data_validation/statistics/generators/cross_feature_stats_generator.py | bf1c1b183575af9f68bb31af772b6d8de16e55e6 | [
"Apache-2.0"
] | permissive | tensorflow/data-validation | 84066c9c8db76d6b49bab0cec95113508d86dbdb | 606cd26b69f648e1f151c024d38baa6ab1d7d0c8 | refs/heads/master | 2023-09-01T11:54:32.797061 | 2023-08-21T19:21:20 | 2023-08-21T19:21:48 | 139,463,182 | 736 | 180 | Apache-2.0 | 2023-08-14T06:28:47 | 2018-07-02T15:47:02 | Python | UTF-8 | Python | false | false | 9,872 | py | cross_feature_stats_generator.py | # Copyright 2019 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 agreed to in writing, ... |
19c000bc5c17a9ab4f39ad1e725a5a2240cc5a45 | 5b7c2feb27a71837edf526315d413706a6bf82ff | /mmf/datasets/databases/scene_graph_database.py | bc778a2fb4b3e9a37afca4bb80a18eac986b2fb9 | [
"BSD-3-Clause"
] | permissive | facebookresearch/mmf | df675223566dc8fb2359aa3e1a2d49db5e3c2b9a | 63f76fbcfe2d056b88734fc41a983251d20e6c61 | refs/heads/main | 2023-08-23T23:40:46.827046 | 2023-07-11T06:18:50 | 2023-07-11T06:18:50 | 138,831,170 | 2,432 | 592 | NOASSERTION | 2023-08-11T20:26:11 | 2018-06-27T04:52:40 | Python | UTF-8 | Python | false | false | 487 | py | scene_graph_database.py | # Copyright (c) Facebook, Inc. and its affiliates.
from mmf.datasets.databases.annotation_database import AnnotationDatabase
class SceneGraphDatabase(AnnotationDatabase):
def __init__(self, config, scene_graph_path, *args, **kwargs):
super().__init__(config, scene_graph_path, *args, **kwargs)
self... |
e8c7b249e221809effac8447acc6cc5298dc6ac7 | e210c28eeed9d38eb78c14b3a6388eca1e0e85d8 | /nvflare/fuel/utils/fsm.py | b09e62867abcb17a8ebe0039c32b49b694555f45 | [
"Apache-2.0"
] | permissive | NVIDIA/NVFlare | 5a2d2e4c85a3fd0948e25f1ba510449727529a15 | 1433290c203bd23f34c29e11795ce592bc067888 | refs/heads/main | 2023-08-03T09:21:32.779763 | 2023-07-05T21:17:16 | 2023-07-05T21:17:16 | 388,876,833 | 442 | 140 | Apache-2.0 | 2023-09-14T19:12:35 | 2021-07-23T17:26:12 | Python | UTF-8 | Python | false | false | 3,137 | py | fsm.py | # Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
1dfe6c4990af2eb9f4c5ef3e407c9d8bfd472e83 | 32ebd1bf59f0e9be34363e3c9e34b10d2cf3eb9e | /2021/Misc/blackStab Cloud/Handout/server/server.py | a50cf49b19536eeeec8e21f41cee804be8f9bfe9 | [] | no_license | teambi0s/InCTFi | d7fb450ec7b8b08e36dcee656d6111d9bd14127c | b249e5b41dba80bcbfc6ccd986c8fd64d8afa87c | refs/heads/master | 2022-07-22T09:54:58.393301 | 2021-08-19T18:14:40 | 2021-08-19T18:14:40 | 152,749,662 | 139 | 64 | null | 2022-07-05T22:14:31 | 2018-10-12T12:48:23 | CSS | UTF-8 | Python | false | false | 8,701 | py | server.py | import socket
from time import sleep
from blackStab.utils import *
from binascii import hexlify, unhexlify
from _thread import start_new_thread
from blackStab.cloud import console as cshell
from blackStab.cloud import accounts as manager
def main(host, port):
try:
s = socket.socket(socket.AF_INET, socket.S... |
2f9b4b02564583eabf7dd3fc22efb54721c84925 | a1363262959d20fc9b4e1dc12a6a2e97297dd32a | /tftrt/examples-cpp/mnist_demo/mnist_train.py | 18d460951df201c86530cd854fb30fe85d1a66e3 | [
"Apache-2.0"
] | permissive | tensorflow/tensorrt | cfc1baddc5555cdcfc8be3748df38dc3606374d0 | b828e794dea9bd284497e5747152f4efae43b947 | refs/heads/master | 2023-08-24T15:07:13.756635 | 2023-02-07T15:57:39 | 2023-02-07T15:57:54 | 157,606,202 | 753 | 264 | Apache-2.0 | 2022-12-13T12:27:53 | 2018-11-14T20:22:24 | Jupyter Notebook | UTF-8 | Python | false | false | 2,353 | py | mnist_train.py | # Copyright 2021 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... |
84aae6e1b3538f16eeda8037a5fc32ecb7e11a6a | f8c5b73c9706470c4dd60d523096e18bc448a960 | /certbot-dns-nsone/certbot_dns_nsone/_internal/__init__.py | 40a095edfd6727c1bdf707073fa7c936068cbf59 | [
"Apache-2.0",
"MIT"
] | permissive | certbot/certbot | 14ab43d76fcf0242d875d551f0d98334c43e7957 | b1978ff18837e40d16eedf2090330af53d8ceaa5 | refs/heads/master | 2023-09-04T00:37:03.739195 | 2023-08-26T23:19:38 | 2023-08-26T23:19:38 | 26,516,210 | 18,581 | 3,265 | NOASSERTION | 2023-09-12T15:18:59 | 2014-11-12T02:52:20 | Python | UTF-8 | Python | false | false | 72 | py | __init__.py | """Internal implementation of `~certbot_dns_nsone.dns_nsone` plugin."""
|
56bb47ea9fdf6333e94eade74fe17e0c02f8e22e | 091a6200be74bf6577c86f623665bcc24e16b02b | /I2C_Multiple_Same_Address/circuitpython/multi_bme280_4x/code.py | e078c93f6fa445c7f51bdde5cb5c129c342a3887 | [
"MIT"
] | permissive | adafruit/Adafruit_Learning_System_Guides | b5f7bce40a16da64e7a79d4b39de032f2cca41d4 | 5eaa7a15a437c533b89f359a25983e24bb6b5438 | refs/heads/main | 2023-09-05T18:31:41.621956 | 2023-09-05T15:36:09 | 2023-09-05T15:36:09 | 105,065,494 | 937 | 937 | MIT | 2023-09-12T18:48:53 | 2017-09-27T20:22:44 | C | UTF-8 | Python | false | false | 1,435 | py | code.py | # SPDX-FileCopyrightText: 2022 Carter Nelson for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import board
import adafruit_tca9548a
from adafruit_bme280 import basic as adafruit_bme280
# Create I2C bus as normal
i2c = board.I2C() # uses board.SCL and board.SDA
# i2c = board.STEMMA_I2C() # For us... |
72f554db5c9495a811da44b5fc393a84b8d0c2d3 | abe6c00f9790df7e6ef20dc02d0b1b225b5020cb | /tests/packaging/test_docker_packager.py | 205882bc07c5203c9c08e7a4058b3ddf20adbb81 | [
"Apache-2.0"
] | permissive | PrefectHQ/prefect | 000e6c5f7df80f76a181f0a30f8661c96417c8bd | 2c50d2b64c811c364cbc5faa2b5c80a742572090 | refs/heads/main | 2023-09-05T20:25:42.965208 | 2023-09-05T18:58:06 | 2023-09-05T18:58:06 | 139,199,684 | 12,917 | 1,539 | Apache-2.0 | 2023-09-14T20:25:45 | 2018-06-29T21:59:26 | Python | UTF-8 | Python | false | false | 8,012 | py | test_docker_packager.py | import re
import textwrap
import warnings
from io import BytesIO
from pathlib import Path, PurePosixPath
from tarfile import TarFile, TarInfo
import pytest
from prefect.packaging.docker import DockerPackageManifest, DockerPackager
from prefect.software.conda import CondaEnvironment
from prefect.software.python import... |
c076231ea11077436d341263e7bc098568a52f5c | 278ccf2860d1bd737f5d70136e8a1c309dbea8a8 | /kubernetes_py/models/v1/NodeSelectorTerm.py | bc9aceb7c49509aaf85f8f43e6406090d07413df | [
"Apache-2.0"
] | permissive | mnubo/kubernetes-py | 3b0f9c0655bcaccb6c3aa172b1d85ce67872d53c | 5a3a365375a49ec85ed7a25fe7fce4e74f17be86 | refs/heads/master | 2021-07-16T20:21:05.161888 | 2020-04-19T15:21:12 | 2020-04-19T15:21:12 | 49,596,156 | 139 | 58 | Apache-2.0 | 2021-06-02T01:35:17 | 2016-01-13T19:22:10 | Python | UTF-8 | Python | false | false | 1,755 | py | NodeSelectorTerm.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is subject to the terms and conditions defined in
# file 'LICENSE.md', which is part of this source code package.
#
from kubernetes_py.models.v1.NodeSelectorRequirement import NodeSelectorRequirement
from kubernetes_py.utils import is_valid_list
class Node... |
9d5d6b9b503c270c63b91a573fae7a2e2602a73e | ca9b7710fbbf465ffc14896f4b32e39f0c0d813c | /pdf-password-breaker/passwordBreaker.py | 448ce8c1de8eb9e175404126029f065ed6a9c8f6 | [
"MIT"
] | permissive | kudeh/automate-the-boring-stuff-projects | 80e782281eeb3bb9d0a3ef2074fa0802b2c04482 | 6889aa930cb198e52557d4cfe0dd4bbb0da92ef4 | refs/heads/master | 2022-12-11T09:46:23.765200 | 2021-07-31T15:00:04 | 2021-07-31T15:00:04 | 174,255,855 | 346 | 100 | MIT | 2022-12-08T05:09:11 | 2019-03-07T02:22:13 | Python | UTF-8 | Python | false | false | 1,070 | py | passwordBreaker.py | #! python3
# passwordBreaker.py
# Author: Kene Udeh
# Source: Automate the Boring stuff with python Ch. 13 Project
import os
import PyPDF2
def breakPassword(filename):
"""Breaks a single word password of a PDF
Args:
filename (str): Filename for encrypted pdf
Returns:
None
"""
en... |
a60a0afc2e707e282e3109068ffb9a3b20ee555a | ae9c05da72fccc064d62d551bcf14be24e14baa7 | /scripts/zfs_root_gen_bash.py | f3384b2093befa55578cdcd88fc3867653617e45 | [] | no_license | openzfs/openzfs-docs | f0c0f6cdbd6aedb3eff321aeb50b6371ec98273a | 469f2e4a020138b6497428c48eea584569efcbcb | refs/heads/master | 2023-08-10T03:33:54.949182 | 2023-07-30T17:37:47 | 2023-07-31T10:40:35 | 265,646,150 | 111 | 208 | null | 2023-09-13T15:54:14 | 2020-05-20T17:59:18 | Python | UTF-8 | Python | false | false | 268 | py | zfs_root_gen_bash.py | #!/usr/bin/env python3
#
# Copyright 2023 Maurice Zhou <yuchen@apvc.uk>
#
# Released without warranty under the terms of the
# Apache License 2.0.
import pylit
pylit.defaults.code_block_markers['shell'] = '::'
pylit.defaults.text_extensions = [".rst"]
pylit.main()
|
86041f64313552f769ca4db1d3aed315b1a420a4 | acf80e5a2a68bb5ed929ad158fa98a606009e73b | /sagemaker/28_train_llms_with_qlora/scripts/run_clm.py | 771708950549f21e87f348c70c25b83af125e4b7 | [
"Apache-2.0"
] | permissive | huggingface/notebooks | cf2faab14557b1503ee2a4d38592a8446ec8a0ee | 9a35d43f91529652ce353dfedd73f19c6dd22558 | refs/heads/main | 2023-08-19T03:37:39.536743 | 2023-08-18T21:25:09 | 2023-08-18T21:25:09 | 272,452,525 | 2,626 | 1,227 | Apache-2.0 | 2023-09-12T20:17:28 | 2020-06-15T13:55:11 | Jupyter Notebook | UTF-8 | Python | false | false | 5,524 | py | run_clm.py | import os
import argparse
from transformers import (
AutoModelForCausalLM,
AutoTokenizer,
set_seed,
default_data_collator,
BitsAndBytesConfig,
Trainer,
TrainingArguments,
)
from datasets import load_from_disk
import torch
from peft import PeftConfig, PeftModel
def parse_arge():
"""Pars... |
fa51aff4c3f598bbabc363e4771d1e07997ce436 | 0faf534ebb6db6f32279e5bee25b968bd425ce3a | /examples/thread_multithread_top_nexys4/test_thread_multithread_top.py | 2eb1b7fd1bd2f262f794fdd5fb3bac2c3c6c3e8a | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | PyHDI/veriloggen | e8647cb2d40737d84e31d6b89c5799bab9cbd583 | f2b1b9567150af097eed1b5e79ba2b412854ef43 | refs/heads/develop | 2023-08-09T10:02:35.626403 | 2023-08-09T00:50:14 | 2023-08-09T00:50:14 | 37,813,184 | 282 | 60 | Apache-2.0 | 2023-07-20T03:03:29 | 2015-06-21T15:05:30 | Python | UTF-8 | Python | false | false | 303,573 | py | test_thread_multithread_top.py | from __future__ import absolute_import
from __future__ import print_function
import veriloggen
import thread_multithread_top
expected_verilog = """
module test;
reg CLK;
reg RST;
reg btnC;
reg btnU;
reg btnL;
reg btnR;
reg btnD;
reg [16-1:0] sw;
wire [16-1:0] led;
blinkled
uut
(
.CLK(CLK)... |
c0aaef63aeb8626fe7e42cbdf0af5ae2fff40490 | f305f84ea6f721c2391300f0a60e21d2ce14f2a5 | /9_排序和搜索/经典题/自定义比较函数/1996. 游戏中弱角色的数量.py | 6fcc75af1ffbc773cf61c7a018cc69573c39871a | [] | 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 | 868 | py | 1996. 游戏中弱角色的数量.py | from typing import List
# 2 <= properties.length <= 105
# 如果存在一个其他角色的攻击和防御等级 都`严格高于` 该角色的攻击和防御等级,则认为该角色为 弱角色
# 一个降序,一个升序排列即可
class Solution:
def numberOfWeakCharacters(self, properties: List[List[int]]) -> int:
properties.sort(key=lambda x: (x[0], -x[1]))
res = 0
preMax = -in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.