hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
089dfc68769e25ba610e08b00a5deef6488b826c | 2,254 | py | Python | tests/unit/test_server.py | gruyaume/grafana-k8s-operator | 6fe48473f20916c41b94a872abc29acb3c4a0b33 | [
"Apache-2.0"
] | 1 | 2022-02-22T01:32:10.000Z | 2022-02-22T01:32:10.000Z | tests/unit/test_server.py | gruyaume/grafana-k8s-operator | 6fe48473f20916c41b94a872abc29acb3c4a0b33 | [
"Apache-2.0"
] | 34 | 2021-12-10T01:28:42.000Z | 2022-03-28T23:12:44.000Z | tests/unit/test_server.py | gruyaume/grafana-k8s-operator | 6fe48473f20916c41b94a872abc29acb3c4a0b33 | [
"Apache-2.0"
] | 3 | 2022-02-21T23:10:26.000Z | 2022-03-16T20:46:07.000Z | # Copyright 2020 Canonical Ltd.
# See LICENSE file for licensing details.
import json
import unittest
from unittest.mock import patch
import urllib3
from grafana_server import Grafana
class TestServer(unittest.TestCase):
def setUp(self):
self.grafana = Grafana("localhost", 9090)
@patch("src.grafan... | 32.2 | 114 | 0.587844 |
089e1a6c855e0c7a9d832125c1c4d18ee589adf4 | 838 | py | Python | stests/generators/wg_100/p2s3_assert_balances.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 4 | 2020-03-10T15:28:17.000Z | 2021-10-02T11:41:17.000Z | stests/generators/wg_100/p2s3_assert_balances.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 1 | 2020-03-25T11:31:44.000Z | 2020-03-25T11:31:44.000Z | stests/generators/wg_100/p2s3_assert_balances.py | goral09/stests | 4de26485535cadf1b708188a7133a976536ccba3 | [
"Apache-2.0"
] | 9 | 2020-02-25T18:43:42.000Z | 2021-08-10T17:08:42.000Z | import typing
from stests import chain
from stests.core import cache
from stests.core import factory
from stests.core.types.orchestration import ExecutionContext
from stests.generators.utils import accounts
from stests.generators.utils import constants
from stests.generators.utils import verification
# Step label.
... | 31.037037 | 113 | 0.781623 |
089e4ce9b4d7afe693bafd36e9057ec589e522f4 | 8,745 | py | Python | my_configs/ls_configs/cascade_rcnn_rest101.py | Daniel-xsy/MMDet_VisDrone2021 | 668d10b61a4b99dda0163b67b093cad2e699ee3b | [
"Apache-2.0"
] | null | null | null | my_configs/ls_configs/cascade_rcnn_rest101.py | Daniel-xsy/MMDet_VisDrone2021 | 668d10b61a4b99dda0163b67b093cad2e699ee3b | [
"Apache-2.0"
] | null | null | null | my_configs/ls_configs/cascade_rcnn_rest101.py | Daniel-xsy/MMDet_VisDrone2021 | 668d10b61a4b99dda0163b67b093cad2e699ee3b | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/datasets/det_visdrone_add_val_p1.py',
'../_base_/schedules/schedule_1x.py',
'../_base_/default_runtime.py'
]
norm_cfg = dict(type='SyncBN', requires_grad=True)
model = dict(
type='CascadeRCNN',
pretrained='open-mmlab://resnest101',
backbone=dict(
type='ResNeSt',
... | 35.693878 | 239 | 0.501887 |
089e7ecf660f551a037fc627d6b7ff9db5f2abc6 | 21,934 | py | Python | tests/keys_tests.py | gmr/tredis | 2e91c6a58a35460be0525c51ac6a98fde3b506ad | [
"BSD-3-Clause"
] | 22 | 2015-11-16T18:24:23.000Z | 2019-01-22T06:41:51.000Z | tests/keys_tests.py | gmr/tredis | 2e91c6a58a35460be0525c51ac6a98fde3b506ad | [
"BSD-3-Clause"
] | 8 | 2016-01-26T21:55:15.000Z | 2020-11-17T18:00:13.000Z | tests/keys_tests.py | gmr/tredis | 2e91c6a58a35460be0525c51ac6a98fde3b506ad | [
"BSD-3-Clause"
] | 9 | 2015-11-28T19:32:14.000Z | 2020-10-19T06:47:26.000Z | import logging
import mock
import os
import time
import uuid
from tornado import gen, testing
import tredis
from tredis import exceptions
from . import base
class KeyCommandTests(base.AsyncTestCase):
@testing.gen_test
def test_delete(self):
key, value = self.uuid4(2)
result = yield self.ex... | 36.31457 | 76 | 0.622367 |
089e9b26c0c3d2deb192aebc93d94e2ed6486ae3 | 4,989 | py | Python | helpdesk/management/commands/create_escalation_exclusions.py | gjedeer/django-helpdesk | 6618e5323f779356bae3aeabebe4afd2aa1ff8ce | [
"MIT"
] | null | null | null | helpdesk/management/commands/create_escalation_exclusions.py | gjedeer/django-helpdesk | 6618e5323f779356bae3aeabebe4afd2aa1ff8ce | [
"MIT"
] | null | null | null | helpdesk/management/commands/create_escalation_exclusions.py | gjedeer/django-helpdesk | 6618e5323f779356bae3aeabebe4afd2aa1ff8ce | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
Jutda Helpdesk - A Django powered ticket tracker for small enterprise.
(c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details.
scripts/create_escalation_exclusion.py - Easy way to routinely add particular
days to the list of days on which ... | 31.18125 | 108 | 0.547805 |
089e9c1c6cf6d1cc81e623f3d2c8f6210c688ef7 | 2,607 | py | Python | tests/home_platform/test_core.py | LuCeHe/home-platform | 06f9370bfacecebd0c8623a3b8f0511532a9a1f0 | [
"BSD-3-Clause"
] | 1 | 2021-07-27T09:15:43.000Z | 2021-07-27T09:15:43.000Z | tests/home_platform/test_core.py | LuCeHe/home-platform | 06f9370bfacecebd0c8623a3b8f0511532a9a1f0 | [
"BSD-3-Clause"
] | null | null | null | tests/home_platform/test_core.py | LuCeHe/home-platform | 06f9370bfacecebd0c8623a3b8f0511532a9a1f0 | [
"BSD-3-Clause"
] | 1 | 2021-07-27T09:21:12.000Z | 2021-07-27T09:21:12.000Z | # Copyright (c) 2017, IGLU consortium
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and... | 41.380952 | 86 | 0.735712 |
089eec36b89defec5a691bff9a65178cac026a09 | 15,683 | py | Python | tape_mounts/whpss/src/analyze_logs.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | tape_mounts/whpss/src/analyze_logs.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | tape_mounts/whpss/src/analyze_logs.py | zdvresearch/fast15-paper-addons | 8001f658ba819202186bf84892f4718eefd021fe | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import gzip
import sys
# assume all timestamps to be UTC.
import time
import calendar
import datetime
import sets
import re
import simplejson as json
import glob
versions={}
versions["analysis_version"] = 1
class Timer():
def __init__(self, s):
self.s = s
def __ente... | 42.272237 | 269 | 0.556909 |
089f121dfce2678835a1a67491a1fbb1f0ca6e0d | 84,827 | py | Python | tests/test_util.py | bgorr/instrupy | e3dca871ce2dcd2ef279898fcc36bf9d18f0c243 | [
"Apache-2.0"
] | null | null | null | tests/test_util.py | bgorr/instrupy | e3dca871ce2dcd2ef279898fcc36bf9d18f0c243 | [
"Apache-2.0"
] | null | null | null | tests/test_util.py | bgorr/instrupy | e3dca871ce2dcd2ef279898fcc36bf9d18f0c243 | [
"Apache-2.0"
] | null | null | null | """Unit tests for instrupy.util module.
"""
import json
import unittest
import numpy as np
from instrupy.util import *
class TestEntity(unittest.TestCase):
class ChildClass(Entity):
def __init__(self):
self._id = 123
self.name = "Ramesh"
self.record = {"... | 55.370104 | 222 | 0.626157 |
089f2ff4f47fb7da234ad63bf18c903278e28498 | 14,000 | py | Python | tensorflow_probability/python/math/root_search.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/math/root_search.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/math/root_search.py | timudk/probability | 8bdbf1c0b0f801edaf342f4ffc9caf1cfd6f1103 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 43.209877 | 80 | 0.683143 |
089f4668ba3183858532a81f39a6333dddfeb97a | 6,193 | py | Python | python/ct/client/log_client_test_util.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | python/ct/client/log_client_test_util.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | python/ct/client/log_client_test_util.py | San3132308912/certificate-transparency | 16bbaac317c6daff057ab7214852fc8d9d89dccd | [
"Apache-2.0"
] | null | null | null | from ct.client import log_client
from ct.crypto import merkle
from ct.proto import client_pb2
DEFAULT_STH = client_pb2.SthResponse()
DEFAULT_STH.timestamp = 1234
DEFAULT_STH.tree_size = 1000
DEFAULT_STH.sha256_root_hash = "hash\x00"
DEFAULT_STH.tree_head_signature = "sig\xff"
DEFAULT_FAKE_PROOF = [(_c*32) for _c in "... | 34.21547 | 79 | 0.602293 |
089f69b2083c7dab71890f694c56a6ce1f7867bf | 68,000 | py | Python | tests/unit/modules/boto_vpc_test.py | rfairburn/salt | 7e44444e873e1cb1d2fe13e39b0edea3779a2b5e | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | tests/unit/modules/boto_vpc_test.py | rfairburn/salt | 7e44444e873e1cb1d2fe13e39b0edea3779a2b5e | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | tests/unit/modules/boto_vpc_test.py | rfairburn/salt | 7e44444e873e1cb1d2fe13e39b0edea3779a2b5e | [
"Apache-2.0"
] | 1 | 2017-01-27T21:33:36.000Z | 2017-01-27T21:33:36.000Z | # -*- coding: utf-8 -*-
# TODO: Update skipped tests to expect dicttionary results from the execution
# module functions.
# Import Python libs
from __future__ import absolute_import
from distutils.version import LooseVersion # pylint: disable=import-error,no-name-in-module
# Import Salt Testing libs
from sal... | 41.312272 | 180 | 0.679706 |
089f764cfd11f7b7111a2f67f96c6860283bb309 | 1,162 | py | Python | tests/test_control.py | saaros/poni | 1d2a9982f7e934137ce1ee675f0e1373314df7c7 | [
"Apache-2.0"
] | 6 | 2015-05-11T12:21:53.000Z | 2018-01-17T00:07:29.000Z | tests/test_control.py | saaros/poni | 1d2a9982f7e934137ce1ee675f0e1373314df7c7 | [
"Apache-2.0"
] | null | null | null | tests/test_control.py | saaros/poni | 1d2a9982f7e934137ce1ee675f0e1373314df7c7 | [
"Apache-2.0"
] | 2 | 2015-02-27T10:14:26.000Z | 2015-02-27T10:14:30.000Z | import json
from poni import tool
from helper import *
plugin_text = """
import argh
from poni import config
class PlugIn(config.PlugIn):
@config.control(provides=["foo"])
@argh.arg("output")
def foo(self, arg):
open(arg.output, "a").write("foo")
@config.control(requires=["foo"])
@argh.ar... | 25.26087 | 66 | 0.585198 |
089f86c5ed7ab2414c648f34040d790266f82c82 | 4,551 | py | Python | alipay/aop/api/domain/ZhimaCustomerFulfillmentSyncModel.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/domain/ZhimaCustomerFulfillmentSyncModel.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/domain/ZhimaCustomerFulfillmentSyncModel.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.constant.ParamConstants import *
class ZhimaCustomerFulfillmentSyncModel(object):
def __init__(self):
self._ext_info = None
self._gmt_service = None
self._service_id = None
self._subject_delta_num = Non... | 31.171233 | 85 | 0.600527 |
089fe16bb3df1cdfdc6b02ebe85493e9d516aae5 | 443 | py | Python | setup.py | IDEELResearch/sfspy | a70dc06983739154ec9deb6fb302630b482e30dc | [
"MIT"
] | null | null | null | setup.py | IDEELResearch/sfspy | a70dc06983739154ec9deb6fb302630b482e30dc | [
"MIT"
] | null | null | null | setup.py | IDEELResearch/sfspy | a70dc06983739154ec9deb6fb302630b482e30dc | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
from setuptools import setup
setup(
name = "sfspy",
version = "0.1.0",
description = "A Python interface for manipulating site frequency spectra (SFS)",
url = "http://github.com/IDEELResearch/sfspy",
author = "Andrew Parker Morgan",
author_email='andrew.parker.morgan@gmail.com',
license... | 21.095238 | 82 | 0.683973 |
089fe7a0d75e6aa3aa8fe375744e9630eea6ded1 | 4,805 | py | Python | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/ui/update.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/ui/update.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/ui/update.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from __future__ import absolute_import
#
# This is an extension to the Nautilus file manager to allow better
# integration with the Subversion source control system.
#
# Copyright (C) 2006-2008 by Jason Field <jason@jasonfield.com>
# Copyright (C) 2007-2008 by Bruce van der Kooij <brucevdkooij@gmail.com>
# Copyright ... | 33.368056 | 94 | 0.667014 |
089fec91eda3e18edd2cf8b5be8895b061ab1800 | 2,289 | py | Python | data/scraping/poolred.py | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | null | null | null | data/scraping/poolred.py | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | 8 | 2019-12-04T23:41:37.000Z | 2022-02-10T10:05:09.000Z | data/scraping/poolred.py | loones19/APILoones | 825c13c3c8822bc9b66c2555ffc1d852f3e459f7 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Scrapping www.poolred.com to get the following data:
- Extra Olive Oil
- Virgin Olive Oil
- Lampante (B.1º) Olive Oil
"""
__author__ = "Rafael García Cuéllar"
__email__ = "rafa@loones.es"
__copyright__ = "Copyright (c) 2019 Loones - Rafael García Cuéllar"
__license__ = "Loon... | 34.681818 | 112 | 0.664919 |
08a001704cfbba8a689d739edea58670abc78410 | 4,095 | py | Python | MatricesM/stats/corr.py | MathStuff/MatricesM | b299cac1f60e830d4a66f03e9996bc1f8c7268da | [
"MIT"
] | 4 | 2019-05-04T00:54:52.000Z | 2019-12-11T05:57:16.000Z | MatricesM/stats/corr.py | MathStuff/MatricesM | b299cac1f60e830d4a66f03e9996bc1f8c7268da | [
"MIT"
] | 80 | 2019-01-23T20:47:42.000Z | 2020-02-20T05:53:28.000Z | MatricesM/stats/corr.py | MathStuff/MatricesM | b299cac1f60e830d4a66f03e9996bc1f8c7268da | [
"MIT"
] | 2 | 2019-02-23T12:34:23.000Z | 2020-07-29T17:45:03.000Z | def _corr(mat,col1,col2,population,temp,method,Labelobj):
feats = mat.features.labels
if mat.features.level == 1:
feats = [row[0] for row in feats]
col1 = feats.index(col1)+1 if isinstance(col1,(tuple,str)) else col1
col2 = feats.index(col2)+1 if isinstance(col2,(tuple,str)) else col2
... | 40.147059 | 149 | 0.503053 |
08a010856244085ec18cd65d5a9e339fedaf6515 | 1,179 | py | Python | AlluraTest/alluratest/smtp_debug.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | AlluraTest/alluratest/smtp_debug.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | AlluraTest/alluratest/smtp_debug.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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 Apach... | 43.666667 | 89 | 0.699746 |
08a017627f1c4ab78548d13a934be4d8775581c9 | 263,415 | py | Python | generate_presentation_figures.py | youngmp/park_and_ermentrout_2017 | 1b3b6af46ddbba16f850438571d0103e8eda177c | [
"MIT"
] | 8 | 2018-01-19T02:40:21.000Z | 2019-05-24T09:44:30.000Z | generate_presentation_figures.py | youngmp/park_and_ermentrout_2017 | 1b3b6af46ddbba16f850438571d0103e8eda177c | [
"MIT"
] | null | null | null | generate_presentation_figures.py | youngmp/park_and_ermentrout_2017 | 1b3b6af46ddbba16f850438571d0103e8eda177c | [
"MIT"
] | null | null | null | """
Run to generate figures for presentation.
Requires TeX; may need to install texlive-extra-utils on linux
Requires xppy and Py_XPPCall
the main() function at the end calls the preceding individual figure functions.
figures are saved as both png and pdf.
Copyright (c) 2016, Youngmin Park, Bard Ermentrout
... | 33.910273 | 756 | 0.513889 |
08a02309c20e615e113696c2744df359f3818dd5 | 759 | py | Python | tasks/constants.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | tasks/constants.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | tasks/constants.py | dvanderveer/integrations-core | 41dd9950296455457c9b7342584153678503d5aa | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2010-2017
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
from __future__ import print_function, unicode_literals
import os
# the root of the repo
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Note: these are the names of the folder containing th... | 19.461538 | 66 | 0.628458 |
08a03492910b1cf1fc700d5709742c87094e99bb | 1,006 | py | Python | road_roughness_prediction/tools/detect_blurr.py | mknz/dsr-road-roughness-prediction | 5f56b6ba5da70a09f2c967b7f32c740072e20ed1 | [
"MIT"
] | 7 | 2019-04-04T06:40:29.000Z | 2020-11-12T10:53:30.000Z | road_roughness_prediction/tools/detect_blurr.py | mknz/dsr-road-roughness-prediction | 5f56b6ba5da70a09f2c967b7f32c740072e20ed1 | [
"MIT"
] | 1 | 2021-09-28T07:11:05.000Z | 2021-09-28T07:11:05.000Z | road_roughness_prediction/tools/detect_blurr.py | mknz/dsr-road-roughness-prediction | 5f56b6ba5da70a09f2c967b7f32c740072e20ed1 | [
"MIT"
] | null | null | null | """Detect blurring frames from video"""
import argparse
import cv2
def variance_of_laplacian(image):
return cv2.Laplacian(image, cv2.CV_64F).var()
def show_filtered_image(path, thr=0., wait=1):
cap = cv2.VideoCapture(path)
while cap.isOpened():
_, frame = cap.read()
gray = cv2.cvtColor... | 25.794872 | 60 | 0.626243 |
08a0655690069b54bfcd18756c84b75ebb3c8f80 | 771 | py | Python | tests/nef_class/corrections/psf/_test_deconv.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | tests/nef_class/corrections/psf/_test_deconv.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | tests/nef_class/corrections/psf/_test_deconv.py | twj2417/srf | 63365cfd75199d70eea2273214a4fa580a9fdf2a | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
'''
@author: Minghao Guo
@contact: mh.guo0111@gmail.com
@software: nef
@file: _test_deconv.py
@date: 5/8/2019
@desc:
'''
# import srfnef as nef
# from matplotlib import pyplot as plt
# %matplotlib inline
#
# i = 40
# pnt_img_path = '/mnt/nfs/NefDatabase/data/long/new_data_1.4_psf_xy/img_xy_' + str(i)... | 27.535714 | 100 | 0.715953 |
08a087e642486efd3b542137ef2037b585b8a069 | 6,129 | py | Python | src/romt/serve.py | k3d3/romt | 2445777096a92979a236865d5e3a8106a779fa84 | [
"MIT"
] | null | null | null | src/romt/serve.py | k3d3/romt | 2445777096a92979a236865d5e3a8106a779fa84 | [
"MIT"
] | 1 | 2021-02-12T18:27:36.000Z | 2021-02-12T18:27:36.000Z | src/romt/serve.py | k3d3/romt | 2445777096a92979a236865d5e3a8106a779fa84 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding=utf-8
import argparse
import http.server
import os
from pathlib import Path
from typing import Optional
from romt import common
from romt.crate import crate_prefix_from_name
description = """\
Serve Rust artifacts via http.
"""
epilog = """\
Run a simple HTTP server providing access... | 31.111675 | 79 | 0.619514 |
08a100670997468a76712030d8ce5ee8565db3b9 | 9,803 | py | Python | test/jenkins_tests/multi_node_tests/remove_driver_test.py | cumttang/ray | eb1e5fa2cf26233701ccbda3eb8a301ecd418d8c | [
"Apache-2.0"
] | 2 | 2019-10-08T13:31:08.000Z | 2019-10-22T18:34:52.000Z | test/jenkins_tests/multi_node_tests/remove_driver_test.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 1 | 2018-11-08T02:04:35.000Z | 2018-11-08T21:54:45.000Z | test/jenkins_tests/multi_node_tests/remove_driver_test.py | collinswei/ray | 2e30f7ba386e716bf80f019dcd473b67d83abb95 | [
"Apache-2.0"
] | 6 | 2019-03-12T05:37:35.000Z | 2020-03-09T12:25:17.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import time
import ray
from ray.test.test_utils import (_wait_for_nodes_to_join, _broadcast_event,
_wait_for_event, wait_for_pid_to_exit)
# This test should be run w... | 35.647273 | 79 | 0.670917 |
08a1625663f2cef2e136ae061d1bf028def5fd30 | 5,849 | py | Python | test/finance/test_data_providers.py | Ashutosh-Malve/qiskit-aqua | 649bd70a2a3465e37ef1ff1a04a62d4a63222177 | [
"Apache-2.0"
] | 1 | 2020-07-14T15:32:42.000Z | 2020-07-14T15:32:42.000Z | test/finance/test_data_providers.py | Ashutosh-Malve/qiskit-aqua | 649bd70a2a3465e37ef1ff1a04a62d4a63222177 | [
"Apache-2.0"
] | null | null | null | test/finance/test_data_providers.py | Ashutosh-Malve/qiskit-aqua | 649bd70a2a3465e37ef1ff1a04a62d4a63222177 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019, 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 43.325926 | 100 | 0.611216 |
08a172115b0b6d0a76327e751894cdaf979aefa0 | 16,962 | py | Python | models/transport/run.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 5 | 2019-12-18T15:27:28.000Z | 2020-10-03T09:10:23.000Z | models/transport/run.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 11 | 2019-12-18T14:53:03.000Z | 2021-12-30T07:26:46.000Z | models/transport/run.py | roseDickinson/nismod2 | 5c571b055a6f5dc26bdc2bc8950b9cf1c9202fca | [
"MIT"
] | 3 | 2019-12-18T15:27:39.000Z | 2022-02-25T07:04:06.000Z | """Transport model wrapper
"""
# -*- coding: utf-8 -*-
import configparser
import csv
import os
from subprocess import check_output, CalledProcessError
from string import Template
import pandas as pd
import numpy as np
from smif.data_layer.data_array import DataArray
from smif.exception import SmifTimestepResolutionE... | 40.289786 | 108 | 0.628876 |
08a19a90f313fb118e81ba313d1b826fe580eaf3 | 3,745 | py | Python | intersight/models/inventory_scoped_inventory_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/inventory_scoped_inventory_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/inventory_scoped_inventory_task_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class InventoryScopedInventoryTaskRef(object):
"""
... | 24.966667 | 84 | 0.558077 |
08a1a59766715426502f32e68bb031a4c298b280 | 17,577 | py | Python | tests/regressiontests/admin_widgets/tests.py | jezdez-archive/django-old | 9e28c4f4e90f8dfcfbb55bb13be437afb4f870e9 | [
"BSD-3-Clause"
] | 1 | 2019-06-13T16:18:27.000Z | 2019-06-13T16:18:27.000Z | tests/regressiontests/admin_widgets/tests.py | sirmmo/rango | 9e28c4f4e90f8dfcfbb55bb13be437afb4f870e9 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/admin_widgets/tests.py | sirmmo/rango | 9e28c4f4e90f8dfcfbb55bb13be437afb4f870e9 | [
"BSD-3-Clause"
] | null | null | null | # encoding: utf-8
from __future__ import with_statement, absolute_import
from datetime import datetime
from django import forms
from django.conf import settings
from django.contrib import admin
from django.contrib.admin import widgets
from django.core.files.storage import default_storage
from django.core.files.upload... | 46.872 | 425 | 0.666496 |
08a1baebfd14bc55d51dcfdc06dd0ea27f6c5162 | 1,441 | py | Python | fandogh_cli/namespace_commands.py | 733amir/fandogh-cli | 10fc2976a7b2f427723c3d642dc48557b2b7c233 | [
"MIT"
] | null | null | null | fandogh_cli/namespace_commands.py | 733amir/fandogh-cli | 10fc2976a7b2f427723c3d642dc48557b2b7c233 | [
"MIT"
] | null | null | null | fandogh_cli/namespace_commands.py | 733amir/fandogh-cli | 10fc2976a7b2f427723c3d642dc48557b2b7c233 | [
"MIT"
] | null | null | null | import click
from fandogh_cli.fandogh_client.namespace_client import details_namespace
from .base_commands import FandoghCommand
from .utils import format_text, TextStyle
@click.group("namespace")
def namespace():
"""Namespace management commands"""
@click.command("status", cls=FandoghCommand)
def status():
... | 33.511628 | 116 | 0.637752 |
08a1ce46e436360df6a77bec33238b39dbde25cd | 658 | py | Python | users/forms/lawyers.py | thehimel/lawyers | c66e0cd2ea43ee302977da03f294472e2a0b0dc7 | [
"CC0-1.0"
] | 2 | 2021-08-04T09:29:54.000Z | 2022-03-04T03:49:45.000Z | users/forms/lawyers.py | thehimel/lawyers | c66e0cd2ea43ee302977da03f294472e2a0b0dc7 | [
"CC0-1.0"
] | null | null | null | users/forms/lawyers.py | thehimel/lawyers | c66e0cd2ea43ee302977da03f294472e2a0b0dc7 | [
"CC0-1.0"
] | null | null | null | from allauth.account.forms import SignupForm
from users.appvars import (
FIRST_NAME_MAX_LENGTH, LAST_NAME_MAX_LENGTH, LAWYER)
from django import forms
class LawyerSignupForm(SignupForm):
first_name = forms.CharField(
max_length=FIRST_NAME_MAX_LENGTH, label='First Name')
last_name = forms.CharFiel... | 31.333333 | 61 | 0.711246 |
08a1e4c0c8cda2781ae9a22de87bf8a189fd6bc6 | 5,130 | py | Python | models/listen_attend_and_spell/beam_search.py | psi9730/naver_ai_hackathon_speech | b0739bc93a4d1abddd0b90ef194aa36dec418611 | [
"Apache-2.0"
] | 9 | 2019-11-05T06:26:42.000Z | 2020-12-03T05:49:12.000Z | models/listen_attend_and_spell/beam_search.py | psi9730/naver_ai_hackathon_speech | b0739bc93a4d1abddd0b90ef194aa36dec418611 | [
"Apache-2.0"
] | null | null | null | models/listen_attend_and_spell/beam_search.py | psi9730/naver_ai_hackathon_speech | b0739bc93a4d1abddd0b90ef194aa36dec418611 | [
"Apache-2.0"
] | 4 | 2019-11-05T05:57:58.000Z | 2021-12-11T12:32:03.000Z | import torch
class Beam(object):
"""Class for managing the internals of the beam search process.
Takes care of beams, back pointers, and scores.
Args:
size (int): Number of beams to use.
pad (int): Magic integer in output vocab.
bos (int): Magic integer in output vocab.
eos... | 36.906475 | 93 | 0.582066 |
08a238ad45282a449c0acdbc64ca162eb1a4634a | 23,046 | py | Python | pyhdx/web/views.py | Jhsmit/PyHDX | 34bf653743008508bb14f24ccca21ee39b5b25e3 | [
"MIT"
] | 15 | 2020-10-14T14:15:54.000Z | 2022-03-31T17:55:36.000Z | pyhdx/web/views.py | Jhsmit/PyHDX | 34bf653743008508bb14f24ccca21ee39b5b25e3 | [
"MIT"
] | 145 | 2020-10-01T13:32:20.000Z | 2022-03-31T08:31:47.000Z | pyhdx/web/views.py | Jhsmit/PyHDX | 34bf653743008508bb14f24ccca21ee39b5b25e3 | [
"MIT"
] | 3 | 2021-03-03T10:57:05.000Z | 2021-05-24T09:11:49.000Z | import logging
from itertools import groupby, count
import holoviews as hv
import pandas as pd
import panel as pn
import param
from bokeh.models import HoverTool, Span, Rect, Whisker
from bokeh.models.formatters import NumeralTickFormatter
from bokeh.plotting import figure
from lumen.filters import ParamFilter
from lu... | 35.953198 | 135 | 0.601927 |
08a23b0a85276818423f83c583765ac5f6721547 | 1,870 | py | Python | test/core/sampler/cpnest_test.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | test/core/sampler/cpnest_test.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | test/core/sampler/cpnest_test.py | deepchatterjeeligo/bilby | 6532c63d0d970ad33478ae0b1c28d4c570b74047 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import MagicMock
import bilby
class TestCPNest(unittest.TestCase):
def setUp(self):
self.likelihood = MagicMock()
self.priors = bilby.core.prior.PriorDict(
dict(a=bilby.core.prior.Uniform(0, 1), b=bilby.core.prior.Uniform(0, 1))
)
sel... | 27.5 | 88 | 0.554545 |
08a259a58a4b90c7a9ba66519ab6608b46a79b82 | 1,261 | py | Python | components/contrib/_converters/ApacheParquet/to_ApacheArrowFeather/component.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/contrib/_converters/ApacheParquet/to_ApacheArrowFeather/component.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/contrib/_converters/ApacheParquet/to_ApacheArrowFeather/component.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | from kfp.components import InputPath, OutputPath, create_component_from_func
def convert_apache_parquet_to_apache_arrow_feather(
data_path: InputPath('ApacheParquet'),
output_data_path: OutputPath('ApacheArrowFeather'),
):
'''Converts Apache Parquet to Apache Arrow Feather.
[Apache Arrow Feather](http... | 39.40625 | 179 | 0.731959 |
08a269fd75be8d3235338c0b2c6e9d4bc0c457f9 | 4,807 | py | Python | oscar/lib/python2.7/site-packages/django/contrib/gis/gdal/datasource.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/gdal/datasource.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/contrib/gis/gdal/datasource.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
DataSource is a wrapper for the OGR Data Source object, which provides
an interface for reading vector geometry data from many different file
formats (including ESRI shapefiles).
When instantiating a DataSource object, use the filename of a
GDAL-supported data source. For example, a SHP file or a
TIG... | 38.150794 | 93 | 0.623882 |
08a28629511741c0c4603112f8fcb73c5d5764c4 | 3,466 | py | Python | autoio-interfaces/autorun/mess.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | null | null | null | autoio-interfaces/autorun/mess.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 1 | 2022-02-15T19:35:14.000Z | 2022-02-15T19:35:14.000Z | autoio-interfaces/autorun/mess.py | lpratalimaffei/autoio | 57be6e4882af1841153c19e7353e2531e64ce47f | [
"Apache-2.0"
] | 13 | 2020-06-24T05:21:11.000Z | 2021-05-05T19:58:30.000Z | """ MESS
"""
import mess_io.writer
from autorun._run import from_input_string
INPUT_NAME = 'mess.inp'
OUTPUT_NAMES = ('rate.out', 'mess.aux')
OUTPUT_NAMES_AUX = ('mess.aux',)
# Specilialized runners
def well_lumped_input_file(script_str, run_dir, globkey_str, rxn_chan_str,
energy_trans_st... | 33.326923 | 78 | 0.660704 |
08a287bb5c826d8f261eacc5e5ae8512c6456211 | 3,775 | py | Python | src/sardana/test/test_sardanavalue.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/test/test_sardanavalue.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/test/test_sardanavalue.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 41.032609 | 94 | 0.61298 |
08a28f4fc679956d121145c4d1b80d6ef403aed5 | 12,944 | py | Python | entitylinker/train_utils.py | vsocrates/biomedical_el | 12e3a3cf72acd18437bc9d94fc385a67bf0b2023 | [
"MIT"
] | null | null | null | entitylinker/train_utils.py | vsocrates/biomedical_el | 12e3a3cf72acd18437bc9d94fc385a67bf0b2023 | [
"MIT"
] | null | null | null | entitylinker/train_utils.py | vsocrates/biomedical_el | 12e3a3cf72acd18437bc9d94fc385a67bf0b2023 | [
"MIT"
] | null | null | null | import json
import torch
from torch.utils.data import DataLoader
import torch.optim as optim
from torch.nn import CrossEntropyLoss, NLLLoss
import torch.nn.functional as F
from torch import autograd
import numpy as np
from transformers.models.luke.configuration_luke import LukeConfig
from transformers import AutoT... | 40.198758 | 171 | 0.611403 |
08a29a522d392cf9d8bed61995c30278acb3e2fd | 8,209 | py | Python | modules/Stateful_module.py | re4lity/XFLTReaT | e85a3d0babd82baa8ebc40873f1de480fcb5d3e6 | [
"MIT"
] | 1 | 2019-08-19T10:52:00.000Z | 2019-08-19T10:52:00.000Z | modules/Stateful_module.py | re4lity/XFLTReaT | e85a3d0babd82baa8ebc40873f1de480fcb5d3e6 | [
"MIT"
] | null | null | null | modules/Stateful_module.py | re4lity/XFLTReaT | e85a3d0babd82baa8ebc40873f1de480fcb5d3e6 | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2017 Balazs Bucsay
# 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, ... | 31.332061 | 109 | 0.760994 |
08a29ef305cbb6f770ba2c6936024b4f2be3df2f | 7,830 | py | Python | tools/tests/test_pretty_print.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | null | null | null | tools/tests/test_pretty_print.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | null | null | null | tools/tests/test_pretty_print.py | gnprice/zulip | f29a1918f3cd3795f6ded3dc174472ef0fde3973 | [
"Apache-2.0"
] | null | null | null | import unittest
from tools.lib.pretty_print import pretty_print_html
# Note that GOOD_HTML isn't necessarily beautiful HTML. Apart
# from adjusting indentation, we mostly leave things alone to
# respect whatever line-wrapping styles were in place before.
BAD_HTML = """
<!-- test -->
<!DOCTYPE html>
<html>
<!... | 18.958838 | 78 | 0.513155 |
08a2df00b6a45d6bcfb5b27144be87bb12bd13ef | 4,351 | py | Python | tests/sentry/integrations/pagerduty/test_notify_action.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/integrations/pagerduty/test_notify_action.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/integrations/pagerduty/test_notify_action.py | FelixSchwarz/sentry | 7c92c4fa2b6b9f214764f48c82594acae1549e52 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import responses
from sentry.utils import json
from sentry.models import Integration, PagerDutyService, GroupStatus
from sentry.testutils.cases import RuleTestCase
from sentry.integrations.pagerduty.notify_action import PagerDutyNotifyServiceAction
# external_id is the account ... | 34.531746 | 98 | 0.647437 |
08a2f50d7e5b26de1baed5e415f68d0e5b767b37 | 1,118 | py | Python | src/core/chunking.py | kjhall01/xcast | 17edfd8c79c5163b004800170bbcf21302e8c792 | [
"MIT"
] | 11 | 2021-11-01T21:38:17.000Z | 2022-03-30T11:46:32.000Z | src/core/chunking.py | kjhall01/xcast | 17edfd8c79c5163b004800170bbcf21302e8c792 | [
"MIT"
] | 7 | 2021-10-30T16:55:47.000Z | 2021-12-04T18:51:50.000Z | src/core/chunking.py | kjhall01/xcast | 17edfd8c79c5163b004800170bbcf21302e8c792 | [
"MIT"
] | 1 | 2021-11-18T10:35:29.000Z | 2021-11-18T10:35:29.000Z | from .utilities import guess_coords, check_all, shape
def align_chunks( X, Y, lat_chunks=5, lon_chunks=5, x_lat_dim=None, x_lon_dim=None, y_lat_dim=None, y_lon_dim=None, x_feature_dim=None, y_feature_dim=None, x_sample_dim=None, y_sample_dim=None):
x_lat_dim, x_lon_dim, x_sample_dim, x_feature_dim = guess_coords(... | 69.875 | 194 | 0.767442 |
08a32ac7dbd58bfc9b63d9c19401919c1c8cb5a9 | 3,635 | py | Python | src/graph_transpiler/webdnn/frontend/constraints.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/frontend/constraints.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/frontend/constraints.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | from typing import List, Union, Generic, TypeVar
from webdnn.graph.axis import Axis
from webdnn.graph.order import Order
from webdnn.graph.placeholder import Placeholder
T = TypeVar("T")
class InferenceVar(Generic[T]):
"""
InferenceVar()
Object to represent unknown type (like placeholder)
"""
... | 28.849206 | 121 | 0.600275 |
08a3442f37abc82e1b8f412621f04229ba20527a | 1,937 | py | Python | src/olympia/tags/tests/test_models.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 10 | 2018-08-16T04:55:06.000Z | 2022-01-08T16:09:39.000Z | src/olympia/tags/tests/test_models.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/tags/tests/test_models.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 12 | 2018-08-01T16:46:09.000Z | 2022-01-08T16:09:46.000Z | from olympia.addons.models import Addon
from olympia.amo.tests import TestCase
from olympia.tags.models import AddonTag, Tag
class TestTagManager(TestCase):
def test_not_denied(self):
"""Make sure Tag Manager filters right for not denied tags."""
tag1 = Tag(tag_text='abc', denied=False)
t... | 30.746032 | 70 | 0.63397 |
08a38c4562ffb669873f479caa74c8a1ce3e9d41 | 9,725 | py | Python | tests/in/product/test_product.py | Tian-Jionglu/pycatia | b315aeb3a74846f134ff6b67b3a6334b9d3905fa | [
"MIT"
] | 1 | 2020-04-27T13:59:10.000Z | 2020-04-27T13:59:10.000Z | tests/in/product/test_product.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | tests/in/product/test_product.py | Luanee/pycatia | ea5eef8178f73de12404561c00baf7a7ca30da59 | [
"MIT"
] | null | null | null | #! /usr/bin/python3.6
import os
from pathlib import Path
from pycatia import CATIADocHandler
from pycatia.enumeration.enumeration_types import cat_work_mode_type
from pycatia.product_structure_interfaces.product import Product
from tests.source_files import cat_product
from tests.source_files import cat_part_measurab... | 25.194301 | 107 | 0.653779 |
08a38da382e5d2415045e7f22dcce4ac27bf21cd | 2,758 | py | Python | applications/admin/controllers/gae.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | 1 | 2017-08-11T20:37:21.000Z | 2017-08-11T20:37:21.000Z | applications/admin/controllers/gae.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | applications/admin/controllers/gae.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | ### this works on linux only
try:
import fcntl
import subprocess
import signal
import os
except:
session.flash='sorry, only on Unix systems'
redirect(URL(request.application,'default','site'))
forever=10**8
def kill():
p = cache.ram('gae_upload',lambda:None,forever)
if not p or p.poll... | 34.911392 | 90 | 0.559463 |
08a39bf57364b6e27418b5d8681fe1b451f20cc5 | 1,888 | py | Python | padertorch/data/utils.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 62 | 2019-12-22T08:30:29.000Z | 2022-03-22T11:02:59.000Z | padertorch/data/utils.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 47 | 2020-01-06T09:23:47.000Z | 2022-01-24T16:55:06.000Z | padertorch/data/utils.py | sibange/padertorch | 494692d877f04c66847c2943795b23aea488217d | [
"MIT"
] | 13 | 2019-12-16T08:12:46.000Z | 2021-11-08T14:37:06.000Z |
import numpy as np
def pad_tensor(vec, pad, axis):
"""
args:
vec - tensor to pad
pad - the size to pad to
axis - dimension to pad
return:
a new tensor padded to 'pad' in dimension 'dim'
"""
pad_size = list(vec.shape)
pad_size[axis] = pad - vec.shape[axis]
... | 26.971429 | 81 | 0.533898 |
08a3c8dc53a5e88559ddeaf1f95d441fa5adfd29 | 5,256 | py | Python | tensorflow/python/training/slot_creator_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/python/training/slot_creator_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/training/slot_creator_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2015 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... | 39.818182 | 80 | 0.688166 |
08a3f07ee92fe79b4c04e0e1a3723cc81b33d607 | 1,652 | py | Python | jina/parsers/client.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:28:50.000Z | 2021-02-25T19:28:50.000Z | jina/parsers/client.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-27T05:56:45.000Z | 2021-02-27T05:57:03.000Z | jina/parsers/client.py | deepampatel/jina | 97f9e97a4a678a28bdeacbc7346eaf7bbd2aeb89 | [
"Apache-2.0"
] | null | null | null | from .helper import add_arg_group
from ..enums import RequestType
def mixin_client_cli_parser(parser):
gp = add_arg_group(parser, title='Client')
gp.add_argument('--request-size', type=int, default=100,
help='The number of Documents in each Request.')
gp.add_argument('--mode', choice... | 44.648649 | 112 | 0.655569 |
08a3ffc21d4a6102bd147caebe8fac859fe17116 | 22,399 | py | Python | Context.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | Context.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | Context.py | notatallshaw/Grail-0.6 | 2b850a4a3dcfcb6cb4cf891f2c2f9ee0509c7b43 | [
"CNRI-Jython"
] | null | null | null | """Context class."""
import History
import Reader
import string
import grailutil
import time
import math
import urllib
import regsub
from Cursors import *
from grailbase.uricontext import URIContext
from urllib import urljoin, urllib, urlunparse, urldefrag
VALID_TARGET_STARTS = string.letters + '_'
# TBD: horrible... | 34.998438 | 79 | 0.571186 |
08a424dbcb6a72bdee95efa2e318ee8fc74aaef0 | 903 | py | Python | cloudmesh/batch/command/batch.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | cloudmesh/batch/command/batch.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | cloudmesh/batch/command/batch.py | swsachith/cm | d99837917f0dafe60c25829cf78ae77bbe02bd85 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from cloudmesh.shell.command import command
from cloudmesh.shell.command import PluginCommand
# from cloudmesh.batch.api.manager import Manager
class BatchCommand(PluginCommand):
# noinspection PyUnusedLocal
@command
def do_batch(self, args, arguments):
"""
... | 21.5 | 58 | 0.568106 |
08a43a9e6344b2193afc195e6ff7b798bef7a15c | 2,158 | py | Python | tests/exception_test.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | tests/exception_test.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | tests/exception_test.py | TimYagan/merou | 3d3cd5e17eab5ffe259f7b41a925af6f47ec8988 | [
"Apache-2.0"
] | null | null | null | import sys
from typing import TYPE_CHECKING
from tornado.httpserver import HTTPRequest
from grouper.plugin.base import BasePlugin
from grouper.plugin.proxy import PluginProxy
if TYPE_CHECKING:
from types import TracebackType
from typing import Optional, Type
class RandomException(Exception):
pass
cla... | 30.394366 | 67 | 0.676552 |
08a46b7f744addc2b9c894e0875a82dcffd5b3a2 | 2,155 | py | Python | analyticsclient/module.py | annagav/edx-analytics-data-api-client | d26891b53be18490aff4e2d38a5c80efbf00626f | [
"Apache-2.0"
] | null | null | null | analyticsclient/module.py | annagav/edx-analytics-data-api-client | d26891b53be18490aff4e2d38a5c80efbf00626f | [
"Apache-2.0"
] | 4 | 2015-11-19T20:15:39.000Z | 2019-03-19T18:15:49.000Z | analyticsclient/module.py | Stanford-Online/edx-analytics-data-api-client | 8901e59e02bb30b8b604e274a39439dc3f71aa8b | [
"Apache-2.0"
] | null | null | null | from analyticsclient.base import BaseEndpoint
from analyticsclient.constants import data_formats
class Module(BaseEndpoint):
"""Module related analytics data."""
def __init__(self, client, course_id, module_id):
"""
Initialize the Module client.
Arguments:
client (analyti... | 33.671875 | 88 | 0.6529 |
08a49570d746fdcc0ea7029b251a8e9cd727b588 | 196 | py | Python | tests/test_get_api_data.py | BrandonHoeft/chicovidtracker | 6a1b45f012cdadea6f6168e4fac97532a7cfbb14 | [
"MIT"
] | null | null | null | tests/test_get_api_data.py | BrandonHoeft/chicovidtracker | 6a1b45f012cdadea6f6168e4fac97532a7cfbb14 | [
"MIT"
] | null | null | null | tests/test_get_api_data.py | BrandonHoeft/chicovidtracker | 6a1b45f012cdadea6f6168e4fac97532a7cfbb14 | [
"MIT"
] | null | null | null | import pytest
from chicovidtracker.get_api_data import get_api_json
@pytest.mark.skip(reason="get_api_json() test not yet fully built")
def test_get_api_json_1():
print('Nothing to see here') | 32.666667 | 67 | 0.795918 |
08a4c5dc3041cba2b6424806605c4260f226e4aa | 6,615 | py | Python | webservice/usermanage.py | bert386/smart-charger-cloud | ec224ed2ea0e7f6b6f842f9cc0c1e55d6fdd308c | [
"Apache-2.0"
] | null | null | null | webservice/usermanage.py | bert386/smart-charger-cloud | ec224ed2ea0e7f6b6f842f9cc0c1e55d6fdd308c | [
"Apache-2.0"
] | null | null | null | webservice/usermanage.py | bert386/smart-charger-cloud | ec224ed2ea0e7f6b6f842f9cc0c1e55d6fdd308c | [
"Apache-2.0"
] | null | null | null |
from datetime import timedelta
import boto3
from boto3.dynamodb.conditions import Key, Attr
import os, sys
import json
import md5
from flask import Flask, render_template, session, request, jsonify
from flask_socketio import SocketIO, emit, join_room, leave_room, \
close_room, rooms, disconnect
from flask impo... | 28.636364 | 86 | 0.511867 |
08a4ed349e871974f17ecf354979de6b6161b8a7 | 15,618 | py | Python | src/python/pants/help/help_printer.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | null | null | null | src/python/pants/help/help_printer.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | 6 | 2022-01-25T15:49:26.000Z | 2022-02-09T11:21:13.000Z | src/python/pants/help/help_printer.py | thejcannon/pants | 7c24f42cb78cc462b63698cef736eda7a85c40e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import dataclasses
import difflib
import json
import textwrap
from typing import Dict, cast
from typing_extensions import Literal
from pants.base.build_environment import pants_version
f... | 43.870787 | 117 | 0.618325 |
08a4fc28debff8520a21829e00cbc396947b5f92 | 5,347 | py | Python | src/nn/domain_string_identifier.py | brunoklaus/MercadoLibre_2020 | 8349ab473dd26ce6345f0ca8772d1f1711fb4c06 | [
"MIT"
] | 2 | 2020-12-15T11:42:36.000Z | 2021-01-25T17:39:28.000Z | src/nn/domain_string_identifier.py | brunoklaus/MercadoLibre_2020 | 8349ab473dd26ce6345f0ca8772d1f1711fb4c06 | [
"MIT"
] | null | null | null | src/nn/domain_string_identifier.py | brunoklaus/MercadoLibre_2020 | 8349ab473dd26ce6345f0ca8772d1f1711fb4c06 | [
"MIT"
] | 2 | 2020-12-18T11:45:03.000Z | 2020-12-21T19:33:43.000Z | '''
Created on 18 de nov de 2020
@author: klaus
'''
'''
Created on 16 de nov de 2020
@author: klaus
'''
import jsonlines
from folders import DATA_DIR, SUBMISSIONS_DIR
from input.read_input import TRAIN_LINES, NUM_DOMS, get_emb, get_emb_Kstr
import os
from os import path
import pandas as pd
import numpy as np
import... | 29.705556 | 133 | 0.610062 |
08a50f5f6f8079275a8abe8ea6697917d4b2417a | 541 | py | Python | app/manage.py | opencarbon/opencarbonmap | a2653f3c8876ee73a77e0f19267252cbf429ddd3 | [
"MIT"
] | null | null | null | app/manage.py | opencarbon/opencarbonmap | a2653f3c8876ee73a77e0f19267252cbf429ddd3 | [
"MIT"
] | null | null | null | app/manage.py | opencarbon/opencarbonmap | a2653f3c8876ee73a77e0f19267252cbf429ddd3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'carbonmap.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Ar... | 33.8125 | 73 | 0.687616 |
08a51f10d63d27de622fcb0be74059b3c2e8f868 | 10,434 | py | Python | swift/proxy/controllers/container.py | aerwin3/swift | 96c1838a15645639154f1048285d53a891809937 | [
"Apache-2.0"
] | null | null | null | swift/proxy/controllers/container.py | aerwin3/swift | 96c1838a15645639154f1048285d53a891809937 | [
"Apache-2.0"
] | null | null | null | swift/proxy/controllers/container.py | aerwin3/swift | 96c1838a15645639154f1048285d53a891809937 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 agree... | 42.242915 | 79 | 0.601783 |
08a52bb360c5dea5c86da608a177043cb889a17d | 18,917 | py | Python | fairseq/tasks/translation_multi_simple_epoch_with_prefix.py | ahmetustun/fairseq | 5ec791d95476beaa1513da14efa9035337bf6a15 | [
"MIT"
] | null | null | null | fairseq/tasks/translation_multi_simple_epoch_with_prefix.py | ahmetustun/fairseq | 5ec791d95476beaa1513da14efa9035337bf6a15 | [
"MIT"
] | null | null | null | fairseq/tasks/translation_multi_simple_epoch_with_prefix.py | ahmetustun/fairseq | 5ec791d95476beaa1513da14efa9035337bf6a15 | [
"MIT"
] | null | null | null | # 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.
import datetime
import logging
import time
import torch
from fairseq.data import (
FairseqDataset,
LanguagePairDataset,
ListDatas... | 41.123913 | 113 | 0.612148 |
08a53209e6cc83db8d0e7ac7f42007d426656560 | 5,475 | py | Python | desdeo_emo/selection/oAPD.py | bonskotti/desdeo-emo | 6a607fa96478fd3c76394ac7b2dafdfd3c08eb2a | [
"MIT"
] | 1 | 2022-03-30T17:24:55.000Z | 2022-03-30T17:24:55.000Z | desdeo_emo/selection/oAPD.py | bonskotti/desdeo-emo | 6a607fa96478fd3c76394ac7b2dafdfd3c08eb2a | [
"MIT"
] | null | null | null | desdeo_emo/selection/oAPD.py | bonskotti/desdeo-emo | 6a607fa96478fd3c76394ac7b2dafdfd3c08eb2a | [
"MIT"
] | null | null | null | import numpy as np
from warnings import warn
from typing import List, Callable
from desdeo_emo.selection.SelectionBase import SelectionBase
from desdeo_emo.population.Population import Population
from desdeo_emo.othertools.ReferenceVectors import ReferenceVectors
class Optimistic_APD_Select(SelectionBase):
"""The... | 41.477273 | 88 | 0.610594 |
08a54ff55fc10ae0ce02a424a09903d23e58342b | 1,121 | py | Python | pythonFiles/datascience/getJupyterVariableList.py | mikeroll/vscode-python | 94abff91bb1c9a269a573f64b3694712b775d62a | [
"MIT"
] | 1 | 2020-08-08T21:57:16.000Z | 2020-08-08T21:57:16.000Z | pythonFiles/datascience/getJupyterVariableList.py | pythonthings/vscode-python | b819365939e4c00d361b2ef2adce969511c87fd9 | [
"MIT"
] | null | null | null | pythonFiles/datascience/getJupyterVariableList.py | pythonthings/vscode-python | b819365939e4c00d361b2ef2adce969511c87fd9 | [
"MIT"
] | 1 | 2022-03-15T06:57:59.000Z | 2022-03-15T06:57:59.000Z | #%DATASCIENCE_INTERNAL_KEY%#
# Query Jupyter server for defined variables list
# Tested on 2.7 and 3.6
from sys import getsizeof as _VSCODE_getsizeof
import json as _VSCODE_json
from IPython import get_ipython as _VSCODE_get_ipython
# _VSCode_supportsDataExplorer will contain our list of data explorer supported types
... | 35.03125 | 203 | 0.786798 |
08a5542656983058b2c4115ee8e46305a076ed57 | 4,637 | py | Python | users/forms/front_forms.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | users/forms/front_forms.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | 2 | 2021-03-19T17:12:07.000Z | 2021-03-19T17:12:08.000Z | users/forms/front_forms.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | from datetime import datetime
from django import forms
from django.conf import settings
from django.contrib.auth import (password_validation, )
from django.contrib.auth.forms import (AuthenticationForm, UsernameField,
PasswordResetForm, SetPasswordForm)
from django.forms import ModelForm
from django.forms.widgets ... | 40.675439 | 91 | 0.666379 |
08a5a85997fa35b40d155840ebf8cbaa3f8dfe7d | 4,001 | py | Python | python/akg/ops/nn/ascend/conv_filter_ad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | python/akg/ops/nn/ascend/conv_filter_ad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | python/akg/ops/nn/ascend/conv_filter_ad.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | #!/usr/bin/env python3
# coding: utf-8
# Copyright 2019-2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | 42.56383 | 133 | 0.701825 |
08a5bb28d3428244ea643633b7f46823c8afd4a0 | 3,315 | py | Python | bottom_effect_correction.py | yu-efremov/ViscoIndent | b9658509fdf9ed232cf682cb554f668572735e4d | [
"MIT"
] | 3 | 2020-12-02T16:19:46.000Z | 2021-12-21T13:26:53.000Z | bottom_effect_correction.py | yu-efremov/ViscoIndent | b9658509fdf9ed232cf682cb554f668572735e4d | [
"MIT"
] | null | null | null | bottom_effect_correction.py | yu-efremov/ViscoIndent | b9658509fdf9ed232cf682cb554f668572735e4d | [
"MIT"
] | 1 | 2022-03-03T15:17:58.000Z | 2022-03-03T15:17:58.000Z | # -*- coding: utf-8 -*-
"""
@author: Yuri Efremov
bottom effect correction coefficients
"""
import numpy as np
from numpy import pi
def bottom_effect_correction(Poisson, Probe_dimension, Height, modelprobe,
indentationfull):
BEC = np.ones(len(indentationfull))
indentat... | 43.051948 | 92 | 0.511312 |
08a5c0c609801d84738f2aaff74901831c662b9d | 719 | py | Python | src/apitestframework/__init__.py | JMatica/apitestframework | 4e195a3a4862cf50562ed21a4564e14d66c712b5 | [
"Apache-2.0"
] | 2 | 2020-08-07T11:46:48.000Z | 2021-01-18T21:44:21.000Z | src/apitestframework/__init__.py | JMatica/apitestframework | 4e195a3a4862cf50562ed21a4564e14d66c712b5 | [
"Apache-2.0"
] | null | null | null | src/apitestframework/__init__.py | JMatica/apitestframework | 4e195a3a4862cf50562ed21a4564e14d66c712b5 | [
"Apache-2.0"
] | 1 | 2020-08-07T10:38:49.000Z | 2020-08-07T10:38:49.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2018 JMatica Srl
#
# This file is part of apitestframework.
#
# 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.apa... | 32.681818 | 74 | 0.744089 |
08a5e1c51f7153ce725b635f9bfe7456caa6bf3e | 3,125 | py | Python | draalcore/rest/rest_urls.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2017-04-25T10:54:55.000Z | 2017-04-25T10:54:55.000Z | draalcore/rest/rest_urls.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | 1 | 2022-02-10T06:48:36.000Z | 2022-02-10T06:48:36.000Z | draalcore/rest/rest_urls.py | jojanper/draalcore | 3d3f5a53efe32c721c34d7e48267328a4e9e8402 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""ReST URLs for accessing system models and data"""
# Project imports
from django.conf import settings
from django.conf.urls import url
# Project imports
from draalcore.rest.serializers import (BaseSerializerDataItemHandler,
BaseSe... | 35.511364 | 83 | 0.58976 |
08a5f90c170d3b5f7254347036a110b09dbc82d4 | 2,854 | py | Python | 01-Lesson-Plans/02-Python/2/Activities/10-Stu_Functions/Solved/finally_functioning.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-04-13T07:14:34.000Z | 2021-04-13T07:14:34.000Z | 01-Lesson-Plans/02-Python/2/Activities/10-Stu_Functions/Solved/finally_functioning.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 2 | 2021-06-02T03:14:19.000Z | 2022-02-11T23:21:24.000Z | 01-Lesson-Plans/02-Python/2/Activities/10-Stu_Functions/Solved/finally_functioning.py | tatianegercina/FinTech | b40687aa362d78674e223eb15ecf14bc59f90b62 | [
"ADSL"
] | 1 | 2021-05-07T13:26:50.000Z | 2021-05-07T13:26:50.000Z | """
Determine the Compound Annual Growth Rate for an investment
"""
# Declare a variable beginning_balance as a float
beginning_balance = 29000.00
# Declare a variable ending_balance as float
ending_balance = 45000.10
# Declare a variable years as an int
years = 1.0
# Define a function called calculate_compound_gro... | 40.771429 | 157 | 0.830413 |
08a60d2ec4fcf344cb5430b26c657ff91d854e86 | 1,080 | py | Python | transfer-learning/vgg-demo.py | sieniven/self-driving-project | ae135319f0991a940241c71f498865822a4f5b80 | [
"Apache-2.0"
] | null | null | null | transfer-learning/vgg-demo.py | sieniven/self-driving-project | ae135319f0991a940241c71f498865822a4f5b80 | [
"Apache-2.0"
] | null | null | null | transfer-learning/vgg-demo.py | sieniven/self-driving-project | ae135319f0991a940241c71f498865822a4f5b80 | [
"Apache-2.0"
] | 1 | 2022-03-31T10:33:45.000Z | 2022-03-31T10:33:45.000Z | # Load our images first, and we'll check what we have
from glob import glob
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
from keras.preprocessing import image
from keras.applications.vgg16 import preprocess_input
# Note - this will likely need to download a new version of VGG16
fr... | 30 | 65 | 0.771296 |
08a667f4f30acb4b22fb336e9d577b535eb879dd | 874 | py | Python | openstack-dashboard/openstack_dashboard/dashboards/project/vpcs/urls.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/vpcs/urls.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/vpcs/urls.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null |
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.project.vpcs import views
VIEW_MOD = 'openstack_dashboard.dashboards.project.vpcs.views'
urlpatterns = patterns(VIEW_MOD,
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^show/$', 'show', na... | 39.727273 | 79 | 0.622426 |
08a676830d5a9e263257e018c29495c26dc9974f | 2,712 | py | Python | set_ssh.py | schubb2003/element | 14d79297b2dd6908e0c84ba533d507acd44fe054 | [
"MIT"
] | null | null | null | set_ssh.py | schubb2003/element | 14d79297b2dd6908e0c84ba533d507acd44fe054 | [
"MIT"
] | null | null | null | set_ssh.py | schubb2003/element | 14d79297b2dd6908e0c84ba533d507acd44fe054 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
# Author: Scott Chubb scott.chubb@netapp.com
# Written for Python 3.6 and above
# No warranty is offered, use at your own risk. While these scripts have been
# tested in lab situations, all use cases cannot be accounted for.
#########18-may-2020
# Need to address when cluster or node is... | 33.073171 | 79 | 0.622419 |
08a6b86e5356038d484317b68523622b8f48d491 | 4,182 | py | Python | export/converter/common/graph.py | zhiqwang/demonet | 8370fc41d56d28939403b883f4b4014172895781 | [
"Apache-2.0"
] | 11 | 2020-08-28T09:29:42.000Z | 2021-10-03T09:08:11.000Z | export/converter/common/graph.py | zhiqwang/demonet | 8370fc41d56d28939403b883f4b4014172895781 | [
"Apache-2.0"
] | 1 | 2021-11-15T03:58:37.000Z | 2021-11-15T04:23:22.000Z | export/converter/common/graph.py | zhiqwang/demonet | 8370fc41d56d28939403b883f4b4014172895781 | [
"Apache-2.0"
] | 3 | 2020-04-15T07:53:13.000Z | 2020-05-18T18:51:31.000Z | import collections
class GraphNode(object):
def __init__(self, layer):
self.in_edges = list()
self.out_edges = list()
self.layer = layer
self.covered = False
self.real_name = self.name
@property
def name(self):
assert False
@property
def variable_... | 33.725806 | 101 | 0.583692 |
08a6b8fe5b2fa04b6cd78cb085bdc941e2e78e0c | 1,370 | py | Python | src/structurizr/view/vertex.py | mrchrisadams/structurizr-python | a8c6958210892a13b94d5f64eb03273e7f2e398b | [
"Apache-2.0"
] | null | null | null | src/structurizr/view/vertex.py | mrchrisadams/structurizr-python | a8c6958210892a13b94d5f64eb03273e7f2e398b | [
"Apache-2.0"
] | null | null | null | src/structurizr/view/vertex.py | mrchrisadams/structurizr-python | a8c6958210892a13b94d5f64eb03273e7f2e398b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020, Ilai Fallach.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 24.035088 | 74 | 0.679562 |
08a6ce4df3ff31a3fe1dbc08f1c38ca9c630b5c8 | 3,466 | py | Python | alipay/aop/api/response/MybankPaymentTradeDepositVerifyQueryResponse.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/response/MybankPaymentTradeDepositVerifyQueryResponse.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/response/MybankPaymentTradeDepositVerifyQueryResponse.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.response.AlipayResponse import AlipayResponse
class MybankPaymentTradeDepositVerifyQueryResponse(AlipayResponse):
def __init__(self):
super(MybankPaymentTradeDepositVerifyQueryResponse, self).__init__()
self._apply_dat... | 29.87931 | 117 | 0.663301 |
08a6f583f101b1b3291707c653e8dd5e994c390a | 1,170 | py | Python | CV/Instance/Omic/trainer.py | tmquan/DL | e0b7de22f4b445f3b8bad482295dfcf7bfbe317f | [
"Apache-2.0"
] | null | null | null | CV/Instance/Omic/trainer.py | tmquan/DL | e0b7de22f4b445f3b8bad482295dfcf7bfbe317f | [
"Apache-2.0"
] | null | null | null | CV/Instance/Omic/trainer.py | tmquan/DL | e0b7de22f4b445f3b8bad482295dfcf7bfbe317f | [
"Apache-2.0"
] | null | null | null | import os
from pytorch_lightning import Trainer
from pytorch_lightning.loggers import TensorBoardLogger, MLFlowLogger
from pytorch_lightning.callbacks.model_checkpoint import ModelCheckpoint
from data import PseudoDataModule
from model import PixelEmbeddingUNetModule
if __name__ == '__main__':
batch_size=20
... | 26.590909 | 73 | 0.695726 |
08a70674a4cff33c4930c8b4cb1349d9d5332e26 | 63,509 | py | Python | cmip5datafinder_v2.py | valeriupredoi/cmip5datafinder | ac411f4194bac1f56decabec0a59ee349ed39f5e | [
"RSA-MD"
] | null | null | null | cmip5datafinder_v2.py | valeriupredoi/cmip5datafinder | ac411f4194bac1f56decabec0a59ee349ed39f5e | [
"RSA-MD"
] | null | null | null | cmip5datafinder_v2.py | valeriupredoi/cmip5datafinder | ac411f4194bac1f56decabec0a59ee349ed39f5e | [
"RSA-MD"
] | null | null | null | #!/home/valeriu/sdt/bin/python
"""
cmip5datafinder.py
Python 2.7.13
Script that searches for data locally and on valid ESGF nodes. It builds
cache files using the results of the search.
"""
# -------------------------------------------------------------------------
# Setup.
# ----------------------------------... | 48.369383 | 155 | 0.527358 |
08a70d628b68470df2143385e2c25a09bb38fe6c | 624 | py | Python | services/connector/cli/connector_handler.py | Forcepoint/fp-bd-okta-fba | 7c9ee682cdc9d227296df0dee54846e533aa2600 | [
"Apache-2.0"
] | null | null | null | services/connector/cli/connector_handler.py | Forcepoint/fp-bd-okta-fba | 7c9ee682cdc9d227296df0dee54846e533aa2600 | [
"Apache-2.0"
] | null | null | null | services/connector/cli/connector_handler.py | Forcepoint/fp-bd-okta-fba | 7c9ee682cdc9d227296df0dee54846e533aa2600 | [
"Apache-2.0"
] | null | null | null | #
# Author: Dlo Bagari
# created Date: 12-10-2019
from api.app import *
class ConnectorHandler:
def __init__(self, parser):
self._args = None
self._parser = parser
def __call__(self, args):
self._args = args
result, error_msg = config.set_configs(self._args.config_file)
... | 28.363636 | 81 | 0.63141 |
08a716b53541efbe043fca2cfcc155f3d104cc43 | 1,659 | py | Python | bit_pytorch/dataloader.py | lindsey98/big_transfer | fedd752fc4e680d6997178fdab08033711d03230 | [
"Apache-2.0"
] | null | null | null | bit_pytorch/dataloader.py | lindsey98/big_transfer | fedd752fc4e680d6997178fdab08033711d03230 | [
"Apache-2.0"
] | null | null | null | bit_pytorch/dataloader.py | lindsey98/big_transfer | fedd752fc4e680d6997178fdab08033711d03230 | [
"Apache-2.0"
] | null | null | null | import torch.utils.data as data
from PIL import Image, ImageOps
import pickle
import numpy as np
import os
class GetLoader(data.Dataset):
def __init__(self, data_root, data_list, label_dict, transform=None, grayscale=False):
self.transform = transform
self.data_root = data_root
sel... | 31.903846 | 106 | 0.594937 |
08a7218c96bc4a7b01cd39e42c5d1b71cbfa1a74 | 555 | py | Python | Libraries/202005-Tesseract.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | 1 | 2021-01-10T12:06:26.000Z | 2021-01-10T12:06:26.000Z | Libraries/202005-Tesseract.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | null | null | null | Libraries/202005-Tesseract.py | NguyenQuangBinh803/Python-Heritage | 7da72b2926cefc4903086a1cab7de3a64764d648 | [
"MIT"
] | null | null | null | import pytesseract
from pytesseract import Output
import cv2
img = cv2.imread('1.png')
d = pytesseract.image_to_data(img, output_type=Output.DICT)
n_boxes = len(d['level'])
for i in range(n_boxes):
(x, y, w, h) = (d['left'][i], d['top'][i], d['width'][i], d['height'][i])
## cv2.rectangle(img, (x, y), (x + w, y ... | 29.210526 | 77 | 0.601802 |
08a738ec6b9e08bef9a79622a536f481e31e46ea | 5,906 | py | Python | packages/fetchai/protocols/ledger_api/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 28 | 2021-10-31T18:54:14.000Z | 2022-03-17T13:10:43.000Z | packages/fetchai/protocols/ledger_api/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | 66 | 2021-10-31T11:55:48.000Z | 2022-03-31T06:26:23.000Z | packages/fetchai/protocols/ledger_api/dialogues.py | valory-xyz/agents-aea | 8f38efa96041b0156ed1ae328178e395dbabf2fc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2022 fetchai
#
# 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
#
#... | 37.617834 | 91 | 0.66424 |
08a748f0ec003542cef8865ca43219624f4eb586 | 7,765 | py | Python | redistimeseries/client.py | szho42/redistimeseries-py | 6b14d5721d3058d60ffac772ecbd54ef3e1115d3 | [
"BSD-3-Clause"
] | 1 | 2019-06-21T12:46:14.000Z | 2019-06-21T12:46:14.000Z | redistimeseries/client.py | szho42/redistimeseries-py | 6b14d5721d3058d60ffac772ecbd54ef3e1115d3 | [
"BSD-3-Clause"
] | null | null | null | redistimeseries/client.py | szho42/redistimeseries-py | 6b14d5721d3058d60ffac772ecbd54ef3e1115d3 | [
"BSD-3-Clause"
] | null | null | null | import six
import redis
from redis import Redis, RedisError
from redis.client import bool_ok
from redis.client import int_or_none
from redis._compat import (long, nativestr)
from redis.exceptions import DataError
class TSInfo(object):
chunk_count = None
labels = []
last_time_stamp = None
max_samples_p... | 35.135747 | 88 | 0.606053 |
08a7933bbd125fba7219a7afec1df6a3bb449b47 | 8,316 | py | Python | watex/datasets/__init__.py | WEgeophysics/watex | 21616ce35372a095c3dd624f82a5282b15cb2c91 | [
"MIT"
] | 3 | 2021-06-19T02:16:46.000Z | 2021-07-16T15:56:49.000Z | watex/datasets/__init__.py | WEgeophysics/watex | 21616ce35372a095c3dd624f82a5282b15cb2c91 | [
"MIT"
] | null | null | null | watex/datasets/__init__.py | WEgeophysics/watex | 21616ce35372a095c3dd624f82a5282b15cb2c91 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2021 Kouadio K. Laurent, Wed Sep 15 11:39:43 2021
# This module is a set of datasets packages
# released under a MIT- licence.
import warnings
from watex.utils._watexlog import watexlog
from watex.utils.ml_utils import loadDumpedOrSerializedData
__logger = watexlog().get_watex_l... | 36.79646 | 121 | 0.593675 |
08a79c25946cc34f666ca51ffa4443c0ee66513c | 4,251 | py | Python | opentracing_instrumentation/tornado_context.py | nicholasamorim/opentracing-python-instrumentation | 8a8b88a7cb4a4cebc0a257a1b1f05ef54badea8b | [
"MIT"
] | null | null | null | opentracing_instrumentation/tornado_context.py | nicholasamorim/opentracing-python-instrumentation | 8a8b88a7cb4a4cebc0a257a1b1f05ef54badea8b | [
"MIT"
] | null | null | null | opentracing_instrumentation/tornado_context.py | nicholasamorim/opentracing-python-instrumentation | 8a8b88a7cb4a4cebc0a257a1b1f05ef54badea8b | [
"MIT"
] | 1 | 2022-03-01T02:09:57.000Z | 2022-03-01T02:09:57.000Z | # Copyright (c) 2015 Uber Technologies, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publ... | 35.425 | 79 | 0.738885 |
08a7c0ce8a4ff68d918c1bba5b6d4474b950038e | 11,143 | py | Python | input_pipeline/S2S.py | HyperbolicTangent/HAR | 2fd03ff7b1fb138159079b991698184da2affd22 | [
"MIT"
] | null | null | null | input_pipeline/S2S.py | HyperbolicTangent/HAR | 2fd03ff7b1fb138159079b991698184da2affd22 | [
"MIT"
] | null | null | null | input_pipeline/S2S.py | HyperbolicTangent/HAR | 2fd03ff7b1fb138159079b991698184da2affd22 | [
"MIT"
] | null | null | null | import gin
import logging
import tensorflow as tf
import numpy as np
import zipfile
import os
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import preprocessing
AUTOTUNE = tf.data.experimental.AUTOTUNE
first_time_run = False
def one_hot_coding(x):
if x == 0:
y = np.ze... | 44.572 | 115 | 0.527416 |
08a7ead8418ba958f10b33130437d00b6900b568 | 3,531 | py | Python | docs/conf.py | mikapfl/pint-xarray | 7dc10a9141719a5df502f7c3eea26eecc2a70b07 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | mikapfl/pint-xarray | 7dc10a9141719a5df502f7c3eea26eecc2a70b07 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | mikapfl/pint-xarray | 7dc10a9141719a5df502f7c3eea26eecc2a70b07 | [
"Apache-2.0"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 31.810811 | 79 | 0.641461 |
08a7ed827bc2537e891363434656460e53b51ee0 | 31,431 | py | Python | enterprise/signals/gp_signals.py | AaronDJohnson/enterprise | d964464bba699a9455897d890a97c40f25c5b004 | [
"MIT"
] | 35 | 2017-01-18T18:02:28.000Z | 2021-11-14T14:14:35.000Z | enterprise/signals/gp_signals.py | AaronDJohnson/enterprise | d964464bba699a9455897d890a97c40f25c5b004 | [
"MIT"
] | 174 | 2017-02-02T22:13:46.000Z | 2022-03-04T21:00:24.000Z | enterprise/signals/gp_signals.py | AaronDJohnson/enterprise | d964464bba699a9455897d890a97c40f25c5b004 | [
"MIT"
] | 49 | 2017-01-17T21:59:43.000Z | 2021-11-03T11:26:37.000Z | # gp_signals.py
"""Contains class factories for Gaussian Process (GP) signals.
GP signals are defined as the class of signals that have a basis
function matrix and basis prior vector..
"""
import functools
import itertools
import logging
import numpy as np
import scipy.sparse as sps
from sksparse.cholmod import chole... | 36.086108 | 120 | 0.593013 |
08a7f6b88443534c09d0f1485f72fcc9c2b41d02 | 4,297 | py | Python | mobiletrans/mtdistmap/management/commands/generate_travel_heatmap.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | 1 | 2015-04-28T14:48:27.000Z | 2015-04-28T14:48:27.000Z | mobiletrans/mtdistmap/management/commands/generate_travel_heatmap.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | null | null | null | mobiletrans/mtdistmap/management/commands/generate_travel_heatmap.py | JoeJasinski/WindyTransit | b883c7eebe618923ecc7b1914a696543d8864215 | [
"MIT"
] | null | null | null | import os
from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
from mobiletrans.mtdistmap.area_grid import RouteGridGenerator, RouteGridPoint, RouteGrid
from mobiletrans.mtlocation.models import CityBorder
class Command(BaseCommand):
args = '<stop_id stop_id ...>'
... | 38.026549 | 115 | 0.578543 |
08a80594f3d17191cf8a1567354dfd0ed789d5fe | 14,569 | py | Python | eve/tests/io/media.py | pfreixes/eve | e813741a0a85ca40b0e864b23097e8f2b4bfd0f1 | [
"BSD-3-Clause"
] | null | null | null | eve/tests/io/media.py | pfreixes/eve | e813741a0a85ca40b0e864b23097e8f2b4bfd0f1 | [
"BSD-3-Clause"
] | null | null | null | eve/tests/io/media.py | pfreixes/eve | e813741a0a85ca40b0e864b23097e8f2b4bfd0f1 | [
"BSD-3-Clause"
] | null | null | null | from io import BytesIO
from unittest import TestCase
from eve.io.media import MediaStorage
from eve.io.mongo import GridFSMediaStorage
from eve.tests import TestBase, MONGO_DBNAME
from eve import STATUS_OK, ID_FIELD, STATUS, STATUS_ERR, ISSUES, ETAG
import base64
from bson import ObjectId
class TestMediaStorage(TestC... | 39.058981 | 79 | 0.60718 |
08a8272bb2a8072586e6cd7c2fe6aa61e0f8e36e | 2,950 | py | Python | shadowreader/functions/consumer_slave.py | luckymike/shadowreader | 831fe8fbc8f980337285caabe24512b6ba73be11 | [
"Apache-2.0"
] | null | null | null | shadowreader/functions/consumer_slave.py | luckymike/shadowreader | 831fe8fbc8f980337285caabe24512b6ba73be11 | [
"Apache-2.0"
] | null | null | null | shadowreader/functions/consumer_slave.py | luckymike/shadowreader | 831fe8fbc8f980337285caabe24512b6ba73be11 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2018 Edmunds.com, 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, softw... | 31.382979 | 125 | 0.670169 |
08a84dec7cb4c2ed5bcaa7388eaa95d064ad68f2 | 1,749 | py | Python | neuralmonkey/tests/test_model_part.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-24T21:10:03.000Z | 2019-05-22T13:19:35.000Z | neuralmonkey/tests/test_model_part.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | null | null | null | neuralmonkey/tests/test_model_part.py | Simon-Will/neuralmonkey | b686a9d302cb10eda5fca991e1d7ee6b9e84b75a | [
"BSD-3-Clause"
] | 5 | 2017-04-25T01:36:44.000Z | 2019-12-13T15:04:03.000Z | #!/usr/bin/env python3.5
"""Test ModelPart class."""
import os
import tempfile
import unittest
import numpy as np
import tensorflow as tf
from neuralmonkey.vocabulary import Vocabulary
from neuralmonkey.encoders.recurrent import SentenceEncoder
class Test(unittest.TestCase):
"""Test capabilities of model part.... | 29.644068 | 72 | 0.674099 |
08a86347503510e28a9c476ba7b59a5612553610 | 9,889 | py | Python | scripts/process_fips_module.py | xumia/SymCrypt | b15ec2c87d54704474ee8d26c95e90762c746ba2 | [
"MIT"
] | 170 | 2019-05-07T01:45:42.000Z | 2022-03-28T19:02:38.000Z | scripts/process_fips_module.py | xumia/SymCrypt | b15ec2c87d54704474ee8d26c95e90762c746ba2 | [
"MIT"
] | 15 | 2019-05-07T01:25:48.000Z | 2022-03-22T13:51:49.000Z | scripts/process_fips_module.py | xumia/SymCrypt | b15ec2c87d54704474ee8d26c95e90762c746ba2 | [
"MIT"
] | 31 | 2019-05-07T07:49:21.000Z | 2022-03-27T03:15:43.000Z | #!/usr/bin/env python3
"""
This script facilitaties module integrity verification for FIPS 140 by processing the input ELF
shared object module and replacing key variables so that the module can calculate its own base
address, and thereby HMAC its own memory, at runtime.
Requires PyElfTools: https://github.com/eliben/... | 37.744275 | 139 | 0.684093 |
08a8938fc5d5c3b71baf80557b8f9ec64b58911f | 137 | py | Python | bycycle/__init__.py | kguarian/bycycle | ab971d50eaa8842c6214c463350bfbf932cefa2e | [
"Apache-2.0"
] | null | null | null | bycycle/__init__.py | kguarian/bycycle | ab971d50eaa8842c6214c463350bfbf932cefa2e | [
"Apache-2.0"
] | null | null | null | bycycle/__init__.py | kguarian/bycycle | ab971d50eaa8842c6214c463350bfbf932cefa2e | [
"Apache-2.0"
] | 1 | 2022-02-21T15:54:38.000Z | 2022-02-21T15:54:38.000Z | """ByCycle: cycle-by-cycle analyses of neural oscillations."""
from .version import __version__
from .objs import Bycycle, BycycleGroup
| 27.4 | 62 | 0.788321 |
08a8e93a147a100a6d39dcb2d00dde3b09dcecd1 | 4,610 | py | Python | data/tracking/sampler/_sampling_algos/sequence_sampling/SiamFC/MOT.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/tracking/sampler/_sampling_algos/sequence_sampling/SiamFC/MOT.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/tracking/sampler/_sampling_algos/sequence_sampling/SiamFC/MOT.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | from datasets.MOT.dataset import MultipleObjectTrackingDatasetSequence_MemoryMapped
from ._algo import do_siamfc_pair_sampling_positive_only, do_siamfc_pair_sampling_negative_only, do_siamfc_pair_sampling
import numpy as np
from data.tracking.sampler._sampling_algos.sequence_sampling.common._dummy_bbox import generate_... | 56.219512 | 227 | 0.816269 |
08a8fb907973f8f2be887213e550ca4423ced21a | 17,589 | py | Python | sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # 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 may ... | 43.862843 | 204 | 0.668543 |
08a903b77ac814ff332faa070e87c213e6b142d6 | 5,473 | py | Python | kafka_utils/kafka_consumer_manager/commands/offset_save.py | yemyatthein/kafka-utils | 243cab3031f8af41ab4a8cfdce391f5377eba1c4 | [
"Apache-2.0"
] | 302 | 2016-05-18T02:05:04.000Z | 2022-03-28T21:36:28.000Z | kafka_utils/kafka_consumer_manager/commands/offset_save.py | yemyatthein/kafka-utils | 243cab3031f8af41ab4a8cfdce391f5377eba1c4 | [
"Apache-2.0"
] | 135 | 2016-05-17T23:15:16.000Z | 2021-11-04T13:35:51.000Z | kafka_utils/kafka_consumer_manager/commands/offset_save.py | yemyatthein/kafka-utils | 243cab3031f8af41ab4a8cfdce391f5377eba1c4 | [
"Apache-2.0"
] | 133 | 2016-05-18T10:23:05.000Z | 2022-01-29T17:24:17.000Z | # -*- coding: utf-8 -*-
# Copyright 2016 Yelp 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 ... | 35.771242 | 95 | 0.630002 |
08a91a5a89cceabef5be65b6971d06c585941b35 | 851 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_KZ.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_KZ.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/shortdata/region_KZ.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. KZ metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_KZ = PhoneMetadata(id='KZ', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[134]\\d{2,4}', possible_length=(3,... | 77.363636 | 134 | 0.760282 |
08a948e5b613cefa2e55ff08aec80f5fd8397df6 | 2,505 | py | Python | aiolegomac/app.py | beenje/aiolegomac | 4bf780749e018750c5644fea3e84f09444c43d3d | [
"BSD-2-Clause"
] | 1 | 2017-12-29T14:24:34.000Z | 2017-12-29T14:24:34.000Z | aiolegomac/app.py | beenje/aiolegomac | 4bf780749e018750c5644fea3e84f09444c43d3d | [
"BSD-2-Clause"
] | 5 | 2021-03-18T20:23:21.000Z | 2022-03-11T23:16:41.000Z | aiolegomac/app.py | beenje/aiolegomac | 4bf780749e018750c5644fea3e84f09444c43d3d | [
"BSD-2-Clause"
] | null | null | null | import asyncio
import datetime
import functools
import logging
import pathlib
import apigpio
import pytz
import yaml
from aiohttp import web
from .api import setup_routes
from .aioepd import Clock, EPD
from .middlewares import setup_middlewares
BUTTON_GPIO = 22
PROJECT_ROOT = pathlib.Path(__file__).parent
logger = lo... | 29.821429 | 76 | 0.649102 |
08a95b3c94d4541148cc011f22d50889cc1e1ee3 | 9,322 | py | Python | airflow_client/test/test_user_api.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_user_api.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | airflow_client/test/test_user_api.py | sptsakcg/airflow-client-python | 38a14e8641988f8cc88a5b27632ef4198bdb2843 | [
"Apache-2.0"
] | null | null | null | """
Airflow API (Stable)
# Overview To facilitate management, Apache Airflow supports a range of REST API endpoints across its objects. This section provides an overview of the API design, methods, and supported use cases. Most of the endpoints accept `JSON` as input and return `JSON` responses. This means t... | 143.415385 | 8,173 | 0.742437 |
08a95c5ab03c3ef2c157837b0e57f359d01f0426 | 17,238 | py | Python | napari/layers/image/experimental/octree_image.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/image/experimental/octree_image.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/image/experimental/octree_image.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | """OctreeImage class.
An eventual replacement for Image that combines single-scale and
chunked (tiled) multi-scale into one implementation.
"""
from __future__ import annotations
import logging
from typing import TYPE_CHECKING, List, Set
import numpy as np
from ....utils.events import Event
from ....utils.translati... | 34.202381 | 80 | 0.629887 |
08a98c510d70e6ef7119249dea3d7bef2af40c58 | 2,067 | py | Python | pages_old/new/sfbrowser/sfbrowsermainwindow.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | pages_old/new/sfbrowser/sfbrowsermainwindow.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | pages_old/new/sfbrowser/sfbrowsermainwindow.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | import os
import vdomr as vd
import spikeforest as sf
from kbucket import client as kb
import spikeforestwidgets as SFW
from sfbrowser import SFBrowser
class GroupSelectWidget(vd.Component):
def __init__(self):
vd.Component.__init__(self)
self._SEL_group = vd.components.SelectBox(options=[])
... | 28.708333 | 80 | 0.645864 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.