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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
44330ba8ca76f3de0d7720c4522e8aed6d50972d | c058f51b99f91faebf27183b2b579e9f96e0d8f5 | /botorch/sampling/get_sampler.py | 11bf8ceaf9b6aa309f585df8e26819bc0a577104 | [
"MIT"
] | permissive | pytorch/botorch | 255d62f698cc615c750e9343c278a63c7e96a586 | 4cc5ed59b2e8a9c780f786830c548e05cc74d53c | refs/heads/main | 2023-08-22T15:23:51.071048 | 2023-08-22T05:30:38 | 2023-08-22T05:30:38 | 142,940,093 | 2,891 | 373 | MIT | 2023-09-13T00:16:13 | 2018-07-30T23:59:57 | Jupyter Notebook | UTF-8 | Python | false | false | 4,964 | py | get_sampler.py | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, Type, Union
import torch
from botorch.logging import logger
from botorch.posteriors.determi... |
beaf434ca8424cfe2e2da829d5d69f5ef41aea52 | 959b7d21c8baa677f2725fbef14ed53e702f3dcb | /pygount/xmldialect.py | daaa8597dd9f310bf8a3a9b558697f284f68d377 | [
"BSD-3-Clause"
] | permissive | roskakori/pygount | 8e46d3b13465084349edbc07a1f6300f9f448951 | aee552c1587f3a5843fa303722e7cc5cd6d7ac58 | refs/heads/master | 2023-08-24T02:30:13.878793 | 2023-08-23T19:01:46 | 2023-08-23T19:01:46 | 9,413,691 | 129 | 22 | BSD-3-Clause | 2023-09-06T19:51:00 | 2013-04-13T13:02:29 | Python | UTF-8 | Python | false | false | 4,296 | py | xmldialect.py | """
Function to obtain the language dialect used by XML source code.
"""
# Copyright (c) 2016-2023, Thomas Aglassinger.
# All rights reserved. Distributed under the BSD License.
import logging
import re
import xml.sax
# TODO #10: Replace regex for DTD by working DTD handler.
#: Regular expression to obtain DTD.
_DTD_R... |
0449a2ad00b2bdecff059345f71bcb31f15971c8 | 849364a9b65ac32feab67dd3bb86119a0102f048 | /tests/test24/t1.py | d9fae6ddfce1ba03c60c7254c8ac37c4b7aea1f8 | [] | no_license | zokis/Python--Faster-Way | 585b46e50cc70c6b4f3b026d3b82ba2705f6fc6b | 8f11e9246198c6bc3c0c58668674d75188c966ae | refs/heads/gh-pages | 2022-07-28T18:50:54.342599 | 2015-07-02T19:43:18 | 2015-07-02T19:43:18 | 12,438,963 | 200 | 31 | null | 2018-03-25T16:12:12 | 2013-08-28T16:35:19 | HTML | UTF-8 | Python | false | false | 96 | py | t1.py | def a():
a = [[1, 2, 3], [2, 3, 4], [4, 5, 6]]
b = {x[1]: x[2] for x in a}
return b
|
62150c010d82eba1c6bc8a54cb3a3a9bd117ef69 | 6436d1e6c23f9f43a8025889dc4414a3ad66acf2 | /Assets/Python/Contrib/CvStrategyOverlay.py | b20a20e72db03d18c674aae1701945a468f6ff96 | [
"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 | 16,903 | py | CvStrategyOverlay.py | #-------------------------------------------------------------------------------
# Name: CvStrategyOverlay.py
# Purpose: Draws the strategy overlay itself.
# CvOverlayScreen.py does the editing.
# Contains:
# -Dot Mapper
# -Categorized signs
#
# Aut... |
db8ca0ac6272924438e7f43731c29581f9556570 | 5aef4e8880f9f12dbdde246140a836d3f2e5bb2a | /dj_db_conn_pool/backends/postgresql/base.py | 911d0956444ded6bfa5a5613370569e8000c6148 | [
"MIT"
] | permissive | altairbow/django-db-connection-pool | dd76159b6713c57eef42b57c7fb49e9c5813b1ae | 08d4a5d7288979ef743674e52b9d1cbd796e3d86 | refs/heads/master | 2023-08-31T11:24:19.735528 | 2023-08-20T10:15:02 | 2023-08-20T10:15:02 | 164,835,376 | 137 | 26 | MIT | 2023-06-02T21:01:27 | 2019-01-09T09:50:42 | Python | UTF-8 | Python | false | false | 439 | py | base.py | # coding: utf-8
from django.db.backends.postgresql import base
from dj_db_conn_pool.backends.postgresql.mixins import PGDatabaseWrapperMixin
class DatabaseWrapper(PGDatabaseWrapperMixin, base.DatabaseWrapper):
def get_new_connection(self, conn_params):
connection = super().get_new_connection(conn_params... |
1d9e00a31506da14c054193bff1193f8d3b120c7 | 25daa9604b83ddc199764309c39da106a5313c22 | /test/test_acceptance_arg_parsing.py | 67135ec94a3532e6ca63abbdcd2079780ab4023b | [
"MIT"
] | permissive | ThoughtWorksInc/CD4ML-Scenarios | 83d3f162a2ddbb7e02662d03f769feb8978b4de9 | a9200df2f926f7e398dd820b99a11515c9a3eacb | refs/heads/master | 2023-05-12T07:11:39.677610 | 2022-05-31T14:14:57 | 2022-05-31T14:14:57 | 246,649,538 | 127 | 327 | MIT | 2023-05-01T23:38:18 | 2020-03-11T18:26:59 | Python | UTF-8 | Python | false | false | 1,089 | py | test_acceptance_arg_parsing.py | import datetime
import os
from pathlib import Path
from cd4ml.filenames import get_model_files
from scripts import acceptance as acceptance_script
def test_acceptance_with_model_id():
model_id = acceptance_script.parse_arguments(['my_test_model_id'])
assert model_id == 'my_test_model_id'
earlier_time = int... |
f56c9e93fd4b577091707466cadab16c9da7bb70 | 33f805792e79a9ef1d577699b983031521d5b6c9 | /tapiriik/services/rollback.py | 251f5f2caf175763bfcb2c8fe19c68893653ac1f | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | cpfair/tapiriik | 0dce9599400579d33acbbdaba16806256270d0a3 | c67e9848e67f515e116bb19cd4dd479e8414de4d | refs/heads/master | 2023-08-28T10:17:11.070324 | 2023-07-25T00:59:33 | 2023-07-25T00:59:33 | 7,812,229 | 1,519 | 343 | Apache-2.0 | 2022-10-24T16:52:34 | 2013-01-25T02:43:42 | Python | UTF-8 | Python | false | false | 4,062 | py | rollback.py | from tapiriik.database import db
from tapiriik.auth import User
from tapiriik.services import Service
import datetime
import logging
import json
from bson.objectid import ObjectId
logger = logging.getLogger(__name__)
class RollbackTask:
def __new__(cls, dbRec):
if not dbRec:
return None
... |
758b5c905f6ab4347635dbb6141c8b1578697296 | d2621d10d6d0aa4fcecbb11c281e3dd680b985fc | /test/pytest/test_handler.py | a14af050a4f102fc66f68636b895ef435bf16551 | [
"Apache-2.0"
] | permissive | pytorch/serve | 7b562a4d6372e77ce28fc71a5b8d5455c6f02290 | 242895c6b4596c4119ec09d6139e627c5dd696b6 | refs/heads/master | 2023-08-31T05:24:10.950144 | 2023-08-31T02:49:22 | 2023-08-31T02:49:22 | 212,488,700 | 3,689 | 895 | Apache-2.0 | 2023-09-13T22:34:31 | 2019-10-03T03:17:43 | Java | UTF-8 | Python | false | false | 13,802 | py | test_handler.py | import ast
import json
import logging
import os
import numpy as np
import pytest
import requests
import test_utils
import torch
REPO_ROOT = os.path.normpath(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../")
)
snapshot_file_kf = os.path.join(REPO_ROOT, "test", "config_kf.properties")
snapshot_fil... |
c5dbfbcbbd7961e78535e3c629d5d0a18afb8738 | d25cbd4234170c7f5443d7764943d316846c8ac4 | /pygmt/src/solar.py | 130bb8d936aa30c97cbf70fd952102358f03cfe6 | [
"BSD-3-Clause"
] | permissive | GenericMappingTools/pygmt | 6ca3af844cee51c7ec4cafaaba3918c35f871791 | e4ee800e8045aa5f94ddaf7ad821421d007ab279 | refs/heads/main | 2023-08-19T04:39:41.666114 | 2023-08-16T14:25:23 | 2023-08-16T14:25:23 | 85,352,251 | 490 | 191 | BSD-3-Clause | 2023-09-14T13:34:26 | 2017-03-17T20:31:51 | Python | UTF-8 | Python | false | false | 3,847 | py | solar.py | """
solar - Plot day-night terminators and twilight.
"""
import pandas as pd
from pygmt.clib import Session
from pygmt.exceptions import GMTInvalidInput
from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias
__doctest_skip__ = ["solar"]
@fmt_docstring
@use_alias(
B="frame",
G... |
b8bdc2ffded36e168201d35e3ec1fd91c2b57e36 | 0af79436ea048460c5ec5925ff29ed8a0a3914d2 | /examples/train_springs.py | bd3c15a0e538b39a07d905854011253e8ebe25c8 | [] | no_license | mfinzi/LieConv | c85528155c0117e8c6e0f94c17d284c6bed9439b | 93affb1806100a848fdf7065d52bc69aff91405e | refs/heads/master | 2023-05-14T06:31:31.443143 | 2023-04-27T02:36:24 | 2023-04-27T02:36:24 | 242,906,925 | 260 | 33 | null | 2023-03-07T22:16:47 | 2020-02-25T04:10:22 | Python | UTF-8 | Python | false | false | 2,380 | py | train_springs.py | import copy, warnings
from oil.tuning.args import argupdated_config
from oil.datasetup.datasets import split_dataset
from oil.tuning.study import train_trial
import torch
from torch.utils.data import DataLoader
from torch.optim import Adam
from oil.utils.utils import LoaderTo, islice, FixedNumpySeed, cosLr
from lie_con... |
8582acce576a3baef291d4c85432eab53a7bf38e | cad91ae76d2746a6c28ddda0f33a58f9d461378f | /TensorFlow2/Segmentation/Contrib/UNet3P/data_generators/tf_data_generator.py | 8f35a1b84898ed7a7689de5d8f3510d42e7a41ad | [
"Apache-2.0"
] | permissive | NVIDIA/DeepLearningExamples | fe677521e7e2a16e3cb0b77e358f9aab72f8c11a | a5388a45f71a949639b35cc5b990bd130d2d8164 | refs/heads/master | 2023-08-31T20:57:08.798455 | 2023-08-23T10:09:12 | 2023-08-23T10:09:12 | 131,881,622 | 11,838 | 3,124 | null | 2023-08-28T16:57:33 | 2018-05-02T17:04:05 | Jupyter Notebook | UTF-8 | Python | false | false | 5,786 | py | tf_data_generator.py | """
Tensorflow data generator class.
"""
import tensorflow as tf
import numpy as np
from omegaconf import DictConfig
from utils.general_utils import get_data_paths
from utils.images_utils import prepare_image, prepare_mask
class DataGenerator(tf.keras.utils.Sequence):
"""
Generate batches of data for model b... |
5b383d3f8fd40b1e362149e32a8e19f89301a5b3 | 157d84f8aafc76ba9ea0dbbf08ede744966b4250 | /tests/integration/cattletest/core/test_user_preferences.py | 4b79b521f7f1923aafcbe7787fa9015b0d87a7ca | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | rancher/cattle | 81d165a0339a41950561fe534c7529ec74203c56 | 82d154a53f4089fecfb9f320caad826bb4f6055f | refs/heads/v1.6 | 2023-08-27T20:19:31.989806 | 2020-05-01T18:15:55 | 2020-05-01T20:11:28 | 18,023,059 | 487 | 233 | Apache-2.0 | 2022-01-03T18:07:33 | 2014-03-23T00:19:52 | Java | UTF-8 | Python | false | false | 3,604 | py | test_user_preferences.py | from common_fixtures import * # NOQA
from gdapi import ApiError
@pytest.fixture(scope='module')
def user_client(context):
return context.user_client
def _user_preference(client, name=None):
if name is None:
name = random_str()
preference = client.wait_success(client.create_user_preference(
... |
0e1b7b26289fc6202093f7ca343050293a2e06e0 | f16cf8b9123fcc03fa985285e97a46bbc2904eaa | /detectron/modeling/rfcn_heads.py | 5b54addfcba549cae3b0e744e81237753753d7cb | [
"Apache-2.0",
"MIT"
] | permissive | facebookresearch/Detectron | 0b9fd0ece5819d62c8ad6f5caa0f7322749eca26 | 2246d34b47b59d80ad4ef3df9c2964e6300a0740 | refs/heads/main | 2023-09-04T00:21:36.128859 | 2023-08-25T22:10:24 | 2023-08-25T22:10:24 | 105,919,803 | 28,477 | 6,452 | Apache-2.0 | 2023-05-25T06:01:04 | 2017-10-05T17:32:00 | Python | UTF-8 | Python | false | false | 3,265 | py | rfcn_heads.py | # Copyright (c) 2017-present, Facebook, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... |
8ebb0fcbcf19303cf900659e2d91c263798cb230 | afbae26b958b5ef20548402a65002dcc8e55b66a | /release/stubs.min/Autodesk/Revit/DB/__init___parts/IntersectionResultArray.py | 9b1ad2e41c320de91858ad8aa5750d97fcfeb4c5 | [
"MIT"
] | permissive | gtalarico/ironpython-stubs | d875cb8932c7644f807dc6fde9dd513d159e4f5c | c7f6a6cb197e3949e40a4880a0b2a44e72d0a940 | refs/heads/master | 2023-07-12T01:43:47.295560 | 2022-05-23T18:12:06 | 2022-05-23T18:12:06 | 95,340,553 | 235 | 88 | NOASSERTION | 2023-07-05T06:36:28 | 2017-06-25T05:30:46 | Python | UTF-8 | Python | false | false | 2,696 | py | IntersectionResultArray.py | class IntersectionResultArray(APIObject,IDisposable,IEnumerable):
"""
An array that can contain any type of object.
IntersectionResultArray()
"""
def Append(self,item):
""" Append(self: IntersectionResultArray,item: IntersectionResult) """
pass
def Clear(self):
"""
Clear(self: Intersectio... |
3c2793c302080d6ef6305de497af835df42e5221 | 04963e5a7a49e4d938a652e96953fadcd21a2ef7 | /tmrl/custom/custom_memories.py | 01c3880c031219d56ecd0f745a74436d83efcd49 | [
"MIT"
] | permissive | trackmania-rl/tmrl | efe961224456c1553c6340b2daf7eddb8d4d6525 | e3254888ae7e865c56236d72fb03311a41c10310 | refs/heads/master | 2023-07-27T08:27:27.541628 | 2023-07-23T20:34:10 | 2023-07-23T20:34:10 | 277,973,609 | 287 | 31 | MIT | 2023-07-18T08:56:59 | 2020-07-08T02:49:55 | Python | UTF-8 | Python | false | false | 19,911 | py | custom_memories.py | # third-party imports
import numpy as np
import cv2
# local imports
from tmrl.memory import TorchMemory
# LOCAL BUFFER COMPRESSION ==============================
def get_local_buffer_sample_lidar(prev_act, obs, rew, terminated, truncated, info):
"""
Input:
prev_act: action computed from a previous o... |
c900b2c5af6ea06db7502bafe0d5e4a47742b5a5 | bbd69601912a3361d788efd03a47f9d4e3bac09e | /docs/sphinx/rest_substitutions/snippets/python/converted/wx.xml.XmlDocument.2.py | 0b7377588bdec7f487281ddd6f9f6e13346a177c | [] | no_license | wxWidgets/Phoenix | 56929484460a0399a8f1d9582bc77c20aa14748d | a1184286703cf24c4b88e5bc14cf2979c1b1ea00 | refs/heads/master | 2023-09-01T07:10:17.437093 | 2023-08-31T05:38:01 | 2023-08-31T05:38:01 | 5,078,061 | 2,268 | 677 | null | 2023-09-09T17:06:59 | 2012-07-17T06:22:25 | Python | UTF-8 | Python | false | false | 247 | py | wx.xml.XmlDocument.2.py |
doc = wx.xml.XmlDocument()
doc.Load("myfile.xml", "UTF-8", wx.xml.XMLDOC_KEEP_WHITESPACE_NODES)
# myfile2.xml will be identical to myfile.xml saving it self way:
doc.Save("myfile2.xml", wx.xml.XML_NO_INDENTATION)
|
08c6468b5f7ceaef9c0a11375bb7ddf6e8f00d94 | 578db86c51d44ebddd0dc7b1738985b3dc69eb74 | /corehq/motech/fhir/admin.py | f9be833356fc2cebbaa82b8a7fa528cb27e61c9d | [
"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 | 3,276 | py | admin.py | import json
from django.contrib import admin
from corehq.motech.fhir.models import (
FHIRImportConfig,
FHIRImportResourceProperty,
FHIRImportResourceType,
FHIRResourceProperty,
FHIRResourceType,
ResourceTypeRelationship,
)
class FHIRResourcePropertyInline(admin.TabularInline):
model = FH... |
4f89070bd88ddcba1b89a0e5571571dc277fd9ee | 10cb11f83e1c8b51b9d72c28d6259a56ff1a97c8 | /samcli/lib/iac/exceptions.py | ed84517f6e583a3cb14b6f4dcfa8a540f3bea50d | [
"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 | 542 | py | exceptions.py | """
IaC Exceptions
"""
from typing import Optional
from samcli.commands.exceptions import UserException
class InvalidIaCPluginException(UserException):
def __init__(self, files: Optional[list] = None):
if files is None:
files = []
msg = "Could not determine the plugin type from the pr... |
4ce1c71d46e791c499f87df45c0a5630db92e50e | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/blink/web_tests/wpt_internal/prerender/PRESUBMIT.py | a289442b61f38b14d16432f03504819b27a1318d | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-only",
"GPL-1.0-or-later",
"GPL-2.0-only",
"LGPL-2.0-only",
"BSD-2-Clause",
"LicenseRef-scancode-other-copyleft",
"MIT",
"Apache-2.0"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 1,733 | py | PRESUBMIT.py | # Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Chromium presubmit script for prerender in Web Platform Tests.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit ... |
fe31e98d6102914b2601b7ee01917bf01fd49e0d | c50ee4849d767a4d94a4472d839dfdba790b2493 | /client/bindings/nodejs/binding.gyp | 2cb6226f2d34b280fd66e045c95d062d450cde76 | [
"Apache-2.0"
] | permissive | iotaledger/iota.rs | 1c18aa48a54d033511e0fa14b1037f72e87412b4 | e906ef3737f8c2b9ec910e466ec1d1c3be9a3b14 | refs/heads/develop | 2023-08-31T09:31:51.068322 | 2023-08-23T07:37:28 | 2023-08-23T07:37:28 | 135,950,775 | 222 | 143 | Apache-2.0 | 2023-08-23T07:37:29 | 2018-06-04T00:12:51 | Rust | UTF-8 | Python | false | false | 176 | gyp | binding.gyp | {
"targets": [
{
"target_name": "index",
'defines': [
"NAPI_VERSION=<(napi_build_version)",
],
"win_delay_load_hook": "true",
}
]
}
|
b84cfafdef6297420a8bf42ac99f6b53094e4ba6 | 4198532417feb21d023d7ba525a74555186b3e89 | /trailscraper/iam.py | ddf58bbfd1b5b56c855046a2c696a280f536edff | [
"Apache-2.0"
] | permissive | flosell/trailscraper | 375207753c668c78e166381e7e086d1adb950482 | b9edb1483ca8e9ce6ac8540a63334c37abd6242d | refs/heads/master | 2023-09-04T07:27:52.593647 | 2023-09-04T01:34:25 | 2023-09-04T01:40:20 | 112,079,872 | 726 | 32 | Apache-2.0 | 2023-09-11T01:57:25 | 2017-11-26T12:15:52 | Python | UTF-8 | Python | false | false | 6,054 | py | iam.py | """Classes to deal with IAM Policies"""
import json
import os
import re
import six
from toolz import pipe
from toolz.curried import groupby as groupbyz
from toolz.curried import map as mapz
BASE_ACTION_PREFIXES = ["Describe", "Create", "Delete", "Update", "Detach", "Attach", "List", "Put", "Get", ]
# pylint: disabl... |
43f290e32cd5a4e88d46596e5de8a780a24cb581 | 65d613ef216e674b6063e2716855aa47b3ad777d | /code/tests/test_message_property.py | a7f9d4f15384ab3b9ca957126a9c5fe4d63f4ef0 | [
"Python-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | dsuch/pymqi | c7adb7d199baa0a55265da6ac3e6866f0d2e907e | de161f70d71fac9380c9d5e11479d9d9fcd3873f | refs/heads/main | 2023-01-20T12:06:36.844340 | 2023-01-08T04:42:31 | 2023-01-08T04:42:31 | 9,715,588 | 112 | 81 | NOASSERTION | 2022-10-15T14:35:17 | 2013-04-27T14:14:02 | Python | UTF-8 | Python | false | false | 9,678 | py | test_message_property.py | """Test setting message properties and getting its values
"""
import unittest
import config
import utils
import pymqi
class TestMP(unittest.TestCase):
def setUp(self):
self.msg_prop_name = b"test_name"
self.msg_prop_value_str = "test_valuetest_valuetest_valuetest_valuetest_value"
self.m... |
3491e8f7bf9bec1c5dd0a3371152e7604c0c41e3 | c618bbf2719431999b1007461df0865bab60c883 | /dali/python/nvidia/dali/plugin/pytorch.py | 9a7b6ccb0c847f6b0c84cd3b64541058801517a6 | [
"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 | 37,512 | py | pytorch.py | # Copyright (c) 2017-2022, NVIDIA CORPORATION & AFFILIATES. 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 ... |
d40aae5c2950b739b66c9446969ec4fd1cfbe910 | ff6cc1089cd565f6244b988ca97cd5fc595cb27a | /blog/urls.py | d0c291863630ca22812e62ac340415eb47f472b9 | [] | no_license | sajib1066/django-ecommerce | d2a6f899c6702a2654d02caec59a957fe2ba5eaf | 62d4ee15675707078a69c46d4366aa5f10f14e83 | refs/heads/main | 2023-04-26T22:00:03.058968 | 2022-08-26T04:16:23 | 2022-08-26T04:16:23 | 224,104,350 | 163 | 69 | null | 2022-11-22T10:37:53 | 2019-11-26T04:44:58 | CSS | UTF-8 | Python | false | false | 279 | py | urls.py | from django.urls import path
from . import views
urlpatterns = [
path('', views.blog_page, name='blog'),
path('details/<post_id>', views.post_details, name='post-details'),
path(
'category/<ctg_name>', views.post_by_category, name='post-by-category'
)
]
|
ae5117d5608fd690b4fa40fd15cf4fa9f219a4a2 | 6416b746ee71d897789eab1e450000831674dbd0 | /src/otx/algorithms/detection/adapters/mmdet/task.py | 76ac12e02aabf3df5deda80092eca96666e2a747 | [
"Apache-2.0"
] | permissive | openvinotoolkit/training_extensions | c921f83ad52311af96ff45ae0b88d0aecddd855b | 80454808b38727e358e8b880043eeac0f18152fb | refs/heads/develop | 2023-08-31T06:29:07.229339 | 2023-08-31T01:57:26 | 2023-08-31T01:57:26 | 154,843,614 | 397 | 230 | Apache-2.0 | 2023-09-14T06:17:01 | 2018-10-26T14:02:29 | Python | UTF-8 | Python | false | false | 30,939 | py | task.py | """Task of OTX Detection using mmdetection training backend."""
# Copyright (C) 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/LICE... |
b0b1347937a5a2b871c958a1c8aec62d63d6bbf4 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/domain/AnttechBlockchainFinancePfPaymentQueryModel.py | 053496e3a1f6076b22abbb2535071057872b4f59 | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 2,016 | py | AnttechBlockchainFinancePfPaymentQueryModel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AnttechBlockchainFinancePfPaymentQueryModel(object):
def __init__(self):
self._buss_refr_no = None
self._financing_id = None
self._platform_id = None
@property
de... |
9ae0e033a8972c01df6892e0ee8e7467f05951e0 | ea6a6a73bb3798f73a986a624a545f8f4965aa3d | /utils/HtmlToImgPdfKit.py | ac037f0d27b9780587d7bbf42fd3de8ee02d9636 | [
"MIT"
] | permissive | aeasringnar/django-RESTfulAPI | 2a25e4695fb50398a5c03d92a58430484ff2d083 | 7353efb2967c2e9ec54e600199eaaead8222c166 | refs/heads/master | 2023-04-14T03:58:49.008851 | 2023-03-07T03:01:22 | 2023-03-07T03:01:22 | 210,539,341 | 268 | 50 | MIT | 2022-11-22T06:29:13 | 2019-09-24T07:28:44 | Python | UTF-8 | Python | false | false | 5,859 | py | HtmlToImgPdfKit.py | import logging
import os
import time
from enum import Enum
from io import BytesIO
from shutil import copy
from tempfile import mkdtemp
from typing import Any, Tuple, Union
from uuid import uuid4
try:
import imgkit
import pdfkit
except Exception as e:
raise ImportError(
'imgkit pdftkit not found, pe... |
c6a18251a0e1c98a88a0fe34e919fbdd6b78e435 | edc1134436a79ca883a0d25f3c8dfffc4235c514 | /pyro/ops/gamma_gaussian.py | edffe0755e413b6551cf8277c8041f9a1ebec44a | [
"Apache-2.0"
] | permissive | pyro-ppl/pyro | 2283d8ca528fc090c724a3a6e0f344e505ebbf77 | 0e82cad30f75b892a07e6c9a5f9e24f2cb5d0d81 | refs/heads/dev | 2023-08-18T00:35:28.014919 | 2023-08-06T21:01:36 | 2023-08-06T21:01:36 | 94,506,832 | 3,647 | 606 | Apache-2.0 | 2023-09-14T13:52:14 | 2017-06-16T05:03:47 | Python | UTF-8 | Python | false | false | 17,941 | py | gamma_gaussian.py | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import math
import torch
from torch.distributions.utils import lazy_property
from torch.nn.functional import pad
from pyro.distributions.multivariate_studentt import MultivariateStudentT
from pyro.distributions.torch import Multi... |
b2316bf7ed13240d48406d0237f8c34a82246bd6 | 8b5d61f17ab2e4c158270cf6dda79f9a47870df1 | /sknetwork/linalg/__init__.py | 7dd00bda7ce8c28682737d60c5d0ba145ac6c02a | [
"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 | 536 | py | __init__.py | """Module of linear algebra."""
from sknetwork.linalg.basics import safe_sparse_dot
from sknetwork.linalg.eig_solver import EigSolver, LanczosEig
from sknetwork.linalg.laplacian import get_laplacian
from sknetwork.linalg.normalization import diagonal_pseudo_inverse, get_norms, normalize
from sknetwork.linalg.operators ... |
f263a316f84985a5abcd45d3c512dafe44b21dae | e75c5412063078c9ea3e7c71a8dc7a2026083a34 | /astropy/cosmology/_io/tests/test_yaml.py | 95b2816181e7053fe51f38b55c5182da8c1893cb | [
"BSD-3-Clause"
] | permissive | astropy/astropy | d6636f24acdf2b18fc3e413ca0c4b1162a63dd41 | 53188c39a23c33b72df5850ec59e31886f84e29d | refs/heads/main | 2023-08-27T18:16:44.061375 | 2023-08-27T16:07:35 | 2023-08-27T16:07:35 | 2,081,289 | 3,922 | 1,935 | BSD-3-Clause | 2023-09-14T09:23:26 | 2011-07-21T01:33:49 | Python | UTF-8 | Python | false | false | 6,910 | py | test_yaml.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import pytest
import astropy.units as u
from astropy.cosmology import Cosmology, FlatLambdaCDM, Planck18
from astropy.cosmology import units as cu
from astropy.cosmology._io.yaml import (
from_yaml,
to_yaml,
yaml_constructor,
yaml_represe... |
2be251e82fa318f80af49533683d5db93e800b16 | 6c88b2cea38b2cead9e2402d46a8fc64949c53df | /tests/integration/secret_outputs/python/__main__.py | 7681abd20df31c9ba1684300b0d85a5ce3aaabb3 | [
"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 | 995 | py | __main__.py | # Copyright 2016-2020, Pulumi Corporation. All rights reserved.
from pulumi import export, Input, Output, ResourceOptions
from pulumi.dynamic import Resource, ResourceProvider, CreateResult
class Provider(ResourceProvider):
def create(self, props):
return CreateResult("1", {"prefix": props["prefix"]})
c... |
066d0a9430cdabbb1d6f3f9b7c683a09e705ba94 | e5e0d729f082999a9bec142611365b00f7bfc684 | /tensorflow/python/framework/constant_op_test.py | da0fb64fde6f2b01b9f46f34e503bcb95a5480fd | [
"Apache-2.0"
] | permissive | NVIDIA/tensorflow | ed6294098c7354dfc9f09631fc5ae22dbc278138 | 7cbba04a2ee16d21309eefad5be6585183a2d5a9 | refs/heads/r1.15.5+nv23.03 | 2023-08-16T22:25:18.037979 | 2023-08-03T22:09:23 | 2023-08-03T22:09:23 | 263,748,045 | 763 | 117 | Apache-2.0 | 2023-07-03T15:45:19 | 2020-05-13T21:34:32 | C++ | UTF-8 | Python | false | false | 1,832 | py | constant_op_test.py | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
78881c0901a5359c429b26dbfbb1426acfb8fe09 | 0760fb4901a75766921a205b55686d6d6f049b30 | /python/ray/tune/tests/test_tuner_restore.py | 57d74d0f8d77fbf8fea1f54164f0c05334bccea9 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 36,730 | py | test_tuner_restore.py | import json
import logging
import os
import shutil
import time
import unittest
import pytest
import ray
from ray import train, tune
from ray.train import (
Checkpoint,
CheckpointConfig,
FailureConfig,
RunConfig,
ScalingConfig,
)
from ray.air._internal.uri_utils import URI
from ray.train.data_paral... |
118e902b08fbd909c7212add7f62966f756429c8 | e8ba4105967ade74b55e7943586eb533a16f908f | /plex_mpv_shim/player.py | 3a45c82a8c18b26462b562c479d276f6c37cbd4e | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | iwalton3/plex-mpv-shim | 54d97470688bf0fdf49873ce670990c889f22b30 | a1545861bc3bd9ced71620ff0529202898f0c3cd | refs/heads/master | 2023-06-11T08:21:34.513868 | 2023-06-01T00:38:46 | 2023-06-01T00:38:46 | 202,855,346 | 330 | 30 | MIT | 2023-08-19T21:23:11 | 2019-08-17T08:26:12 | Python | UTF-8 | Python | false | false | 23,030 | py | player.py | import logging
import os
import sys
import requests
import urllib.parse
from threading import RLock, Lock
from queue import Queue
from collections import OrderedDict
from . import conffile
from .utils import synchronous, Timer, get_resource
from .conf import settings
from .menu import OSDMenu
from .media import Media... |
3089e6022ded46647dba60973f6ec9db9e3fc7f6 | 38fff7bdefd8d62a740d51329b50d0e1e49258bb | /infra/build/functions/project_sync.py | c689aa7867aee2ab6db97b655df1dfce05c369bd | [
"Apache-2.0"
] | permissive | google/oss-fuzz | 026384c2ada61ef68b147548e830f60730c5e738 | f0275421f84b8f80ee767fb9230134ac97cb687b | refs/heads/master | 2023-08-31T23:30:28.157702 | 2023-08-31T21:49:30 | 2023-08-31T21:49:30 | 63,809,205 | 9,438 | 2,315 | Apache-2.0 | 2023-09-14T20:32:19 | 2016-07-20T19:39:50 | Shell | UTF-8 | Python | false | false | 9,647 | py | project_sync.py | # Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
e817c730662d46dff23df4f3c5a820267f891df3 | 4cf1fea45f27bbd317c08e73130c9a13bbd13b90 | /src/pydap/handlers/dap.py | 41a1b896063354059e343df352cc2473fe369b1c | [
"MIT"
] | permissive | pydap/pydap | 35eacc2752f1ef0d2e5bbed6a672ce103cd053dd | a330c563c2396c98271fda699c07ab05b7a472b3 | refs/heads/master | 2023-07-25T17:25:21.935337 | 2023-06-05T17:15:38 | 2023-06-05T17:15:38 | 10,464,231 | 102 | 78 | MIT | 2023-09-13T08:59:56 | 2013-06-03T20:42:50 | Python | UTF-8 | Python | false | false | 23,882 | py | dap.py | """A handler for remote datasets.
DAP handlers convert from different data formats (NetCDF, eg) to the internal
pydap model. The pydap client is just a handler that converts from a remote
dataset to the internal model.
"""
import io
import gzip
import sys
import pprint
import copy
import re
from itertools import cha... |
7bab59d0e54810bd1a1c9f69c098b546bb197ef1 | dbd37114c5e3b39d0ce4d6135144f5a7a3b6d4f5 | /pytorch_tools/modules/fpn.py | e00f962de647644b0f0e6b388177da55db51f1bf | [
"MIT"
] | permissive | bonlime/pytorch-tools | 6633fe8969ef51450589670c2393838131963773 | 74cd3dcef5ce4f81302be4061414c1d1113dafb8 | refs/heads/master | 2023-09-03T20:18:16.718561 | 2023-08-29T12:36:35 | 2023-08-29T12:36:35 | 201,936,229 | 190 | 16 | MIT | 2023-08-04T22:42:27 | 2019-08-12T13:30:30 | Python | UTF-8 | Python | false | false | 2,222 | py | fpn.py | """ Implements Feature Piramid Pooling for Object Detection and Semantic Segmentation """
# code kindly borrowed from https://github.com/qubvel/segmentation_models.pytorch
import torch.nn as nn
import torch.nn.functional as F
from .residual import conv1x1, conv3x3
class MergeBlock(nn.Module):
def forward(self, x)... |
abeae792e9ef100dba9151ba632e2c6e81134405 | af101b467134e10270bb72d02f41f07daa7f57d8 | /configs/positional_encoding_in_gans/singan_interp-pad_balloons.py | 08f082fc74b704a073f4130b217e2addd45e0062 | [
"Apache-2.0"
] | permissive | open-mmlab/mmagic | 4d864853417db300de4dfe7e83ce380fd1557a23 | a382f143c0fd20d227e1e5524831ba26a568190d | refs/heads/main | 2023-08-31T14:40:24.936423 | 2023-08-30T05:05:56 | 2023-08-30T05:05:56 | 203,999,962 | 1,370 | 192 | Apache-2.0 | 2023-09-14T11:39:18 | 2019-08-23T13:04:29 | Jupyter Notebook | UTF-8 | Python | false | false | 419 | py | singan_interp-pad_balloons.py | _base_ = ['../singan/singan_balloons.py']
# TODO: bugs here
# MODEL
# NOTE: add by user, e.g.:
# test_pkl_data = './work_dirs/singan_pkl/singan_interp-pad_balloons_20210406_180014-96f51555.pkl' # noqa
test_pkl_data = None
model = dict(
type='PESinGAN',
generator=dict(
type='SinGANMSGeneratorPE', inte... |
4ef15272f1228cc8d57cc7bab5cf85aab5d8335a | bb33e6be8316f35decbb2b81badf2b6dcf7df515 | /source/res/scripts/client_common/arena_component_system/epic_sector_warning_component.py | 126ad87521707dc54af4311d4467d5fde19e16e1 | [] | no_license | StranikS-Scan/WorldOfTanks-Decompiled | 999c9567de38c32c760ab72c21c00ea7bc20990c | d2fe9c195825ececc728e87a02983908b7ea9199 | refs/heads/1.18 | 2023-08-25T17:39:27.718097 | 2022-09-22T06:49:44 | 2022-09-22T06:49:44 | 148,696,315 | 103 | 39 | null | 2022-09-14T17:50:03 | 2018-09-13T20:49:11 | Python | UTF-8 | Python | false | false | 20,318 | py | epic_sector_warning_component.py | # Python bytecode 2.7 (decompiled from Python 2.7)
# Embedded file name: scripts/client_common/arena_component_system/epic_sector_warning_component.py
import math
import weakref
from collections import defaultdict
from functools import partial
from math import copysign
import BigWorld
import Event
from arena_component_... |
154f65b0e0730e7f5e87eaad10da5ebad3c5c4e5 | 5dc28132a07ec23e7ee925e0117dd56b96825b37 | /tests/test_unit.py | 0e149bc0ffc9e6b6cce0eed1d851671b17e57b23 | [
"Apache-2.0"
] | permissive | clld/wals3 | 70e538bea77c90415467f656fc6265595cc5a22a | a9d1a68c5899e13e73893eef3fcccc8fbc076749 | refs/heads/master | 2023-06-08T01:58:11.366314 | 2023-06-03T06:08:24 | 2023-06-03T06:08:24 | 7,600,736 | 113 | 16 | Apache-2.0 | 2021-12-07T16:25:39 | 2013-01-14T08:22:36 | CSS | UTF-8 | Python | false | false | 479 | py | test_unit.py | from clld.db.models.common import Language
def test_Matrix(env, tmp_path):
from wals3.adapters import Matrix
class TestMatrix(Matrix):
def abspath(self, req):
return tmp_path / 'test'
def query(self, req):
return Matrix.query(self, req).filter(Language.pk < 100)
... |
eee273f854704c0801df38c1951c5582a624312f | 84ae399f0133a32223386ef598ac9ca5fcd1b32e | /examples/table/utils/udfs.py | f6f8ab9d62f02e3e61bda7c75c91065bddeecad0 | [
"Apache-2.0"
] | permissive | pyflink/playgrounds | 49b4601dd9645513d6ebd87fed7f1f8845407bf1 | cacfa58a8ae4bfe5880f08ca3bdc6b2a75585f72 | refs/heads/master | 2023-08-21T15:27:32.892403 | 2023-08-07T06:26:13 | 2023-08-07T06:26:13 | 255,244,417 | 171 | 82 | null | 2023-05-22T16:19:29 | 2020-04-13T06:01:35 | Shell | UTF-8 | Python | false | false | 142 | py | udfs.py | from pyflink.table import DataTypes
from pyflink.table.udf import udf
@udf(result_type=DataTypes.BIGINT())
def add_one(i):
return i + 1
|
d519d78ac267fa0f22e9b847fc35ac532d30800a | f9d564f1aa83eca45872dab7fbaa26dd48210d08 | /huaweicloud-sdk-cc/huaweicloudsdkcc/v3/model/create_inter_region_bandwidth.py | 12a495cd55efb50a3a68880cb46a4518edcc50e7 | [
"Apache-2.0"
] | permissive | huaweicloud/huaweicloud-sdk-python-v3 | cde6d849ce5b1de05ac5ebfd6153f27803837d84 | f69344c1dadb79067746ddf9bfde4bddc18d5ecf | refs/heads/master | 2023-09-01T19:29:43.013318 | 2023-08-31T08:28:59 | 2023-08-31T08:28:59 | 262,207,814 | 103 | 44 | NOASSERTION | 2023-06-22T14:50:48 | 2020-05-08T02:28:43 | Python | UTF-8 | Python | false | false | 6,145 | py | create_inter_region_bandwidth.py | # coding: utf-8
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class CreateInterRegionBandwidth:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is a... |
9029911f4832a30c189bdc9ed6f533bf9ae48e65 | 25e99a0af5751865bce1702ee85cc5c080b0715c | /design_pattern/src/大話設計模式/design-patterns-py/proxy.py | abc79425859cd19b5e95c449749b7db5bb4db0cd | [] | no_license | jasonblog/note | 215837f6a08d07abe3e3d2be2e1f183e14aa4a30 | 4471f95736c60969a718d854cab929f06726280a | refs/heads/master | 2023-05-31T13:02:27.451743 | 2022-04-04T11:28:06 | 2022-04-04T11:28:06 | 35,311,001 | 130 | 67 | null | 2023-02-10T21:26:36 | 2015-05-09T02:04:40 | C | UTF-8 | Python | false | false | 1,047 | py | proxy.py | import abc
class GiveGift:
__metaclass__ = abc.ABCMeta
@abc.abstractmethod
def __init__(self, sg):
"""init"""
@abc.abstractmethod
def give_dolls(self):
"""give dolls"""
@abc.abstractmethod
def give_flowers(self):
"""give flowers"""
class SchoolGirl:
def __i... |
abbd8851dfcaaeb92b0d7de723716a64fc1a1adf | f80ef3a3cf859b13e8af8433af549b6b1043bf6e | /pyobjc-framework-Cocoa/PyObjCTest/test_foundationerrors.py | fd6d97fea3fada3f9d1eeb92962aee581fa85f47 | [
"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 | 6,646 | py | test_foundationerrors.py | import Foundation
from PyObjCTools.TestSupport import TestCase, min_os_level
class FoundationErrorsTest(TestCase):
def testConstants(self):
self.assertEqual(Foundation.NSFileNoSuchFileError, 4)
self.assertEqual(Foundation.NSFileLockingError, 255)
self.assertEqual(Foundation.NSFileReadUnkno... |
6a6d03e942edd30010f4b48a977498f52d513510 | c5311176cd07f267fb1ca4f9cd71b308ed0778c5 | /dygie/training/event_metrics.py | 5845a5681049b7845574a2210e5789142c21d9c2 | [
"MIT"
] | permissive | dwadden/dygiepp | 1a71885b0588bb5f0997dec13b27ebfd30169e7c | ab764cd0d48b7c430a78a1edddf5acaeec13c109 | refs/heads/master | 2023-07-27T19:30:00.399646 | 2023-07-19T20:52:06 | 2023-07-19T20:52:06 | 171,385,430 | 534 | 129 | MIT | 2023-07-19T20:52:08 | 2019-02-19T01:48:41 | Python | UTF-8 | Python | false | false | 6,731 | py | event_metrics.py | from overrides import overrides
from collections import Counter
from allennlp.training.metrics.metric import Metric
from dygie.training.f1 import compute_f1
def _invert_arguments(arguments, triggers):
"""
For scoring the argument, we don't need the trigger spans to match exactly. We just need the
trigge... |
09ff9754ca49e3597bd507cd886b3d0e3d4814cf | d0f1472c167339f1e5267f404a5b73e0c180b754 | /cpca/exceptions.py | 221bc6c76ce836317975bf6d23800a81fe35d237 | [
"MIT"
] | permissive | DQinYuan/chinese_province_city_area_mapper | a756670401ac648b4b82991ee77651262790aca6 | 9bdfd6e8694b44ca3de0730bd9122c6df5916133 | refs/heads/master | 2023-09-01T13:48:16.396552 | 2021-12-12T09:20:04 | 2021-12-12T09:20:04 | 123,792,414 | 1,558 | 366 | MIT | 2022-12-08T11:46:07 | 2018-03-04T13:43:06 | Python | UTF-8 | Python | false | false | 418 | py | exceptions.py | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 28 18:55:58 2018
自定义的一些异常类
@author: 燃烧杯
"""
class CPCAException(Exception):
pass
class PlaceTypeNotExistException(CPCAException):
pass
class InputTypeNotSuportException(CPCAException):
input_type = \
"""
输入应该为
|省 |市 |区 |
|江苏省 |扬州市 |邗江区 |
格式的pandas... |
70071d746006bad93d8a6fd8b3368c8bae0cd8e3 | e0ed4496e94263643cedea56bfcdec1140ced8d6 | /examples/competitive/reduce_iris_sample_size_lvq.py | de4f9612ea3115e90d7bb41f768f099942b34c3b | [
"MIT"
] | permissive | itdxer/neupy | 6307666271807bd9028e3e60dd2536a544ed8421 | 317ed4204b5239e8be2b94a95fe3157c5f9edc65 | refs/heads/master | 2023-06-13T23:09:36.487633 | 2023-01-03T21:24:56 | 2023-01-03T21:24:56 | 41,323,480 | 840 | 206 | MIT | 2022-12-16T16:32:10 | 2015-08-24T19:45:11 | Python | UTF-8 | Python | false | false | 944 | py | reduce_iris_sample_size_lvq.py | import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import datasets
from neupy import algorithms, utils
utils.reproducible()
def plot_scattermatrix(data, target):
df = pd.DataFrame(data)
df['target'] = target
return sns.pairplot(df, hue='target', diag_kind='hist')
if... |
7441c5885489b30e8d75bc36943a524c5a9585e4 | 24c8bf613f848419f6f96a09e3093e997e14aad5 | /linty_fresh/linters/buck_unittest.py | 2d0467513fb7ca0225bb1e41e75d7eef4e48b133 | [
"Apache-2.0"
] | permissive | lyft/linty_fresh | 32743f40cecdaaf99097a56ba01827d69b6e5eb3 | 7fc46ecd91f64c89bd45b0d136d037dbd7cc2be4 | refs/heads/master | 2023-08-27T20:55:48.189059 | 2022-12-13T04:09:02 | 2022-12-13T04:09:02 | 48,265,704 | 207 | 32 | Apache-2.0 | 2023-06-24T01:09:01 | 2015-12-19T02:37:26 | Python | UTF-8 | Python | false | false | 1,096 | py | buck_unittest.py | from typing import Set
from xml.etree import ElementTree
from linty_fresh.problem import TestProblem
def parse(contents: str, **kwargs) -> Set[TestProblem]:
result = set()
try:
root = ElementTree.fromstring(contents)
except ElementTree.ParseError:
return result
for test in root.findal... |
eee9415256945967263793f84472eed86da345ff | d7afe289dcd2b5865d836d9fdfe82d1303e0ea66 | /plugins/modules/panos_tag_object.py | 6ebe31a56289e62069e2d1b89d6f098d1035a3d3 | [
"Apache-2.0"
] | permissive | PaloAltoNetworks/pan-os-ansible | e221fefce26e938969f5affa5eae644af69b7b0f | ff65f0fda622f654d9b837bd8b1a289eb3b38fad | refs/heads/develop | 2023-09-05T11:10:08.357707 | 2023-08-15T19:16:50 | 2023-08-15T19:16:50 | 238,510,689 | 171 | 93 | Apache-2.0 | 2023-09-14T09:48:48 | 2020-02-05T17:39:28 | Python | UTF-8 | Python | false | false | 6,859 | py | panos_tag_object.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2018 Palo Alto Networks, 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
#
#... |
fcfb2545fbde05f342442b1d85620b3dc21aa324 | f6277ff7677db4568c1c65df70f1ea5e6bb94b2a | /soccerapi/api/kambi.py | 1b79402137fde4ac80b4ac83aec549db0e924744 | [
"MIT"
] | permissive | S1M0N38/soccerapi | 0823b5234761a1caaf73be210bf161b9c6876366 | 88c6733cf65f55145d7d07910756241f7710786f | refs/heads/master | 2022-12-13T07:39:46.505665 | 2022-02-16T13:49:41 | 2022-02-16T13:49:41 | 232,615,041 | 158 | 41 | MIT | 2022-12-08T08:48:46 | 2020-01-08T17:07:31 | Python | UTF-8 | Python | false | false | 4,753 | py | kambi.py | from typing import Dict, List
class ParserKambi:
"""888sport, unibet and other use the same CDN (eu-offering.kambicdn)
so the requetsting and parsing process is exaclty the same.
This class implements parsers for variuos category for Kambi."""
def full_time_result(self, data: Dict) -> List:
"... |
c7a0f2156bd95e6341e8d6a6083ffa129376e276 | 99199db3f78a344e72b281c71c690518ae07375a | /octavia/tests/unit/common/test_data_models.py | 2ceac252044c36feb6a4646778833b6e3c5571b4 | [
"Apache-2.0"
] | permissive | openstack/octavia | 3faf2afe2ade5bd3978bb3a0558d2eeefc648ba2 | 0426285a41464a5015494584f109eed35a0d44db | refs/heads/master | 2023-09-01T20:12:48.272344 | 2023-08-31T17:24:04 | 2023-08-31T17:24:04 | 21,018,188 | 147 | 180 | Apache-2.0 | 2021-03-30T12:34:30 | 2014-06-19T22:47:19 | Python | UTF-8 | Python | false | false | 18,583 | py | test_data_models.py | # Copyright 2018 Rackspace US Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... |
ba1a45bc98aada86f54df0e664acf7ae0b05e614 | 226727e281e6ce17450fac3ea78d1a3c4a3999fc | /tests/test_math/test_linalg.py | 7c8aa137d037945796fb4702c23c7eed165adb50 | [
"MIT"
] | permissive | GazzolaLab/PyElastica | 20df23e97560d05ef50e60f2aeefb420968fb01d | 49017d456aa10032e0ba1af23d5afd92cecedfa5 | refs/heads/master | 2023-08-31T14:28:48.056038 | 2023-08-18T16:54:51 | 2023-08-18T16:54:51 | 254,172,891 | 159 | 94 | MIT | 2023-09-09T04:11:01 | 2020-04-08T18:47:47 | Python | UTF-8 | Python | false | false | 6,516 | py | test_linalg.py | #!/usr/bin/env python3
__doc__ = (
""" Test scripts for linear algebra helpers in Elastica Numba implementation"""
)
# System imports
import numpy as np
import pytest
from numpy.testing import assert_allclose
from elastica._linalg import (
_batch_matvec,
_batch_matmul,
_batch_cross,
_batch_vec_oneD_... |
afc48ea76235f6f3c96968c74289422a4b222309 | a0aa383f62648abac2bac7076cff66406351938b | /docs/src/guid2.py | 1d2811cf5032b1bcb1741ec6d2682023ff8aee84 | [
"MIT"
] | permissive | dmontagu/fastapi-utils | 0ecb1be3778733ad92d2bf4dea8dc28f6144fbcd | 3ef27a6f67ac10fae6a8b4816549c0c44567a451 | refs/heads/master | 2023-07-20T00:55:42.737982 | 2023-03-19T18:34:49 | 2023-03-19T18:34:49 | 234,978,122 | 1,548 | 153 | MIT | 2023-09-11T14:52:24 | 2020-01-19T22:34:25 | Python | UTF-8 | Python | false | false | 212 | py | guid2.py | import sqlalchemy as sa
from fastapi_utils.guid_type import setup_guids_postgresql
database_uri = "postgresql://user:password@db:5432/app"
engine = sa.create_engine(database_uri)
setup_guids_postgresql(engine)
|
56ebdc08e33e3c9fa11f27d67e5b64920a720b2a | 9468849850c7c2b2040835eb9496bfb716a98c21 | /cea/resources/radiation/main.py | ef318171c66fdd3dc970536be5bf6bba9b78fcd8 | [
"MIT"
] | permissive | architecture-building-systems/CityEnergyAnalyst | e6532c0c794538dbb665366ccf6d783e0d9d1345 | b84bcefdfdfc2bc0e009b5284b74391a957995ac | refs/heads/master | 2023-08-30T19:57:47.445797 | 2023-08-25T13:30:28 | 2023-08-25T13:30:28 | 49,491,341 | 166 | 60 | MIT | 2023-09-11T11:10:00 | 2016-01-12T10:02:17 | Python | UTF-8 | Python | false | false | 8,915 | py | main.py | """
Radiation engine and geometry handler for CEA
"""
import os
import shutil
import time
from itertools import repeat
import pandas as pd
import geopandas as gpd
from osgeo import gdal
import cea.config
import cea.inputlocator
from cea.datamanagement.databases_verification import verify_input_geometry_zone, verify_... |
1e79b57e6660d83b5fbcb8cc92dece627fec9482 | 2a382e3e17fce63433baa0ea46e945d5306f29dc | /droidconfig.py | 8ac5c6c471c06ebc4ab89676368386a8e1f97cd0 | [
"MIT"
] | permissive | cryptax/droidlysis | 8a8cdeb0b71d3f412a41c47f5b1a39f6a3228450 | 29ce79f776e5e943ef5a540b02884d54662a2e31 | refs/heads/master | 2023-08-09T00:09:52.539269 | 2023-07-24T11:21:05 | 2023-07-24T11:21:05 | 189,957,586 | 189 | 34 | MIT | 2023-02-21T10:26:16 | 2019-06-03T07:38:33 | Python | UTF-8 | Python | false | false | 5,829 | py | droidconfig.py | import os
import errno
import configparser
import logging
import shutil
from platformdirs import *
logging.basicConfig(format='%(levelname)s:%(filename)s:%(message)s',
level=logging.INFO)
# ------------------------- Reading *.conf configuration files -----------
class generalconfig:
def __in... |
ccf3b3021a6f8d2ec42afa663343b3e0e63d2269 | 753aafa747871f556600b28dbb867298132b1e6b | /supervisely/metric/common.py | 1603e13518c697aadc3869960f1e43457ea9f053 | [
"Apache-2.0"
] | permissive | supervisely/supervisely | 85dd63e5ccb590b2861271ef7bd5401aa2a99038 | f0df756b8fb89364202fde54e6ef5fe89fca089d | refs/heads/master | 2023-08-27T07:29:57.682377 | 2023-08-24T13:17:31 | 2023-08-24T13:17:31 | 140,302,908 | 447 | 91 | Apache-2.0 | 2023-09-13T11:11:09 | 2018-07-09T15:09:32 | Python | UTF-8 | Python | false | false | 2,526 | py | common.py | # coding: utf-8
from supervisely.project.project import Project
from supervisely.annotation.tag_meta_collection import TagMetaCollection
from supervisely.annotation.tag_meta import TagValueType
from supervisely.sly_logger import logger
CLASSES_MAPPING = 'classes_mapping'
TAGS_MAPPING = 'tags_mapping'
CONFIDENCE_THRE... |
5745784fcbfe586c21ee705775f696910a34d1f9 | ae6c2a6fa37613ac31b2bd3537b3276c9b333632 | /server/migrations/0090_auto_20190305_1023.py | 04ce5df390673878d2db492df300d18a198e13fd | [
"Apache-2.0"
] | permissive | salopensource/sal | 435a31904eb83048c02c9fbff02bbf832835d1b4 | 0895106c6729d5465da5e21a810e967a73ed6e24 | refs/heads/main | 2023-08-03T06:53:40.142752 | 2023-07-28T15:51:08 | 2023-07-28T15:51:08 | 35,883,375 | 227 | 94 | Apache-2.0 | 2023-07-28T15:51:10 | 2015-05-19T13:21:57 | Python | UTF-8 | Python | false | false | 563 | py | 0090_auto_20190305_1023.py | # Generated by Django 2.1.4 on 2019-03-05 15:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('server', '0089_remove_machine_report'),
]
operations = [
migrations.RemoveField(
model_name='machine',
name='last_puppet_run... |
6120d907ae31a31069aa0961b5959437c1127456 | 4a59e1f44693e424cae8bee19167ff401ac0eba7 | /spark/train_model.py | d31c14c60967f05580f4f285852e6542384c9d11 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | yahoo/lopq | 2bc10c9ff92771b42eac76fec02c5015ef41496f | 0f17655b901e6dfabe5c2aa62b4c8e492f34b05a | refs/heads/master | 2023-08-31T00:33:42.456245 | 2017-12-16T00:29:23 | 2017-12-16T00:29:23 | 48,455,253 | 595 | 142 | Apache-2.0 | 2019-04-10T19:50:27 | 2015-12-22T21:40:24 | Python | UTF-8 | Python | false | false | 15,428 | py | train_model.py | # Copyright 2015, Yahoo Inc.
# Licensed under the terms of the Apache License, Version 2.0. See the LICENSE file associated with the project for terms.
from pyspark.context import SparkContext
import numpy as np
import cPickle as pkl
import base64
import os
import subprocess
import sys
from tempfile import NamedTempor... |
8a9a49ee2cd49dbfbc2954347656bd44d31331f0 | 3f0948e07aef06f734fa6db3945b192f71ab435f | /tests/test_atom.py | 84052216b0d9ba3d7c7ca27e63b9b5f4187b0414 | [
"BSD-3-Clause"
] | permissive | nucleic/atom | c15c932c3a1386469685580867105df7be5c0ba3 | 761a52821d8c77b5718216256963682d11599c1e | refs/heads/main | 2023-08-25T07:55:24.697711 | 2023-05-05T07:59:30 | 2023-05-05T07:59:30 | 8,594,952 | 251 | 49 | NOASSERTION | 2023-09-11T17:00:00 | 2013-03-06T03:20:53 | Python | UTF-8 | Python | false | false | 6,792 | py | test_atom.py | # --------------------------------------------------------------------------------------
# Copyright (c) 2013-2023, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# --------------------------------------... |
f45d4a82c7d4ed084a67373a0fd4627593efce65 | 4daab5ba90185bae65169ebb8183c635385ab3f8 | /examples/tutorials/s_logging.py | b85354f3eafef282b3c81820c29389ef03923d72 | [
"MIT"
] | permissive | duartegroup/autodE | bcf69440bd04411f97d39df0df0ae1f2bf6feb8c | 4d6667592f083dfcf38de6b75c4222c0a0e7b60b | refs/heads/master | 2023-09-01T15:08:16.028378 | 2023-07-25T08:09:05 | 2023-07-25T08:09:05 | 196,085,570 | 132 | 42 | MIT | 2023-09-12T15:20:54 | 2019-07-09T21:20:27 | Python | UTF-8 | Python | false | false | 543 | py | s_logging.py | import autode as ade
# For more informative logs installing coloredlogs is recommended:
# conda install coloredlogs
# autodE writes logging information at the 'ERROR' level by default. To
# turn on logging export the AUTODE_LOG_LEVEL environment variable to
# one of: INFO, WARNING, ERROR
# Will not print any log
_ ... |
a2f4172967019ee01ddf73033655127c63e5047e | a4ea525e226d6c401fdb87a6e9adfdc5d07e6020 | /src/azure-cli/azure/cli/command_modules/dla/vendored_sdks/azure_mgmt_datalake_analytics/job/models/job_relationship_properties.py | df704d923be28363f5df5021ac4b88060e01acff | [
"MIT",
"BSD-3-Clause",
"LGPL-2.0-or-later",
"GPL-1.0-or-later",
"MPL-2.0",
"LGPL-2.1-only",
"Apache-2.0",
"LGPL-2.1-or-later",
"BSD-2-Clause"
] | permissive | Azure/azure-cli | 13340eeca2e288e66e84d393fa1c8a93d46c8686 | a40fd14ad0b6e89720a2e58d4d9be3a6ce1535ca | refs/heads/dev | 2023-08-17T06:25:37.431463 | 2023-08-17T06:00:10 | 2023-08-17T06:00:10 | 51,040,886 | 4,018 | 3,310 | MIT | 2023-09-14T11:11:05 | 2016-02-04T00:21:51 | Python | UTF-8 | Python | false | false | 2,500 | py | job_relationship_properties.py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
8687a11d24f55a7c5f009fca1a50b1ca22e5b937 | e4f9f1e6e71a23e167047e5a900ec66a13e1578d | /tests/test_eval.py | 7ac4cdf1f60e164de77a1f610893dcc67aea9a63 | [
"MIT"
] | permissive | onecommons/unfurl | 546b9255e3551aa2f4badd8d58ea7958dd362881 | 25a3c81a64ee661813662615d6a0651ff3749219 | refs/heads/main | 2023-08-23T22:07:56.949658 | 2023-08-22T19:59:23 | 2023-08-22T19:59:23 | 132,939,353 | 133 | 11 | MIT | 2023-09-12T00:09:57 | 2018-05-10T18:27:46 | Python | UTF-8 | Python | false | false | 30,856 | py | test_eval.py | import logging
import unittest
import os
import json
import pickle
import io
from unfurl.result import ResultsList, ResultsMap, serialize_value, ChangeRecord, Result
from unfurl.eval import Ref, UnfurlEvalError, map_value, RefContext, set_eval_func, ExternalValue, SafeRefContext
from unfurl.support import apply_templa... |
34a0167f628ab6c277291a6369488485a5915bd0 | 9ed3b16b3da72e4c47a04f2f2e3ef395e9fd9f20 | /main/orc/template.py | 070a7d2d0f36ca410197f507714f975a4957d902 | [
"BSD-2-Clause"
] | permissive | chimera-linux/cports | fdae59dc25856942be3041e10e3533dbf8f883c3 | 714680161cd719dd047452c95fbb9b447bc23a86 | refs/heads/master | 2023-09-03T19:30:40.720670 | 2023-09-03T15:07:40 | 2023-09-03T15:07:40 | 374,000,317 | 118 | 37 | BSD-2-Clause | 2023-09-14T20:31:08 | 2021-06-05T02:07:34 | Python | UTF-8 | Python | false | false | 678 | py | template.py | pkgname = "orc"
pkgver = "0.4.34"
pkgrel = 0
build_style = "meson"
configure_args = [
"-Dexamples=disabled",
]
hostmakedepends = [
"meson",
"pkgconf",
"gtk-doc-tools",
]
makedepends = ["linux-headers"]
pkgdesc = "Optimized Inner Loop Runtime Compiler"
maintainer = "q66 <q66@chimera-linux.org>"
license =... |
6c74ddd11c97a328186f2a079ad6f2615193b8d9 | 13800b7827598e76428a335559b7bf11867ec2f0 | /python/ccxt/pro/binanceusdm.py | 86eb197ea0590bb0357476013283d42a9fce06b8 | [
"MIT"
] | permissive | ccxt/ccxt | b40a0466f5c430a3c0c6026552ae697aa80ba6c6 | e4065f6a490e6fc4dd7a72b375428b2faa570668 | refs/heads/master | 2023-09-04T03:41:29.787733 | 2023-09-03T19:25:57 | 2023-09-03T19:25:57 | 91,253,698 | 30,798 | 8,190 | MIT | 2023-09-14T21:59:09 | 2017-05-14T15:41:56 | Python | UTF-8 | Python | false | false | 1,357 | py | binanceusdm.py | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.pro.binance import binance
from ccxt.base.errors import InvalidOrder
class binanceusdm(binance):
def describe(self):
... |
99848224cfda0763ba16a7257cf9f269b5401ce4 | acf7457d3a799cb9bff12686d2d616688bcd4b5b | /packages/python/plotly/plotly/graph_objs/layout/template/data/_contourcarpet.py | 6240faf510053b8a9e83a7be012bd1afdabb3244 | [
"MIT"
] | permissive | plotly/plotly.py | f4f61639f08160f16195efc95b5901dc5a937346 | 975a704074f01c078e0fdfa32bdf17130bf89e69 | refs/heads/master | 2023-09-06T06:15:08.340035 | 2023-08-24T12:28:14 | 2023-08-24T12:28:14 | 14,579,099 | 14,751 | 2,989 | MIT | 2023-09-08T19:55:32 | 2013-11-21T05:53:08 | Python | UTF-8 | Python | false | false | 44 | py | _contourcarpet.py | from plotly.graph_objs import Contourcarpet
|
922405fbe1efdef625cf6569200a19c8c31d1436 | 26e3d85a3b61219e13f794289ff2b70baa248f14 | /material/frontend/models.py | aad537502f44554155abb3ea9f3c1f6a35a30652 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference",
"BSD-2-Clause"
] | permissive | viewflow/django-material | ac8dd10daa8352440845c767b07cafc7f7d09216 | 31b1ce5f6fecc10ba4c9babe4219fb7be97dbf93 | refs/heads/master | 2023-08-15T23:32:58.330321 | 2023-04-12T06:12:07 | 2023-04-12T06:12:40 | 29,337,344 | 2,818 | 570 | BSD-3-Clause | 2023-03-04T02:28:50 | 2015-01-16T07:17:33 | CSS | UTF-8 | Python | false | false | 1,357 | py | models.py | from django.db import models
from django.core.cache import cache
from django.dispatch import receiver
from django.db.models.signals import post_save
from ..compat import _
try:
from django.utils.encoding import python_2_unicode_compatible
except ImportError:
# django 3.0+
python_2_unicode_compatible = lamb... |
8996e989ebd1a0a1d14ad780d2e5157b67d0243a | 0760fb4901a75766921a205b55686d6d6f049b30 | /rllib/policy/sample_batch.py | 69953f040d8cf60ab030dd8a79a9b0f09aa4f4ed | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | ray-project/ray | a4bb6940b08b59a61ef0b8e755a52d8563a2f867 | edba68c3e7cf255d1d6479329f305adb7fa4c3ed | refs/heads/master | 2023-08-31T03:36:48.164405 | 2023-08-31T03:20:38 | 2023-08-31T03:20:38 | 71,932,349 | 29,482 | 5,669 | Apache-2.0 | 2023-09-14T21:48:14 | 2016-10-25T19:38:30 | Python | UTF-8 | Python | false | false | 69,297 | py | sample_batch.py | import collections
from functools import partial
import itertools
import sys
from numbers import Number
from typing import Dict, Iterator, Set, Union
from typing import List, Optional
import numpy as np
import tree # pip install dm_tree
from ray.rllib.utils.annotations import DeveloperAPI, ExperimentalAPI, PublicAPI... |
e19831e01db7395bb920847a5c1c723a440931e8 | ee87c715e5d937b0380ddb87d56e9ebc4877a02b | /sklearn/covariance/tests/test_graphical_lasso.py | 317bf2aa8512473d258d0c0ed193e5f3c6b81d0b | [
"BSD-3-Clause"
] | permissive | scikit-learn/scikit-learn | 27a2196f3173e0f32f7a5c5d652b70a6c57c7644 | 061f8777b48e5491b0c57bb8e0bc7067c103079d | refs/heads/main | 2023-08-18T15:32:59.764468 | 2023-08-18T14:39:08 | 2023-08-18T14:39:08 | 843,222 | 58,456 | 29,777 | BSD-3-Clause | 2023-09-14T19:08:34 | 2010-08-17T09:43:38 | Python | UTF-8 | Python | false | false | 9,995 | py | test_graphical_lasso.py | """ Test the graphical_lasso module.
"""
import sys
from io import StringIO
import numpy as np
import pytest
from numpy.testing import assert_allclose
from scipy import linalg
from sklearn import datasets
from sklearn.covariance import (
GraphicalLasso,
GraphicalLassoCV,
empirical_covariance,
graphica... |
80b845362dab04fd2ab38a0b3d8e1a5363e343c3 | 279f415dd1e06c594c6c87deda57e201c73c4542 | /test/espnet2/torch_utils/test_initialize.py | ae77d23fe65fd5773f3ab8346854eca70fb15c87 | [
"Apache-2.0"
] | permissive | espnet/espnet | f7ba47271c1a6b1ed606dbbfb04a7f14220bb585 | bcd20948db7846ee523443ef9fd78c7a1248c95e | refs/heads/master | 2023-08-28T23:43:34.238336 | 2023-08-23T02:51:39 | 2023-08-23T02:51:39 | 114,054,873 | 7,242 | 2,244 | Apache-2.0 | 2023-09-14T08:01:11 | 2017-12-13T00:45:11 | Python | UTF-8 | Python | false | false | 1,083 | py | test_initialize.py | import pytest
import torch
from espnet2.torch_utils.initialize import initialize
initialize_types = {}
class Model(torch.nn.Module):
def __init__(self):
super().__init__()
self.conv1 = torch.nn.Conv2d(2, 2, 3)
self.l1 = torch.nn.Linear(2, 2)
self.rnn_cell = torch.nn.LSTMCell(2, 2... |
5157a584bde37dae410548095adf72a657158946 | 1bc67a91d85a7106106ca31307ef9ee93f1d1a20 | /src/py/flwr_tool/protoc_test.py | 07e7dd833e9d4a65386c1bc452f107acf862f925 | [
"Apache-2.0"
] | permissive | adap/flower | 4915d143c674eb675504d585e1e90ed06833812f | 55be690535e5f3feb33c888c3e4a586b7bdbf489 | refs/heads/main | 2023-08-17T01:18:12.168723 | 2023-08-16T17:17:48 | 2023-08-16T17:17:48 | 241,095,326 | 2,999 | 658 | Apache-2.0 | 2023-09-14T15:43:22 | 2020-02-17T11:51:29 | Python | UTF-8 | Python | false | false | 1,106 | py | protoc_test.py | # Copyright 2020 Adap GmbH. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
aa604bd8a706b703519f9a4d68e01acd9de7027b | 29bd0e9b5bdef7e2b4ff79edda3be258d5bde63c | /xonsh/webconfig/tags.py | 5b1c454fdc988d8f01995a15a5c97e75ec98db83 | [
"BSD-2-Clause"
] | permissive | xonsh/xonsh | 4dec5e4c14a4a82f81277a89d8ab6091869fc29e | 60f0145ed893cb73bbfcf336c448238981010d41 | refs/heads/main | 2023-08-31T03:37:57.786839 | 2023-08-23T15:30:20 | 2023-08-23T15:30:20 | 29,620,400 | 6,374 | 684 | NOASSERTION | 2023-09-11T02:52:37 | 2015-01-21T22:05:27 | Python | UTF-8 | Python | false | false | 3,760 | py | tags.py | import logging
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Iterable
import xml.etree.ElementTree as etree
from functools import partial
class Elem(etree.Element):
def __init__(
self,
tag: "str",
*cls: str,
**kwargs: "str",
):
supe... |
36e9f9e3846a72e30a50302d910e7a71c52696a9 | 184b40438287d124117dcd48cf9abdab71e116c7 | /tests/unittests/test_mutate_and_test.py | 9422bb35390bb4ff9b8507f9bca214f3ada0a2e8 | [
"MIT"
] | permissive | sixty-north/cosmic-ray | 45bea97513eb75d00c514e0df2c5c3d156268f0f | aa63d36ef84659d941c22da9d4d39ae0408d488e | refs/heads/master | 2023-08-26T07:57:57.939516 | 2023-03-14T13:49:49 | 2023-03-14T13:49:49 | 34,157,278 | 569 | 77 | MIT | 2023-01-02T07:58:54 | 2015-04-18T07:44:21 | Python | UTF-8 | Python | false | false | 1,013 | py | test_mutate_and_test.py | "Tests for worker."
import asyncio
from pathlib import Path
from cosmic_ray.work_item import MutationSpec, WorkerOutcome, WorkResult
from cosmic_ray.mutating import mutate_and_test
def test_no_test_return_value(path_utils, data_dir):
with path_utils.excursion(data_dir):
result = asyncio.get_event_loop()... |
eaac62a7daa1986bca3454b2ab0ca4ace99a79e2 | 73a0f661f1423d63e86489d4b2673f0103698aab | /python/oneflow/test/exceptions/test_sparse_softmax_cross_entropy_op.py | f890d28b82a185bae7b5a5af2bfade6c92885625 | [
"Apache-2.0"
] | permissive | Oneflow-Inc/oneflow | 4fc3e081e45db0242a465c4330d8bcc8b21ee924 | 0aab78ea24d4b1c784c30c57d33ec69fe5605e4a | refs/heads/master | 2023-08-25T16:58:30.576596 | 2023-08-22T14:15:46 | 2023-08-22T14:15:46 | 81,634,683 | 5,495 | 786 | Apache-2.0 | 2023-09-14T09:44:31 | 2017-02-11T06:09:53 | C++ | UTF-8 | Python | false | false | 2,580 | py | test_sparse_softmax_cross_entropy_op.py | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... |
11b540635ee3a930d61b11b62c48d31e8ac7cd42 | e4c5238c86c8a114d49b7ba3ecc5ef9d5157e152 | /tests/test_state_props/test_is_separable.py | ad6289457912a1729612fdb09167f2468f5fd8ba | [
"MIT"
] | permissive | vprusso/toqito | 64a9963c02b73127836b76d886543a0642b93664 | 7e6869d783f98cb241579ea89e0f9ff61eff9d9b | refs/heads/master | 2023-07-22T17:08:18.392204 | 2023-07-19T07:27:37 | 2023-07-19T07:27:37 | 235,493,396 | 116 | 53 | MIT | 2023-09-12T13:35:38 | 2020-01-22T03:47:16 | Python | UTF-8 | Python | false | false | 3,502 | py | test_is_separable.py | """Test is_separable."""
import numpy as np
from toqito.state_props.is_separable import is_separable
from toqito.channels import partial_trace
from toqito.matrix_props import is_density
from toqito.states import basis, bell, isotropic, tile
from toqito.random import random_density_matrix
def test_non_positive_semide... |
35765824a8a5c67b805f3441020658fdc1d194c2 | 93316c24c36ddd7886dd13fac75e50b115ddbdde | /supar/structs/dist.py | 6ab594d4e4c72374122e66672529394f656d788e | [
"Python-2.0",
"MIT"
] | permissive | yzhangcs/parser | 6d5f44af454ac7de705344fd1242023b5eade13e | 831df043073d0fe919601feaba6a9a569a742c7f | refs/heads/main | 2023-08-31T08:40:13.716513 | 2023-08-31T06:26:52 | 2023-08-31T06:26:52 | 152,071,156 | 683 | 133 | MIT | 2022-10-01T03:58:12 | 2018-10-08T11:49:19 | Python | UTF-8 | Python | false | false | 4,332 | py | dist.py | # -*- coding: utf-8 -*-
from __future__ import annotations
from typing import Iterable, Union
import torch
import torch.autograd as autograd
from supar.structs.semiring import (CrossEntropySemiring, EntropySemiring,
KLDivergenceSemiring, KMaxSemiring,
... |
1faa92efd2659c7bb35a2fd40c4ccbf185ef2ae7 | 5a52ccea88f90dd4f1acc2819997fce0dd5ffb7d | /alipay/aop/api/response/AlipayCloudCloudbaseResourcepackageAlterQueryResponse.py | 1fd5cf482378a340eee3d724e37a127200b2dc1f | [
"Apache-2.0"
] | permissive | alipay/alipay-sdk-python-all | 8bd20882852ffeb70a6e929038bf88ff1d1eff1c | 1fad300587c9e7e099747305ba9077d4cd7afde9 | refs/heads/master | 2023-08-27T21:35:01.778771 | 2023-08-23T07:12:26 | 2023-08-23T07:12:26 | 133,338,689 | 247 | 70 | Apache-2.0 | 2023-04-25T04:54:02 | 2018-05-14T09:40:54 | Python | UTF-8 | Python | false | false | 1,516 | py | AlipayCloudCloudbaseResourcepackageAlterQueryResponse.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.ResourcePackageInfo import ResourcePackageInfo
class AlipayCloudCloudbaseResourcepackageAlterQueryResponse(AlipayResponse):
def __init__(self):
super(Ali... |
4bc6c246057b83736428218f6445940b26f5f0c1 | fbbe424559f64e9a94116a07eaaa555a01b0a7bb | /Sklearn_scipy_numpy/source/sklearn/datasets/tests/test_covtype.py | f32511d7c9aa85fd623213bd9c3553b1ed7f9d4d | [
"MIT"
] | 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 | 857 | py | test_covtype.py | """Test the covtype loader.
Skipped if covtype is not already downloaded to data_home.
"""
import errno
from sklearn.datasets import fetch_covtype
from sklearn.utils.testing import assert_equal, SkipTest
def fetch(*args, **kwargs):
return fetch_covtype(*args, download_if_missing=False, **kwargs)
def test_fetc... |
8709fc4de695a5fc11b1f337bb91040da6eafcd2 | 32809f6f425bf5665fc19de2bc929bacc3eeb469 | /src/1420-Build-Array-Where-You-Can-Find-The-Maximum-Exactly-K-Comparisons/1420.py | ff9495cca6c41e8139a833a58ee32b1433055c7a | [] | no_license | luliyucoordinate/Leetcode | 9f6bf01f79aa680e2dff11e73e4d10993467f113 | bcc04d49969654cb44f79218a7ef2fd5c1e5449a | refs/heads/master | 2023-05-25T04:58:45.046772 | 2023-05-24T11:57:20 | 2023-05-24T11:57:20 | 132,753,892 | 1,575 | 569 | null | 2023-05-24T11:57:22 | 2018-05-09T12:30:59 | C++ | UTF-8 | Python | false | false | 549 | py | 1420.py | class Solution:
def numOfArrays(self, n: int, m: int, k: int) -> int:
mod = 10**9 + 7
dp = [[[0] * (m + 1) for _ in range(k + 1)] for _ in range(n + 1)]
for c in range(m + 1):
dp[1][1][c] = c
for a in range(2, n + 1):
for b in range(1, k + 1):
... |
07f970a112af1fc3d0b42a554f208ba797e58cd4 | 5db0fab37c2b8a618d85d3b60fab9f806c416474 | /src/python/pants/backend/codegen/protobuf/python/register.py | 3211453c3909baa320c495d24e5de301a8414c8a | [
"Apache-2.0"
] | permissive | pantsbuild/pants | 4988d1ac5474ec95f94ce2218aeb759401e4b011 | 98cbda8545f0d58c586ed2daa76fefd729d5e0d5 | refs/heads/main | 2023-09-05T03:44:17.646899 | 2023-09-01T19:52:09 | 2023-09-01T19:52:09 | 7,209,075 | 2,708 | 593 | Apache-2.0 | 2023-09-14T19:33:33 | 2012-12-17T17:39:04 | Python | UTF-8 | Python | false | false | 1,405 | py | register.py | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""Generate Python sources from Protocol Buffers (Protobufs).
See https://www.pantsbuild.org/docs/protobuf.
"""
from pants.backend.codegen.protobuf import protobuf_dependency_inference
f... |
2c5aa631628f6656f5f74d69700380010870f203 | 22531d5431acb0630c600be31ae3e8a9954b252c | /dpkt/http.py | 19f7bc30427e31ad1f08d8aca56ee636188f7710 | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause"
] | permissive | kbandla/dpkt | f33cae70d587637fe46303ca9cd467ac1f2f0990 | 440447ae17afc83af9e8d0167e8f13a907d9b83b | refs/heads/master | 2023-08-18T08:58:41.459495 | 2023-01-27T16:44:52 | 2023-01-27T16:44:52 | 4,576,441 | 1,071 | 350 | NOASSERTION | 2023-09-09T15:21:08 | 2012-06-06T18:39:31 | Python | UTF-8 | Python | false | false | 22,114 | py | http.py | # $Id: http.py 86 2013-03-05 19:25:19Z andrewflnr@gmail.com $
# -*- coding: utf-8 -*-
"""Hypertext Transfer Protocol."""
from __future__ import print_function
from __future__ import absolute_import
from collections import OrderedDict
from . import dpkt
from .compat import BytesIO, iteritems
def parse_headers(f):
... |
1fa49b2371abd1020665a705f97a7313f00a77d9 | 5039cfbbee5cbf54c201ae13d191b299aeda08bc | /nanopore-human-transcriptome/scripts/mod.py | da1e5d3ccfb7fd97e4ffe2b47ba818d8fc58f864 | [
"CC-BY-4.0"
] | permissive | nanopore-wgs-consortium/NA12878 | f5a15241fcbdd2e9fa2ee190dd56e10ee3eb12c3 | f4c6bd99be07468f9de590dedc1db68d3ea17de7 | refs/heads/master | 2022-11-28T14:41:59.145117 | 2021-09-06T17:07:14 | 2021-09-06T17:07:14 | 75,269,921 | 379 | 104 | NOASSERTION | 2022-11-22T03:14:06 | 2016-12-01T08:06:47 | Python | UTF-8 | Python | false | false | 2,341 | py | mod.py | """
By: Roham Razaghi (rrazagh1@jhu.edu)
"""
import numpy as np
from pybiomart import Dataset
import pandas as pd
# input files
isoform_file = open('/dilithium/Data/Nanopore/rna/isoforms/nvrna.180828.180927.read.isoform.map.nodup.txt')
evalign_file = open('/dilithium/Data/Nanopore/rna/evalign/180716_dRNAall.mq5_GGACU... |
ab0f4dca8b46039943f31f23f8ad4c3fbff36edd | 54292bb222c6525217458e92ddacfc4e2635b83e | /tools/python/allcheck.py | e0a5b43c0890b7a9a73c358cba4882ae7a10eb62 | [
"Apache-2.0"
] | permissive | daviddrysdale/python-phonenumbers | 0d69b48033d1464c0a6c358274062f1db2ee8c4a | 2f06ef6db2ca83f3856fbb8019a0c665f5971b13 | refs/heads/dev | 2023-08-31T09:37:20.570690 | 2023-08-22T05:18:22 | 2023-08-22T05:18:22 | 1,643,611 | 2,944 | 406 | Apache-2.0 | 2023-08-08T06:49:07 | 2011-04-21T03:06:38 | Python | UTF-8 | Python | false | false | 1,933 | py | allcheck.py | #!/usr/bin/env python
import sys
import re
import glob
# Use the local code in preference to any pre-installed version
sys.path.insert(0, '../../python')
import phonenumbers
import phonenumbers.geocoder
import phonenumbers.carrier
import phonenumbers.timezone
from phonenumbers.util import prnt
# Manually grep for to... |
92a2dd073ca282268bfad5217aa9b9d19b4a1279 | b04cc98a746d1df457183bc14908094a8be00ba1 | /tests/test_client_connect.py | abf637ddf26925f15e7abc6df494f84530618037 | [
"Apache-2.0"
] | permissive | PaddlePaddle/PaddleSlim | a3bcaef0c92016b7f6946d58787f87c7db8ff3f8 | bb02b103a89a09635941bc0bbbd38506d7412468 | refs/heads/develop | 2023-08-31T01:47:27.824722 | 2023-08-25T08:06:08 | 2023-08-25T08:06:08 | 228,290,594 | 1,534 | 402 | Apache-2.0 | 2023-08-29T09:37:55 | 2019-12-16T02:56:50 | Python | UTF-8 | Python | false | false | 2,735 | py | test_client_connect.py | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... |
25a26af1154199180e550832123e68f39496977b | d6c306567c2293c9e093edb1823e731db005bb04 | /deslib/dcs/lca.py | 5e0d90f3562a35b97d4b7e9d78ba69f8a1f26eda | [
"BSD-3-Clause"
] | permissive | scikit-learn-contrib/DESlib | 96036c36842d0f2194a0e4a9dad321ae2d4cf856 | 90c2eadc33333469b4826ec8ac4118f3e3b713f6 | refs/heads/master | 2023-08-10T20:54:48.013884 | 2023-06-18T21:56:30 | 2023-06-18T21:56:30 | 113,624,260 | 370 | 68 | BSD-3-Clause | 2023-06-18T21:56:31 | 2017-12-08T22:49:49 | Python | UTF-8 | Python | false | false | 8,422 | py | lca.py | # coding=utf-8
# Author: Rafael Menelau Oliveira e Cruz <rafaelmenelau@gmail.com>
#
# License: BSD 3 clause
import numpy as np
from deslib.dcs.base import BaseDCS
class LCA(BaseDCS):
"""Local Class Accuracy (LCA).
Evaluates the competence level of each individual classifiers and
select the most compet... |
95c39343605d27fce025316b71b874fe166656d3 | a9fdace9236af6c73133fd8dddb80843697efc7d | /catalyst/callbacks/mixup.py | 94e084bac4963e4d3a2f0e56926f254180f29a47 | [
"Apache-2.0"
] | permissive | catalyst-team/catalyst | 026c38f26dad471cd77347adbc13423b156a5d8b | e99f90655d0efcf22559a46e928f0f98c9807ebf | refs/heads/master | 2023-08-26T23:12:49.277005 | 2022-04-29T04:19:24 | 2022-04-29T04:19:24 | 145,385,156 | 3,038 | 487 | Apache-2.0 | 2023-08-12T03:40:14 | 2018-08-20T07:56:13 | Python | UTF-8 | Python | false | false | 5,899 | py | mixup.py | from typing import List, Union
from catalyst.core.callback import Callback, CallbackOrder
from catalyst.core.runner import IRunner
from catalyst.utils.torch import mixup_batch
class MixupCallback(Callback):
"""
Callback to do mixup augmentation. More details about mixin can be found in the paper
`mixup: ... |
3966791c4b99f6f88ee09f0c7418cf435ac6e8a3 | 84ecf73288879a396d1ff67e5779e07fadde80fb | /projects/mmdet3d_plugin/uniad/dense_heads/motion_head_plugin/__init__.py | 79b6df5daded235da9dfb8d529641c932765475a | [
"Apache-2.0"
] | permissive | OpenDriveLab/UniAD | 1ef9d2203ad35bbf8e1eb1a305d409817d90b888 | 2f38ff1357d3956af11c5609d5275db56c559c20 | refs/heads/main | 2023-08-09T05:28:26.497452 | 2023-08-07T07:27:30 | 2023-08-07T07:27:30 | 575,306,900 | 2,156 | 233 | Apache-2.0 | 2023-08-29T02:44:05 | 2022-12-07T08:05:49 | Python | UTF-8 | Python | false | false | 225 | py | __init__.py | from .motion_optimization import MotionNonlinearSmoother
from .modules import MotionTransformerDecoder
from .motion_deformable_attn import MotionTransformerAttentionLayer, MotionDeformableAttention
from .motion_utils import * |
096e88c430827e80ba3d7f7ae95753dc5a3f15c7 | 1b32a80362ce9c2d8f0eb1948637c6599d85aa99 | /torchlayers/_dev_utils/__init__.py | f3634fa1f7a4561469db267d26f3a48142ad0a1a | [
"MIT"
] | permissive | szymonmaszke/torchlayers | 4492c628a49f4db30a76a17b5d38591a85109964 | 1eff7c55fdb3733e0acc180be79354ed35e4167c | refs/heads/master | 2022-07-06T18:02:48.567112 | 2021-05-25T13:58:50 | 2022-06-13T19:09:28 | 201,987,932 | 599 | 47 | MIT | 2022-06-13T19:09:29 | 2019-08-12T18:35:56 | Python | UTF-8 | Python | false | false | 20 | py | __init__.py | from . import infer
|
94f6b226ed12b15947bf5ba2c614e0f4b7d29c0f | bdaa910baf85fba41e44849d4037d9940e03e4f6 | /popmon/analysis/profiling/hist_profiler.py | b067bdd85555b9af240899a7e0781a98918ec591 | [
"LicenseRef-scancode-free-unknown",
"MIT",
"Apache-2.0",
"LicenseRef-scancode-proprietary-license"
] | permissive | ing-bank/popmon | 428693596663405e2e3a290d4ae6afa96762b088 | ac79d212a519368d01525950142e0a282f5287c3 | refs/heads/master | 2023-08-08T03:06:42.714926 | 2023-07-18T10:21:06 | 2023-07-18T10:24:07 | 258,180,016 | 463 | 38 | MIT | 2023-07-18T10:05:37 | 2020-04-23T11:21:14 | Python | UTF-8 | Python | false | false | 8,254 | py | hist_profiler.py | # Copyright (c) 2023 ING Analytics Wholesale Banking
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, mer... |
6b5dd45bb0b6a2137dc60915f8e0c5eeec903854 | a5653f0dd8e382c6df2ca0e83d324c6e1d94c2d0 | /AppiumLibrary/locators/__init__.py | 6542a3733792e78f4b51395bb62e15ad0cf160c7 | [
"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 | 109 | py | __init__.py | # -*- coding: utf-8 -*-
from .elementfinder import ElementFinder
__all__ = [
"ElementFinder",
]
|
07e7ade9bc807d7ec9b34eeae858cf1455e6896c | cb4f118412a55c52d720bc79e4074606622920ac | /arcade/experimental/geo_culling_check.py | b7d9fabc9282d9095d0f87423e473f88fcc23a43 | [
"MIT"
] | permissive | pythonarcade/arcade | 3e536306f0c44f911de149b58958d8b609ffad4b | 908664efc256697d3098a347f63d217d97841782 | refs/heads/development | 2023-08-29T02:53:01.599145 | 2023-08-26T16:54:34 | 2023-08-26T16:54:34 | 49,003,082 | 786 | 215 | NOASSERTION | 2023-09-12T18:38:54 | 2016-01-04T14:46:52 | Python | UTF-8 | Python | false | false | 1,673 | py | geo_culling_check.py | """
An experiment trying to bug out the geometry shader sprite culling.
If the culling algorithm is wrong sprites can disappear before they
leave the screen.
Simply run the program and move draw the sprites around using the mouse.
"""
from __future__ import annotations
from arcade.sprite import Sprite
import PIL
imp... |
6ddacbcd39e28ef1c85a9d2aab4c47f91a33feb6 | 52a32a93942b7923b7c0c6ca5a4d5930bbba384b | /dojo/tools/sonarqube/parser.py | d05c70d040b67592b34ba227e4d8ec1355a35c05 | [
"MIT-open-group",
"GCC-exception-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-free-unknown",
"LGPL-3.0-only",
"GPL-3.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-3.0-or-later",
"IJG",
"Zlib",
"LicenseRef-scancode-proprietary-license",
"PSF-2.0",
"LicenseRef-scancode-python-cwi... | permissive | DefectDojo/django-DefectDojo | 43bfb1c728451335661dadc741be732a50cd2a12 | b98093dcb966ffe972f8719337de2209bf3989ec | refs/heads/master | 2023-08-21T13:42:07.238370 | 2023-08-14T18:00:34 | 2023-08-14T18:00:34 | 31,028,375 | 2,719 | 1,666 | BSD-3-Clause | 2023-09-14T19:46:49 | 2015-02-19T17:53:47 | HTML | UTF-8 | Python | false | false | 9,664 | py | parser.py | import logging
import re
from django.utils.html import strip_tags
from lxml import etree
from dojo.models import Finding
logger = logging.getLogger(__name__)
class SonarQubeParser(object):
mode = None
def set_mode(self, mode):
self.mode = mode
def get_scan_types(self):
return ["SonarQ... |
0051cf3be124d1ee1dc79fe88753aad7716b59dc | a3d6556180e74af7b555f8d47d3fea55b94bcbda | /third_party/logilab/logilab/common/__pkginfo__.py | 55a2cc37e19a2da7369629921f6ffdbb699ae679 | [
"GPL-2.0-only",
"GPL-1.0-or-later",
"MIT",
"LGPL-2.0-or-later",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | chromium/chromium | aaa9eda10115b50b0616d2f1aed5ef35d1d779d6 | a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c | refs/heads/main | 2023-08-24T00:35:12.585945 | 2023-08-23T22:01:11 | 2023-08-23T22:01:11 | 120,360,765 | 17,408 | 7,102 | BSD-3-Clause | 2023-09-10T23:44:27 | 2018-02-05T20:55:32 | null | UTF-8 | Python | false | false | 1,945 | py | __pkginfo__.py | # copyright 2003-2014 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... |
ed08efd6498666c40c1050625bc3400210941436 | 97714d8e2b019d0b68be75ea9aaf1cba374a7ef2 | /medallion/views/manifest.py | 3536790427733f984285add1d6f510cd2b9c9a9a | [
"BSD-3-Clause",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | oasis-open/cti-taxii-server | ae96521d20ca10c27521d9664998ce17bba05b85 | 39e76bf18be5371e9570de7e5f340c3937b69c0d | refs/heads/master | 2023-07-24T04:26:32.451890 | 2023-06-06T18:01:41 | 2023-06-06T18:01:41 | 99,020,025 | 101 | 83 | BSD-3-Clause | 2023-07-11T13:35:38 | 2017-08-01T16:08:09 | Python | UTF-8 | Python | false | false | 1,610 | py | manifest.py | from flask import Blueprint, Response, current_app, json, request
from . import MEDIA_TYPE_TAXII_V21, validate_version_parameter_in_accept_header
from .. import auth
from .discovery import api_root_exists
from .objects import (
collection_exists, permission_to_read, validate_limit_parameter
)
manifest_bp = Bluepr... |
69dd2e3176a59d4ce068c11633ba6f2d70f452c2 | 6189f34eff2831e3e727cd7c5e43bc5b591adffc | /WebMirror/management/rss_parser_funcs/feed_parse_extractJeruTzsBlog.py | 919d771b5c2159c276e184bd2bd44efecccb8e84 | [
"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 | 409 | py | feed_parse_extractJeruTzsBlog.py | def extractJeruTzsBlog(item):
"""
JeruTz's Blog
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol or frag) or 'preview' in item['title'].lower():
return None
if 'Vandread' in item['tags'] and 'Extra Stage' in item['tags']:
return buildReleaseMessageWithType(it... |
32b05e6fae1299c8307a9892253d599697a691b3 | 9ed3b16b3da72e4c47a04f2f2e3ef395e9fd9f20 | /main/xdg-desktop-portal-gnome/template.py | 0e8618e35693c49267f440ef86e82e45ef782f9a | [
"BSD-2-Clause"
] | permissive | chimera-linux/cports | fdae59dc25856942be3041e10e3533dbf8f883c3 | 714680161cd719dd047452c95fbb9b447bc23a86 | refs/heads/master | 2023-09-03T19:30:40.720670 | 2023-09-03T15:07:40 | 2023-09-03T15:07:40 | 374,000,317 | 118 | 37 | BSD-2-Clause | 2023-09-14T20:31:08 | 2021-06-05T02:07:34 | Python | UTF-8 | Python | false | false | 924 | py | template.py | pkgname = "xdg-desktop-portal-gnome"
pkgver = "44.2"
pkgrel = 0
build_style = "meson"
configure_args = ["-Dsystemduserunitdir=/tmp/delete_me"]
hostmakedepends = ["meson", "pkgconf", "gettext", "glib-devel"]
makedepends = [
"xdg-desktop-portal-devel",
"libadwaita-devel",
"gsettings-desktop-schemas-devel",
... |
b4961935559a738faa13ee391629cf919b82b564 | 48d1002394d233cf5932c7ef69300400af79118a | /kivy/lib/__init__.py | f99c263eb6022d61576501efd192a3606eff55c9 | [
"LGPL-2.1-only",
"MIT",
"Apache-2.0"
] | permissive | kivy/kivy | ba2668bffe4e125fd1c5aace54f671343802850e | ca1b918c656f23e401707388f25f4a63d9b8ae7d | refs/heads/master | 2023-09-04T02:27:05.311875 | 2023-08-26T08:00:20 | 2023-08-26T08:00:20 | 1,049,095 | 16,076 | 4,161 | MIT | 2023-09-09T07:55:18 | 2010-11-03T20:27:32 | Python | UTF-8 | Python | false | false | 699 | py | __init__.py | '''
External libraries
==================
Kivy comes with other python/C libraries:
* :mod:`~kivy.lib.ddsfile` - used for parsing and saving
`DDS <https://en.wikipedia.org/wiki/DirectDraw_Surface>`_ files.
* :mod:`~kivy.lib.osc` - a modified/optimized version of PyOSC for using
the `Open Sound Control <https://en... |
cd5f690c4eb27f70357fe68dddd0af9e4174fdd7 | 72dcf0dc76ded35dfd7fa0561f26c4b165e6ed83 | /vpython/qtbrowser.py | 5a293b5e78c991dc9a8baba0868f29789618b1ee | [
"MIT"
] | permissive | vpython/vpython-jupyter | 69e6029b461d6eadb36670545e35a8719a5d033e | 55aab58357a4ecbd1a6daced50bf548b859d3603 | refs/heads/master | 2023-06-23T01:55:38.455580 | 2023-06-08T23:22:32 | 2023-06-08T23:22:32 | 187,905,226 | 127 | 64 | MIT | 2023-06-08T23:22:33 | 2019-05-21T20:01:34 | Python | UTF-8 | Python | false | false | 579 | py | qtbrowser.py | import sys
import PyQt5.QtCore
import PyQt5.QtWebEngineWidgets
from PyQt5.QtWidgets import QApplication
if len(sys.argv) > 1:
if sys.argv[1]:
app = QApplication(sys.argv)
web = PyQt5.QtWebEngineWidgets.QWebEngineView()
web.load(PyQt5.QtCore.QUrl(sys.argv[1]))
web.show()
... |
248202decb18c87d9246a582795018b7fc3b3d98 | 12fa6ac5fb9472acbe2eb1871d3bfaa893940335 | /intermediate_source/spatial_transformer_tutorial.py | 49b6b0f0a2b60a74bcf25c318e919ddef9b30956 | [
"BSD-3-Clause"
] | permissive | pytorch/tutorials | e6670dc301fd48edbca5a554df2af44e016712c7 | 32d834139b8627eeacb5fb2862be9f095fcb0b52 | refs/heads/main | 2023-08-31T19:27:17.448171 | 2023-08-28T15:45:25 | 2023-08-28T15:45:25 | 69,709,572 | 7,919 | 4,731 | BSD-3-Clause | 2023-09-14T17:25:49 | 2016-09-30T23:48:36 | Python | UTF-8 | Python | false | false | 8,560 | py | spatial_transformer_tutorial.py | # -*- coding: utf-8 -*-
"""
Spatial Transformer Networks Tutorial
=====================================
**Author**: `Ghassen HAMROUNI <https://github.com/GHamrouni>`_
.. figure:: /_static/img/stn/FSeq.png
In this tutorial, you will learn how to augment your network using
a visual attention mechanism called spatial tr... |
eea70bc887ea6241656ff760c5123faa58e12adf | f411bc79eabd7ed1ef6694ca14860a9cce78ac2e | /src/mstodo/handlers/due.py | edf196c1fde0d42a42f3b907d1a4b353d02e4688 | [
"MIT"
] | permissive | johandebeurs/alfred-mstodo-workflow | f9c1056a0902d6e219096f2156a39687fc483023 | 80aa4e0fdd54977abbd0278b221ddfdf94c9ddb7 | refs/heads/master | 2023-07-09T20:27:42.692927 | 2023-06-08T15:36:33 | 2023-06-08T15:36:33 | 247,481,243 | 125 | 5 | MIT | 2023-06-08T15:42:45 | 2020-03-15T14:21:58 | Python | UTF-8 | Python | false | false | 4,598 | py | due.py | # encoding: utf-8
from datetime import datetime, timedelta
import logging
from peewee import JOIN, OperationalError
from mstodo import icons
from mstodo.models.taskfolder import TaskFolder
from mstodo.models.preferences import Preferences
from mstodo.models.task import Task
from mstodo.sync import background_sync, b... |
bc657269b8abe459521a879eeb75bc5809f845b9 | 74965e70e72ec9f198c2b63120a368ead1e6c113 | /neurokit2/misc/find_outliers.py | fb0d22a89c587a391d38cffa3a5accbfb45cd458 | [
"MIT"
] | permissive | neuropsychology/NeuroKit | ceef2128296431d417bffee9a5dc177bd7b345f0 | 366583e1e22a4ea06a18e5e162675c2a33334a19 | refs/heads/master | 2023-08-24T02:33:31.035399 | 2023-07-09T07:03:43 | 2023-07-09T07:03:43 | 218,212,111 | 1,120 | 358 | MIT | 2023-09-12T10:11:39 | 2019-10-29T05:39:37 | Python | UTF-8 | Python | false | false | 4,051 | py | find_outliers.py | import numpy as np
import scipy
from ..stats import standardize
def find_outliers(data, exclude=2, side="both", method="sd", **kwargs):
"""**Identify outliers (abnormal values)**
Extreme values identification using different methods, such as:
* **sd**: Data is :func:`standardized <.standardize>`, i.e.,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.