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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e234dbdcf2925dd2a6ff2202ba4a3e08319abbd2 | fd9f28e38a133e8a52d80ccc898bdf3725cd317d | /tests/models.py | d6eb67f1222ee801a566284edeb1279f205bdcea | [
"BSD-3-Clause"
] | permissive | glemmaPaul/django-taggit-serializer | f5f3d2ad6f98c67a4b69076e4cea7a29e661a700 | 9cb3350a09091f80099b56bfa64cdeea5a0c2607 | refs/heads/master | 2023-05-29T09:27:09.851853 | 2023-05-10T13:44:46 | 2023-05-10T13:44:46 | 31,049,243 | 208 | 61 | BSD-3-Clause | 2022-12-26T20:15:05 | 2015-02-20T03:17:50 | Python | UTF-8 | Python | false | false | 135 | py | models.py | from django.db import models
from taggit.managers import TaggableManager
class TestModel(models.Model):
tags = TaggableManager()
|
e138ba3502239d7f6350ef8ee6ca3e746ab8e79b | 0a23c93c0b61301081bd914754f88fbad29de00d | /alipy/utils/misc.py | 52da0ef48aed89364dfacdf905b8388c31e64920 | [
"BSD-3-Clause"
] | permissive | NUAA-AL/ALiPy | 187d4f3aa5a3e04324f5f98da8dc197a386d1079 | 1b2ee2e5acc2e8651fc64759aae332853ad9e437 | refs/heads/master | 2023-07-03T15:56:18.935587 | 2022-09-17T11:16:05 | 2022-09-17T11:16:05 | 149,413,428 | 844 | 127 | BSD-3-Clause | 2022-09-17T11:16:06 | 2018-09-19T07:54:37 | Python | UTF-8 | Python | false | false | 7,049 | py | misc.py | """
Misc functions to be settled
"""
from __future__ import division
import numpy as np
from sklearn.metrics.pairwise import linear_kernel, polynomial_kernel, \
rbf_kernel
from sklearn.utils.validation import check_array
from .interface import BaseCollection
__all__ = ['check_matrix',
'get_gaussian_ke... |
f451847e811a3660d97a28a8d266ec5b5022c4a7 | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowLicense/cli/equal/golden_output1_expected.py | b69b3a158b7d841f8315fec9f1fc4364aa1602a4 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 2,949 | py | golden_output1_expected.py | expected_output = {
"licenses": {
1: {
"feature": "appxk9",
"period_left": "Life time",
"license_type": "Permanent",
"license_state": "Active, In Use",
"count": "Non-Counted",
"license_priority": "Medium",
},
2: {
... |
01360aa5656ff8b8aeee8e3629ca843798f93595 | 4b0a7c7cb4dd47e10e60381fe1fc0758d1659751 | /robustness_metrics/models/random_imagenet_numpy.py | 54a5c067a7ec7fa48d188855b591f53602f94cdd | [
"MIT",
"Apache-2.0"
] | permissive | google-research/robustness_metrics | c6e36e72f251b10af2522ecb87ad090ad45097f9 | 3e714b3dcce386fa3f473dff8a0f19d7108c18fd | refs/heads/master | 2023-08-31T00:21:59.320508 | 2023-08-21T18:45:14 | 2023-08-21T18:45:42 | 292,792,659 | 451 | 28 | Apache-2.0 | 2023-08-21T18:45:47 | 2020-09-04T08:24:27 | Jupyter Notebook | UTF-8 | Python | false | false | 1,035 | py | random_imagenet_numpy.py | # coding=utf-8
# Copyright 2023 The Robustness Metrics 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 appli... |
3df8271225894130668d4ccca0cb255d042f20c0 | e04a5b20f946c5033f24d4dd8acda395a98747c5 | /esri-geo-enrichment/python-lib/geocoder_common.py | 914d35b39675ea76a302fa9a8124cd88cb5f2bef | [
"LicenseRef-scancode-free-unknown",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive"
] | permissive | dataiku/dataiku-contrib | 2a2f2fb420d7f2ab49b82d80659cc6f6ec1d8f61 | 9a9f189e8a544a81c205d8a8b3779d4517b88653 | refs/heads/master | 2023-09-04T03:33:58.625093 | 2023-04-26T08:17:34 | 2023-04-26T08:17:34 | 45,074,604 | 103 | 94 | Apache-2.0 | 2023-06-08T21:29:07 | 2015-10-27T22:41:00 | Python | UTF-8 | Python | false | false | 7,769 | py | geocoder_common.py | # -*- coding: utf-8 -*-
import dataiku
import pandas as pd, numpy as np
from dataiku import pandasutils as pdu
import requests
import urllib
import json
import time
from datetime import datetime
from dataiku.customrecipe import *
import dataiku_esri_utils
import common
from dataiku_esri_utils import recipe_config_get_s... |
13fef7a730bf880efe4807a06008fc4958fcade4 | e76a79816ff5203be2c4061e263a09d31072c940 | /programs/buck_version.py | 309cb96c69d96193797f6c3065058c6f91e56a93 | [
"Apache-2.0"
] | permissive | facebook/buck | ef3a833334499b1b44c586e9bc5e2eec8d930e09 | 9c7c421e49f4d92d67321f18c6d1cd90974c77c4 | refs/heads/main | 2023-08-25T19:30:28.803205 | 2023-04-19T11:32:59 | 2023-04-19T11:32:59 | 9,504,214 | 8,481 | 1,338 | Apache-2.0 | 2023-05-04T22:13:59 | 2013-04-17T18:12:18 | Java | UTF-8 | Python | false | false | 4,402 | py | buck_version.py | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... |
747dd4acf6c15384730764b8851d888dc6dcb128 | 32c1a6b75b73b2fe68d9e33a368754a5860f2f01 | /qcengine/programs/turbomole/define.py | 11f0c9b3f3d975fba976fdba46cc1280ae803108 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | MolSSI/QCEngine | 44d6bbf9a2c8c2c6ea5a0e1ee011d512357d4346 | cbec059bb52162c3db7a747d680871749d101f41 | refs/heads/master | 2023-08-20T15:05:17.353145 | 2023-08-18T21:06:46 | 2023-08-18T21:06:46 | 123,499,436 | 139 | 88 | BSD-3-Clause | 2023-09-09T02:41:01 | 2018-03-01T22:25:35 | Python | UTF-8 | Python | false | false | 7,659 | py | define.py | import itertools as it
from subprocess import PIPE, Popen, TimeoutExpired
from typing import Any, Dict, Optional
from qcengine.exceptions import InputError
from .methods import KEYWORDS, METHODS
def decode_define(str_: str) -> str:
"""Decode define output.
Depending on the employed basis set the encoding m... |
ee7a35e3364cc45c4349e21fa1f9ae736540424a | 6a017c87a1c3e016de5e1704d23d1d2034fab41c | /docs/source/conf.py | 93436e2e4678c22a40a778631c8608d82a4fbd36 | [
"BSD-3-Clause"
] | permissive | CoffeaTeam/coffea | 53997aefbccf583cc901718b5c639a4b4535dbcd | a33fc173f3bf2be307bac6517e624fc6ce0c4c3e | refs/heads/master | 2023-08-10T12:36:49.238010 | 2023-08-02T02:57:18 | 2023-08-02T02:57:18 | 159,673,139 | 116 | 100 | BSD-3-Clause | 2023-09-12T20:32:08 | 2018-11-29T13:47:57 | Jupyter Notebook | UTF-8 | Python | false | false | 6,466 | py | conf.py | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
import importlib
import in... |
dcac74144ea941530698c5291d4da564fbed520b | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /tools/android/asan/third_party/with_asan.py | 481993e4be015143fd0be5207bd5ae7dbc9300ff | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 3,873 | py | with_asan.py | #!/usr/bin/env vpython3
# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import contextlib
import logging
import os
import subprocess
import sys
_SRC_ROOT = os.path.abspath(
os.path.join(os.path.dirname(__f... |
7ffcaae187177345260515b1821540d90802cf21 | a902290fb3b911676358ae4d93f83061a6c2bd0f | /InvenTree/plugin/samples/integration/test_api_caller.py | 28b51835c80c1504a2b1db5bbc967b5aa6c3327a | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | inventree/InvenTree | a15e54182c9bfafdf5348cc9a66da1004e23e760 | e88a8e99a5f0b201c67a95cba097c729f090d5e2 | refs/heads/master | 2023-09-03T19:32:35.438375 | 2023-08-30T00:25:40 | 2023-08-30T00:25:40 | 85,894,461 | 3,077 | 549 | MIT | 2023-09-14T14:21:01 | 2017-03-23T01:44:10 | Python | UTF-8 | Python | false | false | 598 | py | test_api_caller.py | """Unit tests for action caller sample."""
from django.test import TestCase
from plugin import registry
class SampleApiCallerPluginTests(TestCase):
"""Tests for SampleApiCallerPluginTests."""
def test_return(self):
"""Check if the external api call works."""
# The plugin should be defined
... |
32fd851ab39d9ff98dd9f8f3547d52e5ffb7306b | fa1ad2e2ac7e376fc7cb3b3a6e1bb88eed3e80be | /dts/airbyte/airbyte-integrations/connectors/source-prestashop/source_prestashop/source.py | 3da1f7c1106335718c4eec6a0a03465de99c253c | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"Elastic-2.0"
] | 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,980 | py | source.py | #
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#
"""
This file provides the necessary constructs to interpret a provided declarative YAML configuration file into
source connector.
WARNING: Do not modify this file.
"""
import logging
from typing import Any, Iterator, List, Mapping, MutableMapping, Union
... |
59285bc4abf625f332850bc740484a76be46ba84 | c531778b6b568e5924fcf438dce274067b6e1d31 | /packages/httpcore/_backends/sync.py | 968aead9eb53bc022a2d5111a3efdaabe65f1269 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | CastagnaIT/plugin.video.netflix | a5180fbbaea244a490f750a2dd417b4e7303321a | ece10d24449faaccd7d65a4093c6b5679ee0b383 | refs/heads/master | 2023-07-01T23:32:20.442923 | 2023-06-27T06:42:18 | 2023-06-27T06:42:18 | 164,314,803 | 2,019 | 456 | MIT | 2023-09-13T13:34:06 | 2019-01-06T14:27:56 | Python | UTF-8 | Python | false | false | 5,621 | py | sync.py | import socket
import threading
import time
from ssl import SSLContext
from types import TracebackType
from typing import Optional, Type
from .._exceptions import (
ConnectError,
ConnectTimeout,
ReadError,
ReadTimeout,
WriteError,
WriteTimeout,
map_exceptions,
)
from .tcp_keep_alive import e... |
f969b3ce84a73785da5f9ec8992f0e8058387121 | 8475af3849ca19094d3aa95c9108d7f8ef3e2536 | /shub/image/push.py | 89520e48f6aa13222804db1ac863b05ef183188c | [
"BSD-3-Clause"
] | permissive | scrapinghub/shub | 9b1b9df4caad48861707aca3685fe8b2544e433b | 519809d7eb16212f2644f6e2bf1672b1e86a78c2 | refs/heads/master | 2023-09-03T01:43:35.014440 | 2023-04-14T16:02:25 | 2023-04-14T16:02:25 | 20,890,335 | 124 | 84 | BSD-3-Clause | 2023-04-14T14:43:21 | 2014-06-16T15:38:11 | Python | UTF-8 | Python | false | false | 7,653 | py | push.py | from collections import OrderedDict
import click
from shub import exceptions as shub_exceptions
from shub.config import load_shub_config, list_targets_callback
from shub.image import utils
from shub.image.test import test_cmd
from shub.image.utils import get_image_registry
SHORT_HELP = 'Push an image to a specified ... |
d4de3577bd6ed7f02710e460837c301551af81dc | 620323fc090cebaf7aca456ff3f7fbbe1e210394 | /unicode_escape_decode.py | 2e18d3d73fff9adbe169e9a5cd109f37527fb2bd | [
"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 | 425 | py | unicode_escape_decode.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = "ipetrash"
import codecs
text = "\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (username)"
print(codecs.unicode... |
d2fe7c1917a34afb5721fc09f04ae8e4755cc3ea | ac235a23f22be0d6f1818bb53902177f9969813a | /ddtrace/profiling/collector/_task.pyi | f26c5d69b7d7bab0998e7713c85557dae8ffe9e7 | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | DataDog/dd-trace-py | f09d6d48c4c69aea68f999fc8a458ade5c6150cf | 1e3bd6d4edef5cda5a0831a6a7ec8e4046659d17 | refs/heads/1.x | 2023-09-01T20:25:26.746324 | 2023-09-01T18:54:37 | 2023-09-01T18:54:37 | 61,572,326 | 461 | 426 | NOASSERTION | 2023-09-14T20:38:57 | 2016-06-20T18:52:23 | Python | UTF-8 | Python | false | false | 241 | pyi | _task.pyi | import types
import typing
def get_task(
thread_id: int,
) -> typing.Tuple[typing.Optional[int], typing.Optional[str], typing.Optional[types.FrameType]]: ...
def list_tasks() -> typing.List[typing.Tuple[int, str, types.FrameType]]: ...
|
188ca556f7462648b208c4c4e7c4023eabee0e99 | 353730afc44b31cf4efded67a4e2835d19c75922 | /tensorly/decomposition/_nn_cp.py | ab9c0a88906fd6b1e58412af2d7d5eaa625718fb | [
"BSD-3-Clause"
] | permissive | tensorly/tensorly | 605529bf5206f1977c6067f96f47bec439355246 | de05e178850eb2abe43ec1a40f80624ca606807d | refs/heads/main | 2023-08-31T14:01:45.527525 | 2023-08-20T18:28:25 | 2023-08-20T18:28:25 | 71,603,727 | 1,533 | 334 | NOASSERTION | 2023-09-08T18:10:37 | 2016-10-21T23:14:52 | Python | UTF-8 | Python | false | false | 24,486 | py | _nn_cp.py | import warnings
import tensorly as tl
from ._base_decomposition import DecompositionMixin
from ._cp import initialize_cp
from ..tenalg.proximal import hals_nnls
from ..cp_tensor import (
CPTensor,
unfolding_dot_khatri_rao,
cp_norm,
cp_normalize,
validate_cp_rank,
)
from ..tenalg.svd import svd_inter... |
7870cb715cb792b139fcc8092b0c35e8cbc008f4 | 8d77f3b72dc52b85ee0c4ef6ba06f63a6920841f | /python/aitemplate/frontend/nn/__init__.py | 16e597a8486d5be952f42266065cd8a8c93bc948 | [
"Apache-2.0"
] | permissive | facebookincubator/AITemplate | b643c217e1d15f7f17dab1eb1cc6855eab664b97 | c60dc19788217556ba12ea378c02b9fd0aea9ffe | refs/heads/main | 2023-08-28T18:22:15.828008 | 2023-08-28T14:43:41 | 2023-08-28T14:43:41 | 514,321,895 | 4,065 | 334 | Apache-2.0 | 2023-09-14T04:53:57 | 2022-07-15T15:40:58 | Python | UTF-8 | Python | false | false | 1,956 | py | __init__.py | # Copyright (c) Meta Platforms, Inc. and affiliates.
#
# 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... |
5462eba4ae8a7807c382a34b82c9e07c3c2089ca | 45e376ae66b78b17788b1d3575b334b2cb1d0b1c | /tests/secrets/test_runner.py | 041ab6e6b82520871600b1a7ab9e19f3a2f49b38 | [
"Apache-2.0"
] | permissive | bridgecrewio/checkov | aeb8febed2ed90e61d5755f8f9d80b125362644d | e64cbd27ffb6f09c2c9f081b45b7a821a3aa1a4d | refs/heads/main | 2023-08-31T06:57:21.990147 | 2023-08-30T23:01:47 | 2023-08-30T23:01:47 | 224,386,599 | 5,929 | 1,056 | Apache-2.0 | 2023-09-14T20:10:23 | 2019-11-27T08:55:14 | Python | UTF-8 | Python | false | false | 19,174 | py | test_runner.py | import unittest
import os
from checkov.common.bridgecrew.check_type import CheckType
from checkov.common.bridgecrew.integration_features.features.policy_metadata_integration import integration as metadata_integration
from checkov.common.bridgecrew.severities import BcSeverities, Severities
from checkov.secrets.runner... |
da7f8ff00e612614f33d204070a2ed46a86ad6fc | a0eb6744e6f7f509b96d21f0bc8b3f8387f6861c | /notebook/numpy_ravel_flatten_timeit.py | 8f843e3161cecd6ebffc9b447d677826a71f8997 | [
"MIT"
] | permissive | nkmk/python-snippets | a6c66bdf999502e52f4795a3074ced63bf440817 | f9dd286a9cf93f474e20371f8fffc4732cb3c4d5 | refs/heads/master | 2023-08-03T04:20:05.606293 | 2023-07-26T13:21:11 | 2023-07-26T13:21:11 | 98,900,570 | 253 | 77 | MIT | 2020-10-25T01:12:53 | 2017-07-31T14:54:47 | Jupyter Notebook | UTF-8 | Python | false | false | 786 | py | numpy_ravel_flatten_timeit.py | import numpy as np
a = np.arange(12).reshape(3, 4)
print(a)
# [[ 0 1 2 3]
# [ 4 5 6 7]
# [ 8 9 10 11]]
%%timeit
a.ravel()
# 242 ns ± 2.78 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
%%timeit
a.flatten()
# 725 ns ± 45.2 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)
%%timeit
a... |
c7b401919d5058221032c931ae73d79f675b0210 | 6436d1e6c23f9f43a8025889dc4414a3ad66acf2 | /Assets/Python/BUG/BugDll.py | 168ffe9db1dbf40857346e450ffa2fa415fb3970 | [
"MIT"
] | permissive | dguenms/Dawn-of-Civilization | b710195c4f46fe11d9229182c3b1e07b77f42637 | a305e7846d085d6edf1e9c472e8dfceee1c07dd4 | refs/heads/develop | 2023-09-04T04:57:00.086384 | 2023-09-01T15:24:28 | 2023-09-01T15:24:28 | 45,362,597 | 116 | 121 | MIT | 2023-02-08T00:18:53 | 2015-11-01T23:52:28 | C++ | UTF-8 | Python | false | false | 6,042 | py | BugDll.py | ## BugDll
##
## Collection of utility functions for dealing with the optional BUG DLL.
##
## General
##
## - isPresent()
## Returns True if the BUG DLL is present.
##
## - getVersion()
## Returns the version number of the BUG DLL if it's present, zero (0) otherwise.
##
## - isVersion(version)
... |
be07245500341137e3d783b9391c3159baac8704 | fad7958b93f330e365835576712a2caeec87a669 | /tests/test_base.py | 6cdf8fc5757f17f91efbeafe77215e05ffddf773 | [
"MIT"
] | permissive | JackMcKew/pandas_alive | 1a8e8ec82a230b0d92b3593c6a968a6c840c625a | 1caa67677226b3ecdd700f7878ddc0d09bed4c17 | refs/heads/main | 2023-08-29T21:01:11.181482 | 2022-03-10T04:05:09 | 2022-03-10T04:05:09 | 260,785,184 | 559 | 109 | MIT | 2023-02-10T23:09:08 | 2020-05-02T22:18:27 | Python | UTF-8 | Python | false | false | 295 | py | test_base.py | import os
import sys
import pandas_alive
import pytest
# myPath = os.path.dirname(os.path.abspath(__file__))
# sys.path.insert(0, "...")
# @pytest.fixture(scope="function")
def test_load_dataset():
# Load default dataset:
covid_df = pandas_alive.load_dataset()
return covid_df
|
16230f050a8300db13b3ee5e46560705dd4e3cad | c618bbf2719431999b1007461df0865bab60c883 | /docs/examples/use_cases/tensorflow/efficientdet/model/utils/optimizers.py | bcb81e4a26eb5242addd28d850b10b70677a5119 | [
"Apache-2.0"
] | permissive | NVIDIA/DALI | 3d0d061135d19e092647e6522046b2ff23d4ef03 | 92ebbe5c20e460050abd985acb590e6c27199517 | refs/heads/main | 2023-09-04T01:53:59.033608 | 2023-09-01T13:45:03 | 2023-09-01T13:45:03 | 135,768,037 | 4,851 | 648 | Apache-2.0 | 2023-09-12T18:00:22 | 2018-06-01T22:18:01 | C++ | UTF-8 | Python | false | false | 7,764 | py | optimizers.py | # Copyright 2020 Google Research. 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... |
0eaf05513b0108d1b67e4ece34612524bd59eeca | 6a40d044498ecaf41d6dd93f4fcd53fd65b51ae2 | /recommends/storages/djangoorm/managers.py | f1ef4f4ae5fb613c22b4293f924af21943135047 | [
"MIT"
] | permissive | fcurella/django-recommends | f1d565bc148fe1b4ec2546f17d3bda7fe02efc2e | 414436f83b8a0fc5a0c45eb585f9db7a4ed4e70a | refs/heads/master | 2023-04-07T12:31:34.728654 | 2023-01-09T16:45:59 | 2023-01-09T16:45:59 | 2,696,671 | 162 | 43 | MIT | 2023-03-31T14:39:20 | 2011-11-02T17:32:29 | Python | UTF-8 | Python | false | false | 3,646 | py | managers.py | from django.conf import settings
from django.db import models
from recommends.managers import CachedContentTypesMixin
class RecommendsManager(models.Manager, CachedContentTypesMixin):
def filter_for_model(self, model):
ctype_id = self.get_ctype_id_for_obj(model)
return self.filter(object_ctype=cty... |
d26842a7efabe7f6e866ffd922df175475538c69 | fbdc48c28e54fb33ae4842ef95ff63893902c99a | /scripts/examples/02-Image-Processing/01-Image-Filters/midpoint_filter.py | f6a0ebcf77089077a05374d8af1069ed2659df0f | [
"MIT"
] | permissive | openmv/openmv | 44d4b79fc8693950a2e330e5e0fd95b5c36e230f | 8a90e070a88b7fc14c87a00351b9c4a213278419 | refs/heads/master | 2023-08-30T20:59:57.227603 | 2023-08-23T16:50:55 | 2023-08-23T16:50:55 | 14,360,940 | 2,150 | 1,226 | MIT | 2023-09-14T07:18:15 | 2013-11-13T10:23:44 | C | UTF-8 | Python | false | false | 1,262 | py | midpoint_filter.py | # Midpoint Filter Example
#
# This example shows off midpoint filtering. Midpoint filtering replaces each
# pixel by the average of the min and max pixel values for a NxN neighborhood.
import sensor
import time
sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE
... |
e1c976c8dbb25fcd3f27f7a5fba0a16f2e336a47 | 5eb640122da4460b38ecb0a5add0204f3fa3e7d2 | /test/unit/data/model/mapping/test_annotation_associations.py | e1cdcfbd8325515d5b0859493fa3bc8044c60e7d | [
"CC-BY-2.5",
"MIT",
"CC-BY-3.0",
"AFL-3.0"
] | permissive | galaxyproject/galaxy | 5748409eb6693b1611f289d164f85e20c3237495 | d12132439843085e5fdbd3977e77590acb5e4802 | refs/heads/master | 2023-08-28T22:35:51.248138 | 2023-08-26T07:59:46 | 2023-08-26T07:59:46 | 31,211,061 | 1,277 | 1,137 | NOASSERTION | 2023-09-14T19:39:01 | 2015-02-23T14:18:06 | Python | UTF-8 | Python | false | false | 3,932 | py | test_annotation_associations.py | import pytest
from galaxy import model
from galaxy.model.unittest_utils.model_testing_utils import ( # noqa: F401
create_and_drop_database,
dbcleanup,
disposing_engine,
get_stored_obj,
url,
)
pytest_plugins = ["galaxy.model.unittest_utils.gxy_model_fixtures"]
@pytest.fixture(scope="module")
def... |
3edba58fcb89cf8394f2ec054d91af2aff61e053 | c4b8e1e09dedbccd37ca008ecaaca4438610bbaf | /z3/hidato.py | 518802a4d16286f49d2ce426d9595a31bea0f1ce | [
"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 | 3,884 | py | hidato.py | #!/usr/bin/python -u
# -*- coding: latin-1 -*-
#
# Hidato puzzle in Z3
# http://www.shockwave.com/gamelanding/hidato.jsp
# http://www.hidato.com/
# '''
# Puzzles start semi-filled with numbered tiles.
# The first and last numbers are circled.
# Connect the numbers together to win. Consecutive
# number must touch horiz... |
6acadda8e0aa4cc4d8a8ecd35682ebf98cb95070 | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-AuthenticationServices/PyObjCTest/test_ascredentialidentitystorestate.py | e76776271f9afd78cccf78e11883e615dad722b7 | [
"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 | 456 | py | test_ascredentialidentitystorestate.py | import AuthenticationServices
from PyObjCTools.TestSupport import TestCase, min_os_level
class TestASCredentialIdentityStoreState(TestCase):
@min_os_level("11.0")
def test_methods11_0(self):
self.assertResultIsBOOL(
AuthenticationServices.ASCredentialIdentityStoreState.isEnabled
)
... |
a002f85ab0a041e3bb1c2845abb8407c938f5e7e | c2bcf42e04a1e2146b41b250ff14e62fddcdf589 | /skl2onnx/shape_calculators/multioutput.py | fe275dfb4de21c2f2b0b18b9f6675a9b9b8d62fd | [
"Apache-2.0"
] | permissive | onnx/sklearn-onnx | 0f958e1c090572fbe11e15f95bec975d1780cf8d | 895c3a76a315c7a6567a1a07a96dc658994ec16a | refs/heads/main | 2023-08-18T18:49:25.164433 | 2023-08-17T09:52:31 | 2023-08-17T09:52:31 | 162,340,939 | 455 | 92 | Apache-2.0 | 2023-08-31T16:04:13 | 2018-12-18T20:18:48 | Python | UTF-8 | Python | false | false | 1,352 | py | multioutput.py | # SPDX-License-Identifier: Apache-2.0
from ..common._registration import register_shape_calculator
from ..common.utils import check_input_and_output_numbers
from ..common.data_types import SequenceType
_stack = []
def multioutput_regressor_shape_calculator(operator):
"""Shape calculator for MultiOutputRegresso... |
f7a273d9c56d00c7b13eba59989148da3fa0664b | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowLispRegistrationHistory/cli/equal/golden_output2_expected.py | 7fbbd8c7b78ede41244663a7f42a52dfd774a866 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 6,370 | py | golden_output2_expected.py | expected_output = {
'lisp_id': {
0: {
'eid_address': {
'0.0.0.0/0': [{
'time': 'Dec 1 09:34:15.025',
'instance_id': 16777214,
'protocol': 'UDP',
'roam': 'No',
'wlc': 'No',
... |
12755759edfda56e91cdc52220e93b6b48ae5d1d | 9cdd1751bc27310f486427aaaae901ca06b79003 | /tests/custom_cluster/test_breakpad.py | 38c8275889423162dde2bea549b79a902a2d367e | [
"Apache-2.0",
"OpenSSL",
"bzip2-1.0.6",
"LicenseRef-scancode-openssl",
"LicenseRef-scancode-ssleay-windows",
"LicenseRef-scancode-google-patent-license-webrtc",
"PSF-2.0",
"BSD-3-Clause",
"dtoa",
"MIT",
"LicenseRef-scancode-mit-modification-obligations",
"Minpack",
"BSL-1.0",
"LicenseRef-s... | permissive | apache/impala | bb9970c64a43824950ec5b69f2ef4b50158a1e8a | b718d63860356a04814e07d91711c3c748b3e769 | refs/heads/master | 2023-09-03T04:29:12.639452 | 2023-06-07T23:51:15 | 2023-08-30T04:56:51 | 56,128,733 | 985 | 475 | Apache-2.0 | 2023-08-31T14:15:44 | 2016-04-13T07:00:08 | C++ | UTF-8 | Python | false | false | 21,154 | py | test_breakpad.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... |
dda3e65053667f2ee342be907bbed69ccf07869c | 10cb11f83e1c8b51b9d72c28d6259a56ff1a97c8 | /tests/unit/hook_packages/terraform/hooks/prepare/test_types.py | 16de4bd21e2bf89aa5b7645695350fb17efa2b0b | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"BSD-2-Clause"
] | permissive | aws/aws-sam-cli | 6d4411aacf7f861e75e5cf4882a32858797a276d | b297ff015f2b69d7c74059c2d42ece1c29ea73ee | refs/heads/develop | 2023-08-30T23:28:36.179932 | 2023-08-30T21:58:26 | 2023-08-30T21:58:26 | 92,205,085 | 1,402 | 470 | Apache-2.0 | 2023-09-14T21:14:23 | 2017-05-23T18:16:23 | Python | UTF-8 | Python | false | false | 3,288 | py | test_types.py | """Test types"""
from unittest import TestCase
from unittest.mock import patch, Mock
from samcli.hook_packages.terraform.hooks.prepare.types import (
ResourceProperties,
TFResource,
ResourceTranslationProperties,
)
class TestLambdaLayerVersionProperties(TestCase):
@patch("samcli.hook_packages.terrafo... |
2bf537e0a7a4ab9339a894c9ea56b7573a8266a7 | 8b7d9d684b0dcf38626ec63d0d809327fce6196e | /tests/test_reporter_promethues.py | ba2cdf589f97f286999612dad692fdfa9d6b65fa | [
"MIT"
] | permissive | run-ai/runai | 917b274446ef38710e39b5d527a71c5b18cca3af | 3bab5e23730d76d655ae3d9143d8e78a2b5cb0c7 | refs/heads/master | 2022-12-06T03:27:32.915727 | 2022-11-22T09:48:02 | 2022-11-22T09:48:02 | 205,650,825 | 122 | 17 | MIT | 2021-02-02T12:10:12 | 2019-09-01T08:42:13 | Python | UTF-8 | Python | false | false | 5,807 | py | test_reporter_promethues.py | import os
import string
import unittest
from runai.utils import Hook, random
from runai.reporter import report_promethues, Reporter
def random_args():
reporter_name = random.string(chars=string.ascii_letters + string.digits)
reporter_value = random.number()
report_type = random.choice([_ for _ in report_p... |
142b63d50c1670970673eabc9214edee17022ed4 | dab10c721000fd9eb38676d6b2730f155eedd54e | /recirq/hfvqe/util_test.py | 27f8841f843932411d478e45bf2a9d3bc0849361 | [
"Apache-2.0"
] | permissive | quantumlib/ReCirq | f45e55e432f2e29fb8f2fe35a3d436a629219e86 | d021621a3837693ae9c5fdc5c05058de20fba314 | refs/heads/master | 2023-09-03T19:35:55.281836 | 2023-09-01T01:12:40 | 2023-09-01T01:12:40 | 246,951,354 | 260 | 116 | Apache-2.0 | 2023-09-09T00:41:35 | 2020-03-12T23:51:33 | Python | UTF-8 | Python | false | false | 2,496 | py | util_test.py | # Copyright 2020 Google
#
# 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, soft... |
952f560e350aa080e43ce275bb2827b09876a687 | bfc42c114f652012b6cfd14e7cccf52cb6b9ac7e | /tests/spdx/parser/tagvalue/test_file_parser.py | aedf197b57c488860775061c08ef2cc380f5a76f | [
"Apache-2.0",
"GPL-2.0-only"
] | permissive | spdx/tools-python | 05a952501af2ac608678cb1737f7c661f6091fa2 | 777bd274dd06cb24342738df7da5ab285d652350 | refs/heads/main | 2023-08-31T09:39:52.930063 | 2023-08-24T06:39:48 | 2023-08-24T10:22:33 | 32,761,058 | 147 | 136 | Apache-2.0 | 2023-09-14T15:50:59 | 2015-03-23T21:54:39 | Python | UTF-8 | Python | false | false | 2,803 | py | test_file_parser.py | # SPDX-FileCopyrightText: 2023 spdx contributors
#
# SPDX-License-Identifier: Apache-2.0
import pytest
from spdx_tools.common.spdx_licensing import spdx_licensing
from spdx_tools.spdx.model import FileType, SpdxNoAssertion
from spdx_tools.spdx.parser.error import SPDXParsingError
from spdx_tools.spdx.parser.tagvalue.p... |
872267c65a58b76c7a9f1dd6f56db73c611e5969 | 5d3f7da858b8bace0b047474aaa9b7f089544219 | /scripts/helpers/manifest.py | d5cb9896173242377e77c4afb686a77b7fe41b72 | [
"MIT"
] | permissive | hacs/default | 7e5225bab7c0f5dc19dc33559dc62ecbd81ddf3c | 156c1ed27ec7106d76be9ea722c3baca92b85682 | refs/heads/master | 2023-08-31T00:13:49.869594 | 2023-08-27T09:26:47 | 2023-08-27T09:26:47 | 216,391,224 | 298 | 1,322 | MIT | 2023-09-14T10:39:52 | 2019-10-20T16:23:04 | Python | UTF-8 | Python | false | false | 293 | py | manifest.py | import json
import os
from glob import glob
from scripts.helpers.integration_path import get_integration_path
def get_manifest():
manifest = f"{get_integration_path()}/manifest.json"
with open(manifest, "r") as mf:
manifest = json.loads(mf.read())
return manifest or {}
|
164b09cc48f459ef92bb708c84ed25499c1cdb51 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/apps/mobile_auth/utils.py | c777d175ff5b15cfafa15a56a1590f6e1b13eb93 | [
"BSD-3-Clause"
] | permissive | dimagi/commcare-hq | a43c7dd32b5f89c89fd5aa1b1359ab7301f4ff6b | e7391ddae1af1dbf118211ecb52c83fc508aa656 | refs/heads/master | 2023-08-16T22:38:27.853437 | 2023-08-16T19:07:19 | 2023-08-16T19:07:19 | 247,278 | 499 | 203 | BSD-3-Clause | 2023-09-14T19:03:24 | 2009-07-09T17:00:07 | Python | UTF-8 | Python | false | false | 2,021 | py | utils.py | import base64
import os
from datetime import datetime, timedelta
from django.utils.translation import gettext as _
from corehq.apps.mobile_auth.xml import AuthKeys, KeyRecord, OpenRosaResponse
def generate_aes_key():
# get 32 byte key
bin_key = os.urandom(32)
return base64.b64encode(bin_key)
def new_k... |
2f382fb3d6d7573ac4feb3ceddbcb293e1d579b9 | 2d05050d0ada29f7680b4df20c10bb85b0530e45 | /tests/python/unittest/test_target_codegen_aarch64.py | e873bce52bdfac13eace870629ca3daf7d838ff7 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Unlicense",
"Zlib",
"LLVM-exception",
"BSD-2-Clause"
] | permissive | apache/tvm | 87cb617f9a131fa44e1693303aaddf70e7a4c403 | d75083cd97ede706338ab413dbc964009456d01b | refs/heads/main | 2023-09-04T11:24:26.263032 | 2023-09-04T07:26:00 | 2023-09-04T07:26:00 | 70,746,484 | 4,575 | 1,903 | Apache-2.0 | 2023-09-14T19:06:33 | 2016-10-12T22:20:28 | Python | UTF-8 | Python | false | false | 16,454 | py | test_target_codegen_aarch64.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... |
5b4f909d6c10e3a7d017edb51b1e9ffa01b9ee1e | 248bdd698605a8b2b623fe82899eec15bc80b889 | /third_party/python/python-hglib/tests/test-diff.py | 4f4fcc87e0f183e870d8034800ebf33e530500b9 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | Feodor2/Mypal68 | 64a6f8055cb22ae6183a3a018e1487a44e20886e | dc92ce6bcc8032b5311ffc4f9f0cca38411637b1 | refs/heads/main | 2023-08-31T00:31:47.840415 | 2023-08-26T10:26:15 | 2023-08-26T10:26:15 | 478,824,817 | 393 | 39 | NOASSERTION | 2023-06-23T04:53:57 | 2022-04-07T04:21:39 | null | UTF-8 | Python | false | false | 1,314 | py | test-diff.py | from tests import common
from hglib.util import b
class test_diff(common.basetest):
def test_basic(self):
self.append('a', 'a\n')
self.client.add(b('a'))
diff1 = b("""diff -r 000000000000 a
--- /dev/null
+++ b/a
@@ -0,0 +1,1 @@
+a
""")
self.assertEquals(diff1, self.client.diff(nodat... |
49ba31c5564f5eada973dd3dbe81581c43b471d7 | 96dcea595e7c16cec07b3f649afd65f3660a0bad | /tests/components/logbook/common.py | 9fe6c2b60a8a1d76f39d2968a99426fecf492e39 | [
"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,729 | py | common.py | """Tests for the logbook component."""
from __future__ import annotations
import json
from typing import Any
from homeassistant.components import logbook
from homeassistant.components.logbook import processor
from homeassistant.components.logbook.models import LogbookConfig
from homeassistant.components.recorder.mode... |
632df301a1d467f290394e21c9279d5e60976675 | 9aae726a537662311d1126895b01286968654031 | /setup.py | bfb8475c99a8534d6d986ffa423416864b824567 | [
"MIT"
] | permissive | pwnfoo/NTLMRecon | 5e6047838a3ed4da729165ce629f24f8bf80577b | da150d6292e2a6bea298fda4621311e7347eefc6 | refs/heads/master | 2022-09-02T13:24:54.848843 | 2022-04-15T19:55:16 | 2022-04-15T19:55:16 | 225,114,697 | 180 | 37 | MIT | 2021-04-19T02:24:51 | 2019-12-01T06:06:30 | Python | UTF-8 | Python | false | false | 1,679 | py | setup.py | from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='ntlmrecon', # Required
version='0.4b0', # Required
description='A tool to enumerate... |
da040705d6cf51f0eabcfc1887e0f323b0146635 | 4091caecbc727e6d6ae0d827afce11c5979a84fd | /tools/accuracy_checker/tests/test_segmentation_representation.py | 00fcaeebb184a09492632a85caf8277a898f550d | [
"Apache-2.0"
] | permissive | openvinotoolkit/open_model_zoo | fdb03dd40bfccb854e4ed4f7b9beaa90596963cd | 7929adbe91e9cfe8dc5dc1daad5ae7392f9719a0 | refs/heads/master | 2023-08-18T18:03:47.254427 | 2023-08-18T10:54:31 | 2023-08-18T10:54:31 | 153,097,694 | 1,712 | 730 | Apache-2.0 | 2023-09-11T11:31:20 | 2018-10-15T10:55:02 | Python | UTF-8 | Python | false | false | 12,376 | py | test_segmentation_representation.py | """
Copyright (c) 2018-2023 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
0b158d37dff88a2c10d16d2243b8c008c7760f4b | 98128b69fa7b3b663c32c817aa2da41cbf1b882b | /localization/pipeline/run_tests.py | cf5c3b04098411e8f55a2a4ceae4f86d452f6650 | [
"Apache-2.0"
] | permissive | NASA-AMMOS/MMGIS | 7fb3cd47f5467127add14e6ea2ae11d2b9e65438 | dc4d7ff352c5e1ebc14b4c902ca4ba69dc11f87d | refs/heads/master | 2023-09-01T08:45:18.109634 | 2023-02-22T00:07:35 | 2023-02-22T00:07:35 | 178,263,007 | 103 | 29 | Apache-2.0 | 2023-09-08T01:05:19 | 2019-03-28T18:42:08 | JavaScript | UTF-8 | Python | false | false | 79 | py | run_tests.py |
#discover and run all unit tests in project
python -m unittest discover -v
|
08be17a05377a6133b6af1c80f4d9552416e0237 | 89420cda57f03791a5448ed4eeb967d06a4aade3 | /arviz/plots/compareplot.py | 31953a3cee69dfdc7b4586c0adbbd3a6f551f7cb | [
"Apache-2.0"
] | permissive | arviz-devs/arviz | fa2423e28f7a8c1b22986dbef317579c00744f75 | 24c260a0390d030e106943f21811652ea82aebc7 | refs/heads/main | 2023-09-03T12:22:12.075948 | 2023-07-18T22:29:35 | 2023-07-18T22:29:35 | 39,890,704 | 1,421 | 413 | Apache-2.0 | 2023-09-13T15:53:19 | 2015-07-29T11:51:10 | Python | UTF-8 | Python | false | false | 6,067 | py | compareplot.py | """Summary plot for model comparison."""
import numpy as np
from ..labels import BaseLabeller
from ..rcparams import rcParams
from .plot_utils import get_plotting_function
def plot_compare(
comp_df,
insample_dev=False,
plot_standard_error=True,
plot_ic_diff=True,
order_by_rank=True,
legend=Tr... |
782e4f9c891add4a96af3e4ecad13e37d9051a1b | 6b97499b67fa3de10eb9449f4805100cfca0bbbd | /account/tests/test_decorators.py | 06c622405c91621f0ed37b26bd8d594107909dfa | [
"MIT"
] | permissive | pinax/django-user-accounts | c9b9b74bf14c1f117766b89829055c35cf794345 | a69832facfb511ee9347fea7bc4303a8729c97a7 | refs/heads/master | 2023-08-17T06:51:55.779202 | 2023-02-09T09:22:00 | 2023-02-09T09:22:00 | 3,682,622 | 976 | 334 | MIT | 2023-09-14T18:07:35 | 2012-03-10T21:41:14 | Python | UTF-8 | Python | false | false | 745 | py | test_decorators.py | from unittest import mock
from django.http import HttpResponse
from django.test import TestCase
from account.decorators import login_required
@login_required
def mock_view(request, *args, **kwargs):
return HttpResponse("OK", status=200)
class LoginRequiredDecoratorTestCase(TestCase):
def test_authenticat... |
8bb35de643af145428c4e3ab16e720137a20c333 | 993f18c21402d7a4ff21ddb7ff2ec6c80e466f20 | /onnx/__init__.py | 2f17b1ba805fb8a5bea4a023af6f352d3ea6dd7c | [
"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 | 11,753 | py | __init__.py | # Copyright (c) ONNX Project Contributors
#
# SPDX-License-Identifier: Apache-2.0
from __future__ import annotations
__all__ = [
# Constants
"ONNX_ML",
"IR_VERSION",
"IR_VERSION_2017_10_10",
"IR_VERSION_2017_10_30",
"IR_VERSION_2017_11_3",
"IR_VERSION_2019_1_22",
"IR_VERSION_2019_3_18"... |
cb7885601c4bb3f28a291d4c502ae6c8ee0b1d47 | 8f421001634923dbfb032389ecd094d4880e958a | /modules/bgsegm/samples/viz.py | fdcd1c585555d61a19f94979cd53b5b2d1c91c55 | [
"Apache-2.0"
] | permissive | opencv/opencv_contrib | ccf47a2a97022e20d936eb556aa9bc63bc9bdb90 | 9e134699310c81ea470445b4888fce5c9de6abc7 | refs/heads/4.x | 2023-08-22T05:58:21.266673 | 2023-08-11T16:28:20 | 2023-08-11T16:28:20 | 12,756,992 | 8,611 | 6,099 | Apache-2.0 | 2023-09-14T17:35:22 | 2013-09-11T13:28:04 | C++ | UTF-8 | Python | false | false | 1,330 | py | viz.py | import numpy as np
import cv2 as cv
import argparse
import os
def main():
argparser = argparse.ArgumentParser(description='Vizualization of the LSBP/GSOC background subtraction algorithm.')
argparser.add_argument('-g', '--gt', help='Directory with ground-truth frames', required=True)
argparser.add_argume... |
4671e19c80c1942c8d35a73367bc6b0787fc0f42 | 9d38a5326520387d37f27ad397690f3cb15bc6ae | /python/graph/rgcn.py | 9c4014db491f321e64fd28927df0d21fd54139be | [] | no_license | Angel-ML/PyTorch-On-Angel | 11d4aa0b60fc6c79ddf3e7246eb8bc354bc9aef1 | 0532accb42ce7698117e107feb37eebf215dfde8 | refs/heads/master | 2023-08-30T21:08:30.424122 | 2022-11-24T09:46:26 | 2022-11-24T09:46:26 | 187,611,545 | 164 | 53 | null | 2022-11-25T01:42:35 | 2019-05-20T09:38:41 | Scala | UTF-8 | Python | false | false | 5,209 | py | rgcn.py | # Tencent is pleased to support the open source community by making Angel available.
#
# Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. 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 ... |
30ac0b0717caa1eba7591c0b2217f85152e0b5f8 | 05b0c763ab92086e69a8d00ae6465009c596f6bc | /setup.py | a8fed674d85c55c18a17c7b9921d4dfb31b76b0a | [
"Apache-2.0"
] | permissive | intel/intel-extension-for-pytorch | 60ce2af2ec3a1dacae0d0db13dd51a5b44512e61 | 7f9266789de7ca9d8bcf55606f3204f1a3640640 | refs/heads/master | 2023-09-01T09:13:16.866410 | 2023-08-31T08:00:37 | 2023-08-31T08:00:37 | 256,061,008 | 991 | 144 | Apache-2.0 | 2023-08-13T13:56:07 | 2020-04-15T23:35:29 | Python | UTF-8 | Python | false | false | 38,908 | py | setup.py | # This Python file uses the following encoding: utf-8
# !/usr/bin/env python
# Welcome to the Intel Extension for PyTorch setup.py.
#
# Environment variables you are probably interested in:
#
# DEBUG
# build with -O0 and -g (debug symbols)
#
# RELEASE
# build with optimization level -O2
#
# REL_WITH_DEB_... |
6b9dfcf7bbda37c18bf3d1803afa84849780eecf | 8c1221c2912ef2bf110d37f682e89d9285ed6f5e | /src/webdb/hale/views.py | 8ad77b00e6ff02336fde6c4658176ac3ea5562fa | [] | no_license | pjlantz/Hale | 3da378804dae5bfaa0cffa897277caca55827464 | c3cda1173907ad0797c205b61206a71ce0eaa842 | refs/heads/master | 2022-05-28T16:18:22.415456 | 2022-05-23T06:51:38 | 2022-05-23T06:51:38 | 699,015 | 178 | 70 | null | null | null | null | UTF-8 | Python | false | false | 4,602 | py | views.py | ################################################################################
# (c) 2011, The Honeynet Project
# Author: Patrik Lantz patrik@pjlantz.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fre... |
3253c056bd04788830abab415dc215407d27dcf6 | 3cdf7892f13886e8d97c31c665b9a1800b097403 | /quarry/types/chunk.py | 548a9998f7ec01ee36b4375222368f3ab99f1850 | [
"MIT-feh"
] | permissive | barneygale/quarry | 0a4985316a1eaecb87e0b5ce4542011d08e2702b | da88e64e4d841e9c3d23b3614dade041d6613e2a | refs/heads/master | 2023-06-23T06:16:22.840153 | 2023-06-13T22:28:06 | 2023-06-13T22:28:06 | 21,437,069 | 526 | 123 | NOASSERTION | 2023-06-13T22:28:07 | 2014-07-02T19:10:31 | Python | UTF-8 | Python | false | false | 14,122 | py | chunk.py | from collections.abc import Sequence, MutableSequence
from bitstring import BitArray, Bits
import math
def get_width(length, full_width):
"""
Returns the number of bits used by Minecraft to represent indices into a
list of the given length.
"""
width = int(math.ceil(math.log(length, 2)))
if w... |
f013a8b06f21b2b421cadfecebb2f680a23e4146 | a5a36aa7200b0be6ea11ad669ba0534ee1b896a6 | /tests/getattr_test.py | 6deeeb020fada2a8f5ea41f41592177afc0fbb11 | [
"MIT"
] | permissive | vaexio/vaex | ec42919f272a723f884fece3c83975112e7a6f30 | 15245cf4332d4423ac58bd737aee27d911a1b252 | refs/heads/master | 2023-08-11T08:03:33.248943 | 2023-07-21T10:40:58 | 2023-07-21T10:40:58 | 24,528,468 | 7,892 | 686 | MIT | 2023-09-04T05:07:11 | 2014-09-27T09:44:42 | Python | UTF-8 | Python | false | false | 3,825 | py | getattr_test.py | from common import *
def test_column_subset(ds_local):
ds = ds_local
dss = ds[['x', 'y']]
assert dss.get_column_names() == ['x', 'y']
np.array(dss) # test if all columns can be put in arrays
def test_column_subset_virtual(ds_local):
ds = ds_local
ds['r'] = ds.x + ds.y
dss = ds[['r']]
... |
5c876bc7eb202c927052553e4b712a99febd893e | 2a76ca8c01e7abe6ef64d030ecbb65e88641b278 | /glumpy/transforms/log_scale.py | da8909bbc55a59d1a6bc433bf7f0c96d5989f55f | [] | permissive | glumpy/glumpy | 18bfc2d76b7a5fc126fbebddf2970d95238fc66b | 75408635bd46e48ff10939e308a71eafdaff35e8 | refs/heads/master | 2023-09-03T11:48:52.087002 | 2023-04-20T15:23:59 | 2023-04-20T15:23:59 | 23,520,171 | 1,228 | 225 | BSD-3-Clause | 2023-07-07T07:25:18 | 2014-08-31T18:30:26 | Python | UTF-8 | Python | false | false | 2,815 | py | log_scale.py | # -----------------------------------------------------------------------------
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
import numpy as np
from glumpy import library
from... |
16553d8bc62ef2fd5f073c71e7112bd34259f879 | dee696adb52739dd7d4021878bcbade43b359b0c | /sonora/wsgi.py | 7f433cc44fdb2f353145ea34d0d9025d99584bf9 | [
"Apache-2.0"
] | permissive | public/sonora | bbd5f3440301799ed53a7c5659efcefbaf572d9a | f5c7b3dd1826cad5c1252455e14a27bdb17eb2b6 | refs/heads/master | 2023-08-21T05:53:23.711907 | 2023-08-18T16:56:54 | 2023-08-18T16:56:54 | 182,774,837 | 230 | 14 | Apache-2.0 | 2023-08-23T14:43:07 | 2019-04-22T11:54:12 | Python | UTF-8 | Python | false | false | 11,928 | py | wsgi.py | import base64
from collections import namedtuple
import time
from urllib.parse import quote
import grpc
from sonora import protocol
_HandlerCallDetails = namedtuple(
"_HandlerCallDetails", ("method", "invocation_metadata")
)
class grpcWSGI(grpc.Server):
"""
WSGI Application Object tha... |
e34590513f584f347882c6f1efa7d24a99590300 | 9e9858f53eef684140d7274987606a44d3077eaa | /examples/auto_test/SConstruct | 71d1a7cc235f11311e59cd50ac30d5186c8d4d0e | [
"Apache-2.0"
] | permissive | majianjia/nnom | 1b8d11bd0d9c9c179ac0a9106879f0af7235c648 | f5dae9307bf8dd4644210117ff0b2b34b34ac777 | refs/heads/master | 2023-08-11T14:23:34.514766 | 2023-05-16T01:52:33 | 2023-05-16T01:52:33 | 166,869,630 | 767 | 216 | Apache-2.0 | 2023-05-16T01:52:35 | 2019-01-21T19:38:30 | C | UTF-8 | Python | false | false | 1,145 | SConstruct | import os
#if(not os.path.exists('CMSIS_5')):
# os.system('git clone https://github.com/ARM-software/CMSIS_5.git')
ROOT=os.path.abspath('../..')
env = Environment()
env.Replace(
ARCOMSTR = 'AR $SOURCE',
ASCOMSTR = 'AS $SOURCE',
ASPPCOMSTR = 'AS $SOURCE',
CCCOMSTR = 'CC $SOURCE',
CXXCOMSTR = 'C... | |
d5bac1b5f53d3bebe127b9b0ff52a2eb3d9cb90d | 71ba544346ae560c10a6d1b3ea6422ca614dab87 | /examples/sample/sample_relations.py | 963a2af5b31136a57f1bbbf4689801e7d654bfc1 | [
"MIT"
] | permissive | HKUST-KnowComp/ASER | f78f64c46ecf2637a2c138b677728a7efd3af044 | ecf19896ba34dfc8ec06115baccb2cd7e937b662 | refs/heads/master | 2023-08-08T02:32:18.154665 | 2023-07-25T07:23:52 | 2023-07-25T07:23:52 | 184,387,399 | 299 | 34 | MIT | 2022-11-24T05:23:34 | 2019-05-01T08:14:32 | Python | UTF-8 | Python | false | false | 3,181 | py | sample_relations.py | import numpy as np
import pickle
import json
import os
from collections import defaultdict
from aser.database.kg_connection import ASERKGConnection
from aser.extract.parsed_reader import ParsedReader
from aser.extract.aser_extractor import DiscourseASERExtractor
if __name__ == "__main__":
processed_pat... |
5bcbee82d51a6316dbde87b4421d2ad6f71b2716 | 8fa191cd4a67431a04eff62d35122ee83cc7b0af | /bookwyrm/tests/models/test_group.py | 86cafaa394c79d8957a062f6cc4f0c35f2a62018 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | bookwyrm-social/bookwyrm | 24678676a7a58dba96641194dfae3fffbf01574d | 0f8da5b738047f3c34d60d93f59bdedd8f797224 | refs/heads/main | 2023-08-20T21:45:30.957277 | 2023-08-19T23:41:50 | 2023-08-19T23:41:50 | 236,415,735 | 1,398 | 216 | NOASSERTION | 2023-09-08T20:43:06 | 2020-01-27T03:51:54 | Python | UTF-8 | Python | false | false | 4,657 | py | test_group.py | """ testing models """
from unittest.mock import patch
from django.test import TestCase
from bookwyrm import models
@patch("bookwyrm.models.activitypub_mixin.broadcast_task.apply_async")
class Group(TestCase):
"""some activitypub oddness ahead"""
def setUp(self):
"""Set up for tests"""
with... |
69094e52ac12b3129acb03ad12b1d341e3b2dd9b | 744c3b66611b08782fcdd9d66261c4d55b00d426 | /examples/pybullet/gym/pybullet_envs/minitaur/vision/imagery_utils_test.py | 5b5493f64f0c42fbf30cb0967718d7661b2f95a7 | [
"Zlib"
] | permissive | erwincoumans/bullet3 | 4ff9e0aa64b641c65b57b26f415dd69dbfb12256 | 6d181d78a5c7be8714c74055cddcf63d5ccef70a | refs/heads/master | 2023-03-10T14:58:18.072562 | 2023-02-24T18:32:53 | 2023-02-24T18:32:53 | 31,621,748 | 103 | 29 | NOASSERTION | 2019-02-25T17:31:00 | 2015-03-03T21:15:54 | C++ | UTF-8 | Python | false | false | 2,737 | py | imagery_utils_test.py | """Tests for imagery_utils."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import struct
import numpy as np
from pybullet_envs.minitaur.vision import imagery_pb2
from pybullet_envs.minitaur.vision import imagery_utils
from google3.testing.pybase import... |
8af0283915b6c3028b2a4c6918b95de481969953 | 3ab8f9d09a406eda9188adc13b81110519eb5591 | /src/twisted/python/test/strategies.py | d11fbf74dbf9a248c827e74a699c549705e67684 | [
"MIT",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | twisted/twisted | b38039ef9ded2cc35390c280bd8f218b64917dea | cbcb1f7a2d52be937ad2e9ebea941611c4d65516 | refs/heads/trunk | 2023-09-03T21:08:14.581198 | 2023-09-03T20:51:47 | 2023-09-03T20:51:47 | 1,985,358 | 5,319 | 1,363 | NOASSERTION | 2023-09-13T20:30:22 | 2011-07-01T20:40:42 | Python | UTF-8 | Python | false | false | 1,023 | py | strategies.py | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Hypothesis strategies for values related to L{twisted.python}.
"""
from hypothesis.strategies import SearchStrategy, characters, text
def systemdDescriptorNames() -> SearchStrategy[str]:
"""
Build strings that are legal values for t... |
84812ba7905134c1c5115248097a28965f482c34 | 017090be7ab186cb6b47f49e1066ac5cfec3a542 | /src/neptune/internal/utils/json_file_splitter.py | b0b91853a4bf2a08eaf8b68d80d9701426ab5eec | [
"Apache-2.0"
] | permissive | neptune-ai/neptune-client | 9a79f9d93c84b3a20114e6e49a80652930399ece | 9b697ce548634c30dbc5881d4a0b223c8987515d | refs/heads/master | 2023-08-18T01:48:22.634432 | 2023-08-17T11:55:57 | 2023-08-17T11:55:57 | 170,117,229 | 408 | 55 | Apache-2.0 | 2023-09-13T12:51:03 | 2019-02-11T11:25:57 | Python | UTF-8 | Python | false | false | 3,053 | py | json_file_splitter.py | #
# Copyright (c) 2022, Neptune Labs Sp. z o.o.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... |
3c29f1c81ff9b22cd3e5a031d0a0aedbcf2dd273 | 38d86234ef4ba4ed5ac3bf585bcff8615004d2a6 | /ssseg/modules/models/segmentors/fcn/__init__.py | 6e65d2ed36ee6ab8fd41132f6ec0e1c082b98b0d | [
"Apache-2.0"
] | permissive | SegmentationBLWX/sssegmentation | e57e7a071b03214c55248c4b1e64c85796744bf1 | fe3d0dac83055b728fe3c5df964507fc7cc4948c | refs/heads/main | 2023-08-05T02:49:57.370911 | 2023-08-01T13:49:17 | 2023-08-01T13:49:17 | 306,540,019 | 725 | 97 | null | null | null | null | UTF-8 | Python | false | false | 60 | py | __init__.py | '''initialize'''
from .fcn import FCN, DepthwiseSeparableFCN |
74bec013619aeacbb12468ed53dfa62472be4197 | 915df559af9529a529d999194806a0673a12f1fa | /plotting.py | 0dc7114033e259156f9ce1fb54c4e5b8d48e6170 | [
"MIT"
] | permissive | ratschlab/RGAN | 2b61f62aa25d611fae6f4ec6adc0b2e52f016937 | f41731b965348259dcd94b0dcb1374d3e1c4ca7d | refs/heads/master | 2022-08-09T09:42:10.890869 | 2018-02-09T18:09:22 | 2018-02-09T18:09:22 | 93,741,544 | 673 | 204 | MIT | 2018-10-07T20:42:34 | 2017-06-08T11:26:13 | Python | UTF-8 | Python | false | false | 37,712 | py | plotting.py | import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import pdb
from time import time
from matplotlib.colors import hsv_to_rgb
from pandas import read_table, read_hdf
import paths
from data_utils import scale_data
def visualise_at_epoch(vis_sample, data, predict_labels, one_hot, ... |
bcdb57b43e6512e70bde54779b6ca5420a8d753a | 9abd182d02355ddf0b79afd4a35f7127a4a66f7a | /docs/tutorials/action_recognition/feat_custom.py | 48c0ece0b793d3d26b1b25fff8c8bf54ca8ccf5d | [
"Apache-2.0"
] | permissive | dmlc/gluon-cv | e1303086419a5733661d0fcb9095c09d4f2382ad | 567775619f3b97d47e7c360748912a4fd883ff52 | refs/heads/master | 2023-07-19T12:02:36.824294 | 2023-01-19T00:37:33 | 2023-01-19T00:37:33 | 122,896,249 | 6,064 | 1,458 | Apache-2.0 | 2023-01-19T00:37:35 | 2018-02-26T01:33:21 | Python | UTF-8 | Python | false | false | 5,295 | py | feat_custom.py | """8. Extracting video features from pre-trained models
=======================================================
Feature extraction is a very useful tool when you don't have large annotated dataset or don't have the
computing resources to train a model from scratch for your use case. It's also useful to visualize what ... |
8b45c61f515cb452e7b45f7faee7c8b9e344576a | 5ef6c8d47864f471e26b9902d61f8c687e941f05 | /src/genie/libs/parser/iosxe/tests/ShowSdwanPolicyDataPolicyFilter/cli/equal/golden_output_expected.py | 96d270d05833e216606282be1f1bc9ad13239382 | [
"Apache-2.0"
] | permissive | CiscoTestAutomation/genieparser | 169c196558f1c1a0f0d10650876096f993224917 | b531eff760b2e44cd69d7a2716db6f866907c239 | refs/heads/master | 2023-09-03T08:56:18.831340 | 2023-08-29T22:32:02 | 2023-08-29T22:32:02 | 131,621,824 | 247 | 409 | Apache-2.0 | 2023-08-29T22:32:04 | 2018-04-30T16:51:50 | Python | UTF-8 | Python | false | false | 1,533 | py | golden_output_expected.py | expected_output = {
"data_policy_filter": {
'DP_HUB_LOCAL_FROM_TUNNEL': {
'VPN1':{
'default_action_count': {
"packets": 0,
"bytes": 0
},
'FROM_TUNNEL_SAME_VPN_SC': {
... |
5af27b11335438885f10a34330b80ad35a7b1871 | e8f6fa2699fb0ea8436c6a49756b68f912a38e70 | /Chapter14/test_dqn.py | 28486b0c99796296f491711a9d7857e5c81b5dee | [
"MIT"
] | permissive | PacktPublishing/Python-Deep-Learning-Projects | a35d1b85826b951a562168fe9e4c55fcad1d2656 | 1dbe73597f9a1a519ca6e9dd387ee59897ceda6e | refs/heads/master | 2023-04-01T07:07:06.854805 | 2023-01-30T09:39:23 | 2023-01-30T09:39:23 | 129,046,274 | 220 | 158 | MIT | 2023-03-24T22:29:37 | 2018-04-11T06:36:59 | Jupyter Notebook | UTF-8 | Python | false | false | 905 | py | test_dqn.py | """This module contains function to test the performance of the DQN model."""
import numpy as np
def test(env, model, states, episodes=100, render=False):
"""Test the performance of the DQN agent."""
scores_test = []
for episode in range(1, (episodes+1)):
state = env.reset()
state = state.... |
54e3675530aa1fe45a5522372a921fe3894df851 | cde096ba977b63becc1b9066677331ef4594a797 | /csfieldguide/tests/utils/translatable_model_loader/__init__.py | e0a1cb069b41a38f4fa4910e27ff90a0d379c6ea | [
"CC-BY-NC-SA-4.0",
"BSD-3-Clause",
"CC0-1.0",
"ISC",
"Unlicense",
"LicenseRef-scancode-secret-labs-2011",
"WTFPL",
"Apache-2.0",
"LGPL-3.0-only",
"MIT",
"CC-BY-SA-4.0",
"LicenseRef-scancode-public-domain",
"CC-BY-NC-2.5",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown... | permissive | uccser/cs-field-guide | 655524b161fab0ab422679dd80720f660f2cfa98 | ea3281ec6f4d17538f6d3cf6f88d74fa54581b34 | refs/heads/develop | 2023-08-28T14:33:58.789843 | 2023-08-28T08:24:03 | 2023-08-28T08:24:03 | 34,356,619 | 364 | 97 | MIT | 2023-09-14T08:58:55 | 2015-04-21T23:00:26 | JavaScript | UTF-8 | Python | false | false | 61 | py | __init__.py | """Module for tests of the TranslatableModelLoader class."""
|
85c7e8ecc402711ac4aa6b7dd9e83000a8937b18 | 6f60dd616898f0eb9cd372c339d3caee45e8043f | /helpers/command.py | 61b84e7a3ae20319a7bfec36c550580738fec202 | [] | no_license | kobotoolbox/kobo-install | e0c92c57fe86665eb8017ee1c9e203d47d20cc7f | 7ec85be362b95387295ee5a2fad2563ce3aae838 | refs/heads/master | 2023-08-10T03:50:19.094832 | 2023-07-26T14:43:28 | 2023-07-26T14:43:28 | 151,285,266 | 162 | 156 | null | 2023-09-13T20:32:56 | 2018-10-02T16:17:27 | Python | UTF-8 | Python | false | false | 22,486 | py | command.py | # -*- coding: utf-8 -*-
import os
import sys
import time
import subprocess
from helpers.cli import CLI
from helpers.config import Config
from helpers.network import Network
from helpers.template import Template
from helpers.upgrading import Upgrading
from helpers.utils import run_docker_compose
class Command:
@... |
57b88656e7bc729e4e917fa531332de2ac40a41d | b7e6a4c0c7648468ffbfe7c2b447cd9f756f5405 | /lithoxyl/p_squared.py | 4086eab8d2945f748109a6e65c8a5cd6e09f4eb4 | [] | no_license | mahmoud/lithoxyl | f08c67d9d8756f6023704eb3de1d0637375f136e | b4bfa92c54df85b4bd5935fe270e2aa3fb25c412 | refs/heads/master | 2022-09-14T01:08:21.517624 | 2021-10-25T00:34:58 | 2021-10-25T00:34:58 | 10,783,537 | 162 | 15 | null | 2022-08-05T20:41:09 | 2013-06-19T06:54:45 | Python | UTF-8 | Python | false | false | 4,545 | py | p_squared.py | # -*- coding: utf-8 -*-
"""\
An implementation of P-Squared (Piecewise Parabolic) Quantile
Estimation, which provides efficient online estimation for
quantile-related statistics (e.g., median, quartiles).
For description of the algorithm defined in
http://www.cs.wustl.edu/~jain/papers/ftp/psqr.pdf
Implemented by Kur... |
609d2ce2b91d575557eb26f29bbfe2ccf456cc1e | 5177d1b0205366bddc6f8a0533a03cc6e9533692 | /testidpp/HCOO-idpp/idpp.py | beb4930f11b76105983d02a48531256b6ac47f6e | [] | no_license | tamaswells/VASP_script | feea41a8aaf4beb55e7d2b254061d59a2375d225 | 1a13a755d67241ea3f1a7cc89695c0b91043fed9 | refs/heads/master | 2022-02-08T12:58:56.470695 | 2021-12-28T08:37:30 | 2021-12-28T08:37:30 | 130,773,640 | 147 | 103 | null | null | null | null | UTF-8 | Python | false | false | 1,394 | py | idpp.py | #!/public/software/apps/Anaconda3/bin/python
import numpy as np
import os
import sys
import warnings
from pymatgen.core import Structure
from pymatgen_diffusion.neb.pathfinder import IDPPSolver
def warn(*args, **kwargs):
pass
warnings.warn = warn
sys.stdout = open(os.devnull, 'w')
if len(sys.argv) <4:
raise ... |
e2ad36e5873282d054881a3c70eba18fcbd3963b | 3ca67d69abd4e74b7145b340cdda65532f90053b | /BOJ/2110 공유기 설치/rockmiin.py | 6e436a31f9e05ac5efaf3402cc6612150ccedcce | [] | no_license | DKU-STUDY/Algorithm | 19549516984b52a1c5cd73e1ed1e58f774d6d30e | 6f78efdbefd8eedab24e43d74c7dae7f95c2893b | refs/heads/master | 2023-02-18T06:48:39.309641 | 2023-02-09T07:16:14 | 2023-02-09T07:16:14 | 258,455,710 | 175 | 49 | null | 2023-02-09T07:16:16 | 2020-04-24T08:42:27 | Python | UTF-8 | Python | false | false | 410 | py | rockmiin.py |
n, c= map(int, input().split())
home= [int(input()) for _ in range(n)]
home.sort()
start, end= 1, home[-1]- home[0]
result= 0
while start <= end:
mid= (start+ end)// 2
val= home[0]
cnt= 1
for i in range(1, len(home)):
if home[i] >= val+ mid:
cnt+=1
val= home[i]
i... |
8f57ddca13e3bca36440a09acc8573590535afc8 | 2f6011fe675824bbea9456c075707f6b00b2641e | /gdpr_assist/signals.py | 3f1c7e55bd89dfd8d4bf2291ca044313cc5e7b14 | [
"BSD-3-Clause"
] | permissive | wildfish/django-gdpr-assist | aa692b411db5018d8c30ea85843a4489fb85849c | d7b0ffb96c863f929b469116b82cebe7568618a4 | refs/heads/develop | 2023-06-01T02:55:51.145820 | 2022-07-12T13:49:20 | 2022-07-12T13:49:20 | 145,978,441 | 172 | 20 | NOASSERTION | 2023-05-17T13:36:05 | 2018-08-24T10:32:27 | Python | UTF-8 | Python | false | false | 145 | py | signals.py | """
Internal signals
"""
from django.dispatch import Signal
# providing_args = ["instance"]
pre_anonymise = Signal()
post_anonymise = Signal()
|
2fa7a7aa39b95dae86a926635c61875a5255c626 | 1904012be256128f2791627f39dcbf0af5bd7b87 | /conanfile.py | 5d6a02eb71c2ba66abf1a38ed5b0b6674a74658f | [
"BSL-1.0"
] | permissive | boost-ext/di | 42fae06fccbadb5c8a8bd17de7892d8c40750ba2 | f87427b4efa723c28af677317df0afa59491f2f5 | refs/heads/cpp14 | 2023-09-01T06:25:36.864504 | 2023-05-31T06:40:45 | 2023-05-31T07:40:56 | 3,250,728 | 404 | 62 | null | 2023-05-31T07:40:57 | 2012-01-23T21:42:55 | C++ | UTF-8 | Python | false | false | 403 | py | conanfile.py | from conans import ConanFile, CMake
class DI(ConanFile):
name = "DI"
version = "latest"
url = "https://github.com/boost-ext/di"
license = "Boost"
description = "[Boost::ext].DI - C++14 Dependency Injection Library"
settings = "os", "compiler", "arch", "build_type"
exports_sources = "includ... |
6b0fce8db9cf4c10448d77e8a33b606b717f3778 | 6b0fd331c9e75ae4fda1904c3330d5831cd88ab1 | /src/predict.py | 23f229a71791884a8c138e9cff0b5d5831e91989 | [
"MIT"
] | permissive | PavlosMelissinos/enet-keras | 8c0b484c83c608400ba2cb95d4673284045cb037 | 95ce39474b4b95521b64d176dfb7455d57716fde | refs/heads/master | 2022-12-10T02:13:40.178562 | 2020-03-11T15:54:09 | 2020-03-11T15:54:09 | 86,742,995 | 128 | 56 | MIT | 2022-12-07T23:36:33 | 2017-03-30T19:55:12 | Python | UTF-8 | Python | false | false | 6,397 | py | predict.py | # coding=utf-8
from __future__ import absolute_import, print_function
from PIL import Image as PILImage
import numpy as np
import os
import six
import sys
from keras import backend as K
from keras.preprocessing.image import array_to_img
from src.data import datasets, utils
from src.experiments.core import Experiment... |
e098b93c0d6369327a5d29a14657ac91090a4ddd | 2a76ca8c01e7abe6ef64d030ecbb65e88641b278 | /examples/snippet-cubes.py | 4b3fe0661732ddb8e264609db9413e5a702fab9d | [] | permissive | glumpy/glumpy | 18bfc2d76b7a5fc126fbebddf2970d95238fc66b | 75408635bd46e48ff10939e308a71eafdaff35e8 | refs/heads/master | 2023-09-03T11:48:52.087002 | 2023-04-20T15:23:59 | 2023-04-20T15:23:59 | 23,520,171 | 1,228 | 225 | BSD-3-Clause | 2023-07-07T07:25:18 | 2014-08-31T18:30:26 | Python | UTF-8 | Python | false | false | 4,043 | py | snippet-cubes.py | # -----------------------------------------------------------------------------
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
import numpy as np
from glumpy.geometry import pri... |
dbb060c1caebd0e79928d2fd6103b9511c81965c | 02ff7b84aaf436651a4b177affc91757266bdfd6 | /dataset/ctw1500/Evaluation_Protocol/ctw1500_eval.py | 43f1ebd583ac56fd8d2b3342fd0fc57ec8910820 | [
"MIT"
] | permissive | GXYM/DRRG | cb4345cd57554a4617f7a64371e7b42d8518cc8f | 41b197679f9b7f785f2b5c5a84871b3f73aef885 | refs/heads/master | 2023-07-11T23:32:46.639969 | 2023-06-30T16:41:00 | 2023-06-30T16:41:00 | 226,042,729 | 272 | 61 | MIT | 2021-11-06T15:31:21 | 2019-12-05T07:32:19 | C++ | UTF-8 | Python | false | false | 2,443 | py | ctw1500_eval.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import os, shutil, sys
from voc_eval_polygon import voc_eval_polygon
from collections import Counter
import numpy as np
import argparse
parser = argparse.ArgumentParser()
# basic opts
parser.add_argument('exp_name', type=str, help='Model output directory')
args = parser... |
eb6bc4c87bc0b135cc1c9df54bf03b4fcb5b8ecf | 528f1dbb2b6d1d642dedf978ac34f5fa0517093a | /bin/bounce.py | 81309ac413a4bd02950c03e11d6dc82e3d440394 | [
"MIT"
] | permissive | jquast/blessed | 18714ec3f2f1abc0a84008fae00845235ec898ce | a34c6b1869b4dd467c6d1ab6895872bb72db7e0f | refs/heads/master | 2023-08-29T14:26:10.248503 | 2023-08-20T01:25:06 | 2023-08-20T01:25:06 | 17,308,448 | 992 | 101 | MIT | 2023-08-20T01:25:07 | 2014-03-01T05:28:51 | Python | UTF-8 | Python | false | false | 824 | py | bounce.py | #!/usr/bin/env python
"""Classic game of tennis."""
# std imports
from math import floor
# local
from blessed import Terminal
def roundxy(x, y):
return int(floor(x)), int(floor(y))
term = Terminal()
x, y, xs, ys = 2, 2, 0.4, 0.3
with term.cbreak(), term.hidden_cursor():
# clear the screen
print(term.h... |
f9f6c0d755eb4f56551f763537cc35e59ffd38b9 | 4feb5744ab5a26aeeb04573e4944d2bf4d1a6a2a | /peeringdb_server/management/commands/pdb_delete_users.py | f9352debf887e5007974d40dd671ab4fe4820219 | [
"BSD-2-Clause"
] | permissive | peeringdb/peeringdb | cb79f809c4bb8cc5192180366df1f05d8fc0111f | 3f62b2d97c78ccf151fb1a5761637e28463b9541 | refs/heads/master | 2023-09-04T09:26:43.741086 | 2023-08-22T19:20:34 | 2023-08-22T19:20:34 | 60,563,174 | 311 | 121 | BSD-2-Clause | 2023-09-13T02:13:42 | 2016-06-06T21:49:25 | Python | UTF-8 | Python | false | false | 4,958 | py | pdb_delete_users.py | """
Delete childless org objects
"""
from datetime import timedelta
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import transaction
from django.utils import timezone
from peeringdb_server.models import User
class PretendMode(IOError):
pass
class Command(... |
24f1515120d2432d19425036b4d3f7bab42b55af | f43a1f64cb5c483fad6782c866508d8724622f24 | /PyViCare/PyViCareCachedService.py | 340d4f970439093afa007c5ebce4016c9f448a51 | [
"Apache-2.0"
] | permissive | somm15/PyViCare | 88bfca043e739f7b662be0dc0a05e443e7a31825 | 8ba411483a865e074d1146fd1b8b7a8c4f4be122 | refs/heads/master | 2023-08-31T11:34:36.605842 | 2023-06-08T20:17:01 | 2023-06-08T20:17:01 | 164,931,903 | 110 | 89 | Apache-2.0 | 2023-09-11T22:18:11 | 2019-01-09T20:20:53 | Python | UTF-8 | Python | false | false | 2,217 | py | PyViCareCachedService.py | import logging
import threading
from typing import Any, List
from PyViCare.PyViCareAbstractOAuthManager import AbstractViCareOAuthManager
from PyViCare.PyViCareService import (ViCareDeviceAccessor, ViCareService,
readFeature)
from PyViCare.PyViCareUtils import PyViCareInvalidDataE... |
1567d0cdb90f80fa41d0211b102dd7aa4b0cc962 | c504d12541142cd813527aa0d5a20c824bd15b91 | /simple_rl/agents/DelayedQAgentClass.py | 4ed20942e9308b6d0ac6cdcc301fd4afc252e1a9 | [
"Apache-2.0"
] | permissive | david-abel/simple_rl | 322324c2f1ac8d46e4ffc7f3ed249ad1729fed21 | d294572bd186b48beac47d8cdcffdf1a05e7d563 | refs/heads/master | 2023-09-03T19:54:17.481235 | 2022-08-22T09:44:35 | 2022-08-22T09:44:35 | 63,088,888 | 262 | 105 | Apache-2.0 | 2022-08-22T09:44:36 | 2016-07-11T17:41:25 | Python | UTF-8 | Python | false | false | 8,550 | py | DelayedQAgentClass.py | '''
DelayedQAgentClass.py: Class for Delayed Q-Learning from [Strehl et al. 2006].
Author: Yuu Jinnai (ddyuudd@gmail.com)
'''
# Python imports.
import random
import numpy
import time
import copy
from collections import defaultdict
# Other imports.
from simple_rl.agents.AgentClass import Agent
class DelayedQAgent(Ag... |
dd311b750373103b32d5b5d479b670117369ab3f | 6923f79f1eaaba0ab28b25337ba6cb56be97d32d | /A_Primer_on_Scientific_Programming_with_Python/formulas/ball_numbers.py | ce2f815844bde35c945a9ca914e63e6c6b1d70ec | [] | no_license | burakbayramli/books | 9fe7ba0cabf06e113eb125d62fe16d4946f4a4f0 | 5e9a0e03aa7ddf5e5ddf89943ccc68d94b539e95 | refs/heads/master | 2023-08-17T05:31:08.885134 | 2023-08-14T10:05:37 | 2023-08-14T10:05:37 | 72,460,321 | 223 | 174 | null | 2022-10-24T12:15:06 | 2016-10-31T17:24:00 | Jupyter Notebook | UTF-8 | Python | false | false | 30 | py | ball_numbers.py | print 5*0.6 - 0.5*9.81*0.6**2
|
69b16eea9dc8f18744d11397a28853dd7cb04990 | 9a0eb3e292d57b59198c7c66a994372ced9cfa5b | /nodes/1.x/python/Assembly.Members.py | c7833eea069fa3ddecaea0162ac35944ebb7aaea | [
"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 | 575 | py | Assembly.Members.py | import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocum... |
ed3bd88ed6f5d9bac2bac4790e2f67b6972913a9 | a5a99f646e371b45974a6fb6ccc06b0a674818f2 | /Alignment/APEEstimation/python/SectorBuilder_Tid_cff.py | 07c0eeb8adb2534db10f3eb0ba49064c253905b8 | [
"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 | 4,957 | py | SectorBuilder_Tid_cff.py | import FWCore.ParameterSet.Config as cms
from Alignment.APEEstimation.SectorBuilder_cfi import *
##
## Whole Subdetector (means only one for both endcaps)
##
Tid = EmptySector.clone(
name = 'Tid',
subdetId = [4],
)
TID = cms.VPSet(
Tid,
)
##
## Separation of side(+,-)
##
TidMinus = Tid.clone(
... |
1e58393acc85fa4e9fbc05a0b25834d5c30947e3 | 8ca19f1a31070738b376c0370c4bebf6b7efcb43 | /tests/sharepoint/test_feature.py | beca7730d6c1b12c1466a2297ba8140266447847 | [
"MIT"
] | permissive | vgrem/Office365-REST-Python-Client | 2ef153d737c6ed5445ba1e446aeaec39c4ef4ed3 | cbd245d1af8d69e013c469cfc2a9851f51c91417 | refs/heads/master | 2023-09-02T14:20:40.109462 | 2023-08-31T19:14:05 | 2023-08-31T19:14:05 | 51,305,798 | 1,006 | 326 | MIT | 2023-08-28T05:38:02 | 2016-02-08T15:24:51 | Python | UTF-8 | Python | false | false | 354 | py | test_feature.py | from office365.sharepoint.features.feature import Feature
from tests.sharepoint.sharepoint_case import SPTestCase
class TestFeature(SPTestCase):
target_feature = None # type: Feature
def test_1_get_site_features(self):
site_features = self.client.site.features.get().execute_query()
self.ass... |
7925e0898f04a7ceb23c6006f970c1355e2cebde | 80f94bea418d7956df1ba19d4d6a1d7715a94ade | /lib/galaxy/selenium/context.py | 6ba867e885710d0b654b837d1ef40d21940fef84 | [
"CC-BY-2.5",
"MIT",
"CC-BY-3.0",
"AFL-3.0"
] | permissive | galaxyproject/galaxy | 5748409eb6693b1611f289d164f85e20c3237495 | b9ae7a16ba0465995e880ae9701b7e87226b9bab | refs/heads/dev | 2023-08-28T22:35:51.248138 | 2023-08-26T08:02:33 | 2023-08-26T08:02:33 | 31,211,061 | 1,277 | 1,137 | NOASSERTION | 2023-09-14T19:39:01 | 2015-02-23T14:18:06 | Python | UTF-8 | Python | false | false | 2,661 | py | context.py | import os
from abc import abstractmethod
from typing import Optional
from urllib.parse import urljoin
import yaml
from .driver_factory import ConfiguredDriver
from .navigates_galaxy import NavigatesGalaxy
class GalaxySeleniumContext(NavigatesGalaxy):
url: str
target_url_from_selenium: str
configured_dri... |
c5fb19954f95c292267cad83f8f00eced012ba41 | 10ddfb2d43a8ec5d47ce35dc0b8acf4fd58dea94 | /Python/rotate-function.py | 2a53ada048aa222f9033f3ceb2d25f0fcc0d4f50 | [
"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 | 410 | py | rotate-function.py | # Time: O(n)
# Space: O(1)
class Solution(object):
def maxRotateFunction(self, A):
"""
:type A: List[int]
:rtype: int
"""
s = sum(A)
fi = 0
for i in xrange(len(A)):
fi += i * A[i]
result = fi
for i in xrange(1, len(A)+1):
... |
f27d6e67d5150d61531c9879b6b0cd9dceb96e33 | dbf613469aa8c69ba013e016de82c942508b2485 | /ppb/features/default_sprites.py | 48a60fd8f5b09af2c272e855cb765854fc5d120f | [
"Artistic-2.0"
] | permissive | ppb/pursuedpybear | dcb96ae35d352a9165898872048c72c6224074b9 | d067c2f7d440389fc542638d79e3244281c6e737 | refs/heads/canon | 2022-11-22T11:57:27.406370 | 2022-02-08T02:12:45 | 2022-02-08T02:12:45 | 54,496,479 | 247 | 119 | Artistic-2.0 | 2022-11-12T22:36:20 | 2016-03-22T17:46:34 | Python | UTF-8 | Python | false | false | 2,537 | py | default_sprites.py | """
Theme: sprites with common default behaviours (motion)
Types of motion include: relative to the motion of other sprites, moving
towards another object.
"""
import ppb
import math
class TargetSprite(ppb.Sprite):
"""Sprite that moves to a given target.
:param target: Vector that the sprite moves towar... |
0a35cd5a1cd8d72fb52f0afac6f655337c396efd | c259a48454bd6450d3afc5bc66fc5761b25e0a5b | /.erda/migrations/cmdb/20211102-cluster-scheduler-cover-tag.py | edc81444f37918d6daa6a6f233472fdc0eb877b2 | [
"Apache-2.0"
] | permissive | erda-project/erda | c84db0ffaa7e6099475c1199e6338be7d0a5d245 | 852a5e3e3f6829afc343958ac0da60f3623f9c64 | refs/heads/master | 2023-09-01T01:45:08.582910 | 2023-08-31T15:32:21 | 2023-08-31T15:32:21 | 344,676,663 | 2,789 | 391 | Apache-2.0 | 2023-09-14T06:24:33 | 2021-03-05T02:58:27 | Go | UTF-8 | Python | false | false | 1,879 | py | 20211102-cluster-scheduler-cover-tag.py | """
Generated by Erda Migrator.
Please implement the function entry, and add it to the list entries.
"""
import json
import django.db.models
from django.db.models import Q
class CoClusters(django.db.models.Model):
"""
generated by erda-cli
"""
id = django.db.models.BigIntegerField()
org_id = dja... |
e6060b0fba86595758c7cadf2e690ea19db894ac | 1577e1cf4e89584a125cffb855ca50a9654c6d55 | /pyobjc/pyobjc/pyobjc-core-2.5.1/PyObjCTest/test_hidden_selector.py | 643f176c0fd04cd3b9df96ff860c95cacda6d40a | [
"MIT"
] | permissive | apple-open-source/macos | a4188b5c2ef113d90281d03cd1b14e5ee52ebffb | 2d2b15f13487673de33297e49f00ef94af743a9a | refs/heads/master | 2023-08-01T11:03:26.870408 | 2023-03-27T00:00:00 | 2023-03-27T00:00:00 | 180,595,052 | 124 | 24 | null | 2022-12-27T14:54:09 | 2019-04-10T14:06:23 | null | UTF-8 | Python | false | false | 5,549 | py | test_hidden_selector.py | from PyObjCTools.TestSupport import *
import objc
class hidden_method (object):
def __pyobjc_class_setup__(self, name, class_dict, instance_methods, class_methods):
@objc.selector
def method(self):
return 42
method.isHidden = True
def clsmethod(self):
retur... |
8155739a449852c7d12c44fe8b15eaca06584338 | df1254b56f35b24644e00493c50d4b6eb3c15b7b | /colour/appearance/kim2009.py | 973060fe2acb2588e6ee665b56aed8bc7f1ad743 | [
"BSD-3-Clause"
] | permissive | colour-science/colour | 908400b227cf81668675e41099256ce50b23ae4b | 1fdf3b3042922e8d4f86b989b00a06e7e5d81102 | refs/heads/develop | 2023-09-01T23:17:07.186869 | 2023-08-26T09:40:45 | 2023-08-26T09:40:45 | 17,114,363 | 1,756 | 301 | BSD-3-Clause | 2023-09-14T10:24:37 | 2014-02-23T18:55:40 | Python | UTF-8 | Python | false | false | 18,783 | py | kim2009.py | """
Kim, Weyrich and Kautz (2009) Colour Appearance Model
=====================================================
Defines the *Kim, Weyrich and Kautz (2009)* colour appearance model objects:
- :class:`colour.appearance.InductionFactors_Kim2009`
- :attr:`colour.VIEWING_CONDITIONS_KIM2009`
- :class:`colour.appearan... |
b0c9659fed2fa16bb8d995b2fc05f94976f9ec9c | e22fd36933c9114a9df1694e7a6274bf059de2a6 | /selfdrive/car/gm/values.py | d12c21dc23d4b941c415a42fbe68201fd779d51b | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | commaai/openpilot | 66dfb7f31290bc8f58c9ead95d56697a52b45afb | a0b49d54222c52ff0112c402bc0e0d9262e77a66 | refs/heads/master | 2023-09-05T21:34:14.076796 | 2023-09-05T21:15:18 | 2023-09-05T21:15:18 | 74,627,617 | 46,071 | 9,878 | MIT | 2023-09-14T21:51:23 | 2016-11-24T01:33:30 | Python | UTF-8 | Python | false | false | 22,353 | py | values.py | # ruff: noqa: E501
from collections import defaultdict
from dataclasses import dataclass
from enum import Enum
from typing import Dict, List, Union
from cereal import car
from openpilot.selfdrive.car import dbc_dict
from openpilot.selfdrive.car.docs_definitions import CarFootnote, CarHarness, CarInfo, CarParts, Column... |
a05fd6a97e3a82736dc5feca0ff38ce91a5b5a71 | 6fdb4eaf5b0e6dbd7db4bf947547541e9aebf110 | /api/tests/opentrons/protocol_engine/commands/test_hash_command_params.py | 098ce53c3217e32e84a9f49a89a4fba36281e9e4 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | Opentrons/opentrons | 874321e01149184960eeaeaa31b1d21719a1ceda | 026b523c8c9e5d45910c490efb89194d72595be9 | refs/heads/edge | 2023-09-02T02:51:49.579906 | 2023-08-31T16:02:45 | 2023-08-31T16:02:45 | 38,644,841 | 326 | 174 | Apache-2.0 | 2023-09-14T21:47:20 | 2015-07-06T20:41:01 | Python | UTF-8 | Python | false | false | 2,095 | py | test_hash_command_params.py | """Tests for hash_command_params."""
from opentrons.protocol_engine import CommandIntent
from opentrons.protocol_engine import commands
from opentrons.protocol_engine.commands.hash_command_params import hash_command_params
def test_equivalent_commands() -> None:
"""Equivalent commands should have the same hash."... |
59d41794ced7e9b28f27f5be879f6e606d895c0d | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /alembic/versions/2020-04-27_40c86deefd01_drop_ignoreuntiltime_constraing_on_raw_.py | a440767406bfc75f66b2480fe6a9c65894f78f3f | [
"BSD-3-Clause"
] | permissive | fake-name/ReadableWebProxy | 24603660b204a9e7965cfdd4a942ff62d7711e27 | ca2e086818433abc08c014dd06bfd22d4985ea2a | refs/heads/master | 2023-09-04T03:54:50.043051 | 2023-08-26T16:08:46 | 2023-08-26T16:08:46 | 39,611,770 | 207 | 20 | BSD-3-Clause | 2023-09-11T15:48:15 | 2015-07-24T04:30:43 | Python | UTF-8 | Python | false | false | 1,428 | py | 2020-04-27_40c86deefd01_drop_ignoreuntiltime_constraing_on_raw_.py | """Drop ignoreuntiltime constraing on raw archive table
Revision ID: 40c86deefd01
Revises: d5dba845418b
Create Date: 2020-04-27 12:03:32.802407
"""
# revision identifiers, used by Alembic.
revision = '40c86deefd01'
down_revision = 'd5dba845418b'
branch_labels = None
depends_on = None
from alembic import op
import s... |
6a4d1ab99bcb3cd203dba522fca93dc4c33f879f | 974d04d2ea27b1bba1c01015a98112d2afb78fe5 | /python/paddle/jit/layer.py | e3204ab65df022ce1527366e8d22b40244746153 | [
"Apache-2.0"
] | permissive | PaddlePaddle/Paddle | b3d2583119082c8e4b74331dacc4d39ed4d7cff0 | 22a11a60e0e3d10a3cf610077a3d9942a6f964cb | refs/heads/develop | 2023-08-17T21:27:30.568889 | 2023-08-17T12:38:22 | 2023-08-17T12:38:22 | 65,711,522 | 20,414 | 5,891 | Apache-2.0 | 2023-09-14T19:20:51 | 2016-08-15T06:59:08 | C++ | UTF-8 | Python | false | false | 1,581 | py | layer.py | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 2021 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://ww... |
f01fc153fac1315524427bf8420c878056998b1f | da99c3d2dfbce3902ec189700daf87278f90d5cd | /utils/factory.py | cb98bfd9ea6c1c0f7b32b81db3a61acca75950ec | [
"MIT"
] | permissive | cfzd/Ultra-Fast-Lane-Detection | 52c297c1975d0e2e5cf7844bc2ce4f47b8d993e3 | 353df107756b8c03c22c27201e33fc63d84ecfe6 | refs/heads/master | 2023-08-11T23:20:22.619180 | 2022-12-14T06:50:09 | 2022-12-14T06:50:09 | 266,319,758 | 1,630 | 488 | MIT | 2021-12-03T04:09:33 | 2020-05-23T11:11:34 | Python | UTF-8 | Python | false | false | 5,179 | py | factory.py | from utils.loss import SoftmaxFocalLoss, ParsingRelationLoss, ParsingRelationDis
from utils.metrics import MultiLabelAcc, AccTopk, Metric_mIoU
from utils.dist_utils import DistSummaryWriter
import torch
def get_optimizer(net,cfg):
training_params = filter(lambda p: p.requires_grad, net.parameters())
if cfg.o... |
37a699106e0ac4dcb4c0eea06173c0f1de15582d | 56d8f5e69dbd693bce8d5971894b1b5d064a5126 | /modules/splunk_sdk.py | 68ffea480b5cdc927d959b5b4eaf49a0dd68f59d | [
"Apache-2.0"
] | permissive | splunk/attack_range | 35ae93aaab81fc6cc60657844aa47899dcbd61bc | 51c668149c09b3ea38cff6ec94b67eca4545f615 | refs/heads/develop | 2023-09-01T05:16:10.712727 | 2023-08-14T16:00:08 | 2023-08-14T16:00:08 | 184,844,805 | 1,767 | 331 | Apache-2.0 | 2023-08-14T13:55:21 | 2019-05-04T02:46:46 | Jinja | UTF-8 | Python | false | false | 1,230 | py | splunk_sdk.py |
import sys
from time import sleep
import splunklib.results as results
import splunklib.client as client
import splunklib.results as results
import requests
def export_search(host, s, password, export_mode="raw", out=sys.stdout, username="admin", splunk_rest_port=8089):
"""
Exports events from a search using... |
fe2d1865493f12d3ca489bee8f590f7a6946bb4e | 5e255ad1360c90478393744586663741a9569c21 | /linebot/v3/shop/__init__.py | 82a7c767b32fd57d95eff6ed87e57ac36e67b1ba | [
"Apache-2.0"
] | permissive | line/line-bot-sdk-python | d76268e8b542060d6eccbacc5dbfab16960ecc35 | cffd35948238ae24982173e30b1ea1e595bbefd9 | refs/heads/master | 2023-08-31T22:12:31.698183 | 2023-08-28T01:10:09 | 2023-08-28T01:10:09 | 70,553,423 | 1,898 | 1,181 | Apache-2.0 | 2023-09-11T05:14:07 | 2016-10-11T03:42:26 | Python | UTF-8 | Python | false | false | 1,180 | py | __init__.py | # coding: utf-8
# flake8: noqa
"""
Mission Stickers API
This document describes LINE Mission Stickers API. # noqa: E501
The version of the OpenAPI document: 0.0.1
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
"""
__version__ = "3.3.0"
# impo... |
4620992176412ae2b695cef32679b0fc3c45679e | 88ae8695987ada722184307301e221e1ba3cc2fa | /third_party/depot_tools/clang_format_merge_driver.py | 764d398d6bc83e3648b89fc7db6629f91cabac26 | [
"BSD-3-Clause",
"Apache-2.0",
"LGPL-2.0-or-later",
"MIT",
"GPL-1.0-or-later"
] | permissive | iridium-browser/iridium-browser | 71d9c5ff76e014e6900b825f67389ab0ccd01329 | 5ee297f53dc7f8e70183031cff62f37b0f19d25f | refs/heads/master | 2023-08-03T16:44:16.844552 | 2023-07-20T15:17:00 | 2023-07-23T16:09:30 | 220,016,632 | 341 | 40 | BSD-3-Clause | 2021-08-13T13:54:45 | 2019-11-06T14:32:31 | null | UTF-8 | Python | false | false | 2,551 | py | clang_format_merge_driver.py | #!/usr/bin/env python3
# Copyright 2016 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.
"""clang-format 3-way merge driver.
This is a custom merge driver for git that helps automatically resolves
conflicts caused by clang-... |
6e84e27ffa349c56954551b446006836c0a0d68b | 55c1238c19835a09677328d90b3dc75ba98031cf | /tests/test_func_sync.py | d60533ed069ae9df0f242a5d3d11669928741efc | [
"BSD-2-Clause-Views"
] | permissive | youknowone/ring | f13b116cfc2679810eee2b080117c32375835798 | b5c34df262eb6c33115dc2b1e1bc83faa6bb42d0 | refs/heads/main | 2023-06-26T17:21:07.065475 | 2023-03-30T04:58:23 | 2023-03-30T04:58:23 | 65,191,260 | 498 | 56 | NOASSERTION | 2023-03-30T04:56:09 | 2016-08-08T09:28:27 | Python | UTF-8 | Python | false | false | 11,132 | py | test_func_sync.py | import sys
import time
import shelve
import ring
import pymemcache.client
import memcache
import redis
import diskcache
from ring.func.lru_cache import LruCache
import pytest
from pytest_lazyfixture import lazy_fixture
try:
import contextvars
except ImportError:
contextvars = None
pymemcache_client = pymemc... |
bbb04ac9c71462a3820444aa1dc18c89325d9a96 | eb9f655206c43c12b497c667ba56a0d358b6bc3a | /python/testData/intentions/dictLiteralFormToConstructor2.py | 489db637998fb4507dd9e9d0a4d8d94b16ecefe6 | [
"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 | 29 | py | dictLiteralFormToConstructor2.py | a = {'a b':<caret> 3, 'b': 5} |
b815fd79cb028280ac89f4915380d7a24082df79 | 8d585fa3b2419d9b993be2f2652e448cfeedc8b2 | /config.py | 33605e2c87dca57e76d5914af90a9567759a740e | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | DataDog/dd-agent | bd4ef0edb234293b51d30894a529ce94b37060f8 | 16fa4ec9ae11ca0adfffbd260c5b4899dc73509f | refs/heads/master | 2023-08-16T09:52:21.816487 | 2023-07-11T15:37:34 | 2023-07-11T15:37:34 | 1,210,071 | 1,227 | 991 | NOASSERTION | 2023-06-28T12:20:19 | 2010-12-31T03:02:47 | Python | UTF-8 | Python | false | false | 59,951 | py | config.py | # (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
# stdlib
import ConfigParser
from cStringIO import StringIO
import glob
import imp
import inspect
import itertools
import logging
import logging.config
import logging.handlers
from optparse import OptionParser, Va... |
2b3b0f3e5e8116c462f852cfa6f444b0d1262459 | 00e3667f9858ae1b556df726770e28e463ebccc4 | /tests/test_api_key_tools.py | 43223f9ce46df5a98520c536c03884144c61e241 | [
"MIT"
] | permissive | hydrosquall/tiingo-python | 0b8e6fe13357e67831a8b425de1930949076989c | 4585c81ce586fd8eb424d691701169f4ecb67ef4 | refs/heads/master | 2023-08-31T22:35:47.608479 | 2023-04-26T01:17:03 | 2023-04-26T01:17:03 | 101,357,472 | 234 | 61 | MIT | 2023-09-14T06:49:56 | 2017-08-25T02:30:50 | Python | UTF-8 | Python | false | false | 2,226 | py | test_api_key_tools.py | #
# Test setup based on https://gist.github.com/odyniec/d4ea0959d4e0ba17a980
#
import shutil, tempfile
from os import path
from unittest import TestCase
from tools.api_key_tool import remove_api_key, has_api_key
class TestAPIKeyTools(TestCase):
def setUp(self):
self.test_dir = tempfile.mkdtemp()
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.