hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
210d85a394f9d7068ffcd10a5dd5f0fb35002e9a | 3,838 | py | Python | conductor/conductor/tests/unit/reservation/test_service.py | aalsudais/optf-has | c3e070b6ebc713a571c10d7a5cd87e5053047136 | [
"Apache-2.0"
] | null | null | null | conductor/conductor/tests/unit/reservation/test_service.py | aalsudais/optf-has | c3e070b6ebc713a571c10d7a5cd87e5053047136 | [
"Apache-2.0"
] | null | null | null | conductor/conductor/tests/unit/reservation/test_service.py | aalsudais/optf-has | c3e070b6ebc713a571c10d7a5cd87e5053047136 | [
"Apache-2.0"
] | null | null | null | #
# -------------------------------------------------------------------------
# Copyright (C) 2019 IBM.
#
# 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... | 36.207547 | 98 | 0.677436 |
be5f7b39c404e30215d3bc5ebdd00529b0627116 | 3,980 | py | Python | alipay/aop/api/request/AlipayOpenMiniBrandBundleQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOpenMiniBrandBundleQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOpenMiniBrandBundleQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenMiniBrandBundleQueryModel import AlipayOpenMiniBrandBundleQueryModel
class AlipayOpenMiniBrandBundleQueryRequest(object):
... | 27.448276 | 148 | 0.645226 |
595ffc816af5dce75a958bfa2cf057f827065d8f | 89 | py | Python | csm_test_utils/autoscaling/__init__.py | opentelekomcloud-infra/csm-test-utils | ec3c4a6bf4d4806e76d0d8dfcfe024c39c9a0e36 | [
"Apache-2.0"
] | 1 | 2021-02-08T08:53:01.000Z | 2021-02-08T08:53:01.000Z | csm_test_utils/autoscaling/__init__.py | opentelekomcloud-infra/csm-test-utils | ec3c4a6bf4d4806e76d0d8dfcfe024c39c9a0e36 | [
"Apache-2.0"
] | 22 | 2019-10-21T15:10:14.000Z | 2021-04-07T07:27:20.000Z | csm_test_utils/autoscaling/__init__.py | opentelekomcloud-infra/csm-test-utils | ec3c4a6bf4d4806e76d0d8dfcfe024c39c9a0e36 | [
"Apache-2.0"
] | 1 | 2021-02-08T08:53:07.000Z | 2021-02-08T08:53:07.000Z | from .loadbalancer import main as as_lb_main
from .smn_webhook import main as as_wh_main
| 29.666667 | 44 | 0.842697 |
04fe4fdc12825d2defc0d3981fff1b0b741f92bc | 803 | py | Python | fichas/tests/test_login_required.py | reciproco/delma | ec20f8b1a7673279643f990a75f73bbdc806927a | [
"MIT"
] | null | null | null | fichas/tests/test_login_required.py | reciproco/delma | ec20f8b1a7673279643f990a75f73bbdc806927a | [
"MIT"
] | null | null | null | fichas/tests/test_login_required.py | reciproco/delma | ec20f8b1a7673279643f990a75f73bbdc806927a | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.test import Client
class SimpleTest(TestCase):
def setUp(self):
# Every test needs a client.
self.client = Client()
def test_auth_base_endpoint(self):
response = self.client.get('/fichas/')
self.assertEqual(response.status_code, 302)... | 30.884615 | 88 | 0.696139 |
357f57dbe3c93ff47bfc728ed76ced36f395abc9 | 20,480 | py | Python | mne_bids/config.py | dominikwelke/mne-bids | fa7a94bb0ef03691aa881f39c90b23a7aa69a923 | [
"BSD-3-Clause"
] | null | null | null | mne_bids/config.py | dominikwelke/mne-bids | fa7a94bb0ef03691aa881f39c90b23a7aa69a923 | [
"BSD-3-Clause"
] | null | null | null | mne_bids/config.py | dominikwelke/mne-bids | fa7a94bb0ef03691aa881f39c90b23a7aa69a923 | [
"BSD-3-Clause"
] | null | null | null | """Configuration values for MNE-BIDS."""
from mne import io
from mne.io.constants import FIFF
BIDS_VERSION = "1.7.0"
DOI = """https://doi.org/10.21105/joss.01896"""
EPHY_ALLOWED_DATATYPES = ['meg', 'eeg', 'ieeg', 'nirs']
ALLOWED_DATATYPES = EPHY_ALLOWED_DATATYPES + ['anat', 'beh']
MEG_CONVERT_FORMATS = ['FIF', 'a... | 37.925926 | 134 | 0.606641 |
de1b8bb2f96d92dcd4b91789c4f365c0f65afd53 | 60,617 | py | Python | bluesky_queueserver/manager/manager.py | gwbischof/bluesky-queueserver | 2a84c019b38f94035f9b069fb2e9c70b7b4c49d4 | [
"BSD-3-Clause"
] | null | null | null | bluesky_queueserver/manager/manager.py | gwbischof/bluesky-queueserver | 2a84c019b38f94035f9b069fb2e9c70b7b4c49d4 | [
"BSD-3-Clause"
] | null | null | null | bluesky_queueserver/manager/manager.py | gwbischof/bluesky-queueserver | 2a84c019b38f94035f9b069fb2e9c70b7b4c49d4 | [
"BSD-3-Clause"
] | null | null | null | import asyncio
import zmq
import zmq.asyncio
from multiprocessing import Process
import time as ttime
import pprint
import enum
import uuid
from .comms import PipeJsonRpcSendAsync, CommTimeoutError
from .profile_ops import load_allowed_plans_and_devices, validate_plan
from .plan_queue_ops import PlanQueueOperations
... | 41.8915 | 112 | 0.602752 |
ff534fb926c388a1f6049acd66fc7f361723ffd5 | 1,642 | bzl | Python | third_party/upb/benchmarks/build_defs.bzl | thiagoss/grpc | 3eb743ba4c9e38941aeac3a54420628b46335d20 | [
"Apache-2.0"
] | 119 | 2015-01-05T07:12:24.000Z | 2022-01-30T13:25:46.000Z | third_party/upb/benchmarks/build_defs.bzl | thiagoss/grpc | 3eb743ba4c9e38941aeac3a54420628b46335d20 | [
"Apache-2.0"
] | 54 | 2020-06-23T17:34:04.000Z | 2022-03-31T02:04:06.000Z | third_party/upb/benchmarks/build_defs.bzl | thiagoss/grpc | 3eb743ba4c9e38941aeac3a54420628b46335d20 | [
"Apache-2.0"
] | 16 | 2015-01-30T07:26:53.000Z | 2017-08-15T10:08:16.000Z |
# copybara:insert_for_google3_begin
# load("//tools/build_defs/proto/cpp:cc_proto_library.bzl", _cc_proto_library="cc_proto_library")
# copybara:insert_end
# copybara:strip_for_google3_begin
_cc_proto_library = native.cc_proto_library
# copybara:strip_end
def proto_library(**kwargs):
native.proto_library(
... | 25.65625 | 101 | 0.579781 |
84cbd712a2f61d95e5d221f9954483fad5e1ca31 | 1,476 | py | Python | domains/fetch/problems/auto_AIJ/problem1083_CR.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2021-09-28T12:56:56.000Z | 2021-09-28T12:56:56.000Z | domains/fetch/problems/auto_AIJ/problem1083_CR.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | null | null | null | domains/fetch/problems/auto_AIJ/problem1083_CR.py | patras91/rae_release | 0e5faffb7eb732fdb8e3bbf2c6d2f2cbd520aa30 | [
"BSD-3-Clause"
] | 1 | 2022-03-31T16:30:39.000Z | 2022-03-31T16:30:39.000Z | # uncompyle6 version 3.3.1
# Python bytecode 3.6 (3379)
# Decompiled from: Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06)
# [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
# Embedded file name: ../../shared/problems/CR/problem1083_CR.py
# Compiled at: 2019-03-13 18:01:49
# Size of source mod 2**32: 1148 bytes
__a... | 27.849057 | 116 | 0.567073 |
131a6c83adfbae64ef1e5db189a7c6d58169b2e3 | 18,953 | py | Python | extern/xml2rfc-2.22.3-patched/xml2rfc/utils.py | ssbc/ssb-spec-drafts | 04d6324042d5c8d5191b1591082c38ef8d57c4d0 | [
"MIT"
] | 14 | 2019-07-26T12:42:44.000Z | 2021-06-22T06:38:39.000Z | extern/xml2rfc-2.22.3-patched/xml2rfc/utils.py | ssbc/ssb-spec-drafts | 04d6324042d5c8d5191b1591082c38ef8d57c4d0 | [
"MIT"
] | 3 | 2019-08-06T16:54:37.000Z | 2020-05-16T05:27:41.000Z | extern/xml2rfc-2.22.3-patched/xml2rfc/utils.py | ssbc/ssb-spec-drafts | 04d6324042d5c8d5191b1591082c38ef8d57c4d0 | [
"MIT"
] | null | null | null | # Copyright The IETF Trust 2018, All Rights Reserved
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, division
# Internal utitlity functions. Not meant for public usage.
import base64
import re
import six
import textwrap
from lxml.etree import _Comment
if six.PY2:
from urllib im... | 31.907407 | 153 | 0.511212 |
15adec02e1eee68c1e13e123bc2423d81dcfc537 | 2,439 | py | Python | message-api-schema-validator/tests/body/test_thesis_dissertation.py | JiscSD/rdss-message-api-specification | 4a151836d10a4d29b9f87cd4b3e8872c32a2022b | [
"Apache-2.0"
] | 1 | 2021-03-20T09:50:47.000Z | 2021-03-20T09:50:47.000Z | message-api-schema-validator/tests/body/test_thesis_dissertation.py | JiscRDSS/rdss-message-api-specification | 4a151836d10a4d29b9f87cd4b3e8872c32a2022b | [
"Apache-2.0"
] | 20 | 2018-01-08T16:16:24.000Z | 2019-07-08T02:25:41.000Z | message-api-schema-validator/tests/body/test_thesis_dissertation.py | JiscSD/rdss-message-api-specification | 4a151836d10a4d29b9f87cd4b3e8872c32a2022b | [
"Apache-2.0"
] | 2 | 2018-01-08T20:10:13.000Z | 2018-07-06T12:02:33.000Z | from ..test_helpers import load_json, valid_file_against_schema, invalid_file_against_schema, invalid_against_schema
def test_thesis_dissertation_is_valid():
valid_file_against_schema(
'https://www.jisc.ac.uk/rdss/schema/thesis_dissertation.json/#/definitions/ThesisDissertation',
'../messages/body... | 41.338983 | 116 | 0.760968 |
74ee82a062c255de9a948b33be36bd94c828346a | 9,821 | py | Python | tensorflow/contrib/lite/python/interpreter.py | siju-samuel/tensorflow | 0ac663d9a78ab2c630173fd7b0cc63fedf1526e2 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/lite/python/interpreter.py | siju-samuel/tensorflow | 0ac663d9a78ab2c630173fd7b0cc63fedf1526e2 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/lite/python/interpreter.py | siju-samuel/tensorflow | 0ac663d9a78ab2c630173fd7b0cc63fedf1526e2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 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... | 34.950178 | 80 | 0.701354 |
1f810688ee8ed1a402b2cd5955287ede707956aa | 357 | py | Python | configs/psanet/psanet_r50-d8_769x769_80k_cityscapes.py | Xlinford/mmsegmentation | 8b444de5e6db2af2538a73a93ac75204f5c3bb2f | [
"Apache-2.0"
] | null | null | null | configs/psanet/psanet_r50-d8_769x769_80k_cityscapes.py | Xlinford/mmsegmentation | 8b444de5e6db2af2538a73a93ac75204f5c3bb2f | [
"Apache-2.0"
] | null | null | null | configs/psanet/psanet_r50-d8_769x769_80k_cityscapes.py | Xlinford/mmsegmentation | 8b444de5e6db2af2538a73a93ac75204f5c3bb2f | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/psanet_r50-d8.py',
'../_base_/datasets/cityscapes_769x769.py', '../_base_/default_runtime.py',
'../_base_/schedules/schedule_80k.py'
]
model = dict(
decode_head=dict(align_corners=True),
auxiliary_head=dict(align_corners=True))
test_cfg = dict(mode='slide', crop_... | 35.7 | 80 | 0.677871 |
a7d0063072b066b0c02df88c2b41b43bc20dc921 | 1,519 | py | Python | scripts/ci/errno.py | lviala-zaack/zephyr | bf3c6e7ba415dd85f1b68eb69ea2779b234c686f | [
"Apache-2.0"
] | 6,224 | 2016-06-24T20:04:19.000Z | 2022-03-31T20:33:45.000Z | scripts/ci/errno.py | Conexiotechnologies/zephyr | fde24ac1f25d09eb9722ce4edc6e2d3f844b5bce | [
"Apache-2.0"
] | 32,027 | 2017-03-24T00:02:32.000Z | 2022-03-31T23:45:53.000Z | scripts/ci/errno.py | Conexiotechnologies/zephyr | fde24ac1f25d09eb9722ce4edc6e2d3f844b5bce | [
"Apache-2.0"
] | 4,374 | 2016-08-11T07:28:47.000Z | 2022-03-31T14:44:59.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2021 Nordic Semiconductor NA
#
# SPDX-License-Identifier: Apache-2.0
"""Check minimal libc error numbers against newlib.
This script loads the errno.h included in Zephyr's minimal libc and checks its
contents against the SDK's newlib errno.h. This is done to ensure that both C... | 26.649123 | 78 | 0.615537 |
c805a381592a708fc6f8514332ec3cff543f496b | 12,839 | py | Python | dafne/evaluation/dota_evaluation.py | steven-lang/DAFNe | b13912041a263904cf26ca5f3468c6bc64ce800c | [
"MIT"
] | 35 | 2021-09-14T03:09:34.000Z | 2022-03-30T21:29:59.000Z | dafne/evaluation/dota_evaluation.py | steven-lang/DAFNe | b13912041a263904cf26ca5f3468c6bc64ce800c | [
"MIT"
] | 5 | 2021-11-28T07:49:36.000Z | 2022-03-25T10:40:46.000Z | dafne/evaluation/dota_evaluation.py | steven-lang/DAFNe | b13912041a263904cf26ca5f3468c6bc64ce800c | [
"MIT"
] | 10 | 2021-09-15T12:59:56.000Z | 2022-03-30T10:15:33.000Z | from detectron2.utils.visualizer import _create_text_labels
from detectron2.structures.masks import PolygonMasks
from detectron2.utils.colormap import colormap
from detectron2.evaluation.evaluator import DatasetEvaluator
from detectron2.structures import BoxMode, Instances, Boxes
import cv2
from detectron2.utils.visual... | 30.937349 | 124 | 0.617416 |
9220e52fdec7129f4feb6b70cdb6d08a7a29ce90 | 11,236 | py | Python | zaqar/storage/redis/subscriptions.py | mail2nsrajesh/zaqar | a68a03a228732050b33c2a7f35d1caa9f3467718 | [
"Apache-2.0"
] | null | null | null | zaqar/storage/redis/subscriptions.py | mail2nsrajesh/zaqar | a68a03a228732050b33c2a7f35d1caa9f3467718 | [
"Apache-2.0"
] | null | null | null | zaqar/storage/redis/subscriptions.py | mail2nsrajesh/zaqar | a68a03a228732050b33c2a7f35d1caa9f3467718 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Catalyst IT Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy
# of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 41.614815 | 79 | 0.562122 |
fc8be8136a9819ef708f8939bd238bd5f75efefb | 96 | py | Python | apps/filehash/apps.py | macdaliot/exist | 65244f79c602c5a00c3ea6a7eef512ce9c21e60a | [
"MIT"
] | 159 | 2019-03-15T10:46:19.000Z | 2022-03-12T09:19:31.000Z | apps/filehash/apps.py | macdaliot/exist | 65244f79c602c5a00c3ea6a7eef512ce9c21e60a | [
"MIT"
] | 6 | 2019-03-16T12:51:24.000Z | 2020-07-09T02:25:42.000Z | apps/filehash/apps.py | macdaliot/exist | 65244f79c602c5a00c3ea6a7eef512ce9c21e60a | [
"MIT"
] | 36 | 2019-03-16T10:37:14.000Z | 2021-11-14T21:04:18.000Z | from django.apps import AppConfig
class FilehashConfig(AppConfig):
name = 'apps.filehash'
| 16 | 33 | 0.760417 |
ce77671e1ed9509fc1cf1e351d822c72d9a4f584 | 44,301 | py | Python | airflow/providers/google/cloud/hooks/cloud_sql.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 2 | 2021-07-30T16:57:37.000Z | 2021-08-03T13:51:47.000Z | airflow/providers/google/cloud/hooks/cloud_sql.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 3 | 2022-02-15T06:40:37.000Z | 2022-02-28T01:47:43.000Z | airflow/providers/google/cloud/hooks/cloud_sql.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 1 | 2022-02-18T13:29:24.000Z | 2022-02-18T13:29:24.000Z | #
# 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... | 44.658266 | 108 | 0.65213 |
067349b1511cbaf06878d044484bb94b7949193d | 6,435 | py | Python | evaluation/analogy_dataset.py | arjun-sai-krishnan/tamil-morpho-embeddings | a33bcb427d635dba3b1857f26ea7ab287e1a44c5 | [
"MIT"
] | 2 | 2021-04-11T18:25:16.000Z | 2022-03-16T03:48:52.000Z | evaluation/analogy_dataset.py | arjun-sai-krishnan/tamil-morpho-embeddings | a33bcb427d635dba3b1857f26ea7ab287e1a44c5 | [
"MIT"
] | null | null | null | evaluation/analogy_dataset.py | arjun-sai-krishnan/tamil-morpho-embeddings | a33bcb427d635dba3b1857f26ea7ab287e1a44c5 | [
"MIT"
] | null | null | null | import numpy as np
# file template
# each row is "rel_id rel_type word1 word2"
# rel_type is 0 if not any subword information and any integer > 0 identifies the particular type of morphological relation
# filters out any words that aren't in the model vocabulary
def clean_dset(inpath, outpath, model):
filein = op... | 35.75 | 135 | 0.509557 |
7a590f290f1fbdd972b1b0ef28e0fafcafa2b17c | 685 | py | Python | convert-to-loom/convert-to-loom.py | mzager/dv-pipelines | 3356753cc56a5298bb075f12681f9282d8f08658 | [
"MIT"
] | 3 | 2020-02-24T21:08:11.000Z | 2020-05-19T18:26:01.000Z | convert-to-loom/convert-to-loom.py | mzager/dv-pipelines | 3356753cc56a5298bb075f12681f9282d8f08658 | [
"MIT"
] | null | null | null | convert-to-loom/convert-to-loom.py | mzager/dv-pipelines | 3356753cc56a5298bb075f12681f9282d8f08658 | [
"MIT"
] | 2 | 2020-01-04T00:23:07.000Z | 2020-02-26T17:54:34.000Z | #!/bin/python3
import sys
import os
import numpy as np
import pandas as pd
import scanpy.api as sc
import anndata
from anndata import AnnData
sc.settings.verbosity = 3 # verbosity: errors (0), warnings (1), info (2), hints (3)
working_dir = os.getcwd()
adata = sc.read(os.path.join(working_dir, 'gene_count_head.txt'... | 28.541667 | 89 | 0.740146 |
6ebb3d33f3a72784a47ed6d9e8962e5afda1a41d | 3,339 | py | Python | lib/scrapy/utils/request.py | langzeyu/book-crawler | e2d96648384658c7775bd02d94eab086c9ece677 | [
"MIT"
] | 5 | 2019-04-02T05:00:03.000Z | 2021-04-21T11:03:50.000Z | lib/scrapy/utils/request.py | langzeyu/book-crawler | e2d96648384658c7775bd02d94eab086c9ece677 | [
"MIT"
] | null | null | null | lib/scrapy/utils/request.py | langzeyu/book-crawler | e2d96648384658c7775bd02d94eab086c9ece677 | [
"MIT"
] | null | null | null | """
This module provides some useful functions for working with
scrapy.http.Request objects
"""
import hashlib
import weakref
from base64 import urlsafe_b64encode
from urlparse import urlunparse
from scrapy.utils.url import canonicalize_url
from scrapy.utils.httpobj import urlparse_cached
from scrapy.utils.http impor... | 37.516854 | 84 | 0.695717 |
428b422074a1dd2792b72615711b8b096c150f9b | 15,718 | py | Python | csr2cbioportal/csr2cbioportal.py | AlexJanse/python_csr2transmart | c01a76dfa6ecfa4248b274144092ccc6c31aab5a | [
"MIT"
] | 3 | 2019-06-26T12:50:38.000Z | 2020-02-16T17:19:45.000Z | csr2cbioportal/csr2cbioportal.py | AlexJanse/python_csr2transmart | c01a76dfa6ecfa4248b274144092ccc6c31aab5a | [
"MIT"
] | 46 | 2019-08-15T12:25:58.000Z | 2022-01-11T12:54:53.000Z | csr2cbioportal/csr2cbioportal.py | AlexJanse/python_csr2transmart | c01a76dfa6ecfa4248b274144092ccc6c31aab5a | [
"MIT"
] | 3 | 2019-10-30T12:41:58.000Z | 2021-11-08T13:06:32.000Z | #!/usr/bin/env python3
# Code to transform PMC processed data to cBioPortal staging files
# Author: Sander Tan, The Hyve
import csv
import errno
import gzip
import logging
import os
import shutil
import sys
import time
from typing import List, Set, Optional
import click
import pandas as pd
from csr.logging import se... | 44.780627 | 119 | 0.663889 |
020646ba175f32119285e0bff4ebda7ac4f8892c | 9,397 | py | Python | src/models/albert/AlbertForEigenmetricRegression.py | davidjurgens/prosocial-conversation-forecasting | 473496d59e37a78d6246bf0f8eba3571114e29d2 | [
"BSD-2-Clause"
] | 3 | 2021-05-03T02:22:08.000Z | 2021-11-03T17:50:30.000Z | src/models/albert/AlbertForEigenmetricRegression.py | davidjurgens/prosocial-conversation-forecasting | 473496d59e37a78d6246bf0f8eba3571114e29d2 | [
"BSD-2-Clause"
] | null | null | null | src/models/albert/AlbertForEigenmetricRegression.py | davidjurgens/prosocial-conversation-forecasting | 473496d59e37a78d6246bf0f8eba3571114e29d2 | [
"BSD-2-Clause"
] | null | null | null | import logging
from torch import nn
import torch
from collections import OrderedDict
from transformers import AlbertModel
from src.models import GENERIC_ID
from pathlib import Path
logger = logging.getLogger(__name__)
class AlbertForEigenmetricRegression(nn.Module):
def __init__(self,
num_labels... | 44.747619 | 119 | 0.648292 |
7f06deaf681364916f9309295ef38df4df0bff9e | 360 | py | Python | other/dingding/dingtalk/api/rest/OapiReportCommentListRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiReportCommentListRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiReportCommentListRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2020.06.19
'''
from dingtalk.api.base import RestApi
class OapiReportCommentListRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.offset = None
self.report_id = None
self.size = None
def getHttpMethod(self):
return 'POST'
def getapiname(self):
ret... | 21.176471 | 44 | 0.744444 |
c5bff7718dc72bff9fcca17cbceb0801be85c37b | 186,250 | py | Python | mac/v3.6.4/lib/python3.6/test/test_descr.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 25 | 2015-01-28T07:52:44.000Z | 2021-02-14T02:11:30.000Z | mac/v3.6.4/lib/python3.6/test/test_descr.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 3 | 2017-04-24T13:25:31.000Z | 2017-04-24T13:27:12.000Z | mac/v3.6.4/lib/python3.6/test/test_descr.py | evanmoran/python3-bazel | e6c5238e7c2bf290ae469ee1287de7af1dc4509a | [
"MIT"
] | 11 | 2015-01-12T14:50:00.000Z | 2021-08-18T00:48:02.000Z | import builtins
import copyreg
import gc
import itertools
import math
import pickle
import sys
import types
import unittest
import warnings
import weakref
from copy import deepcopy
from test import support
class OperatorsTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
unittest.TestCase.__i... | 34.155511 | 91 | 0.513965 |
05c321cac8f72b0d62c94999e9339d258dc1651f | 2,931 | py | Python | pelita/ui/tk_viewer.py | otizonaizit/pelita | 1c85f2ab34886928af8a6433b90eb02d320c25ef | [
"BSD-2-Clause"
] | null | null | null | pelita/ui/tk_viewer.py | otizonaizit/pelita | 1c85f2ab34886928af8a6433b90eb02d320c25ef | [
"BSD-2-Clause"
] | null | null | null | pelita/ui/tk_viewer.py | otizonaizit/pelita | 1c85f2ab34886928af8a6433b90eb02d320c25ef | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import Tkinter
import logging
from .tk_canvas import TkApplication
_logger = logging.getLogger("pelita.tk_viewer")
_logger.setLevel(logging.DEBUG)
class TkViewer(object):
""" Initialises Tk based viewer for the game.
The viewer may be passed to a GameMaster instance by calling::
... | 34.081395 | 81 | 0.651996 |
67431c699215e75a6227a17fc234b65be2cae3e9 | 2,185 | py | Python | package/FileLoop.py | dalton-lee/AutoUpdate | 5c0d03820bfa86a1b3829d9f6a211fcd00d70fed | [
"MIT"
] | 1 | 2016-09-26T15:48:06.000Z | 2016-09-26T15:48:06.000Z | package/FileLoop.py | dalton-lee/AutoUpdate | 5c0d03820bfa86a1b3829d9f6a211fcd00d70fed | [
"MIT"
] | null | null | null | package/FileLoop.py | dalton-lee/AutoUpdate | 5c0d03820bfa86a1b3829d9f6a211fcd00d70fed | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
import os
import json
import hashlib
def search(dir, allfile):
items = os.listdir(dir)
for file in items:
filename = getAbsPath(dir, file)
if isFile(filename):
cur = myfile()
cur.md5code = GetFileMd5(filename)
cur.filename... | 26.011905 | 71 | 0.583524 |
b5163151e3cd6b5b17755e7bf53b775b1a582e50 | 188 | py | Python | django_any_backend/backends/introspection.py | primal100/any_backend | 3616353f6fb5cb5b8366b804d8d2d60e5ae6644a | [
"BSD-3-Clause"
] | 25 | 2016-04-02T09:23:39.000Z | 2020-03-03T22:11:29.000Z | django_any_backend/backends/introspection.py | primal100/any_backend | 3616353f6fb5cb5b8366b804d8d2d60e5ae6644a | [
"BSD-3-Clause"
] | 1 | 2020-06-14T14:26:43.000Z | 2020-06-14T14:26:43.000Z | django_any_backend/backends/introspection.py | primal100/any_backend | 3616353f6fb5cb5b8366b804d8d2d60e5ae6644a | [
"BSD-3-Clause"
] | 4 | 2016-04-01T12:17:40.000Z | 2020-01-07T18:37:22.000Z | from django.db.backends.base.introspection import BaseDatabaseIntrospection
class DatabaseIntrospection(BaseDatabaseIntrospection):
def get_table_list(self, cursor):
return [] | 37.6 | 75 | 0.808511 |
c8f179e76b6b77b59b5e28f8ac191e6a6a799b62 | 5,135 | py | Python | devlib/instrument/energy_probe.py | valschneider/devlib | cafc0a4bc0de956bc80a97bbf478aa79221e5257 | [
"Apache-2.0"
] | null | null | null | devlib/instrument/energy_probe.py | valschneider/devlib | cafc0a4bc0de956bc80a97bbf478aa79221e5257 | [
"Apache-2.0"
] | null | null | null | devlib/instrument/energy_probe.py | valschneider/devlib | cafc0a4bc0de956bc80a97bbf478aa79221e5257 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 42.090164 | 126 | 0.594937 |
bb15d8ca621321656518792289604b734a9c9c4f | 5,508 | py | Python | python/maya/site-packages/amTools/utilities/dg.py | CountZer0/PipelineConstructionSet | 0aa73a8a63c72989b2d1c677efd78dad4388d335 | [
"BSD-3-Clause"
] | 21 | 2015-04-27T05:01:36.000Z | 2021-11-22T13:45:14.000Z | python/maya/site-packages/amTools/utilities/dg.py | 0xb1dd1e/PipelineConstructionSet | 621349da1b6d1437e95d0c9e48ee9f36d59f19fd | [
"BSD-3-Clause"
] | null | null | null | python/maya/site-packages/amTools/utilities/dg.py | 0xb1dd1e/PipelineConstructionSet | 621349da1b6d1437e95d0c9e48ee9f36d59f19fd | [
"BSD-3-Clause"
] | 7 | 2015-04-11T11:37:19.000Z | 2020-05-22T09:49:04.000Z | """
Utility functions for working with the Maya dependency graph (DG).
\b Creation \b Info:
\b Donations: http://adammechtley.com/donations/
\b License: The MIT License
Copyright (c) 2011 Adam Mechtley (http://adammechtley.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this so... | 41.104478 | 143 | 0.738381 |
36c0c540bf269a16ed94235879e615d1138da0a4 | 3,654 | py | Python | numpy/typing/tests/data/reveal/npyio.py | felipepenha/numpy | 39704eccd79a5774bde3dda6c0fc419074a39397 | [
"BSD-3-Clause"
] | null | null | null | numpy/typing/tests/data/reveal/npyio.py | felipepenha/numpy | 39704eccd79a5774bde3dda6c0fc419074a39397 | [
"BSD-3-Clause"
] | null | null | null | numpy/typing/tests/data/reveal/npyio.py | felipepenha/numpy | 39704eccd79a5774bde3dda6c0fc419074a39397 | [
"BSD-3-Clause"
] | null | null | null | import re
import pathlib
from typing import IO, List
import numpy.typing as npt
import numpy as np
str_path: str
pathlib_path: pathlib.Path
str_file: IO[str]
bytes_file: IO[bytes]
bag_obj: np.lib.npyio.BagObj[int]
npz_file: np.lib.npyio.NpzFile
AR_i8: npt.NDArray[np.int64]
AR_LIKE_f8: List[float]
reveal_type(bag_o... | 50.75 | 137 | 0.748221 |
422fa4e450dbc5698662b7a4c3bcddd935542bbc | 2,715 | py | Python | tools/nntool/generation/generators/bindings/mult8/fc_binding_generator.py | mfkiwl/gap_sdk | 642b798dfdc7b85ccabe6baba295033f0eadfcd4 | [
"Apache-2.0"
] | null | null | null | tools/nntool/generation/generators/bindings/mult8/fc_binding_generator.py | mfkiwl/gap_sdk | 642b798dfdc7b85ccabe6baba295033f0eadfcd4 | [
"Apache-2.0"
] | null | null | null | tools/nntool/generation/generators/bindings/mult8/fc_binding_generator.py | mfkiwl/gap_sdk | 642b798dfdc7b85ccabe6baba295033f0eadfcd4 | [
"Apache-2.0"
] | 1 | 2021-11-11T02:12:25.000Z | 2021-11-11T02:12:25.000Z | # Copyright (C) 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... | 46.016949 | 97 | 0.655985 |
327b99b9983139e98584de94adbffa174cc5edad | 37,965 | py | Python | tests/test_misc.py | romanornr/lightning | b418c58092a0457fa641ba1d05f656f0f7f55dba | [
"MIT"
] | null | null | null | tests/test_misc.py | romanornr/lightning | b418c58092a0457fa641ba1d05f656f0f7f55dba | [
"MIT"
] | null | null | null | tests/test_misc.py | romanornr/lightning | b418c58092a0457fa641ba1d05f656f0f7f55dba | [
"MIT"
] | null | null | null | from decimal import Decimal
from fixtures import * # noqa: F401,F403
from flaky import flaky
from lightning import RpcError
from utils import DEVELOPER, VALGRIND, sync_blockheight, only_one, wait_for, TailableProc
from ephemeral_port_reserve import reserve
import json
import os
import pytest
import shutil
import sign... | 39.423676 | 137 | 0.645226 |
30bd0339165118bdeb17a5ab42c1465f40572bbc | 11,999 | py | Python | tests/test_wallet_manager.py | zachzager/specter-desktop | a960ad01a5d3acc4f47983970ab78dd87751a492 | [
"MIT"
] | 1 | 2021-07-12T11:31:57.000Z | 2021-07-12T11:31:57.000Z | tests/test_wallet_manager.py | zachzager/specter-desktop | a960ad01a5d3acc4f47983970ab78dd87751a492 | [
"MIT"
] | 1 | 2021-01-20T10:30:11.000Z | 2021-01-20T15:09:48.000Z | tests/test_wallet_manager.py | zachzager/specter-desktop | a960ad01a5d3acc4f47983970ab78dd87751a492 | [
"MIT"
] | null | null | null | import json, os
from cryptoadvance.specter.rpc import RpcError
from cryptoadvance.specter.specter_error import SpecterError
from cryptoadvance.specter.wallet import Wallet
from cryptoadvance.specter.key import Key
from cryptoadvance.specter.wallet_manager import WalletManager
def test_WalletManager(bitcoin_regtest, d... | 39.470395 | 138 | 0.691058 |
46494fff93c7f2ccac2a77b0d9ee5826858a1e85 | 1,080 | py | Python | kubernetes/test/test_v1_ceph_fs_persistent_volume_source.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 1 | 2018-10-20T19:37:57.000Z | 2018-10-20T19:37:57.000Z | kubernetes/test/test_v1_ceph_fs_persistent_volume_source.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_ceph_fs_persistent_volume_source.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 2 | 2018-07-27T19:39:34.000Z | 2020-12-25T02:48:27.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 24 | 110 | 0.740741 |
81d779222bca726906248ad9829bf9d2e40a70e6 | 2,410 | py | Python | src/database.py | abhishekpandeyIT/Virtual_Intelligent_Personal_Agent | 786261fbcf1468bcbaee9f6d17aea3f3cc06f81e | [
"Apache-2.0"
] | null | null | null | src/database.py | abhishekpandeyIT/Virtual_Intelligent_Personal_Agent | 786261fbcf1468bcbaee9f6d17aea3f3cc06f81e | [
"Apache-2.0"
] | null | null | null | src/database.py | abhishekpandeyIT/Virtual_Intelligent_Personal_Agent | 786261fbcf1468bcbaee9f6d17aea3f3cc06f81e | [
"Apache-2.0"
] | null | null | null | import sqlite3
from internet_module import check_internet_connection
def create_connection():
connection= sqlite3.connect('Database/memory.db')
return connection
def get_questions_and_answers():
con = create_connection()
cur = con.cursor()
cur.execute('SELECT * FROM inputResponses')
return ... | 26.483516 | 93 | 0.661826 |
7da171e41b36d00b6b6a5560a86a58e0c6183030 | 441 | py | Python | metaci/plan/migrations/0018_planrepository_active.py | abhishekalgo/metaci | cd62473b3fb85fb0f39623f9fb2850993ff708a5 | [
"BSD-3-Clause"
] | null | null | null | metaci/plan/migrations/0018_planrepository_active.py | abhishekalgo/metaci | cd62473b3fb85fb0f39623f9fb2850993ff708a5 | [
"BSD-3-Clause"
] | null | null | null | metaci/plan/migrations/0018_planrepository_active.py | abhishekalgo/metaci | cd62473b3fb85fb0f39623f9fb2850993ff708a5 | [
"BSD-3-Clause"
] | 1 | 2018-12-07T09:51:07.000Z | 2018-12-07T09:51:07.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-09-13 23:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("plan", "0017_auto_20180913_2116")]
operations = [
migrations.AddField(
mode... | 23.210526 | 56 | 0.643991 |
a26a6fffdbe3f88d295e5e02adf7cff843b7e765 | 1,981 | py | Python | regression-tests/sparktkregtests/testcases/graph/graph_clustering_coefficient_test.py | lewisc/spark-tk | 5548fc925b5c278263cbdebbd9e8c7593320c2f4 | [
"ECL-2.0",
"Apache-2.0"
] | 34 | 2016-05-20T22:26:05.000Z | 2022-01-21T12:55:13.000Z | regression-tests/sparktkregtests/testcases/graph/graph_clustering_coefficient_test.py | aayushidwivedi01/spark-tk-old | fcf25f86498ac416cce77de0db4cf0aa503d20ac | [
"ECL-2.0",
"Apache-2.0"
] | 70 | 2016-06-28T01:11:21.000Z | 2021-03-15T21:40:01.000Z | regression-tests/sparktkregtests/testcases/graph/graph_clustering_coefficient_test.py | aayushidwivedi01/spark-tk-old | fcf25f86498ac416cce77de0db4cf0aa503d20ac | [
"ECL-2.0",
"Apache-2.0"
] | 34 | 2016-04-21T22:25:22.000Z | 2020-10-06T09:23:43.000Z | # vim: set encoding=utf-8
# Copyright (c) 2016 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 require... | 34.754386 | 106 | 0.664311 |
b416fa24c188a9eb2601d1ad0b0cdd2df73bc51b | 2,992 | py | Python | mimic3benchmark/subject.py | park-sueun/mimic3-benchmarks | 103959189fa9002bb72e7c972b170e9d0bf4cb4e | [
"MIT"
] | null | null | null | mimic3benchmark/subject.py | park-sueun/mimic3-benchmarks | 103959189fa9002bb72e7c972b170e9d0bf4cb4e | [
"MIT"
] | null | null | null | mimic3benchmark/subject.py | park-sueun/mimic3-benchmarks | 103959189fa9002bb72e7c972b170e9d0bf4cb4e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import print_function
import numpy as np
import os
import pandas as pd
from mimic3benchmark.util import dataframe_from_csv
def read_stays(subject_path):
stays = dataframe_from_csv(os.path.join(subject_path, 'stays.csv'), index_col=None)
stays.INTIME = pd... | 39.368421 | 98 | 0.690842 |
94988acd2cb7f8d506a8cd107ffae4792381d6f1 | 1,104 | py | Python | generator/group.py | Marinayanga/python_software | 66ce3c721469a409eced1f00c9475d2f50d90156 | [
"Apache-2.0"
] | null | null | null | generator/group.py | Marinayanga/python_software | 66ce3c721469a409eced1f00c9475d2f50d90156 | [
"Apache-2.0"
] | null | null | null | generator/group.py | Marinayanga/python_software | 66ce3c721469a409eced1f00c9475d2f50d90156 | [
"Apache-2.0"
] | null | null | null | from model.group import Group
import string
import random
import os.path
import jsonpickle
import getopt
import sys
try:
opts, args = getopt.getopt(sys.argv[1:], "n:f:", ["number of groups", "file"])
except getopt.GetoptError as err:
# print help information and exit:
print(err) # will print something... | 28.307692 | 129 | 0.663043 |
0de24518bdde0289131e81909cee1d1737eb6794 | 6,826 | py | Python | src/salineup_enhancement/behaviour_report_helper.py | ITh4cker/auto_tools | 8e0e00cdf8bf60ee3f26fa5ae8f18c376298d0aa | [
"Apache-2.0"
] | null | null | null | src/salineup_enhancement/behaviour_report_helper.py | ITh4cker/auto_tools | 8e0e00cdf8bf60ee3f26fa5ae8f18c376298d0aa | [
"Apache-2.0"
] | null | null | null | src/salineup_enhancement/behaviour_report_helper.py | ITh4cker/auto_tools | 8e0e00cdf8bf60ee3f26fa5ae8f18c376298d0aa | [
"Apache-2.0"
] | 1 | 2021-06-16T07:32:17.000Z | 2021-06-16T07:32:17.000Z | # Author: Feihao Chen / Chengrui Dai(SA)
# Date: 2016/12/15
# Modified: 2017/05/12
import re
import xml.etree.cElementTree as ET
class BehaviourReportHelper(object):
"""
"""
def __init__(self,xml_file = ''):
self.xml_file = xml_file
self.root = None
self.file_path = ''
... | 34.474747 | 119 | 0.547905 |
4394c277c610f7016dd63b85fd7158c93b09dfe7 | 4,822 | py | Python | lib/pare/pare/models/hmr.py | YuliangXiu/ICON | ece5a09aa2d56aec28017430e65a0352622a0f30 | [
"Intel"
] | 486 | 2021-12-16T03:13:31.000Z | 2022-03-30T04:26:48.000Z | lib/pare/pare/models/hmr.py | YuliangXiu/ICON | ece5a09aa2d56aec28017430e65a0352622a0f30 | [
"Intel"
] | 33 | 2021-12-30T07:28:10.000Z | 2022-03-30T08:04:06.000Z | lib/pare/pare/models/hmr.py | YuliangXiu/ICON | ece5a09aa2d56aec28017430e65a0352622a0f30 | [
"Intel"
] | 38 | 2021-12-17T10:55:01.000Z | 2022-03-30T23:25:39.000Z | # -*- coding: utf-8 -*-
# Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is
# holder of all proprietary rights on this computer program.
# You can only use this computer program if you have closed
# a license agreement with MPG or you get the right to use the computer
# program from someone who is... | 34.942029 | 111 | 0.602655 |
a785d6de8c094e51199fbca1c8904bfc9b24d114 | 1,456 | py | Python | stack/stack.py | deveshpatel0101/python-data-structures-algorithms | 3ae54fff1bb340b9f6b6ff4361eac38fb83eebb5 | [
"MIT"
] | null | null | null | stack/stack.py | deveshpatel0101/python-data-structures-algorithms | 3ae54fff1bb340b9f6b6ff4361eac38fb83eebb5 | [
"MIT"
] | null | null | null | stack/stack.py | deveshpatel0101/python-data-structures-algorithms | 3ae54fff1bb340b9f6b6ff4361eac38fb83eebb5 | [
"MIT"
] | null | null | null | class Stack:
'''
Stack is a data structure that implements LIFO/FILO
'''
def __init__(self, size=5):
self.items = []
self.size = size
self.top = 0
def get_size(self):
'''
returns the size of stack
'''
return self.size
def push(self, ite... | 21.411765 | 59 | 0.504808 |
51037a40ce922cc7d3249ceaa50693d93a765a7c | 345 | py | Python | Chapter09/transforming/buffer3.py | PacktPublishing/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 56 | 2018-06-28T05:04:36.000Z | 2022-02-06T18:36:29.000Z | Chapter09/transforming/buffer3.py | azataiot/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 2 | 2019-08-19T03:51:49.000Z | 2019-09-25T09:00:57.000Z | Chapter09/transforming/buffer3.py | azataiot/Hands-On-Reactive-Programming-with-Python | d9da4f3f070695508bb36ef9d97f1212ecaf6fab | [
"MIT"
] | 18 | 2018-09-16T05:50:13.000Z | 2022-01-02T19:59:04.000Z | import rx
import rx.operators as ops
from rx.subject import Subject
import time
import threading
numbers = rx.from_([1, 2, 3, 4, 5, 6])
numbers.pipe(ops.buffer_with_count(3)).subscribe(
on_next=lambda i: print("on_next {}".format(i)),
on_error=lambda e: print("on_error: {}".format(e)),
on_completed=lambda:... | 26.538462 | 55 | 0.710145 |
f0e5e719f26bb2d284a98635a435ae3d5a1886d3 | 14,788 | py | Python | scripts/sc2counts.py | mardzix/scChIPseq_DataEngineering | 6a7dea1ecfef1c4aaa2fe5dfb7201e58e41ad9d6 | [
"BSD-3-Clause"
] | 1 | 2020-06-02T11:25:46.000Z | 2020-06-02T11:25:46.000Z | scripts/sc2counts.py | mardzix/scChIPseq_DataEngineering | 6a7dea1ecfef1c4aaa2fe5dfb7201e58e41ad9d6 | [
"BSD-3-Clause"
] | null | null | null | scripts/sc2counts.py | mardzix/scChIPseq_DataEngineering | 6a7dea1ecfef1c4aaa2fe5dfb7201e58e41ad9d6 | [
"BSD-3-Clause"
] | 2 | 2020-12-30T10:00:42.000Z | 2021-01-04T10:23:26.000Z | """
Transform a BAM file to a count table based on barcode information and genomic bins
"""
import time
import argparse
import sys
import os
import re
import math
from collections import OrderedDict
import pysam
import numpy as np
from scipy import sparse
from bx.intervals.intersection import Intersecter, Interval
... | 33.995402 | 165 | 0.599878 |
c9a77eda61d542d29f7ad860e0063bddc166a819 | 10,698 | py | Python | zepid/causal/ipw/IPCW.py | darrenreger/zEpid | 4b5b4ed81933c92bd17d63364df6673d6f9c2ea6 | [
"MIT"
] | 101 | 2018-12-17T20:32:20.000Z | 2022-03-29T08:51:46.000Z | zepid/causal/ipw/IPCW.py | darrenreger/zEpid | 4b5b4ed81933c92bd17d63364df6673d6f9c2ea6 | [
"MIT"
] | 124 | 2018-12-13T22:30:41.000Z | 2022-02-10T00:24:25.000Z | zepid/causal/ipw/IPCW.py | darrenreger/zEpid | 4b5b4ed81933c92bd17d63364df6673d6f9c2ea6 | [
"MIT"
] | 26 | 2019-02-07T17:45:15.000Z | 2022-01-03T00:39:34.000Z | import warnings
import numpy as np
import pandas as pd
from zepid.causal.utils import propensity_score
class IPCW:
r"""Calculates inverse probability of censoring weights. Note that this function will accept either a flat
file (one row per individual) or a long format (multiple rows per individual). If a fla... | 51.681159 | 120 | 0.636381 |
dd415e240284e8d25e15115c99cac233cb05f5ea | 4,673 | py | Python | piece.py | nik11251/tetris | d5e237e78f8742639ee4c92db6836bd88a1ebdaa | [
"MIT"
] | null | null | null | piece.py | nik11251/tetris | d5e237e78f8742639ee4c92db6836bd88a1ebdaa | [
"MIT"
] | null | null | null | piece.py | nik11251/tetris | d5e237e78f8742639ee4c92db6836bd88a1ebdaa | [
"MIT"
] | null | null | null | import pygame
from shapes import *
import random
import time
WHITE = (225, 225, 255)
class Piece:
def __init__(self, block_size, clock, board):
ind = random.randint(0, 6)
self.color = colors[ind]
self.shape = shapes[ind]
self.state = 0
self.block_size =... | 29.20625 | 99 | 0.517227 |
e96a385f788c3da963cc0d08a7017f5d97503d58 | 558 | py | Python | syncfile/sync.py | GerJuli/ftptoolbox | 554bbddf52ce341bde37d6b572501e95abbb3935 | [
"MIT"
] | null | null | null | syncfile/sync.py | GerJuli/ftptoolbox | 554bbddf52ce341bde37d6b572501e95abbb3935 | [
"MIT"
] | null | null | null | syncfile/sync.py | GerJuli/ftptoolbox | 554bbddf52ce341bde37d6b572501e95abbb3935 | [
"MIT"
] | null | null | null | import config as cfg
from ftplib import FTP
ftp = FTP(cfg.server)
ftp.login(cfg.ftp_credentials['user'], cfg.ftp_credentials['password'])
try:
file = open(cfg.local_file_directory+cfg.filename,'rb') # file to send
except FileNotFoundError:
print("Local file not found. Check config!")
try:
f... | 27.9 | 89 | 0.646953 |
3bb06aae398c1a8c0cbbdb7fc5e0cc223c5e8722 | 2,460 | py | Python | configs/pointpillars/hv_pointpillars_secfpn_sbn-all_4x8_2x_custom-3d.py | speshowBUAA/mmdetection3d | 98a8c49f2686b0d94a1ae134dd993672d4f2deb4 | [
"Apache-2.0"
] | null | null | null | configs/pointpillars/hv_pointpillars_secfpn_sbn-all_4x8_2x_custom-3d.py | speshowBUAA/mmdetection3d | 98a8c49f2686b0d94a1ae134dd993672d4f2deb4 | [
"Apache-2.0"
] | null | null | null | configs/pointpillars/hv_pointpillars_secfpn_sbn-all_4x8_2x_custom-3d.py | speshowBUAA/mmdetection3d | 98a8c49f2686b0d94a1ae134dd993672d4f2deb4 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/hv_pointpillars_fpn_nus.py',
'../_base_/datasets/custom-3d-3class.py',
'../_base_/schedules/schedule_2x.py',
'../_base_/default_runtime.py',
]
# model settings
model = dict(
pts_voxel_encoder = dict(
norm_cfg=dict(type='BN1d', eps=1e-3, momentum=0.01)),
pts_b... | 41.694915 | 101 | 0.578455 |
f7cbf50f487f2177fcae153d562e73d7f94e31e4 | 12,926 | py | Python | config/settings/common.py | watchdogpolska/feder | da0fe7a3c18de3bc09cc3aa911d2ea691bd11f1c | [
"MIT"
] | 16 | 2015-08-11T17:20:26.000Z | 2022-02-11T20:15:41.000Z | config/settings/common.py | watchdogpolska/feder | da0fe7a3c18de3bc09cc3aa911d2ea691bd11f1c | [
"MIT"
] | 534 | 2015-08-04T00:10:54.000Z | 2022-03-17T10:44:47.000Z | config/settings/common.py | watchdogpolska/feder | da0fe7a3c18de3bc09cc3aa911d2ea691bd11f1c | [
"MIT"
] | 10 | 2017-08-30T13:34:32.000Z | 2022-02-18T13:00:35.000Z | """
Django settings for feder project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import sys
import environ
ROOT_DIR = environ.Path(__file__) - 3 # (/a/b/myf... | 35.806094 | 98 | 0.648693 |
55145341cfe345e68259e8f7bfecd499e07f2336 | 17,132 | py | Python | python/cuml/test/test_fil.py | zbjornson/cuml | 39e1bb2290dcb82b7c935f79164f098400158467 | [
"Apache-2.0"
] | null | null | null | python/cuml/test/test_fil.py | zbjornson/cuml | 39e1bb2290dcb82b7c935f79164f098400158467 | [
"Apache-2.0"
] | null | null | null | python/cuml/test/test_fil.py | zbjornson/cuml | 39e1bb2290dcb82b7c935f79164f098400158467 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA 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... | 38.936364 | 79 | 0.612071 |
b8da9516182b4aa12e31e948ea6ad569e8a0f4ee | 619 | py | Python | CircuitPython_displayio/displayio_ondiskbitmap.py | joewalk102/Adafruit_Learning_System_Guides | 2bda607f8c433c661a2d9d40b4db4fd132334c9a | [
"MIT"
] | 3 | 2019-09-25T17:32:15.000Z | 2019-10-04T18:31:34.000Z | CircuitPython_displayio/displayio_ondiskbitmap.py | joewalk102/Adafruit_Learning_System_Guides | 2bda607f8c433c661a2d9d40b4db4fd132334c9a | [
"MIT"
] | 1 | 2020-10-16T15:30:22.000Z | 2020-10-16T15:30:22.000Z | CircuitPython_displayio/displayio_ondiskbitmap.py | joewalk102/Adafruit_Learning_System_Guides | 2bda607f8c433c661a2d9d40b4db4fd132334c9a | [
"MIT"
] | 1 | 2020-10-16T15:23:04.000Z | 2020-10-16T15:23:04.000Z | import board
import displayio
display = board.DISPLAY
# Open the file
with open("/purple.bmp", "rb") as bitmap_file:
# Setup the file as the bitmap data source
bitmap = displayio.OnDiskBitmap(bitmap_file)
# Create a TileGrid to hold the bitmap
tile_grid = displayio.TileGrid(bitmap, pixel_shader=disp... | 22.925926 | 83 | 0.699515 |
59608260318062983cb5a8a75b9966482f1f3693 | 1,867 | py | Python | backend/blueprints/product.py | Cornul11/Retaily | 8b0ce1477181d32e4ec110431dd12222b68ce7c3 | [
"MIT"
] | 1 | 2020-04-29T22:25:44.000Z | 2020-04-29T22:25:44.000Z | backend/blueprints/product.py | RubenBiskupec/Software-Engineering- | 8b0ce1477181d32e4ec110431dd12222b68ce7c3 | [
"MIT"
] | 1 | 2020-03-18T22:36:45.000Z | 2020-03-18T22:36:45.000Z | backend/blueprints/product.py | RubenBiskupec/Software-Engineering- | 8b0ce1477181d32e4ec110431dd12222b68ce7c3 | [
"MIT"
] | 1 | 2020-03-31T19:53:57.000Z | 2020-03-31T19:53:57.000Z | from flask import Blueprint, request, make_response, jsonify, abort
from app import db
from models import ProductInfo
from error import pluError, nameError, undefinedError
# Define the blueprint
product_bp = Blueprint("product", __name__)
# Basic interface for getting a specific price
def get_price(price_identifier... | 30.606557 | 81 | 0.618104 |
fcc736ea1abe39819673ab3a64de6570657bbec1 | 378 | py | Python | pastepwn/analyzers/mailanalyzer.py | bajubullet/pastepwn | 641afb3174c999a2f8a18d522791227a3a3b8189 | [
"MIT"
] | 113 | 2018-09-06T22:14:52.000Z | 2022-02-17T01:32:29.000Z | pastepwn/analyzers/mailanalyzer.py | bajubullet/pastepwn | 641afb3174c999a2f8a18d522791227a3a3b8189 | [
"MIT"
] | 199 | 2018-09-15T22:17:58.000Z | 2022-01-23T23:45:09.000Z | pastepwn/analyzers/mailanalyzer.py | bajubullet/pastepwn | 641afb3174c999a2f8a18d522791227a3a3b8189 | [
"MIT"
] | 88 | 2018-09-09T13:02:06.000Z | 2022-01-23T22:56:09.000Z | # -*- coding: utf-8 -*-
from .regexanalyzer import RegexAnalyzer
class MailAnalyzer(RegexAnalyzer):
"""Analyzer to match on email addresses via regex"""
name = "MailAnalyzer"
def __init__(self, actions):
# Regex taken from http://emailregex.com/
regex = r"([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.... | 29.076923 | 67 | 0.619048 |
b2f515ef65fdc98bd87e42d9f96916c70b718a52 | 21,892 | py | Python | cosmoprimo/tests/test_cosmology.py | adematti/cosmoprimo | b5dde7d6f4932c2cd5beb9f6b9ede3488c1ad522 | [
"BSD-3-Clause"
] | 3 | 2021-05-05T16:34:00.000Z | 2021-11-24T08:38:11.000Z | cosmoprimo/tests/test_cosmology.py | adematti/cosmoprimo | b5dde7d6f4932c2cd5beb9f6b9ede3488c1ad522 | [
"BSD-3-Clause"
] | 1 | 2021-11-15T16:30:16.000Z | 2021-11-15T16:30:16.000Z | cosmoprimo/tests/test_cosmology.py | adematti/cosmoprimo | b5dde7d6f4932c2cd5beb9f6b9ede3488c1ad522 | [
"BSD-3-Clause"
] | null | null | null | import os
import tempfile
import pytest
import numpy as np
from cosmoprimo import Cosmology, Background, Thermodynamics, Primordial, Transfer, Harmonic, Fourier, CosmologyError
def test_params():
cosmo = Cosmology()
with pytest.raises(CosmologyError):
cosmo = Cosmology(sigma8=1.,A_s=1e-9)
params... | 44.137097 | 160 | 0.647131 |
8dc645f9721e093dfa8d9cf49a1edc85ed329439 | 646 | py | Python | examples/aws-python/__main__.py | antifuchs/pulumi-docker-buildkit | 6abdbc3254322140d1876684a40b20e431cadf7f | [
"Apache-2.0"
] | null | null | null | examples/aws-python/__main__.py | antifuchs/pulumi-docker-buildkit | 6abdbc3254322140d1876684a40b20e431cadf7f | [
"Apache-2.0"
] | null | null | null | examples/aws-python/__main__.py | antifuchs/pulumi-docker-buildkit | 6abdbc3254322140d1876684a40b20e431cadf7f | [
"Apache-2.0"
] | null | null | null | import base64
import pulumi
import pulumi_aws as aws
import pulumi_docker_buildkit as docker_buildkit
def get_registry_info(registry_id):
credentials = aws.ecr.get_credentials(registry_id)
username, password = base64.b64decode(credentials.authorization_token).decode().split(":")
return docker_buildkit.Reg... | 25.84 | 94 | 0.75387 |
8f7aed3dca24fa0822e0e596adbe5dd51e59ec49 | 2,589 | py | Python | dateparser/data/date_translation_data/nd.py | Rodp63/dateparser | 938a9573234679b603210bd47cc93eb258b1f1df | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/nd.py | Rodp63/dateparser | 938a9573234679b603210bd47cc93eb258b1f1df | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/nd.py | Rodp63/dateparser | 938a9573234679b603210bd47cc93eb258b1f1df | [
"BSD-3-Clause"
] | null | null | null | info = {
"name": "nd",
"date_order": "DMY",
"january": [
"zib",
"zibandlela"
],
"february": [
"nhlo",
"nhlolanja"
],
"march": [
"mbi",
"mbimbitho"
],
"april": [
"mab",
"mabasa"
],
"may": [
"nkw",
... | 15.229412 | 26 | 0.272306 |
519a8fb8e615aa9bed4b4fe7d81e6011765b6a76 | 607 | py | Python | examples/by_systems/cartpole/cartpole_natural_behavior.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 14 | 2019-05-03T15:22:38.000Z | 2022-03-14T15:31:54.000Z | examples/by_systems/cartpole/cartpole_natural_behavior.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 9 | 2019-08-01T14:22:13.000Z | 2021-06-12T01:44:50.000Z | examples/by_systems/cartpole/cartpole_natural_behavior.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 9 | 2019-05-21T12:38:36.000Z | 2022-03-29T16:28:45.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 12 20:28:17 2018
@author: Alexandre
"""
###############################################################################
import numpy as np
###############################################################################
from pyro.dynamic import cartpole
#################... | 28.904762 | 79 | 0.446458 |
8acc0ef74fc303127dabe1d5e35da34a5ab28135 | 2,820 | py | Python | cjdata/migrations/0004_auto_20150916_1409.py | sunlightlabs/hall-of-justice | 8c2ce47f792e0182c84d13dca808564a6ac376b4 | [
"BSD-3-Clause"
] | 7 | 2015-05-08T03:48:54.000Z | 2016-02-04T01:01:51.000Z | cjdata/migrations/0004_auto_20150916_1409.py | themarshallproject/hall-of-justice | 8c2ce47f792e0182c84d13dca808564a6ac376b4 | [
"BSD-3-Clause"
] | 44 | 2015-03-20T17:16:58.000Z | 2016-04-27T20:17:29.000Z | cjdata/migrations/0004_auto_20150916_1409.py | sunlightlabs/hall-of-justice | 8c2ce47f792e0182c84d13dca808564a6ac376b4 | [
"BSD-3-Clause"
] | 5 | 2015-06-22T13:49:08.000Z | 2016-01-30T23:19:16.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.postgres.fields
class Migration(migrations.Migration):
dependencies = [
('cjdata', '0003_add_indexes'),
]
operations = [
migrations.AlterField(
mode... | 78.333333 | 1,524 | 0.58156 |
2f642e3a7a5a14bb919411ade8abcecf707bb000 | 8,917 | py | Python | tools/Scripts/Visualization.py | raphaelmenges/visual-stimuli-discovery | e02e9a0283a2d561165a39cf83fe85b8f687d884 | [
"MIT"
] | null | null | null | tools/Scripts/Visualization.py | raphaelmenges/visual-stimuli-discovery | e02e9a0283a2d561165a39cf83fe85b8f687d884 | [
"MIT"
] | null | null | null | tools/Scripts/Visualization.py | raphaelmenges/visual-stimuli-discovery | e02e9a0283a2d561165a39cf83fe85b8f687d884 | [
"MIT"
] | 2 | 2020-06-25T15:41:56.000Z | 2020-07-20T08:36:44.000Z | # Takes stimuli image-representations, gaze and mouse data as input; outputs overlaid images
import os
import csv
import re
import argparse
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.ticker import NullLocator
# Predefines
plots_folder = 'plots'
my_dpi = 96
fixation_vel_threshold = 50 # pixels
... | 29.429043 | 121 | 0.661433 |
c09db47df7e431a5d952da6b88ea097238e1e1c2 | 99 | py | Python | run.py | cjbm7/DS4A-Malnutrition-Recurrence | 29e5d4420e3e8ca7fc825e9efb5979b448784554 | [
"MIT"
] | null | null | null | run.py | cjbm7/DS4A-Malnutrition-Recurrence | 29e5d4420e3e8ca7fc825e9efb5979b448784554 | [
"MIT"
] | null | null | null | run.py | cjbm7/DS4A-Malnutrition-Recurrence | 29e5d4420e3e8ca7fc825e9efb5979b448784554 | [
"MIT"
] | null | null | null | from app import app
if __name__ == "__main__":
app.run(host='0.0.0.0', debug=True, port=5000) | 19.8 | 50 | 0.656566 |
afcd9bd01444e38a7ac807ff9bfa6dca6e0029f9 | 414 | py | Python | meu_projeto/conftest.py | jos3duardo/cookiecutter-django | 7a5a1410e7fe3eda7de60e0b435a49b0678b7c76 | [
"MIT"
] | null | null | null | meu_projeto/conftest.py | jos3duardo/cookiecutter-django | 7a5a1410e7fe3eda7de60e0b435a49b0678b7c76 | [
"MIT"
] | null | null | null | meu_projeto/conftest.py | jos3duardo/cookiecutter-django | 7a5a1410e7fe3eda7de60e0b435a49b0678b7c76 | [
"MIT"
] | null | null | null | import pytest
from django.test import RequestFactory
from meu_projeto.users.models import User
from meu_projeto.users.tests.factories import UserFactory
@pytest.fixture(autouse=True)
def media_storage(settings, tmpdir):
settings.MEDIA_ROOT = tmpdir.strpath
@pytest.fixture
def user() -> User:
return UserFac... | 19.714286 | 57 | 0.782609 |
de71a566d7c8eb2f2f46e7739a60b9e00c3c3b46 | 1,541 | py | Python | cats/cats_simus/atmosphere.py | brunellacarlomagno/CATS | 2fb85366dbca81736d75a982156674523632414f | [
"MIT"
] | null | null | null | cats/cats_simus/atmosphere.py | brunellacarlomagno/CATS | 2fb85366dbca81736d75a982156674523632414f | [
"MIT"
] | null | null | null | cats/cats_simus/atmosphere.py | brunellacarlomagno/CATS | 2fb85366dbca81736d75a982156674523632414f | [
"MIT"
] | null | null | null | import numpy as np
import cv2
import proper
import math
from astropy.io import fits
def atmosphere(wf, npupil, atm_screen, Debug_print, Debug):
n = int(proper.prop_get_gridsize(wf))
lamda=proper.prop_get_wavelength(wf) #save the wavelength value [m] into lamda
screen = atm_screen # read the phase scr... | 44.028571 | 205 | 0.706684 |
9ccef39e0d5f9f4bdc403e12c471e5a67340567b | 5,649 | py | Python | test/functional/test_framework/socks5.py | qtdatainc/SAM-Coin | 3ff99809c5ce6ddad10d29fef688cd54f0ee37fb | [
"MIT"
] | 1 | 2022-02-22T03:37:26.000Z | 2022-02-22T03:37:26.000Z | test/functional/test_framework/socks5.py | qtdatainc/SAM-Coin | 3ff99809c5ce6ddad10d29fef688cd54f0ee37fb | [
"MIT"
] | null | null | null | test/functional/test_framework/socks5.py | qtdatainc/SAM-Coin | 3ff99809c5ce6ddad10d29fef688cd54f0ee37fb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Samcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Dummy Socks5 server for testing."""
import socket
import threading
import queue
import logging
logger... | 35.086957 | 125 | 0.57373 |
b9a9b0fdc58e3467c14b25f46b9d5da65fb6472b | 1,406 | py | Python | cengal/time_management/relative_time/constants/versions/v_0/constants.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | 3 | 2018-07-23T18:48:58.000Z | 2021-07-18T14:17:20.000Z | cengal/time_management/relative_time/constants/versions/v_0/constants.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | null | null | null | cengal/time_management/relative_time/constants/versions/v_0/constants.py | FI-Mihej/Cengal | 516b9780da6ccc9168f8f89d7ba13dc29e24bc0b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright © 2017 ButenkoMS. All rights reserved. Contacts: <gtalk@butenkoms.space>
#
# 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... | 33.47619 | 100 | 0.761024 |
0565d30b4f24bca367945872cb7436c4709e7c35 | 6,875 | py | Python | train_clevr_multiview.py | chahyon1998/sornet-ku | 87a4479368c95e4d3d59863a4329b2b77f184218 | [
"MIT"
] | null | null | null | train_clevr_multiview.py | chahyon1998/sornet-ku | 87a4479368c95e4d3d59863a4329b2b77f184218 | [
"MIT"
] | null | null | null | train_clevr_multiview.py | chahyon1998/sornet-ku | 87a4479368c95e4d3d59863a4329b2b77f184218 | [
"MIT"
] | null | null | null | '''
MIT License
Copyright (c) 2022 Wentao Yuan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, d... | 38.407821 | 135 | 0.682909 |
3f6ca7927ed047d9e577284c060fb8b12a2b34ca | 9,172 | py | Python | apprise/plugins/NotifyProwl.py | daq-tools/apprise | 44905e5c6ec354be4711bd52b422b3c304b1544b | [
"MIT"
] | null | null | null | apprise/plugins/NotifyProwl.py | daq-tools/apprise | 44905e5c6ec354be4711bd52b422b3c304b1544b | [
"MIT"
] | null | null | null | apprise/plugins/NotifyProwl.py | daq-tools/apprise | 44905e5c6ec354be4711bd52b422b3c304b1544b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Chris Caron <lead2gold@gmail.com>
# All rights reserved.
#
# This code is licensed under the MIT License.
#
# 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 th... | 30.986486 | 79 | 0.575229 |
26905820a855df9dd0ea97d02e941f55ae9a2391 | 2,290 | py | Python | bootcamp/articles/views.py | alexandrelff/bootcamp | 57f7dff02d1dfbfae25fb993ef42710b1b61b7ba | [
"MIT"
] | 7 | 2019-11-25T10:43:31.000Z | 2021-08-09T14:02:58.000Z | bootcamp/articles/views.py | alexandrelff/bootcamp | 57f7dff02d1dfbfae25fb993ef42710b1b61b7ba | [
"MIT"
] | 45 | 2020-03-29T20:01:38.000Z | 2021-08-09T16:39:33.000Z | bootcamp/articles/views.py | alexandrelff/bootcamp | 57f7dff02d1dfbfae25fb993ef42710b1b61b7ba | [
"MIT"
] | 5 | 2020-03-30T15:33:42.000Z | 2021-09-17T17:04:40.000Z | from django.contrib import messages
from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import CreateView, ListView, UpdateView, DetailView
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from bootcamp.helpers import AuthorRequiredMixin
from bootc... | 30.945946 | 77 | 0.730568 |
2a051d7f8de6e1fbcc5739f5b9ce45dfd56040be | 1,499 | py | Python | services/cloudwatch/sample.py | rolandovillca/aws_samples_boto3_sd | 92cb404b96e252c15547593e273e0ab15aa74e14 | [
"MIT"
] | null | null | null | services/cloudwatch/sample.py | rolandovillca/aws_samples_boto3_sd | 92cb404b96e252c15547593e273e0ab15aa74e14 | [
"MIT"
] | null | null | null | services/cloudwatch/sample.py | rolandovillca/aws_samples_boto3_sd | 92cb404b96e252c15547593e273e0ab15aa74e14 | [
"MIT"
] | null | null | null | '''
===================================
Boto 3 - CloudWatch Service Example
===================================
This application implements the CloudWatch service that lets you gets
information from Amazon Cloud Watch. See the README for more details.
'''
import boto3
import json
config = json.loads(open('config/defa... | 29.392157 | 69 | 0.578386 |
999e2064fb9c5b94700f778fde585b55d9a1044e | 1,452 | py | Python | twitoff/predict.py | JeffreyAsuncion/TwitOff | e70916b9da39d252fcb40da7519e0aa00a149c3c | [
"MIT"
] | null | null | null | twitoff/predict.py | JeffreyAsuncion/TwitOff | e70916b9da39d252fcb40da7519e0aa00a149c3c | [
"MIT"
] | null | null | null | twitoff/predict.py | JeffreyAsuncion/TwitOff | e70916b9da39d252fcb40da7519e0aa00a149c3c | [
"MIT"
] | 1 | 2021-05-08T06:24:08.000Z | 2021-05-08T06:24:08.000Z | '''Prediction of Users based on Tweet embeddings'''
import numpy as np
from sklearn.linear_model import LogisticRegression
from .db_model import User
from .twitter import BASILICA
def predict_user(user1, user2, tweet_text):
'''Determine and return which user is more likely to say a given tweet.
# Argume... | 41.485714 | 105 | 0.7073 |
db68d7caa322cd83d7b508622a84a468e59b945a | 3,463 | py | Python | tests/test_coolprop.py | tedhyu/thermo | 1966c7cba5a603984b49f22c97ff00a144d90812 | [
"MIT"
] | null | null | null | tests/test_coolprop.py | tedhyu/thermo | 1966c7cba5a603984b49f22c97ff00a144d90812 | [
"MIT"
] | null | null | null | tests/test_coolprop.py | tedhyu/thermo | 1966c7cba5a603984b49f22c97ff00a144d90812 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2016, Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... | 42.231707 | 135 | 0.721051 |
cd6fb269ce232cd4ddded2d9d0d8b4408eea090b | 1,610 | py | Python | atest/testdata/keywords/type_conversion/unions.py | SanJSp/robotframework | 681d359d39adc8418873e3eec05adade185a166d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | atest/testdata/keywords/type_conversion/unions.py | SanJSp/robotframework | 681d359d39adc8418873e3eec05adade185a166d | [
"ECL-2.0",
"Apache-2.0"
] | 20 | 2021-01-15T07:43:05.000Z | 2022-03-01T23:12:59.000Z | atest/testdata/keywords/type_conversion/unions.py | stdedos/robotframework | 8842a2ee6bcedbb72aa45f94c7fe7a0e9f9b2f42 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from typing import Optional, Union
class MyObject(object):
def __init__(self):
pass
class UnexpectedObject(object):
def __init__(self):
pass
def create_my_object():
return MyObject()
def create_unexpected_object():
return UnexpectedObject()
def union_of_int_float_and_string(arg... | 23.676471 | 89 | 0.74472 |
0976b4f2eea8178c516b3ce2232b53e2adb41ea7 | 357 | py | Python | larq_compute_engine/__init__.py | timdebruin/compute-engine | bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4 | [
"Apache-2.0"
] | null | null | null | larq_compute_engine/__init__.py | timdebruin/compute-engine | bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4 | [
"Apache-2.0"
] | null | null | null | larq_compute_engine/__init__.py | timdebruin/compute-engine | bdd3c080ea330ad911cfb6b02dd41b6c574a7cf4 | [
"Apache-2.0"
] | null | null | null | from larq_compute_engine.tf.python.ops.compute_engine_ops import bsign
from larq_compute_engine.tf.python.ops.compute_engine_ops import (
bconv2d,
bconv2d8,
bconv2d32,
bconv2d64,
)
from larq_compute_engine.tf.python.modelconverter import ModelConverter
__all__ = ["bsign", "bconv2d", "bconv2d8", "bconv2... | 32.454545 | 86 | 0.778711 |
a158f7ef8334a9a1abc52e6b5df5be350304a39a | 4,623 | py | Python | tests/test_multi_head.py | SpereShelde/keras-multi-head | a09b46f544b3886c9747ef969be8237a5e93ae6e | [
"MIT"
] | 214 | 2018-10-11T03:02:58.000Z | 2022-03-20T05:09:09.000Z | tests/test_multi_head.py | SpereShelde/keras-multi-head | a09b46f544b3886c9747ef969be8237a5e93ae6e | [
"MIT"
] | 10 | 2019-04-29T16:54:00.000Z | 2021-06-19T09:22:54.000Z | tests/test_multi_head.py | SpereShelde/keras-multi-head | a09b46f544b3886c9747ef969be8237a5e93ae6e | [
"MIT"
] | 46 | 2018-11-11T13:17:20.000Z | 2022-03-18T09:24:13.000Z | import os
import tempfile
import unittest
import numpy as np
from keras_self_attention.backend import keras
from keras_self_attention import SeqSelfAttention as Attention
from keras_multi_head import MultiHead
class MaskFlatten(keras.layers.Flatten):
def __init__(self, **kwargs):
self.supports_masking = ... | 40.552632 | 101 | 0.625568 |
41817971e952159560a526eca28f722e29c7a5c6 | 9,991 | py | Python | test_voc.py | hisham32/frcnn-from-scratch-with-keras | 6d2d869abf67fc376eec8eb5fb8beb516a6ffb61 | [
"Apache-2.0"
] | 170 | 2018-09-04T18:35:07.000Z | 2022-03-30T10:33:09.000Z | test_voc.py | hisham32/frcnn-from-scratch-with-keras | 6d2d869abf67fc376eec8eb5fb8beb516a6ffb61 | [
"Apache-2.0"
] | 95 | 2018-11-09T16:51:44.000Z | 2022-01-25T08:36:09.000Z | test_voc.py | hisham32/frcnn-from-scratch-with-keras | 6d2d869abf67fc376eec8eb5fb8beb516a6ffb61 | [
"Apache-2.0"
] | 116 | 2018-11-09T16:44:36.000Z | 2022-03-13T08:03:10.000Z | from __future__ import division
import os
import cv2
import numpy as np
import sys
import pickle
from optparse import OptionParser
import time
from keras_frcnn import config
from keras import backend as K
from keras.layers import Input
from keras.models import Model
from keras_frcnn import roi_helpers
from keras_frcnn.... | 33.303333 | 152 | 0.705535 |
b8ed3192d68c29cdc4f6809e107a85943e45a27b | 8,397 | py | Python | src/scripts/tune_ts_transformer_oasis_test.py | paavalipopov/introspection | ee486a9e8c8b6ddb7ab257eae9e14aac5d637527 | [
"Apache-2.0"
] | null | null | null | src/scripts/tune_ts_transformer_oasis_test.py | paavalipopov/introspection | ee486a9e8c8b6ddb7ab257eae9e14aac5d637527 | [
"Apache-2.0"
] | null | null | null | src/scripts/tune_ts_transformer_oasis_test.py | paavalipopov/introspection | ee486a9e8c8b6ddb7ab257eae9e14aac5d637527 | [
"Apache-2.0"
] | null | null | null | # pylint: disable-all
import argparse
from animus import EarlyStoppingCallback, IExperiment
from animus.torch.callbacks import TorchCheckpointerCallback
from apto.utils.report import get_classification_report
from catalyst import utils
import numpy as np
import optuna
from sklearn.model_selection import train_test_spl... | 33.722892 | 99 | 0.588544 |
47fc05eeec213fe842f32668556f1f253b76a5da | 2,235 | py | Python | tests/mkldnnpy_tests/test_fixed_batch_normalization.py | mingxiaoh/chainer-v3 | 815ff00f5eaf7944d6e8a75662ff64a2fe046a4d | [
"BSD-3-Clause"
] | null | null | null | tests/mkldnnpy_tests/test_fixed_batch_normalization.py | mingxiaoh/chainer-v3 | 815ff00f5eaf7944d6e8a75662ff64a2fe046a4d | [
"BSD-3-Clause"
] | null | null | null | tests/mkldnnpy_tests/test_fixed_batch_normalization.py | mingxiaoh/chainer-v3 | 815ff00f5eaf7944d6e8a75662ff64a2fe046a4d | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import unittest
import chainer.functions as F
import chainer.testing as testing
import chainer.testing.condition as condition
import time
from chainer import mkld
@testing.parameterize(*testing.product({
'dtype': [np.float32],
'channel': [2, 4, 8, 16, 24]
}))
class TestBatchNormalizationVal... | 34.921875 | 91 | 0.624161 |
40749a3f50c3363ccca1470625d8870a24a9c009 | 273 | py | Python | Packs/CaseManagement-Generic/Scripts/GenerateSummaryReportButton/GenerateSummaryReportButton.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CaseManagement-Generic/Scripts/GenerateSummaryReportButton/GenerateSummaryReportButton.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CaseManagement-Generic/Scripts/GenerateSummaryReportButton/GenerateSummaryReportButton.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
# get incident id
incident_id = demisto.incidents()[0].get('id')
# generate the Case Report
demisto.results(demisto.executeCommand("generateSummaryReport", {
"incidentId": incident_id, "name": "Case Report", "type": "pdf"}))
| 30.333333 | 82 | 0.699634 |
d6ef5a8453caa7bac91d0b4aab4a19d1b915ce39 | 6,688 | py | Python | userbot/modules/system_stats.py | kdjsisichdjandnf/teon | 9389505723dc7d17be82196985f060e18158c6af | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 2 | 2020-05-24T15:03:39.000Z | 2020-09-28T14:02:41.000Z | userbot/modules/system_stats.py | kdjsisichdjandnf/teon | 9389505723dc7d17be82196985f060e18158c6af | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/system_stats.py | kdjsisichdjandnf/teon | 9389505723dc7d17be82196985f060e18158c6af | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-06-28T09:53:41.000Z | 2020-06-28T09:53:41.000Z | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
""" Userbot module for getting information about the server. """
from asyncio import create_subprocess_exec as asyncru... | 36.747253 | 80 | 0.490879 |
f967080633ec522a1a43e2e9b90ea7ccca4aa564 | 40,816 | py | Python | python/fedml/cli/server_deployment/server_runner.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | python/fedml/cli/server_deployment/server_runner.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | python/fedml/cli/server_deployment/server_runner.py | ray-ruisun/FedML | 24ff30d636bb70f64e94e9ca205375033597d3dd | [
"Apache-2.0"
] | null | null | null | import base64
import copy
import json
import multiprocessing
import os
import platform
import re
import shutil
import signal
import stat
import subprocess
import time
import traceback
import urllib
import uuid
import zipfile
from os import listdir
from os.path import expanduser
import psutil
import requests
import ya... | 49.714982 | 138 | 0.626201 |
cb1e931faab4f73e38200228153231a4e14b5326 | 2,637 | py | Python | tests/unit/test_netblow.py | viniciusarcanjo/netblow | 01a2c3a60c5f9eb7e6c199612dedcd01c5dc23ba | [
"Apache-2.0"
] | 8 | 2018-10-07T17:44:46.000Z | 2022-03-24T21:40:57.000Z | tests/unit/test_netblow.py | viniciusarcanjo/netblow | 01a2c3a60c5f9eb7e6c199612dedcd01c5dc23ba | [
"Apache-2.0"
] | 8 | 2018-04-29T20:47:28.000Z | 2018-05-01T18:51:58.000Z | tests/unit/test_netblow.py | viniciusarcanjo/netblow | 01a2c3a60c5f9eb7e6c199612dedcd01c5dc23ba | [
"Apache-2.0"
] | 1 | 2019-04-27T08:48:50.000Z | 2019-04-27T08:48:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import pytest
from unittest.mock import MagicMock
from threading import Thread
from unit_fixtures import funcs
from unit_fixtures import topology
from unit_fixtures import netblow
from unit_fixtures import netblow_salt
from netblow.netblow import NetBlow
def ... | 27.185567 | 85 | 0.696625 |
295d680807473d6381a51af184f4a64e3ec44b55 | 10,608 | py | Python | evidently/widgets/cat_target_pred_feature_table_widget.py | jayeshmalu/evidently | 789f9a04827d166369d965eacbd11306eac6b961 | [
"Apache-2.0"
] | 1 | 2021-05-08T01:58:08.000Z | 2021-05-08T01:58:08.000Z | evidently/widgets/cat_target_pred_feature_table_widget.py | felipeescallon/evidently | f6243973998a74e3bdbfe891b02bccc35888e349 | [
"Apache-2.0"
] | null | null | null | evidently/widgets/cat_target_pred_feature_table_widget.py | felipeescallon/evidently | f6243973998a74e3bdbfe891b02bccc35888e349 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import json
import pandas as pd
from pandas.api.types import is_numeric_dtype
import numpy as np
from scipy.stats import ks_2samp, chisquare
import plotly.graph_objs as go
import plotly.express as px
from evidently.model.widget import BaseWidgetInfo, AlertStats, AdditionalGraph... | 38.857143 | 120 | 0.445136 |
bded6ddb6d4aac2effba6d44ccbd4023b0b3374c | 4,780 | py | Python | simfile/tests/test_ssc.py | ianklatzco/simfile | 8f4ec2fb9437b4071f6f92cca3d8de1b4071a2bc | [
"MIT"
] | null | null | null | simfile/tests/test_ssc.py | ianklatzco/simfile | 8f4ec2fb9437b4071f6f92cca3d8de1b4071a2bc | [
"MIT"
] | null | null | null | simfile/tests/test_ssc.py | ianklatzco/simfile | 8f4ec2fb9437b4071f6f92cca3d8de1b4071a2bc | [
"MIT"
] | null | null | null | from copy import deepcopy
import unittest
from ..ssc import *
def testing_chart():
return """
#NOTEDATA:;
#CHARTNAME:Brackets;
#STEPSTYPE:dance-single;
#DESCRIPTION:Brackets;
#CHARTSTYLE:;
#DIFFICULTY:Edit;
#METER:12;
#RADARVALUES:0.793,1.205,0.500,0.298,0.961;
#CREDIT:shala*;
#NOTES:
0000
0000
0000
0000
;
... | 26.703911 | 80 | 0.601674 |
2b5d88750267c98dc99c825e4d651a96fda3d33e | 6,197 | py | Python | src/MMSA/models/subNets/transformers_encoder/multihead_attention.py | dumpmemory/MMSA | 08b3a7f4529c380356eeb1cf6bf9a89e7c9701e7 | [
"MIT"
] | 1 | 2022-03-30T02:04:21.000Z | 2022-03-30T02:04:21.000Z | src/MMSA/models/subNets/transformers_encoder/multihead_attention.py | dumpmemory/MMSA | 08b3a7f4529c380356eeb1cf6bf9a89e7c9701e7 | [
"MIT"
] | null | null | null | src/MMSA/models/subNets/transformers_encoder/multihead_attention.py | dumpmemory/MMSA | 08b3a7f4529c380356eeb1cf6bf9a89e7c9701e7 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from torch import nn
from torch.nn import Parameter
# Code adapted from the fairseq repo.
class MultiheadAttention(nn.Module):
"""Multi-headed attention.
See "Attention Is All You Need" for more details.
"""
def __init__(self, embed_dim, num_heads, attn_dr... | 39.471338 | 102 | 0.607875 |
f0a43cc8c6e4910704cd8d342dd286ddffd5e64a | 2,174 | py | Python | epytope/Data/pssms/tepitopepan/mat/DRB1_0330_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:11:28.000Z | 2022-01-31T19:14:07.000Z | epytope/Data/pssms/tepitopepan/mat/DRB1_0330_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 22 | 2021-01-02T15:25:23.000Z | 2022-03-14T11:32:53.000Z | epytope/Data/pssms/tepitopepan/mat/DRB1_0330_9.py | christopher-mohr/epytope | 8ac9fe52c0b263bdb03235a5a6dffcb72012a4fd | [
"BSD-3-Clause"
] | 4 | 2021-05-28T08:50:38.000Z | 2022-03-14T11:45:32.000Z | DRB1_0330_9 = {0: {'A': -999.0, 'E': -999.0, 'D': -999.0, 'G': -999.0, 'F': -0.98558, 'I': -0.014418, 'H': -999.0, 'K': -999.0, 'M': -0.014418, 'L': -0.014418, 'N': -999.0, 'Q': -999.0, 'P': -999.0, 'S': -999.0, 'R': -999.0, 'T': -999.0, 'W': -0.98558, 'V': -0.014418, 'Y': -0.98558}, 1: {'A': 0.0, 'E': 0.1, 'D': -1.3, ... | 2,174 | 2,174 | 0.398344 |
83e415e76fea4ae2e744ad83f199bfcd28537b45 | 5,580 | py | Python | configs/cascade_rcnn/traffic_sign/cascade_rcnn_r50_fpn_20e_mstrain_wo_dup_lr0.01_full_traffic_sign.py | tuanphan09/mmdetection | ee63547c02c615f9c61a13e3f34747098a9cd90a | [
"Apache-2.0"
] | null | null | null | configs/cascade_rcnn/traffic_sign/cascade_rcnn_r50_fpn_20e_mstrain_wo_dup_lr0.01_full_traffic_sign.py | tuanphan09/mmdetection | ee63547c02c615f9c61a13e3f34747098a9cd90a | [
"Apache-2.0"
] | null | null | null | configs/cascade_rcnn/traffic_sign/cascade_rcnn_r50_fpn_20e_mstrain_wo_dup_lr0.01_full_traffic_sign.py | tuanphan09/mmdetection | ee63547c02c615f9c61a13e3f34747098a9cd90a | [
"Apache-2.0"
] | null | null | null | # The new config inherits a base config to highlight the necessary modification
_base_ = '../cascade_rcnn_r50_fpn_1x_coco.py'
# We also need to change the num_classes in head to match the dataset's annotation
model = dict(
pretrained=None,
backbone=dict(
type='ResNet',
depth=50,
num_sta... | 37.959184 | 117 | 0.507348 |
49471dc4dbe201aa2fbac17cccd239bb3b0e560c | 6,562 | py | Python | ai_flow_plugins/tests/scheduler_plugins/airflow/test_airflow_scheduler.py | ideax-business/ai-flow | 0a7797a093beddf827f68cad7a11e0babf1b5059 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | ai_flow_plugins/tests/scheduler_plugins/airflow/test_airflow_scheduler.py | ideax-business/ai-flow | 0a7797a093beddf827f68cad7a11e0babf1b5059 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | ai_flow_plugins/tests/scheduler_plugins/airflow/test_airflow_scheduler.py | ideax-business/ai-flow | 0a7797a093beddf827f68cad7a11e0babf1b5059 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # 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... | 47.89781 | 115 | 0.715788 |
ae685c7c8c1b7a57a1f36a0267aa3be828ad00fd | 2,288 | py | Python | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveDomainRealTimeBpsDataRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveDomainRealTimeBpsDataRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-live/aliyunsdklive/request/v20161101/DescribeLiveDomainRealTimeBpsDataRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # 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... | 34.149254 | 93 | 0.766171 |
bb66af1874c1dee9847e8149227736793a438394 | 16,763 | py | Python | electrum/lnwatcher.py | janoside/electrum | a65f79aeb5004a34391fd8537935ecbe0d4f058e | [
"MIT"
] | null | null | null | electrum/lnwatcher.py | janoside/electrum | a65f79aeb5004a34391fd8537935ecbe0d4f058e | [
"MIT"
] | null | null | null | electrum/lnwatcher.py | janoside/electrum | a65f79aeb5004a34391fd8537935ecbe0d4f058e | [
"MIT"
] | null | null | null | # Copyright (C) 2018 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
from typing import NamedTuple, Iterable, TYPE_CHECKING
import os
import queue
import threading
import concurrent
from collections import d... | 40.00716 | 147 | 0.642069 |
df394236651dc532a685930be6f511ea2ae20792 | 2,374 | py | Python | test_haystack/test_app_loading.py | lvelezsantos/django-haystack | 3bb3275cd009f1bddd7e307621c3140922ae4659 | [
"BSD-3-Clause"
] | 3 | 2020-06-05T14:54:25.000Z | 2020-06-05T14:54:31.000Z | test_haystack/test_app_loading.py | lvelezsantos/django-haystack | 3bb3275cd009f1bddd7e307621c3140922ae4659 | [
"BSD-3-Clause"
] | 1 | 2020-09-18T05:23:52.000Z | 2020-09-18T05:23:52.000Z | test_haystack/test_app_loading.py | lvelezsantos/django-haystack | 3bb3275cd009f1bddd7e307621c3140922ae4659 | [
"BSD-3-Clause"
] | 3 | 2018-02-12T12:05:09.000Z | 2018-02-28T11:23:50.000Z | # encoding: utf-8
from types import GeneratorType, ModuleType
from django.test import TestCase
from django.urls import reverse
from haystack.utils import app_loading
class AppLoadingTests(TestCase):
def test_load_apps(self):
apps = app_loading.haystack_load_apps()
self.assertIsInstance(apps, (li... | 32.972222 | 80 | 0.664701 |
02c3df0c99123d42e6a5c9dd2c088d6a7c952fff | 6,932 | py | Python | openpeerpower/components/persistent_notification/__init__.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | null | null | null | openpeerpower/components/persistent_notification/__init__.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | null | null | null | openpeerpower/components/persistent_notification/__init__.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | 1 | 2019-04-24T14:10:08.000Z | 2019-04-24T14:10:08.000Z | """Support for displaying persistent notifications."""
from collections import OrderedDict
import logging
from typing import Any, Mapping, MutableMapping, Optional
import voluptuous as vol
from openpeerpower.components import websocket_api
from openpeerpower.core import OpenPeerPower, callback
from openpeerpower.exce... | 30.672566 | 87 | 0.668061 |
e0ef9bce5e87aa31386e4253a0d246ce6c621dd9 | 2,663 | py | Python | python_code/easy/412_Fizz_Buzz_easy/solution.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | python_code/easy/412_Fizz_Buzz_easy/solution.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | python_code/easy/412_Fizz_Buzz_easy/solution.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 - present, Timur Shenkao
# 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 appl... | 37.507042 | 117 | 0.579046 |
64383a8ff35c3a94d43d70f7835fd5624d99e27e | 377 | py | Python | network_scripts/test.py | Shaimyst/test-repo | 15cba978ccd51cd0134efffa61618c41a7294855 | [
"MIT"
] | null | null | null | network_scripts/test.py | Shaimyst/test-repo | 15cba978ccd51cd0134efffa61618c41a7294855 | [
"MIT"
] | null | null | null | network_scripts/test.py | Shaimyst/test-repo | 15cba978ccd51cd0134efffa61618c41a7294855 | [
"MIT"
] | null | null | null | # goal: make network requests with python script
import requests
import json
# res = requests.get('https://example.com/')
# print(res.text)
res = requests.get('https://www.epidemicsound.com/api/subscription_service/recurly/plans/')
res_json = res.text
res_data = json.loads(res_json)
back_to_json = json.dumps(res_d... | 23.5625 | 91 | 0.761273 |
ab7135eb0c319326162f64d929a8ff2ba46c9182 | 2,550 | py | Python | config/urls.py | android-sushi/imitate_sfa | 44eedfbd489ab63cc8e40d3f7658430e1642ed85 | [
"MIT"
] | null | null | null | config/urls.py | android-sushi/imitate_sfa | 44eedfbd489ab63cc8e40d3f7658430e1642ed85 | [
"MIT"
] | null | null | null | config/urls.py | android-sushi/imitate_sfa | 44eedfbd489ab63cc8e40d3f7658430e1642ed85 | [
"MIT"
] | null | null | null | from django.urls import path
from schedule import views
urlpatterns = [
# トップページ
path('', views.IndexView.as_view(), name='index'),
# 予定一覧
path('schedule', views.ScheduleListView.as_view(), name='schedule_list'),
path('schedule/create', views.ScheduleCreateView.as_view(), name='schedule_create'),
... | 59.302326 | 97 | 0.701961 |
e895001160a181dc7c2bd8693093483757177f27 | 21,348 | py | Python | ax/core/batch_trial.py | dme65/Ax | c460eab90d464df87e6478b5765fd02fb5126adb | [
"MIT"
] | 1 | 2021-11-18T07:18:46.000Z | 2021-11-18T07:18:46.000Z | ax/core/batch_trial.py | dme65/Ax | c460eab90d464df87e6478b5765fd02fb5126adb | [
"MIT"
] | null | null | null | ax/core/batch_trial.py | dme65/Ax | c460eab90d464df87e6478b5765fd02fb5126adb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from collections import OrderedDict, defaultdict
from datetime import datetime
from typing import (
TYPE_CHECKING,
... | 39.75419 | 88 | 0.639404 |
673d7a9694fe371458c60aea444f27576a58f311 | 1,312 | py | Python | models.py | zhufuzz/All_Mighty_Reserve | 87340b5c104d5f0bb2fcf6b08aeec0202b537d41 | [
"Apache-2.0"
] | null | null | null | models.py | zhufuzz/All_Mighty_Reserve | 87340b5c104d5f0bb2fcf6b08aeec0202b537d41 | [
"Apache-2.0"
] | null | null | null | models.py | zhufuzz/All_Mighty_Reserve | 87340b5c104d5f0bb2fcf6b08aeec0202b537d41 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
"""
models.py
"""
from google.appengine.ext import ndb
class Resource(ndb.Model):
"""Resource: ..."""
author = ndb.UserProperty(indexed=True)
name = ndb.StringProperty(indexed=True)
tags = ndb.StringProperty(indexed=True, repeated = True)
description = ndb.TextProperty(indexed=False)
pubDate ... | 27.914894 | 57 | 0.778201 |
8939de18487b3cea0325ee76de5529ebbeab16e1 | 9,083 | py | Python | app/cogs/base/base_commands.py | CircuitsBots/Starboard-2 | 0c5510f210a387d1173ff20743648a47e4110780 | [
"MIT"
] | 16 | 2021-01-19T19:12:00.000Z | 2021-12-21T12:00:04.000Z | app/cogs/base/base_commands.py | Davi-the-Mudkip/Starboard-2 | 4de3c689ffef007e4f4a279251d107d890b69b15 | [
"MIT"
] | 15 | 2021-04-02T16:58:48.000Z | 2022-03-28T06:09:49.000Z | app/cogs/base/base_commands.py | Davi-the-Mudkip/Starboard-2 | 4de3c689ffef007e4f4a279251d107d890b69b15 | [
"MIT"
] | 13 | 2021-01-21T14:26:00.000Z | 2021-09-29T18:55:17.000Z | import time
import discord
from discord.ext.prettyhelp import bot_has_permissions
import config
from app import commands, converters
from app.classes.bot import Bot
from app.classes.context import MyContext
from app.i18n import t_
from app.utils import clean_prefix, ms
class Base(
commands.Cog, description=t_("... | 34.018727 | 79 | 0.49389 |
2bd426171f26821820847a232e81bbcab0ebb6ed | 1,200 | py | Python | lib/bes/system/host_override.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | lib/bes/system/host_override.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | lib/bes/system/host_override.py | reconstruir/bes | 82ff54b2dadcaef6849d7de424787f1dedace85c | [
"Apache-2.0"
] | null | null | null | #-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-
from .host import host
from .host_info import host_info
from functools import wraps
class host_override(object):
'A class with context support for overriding the host info. Mostly for unit testing.'
def __init__(self, i... | 27.906977 | 90 | 0.6925 |
65068752173ff8496ea92ef86734fd33b8fb3623 | 77 | py | Python | Introduction to Python/Introduction to Python Smallpiece 2018/Data structures/Lists introduction/lists.py | phamola/firstproject1 | 1e2aaafeb7abf9c82e4c823f197fc1fbefce6416 | [
"Apache-2.0"
] | null | null | null | Introduction to Python/Introduction to Python Smallpiece 2018/Data structures/Lists introduction/lists.py | phamola/firstproject1 | 1e2aaafeb7abf9c82e4c823f197fc1fbefce6416 | [
"Apache-2.0"
] | null | null | null | Introduction to Python/Introduction to Python Smallpiece 2018/Data structures/Lists introduction/lists.py | phamola/firstproject1 | 1e2aaafeb7abf9c82e4c823f197fc1fbefce6416 | [
"Apache-2.0"
] | null | null | null | squares = [1, 4, 9, 16, 25] # create new list
print(squares)
print(slice)
| 15.4 | 47 | 0.636364 |
212a47705dafa2b2a9d7e6a850b4dfd53dcaa03f | 1,413 | py | Python | test/test_task_includes.py | cognifloyd/ansible-lint | f9ad8ea39705850b7753e4cb13c3cc7c82f176f8 | [
"MIT"
] | null | null | null | test/test_task_includes.py | cognifloyd/ansible-lint | f9ad8ea39705850b7753e4cb13c3cc7c82f176f8 | [
"MIT"
] | null | null | null | test/test_task_includes.py | cognifloyd/ansible-lint | f9ad8ea39705850b7753e4cb13c3cc7c82f176f8 | [
"MIT"
] | null | null | null | """Tests related to task inclusions."""
import pytest
from ansiblelint.file_utils import Lintable
from ansiblelint.rules import RulesCollection
from ansiblelint.runner import Runner
@pytest.mark.parametrize(
("filename", "file_count", "match_count"),
(
pytest.param("examples/playbooks/blockincludes.y... | 30.06383 | 87 | 0.619958 |
4045e2b8960e912fdb804a76436ddac463a4713b | 3,927 | py | Python | pcf/test/particle/gcp/storage/test_storage.py | davidyum/Particle-Cloud-Framework | f6325a60a3838f86bd73bf4071438e12f9c68f8d | [
"Apache-2.0"
] | null | null | null | pcf/test/particle/gcp/storage/test_storage.py | davidyum/Particle-Cloud-Framework | f6325a60a3838f86bd73bf4071438e12f9c68f8d | [
"Apache-2.0"
] | null | null | null | pcf/test/particle/gcp/storage/test_storage.py | davidyum/Particle-Cloud-Framework | f6325a60a3838f86bd73bf4071438e12f9c68f8d | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Capital One Services, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 33.853448 | 115 | 0.701808 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.