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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e7209a0bd2b7b87d99e1558d768d6eda8f0cfd14 | ed7e61c8eef7fb2213adeb67557d605470c17fb3 | /medium/query-builders/orms4.py | a6470f485b09e29d8fc41e15c0811470ef1b72b6 | [] | no_license | MartinThoma/algorithms | 535840224323822f2ea6b7dd6f82a0fdd22a0ff9 | a251e9599b685dbf89c891f02d20fefd8538ead5 | refs/heads/master | 2023-02-23T17:58:10.913634 | 2023-02-21T05:58:59 | 2023-02-21T05:58:59 | 4,939,076 | 241 | 126 | null | 2023-02-16T05:16:23 | 2012-07-07T16:07:23 | Python | UTF-8 | Python | false | false | 383 | py | orms4.py | # Core Library modules
from typing import List
# First party modules
from orms2 import Author, Book, db_connection
@db_connection
def get_titles_by_author(session, author_id: int) -> List[str]:
books = session.query(Book.title).filter(Book.author_id == author_id).all()
return [book.title for book in books]
... |
59367768c3c66c2f52aca8429ac5901025431fd3 | b049a961f100444dde14599bab06a0a4224d869b | /sdk/python/pulumi_azure_native/containerstorage/v20230701preview/_enums.py | fa8776c61c2274708fd6bb165bffa772ab69831a | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure-native | b390c88beef8381f9a71ab2bed5571e0dd848e65 | 4c499abe17ec6696ce28477dde1157372896364e | refs/heads/master | 2023-08-30T08:19:41.564780 | 2023-08-28T19:29:04 | 2023-08-28T19:29:04 | 172,386,632 | 107 | 29 | Apache-2.0 | 2023-09-14T13:17:00 | 2019-02-24T20:30:21 | Python | UTF-8 | Python | false | false | 1,919 | py | _enums.py | # coding=utf-8
# *** WARNING: this file was generated by pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'AzureDiskSkuName',
'ElasticSanSkuName',
'ManagedServiceIdentityType',
'ReclaimPolicy',
'Zone',
]
class AzureDis... |
b40188e9938b0cea898b8fac80f88a07dd39fcab | e22eeb5256e17a96a98b3ff25433aec2d641cd2c | /openstack/tests/functional/network/v2/test_agent_add_remove_router.py | 7a3b305b4ce94a49548c7bb98c9c10ac0d35d7d9 | [
"Apache-2.0"
] | permissive | openstack/openstacksdk | b4b95fd7869653feea5a3b783e9a5c588235c039 | d474eb84c605c429bb9cccb166cabbdd1654d73c | refs/heads/master | 2023-09-03T22:50:03.398512 | 2023-07-27T14:09:35 | 2023-08-29T16:28:46 | 16,223,378 | 124 | 130 | Apache-2.0 | 2023-09-06T02:52:47 | 2014-01-25T02:48:00 | Python | UTF-8 | Python | false | false | 2,130 | py | test_agent_add_remove_router.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... |
70b7dd1a87381a33157559f0e319d238b330cec2 | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /govern/data-meta/OpenMetadata/ingestion/src/metadata/ingestion/models/encoders.py | a322a796d54047983d7cda46a0850e1344eeffe7 | [
"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 | 1,147 | py | encoders.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... |
0cf2af831851113f39b4a7e9db9e2e160f0c8b79 | e441a2f416c83f04889ecd43d6b6bdcf5172b287 | /web3/beacon/main.py | 9db36914452c72524fd9f9d69c23a77d23b97223 | [
"MIT"
] | permissive | ethereum/web3.py | f8d66eefaa84d30fa51a0978d1d1c44c6807b355 | 76da2146267fa03760f35c33ca8b9a96d9e24835 | refs/heads/main | 2023-08-31T18:34:30.144026 | 2023-08-29T15:43:25 | 2023-08-29T15:43:25 | 56,251,096 | 4,403 | 1,680 | MIT | 2023-09-14T20:46:08 | 2016-04-14T15:59:35 | Python | UTF-8 | Python | false | false | 4,772 | py | main.py | from typing import (
Any,
Dict,
)
from eth_typing import (
URI,
)
from web3._utils.request import (
get_response_from_get_request,
json_make_get_request,
)
from web3.beacon.api_endpoints import (
GET_ATTESTATIONS,
GET_ATTESTER_SLASHINGS,
GET_BEACON_HEADS,
GET_BEACON_STATE,
GET_... |
a4609e97b259b005f010108971de5c659ced54ad | b155fc45b5fbf5f4641308251cdc6152a596a69f | /utils/fix_eqref.py | faabbd27c564a74afd524f9c828a679db7d51364 | [
"LicenseRef-scancode-proprietary-license",
"CC-BY-NC-ND-4.0",
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | clawpack/riemann_book | b8e09f7cd476551aa22fe8df859dc7acb30e7cd3 | b3c8bb94f13251bfd175b366c3fdad9c2550baa4 | refs/heads/master | 2023-02-06T09:02:51.092984 | 2023-01-23T20:56:01 | 2023-01-23T20:56:01 | 32,548,345 | 232 | 92 | BSD-3-Clause | 2023-01-23T20:56:03 | 2015-03-19T21:57:20 | HTML | UTF-8 | Python | false | false | 1,637 | py | fix_eqref.py |
"""
Fix notebooks, replacing \eqref{label} with (\ref{label}).
"""
from __future__ import print_function
import os,sys,glob,re
regexp = re.compile(r"\eqref{(?P<eqlabel>[^}]*)}")
chapters = ['Preface',
'Introduction',
'Advection',
'Acoustics',
'Traffic_flow',
... |
59256b5dec2e5a3bd477f97ee2fac2737e81f0c9 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/helpers/typeshed/stubs/openpyxl/openpyxl/worksheet/_reader.pyi | a12256d3c515c41a6e43b882088e0c22444b4d2a | [
"Apache-2.0",
"MIT"
] | permissive | JetBrains/intellij-community | 2ed226e200ecc17c037dcddd4a006de56cd43941 | 05dbd4575d01a213f3f4d69aa4968473f2536142 | refs/heads/master | 2023-09-03T17:06:37.560889 | 2023-09-03T11:51:00 | 2023-09-03T12:12:27 | 2,489,216 | 16,288 | 6,635 | Apache-2.0 | 2023-09-12T07:41:58 | 2011-09-30T13:33:05 | null | UTF-8 | Python | false | false | 2,393 | pyi | _reader.pyi | from collections.abc import Generator
from typing import Any
CELL_TAG: Any
VALUE_TAG: Any
FORMULA_TAG: Any
MERGE_TAG: Any
INLINE_STRING: Any
COL_TAG: Any
ROW_TAG: Any
CF_TAG: Any
LEGACY_TAG: Any
PROT_TAG: Any
EXT_TAG: Any
HYPERLINK_TAG: Any
TABLE_TAG: Any
PRINT_TAG: Any
MARGINS_TAG: Any
PAGE_TAG: Any
HEADER_TAG: Any
F... |
3e3e0d8da71a3db718dd0fe55ffcbb09ba8d08bd | b064899c887a1e61fe7de325509832cafabf4783 | /integration/tests_failed/timeout.py | 320cdb62c8c02634370f48cca7c2732a98b44b2b | [
"Apache-2.0"
] | permissive | Orange-OpenSource/hurl | 5ac8d0f76a58bf5aecf84ed6f806415ec57d3637 | 591e129469d036092dd5c8a2abc6e54634a25ee3 | refs/heads/master | 2023-08-20T07:51:26.952940 | 2023-08-18T03:01:56 | 2023-08-18T12:21:50 | 290,243,101 | 5,727 | 257 | Apache-2.0 | 2023-09-14T16:05:18 | 2020-08-25T14:50:56 | Rust | UTF-8 | Python | false | false | 104 | py | timeout.py | from app import app
import time
@app.route("/timeout")
def timeout():
time.sleep(2)
return ""
|
6e91ee6c79f5bae96a8db42a314d645f923e1d27 | ab40571d5051ad53c0f205fa797ba36eac516d06 | /language/capwap/preprocessing/v7w_qa.py | f41c9e66f9f386ad7bfe79b3bbfd22b790e6a7da | [
"Apache-2.0",
"LicenseRef-scancode-generic-cla"
] | permissive | google-research/language | e941b1a92ab46d40d8d03bb0c314905cb6902ce2 | ac9447064195e06de48cc91ff642f7fffa28ffe8 | refs/heads/master | 2023-08-24T23:10:13.207294 | 2023-05-25T20:47:18 | 2023-05-25T22:29:27 | 153,201,352 | 1,567 | 371 | Apache-2.0 | 2023-07-06T23:03:15 | 2018-10-16T00:58:14 | Python | UTF-8 | Python | false | false | 6,317 | py | v7w_qa.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 ... |
9cbf7f0e2ec148d1d5de76a6461341288ce6c031 | 76fb0a3cfc9d9362ab29174bd1d55e888ea4d7f6 | /tfx/orchestration/python_execution_binary/python_execution_binary_utils_test.py | ba597e8d66e6e1710fab830fbe7a328ba02dd703 | [
"Apache-2.0"
] | permissive | tensorflow/tfx | 0cfc9c55171352ecc98c9dfa8ffe976c689d7073 | 1b328504fa08a70388691e4072df76f143631325 | refs/heads/master | 2023-08-30T11:56:50.894497 | 2023-08-29T22:47:19 | 2023-08-29T22:48:26 | 169,116,405 | 2,116 | 899 | Apache-2.0 | 2023-09-14T21:51:42 | 2019-02-04T17:14:36 | Python | UTF-8 | Python | false | false | 4,798 | py | python_execution_binary_utils_test.py | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
f481036471b9c931a4b41779f05bab3637559f7b | 110b78ebb3858d3adc79d795c237e0eae83d11e8 | /oscarapi/serializers/exceptions.py | 022e7036fa1f1c60df2b1711578e87c187da426f | [
"BSD-2-Clause"
] | permissive | django-oscar/django-oscar-api | e7fa842d751d6ab1f4c4b4094001859e5a591f06 | 79cecbc136cdf75c5f47beaf68fa7002e3c431ce | refs/heads/main | 2023-08-29T04:42:37.430275 | 2023-07-21T08:36:47 | 2023-07-21T08:36:47 | 8,760,389 | 354 | 239 | NOASSERTION | 2023-08-31T06:22:19 | 2013-03-13T20:05:58 | Python | UTF-8 | Python | false | false | 362 | py | exceptions.py | from rest_framework.exceptions import _get_error_details
class FieldError(Exception):
default_code = "field_error"
def __init__(self, detail, code=None):
if code is None:
code = self.default_code
self.code = code
self.detail = _get_error_details(detail, code)
supe... |
fd8c53005aa5109fbd71c8f1a5398dbbc77c3619 | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /telegram__telethon__examples/hello_world.py | 5c80364a285a232ff2ed71666faf69730f9da177 | [
"CC-BY-4.0"
] | permissive | gil9red/SimplePyScripts | bd2733372728bf9b9f00570e90316fa12116516b | 773c2c9724edd8827a1dbd91694d780e03fcb05a | refs/heads/master | 2023-08-31T04:26:09.120173 | 2023-08-30T17:22:59 | 2023-08-30T17:22:59 | 22,650,442 | 157 | 46 | null | 2023-09-08T17:51:33 | 2014-08-05T16:19:52 | Python | UTF-8 | Python | false | false | 718 | py | hello_world.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
# SOURCE: https://github.com/LonamiWebs/Telethon
# SOURCE: https://my.telegram.org/apps
# pip install telethon
from telethon.sync import TelegramClient, events
from config import API_ID, API_HASH
with TelegramClient("my", API_ID, API_HASH) a... |
7d58d4d88c13b07f593a5b385147a92d2f776de2 | 971e0efcc68b8f7cfb1040c38008426f7bcf9d2e | /tests/periodicities/Week/Cycle_Week_1600_W_360.py | 6488833ea03325ef32fa448cb16075886bb5147c | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | antoinecarme/pyaf | a105d172c2e7544f8d580d75f28b751351dd83b6 | b12db77cb3fa9292e774b2b33db8ce732647c35e | refs/heads/master | 2023-09-01T09:30:59.967219 | 2023-07-28T20:15:53 | 2023-07-28T20:15:53 | 70,790,978 | 457 | 77 | BSD-3-Clause | 2023-03-08T21:45:40 | 2016-10-13T09:30:30 | Python | UTF-8 | Python | false | false | 84 | py | Cycle_Week_1600_W_360.py | import tests.periodicities.period_test as per
per.buildModel((360 , 'W' , 1600));
|
53ddc1482b878ef2b196b2948977e392376448e6 | d4a88b3b102e20e727cae8fbd4167dcb4b57d1ec | /pymunk/_pickle.py | 99bc30a735584b26b67e6812c47ac708bf3017f5 | [
"MIT"
] | permissive | viblo/pymunk | ca64888e45706db431788368ff8464edf2912d5f | 20ac14f665fb38b4ef1bef5acea36a3d612dd0d5 | refs/heads/master | 2023-08-27T16:37:14.740653 | 2023-08-16T19:26:16 | 2023-08-16T19:26:16 | 13,273,472 | 855 | 255 | MIT | 2023-01-13T10:13:47 | 2013-10-02T14:36:46 | Python | UTF-8 | Python | false | false | 1,855 | py | _pickle.py | import copy
from typing import Any, ClassVar, Dict, List, Tuple, TypeVar
T = TypeVar("T", bound="PickleMixin")
_State = Dict[str, List[Tuple[str, Any]]]
class PickleMixin:
"""PickleMixin is used to provide base functionality for pickle/unpickle
and copy.
"""
_pickle_attrs_init: ClassVar[List[str]] =... |
52fc91654b2674f101b62f0f6745bfc81347ee69 | 100bfa827dacb23637d3dd2d1396a830c7d9a4b2 | /workspace/example.py | 754ed62a1bcd000de6bd8f34223649f5e3481e94 | [
"Apache-2.0"
] | permissive | jdf/processing.py | 82b37e5b1f4ce68825b5fe919205362ecdc16993 | f38544c70892c7534f059e8acc1c9a492e2b7c86 | refs/heads/master | 2023-08-26T01:42:50.442853 | 2023-02-15T21:33:12 | 2023-02-15T21:33:12 | 833,574 | 1,399 | 246 | Apache-2.0 | 2023-02-21T12:28:09 | 2010-08-12T14:29:22 | Python | UTF-8 | Python | false | false | 635 | py | example.py |
import jycessing.primitives.PrimitiveFloat as Float
# Enable this to create a standalone version
#import launcher
#launcher.create()
# Use this for libraries such as "Ani"
f = Float(10.0)
# Little test that the console output (or redirection
# if started with "--redirect") works
print("You should see this in you... |
1767f5e7559b18880c153d54ccc65bf2ec4d4d31 | 8294fbe3389bebe56c42f958c87e0482c412887d | /February/danielquinn.py | c8a9e14f9b93b8857b270063778bd46f6c3b7336 | [] | no_license | py-study-group/challenges | 8717376d1f44c4846d05052e8446b647f84c26f6 | 9129f48fb7c61fb5610c16e8da427149f0a9ed0a | refs/heads/master | 2021-01-20T08:37:14.224261 | 2018-02-28T16:27:52 | 2018-02-28T16:27:52 | 90,166,445 | 133 | 70 | null | 2018-02-28T10:22:04 | 2017-05-03T15:48:15 | Python | UTF-8 | Python | false | false | 3,031 | py | danielquinn.py | #!/usr/bin/env python3
import sys
import enchant
class NothingLooksRightError(Exception):
pass
class Caesar:
"""
This makes a number of assumptions:
1. Only letters wrap in the cipher. This means that other forms of
punctuation, including spaces, quotes and brackets won't be shifted.
... |
29f5f9045590eba0d2cb57145ca9cccc4a11d586 | a9d9df92f8a61fa3f3649b408e8457b8fdb0b85a | /knowledge_repo/app/utils/time.py | f87e1a142ff21235b32f5d02538b27b5f5ba7baa | [
"Apache-2.0"
] | permissive | airbnb/knowledge-repo | ae7e122e10e505c568511999cf55352eb74646e1 | 71fd3fd42db7866257f86f37235ca0b5d81f5378 | refs/heads/master | 2023-07-23T08:06:15.180434 | 2023-04-17T04:04:39 | 2023-04-17T04:04:39 | 65,949,398 | 5,668 | 846 | Apache-2.0 | 2023-07-20T11:16:46 | 2016-08-17T23:32:50 | Python | UTF-8 | Python | false | false | 697 | py | time.py | from datetime import datetime
def time_since(dt, human_readable=False, default=None):
if dt is None:
return default
assert isinstance(dt, datetime)
delta = (datetime.utcnow() - dt).total_seconds()
if human_readable:
return human_readable_time_delta(delta)
return delta
def human_r... |
4d08ab39ef65695d17b2dbf26ce025a2570ad431 | b7163b44b679e082fe97cf7fcd0c73b2fcdb38eb | /modules/dbnd-airflow-monitor/src/airflow_monitor/shared/utils.py | 4ef3a402afbf44dbe0ff8ff745cfed2a2e19576e | [
"Apache-2.0"
] | permissive | databand-ai/dbnd | 70c95d95e12bfb8ab471a6dce27691ed658cb92d | d59c99dcdcd280d7eec36a693dd80f8c8c831ea2 | refs/heads/develop | 2023-06-24T18:07:56.524526 | 2023-05-28T07:57:36 | 2023-05-28T07:57:36 | 231,361,064 | 257 | 33 | Apache-2.0 | 2023-08-06T08:30:28 | 2020-01-02T10:42:47 | Python | UTF-8 | Python | false | false | 1,340 | py | utils.py | # © Copyright Databand.ai, an IBM Company 2022
import os
import attr
from dbnd.utils.api_client import ApiClient
DEFAULT_REQUEST_TIMEOUT = 30 # Seconds
@attr.s(auto_attribs=True)
class TrackingServiceConfig:
url: str
access_token: str
user: str
password: str
@classmethod
def from_env(cl... |
9e2539fbc180ec7f8eddaffe1c27ba5da61b246e | fce81b804cae23f525a5ad4370b684bf0dc531a5 | /numpy/array_api/tests/test_array_object.py | 90517615f1b2d7c72cd448938340f089935279e6 | [
"Zlib",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | numpy/numpy | ba2abcc1d2d46affbb6aabe5aed6407b4b57507e | dc2ff125493777a1084044e6cd6857a42ee323d4 | refs/heads/main | 2023-09-05T10:10:52.767363 | 2023-09-04T18:03:29 | 2023-09-04T18:03:29 | 908,607 | 25,725 | 11,968 | BSD-3-Clause | 2023-09-14T21:26:09 | 2010-09-13T23:02:39 | Python | UTF-8 | Python | false | false | 17,016 | py | test_array_object.py | import operator
from numpy.testing import assert_raises, suppress_warnings
import numpy as np
import pytest
from .. import ones, asarray, reshape, result_type, all, equal
from .._array_object import Array
from .._dtypes import (
_all_dtypes,
_boolean_dtypes,
_real_floating_dtypes,
_floating_dtypes,
... |
e808039653c8ec90e91a28ee26dfdd264290fc57 | c4b8e1e09dedbccd37ca008ecaaca4438610bbaf | /cpmpy/all_different_modulo.py | b0a52fa854a352e2a12da7d3e073a48c3f593755 | [
"MIT"
] | permissive | hakank/hakank | 4806598b98cb36dd51b24b0ab688f52dadfe9626 | c337aaf8187f15dcdc4d5b09cd2ed0dbdb2e72c2 | refs/heads/master | 2023-08-15T00:21:52.750270 | 2023-07-27T16:21:40 | 2023-07-27T16:21:40 | 11,933,517 | 336 | 97 | MIT | 2023-07-27T11:19:42 | 2013-08-06T20:12:10 | JavaScript | UTF-8 | Python | false | false | 1,033 | py | all_different_modulo.py | """
All different modulo in cpmpy.
From Global Constraint Catalogue
http://www.emn.fr/x-info/sdemasse/gccat/Calldifferent_modulo.html
'''
Enforce all variables of the collection VARIABLES to have a distinct
rest when divided by M.
Example
(<25, 1,14, 3>, 5)
The equivalence classes associated with values 25, 1, 14 a... |
7b481ad31592eaab28802125f4959021e9d807d0 | e391a89618ced6acc33a47c30060ba49ac975326 | /bff_positioning/data/dataset_handling.py | 65bbbab4c16de04b4ce59894a497be75993e85a8 | [
"MIT"
] | permissive | gante/mmWave-localization-learning | a90f7f574cce97604770e3850bdd34dc335fa4f0 | 2549fd500766a3a5ec7c417b7c01ac8eaad18fa3 | refs/heads/master | 2023-04-06T06:21:53.845493 | 2023-03-25T12:56:23 | 2023-03-25T12:56:23 | 128,225,040 | 105 | 34 | MIT | 2023-03-25T12:56:25 | 2018-04-05T15:20:48 | Python | UTF-8 | Python | false | false | 14,479 | py | dataset_handling.py | """ Python module that contains functions to manipulate the datasets used to train the models
"""
import logging
import concurrent.futures
import numpy as np
from sklearn.preprocessing import Binarizer, Normalizer
def create_noisy_features(
features,
labels,
experiment_settings,
data_parameters,
):
... |
58ec456fb3aab0fc29cd374b349a9d813378d528 | da1500e0d3040497614d5327d2461a22e934b4d8 | /third_party/chromium/media/filters/fuchsia/DEPS | 03a54a2749f728a83936c9a3d44667ab1ae4e81f | [
"BSD-3-Clause",
"GPL-1.0-or-later",
"LGPL-2.0-or-later",
"Apache-2.0",
"MIT"
] | permissive | youtube/cobalt | 34085fc93972ebe05b988b15410e99845efd1968 | acefdaaadd3ef46f10f63d1acae2259e4024d383 | refs/heads/main | 2023-09-01T13:09:47.225174 | 2023-09-01T08:54:54 | 2023-09-01T08:54:54 | 50,049,789 | 169 | 80 | BSD-3-Clause | 2023-09-14T21:50:50 | 2016-01-20T18:11:34 | null | UTF-8 | Python | false | false | 77 | DEPS | include_rules = [
"+components/viz/common/gpu/raster_context_provider.h",
] | |
6493803b63d4253fa0db374bee579e2495426917 | 3982e6daf88e453c726f6b39a081fc37ce15a08a | /discovery-provider/src/models/playlists/aggregate_playlist.py | 7b3b4e1d29b954a352265fc9e02ec211820a4b5c | [
"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 | 440 | py | aggregate_playlist.py | from sqlalchemy import Boolean, Column, Integer, text
from src.models.base import Base
from src.models.model_utils import RepresentableMixin
class AggregatePlaylist(Base, RepresentableMixin):
__tablename__ = "aggregate_playlist"
playlist_id = Column(Integer, primary_key=True)
is_album = Column(Boolean)
... |
7b7dd55a3affd0ffd9182dc9bb4ba112444f11b1 | f729993e43a8f2031a4ad5c766e63117588b4312 | /mmengine/runner/amp.py | 964518fc90ca9f949f74e1f38421cf9fefb5cfcd | [
"Apache-2.0"
] | permissive | open-mmlab/mmengine | d28a41c4b3dac47c58ee19b241c4b963eb14ddb6 | 170758aefe6cb05f61bf9353d03af1b8c1f4f73a | refs/heads/main | 2023-08-29T18:12:33.261889 | 2023-08-28T08:15:00 | 2023-08-28T08:15:00 | 456,857,425 | 708 | 279 | Apache-2.0 | 2023-09-14T09:23:21 | 2022-02-08T09:05:09 | Python | UTF-8 | Python | false | false | 6,213 | py | amp.py | # Copyright (c) OpenMMLab. All rights reserved.
import logging
from contextlib import contextmanager
from typing import Optional
import torch
from mmengine.device import (get_device, is_cuda_available, is_mlu_available,
is_npu_available)
from mmengine.logging import print_log
from mmengin... |
574d2464fbbdece176548a5ee7ee2f28b94426b4 | 50dd46b8ece33f3cdd174284b15d1d51f89669d4 | /2021/quals/rev-polymorph/targets/patchbytes.py | be16e79f63b55c33b12f9cec3fe2c0550a2e76cc | [
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] | permissive | google/google-ctf | f99da1ee07729bbccb869fff1cbaed6a80e43bcc | df02323eaf945d15e124801c74abaadca2749dc7 | refs/heads/master | 2023-08-31T14:30:27.548081 | 2023-08-29T13:04:20 | 2023-08-29T13:04:20 | 131,317,137 | 4,136 | 607 | Apache-2.0 | 2023-08-30T22:17:02 | 2018-04-27T15:56:03 | Go | UTF-8 | Python | false | false | 1,423 | py | patchbytes.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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
b749df6262eecbec9571f9d018c71e7b2fb1b4e1 | e2de6afe0c5b5f09711c2a9892fd016d783988f7 | /flask_limiter/typing.py | 79c357b6e027cda5f41892e46f8cf1255f5a6737 | [
"MIT"
] | permissive | alisaifee/flask-limiter | 17db18a438577ab0e5783d8e605b2dddfce886ab | 0911d879613210696e5211d75873c6e1777bae98 | refs/heads/master | 2023-08-29T18:04:03.240312 | 2023-08-29T15:55:22 | 2023-08-29T15:55:57 | 16,754,889 | 1,024 | 153 | MIT | 2023-09-11T13:41:25 | 2014-02-12T03:37:41 | Python | UTF-8 | Python | false | false | 387 | py | typing.py | from typing import (
Callable,
Dict,
List,
Optional,
Sequence,
Set,
Tuple,
TypeVar,
Union,
cast,
)
from typing_extensions import ParamSpec
R = TypeVar("R")
P = ParamSpec("P")
__all__ = [
"R",
"P",
"Callable",
"Dict",
"List",
"Optional",
"Union",
... |
e326fabe778e6d2363fa5d0098ee6ce5a1e3c76a | ffdc77394c5b5532b243cf3c33bd584cbdc65cb7 | /mindspore/python/mindspore/ops/operations/sparse_ops.py | f10ef561c14e45510c0f4aa2cf0553c515624689 | [
"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 | 141,965 | py | sparse_ops.py | # coding: utf-8
# Copyright 2020-2022 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 appli... |
266da03598ee935d9c4850ae409874717c5fed0d | 002d925a46fef6867c7092935a5a4113a11cf0c5 | /care/hcx/models/base.py | dcc43f1270de79f20683d466f35d061c2b6a2dfa | [
"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,623 | py | base.py | def reverse_choices(choices):
output = {}
for choice in choices:
output[choice[1]] = choice[0]
return output
# http://hl7.org/fhir/fm-status
STATUS_CHOICES = [
("active", "Active"),
("cancelled", "Cancelled"),
("draft", "Draft"),
("entered-in-error", "Entered in Error"),
]
REVERSE_... |
b24aae58020ffbe290d6f42bb398fc9d7c6a87ee | d511640a2b98b0682225c302798c3b806542171e | /app/locking.py | b5748364a4d38fe7b44cef421be68536d0113165 | [
"MIT"
] | permissive | hauxir/rapidbay | 3a28d65ca185981c537dbd3c4c9b460a0830b650 | 6e29d939bfe0290823cd3f42ecec285ec7418a8c | refs/heads/master | 2023-08-16T04:41:19.645580 | 2023-06-25T22:44:17 | 2023-06-25T22:44:17 | 157,281,525 | 632 | 55 | MIT | 2023-07-24T13:07:28 | 2018-11-12T21:47:27 | Python | UTF-8 | Python | false | false | 729 | py | locking.py | import threading
import time
from contextlib import contextmanager
class LockManager:
locks = {}
def get(self, key):
thread_id = threading.get_ident()
while self.locks.get(key) not in [None, thread_id, None]:
time.sleep(1)
self.locks[key] = thread_id
def release(self,... |
677c603bd9926650648839897c642d4ef4fad825 | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /for_games/ign_com__the_best_100_video_games_of_all_time.py | 207f817dd2828acafd9c8ef78f7a060ccd80b57a | [
"CC-BY-4.0"
] | permissive | gil9red/SimplePyScripts | bd2733372728bf9b9f00570e90316fa12116516b | 773c2c9724edd8827a1dbd91694d780e03fcb05a | refs/heads/master | 2023-08-31T04:26:09.120173 | 2023-08-30T17:22:59 | 2023-08-30T17:22:59 | 22,650,442 | 157 | 46 | null | 2023-09-08T17:51:33 | 2014-08-05T16:19:52 | Python | UTF-8 | Python | false | false | 2,746 | py | ign_com__the_best_100_video_games_of_all_time.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
import requests
from bs4 import BeautifulSoup
session = requests.session()
session.headers[
"User-Agent"
] = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:92.0) Gecko/20100101 Firefox/92.0"
url = "https://www.ign.com/articles/the-best-100... |
4e64470cac7ce605a087e6a17f917212b76dd629 | b347bc4b850dee4a8a9a171b563a3f31230ce1c7 | /sktime/clustering/tests/metrics/test_medoids.py | 970a373b64f798d833f42b29ab1f2ed3f7ee2d17 | [
"BSD-3-Clause"
] | permissive | sktime/sktime | 5963962df338c5931a2f9f1794d1203c50ddc27e | 70b2bfaaa597eb31bc3a1032366dcc0e1f4c8a9f | refs/heads/main | 2023-08-22T18:20:08.022950 | 2023-08-22T15:24:39 | 2023-08-22T15:24:39 | 156,401,841 | 1,117 | 268 | BSD-3-Clause | 2023-09-14T20:44:21 | 2018-11-06T15:08:24 | Python | UTF-8 | Python | false | false | 615 | py | test_medoids.py | """Tests for medoids."""
import numpy as np
from sktime.clustering.metrics.medoids import medoids
from sktime.distances.tests._utils import create_test_distance_numpy
def test_medoids():
"""Test medoids."""
X = create_test_distance_numpy(10, 3, 3, random_state=2)
test_medoids = medoids(X)
assert np.a... |
e79d002332122cfa385b2cfb3b355055026a6def | 48ee50316a950d9bc789ae843477b58b2913bf0d | /src/app/beer_garden/api/http/authentication/login_handlers/basic.py | 694ecc8ed1e0acbd1ccb651794850a5a378cf5b6 | [
"MIT"
] | permissive | beer-garden/beer-garden | f6d1c305a261b59d3cb3389513fc3138004a8d07 | a5fd2dcc2444409e243d3fdaa43d86695e5cb142 | refs/heads/develop | 2023-08-15T11:50:29.833953 | 2023-07-20T03:20:45 | 2023-07-20T03:20:45 | 120,045,001 | 254 | 38 | MIT | 2023-07-20T03:20:47 | 2018-02-03T00:13:29 | Python | UTF-8 | Python | false | false | 1,424 | py | basic.py | from typing import Optional
from tornado.httputil import HTTPServerRequest
from beer_garden.api.http.authentication.login_handlers.base import BaseLoginHandler
from beer_garden.api.http.schemas.v1.token import TokenInputSchema
from beer_garden.db.mongo.models import User
class BasicLoginHandler(BaseLoginHandler):
... |
4f515696417eadfa9136be80eceef0e7c2c10898 | 08a8c973eaa984b96be2306c325c4a0b3f997aec | /py3status/modules/khal_calendar.py | be959bfea637b9d4ff9db268a0120da41b1ef76c | [] | permissive | ultrabug/py3status | 889ec6679b7aa7d886bc98d86fc4051c7529b469 | 7ada9276ee12fe80491768d60603f8c5e1dc0639 | refs/heads/master | 2023-08-24T02:40:10.865393 | 2023-07-29T15:51:42 | 2023-07-29T15:51:42 | 8,292,338 | 934 | 426 | BSD-3-Clause | 2023-09-10T09:21:17 | 2013-02-19T14:59:13 | Python | UTF-8 | Python | false | false | 2,342 | py | khal_calendar.py | """
Displays upcoming khal events.
Configuration parameters:
cache_timeout: refresh interval for this module (default 60)
config_path: Path to khal configuration file. The default None resolves to /home/$USER/.config/khal/config (default None)
date_end: Until which datetime the module searches for events (... |
fb022aa469738d752bf66326d00f2dc5a4b4f4b7 | 2c1dc7049d820d2b75811a6c0479bd34eb84ad87 | /test/selenium/cspages/accounts/accountspage.py | 15eccd3ffbc2c14614eb51866e3251ddec37dd6c | [
"GPL-2.0-only",
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown"
] | permissive | apache/cloudstack | 3775c9171022dfaf91d655bd166149e36f4caa41 | 819dd7b75c1b61ae444c45476f5834dbfb9094d0 | refs/heads/main | 2023-08-30T15:05:36.976909 | 2023-08-30T09:29:16 | 2023-08-30T09:29:16 | 9,759,448 | 1,468 | 1,232 | Apache-2.0 | 2023-09-14T16:57:46 | 2013-04-29T22:27:12 | Java | UTF-8 | Python | false | false | 8,570 | py | accountspage.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 u... |
7432fc07be7bb72fea132ae5ade093da46ffb706 | fbe68d84e97262d6d26dd65c704a7b50af2b3943 | /third_party/virtualbox/src/VBox/ValidationKit/testmanager/core/testset.py | 3bd49b68d0d32c09694b288416432ab6fed76e58 | [
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"CDDL-1.0",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-1.0-or-later",
"LGPL-2.1-or-later",
"GPL-2.0-or-later",
"MPL-1.0",
"LicenseRef-scancode-generic-exception",
"Apache-2.0",
"OpenSSL",
"MIT"
] | permissive | thalium/icebox | c4e6573f2b4f0973b6c7bb0bf068fe9e795fdcfb | 6f78952d58da52ea4f0e55b2ab297f28e80c1160 | refs/heads/master | 2022-08-14T00:19:36.984579 | 2022-02-22T13:10:31 | 2022-02-22T13:10:31 | 190,019,914 | 585 | 109 | MIT | 2022-01-13T20:58:15 | 2019-06-03T14:18:12 | C++ | UTF-8 | Python | false | false | 36,767 | py | testset.py | # -*- coding: utf-8 -*-
# $Id: testset.py $
"""
Test Manager - TestSet.
"""
__copyright__ = \
"""
Copyright (C) 2012-2017 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
you can redistribute it and/or modify it und... |
0957ad9dbb1b13b140991c84b2bc7a54757cc3b0 | 9a0eb3e292d57b59198c7c66a994372ced9cfa5b | /nodes/1.x/python/Category.Material.py | f308c55818caf588dda1716f30b34455e6054d52 | [
"MIT"
] | permissive | andydandy74/ClockworkForDynamo | 544ddf0893f5c0072fca7934f4e128001771f767 | 528400c667c4c3f2b51814af84e85c8fab8a8059 | refs/heads/master | 2023-08-19T03:07:33.489926 | 2023-08-13T04:31:17 | 2023-08-13T04:31:17 | 15,043,988 | 184 | 100 | MIT | 2023-09-04T18:47:40 | 2013-12-09T10:11:01 | Python | UTF-8 | Python | false | false | 409 | py | Category.Material.py | import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
cats = UnwrapElement(IN[0])
def GetCatMat(cat):
if hasattr(cat, "Material"):
try: return cat.Material.ToDSType(True)
except: return None
else: return None
i... |
b1d05d58b43cc1ea539accf26341964b26af5664 | 6a468c1650b3c083f102f19ace0b0d6e4d0686f7 | /sympy/combinatorics/tests/test_coset_table.py | ab3f62880445c5deb526797ee0623fe3510bcbc3 | [
"BSD-3-Clause",
"MIT"
] | permissive | sympy/sympy | a5f8accaa7686c59d9b5c94212fef60d746dac4b | 69f98fb2b0d845e76874067a381dba37b577e8c5 | refs/heads/master | 2023-09-01T15:51:37.886107 | 2023-08-31T20:54:33 | 2023-08-31T20:54:33 | 640,534 | 10,928 | 5,362 | NOASSERTION | 2023-09-14T17:29:13 | 2010-04-30T20:37:14 | Python | UTF-8 | Python | false | false | 28,474 | py | test_coset_table.py | from sympy.combinatorics.fp_groups import FpGroup
from sympy.combinatorics.coset_table import (CosetTable,
coset_enumeration_r, coset_enumeration_c)
from sympy.combinatorics.coset_table import modified_coset_enumeration_r
from sympy.combinatorics.free_groups import free_group
from sympy.testing.pyt... |
111c8dd5f5a9b0940fc6efb08306d65b36e88d9a | c46873834f052eb4a65b40ea8d9e003f2600f0a0 | /src/cltk/phonology/non/orthophonology.py | 3db2b366512a03e72adfc01288a500218e69078a | [
"MIT"
] | permissive | cltk/cltk | 966c4b21f1c05f3a81e41a2164bf8661cd81ef7e | 8a122113d2509aef85bebba8e2c303471c107ff4 | refs/heads/master | 2023-08-19T09:53:42.770624 | 2023-03-06T09:33:33 | 2023-03-06T13:54:05 | 15,833,177 | 847 | 505 | MIT | 2023-08-30T12:03:58 | 2014-01-11T23:59:47 | Python | UTF-8 | Python | false | false | 4,972 | py | orthophonology.py | """
Old Norse orthophonology module similar to the cltk.phonology.non.transcription with a different way to transcribe
"""
from cltk.phonology.orthophonology import *
__author__ = ["Clément Besnier <clem@clementbesnier.fr>"]
# Vowels
a = Vowel(Height.open, Backness.front, Roundedness.neg, Length.short, "a")
ee = Vow... |
895467db81bd00fd14d7c7650855efd23fad017c | 3dbefd3d97d6a6fe1c60b9639cb92ce070ff772f | /Source/DataBase/Start_DB_Server.py | a4f65ea66f8821a9d3a16a527e6d76b7cdd09752 | [
"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 | 1,237 | py | Start_DB_Server.py | import os, time, threading, configparser
from subprocess import call
def DoStartServer(root_path):
Config = configparser.ConfigParser()
Config.read(root_path + "/" + "config.ini")
dir = Config.get('Paths', 'DB_ROOT')
database_path = root_path + "/" + dir
if os.path.exists(database_path) =... |
e94b7a588939cdd5606239f0d3b48da6138d6c64 | 9803232b04daa00eb4038be338b833907fd1625f | /library/source1/mdl/structs/jiggle_bone.py | bc456111586ec2ac6bd2bc64688c6656fc863141 | [
"MIT"
] | permissive | REDxEYE/SourceIO | a0ff3cff37504afdb906e4ee20c1077a8daf2912 | 85661fe057cef1ad2a779a9d48e810ea214f4f07 | refs/heads/master | 2023-08-08T18:35:28.771447 | 2023-08-07T22:26:59 | 2023-08-07T22:26:59 | 170,197,673 | 409 | 53 | MIT | 2023-08-23T18:40:38 | 2019-02-11T20:33:55 | Python | UTF-8 | Python | false | false | 2,490 | py | jiggle_bone.py | from dataclasses import dataclass
from enum import IntFlag
from ....utils import Buffer
class JiggleRuleFlags(IntFlag):
IS_FLEXIBLE = 0x01
IS_RIGID = 0x02
HAS_YAW_CONSTRAINT = 0x04
HAS_PITCH_CONSTRAINT = 0x08
HAS_ANGLE_CONSTRAINT = 0x10
HAS_LENGTH_CONSTRAINT = 0x20
HAS_BASE_SPRING = 0x40
... |
ce1cc96cf200400dabe6dae0cf60d7b33bff0c1e | 04d9a118a63675c55abe63ccbd8498c6b02f9f80 | /Cogs/Uptime.py | e8ba02094b25edfbe16861689e59ca821e290bd1 | [
"MIT"
] | permissive | corpnewt/CorpBot.py | 06bd5ddc47adeecdae3ead6138378f9f88fe2b39 | 8c7d8fa412bd9728033bf0c5e0916c6ee9e86423 | refs/heads/rewrite | 2023-08-19T05:20:07.877579 | 2023-08-16T23:03:15 | 2023-08-16T23:03:15 | 68,509,454 | 393 | 201 | MIT | 2022-09-14T17:21:43 | 2016-09-18T08:59:35 | Python | UTF-8 | Python | false | false | 776 | py | Uptime.py | import asyncio
import discord
import time
from operator import itemgetter
from discord.ext import commands
from Cogs import ReadableTime
def setup(bot):
# Add the bot
bot.add_cog(Uptime(bot))
# This is the Uptime module. It keeps track of how long the bot's been up
class Uptime(commands.Cog):
... |
ab858a954c0dd961f3b364e1d73a864431313b0a | fa6e1299ef52ca2d4a13b3788d2a4d0540728f81 | /sample-apps/radiology/lib/trainers/segmentation_spleen.py | 1dc0df6cfff243787b5babf4d8ff5e3503aab8bb | [
"Apache-2.0"
] | permissive | Project-MONAI/MONAILabel | c3abd164255a50279fc5aa6a87f4336fff4d6833 | c90f42c0730554e3a05af93645ae84ccdcb5e14b | refs/heads/main | 2023-09-01T21:44:42.465238 | 2023-08-31T17:17:08 | 2023-08-31T17:17:08 | 351,826,770 | 448 | 167 | Apache-2.0 | 2023-09-14T12:06:28 | 2021-03-26T15:25:10 | Python | UTF-8 | Python | false | false | 4,075 | py | segmentation_spleen.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... |
2ca81041091dfc5ace21859c7060453c1affbdd8 | a8e8ae98c26a54a99ea840a10140e4c5c4080f27 | /external/devlib/devlib/instrument/gem5power.py | 2a59b6e984cbf6973c90b470941d71c31182ac27 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | ARM-software/lisa | c51ea10d9f1ec1713a365ca0362f176c6a333191 | be8427f24d7565c0668cd51ed7ed55867fcec889 | refs/heads/main | 2023-08-30T20:55:20.646965 | 2023-08-29T15:15:12 | 2023-08-29T16:19:20 | 47,548,304 | 200 | 131 | Apache-2.0 | 2023-09-14T11:03:27 | 2015-12-07T11:32:56 | Jupyter Notebook | UTF-8 | Python | false | false | 3,236 | py | gem5power.py | # Copyright 2017-2018 ARM 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 License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... |
76ec72f6c16b493e627d5c39eac4ddadeec368d7 | 93d5400659a7de389a48ad3b2c73004404d1c779 | /indexcov/paper/scripts/cmp.py | d26fcbac3baf50484a2ff4d38e4d15e1e66c8c8f | [
"MIT"
] | permissive | brentp/goleft | 0eecca490297e883e9bd453e43692b525b79296b | 75b361c980b8b401aeac32139f6a28fc4b810394 | refs/heads/master | 2022-10-05T12:45:23.826793 | 2022-09-23T21:44:52 | 2022-09-23T21:44:52 | 68,619,100 | 211 | 29 | MIT | 2019-10-07T13:21:51 | 2016-09-19T15:28:40 | Go | UTF-8 | Python | false | false | 1,625 | py | cmp.py | import sys
import gzip
import itertools as it
import numpy as np
import scipy.stats as ss
from matplotlib import pyplot as plt
import seaborn as sns
sns.set_style('whitegrid')
fha = (gzip.open if sys.argv[1].endswith(".gz") else open)(sys.argv[1])
fhb = (gzip.open if sys.argv[2].endswith(".gz") else open)(sys.argv[2])... |
3a6128a15305647d9c0b0b9a44b7839be1ecb45b | 5624a2063891918855c7832d4f4bab2c3df27a28 | /tests/test_scaling.py | 147ffc4c36ad06790f15097da2bcbda57464370b | [
"MIT"
] | permissive | ealcobaca/pymfe | 52908a9e54d83b431e8aed47b4ea7943e4875b31 | 50131572309dd92cfdf1eceb313be7408f3941b6 | refs/heads/master | 2023-05-12T12:47:08.060399 | 2023-01-03T20:04:24 | 2023-01-03T20:04:24 | 158,245,631 | 117 | 33 | MIT | 2023-05-02T20:00:34 | 2018-11-19T15:20:11 | Python | UTF-8 | Python | false | false | 2,926 | py | test_scaling.py | """Test module for MFE data scaling."""
import pytest
import numpy as np
from pymfe.mfe import MFE
from tests.utils import load_xy
GNAME = "data-scaling"
class TestDataScaling:
"""TestClass dedicated to test MFE scaling."""
@pytest.mark.parametrize(
"dt_id, scaler, exp_mean, exp_var, exp_min, exp_... |
8d7efb7e70e769f9970f6bf4ecbc6b2f01b67a62 | ca70adcd97e8e8853123ed64b624f1c019f85cf0 | /src/rororo/openapi/data.py | f160f0c0d28c745a28bd5e30dc1798a99a5d5f03 | [
"BSD-3-Clause"
] | permissive | playpauseandstop/rororo | 6ace4d7955c513193123c7141589135e8ad07965 | cd201e1012d1f8be1706daef7f6074ead89d0790 | refs/heads/main | 2023-08-25T20:40:29.775807 | 2023-06-07T14:15:20 | 2023-06-07T14:15:20 | 6,331,465 | 107 | 13 | BSD-3-Clause | 2023-09-01T05:42:07 | 2012-10-22T08:08:52 | Python | UTF-8 | Python | false | false | 2,846 | py | data.py | """
===================
rororo.openapi.data
===================
Provide structures for OpenAPI data.
"""
from typing import Any
import attr
from aiohttp import web
from aiohttp.helpers import ChainMapProxy
from openapi_core.validation.request.datatypes import RequestParameters
from pyrsistent import pmap
from roro... |
0f3163b49a94cff856594ba80b778e5c730527bb | 6a468c1650b3c083f102f19ace0b0d6e4d0686f7 | /sympy/matrices/expressions/tests/test_trace.py | 3bd66bec2377dae634ff486f42cc474eda7b23b1 | [
"BSD-3-Clause",
"MIT"
] | permissive | sympy/sympy | a5f8accaa7686c59d9b5c94212fef60d746dac4b | 69f98fb2b0d845e76874067a381dba37b577e8c5 | refs/heads/master | 2023-09-01T15:51:37.886107 | 2023-08-31T20:54:33 | 2023-08-31T20:54:33 | 640,534 | 10,928 | 5,362 | NOASSERTION | 2023-09-14T17:29:13 | 2010-04-30T20:37:14 | Python | UTF-8 | Python | false | false | 3,383 | py | test_trace.py | from sympy.core import Lambda, S, symbols
from sympy.concrete import Sum
from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices import eye, Matrix, ShapeError, ImmutableMatrix
from sympy.matrices.expressions import (
Adjoint, Identity, FunctionMatrix, MatrixExpr, MatrixSymbol, Trace,
Zero... |
1cb1ddaf61b381ab208ebb0dd2673f883e668eb0 | 444a9480bce2035565332d4d4654244c0b5cd47b | /research/cv/PAMTRI/PoseEstNet/src/dataset/veri.py | 26570e7f43f35fbd1fe6c32e61399dc53ab1226d | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license"
] | permissive | mindspore-ai/models | 7ede9c6454e77e995e674628204e1c6e76bd7b27 | eab643f51336dbf7d711f02d27e6516e5affee59 | refs/heads/master | 2023-07-20T01:49:34.614616 | 2023-07-17T11:43:18 | 2023-07-17T11:43:18 | 417,393,380 | 301 | 92 | Apache-2.0 | 2023-05-17T11:22:28 | 2021-10-15T06:38:37 | Python | UTF-8 | Python | false | false | 7,593 | py | veri.py | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... |
e0d31c3707755c88ac33c892df98994d6863a0cc | 67cc5db4593e2cdd109e589e13fb07074bcff5d9 | /tests/inline_external_edges_test.py | 87a3d2ba6a456429a7679ffdaa0d5ab9f08853f5 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | spcl/dace | 39849b1488e8f59f880fc0e2572687556c51847d | c5ca99ad37e7ceef6da71026c3c8bb579f64117f | refs/heads/master | 2023-08-31T10:45:09.480018 | 2023-08-30T06:05:10 | 2023-08-30T06:05:10 | 172,703,996 | 402 | 114 | BSD-3-Clause | 2023-09-14T15:18:29 | 2019-02-26T12:05:50 | Python | UTF-8 | Python | false | false | 1,739 | py | inline_external_edges_test.py | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import dace
import numpy as np
sdfg = dace.SDFG('inline_external_edges_test')
sdfg.add_array('L', [2], dace.float32)
sdfg.add_array('M', [2], dace.float32)
state = sdfg.add_state()
L_in = state.add_read('L')
L_out = state.add_write('L')
M_out... |
12dbfa737c25acf652f2ecf6551c2c776272fe3c | 46c0e11d52c6ebcd384a5759ce0868b0350d1c94 | /algorithms/c01_linear/__init__.py | adb9640724340f50d04338fed2b652642425ac24 | [
"Apache-2.0"
] | permissive | yidao620c/core-algorithm | 7835580109fe3b33d7984762cff043abea7eb3dc | 322cb388295e7085a3772b2dcd7b83c34165c98e | refs/heads/master | 2023-08-31T01:25:22.303598 | 2023-08-06T10:09:05 | 2023-08-06T10:09:05 | 13,033,144 | 869 | 346 | null | 2018-09-21T15:34:23 | 2013-09-23T10:42:19 | Python | UTF-8 | Python | false | false | 533 | py | __init__.py | # -*- encoding: utf-8 -*-
"""
线性表数据结构:数组、链表、队列、栈。
"""
class Node:
"""
单指针节点
"""
def __init__(self, data_, next_=None):
self.data = data_
self.next = next_
def __str__(self):
return str(self.data)
class NodeDouble:
"""
双指针节点
"""
def __init__(self, data_,... |
fdf6c174f534980d846db821af3841dfce8a6466 | 091e97bcfe5acc0635bd601aa8497e377b74d41a | /openshift_tools/monitoring/pminfo_parse.py | ed5e04b47a293050bc3291b2b9ca56be0b9c9cc4 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | openshift/openshift-tools | d59b63778f25cb8fb3c7a0253afe22a173e72f9d | e342f6659a4ef1a188ff403e2fc6b06ac6d119c7 | refs/heads/prod | 2023-08-30T01:52:04.108978 | 2022-03-23T21:07:28 | 2022-03-23T21:07:28 | 36,827,699 | 170 | 254 | Apache-2.0 | 2022-06-16T12:11:51 | 2015-06-03T20:09:22 | Python | UTF-8 | Python | false | false | 4,733 | py | pminfo_parse.py | #!/usr/bin/env python
# vim: expandtab:tabstop=4:shiftwidth=4
'''
PMInfo - Get metrics from Performance CoPilot
This will parse the output of pminfo and return a dictionary of
the metrics and their values
This requires that pminfo is installed on the host.
pminfo will query the localhost host, not... |
0923273491b88b3344608f5a8dc9226e997297f2 | 975fdf27ce73834e30c5af34e85a418c46d514c5 | /cbor2/decoder.py | ad43cc0677e8552ed3ca0bd41f4f25eecc0dd0a8 | [
"MIT"
] | permissive | agronholm/cbor2 | 627a3a50d507b05513e403cf61685db868eb5fe9 | 760b820a84c657f413e9087114486c483e6ca67b | refs/heads/master | 2023-09-01T01:27:45.530877 | 2023-06-02T10:51:56 | 2023-06-02T14:57:40 | 60,716,223 | 174 | 55 | MIT | 2023-09-11T22:35:06 | 2016-06-08T17:19:54 | C | UTF-8 | Python | false | false | 22,525 | py | decoder.py | import re
import struct
import sys
from collections.abc import Mapping
from datetime import datetime, timedelta, timezone
from io import BytesIO
from .types import (
CBORDecodeEOF,
CBORDecodeValueError,
CBORSimpleValue,
CBORTag,
FrozenDict,
break_marker,
undefined,
)
timestamp_re = re.comp... |
4b854f8876416df599654db3043d279a007855ee | 4bc83047ebef789d46f948eb07b8b771a9eab996 | /tests/models/test_url.py | a47205f97db5c429d8182caed4f87495e40baefc | [
"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 | 13,776 | py | test_url.py | import pytest
import httpx
@pytest.mark.parametrize(
"given,idna,host,raw_host,scheme,port",
[
(
"http://中国.icom.museum:80/",
"http://xn--fiqs8s.icom.museum:80/",
"中国.icom.museum",
b"xn--fiqs8s.icom.museum",
"http",
None,
... |
148a3d3afaeedb3e709fb8debffad7903234ce5a | 763fe5b00b54da8711f79658f1baf1d42d7844c1 | /docs/components_page/components/input/radio_check_inline.py | f76ed7089e6cdda42ee9db02a1a23cd807d8fff4 | [
"Apache-2.0"
] | permissive | facultyai/dash-bootstrap-components | 6082f5af9eb2b148556e0280eda88e31bedca3f1 | 696f5fbafceb49ad91776f45f300b782efb72cfc | refs/heads/main | 2023-08-31T03:34:16.817053 | 2023-08-29T20:04:23 | 2023-08-29T20:04:23 | 149,749,075 | 989 | 277 | Apache-2.0 | 2023-09-12T10:11:26 | 2018-09-21T10:33:46 | JavaScript | UTF-8 | Python | false | false | 1,197 | py | radio_check_inline.py | import dash_bootstrap_components as dbc
from dash import html
inline_radioitems = html.Div(
[
dbc.Label("Choose one"),
dbc.RadioItems(
options=[
{"label": "Option 1", "value": 1},
{"label": "Option 2", "value": 2},
],
value=1,
... |
6992fc3ba0b6de036c971ed273ef39a491bbf497 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-MailKit/PyObjCTest/test_medecodedmessagebanner.py | e8ec1102e21f2be8e74a6d812c3c892c61aa774d | [
"MIT"
] | permissive | ronaldoussoren/pyobjc | 29dc9ca0af838a56105a9ddd62fb38ec415f0b86 | 77b98382e52818690449111cd2e23cd469b53cf5 | refs/heads/master | 2023-09-01T05:15:21.814504 | 2023-06-13T20:00:17 | 2023-06-13T20:00:17 | 243,933,900 | 439 | 49 | null | 2023-06-25T02:49:07 | 2020-02-29T08:43:12 | Python | UTF-8 | Python | false | false | 279 | py | test_medecodedmessagebanner.py | from PyObjCTools.TestSupport import TestCase
import MailKit
class TestMEDecodedMessageBanner(TestCase):
def test_classes(self):
self.assertArgIsBOOL(
MailKit.MEDecodedMessageBanner.initWithTitle_primaryActionTitle_dismissable_,
2,
)
|
91e26079d0ef6eb9c6d86561467f165c4bc33cee | b8bbdfc593b6d816e67a344f720f90ec05236778 | /airflow/providers/google/cloud/transfers/sql_to_gcs.py | c1b90a1bff4505f42caea90973b224cbf20a6f80 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | apache/airflow | ed78db0a8bab7e096990e143926e52f518e288ab | 1b122c15030e99cef9d4ff26d3781a7a9d6949bc | refs/heads/main | 2023-09-01T08:37:34.556097 | 2023-09-01T06:49:05 | 2023-09-01T06:49:05 | 33,884,891 | 22,756 | 11,558 | Apache-2.0 | 2023-09-14T20:12:36 | 2015-04-13T18:04:58 | Python | UTF-8 | Python | false | false | 21,796 | py | sql_to_gcs.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... |
a3297841007deec4bf4430bbb18ff6405a7657fa | 7d66226a9f5d4585aa068d031f467a620ec42464 | /solutions/python/sum-of-array-plus-one.py | 16490e529c4ea8990c5e3488356bda412fc16c86 | [
"MIT"
] | permissive | blakeembrey/code-problems | 1b96bd0c8be6e072e532d2d291a5cd3e9dffc9bc | c473ac5125b9510f859d2619de08cf4277828e46 | refs/heads/master | 2023-09-03T00:05:30.763034 | 2022-03-17T00:12:28 | 2022-03-17T00:12:28 | 10,227,799 | 1,577 | 648 | MIT | 2023-01-03T12:26:17 | 2013-05-22T19:19:29 | JavaScript | UTF-8 | Python | false | false | 116 | py | sum-of-array-plus-one.py | def plusOneSum(arr):
"""returns the sum of the integers after adding 1 to each element"""
return sum(arr)+len(arr) |
faceb2263afa8fef13e9a9d31c62d2bfdbdd7cf7 | 6c88b2cea38b2cead9e2402d46a8fc64949c53df | /sdk/python/lib/test/test_runtime_to_json.py | c09b1937c06ec0083c679ac9a6f501e34ab9ccd8 | [
"Apache-2.0"
] | permissive | pulumi/pulumi | a9b36c32f0cdd445c22f9ca64ce26c9ae5147575 | 46e2753d02d46a1c077930eeccdfe6738f46c0d2 | refs/heads/master | 2023-08-19T10:25:49.849189 | 2023-08-16T04:59:07 | 2023-08-16T04:59:07 | 72,477,752 | 17,553 | 1,082 | Apache-2.0 | 2023-09-14T21:05:35 | 2016-10-31T21:02:47 | Go | UTF-8 | Python | false | false | 2,306 | py | test_runtime_to_json.py | # Copyright 2016-2020, Pulumi 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 t... |
35700a1d19a16efec06fd45d384a37076d4ada42 | 0a616a3ec554abb13e0cd283419a5355e3e23052 | /nltk/stem/wordnet.py | 6cc20821f85081f1065d93ecb210a52537971607 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"CC-BY-NC-ND-3.0",
"LicenseRef-scancode-proprietary-license"
] | permissive | nltk/nltk | 79487b84bb96aab4bfc2acde3e12ce34a42f5c73 | 582e6e35f0e6c984b44ec49dcb8846d9c011d0a8 | refs/heads/develop | 2023-09-05T04:05:54.002721 | 2023-06-02T02:45:47 | 2023-06-02T02:45:47 | 299,862 | 11,860 | 3,171 | Apache-2.0 | 2023-08-02T03:12:33 | 2009-09-07T10:53:58 | Python | UTF-8 | Python | false | false | 1,606 | py | wordnet.py | # Natural Language Toolkit: WordNet stemmer interface
#
# Copyright (C) 2001-2023 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
# Edward Loper <edloper@gmail.com>
# URL: <https://www.nltk.org/>
# For license information, see LICENSE.TXT
from nltk.corpus import wordnet as wn
class WordNetLemmatiz... |
193e0948394f778c352ec2af9dead94c8b64a57b | 8dcfd00683b329dc7b8c7529b5cc7d50c0992a55 | /calliope/_version.py | 5a93ff505874c0ed8665411ddf6a74523cece0ca | [
"Apache-2.0"
] | permissive | calliope-project/calliope | e09e11bfffa28a2bb7e1b90bd613e83716df2512 | 889a229ac2d6f59267d36d62a89e86d8b65d26b3 | refs/heads/main | 2023-06-14T07:16:02.205627 | 2023-06-07T19:00:22 | 2023-06-07T19:00:22 | 12,930,335 | 241 | 91 | Apache-2.0 | 2023-06-07T19:00:24 | 2013-09-18T17:58:41 | Python | UTF-8 | Python | false | false | 26 | py | _version.py | __version__ = "0.7.0-dev"
|
5e193a9cbcc591d32a68b5668612807842e7d7b0 | a5653f0dd8e382c6df2ca0e83d324c6e1d94c2d0 | /AppiumLibrary/keywords/_logging.py | 63e52af7c3763b7c83dac3b8ce21024297cfb644 | [
"Apache-2.0"
] | permissive | serhatbolsu/robotframework-appiumlibrary | b85c97a0fd379cf9a3eb86c205d539c37c783c8b | 5f278ba0a5dcdad78e6b979ce50c7b7eb18f1648 | refs/heads/master | 2023-09-04T00:11:55.612669 | 2022-12-27T06:00:06 | 2022-12-27T06:00:06 | 20,088,879 | 304 | 232 | Apache-2.0 | 2023-07-12T10:13:23 | 2014-05-23T06:18:58 | Python | UTF-8 | Python | false | false | 1,923 | py | _logging.py | # -*- coding: utf-8 -*-
import os
from robot.libraries.BuiltIn import BuiltIn
from robot.libraries.BuiltIn import RobotNotRunningError
from robot.api import logger
from .keywordgroup import KeywordGroup
class _LoggingKeywords(KeywordGroup):
LOG_LEVEL_DEBUG = ['DEBUG']
LOG_LEVEL_INFO = ['DEBUG', 'I... |
0a8b3b3c6b89dcf630c5ebd2832d1af50c0582e1 | 2898b860d0440fb10a83d8f28815ac75b0cec9a5 | /attic/rabfe/estimator.py | 005703411962af471fb9c751042e1fabec84de4f | [
"Apache-2.0"
] | permissive | proteneer/timemachine | e3530e52aa995a9006d0eca8632ac6b937571980 | b853c2d287da0d1c1babb963eaec8fda41539b90 | refs/heads/master | 2023-08-18T09:00:55.463397 | 2023-08-17T22:07:22 | 2023-08-17T22:07:22 | 163,188,061 | 132 | 14 | NOASSERTION | 2023-09-13T21:39:20 | 2018-12-26T14:25:45 | Python | UTF-8 | Python | false | false | 14,544 | py | estimator.py | import copy
import dataclasses
import time
from typing import List, Optional, Sequence, Tuple, Union
import numpy as np
import pymbar
from numpy.typing import NDArray
from timemachine.fe import endpoint_correction, standard_state
from timemachine.fe.bar import bar_with_bootstrapped_uncertainty
from timemachine.fe.uti... |
b19993a63893c91955c80b6414da7248ef0f97b5 | bb90ad20468f9fe2039b8c16858bd8eae8bbc050 | /tests/connections.py | 5560715effb5356b58835d74bef9876506782872 | [
"Apache-2.0"
] | permissive | microsoft/CCF | 0997fd81a924d36d775b219720b26b4ff196b18a | 2fbf87840b9e8334c141f4a9c9b25aae979b0540 | refs/heads/main | 2023-09-05T15:39:37.265089 | 2023-09-05T15:27:25 | 2023-09-05T15:27:25 | 180,112,558 | 687 | 229 | Apache-2.0 | 2023-09-14T14:28:39 | 2019-04-08T09:13:04 | C++ | UTF-8 | Python | false | false | 11,248 | py | connections.py | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache 2.0 License.
import infra.e2e_args
import time
import infra.network
import infra.proc
import infra.checker
import infra.interfaces
import contextlib
import resource
import psutil
from infra.log_capture import flush_info
from infra.c... |
8ac29073367d1546d13ebc3ca86d102b56643354 | 27c94d7e040902d3cdadd5862b15e67ec2ee4b6e | /xautodl/nas_infer_model/__init__.py | a152960f02d20ff348ca259f20b5f3a278021b0b | [
"MIT"
] | permissive | D-X-Y/AutoDL-Projects | 8a0779a7710d809af2b052787928d8d34c14d0d9 | f46486e21b71ae6459a700be720d7648b5429569 | refs/heads/main | 2023-08-13T10:53:49.550889 | 2022-04-24T22:18:16 | 2022-04-24T22:18:16 | 168,538,768 | 989 | 197 | MIT | 2022-04-24T22:16:21 | 2019-01-31T14:30:50 | Python | UTF-8 | Python | false | false | 2,076 | py | __init__.py | #####################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019.01 #
#####################################################
# I write this package to make AutoDL-Projects to be compatible with the old GDAS projects.
# Ideally, this package will be merged into lib/models/cell_infers... |
4a1290d1bbca05b50b07d4b53fb38e4e1e315952 | 2ae0b8d95d439ccfd55ea7933ad4a2994ad0f6c5 | /tools/mo/unit_tests/mo/ops/roialign_test.py | a567c2da86e5714765da8957721e2528da46bfef | [
"Apache-2.0"
] | permissive | openvinotoolkit/openvino | 38ea745a247887a4e14580dbc9fc68005e2149f9 | e4bed7a31c9f00d8afbfcabee3f64f55496ae56a | refs/heads/master | 2023-08-18T03:47:44.572979 | 2023-08-17T21:24:59 | 2023-08-17T21:24:59 | 153,097,643 | 3,953 | 1,492 | Apache-2.0 | 2023-09-14T21:42:24 | 2018-10-15T10:54:40 | C++ | UTF-8 | Python | false | false | 5,444 | py | roialign_test.py | # Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
from openvino.tools.mo.front.common.partial_infer.utils import int64_array, float32_array
import numpy as np
from openvino.tools.mo.graph.graph import Node
from openvino.tools.mo.ops.roialign import ROIAlign
from unit_te... |
f1c5f447e5bbc7f4fabbb7b03eedee9dba2a25e5 | 35cd401ef876bec39366e5724bae71581c0cb658 | /Python/klampt/vis/glprogram.py | 49c6531ab6593dedd0ec67a9695fbc952cf9f006 | [] | permissive | krishauser/Klampt | bd450b8c67189b31abe4eb056707d50da3aa651b | dbaf38ca290a36fba9a8f4f9b6a49fda689f6585 | refs/heads/master | 2023-08-29T21:54:40.758699 | 2023-07-21T12:34:38 | 2023-07-21T12:34:38 | 13,944,923 | 327 | 98 | BSD-3-Clause | 2023-08-26T04:20:26 | 2013-10-29T02:46:08 | C++ | UTF-8 | Python | false | false | 18,806 | py | glprogram.py | """Internal classes for building 3D GUI programs.
- GLProgram takes care of basic user input.
- GLNavigationProgram allows 3D navigation with the mouse.
- GLRealtimeProgram calls a subclass-defined idle() function roughly on a
constant time step.
"""
from . import glinit
from OpenGL import GL
from .glviewport impor... |
ac1be95c8bc6e01d705c3eee0eb7cfc03c4daa33 | 2ff8c59ae7c7ef805b1e89191a459f614e0f9c4d | /.evergreen/scripts/check-files.py | 1321bd3ae143e06354ed3aa6310a871292bc0c85 | [
"Apache-2.0"
] | permissive | mongodb/mongo-c-driver | e02c40e01fb921a29750cf1c0205678f9c86a741 | 5c101ce5a565ffa9d160b6e44fb276b502b57157 | refs/heads/master | 2023-09-06T09:32:54.594891 | 2023-09-01T19:21:01 | 2023-09-01T19:21:01 | 9,735,077 | 811 | 506 | Apache-2.0 | 2023-09-14T18:10:00 | 2013-04-28T19:34:36 | C | UTF-8 | Python | false | false | 2,166 | py | check-files.py | #!/usr/bin/env python3
# Copyright 2018-present MongoDB, 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 applicab... |
73fd531cef82f517071503f80352103fb70f499c | 164f9c5b5faa6bbe752597c8fac6d5a30dc65a98 | /planetutils/osm_extract_download.py | 1b2a73099e4a45ec43278dfb00890ed1f8f5178c | [
"MIT"
] | permissive | interline-io/planetutils | 484378ebc4e83f40656a274def4686d2d5f6728a | 6b5d91d41bc34125de1c925d1c2c00246dfe82b2 | refs/heads/master | 2023-02-21T23:47:12.217928 | 2023-02-13T23:21:23 | 2023-02-13T23:21:23 | 119,211,609 | 161 | 22 | NOASSERTION | 2023-02-13T22:26:11 | 2018-01-27T23:32:02 | Python | UTF-8 | Python | false | false | 1,430 | py | osm_extract_download.py | #!/usr/bin/env python
from __future__ import absolute_import, unicode_literals
import os
import argparse
from . import log
from .osm_extract_downloader import OsmExtractDownloader
def main():
parser = argparse.ArgumentParser(usage="OSM Extract Download tool.")
parser.add_argument('id', help='Extract ID')
... |
a42ac8e888581aa29bc6e560714dcac83a50982e | 69bf012ca88897cd87535701369f2b87c6522d57 | /modules/templates/RMS/siglist.py | 13cd50c2c0d2b47eb39fc6ef84233250605e63b6 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | sahana/eden | e2cc73f6b34a2ab6579094da09367a9f0be10fd1 | 1cb5a76f36fb45fa636577e2ee5a9aa39f35b391 | refs/heads/master | 2023-08-20T20:56:57.404752 | 2023-02-24T17:16:47 | 2023-02-24T17:16:47 | 3,021,325 | 227 | 253 | NOASSERTION | 2023-01-10T10:32:33 | 2011-12-20T17:49:16 | Python | UTF-8 | Python | false | false | 13,221 | py | siglist.py | # -*- coding: utf-8 -*-
"""
REST Method to produce a PDF of HR records to collect signatures
@copyright: 2018-2021 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the... |
80155ba9079390eba6d2716445c8a8727eb91c96 | 3a2071c34e3c35847b2bcc2a5d3b3a74114daa0f | /tools/hook-scripts/CVE-2017-9800-pre-commit.py | 2971545b598e5cf93f2dd002438ab532b24339e5 | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-other-permissive",
"X11",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"HPND-Markus-Kuhn",
"LicenseRef-scancode-unicode",
"Apache-2.0",
"FSFAP"
] | permissive | apache/subversion | 18a9142afe63f060ffc0814fe0c758c91ad8bd31 | dd957c4991e61bde23cc60d13449ea8b65f80c43 | refs/heads/trunk | 2023-09-04T15:22:36.755177 | 2023-08-29T19:55:03 | 2023-08-29T19:55:03 | 454,263 | 520 | 207 | Apache-2.0 | 2023-08-26T14:17:30 | 2009-12-31T09:00:10 | C | UTF-8 | Python | false | false | 2,841 | py | CVE-2017-9800-pre-commit.py | #!/usr/bin/env python2
# Licensed under the same terms as Subversion: the Apache License, Version 2.0
#
# pre-commit hook script for Subversion CVE-2017-9800
#
# This prevents commits that set svn:externals containing suspicions
# svn+ssh:// URLs.
#
# With this script installed a commit like the one below should fail:... |
153ffb4874f6164844b54151e8aacd6cf2220e8b | 6ff85b80c6fe1b3ad5416a304b93551a5e80de10 | /Python/Function/ParamList.py | c7860ad06ef05068976116d246a7c9ad556ef1b6 | [
"MIT"
] | permissive | maniero/SOpt | c600cc2333e0a47ce013be3516bbb8080502ff2a | 5d17e1a9cbf115eaea6d30af2079d0c92ffff7a3 | refs/heads/master | 2023-08-10T16:48:46.058739 | 2023-08-10T13:42:17 | 2023-08-10T13:42:17 | 78,631,930 | 1,002 | 136 | MIT | 2023-01-28T12:10:01 | 2017-01-11T11:19:24 | C# | UTF-8 | Python | false | false | 2,144 | py | ParamList.py | class Cheque:
def __init__(self, **D):
self.numConta = D.pop('nc', '------ -')
self.numCheque = D.pop('nch', '?')
self.valor = D.pop('v', '0.00')
self.dta_emissao = D.pop('em', 'dd/mm/aaaa')
self.dta_vcto = D.pop('vcto', 'dd/mm/aaaa')
self.dta_deposito = D.pop('dep', 'dd/mm... |
be4fd7d76f0f1da1f42370e61d06619b6480dfc8 | 2337351b228818e41be3002bd38f68f77c2aa074 | /sa/profiles/Cisco/NXOS/get_mpls_vpn.py | b99dae79d56c7c649fc86475c3a1a65aefd71d22 | [
"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,744 | py | get_mpls_vpn.py | # ---------------------------------------------------------------------
# Cisco.NXOS.get_mpls_vpn
# ---------------------------------------------------------------------
# Copyright (C) 2007-2018 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
# Python ... |
b32127426ebb631abf8b20105ab731d417d5098e | 5eb52c07e5b1bd00af77306f927f382b684cd6ff | /indy_node/test/upgrade/test_node_upgrade_unsuccessful.py | 1dbd81a7fbdee3ff4a0bf240acad841f383cc8e5 | [
"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,585 | py | test_node_upgrade_unsuccessful.py | import pytest
from indy_common.constants import FAIL
from indy_node.test.upgrade.helper import populate_log_with_upgrade_events, \
bumpedVersion, check_node_sent_acknowledges_upgrade, check_node_do_not_sent_acknowledges_upgrade, \
emulate_restart_pool_for_upgrade
from indy_node.server.upgrade_log import Upgrad... |
e48cb43428eb4c2766b43ffbe83df50239f4cb6a | 42c44eaa5f67780ce91aae066710a8470c90244e | /build/android/gyp/jar.py | 417dc45304a8fbd7e04b4343fa015b9a666623c3 | [
"BSD-3-Clause"
] | permissive | flutter/buildroot | 9068331cbf73f7c4fd74004127e42aa8a8348af7 | 5b5e954cfb6e3f7457a32206c178a298423f0b30 | refs/heads/master | 2023-08-30T01:07:43.292631 | 2023-08-29T22:02:24 | 2023-08-29T22:02:24 | 65,318,350 | 131 | 256 | BSD-3-Clause | 2023-09-13T21:47:45 | 2016-08-09T18:24:03 | Python | UTF-8 | Python | false | false | 2,866 | py | jar.py | #!/usr/bin/env python3
#
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import fnmatch
import optparse
import os
import sys
from util import build_utils
from util import md5_check
def Jar(class_files, ... |
dae0b07de72b80196a03f5ee9ea9558ab8d98924 | 01a4e25806f12087c1cae5db25696cad997e17a9 | /datafiles/lib/processors.py | 995f6d86742bfb6497b71fbb8c1329c9ca3545ec | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/examples | 3f9a4ed41208292fe12c7d25805058da92b4f349 | 2228346055f823d7b103ce65b5d9013385a5eb83 | refs/heads/master | 2023-02-07T02:23:32.653325 | 2023-02-03T22:27:28 | 2023-02-03T22:27:28 | 199,072,219 | 107 | 48 | Apache-2.0 | 2023-02-03T22:27:30 | 2019-07-26T19:49:58 | HTML | UTF-8 | Python | false | false | 270 | py | processors.py | import logging
logger = logging.getLogger(__name__)
def log_enter(section):
'''processor to print enter section'''
logger.info('---> %s' % section.uid)
def log_exit(section):
'''processor to print exit section'''
logger.info('<--- %s' % section.uid)
|
5c7641e983ba9ce8ce1cbffc70382fc5174f9a6d | f7f3dd55fa7ab6833f3c2d8e457884c127cc203d | /tests/utils/dict_comparator.py | d64a9e8e81e0953329c8dbbd299300ad76a09d94 | [
"CC0-1.0"
] | permissive | linkml/linkml | 0fe41590ea729f10b1a6e2de4a85c585f284dc22 | 2354a45838c6207b01ffabc6eda92512c3fb147b | refs/heads/main | 2023-08-17T05:59:08.486218 | 2023-08-11T21:31:59 | 2023-08-11T21:31:59 | 348,419,208 | 198 | 63 | CC0-1.0 | 2023-09-14T16:04:30 | 2021-03-16T16:34:43 | Python | UTF-8 | Python | false | false | 1,389 | py | dict_comparator.py | from typing import Any, Dict, Optional, Union
import jsonpatch
import yaml
from linkml_runtime.dumpers import yaml_dumper
from linkml_runtime.utils.yamlutils import YAMLRoot
def compare_dicts(expected: Dict[str, Any], actual: Dict[str, Any]) -> Optional[str]:
"""
Compare two dicts
:param expected: expect... |
cb3a3ed5c79d67f6f9eb0c0bfedfd227c665e360 | 805ada307bcd02c410e38eb2929d515c50692b19 | /test/test_sofr.py | 4da12ecc5891e2083d2ea10d1f6d375e692245d9 | [
"BSD-3-Clause",
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | enthought/pyql | 0f973aa44d33b5933b356bfa3f2774c6080b13f0 | 09bd00b339d6361fb82c833a6c171a38b555badd | refs/heads/master | 2023-08-08T17:09:34.677722 | 2023-07-31T17:59:02 | 2023-08-02T17:07:15 | 3,665,229 | 803 | 181 | NOASSERTION | 2023-08-02T17:07:17 | 2012-03-08T22:44:35 | Cython | UTF-8 | Python | false | false | 3,073 | py | test_sofr.py | from quantlib.cashflows.rateaveraging import RateAveraging
from quantlib.math.interpolation import Linear
from quantlib.termstructures.yields.api import SofrFutureRateHelper, PiecewiseYieldCurve, BootstrapTrait
from quantlib.instruments.api import OvernightIndexFuture
from quantlib.time.date import Jan, Feb, Mar, Jun, ... |
3efc2cbf3ac9c540e41dbeecf751dacdfdef6c2e | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /HDF4_H5_NETCDF/source2.7/numpy/tests/test_reloading.py | cd42252e35a7390dc9cfbb4e8fc26b590b8a6ff1 | [
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"BSD-2-Clause",
"Python-2.0"
] | permissive | ryfeus/lambda-packs | 6544adb4dec19b8e71d75c24d8ed789b785b0369 | cabf6e4f1970dc14302f87414f170de19944bac2 | refs/heads/master | 2022-12-07T16:18:52.475504 | 2022-11-29T13:35:35 | 2022-11-29T13:35:35 | 71,386,735 | 1,283 | 263 | MIT | 2022-11-26T05:02:14 | 2016-10-19T18:22:39 | Python | UTF-8 | Python | false | false | 1,158 | py | test_reloading.py | from __future__ import division, absolute_import, print_function
import sys
import pickle
from numpy.testing import assert_raises, assert_, assert_equal
if sys.version_info[:2] >= (3, 4):
from importlib import reload
else:
from imp import reload
def test_numpy_reloading():
# gh-7844. Also check that rel... |
698dd10f8f3a09e41e2752f108ceb3e0225d13e6 | 61096fcd8c78814a17933adb3d35299d93945ba0 | /src/08-execution-pools/program.py | a24c473891b1e1f1c8236672e213bb2668e16b4d | [
"MIT"
] | permissive | talkpython/async-techniques-python-course | 88261a7fa4deb95d262f475662ab41e0e836f3d7 | 3780f9ea2ebe89b2f4e01191927594c8d1c33fb0 | refs/heads/master | 2023-08-06T06:57:10.804176 | 2022-10-21T14:55:16 | 2022-10-21T14:55:16 | 145,053,438 | 441 | 247 | MIT | 2022-01-24T18:48:55 | 2018-08-17T00:42:04 | Python | UTF-8 | Python | false | false | 1,833 | py | program.py | import requests
import bs4
from concurrent.futures import Future
# from concurrent.futures.thread import ThreadPoolExecutor as PoolExecutor
from concurrent.futures.process import ProcessPoolExecutor as PoolExecutor
def main():
urls = [
'https://talkpython.fm',
'https://pythonbytes.fm',
'ht... |
c72192df77d756afc52e3527248f9ff18a7bd575 | bed34365a9dab825fd9f4a4ff1b0863f441266ac | /neutron/db/availability_zone/router.py | c346ce0cd29e69c5c07c3b3309a5b6854a7ced68 | [
"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 | 2,210 | py | router.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
# ... |
2a2e6aa7fc3814a7a3da17c3cb0db800a2577e68 | 7edc26a54f4b71085db5758ee15e87dfc822c372 | /openelex/us/va/load.py | 68c39e382de7862d67680b59f99142a600729c42 | [
"MIT"
] | permissive | openelections/openelections-core | 55f1b440644588502a6a1a67f8924024a2f1dffb | 3c516d8c4cf1166b1868b738a248d48f3378c525 | refs/heads/master | 2022-02-06T01:24:38.557078 | 2021-04-22T17:53:34 | 2021-04-22T17:53:34 | 11,376,829 | 161 | 99 | MIT | 2022-01-21T18:56:12 | 2013-07-12T19:52:57 | Python | UTF-8 | Python | false | false | 6,963 | py | load.py | from builtins import str
from builtins import object
import unicodecsv
from openelex.base.load import BaseLoader
from openelex.models import RawResult
from openelex.lib.insertbuffer import BulkInsertBuffer
from openelex.lib.text import ocd_type_id
from .datasource import Datasource
"""
Virginia elections have CSV res... |
aa8e3cf7adc8a2cfecfcc701398a2c828f26dd00 | 5b676d9aa9e04744a7efc4d776f619d53cd311e9 | /tests/test_parse_parameters.py | 76c7d20492060b01056ba602025c0f6298f46a04 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | kurtmckee/feedparser | b852d62a81de678cb4aeb98aa705c51b15d0b783 | 9865dec12c40d7077b81577271d3104bff496077 | refs/heads/develop | 2023-09-04T18:24:57.131953 | 2023-08-29T11:30:16 | 2023-08-29T11:30:16 | 1,113,646 | 1,767 | 376 | NOASSERTION | 2023-09-12T12:29:06 | 2010-11-26T02:53:24 | Python | UTF-8 | Python | false | false | 3,164 | py | test_parse_parameters.py | import io
import pytest
import feedparser
import feedparser.encodings
feed_xml = b"""
<rss version="2.0">
<channel>
<item>
<body><script>alert("boo!")</script></body>
</item>
<item>
<body><a href="/boo.html">boo</a></body>
</... |
7ba6f57e07762aaea0ce769e816018c6f0f51678 | dd221d1ab80a49190a0c93277e2471debaa2db95 | /hanlp/layers/embeddings/contextual_string_embedding_tf.py | d73eca95ff4580bb474d32e9dcd2840b2a58ec5e | [
"Apache-2.0",
"CC-BY-NC-SA-4.0"
] | permissive | hankcs/HanLP | 29a22d4e240617e4dc67929c2f9760a822402cf7 | be2f04905a12990a527417bd47b79b851874a201 | refs/heads/doc-zh | 2023-08-18T12:48:43.533453 | 2020-02-15T17:19:28 | 2023-03-14T02:46:03 | 24,976,755 | 32,454 | 9,770 | Apache-2.0 | 2023-08-13T03:11:39 | 2014-10-09T06:36:16 | Python | UTF-8 | Python | false | false | 4,988 | py | contextual_string_embedding_tf.py | # -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-12-19 03:24
from typing import List
import tensorflow as tf
import numpy as np
from hanlp.components.rnn_language_model_tf import RNNLanguageModel
from hanlp_common.constant import PAD
from hanlp.utils.io_util import get_resource
from hanlp.utils.tf_util import copy... |
25cef94f7bedb52d52580ff06d3bb821e1cf3217 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /homeassistant/components/easyenergy/coordinator.py | 3996fd4d16ab0a052bd84b9b68d5179f5df2b44b | [
"Apache-2.0"
] | permissive | home-assistant/core | 3455eac2e9d925c92d30178643b1aaccf3a6484f | 80caeafcb5b6e2f9da192d0ea6dd1a5b8244b743 | refs/heads/dev | 2023-08-31T15:41:06.299469 | 2023-08-31T14:50:53 | 2023-08-31T14:50:53 | 12,888,993 | 35,501 | 20,617 | Apache-2.0 | 2023-09-14T21:50:15 | 2013-09-17T07:29:48 | Python | UTF-8 | Python | false | false | 2,759 | py | coordinator.py | """The Coordinator for easyEnergy."""
from __future__ import annotations
from datetime import timedelta
from typing import NamedTuple
from easyenergy import (
EasyEnergy,
EasyEnergyConnectionError,
EasyEnergyNoDataError,
Electricity,
Gas,
)
from homeassistant.config_entries import ConfigEntry
fro... |
194b534bc1659319acc0a693d84f485d14d30f82 | 2bbc2628e5b4aaf1e67e04b5485ffc621e088a4d | /qa/common/gen_qa_reshape_models.py | 983f06c1d0187d34acc06d962728f436ca97086a | [
"BSD-3-Clause"
] | permissive | triton-inference-server/server | 9dbce65aba73ef36a0d2399ed9d63eccb9f84e52 | 0f478f32fe74f591400c3a073e253f7dae8a383e | refs/heads/main | 2023-08-16T16:46:50.059935 | 2023-08-15T22:58:44 | 2023-08-15T22:58:44 | 151,636,194 | 4,711 | 1,085 | BSD-3-Clause | 2023-09-14T11:14:08 | 2018-10-04T21:10:30 | Python | UTF-8 | Python | false | false | 48,096 | py | gen_qa_reshape_models.py | #!/usr/bin/env python3
# Copyright 2019-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# * Redistributions of source code must retain the above copyright
... |
5d69e5a0222b56d1262618d396856179bff35416 | 9e1f60a867f66b1f4e4fc84fa4252c581e5e1a36 | /Chapter08/test_ut_design_2.py | a3851e2e54386699344181d75151df46b3f0d0b2 | [
"MIT"
] | permissive | PacktPublishing/Clean-Code-in-Python | c216e002485b8cd7736f97b59215a3930f35359a | 7348d0f9f42871f499b352e0696e0cef51c4f8c6 | refs/heads/master | 2023-06-10T13:40:33.331115 | 2023-05-30T17:48:09 | 2023-05-30T17:48:09 | 145,072,942 | 523 | 181 | MIT | 2023-05-30T17:48:10 | 2018-08-17T04:48:38 | Python | UTF-8 | Python | false | false | 412 | py | test_ut_design_2.py | from unittest import TestCase, main
from unittest.mock import Mock
from ut_design_2 import WrappedClient
class TestWrappedClient(TestCase):
def test_send_converts_types(self):
wrapped_client = WrappedClient()
wrapped_client.client = Mock()
wrapped_client.send("value", 1)
wrapped_... |
f8a9cbd436743d4d979389ead2828f50d4f8207d | 8b5d61f17ab2e4c158270cf6dda79f9a47870df1 | /sknetwork/data/tests/test_base.py | 1de2a7c7c86b87b7c13160bc82c41ccae16b22cd | [
"BSD-3-Clause"
] | permissive | sknetwork-team/scikit-network | 55a5ecbbbd2dfc78095aa74f3953c770357cadbb | 95cec38d56b086b95616d2f1d13a9b98c6c8b534 | refs/heads/master | 2023-09-03T21:56:42.345214 | 2023-05-22T14:12:57 | 2023-05-22T14:12:57 | 135,287,970 | 581 | 73 | NOASSERTION | 2023-07-21T05:42:25 | 2018-05-29T11:45:42 | Python | UTF-8 | Python | false | false | 308 | py | test_base.py | # -*- coding: utf-8 -*-
"""tests for dataset"""
import unittest
from sknetwork.data.base import Bunch
class TestDataset(unittest.TestCase):
def test(self):
dataset = Bunch(name='dataset')
self.assertEqual(dataset.name, 'dataset')
self.assertEqual(dataset['name'], 'dataset')
|
8fd7153f34a0a7ba12da097f1e85f583ac6a5245 | de527d4dcbad261226e4bdc2742ef2a901fa119d | /tf_verify/refine_activation.py | debdb365cace2a867ba39af8ae148f8a0947acf3 | [
"Apache-2.0"
] | permissive | eth-sri/eran | 6c131079686f87b83d771b20a53a500e480a57d6 | 8771d3158b2c64a360d5bdfd4433490863257dd6 | refs/heads/master | 2023-02-07T06:29:26.827401 | 2022-05-30T11:08:38 | 2022-05-30T11:08:38 | 157,565,932 | 306 | 128 | Apache-2.0 | 2023-01-27T01:14:21 | 2018-11-14T15:03:42 | Python | UTF-8 | Python | false | false | 6,995 | py | refine_activation.py | """
Copyright 2020 ETH Zurich, Secure, Reliable, and Intelligent Systems Lab
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requi... |
2db5d58676fbd51a121ee5517fa780a04099065c | 11cd362cdd78c2fc48042ed203614b201ac94aa6 | /desktop/core/ext-py3/boto-2.49.0/boto/iam/connection.py | f66931f460d13b0a7a398c952dba3753429c2f7b | [
"CC-BY-3.0",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"ZPL-2.0",
"Unlicense",
"LGPL-3.0-only",
"CC0-1.0",
"LicenseRef-scancode-other-permissive",
"CNRI-Python",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-or-later",
"Python-2.0",
"GPL-3.0... | permissive | cloudera/hue | b42343d0e03d2936b5a9a32f8ddb3e9c5c80c908 | dccb9467675c67b9c3399fc76c5de6d31bfb8255 | refs/heads/master | 2023-08-31T06:49:25.724501 | 2023-08-28T20:45:00 | 2023-08-28T20:45:00 | 732,593 | 5,655 | 2,244 | Apache-2.0 | 2023-09-14T03:05:41 | 2010-06-21T19:46:51 | JavaScript | UTF-8 | Python | false | false | 71,706 | py | connection.py | # Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010-2011, Eucalyptus Systems, Inc.
#
# 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, includin... |
ce712ed236d393599bae07f802a5803ee6a14e44 | fbd2702e8c45d5e6cec39877295ef45f2f61d426 | /examples/office_model.py | 2dff1e811cfb1af804de36e4708daf2e670473eb | [
"MIT"
] | permissive | pynamodb/PynamoDB | 365961a5cd7b2d7e924f8edf367dde641d00914a | 335c7cde6732c5121347207e60479d96e47338f6 | refs/heads/master | 2023-08-22T06:19:59.762796 | 2023-07-18T05:37:13 | 2023-07-18T05:37:13 | 16,058,979 | 1,987 | 412 | MIT | 2023-08-29T14:48:51 | 2014-01-20T02:18:35 | Python | UTF-8 | Python | false | false | 809 | py | office_model.py | from pynamodb.attributes import ListAttribute, MapAttribute, NumberAttribute, UnicodeAttribute
from pynamodb.models import Model
class Location(MapAttribute):
lat = NumberAttribute(attr_name='latitude')
lng = NumberAttribute(attr_name='longitude')
name = UnicodeAttribute()
class Person(MapAttribute):
... |
019a84786783f300a90579277aaa3d34249a3fd9 | 8de79ab1818c535dcd8ad6e0c92b5c9642ffb82a | /tests/test_templating.py | a41af935b296b5073a0c400af96842363a61a73d | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | sphinx-doc/sphinx | 632d75bfc7bef14904f3d847e6de6d37594a13a5 | eab54533a56119c5badd5aac647c595a9adae720 | refs/heads/master | 2023-08-16T18:21:54.073511 | 2023-08-15T17:36:47 | 2023-08-15T17:36:47 | 28,710,753 | 6,138 | 2,587 | NOASSERTION | 2023-09-14T14:22:28 | 2015-01-02T10:53:28 | Python | UTF-8 | Python | false | false | 1,435 | py | test_templating.py | """Test templating."""
import pytest
from sphinx.ext.autosummary.generate import setup_documenters
@pytest.mark.sphinx('html', testroot='templating')
def test_layout_overloading(make_app, app_params):
args, kwargs = app_params
app = make_app(*args, **kwargs)
setup_documenters(app)
app.builder.build_... |
53251d53c7eacfc6fe5be984055deaf8ee2d016e | b74320ad439e37dfa48cd8db38dab3b7a20a36ff | /scripts/convert_vq_diffusion_to_diffusers.py | 58ed2d93d5df4bd486b7485e1dc5e3cd255f2d99 | [
"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 | 36,277 | py | convert_vq_diffusion_to_diffusers.py | """
This script ports models from VQ-diffusion (https://github.com/microsoft/VQ-Diffusion) to diffusers.
It currently only supports porting the ITHQ dataset.
ITHQ dataset:
```sh
# From the root directory of diffusers.
# Download the VQVAE checkpoint
$ wget https://facevcstandard.blob.core.windows.net/v-zhictang/Impr... |
d2c321676ed3a8428fd1e83ee3d7b8b0f115e206 | d5e1591a6b96ec0e35ea223269da38b15fffe600 | /circuits/net/sockets.py | 1086c541084e703cf618401660512e069ff4655f | [
"MIT"
] | permissive | circuits/circuits | 630cfa0fa13b19f84bfb96705912f3f6a26c69e1 | 87fb5a3380069d907d2ac500d13418b1abdeb2f2 | refs/heads/master | 2023-07-31T07:17:06.706151 | 2023-02-07T19:39:20 | 2023-02-07T19:39:20 | 12,450,349 | 310 | 80 | NOASSERTION | 2023-01-06T00:08:37 | 2013-08-29T03:05:42 | Python | UTF-8 | Python | false | false | 26,028 | py | sockets.py | """
Socket Components
This module contains various Socket Components for use with Networking.
"""
import os
import select
from collections import defaultdict, deque
from errno import (
EAGAIN, EALREADY, EBADF, ECONNABORTED, EINPROGRESS, EINTR, EINVAL, EISCONN,
EMFILE, ENFILE, ENOBUFS, ENOMEM, ENOTCONN, EPERM, ... |
2f40b92295611c9681730842416ed75e750e05b4 | fa3f6d4e9169fb95f828013d179d03accdff381b | /grr/server/grr_response_server/output_plugins/bigquery_plugin.py | 87aa4c486cea6d67f1f144ae0df12983819b47f7 | [
"Apache-2.0"
] | permissive | google/grr | c51a2bd251ed2f7adae538541990a2cc01fdcc8c | 44c0eb8c938302098ef7efae8cfd6b90bcfbb2d6 | refs/heads/master | 2023-09-05T20:02:36.823914 | 2023-07-26T09:34:09 | 2023-07-26T09:34:09 | 14,909,673 | 4,683 | 927 | Apache-2.0 | 2023-07-26T09:34:10 | 2013-12-04T00:17:53 | Python | UTF-8 | Python | false | false | 12,626 | py | bigquery_plugin.py | #!/usr/bin/env python
"""BigQuery output plugin."""
import base64
import gzip
import json
import logging
import os
import tempfile
from grr_response_core import config
from grr_response_core.lib import rdfvalue
from grr_response_core.lib import utils
from grr_response_core.lib.rdfvalues import structs as rdf_structs
f... |
dbf9cdfc2d2502b38db7ca5874a0335fc010f8d3 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/resolve/TextBasedResolve.py | 0a332f60dcdea813caf16d64cc4f25851de7bad5 | [
"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 | 126 | py | TextBasedResolve.py | class A:
def long_unique_identifier(self): pass
def foo(x):
x.long_unique_identifier()
# <ref> |
9ff5ea24e4306fecd1b0bd92b0e585bef78ac9dd | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-VideoToolbox/PyObjCTest/test_vtdecompressionsession.py | 2f4694aa52f078b1379b2cbe5c179303f7d27400 | [
"MIT"
] | permissive | ronaldoussoren/pyobjc | 29dc9ca0af838a56105a9ddd62fb38ec415f0b86 | 77b98382e52818690449111cd2e23cd469b53cf5 | refs/heads/master | 2023-09-01T05:15:21.814504 | 2023-06-13T20:00:17 | 2023-06-13T20:00:17 | 243,933,900 | 439 | 49 | null | 2023-06-25T02:49:07 | 2020-02-29T08:43:12 | Python | UTF-8 | Python | false | false | 1,848 | py | test_vtdecompressionsession.py | import VideoToolbox
import objc
from PyObjCTools.TestSupport import TestCase, min_os_level, expectedFailure
VTDecompressionOutputHandler = (
b"viI^{__CVBuffer=}"
+ VideoToolbox.CMTime.__typestr__
+ VideoToolbox.CMTime.__typestr__
)
class TestVTDecompressionSession(TestCase):
@expectedFailure
def ... |
ea63cf20e85be297d3399f4d21512a28d8538eac | 828a277419095556f50b331da73e4a931be7b452 | /tests/unit/command/test_queue.py | 0d9d85fc8a4d152e657be65716ddab7d535875ff | [
"Apache-2.0"
] | permissive | iterative/dvc | 6b843492a680370054cddf5cf62c66b6808007ca | f47d21b0c29f5603bff09cc51c4a14a1bdf962c6 | refs/heads/main | 2023-09-02T17:14:25.412431 | 2023-08-31T23:17:17 | 2023-08-31T23:17:17 | 83,878,269 | 11,687 | 1,331 | Apache-2.0 | 2023-09-14T14:36:48 | 2017-03-04T08:16:33 | Python | UTF-8 | Python | false | false | 6,178 | py | test_queue.py | import pytest
from dvc.cli import parse_args
from dvc.commands.queue.kill import CmdQueueKill
from dvc.commands.queue.logs import CmdQueueLogs
from dvc.commands.queue.remove import CmdQueueRemove
from dvc.commands.queue.start import CmdQueueStart
from dvc.commands.queue.status import CmdQueueStatus
from dvc.commands.q... |
3d34e5b3945c0c38c8c57f03b49565278d37b430 | 5005140cc0c9a2247c3cfcc2bfa12d19472f6a9c | /feedmixer.py | e0bd247fe4bc685ef5683f572193cb99dc5499bc | [
"WTFPL"
] | permissive | cristoper/feedmixer | 07a1cbb116eca1189c1e917f8a08ab17cdc44059 | 70bb0da59ad2a9869ff007f703eda3cafe8dcaaa | refs/heads/master | 2023-08-08T03:04:49.504375 | 2023-07-25T23:13:09 | 2023-07-25T23:13:09 | 88,230,593 | 124 | 12 | WTFPL | 2023-07-25T23:13:10 | 2017-04-14T03:45:38 | Python | UTF-8 | Python | false | false | 13,275 | py | feedmixer.py | """
Instances of `FeedMixer` are initialized with a list of Atom/RSS feeds and
generate an Atom/RSS/JSON feed consisting of the most recent `num_keep` entries
from each.
Usage
-----
First initialize the `FeedMixer` object with its metadata and list of feeds::
>>> from feedmixer import FeedMixer
>>> title = "Title"
>... |
0fed0bd51200c31fdd64f9dc4f1ef8c37cc3cb3f | f86c72ebd4a46d12cf8c750c1f7526c42e40111d | /fonts/vector/italict.py | 57217471cf7e6c9366772fd04a711038d6a987d4 | [
"MIT"
] | permissive | russhughes/st7789_mpy | 65e5052d4ca28db6423af38d24a3c90622a39cea | 47db47361eb89719cbc1c59b36e31cb69be03911 | refs/heads/master | 2023-07-24T10:32:43.458118 | 2023-06-11T06:26:28 | 2023-06-11T06:26:28 | 237,678,059 | 404 | 103 | NOASSERTION | 2023-07-13T04:30:05 | 2020-02-01T21:07:38 | Python | UTF-8 | Python | false | false | 35,578 | py | italict.py | WIDTH = 32
HEIGHT = 32
FIRST = 0x20
LAST = 0x7f
_font =\
b'\x00\x4a\x5a\x21\x4d\x58\x56\x46\x55\x46\x54\x47\x52\x54\x20'\
b'\x52\x56\x47\x55\x47\x52\x54\x20\x52\x56\x47\x56\x48\x52\x54'\
b'\x20\x52\x56\x46\x57\x47\x57\x48\x52\x54\x20\x52\x50\x58\x4f'\
b'\x59\x4f\x5a\x50\x5b\x51\x5b\x52\x5a\x52\x59\x51\x58\x50\x58'\
b'... |
29f14659ae1ec2339832157e772202cf788221ef | b52e93b28a1bfdff2b886b37fabb7c1b579a6e89 | /opt_einsum/backends/theano.py | 0abdf0df74558b1d606d38c64256c317cad391f7 | [
"MIT"
] | permissive | dgasmith/opt_einsum | 4a9635ee7d13ece31e97b2f72f21485bfe9ebe7b | 1a984b7b75f3e532e7129f6aa13f7ddc3da66e10 | refs/heads/master | 2023-08-20T11:53:04.988019 | 2022-12-12T22:29:33 | 2022-12-12T22:29:33 | 27,930,623 | 761 | 79 | MIT | 2023-09-02T17:22:56 | 2014-12-12T17:31:24 | Python | UTF-8 | Python | false | false | 1,647 | py | theano.py | """
Required functions for optimized contractions of numpy arrays using theano.
"""
import numpy as np
from ..sharing import to_backend_cache_wrap
__all__ = ["to_theano", "build_expression", "evaluate_constants"]
@to_backend_cache_wrap(constants=True)
def to_theano(array, constant=False):
"""Convert a numpy ar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.