hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0984273e727727a60d8f91f0b4a2f3e0665136d9 | 4,673 | py | Python | src/main/resources/python_geo/distance_and_travel_time_calculation.py | LMISyntheticHealthTeam/synthea | 232f473d5cbf616e48c706e9002b9199dfc76ca3 | [
"Apache-2.0"
] | null | null | null | src/main/resources/python_geo/distance_and_travel_time_calculation.py | LMISyntheticHealthTeam/synthea | 232f473d5cbf616e48c706e9002b9199dfc76ca3 | [
"Apache-2.0"
] | null | null | null | src/main/resources/python_geo/distance_and_travel_time_calculation.py | LMISyntheticHealthTeam/synthea | 232f473d5cbf616e48c706e9002b9199dfc76ca3 | [
"Apache-2.0"
] | null | null | null | import os
try:
import requests
except ImportError:
os.system("pip3 install requests")
import requests
import json
import sys
def calculate_distance_and_travel_time(input1, input2, travel_mode="driving"):
if not isinstance(input1, str):
input1 = "{},{}".format(input1[0], input1[1])
if not i... | 43.672897 | 163 | 0.619302 |
4a4bd871543c744081fc1d10ff324f98be74c437 | 4,073 | py | Python | service.py | inadarei/twitter-unfollows | abf837147b646c7efd58fdf594548d1a97f71f6c | [
"MIT"
] | null | null | null | service.py | inadarei/twitter-unfollows | abf837147b646c7efd58fdf594548d1a97f71f6c | [
"MIT"
] | null | null | null | service.py | inadarei/twitter-unfollows | abf837147b646c7efd58fdf594548d1a97f71f6c | [
"MIT"
] | null | null | null | import threading
import twitter
import redis
import sys
import os
import json
from datetime import datetime
def env_var(name, default):
"""Safely retrieve an env var, with a default"""
return os.environ.get(name) if name in os.environ else default
# this is a pointer to the module object instance itself.
# py... | 29.092857 | 107 | 0.623619 |
11da5b6d46cfd64cb9a6982703d1d43bcedaa4f9 | 159 | py | Python | EPro-PnP-Det/epropnp_det/models/__init__.py | Lakonik/EPro-PnP | 931df847190ce10eddd1dc3e3168ce1a2f295ffa | [
"Apache-2.0"
] | 19 | 2022-03-21T10:22:24.000Z | 2022-03-30T15:43:46.000Z | EPro-PnP-Det/epropnp_det/models/__init__.py | Lakonik/EPro-PnP | 931df847190ce10eddd1dc3e3168ce1a2f295ffa | [
"Apache-2.0"
] | null | null | null | EPro-PnP-Det/epropnp_det/models/__init__.py | Lakonik/EPro-PnP | 931df847190ce10eddd1dc3e3168ce1a2f295ffa | [
"Apache-2.0"
] | 3 | 2022-03-26T08:08:24.000Z | 2022-03-30T11:17:11.000Z | """
Copyright (C) 2010-2022 Alibaba Group Holding Limited.
"""
from .dense_heads import *
from .detectors import *
from .losses import *
from .utils import *
| 17.666667 | 54 | 0.72327 |
3e2c271d9948373e5452bda3325415d47a663b36 | 17,196 | py | Python | classy_vision/generic/util.py | Yash-567/ClassyVision | 356ddca8c12c871cc950f085ab514e95aa590e11 | [
"MIT"
] | null | null | null | classy_vision/generic/util.py | Yash-567/ClassyVision | 356ddca8c12c871cc950f085ab514e95aa590e11 | [
"MIT"
] | null | null | null | classy_vision/generic/util.py | Yash-567/ClassyVision | 356ddca8c12c871cc950f085ab514e95aa590e11 | [
"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.
import collections
import contextlib
import json
import logging
import os
import time
from functools import partial
fro... | 31.322404 | 87 | 0.659223 |
3a81799590107f68bbf0776f763a80f553e0065b | 7,468 | py | Python | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/SetAutoScaleConfigRequest.py | liuzheng/aliyun-openapi-python-sdk | 1ba6743f3d6f2cef57ec9e3be1754b04293c3150 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/SetAutoScaleConfigRequest.py | liuzheng/aliyun-openapi-python-sdk | 1ba6743f3d6f2cef57ec9e3be1754b04293c3150 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ehpc/aliyunsdkehpc/request/v20180412/SetAutoScaleConfigRequest.py | liuzheng/aliyun-openapi-python-sdk | 1ba6743f3d6f2cef57ec9e3be1754b04293c3150 | [
"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... | 48.493506 | 182 | 0.740493 |
ec4e2cd049008743bee232d147faf80d1d93298c | 46,359 | py | Python | Bio/Phylo/BaseTree.py | rwst/biopython | d8280b25e3fefdf7aebb7700a7080879a4146200 | [
"BSD-3-Clause"
] | 1 | 2021-09-29T16:12:58.000Z | 2021-09-29T16:12:58.000Z | Bio/Phylo/BaseTree.py | rwst/biopython | d8280b25e3fefdf7aebb7700a7080879a4146200 | [
"BSD-3-Clause"
] | null | null | null | Bio/Phylo/BaseTree.py | rwst/biopython | d8280b25e3fefdf7aebb7700a7080879a4146200 | [
"BSD-3-Clause"
] | 1 | 2019-04-12T20:52:12.000Z | 2019-04-12T20:52:12.000Z | # Copyright (C) 2009 by Eric Talevich (eric.talevich@gmail.com)
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Base classes for Bio.Phylo objects.
All object representations for phylogenetic tree... | 37.936989 | 91 | 0.59585 |
90e3d94cca7a3dcdaa947905d29b9831f43c749c | 9,425 | py | Python | src/spaceone/inventory/connector/aws_redshift_connector/schema/service_type.py | spaceone-dev/plugin-aws-cloudservices | d685cf91edfbc2e570964fb95e5d4c1676f566f8 | [
"Apache-2.0"
] | 4 | 2020-06-22T01:48:07.000Z | 2020-08-24T00:51:09.000Z | src/spaceone/inventory/connector/aws_redshift_connector/schema/service_type.py | spaceone-dev/plugin-aws-cloudservices | d685cf91edfbc2e570964fb95e5d4c1676f566f8 | [
"Apache-2.0"
] | null | null | null | src/spaceone/inventory/connector/aws_redshift_connector/schema/service_type.py | spaceone-dev/plugin-aws-cloudservices | d685cf91edfbc2e570964fb95e5d4c1676f566f8 | [
"Apache-2.0"
] | 6 | 2020-06-22T09:19:40.000Z | 2020-09-17T06:35:37.000Z | import os
from spaceone.inventory.libs.common_parser import *
from spaceone.inventory.libs.schema.dynamic_widget import ChartWidget, CardWidget
from spaceone.inventory.libs.schema.dynamic_field import TextDyField, EnumDyField, BadgeDyField, SearchField, \
ListDyField, DateTimeDyField
from spaceone.inventory.libs.sc... | 58.540373 | 145 | 0.629496 |
1a6f3734c92cc2e259e55328ef9c119ca5654a92 | 19,220 | py | Python | pybind/nos/v6_0_2c/rbridge_id/vrf/address_family/ipv6/unicast/ipv6/route/static_route_oif/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v6_0_2c/rbridge_id/vrf/address_family/ipv6/unicast/ipv6/route/static_route_oif/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/nos/v6_0_2c/rbridge_id/vrf/address_family/ipv6/unicast/ipv6/route/static_route_oif/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 78.770492 | 798 | 0.709053 |
4e23b20581122ec27dae8a83b88b029cf9afa577 | 10,620 | py | Python | python/paddle/fluid/tests/unittests/test_var_conv_2d.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 17,085 | 2016-11-18T06:40:52.000Z | 2022-03-31T22:52:32.000Z | python/paddle/fluid/tests/unittests/test_var_conv_2d.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 29,769 | 2016-11-18T06:35:22.000Z | 2022-03-31T16:46:15.000Z | python/paddle/fluid/tests/unittests/test_var_conv_2d.py | zmxdream/Paddle | 04f042a5d507ad98f7f2cfc3cbc44b06d7a7f45c | [
"Apache-2.0"
] | 4,641 | 2016-11-18T07:43:33.000Z | 2022-03-31T15:15:02.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 34.258065 | 107 | 0.541902 |
8899ecd143b513c2060852c04cda5dd6a90b6447 | 2,392 | py | Python | tests/test_callers.py | jcranmer/dxr | ca2150da02f5e2b23ee02d8493293aae53d170cf | [
"MIT"
] | 1 | 2015-02-07T08:44:36.000Z | 2015-02-07T08:44:36.000Z | tests/test_callers.py | brucestephens/dxr | 2b50613664d3c44d44ae79a090a0cdbfd8ac494f | [
"MIT"
] | null | null | null | tests/test_callers.py | brucestephens/dxr | 2b50613664d3c44d44ae79a090a0cdbfd8ac494f | [
"MIT"
] | 1 | 2019-05-28T14:54:37.000Z | 2019-05-28T14:54:37.000Z | """Tests for searches using callers and called-by"""
from dxr.testing import SingleFileTestCase, MINIMAL_MAIN
class DirectCallTests(SingleFileTestCase):
"""Tests for searches involving direct calls"""
source = r"""
void orphan()
{
}
void called_once()
{
}
... | 23.92 | 75 | 0.496656 |
02204e268fdddb7b0059eb87e59468588bf88dae | 3,421 | py | Python | dojo/tools/gitleaks/parser.py | steven-hadfield/django-DefectDojo | 38609f7316cf6bf6cb30736f644fe2c66cc71061 | [
"BSD-3-Clause"
] | 1 | 2021-12-14T14:46:42.000Z | 2021-12-14T14:46:42.000Z | dojo/tools/gitleaks/parser.py | steven-hadfield/django-DefectDojo | 38609f7316cf6bf6cb30736f644fe2c66cc71061 | [
"BSD-3-Clause"
] | 89 | 2021-05-10T04:35:07.000Z | 2022-03-31T05:08:07.000Z | dojo/tools/gitleaks/parser.py | steven-hadfield/django-DefectDojo | 38609f7316cf6bf6cb30736f644fe2c66cc71061 | [
"BSD-3-Clause"
] | 2 | 2021-09-16T18:30:17.000Z | 2021-09-17T00:46:38.000Z | import hashlib
import json
from dojo.models import Finding
class GitleaksParser(object):
"""
A class that can be used to parse the Gitleaks JSON report files
"""
def get_scan_types(self):
return ["Gitleaks Scan"]
def get_label_for_scan_types(self, scan_type):
return scan_type
... | 41.216867 | 226 | 0.502485 |
6ec66333ab1f3cb2aa94b2b9de527d7aa650f2a1 | 107 | py | Python | distmqtt/version.py | AgriConnect/distmqtt | 6827a25eb862cc0325bda0f8443c8e65d8dd2c79 | [
"MIT"
] | 11 | 2020-07-03T20:51:01.000Z | 2022-01-01T18:25:32.000Z | distmqtt/version.py | AgriConnect/distmqtt | 6827a25eb862cc0325bda0f8443c8e65d8dd2c79 | [
"MIT"
] | 10 | 2020-07-12T15:55:04.000Z | 2022-01-05T11:48:33.000Z | distmqtt/version.py | AgriConnect/distmqtt | 6827a25eb862cc0325bda0f8443c8e65d8dd2c79 | [
"MIT"
] | 7 | 2020-08-03T03:53:41.000Z | 2022-03-03T09:10:12.000Z | def get_version():
import pkg_resources
return pkg_resources.get_distribution("distmqtt").version
| 21.4 | 61 | 0.775701 |
488b8423237a8968c7d2470239fa4ff3c631b626 | 5,491 | py | Python | pyxel/examples/02_jump_game.py | ank1009/pyxel | a238afa8fa7d5e59e9e368d44059d1f3d76c07ce | [
"MIT"
] | 3 | 2021-07-17T10:53:35.000Z | 2021-10-31T02:40:59.000Z | pyxel/examples/02_jump_game.py | ank1009/pyxel | a238afa8fa7d5e59e9e368d44059d1f3d76c07ce | [
"MIT"
] | null | null | null | pyxel/examples/02_jump_game.py | ank1009/pyxel | a238afa8fa7d5e59e9e368d44059d1f3d76c07ce | [
"MIT"
] | 11 | 2020-09-19T06:01:40.000Z | 2022-03-13T09:04:41.000Z | # 乱数のライブラリを読み込む
from random import randint
# pyxelを読み込む
import pyxel
class App:
"""
Appクラス
"""
def __init__(self):
"""
クラスからインスタンスを生成する時に最初の呼ばれる関数
"""
# Gameを初期化、画面作成
pyxel.init(160, 120, caption="Pyxel Jump")
# 素材画像を読み込む
pyxel.load("assets/jum... | 25.658879 | 87 | 0.471317 |
5a36e6b93b2af2b335d927472c50e1385f91f0b7 | 3,385 | py | Python | test/functional/test_framework/coverage.py | minblock/scancoins | 5c83d5f56201743f3893888745ccea7f7a94850b | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | minblock/scancoins | 5c83d5f56201743f3893888745ccea7f7a94850b | [
"MIT"
] | null | null | null | test/functional/test_framework/coverage.py | minblock/scancoins | 5c83d5f56201743f3893888745ccea7f7a94850b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Utilities for doing coverage analysis on the RPC interface.
Provides a way to track which RPC commands... | 30.772727 | 87 | 0.661152 |
7c7de5c81a1f0b6ebd774bd8d739f0565707021d | 2,458 | py | Python | lib/surface/service_management/access/check.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/service_management/access/check.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | null | null | null | lib/surface/service_management/access/check.py | bopopescu/SDK | e6d9aaee2456f706d1d86e8ec2a41d146e33550d | [
"Apache-2.0"
] | 1 | 2020-07-25T12:23:41.000Z | 2020-07-25T12:23:41.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 36.686567 | 89 | 0.738812 |
77d7c8c1efc0121142e1635728d58cbf184a6009 | 2,059 | py | Python | python/sentences.py | Eibriel/TokenMenu | 45890dd9fbf60670870a35aa73d8ac28789013db | [
"Apache-2.0"
] | null | null | null | python/sentences.py | Eibriel/TokenMenu | 45890dd9fbf60670870a35aa73d8ac28789013db | [
"Apache-2.0"
] | null | null | null | python/sentences.py | Eibriel/TokenMenu | 45890dd9fbf60670870a35aa73d8ac28789013db | [
"Apache-2.0"
] | null | null | null | # hello
# what can I get you?
# what would you like to have?
# I would like
# I will have
# I'm gonna have
# to
# buy
# some
# icecream
# please
# how many
# scoop
# would you like
# and what
# flavor
# chocolate
# vanilla
# raspberry
# banana
# of
# a
# kidde
# single
# double
# one X of Y and the other X of Z
# cup
#... | 19.242991 | 84 | 0.69694 |
81bb03f095e78b1d08855f599a4d9e91eb14a781 | 5,407 | py | Python | server/models/user_preferences/user_preferences.py | lluo5779/Robo-Adviser | 43aa4b73bfc96e55ed664328330a930975596124 | [
"MIT"
] | null | null | null | server/models/user_preferences/user_preferences.py | lluo5779/Robo-Adviser | 43aa4b73bfc96e55ed664328330a930975596124 | [
"MIT"
] | 3 | 2021-03-31T19:24:03.000Z | 2021-12-13T20:26:39.000Z | server/models/user_preferences/user_preferences.py | lluo5779/Robo-Adviser | 43aa4b73bfc96e55ed664328330a930975596124 | [
"MIT"
] | null | null | null | from server.common.database import Database
from server.models.portfolio.portfolio import get_past_portfolios
import pandas as pd
import datetime
def fetch_latest_questionnaire_from_type(option_type):
"""Called when portfolio name has not been declared by the user (ie. from portfolioview edit button)"""
... | 41.274809 | 139 | 0.644165 |
78dbf23b4bb468b12dc41511bd7d1711cecccedb | 1,753 | py | Python | manila/share/drivers/dell_emc/plugins/vmax/constants.py | mail2nsrajesh/manila | ec052a6cff2ddc722e3b78ab208801e6b94ab55a | [
"Apache-2.0"
] | null | null | null | manila/share/drivers/dell_emc/plugins/vmax/constants.py | mail2nsrajesh/manila | ec052a6cff2ddc722e3b78ab208801e6b94ab55a | [
"Apache-2.0"
] | null | null | null | manila/share/drivers/dell_emc/plugins/vmax/constants.py | mail2nsrajesh/manila | ec052a6cff2ddc722e3b78ab208801e6b94ab55a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Dell Inc. or its subsidiaries.
# 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
#
# ... | 31.303571 | 78 | 0.763833 |
b35f31311d7092b87543eab6a8f502436ab7e890 | 1,499 | py | Python | lib/datasets/ds_utils.py | 565353780/py-faster-rcnn | 8e373ade70a1c196fb738d80966a6968ff889887 | [
"MIT"
] | null | null | null | lib/datasets/ds_utils.py | 565353780/py-faster-rcnn | 8e373ade70a1c196fb738d80966a6968ff889887 | [
"MIT"
] | null | null | null | lib/datasets/ds_utils.py | 565353780/py-faster-rcnn | 8e373ade70a1c196fb738d80966a6968ff889887 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Fast/er R-CNN
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------
from __future__ import absolute_import
from __future__ import division
from __future__ import... | 29.98 | 73 | 0.535023 |
c74150a1335b06fb7517bd555bcbb47e4a0f28e3 | 1,767 | py | Python | 0-gradientDescent/gradientDescent.py | silvajhonatan/machine-learning | afe965dc4bb1fbe638c3932e0a65f012be6883a9 | [
"MIT"
] | null | null | null | 0-gradientDescent/gradientDescent.py | silvajhonatan/machine-learning | afe965dc4bb1fbe638c3932e0a65f012be6883a9 | [
"MIT"
] | null | null | null | 0-gradientDescent/gradientDescent.py | silvajhonatan/machine-learning | afe965dc4bb1fbe638c3932e0a65f012be6883a9 | [
"MIT"
] | null | null | null | """
Jhonatan da Silva
Last Updated version :
Sat Feb 4 17:21:08 2017
Number of code lines:
62
"""
import time
import matplotlib.pyplot as plt
import matplotlib.animation as animation
import bokeh.plotting as bp
from matplotlib import style
import numpy as np
import random
#style.use('fivethirtyeight')
class gradient... | 25.242857 | 84 | 0.584607 |
e0cdba2afd734f9c717479e3f6a6fbfbf091dd3d | 349 | py | Python | tests/internal/hibernation/test_hibernation_true_auto.py | frolovv/aws.ec2.compare | 582805823492f833d65c0441c4a14dce697c12aa | [
"Apache-2.0"
] | null | null | null | tests/internal/hibernation/test_hibernation_true_auto.py | frolovv/aws.ec2.compare | 582805823492f833d65c0441c4a14dce697c12aa | [
"Apache-2.0"
] | null | null | null | tests/internal/hibernation/test_hibernation_true_auto.py | frolovv/aws.ec2.compare | 582805823492f833d65c0441c4a14dce697c12aa | [
"Apache-2.0"
] | 1 | 2021-12-15T11:58:22.000Z | 2021-12-15T11:58:22.000Z |
# Testing module hibernation.true
import pytest
import ec2_compare.internal.hibernation.true
def test_get_internal_data_hibernation_true_get_instances_list():
assert len(ec2_compare.internal.hibernation.true.get_instances_list()) > 0
def test_get_internal_data_hibernation_true_get():
assert len(ec2_compare.intern... | 34.9 | 76 | 0.848138 |
4c3061056cf64498e0c00f2768bc01b117b44aa6 | 5,388 | py | Python | setup.py | johanols/vmprof-python | 8d86cad14ec5618ef755072b0ea0fca20c3b0765 | [
"MIT"
] | null | null | null | setup.py | johanols/vmprof-python | 8d86cad14ec5618ef755072b0ea0fca20c3b0765 | [
"MIT"
] | null | null | null | setup.py | johanols/vmprof-python | 8d86cad14ec5618ef755072b0ea0fca20c3b0765 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages, Extension
from distutils.command.build_py import build_py
import os, sys
import subprocess
import platform
IS_PYPY = '__pypy__' in sys.builtin_module_names
class vmprof_build(build_py, object):
def run(self):
super(vmprof_build, self).run()
BASEDIR = os.path.d... | 35.92 | 92 | 0.541945 |
734c2815d466e578d65b97242b850a66a4702f2b | 6,586 | py | Python | tensorflow/contrib/distributions/python/kernel_tests/binomial_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 101 | 2016-12-03T11:40:52.000Z | 2017-12-23T02:02:03.000Z | tensorflow/contrib/distributions/python/kernel_tests/binomial_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 9 | 2016-12-14T03:27:46.000Z | 2017-09-13T02:29:07.000Z | tensorflow/contrib/distributions/python/kernel_tests/binomial_test.py | connectthefuture/tensorflow | 93812423fcd5878aa2c1d0b68dc0496980c8519d | [
"Apache-2.0"
] | 47 | 2016-12-04T12:37:24.000Z | 2018-01-14T18:13:07.000Z | # Copyright 2016 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... | 37.850575 | 80 | 0.626025 |
f0a523d849ea923bdf3ffdaf1704a586aaa9a9ef | 1,953 | py | Python | django/contrib/postgres/lookups.py | PaulWay/django | 782d85b6dfa191e67c0f1d572641d8236c79174c | [
"PSF-2.0",
"BSD-3-Clause"
] | 13 | 2015-04-17T02:12:15.000Z | 2021-12-08T19:45:36.000Z | django/contrib/postgres/lookups.py | PaulWay/django | 782d85b6dfa191e67c0f1d572641d8236c79174c | [
"PSF-2.0",
"BSD-3-Clause"
] | 10 | 2016-05-19T21:54:42.000Z | 2019-08-09T15:59:50.000Z | django/contrib/postgres/lookups.py | PaulWay/django | 782d85b6dfa191e67c0f1d572641d8236c79174c | [
"PSF-2.0",
"BSD-3-Clause"
] | 11 | 2019-09-14T20:57:30.000Z | 2022-01-19T17:59:26.000Z | from django.db.models import Lookup, Transform
from django.db.models.lookups import Exact, FieldGetDbPrepValueMixin
from .search import SearchVector, SearchVectorExact, SearchVectorField
class PostgresSimpleLookup(FieldGetDbPrepValueMixin, Lookup):
def as_sql(self, qn, connection):
lhs, lhs_params = self... | 25.363636 | 70 | 0.688172 |
b7bd61ed47bd607345fa3a00f120b083b715e70c | 1,097 | py | Python | codechain/sdk/rpc/rpc.py | CodeChain-io/codechain-sdk-python | e21420fe8e1105f23f04fc6ca3f18a444c2bf9a3 | [
"0BSD"
] | 11 | 2018-08-22T09:42:54.000Z | 2019-11-30T07:19:42.000Z | codechain/sdk/rpc/rpc.py | CodeChain-io/codechain-sdk-python | e21420fe8e1105f23f04fc6ca3f18a444c2bf9a3 | [
"0BSD"
] | 38 | 2019-07-22T06:13:39.000Z | 2021-06-02T00:43:21.000Z | codechain/sdk/rpc/rpc.py | CodeChain-io/codechain-sdk-python | e21420fe8e1105f23f04fc6ca3f18a444c2bf9a3 | [
"0BSD"
] | 5 | 2019-07-24T19:13:00.000Z | 2020-03-18T12:13:27.000Z | from typing import List
from ...rpc import Rpc as Rpc_thin
class Rpc:
def __init__(
self,
server: str,
transaction_signer: str = None,
fallback_servers: List[str] = None,
):
self.server = server
self.fallback_servers = fallback_servers
from .chain impor... | 27.425 | 72 | 0.569736 |
ba876830d948b3e7398afaa73bfd66e86f4e6618 | 13,438 | py | Python | google/ads/google_ads/v2/services/campaign_budget_service_client.py | GerhardusM/google-ads-python | 7d17d4afca6fa3ffb0f38b506e47d494934163b2 | [
"Apache-2.0"
] | 1 | 2019-06-12T20:31:52.000Z | 2019-06-12T20:31:52.000Z | google/ads/google_ads/v2/services/campaign_budget_service_client.py | akaashhazarika/google-ads-python | 25b43aa616020ad7dfa55b90fa236a29cf97d45a | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v2/services/campaign_budget_service_client.py | akaashhazarika/google-ads-python | 25b43aa616020ad7dfa55b90fa236a29cf97d45a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 44.943144 | 165 | 0.650246 |
0cbd6ea827337680ef1c131e416bb54eb5c27285 | 8,025 | py | Python | dbserver/api/urls.py | nancheng58/database_course_design | 890f3880922d8c08a2b3092b2e948148669fbbb1 | [
"MIT"
] | 2 | 2020-12-01T01:09:43.000Z | 2020-12-01T01:32:43.000Z | dbserver/api/urls.py | nancheng58/database_course_design | 890f3880922d8c08a2b3092b2e948148669fbbb1 | [
"MIT"
] | null | null | null | dbserver/api/urls.py | nancheng58/database_course_design | 890f3880922d8c08a2b3092b2e948148669fbbb1 | [
"MIT"
] | 4 | 2020-09-17T12:54:48.000Z | 2020-10-19T12:08:44.000Z | from django.urls import path
from . import views
app_name = 'api'
urlpatterns = [
path("helloApi/", views.hello, name='hello'),
path("helloApi", views.hello, name='hello'),
# path("get_token/", views.get_token, name='get_token'),
path("activitynum/", views.activitynum, name='activitynum'),
path(... | 42.914439 | 84 | 0.700685 |
97213b1078b201ba21621bf498b8b8d5ebd11f22 | 523 | py | Python | Module 1/Chapter 7/prog13.py | PacktPublishing/Raspberry-Pi-Making-Amazing-Projects-Right-from-Scratch- | 49fd30ca8e1e30e7d85cf14e9dcb6e1d24d4a445 | [
"MIT"
] | 3 | 2016-11-15T02:27:27.000Z | 2017-12-28T20:14:21.000Z | Module 1/Chapter 7/prog13.py | PacktPublishing/Raspberry-Pi-Making-Amazing-Projects-Right-from-Scratch- | 49fd30ca8e1e30e7d85cf14e9dcb6e1d24d4a445 | [
"MIT"
] | null | null | null | Module 1/Chapter 7/prog13.py | PacktPublishing/Raspberry-Pi-Making-Amazing-Projects-Right-from-Scratch- | 49fd30ca8e1e30e7d85cf14e9dcb6e1d24d4a445 | [
"MIT"
] | 5 | 2017-12-28T20:16:05.000Z | 2021-04-22T17:30:05.000Z | import cv2
import matplotlib.pyplot as plt
img1 = cv2.imread('Barcode_Hor.png',0)
img2 = cv2.imread('Barcode_Ver.png',0)
not_out=cv2.bitwise_not(img1)
and_out=cv2.bitwise_and(img1,img2)
or_out=cv2.bitwise_or(img1,img2)
xor_out=cv2.bitwise_xor(img1,img2)
titles = ['Image 1','Image 2','Image 1 NOT','AND','OR','XOR']
im... | 27.526316 | 61 | 0.705545 |
6c01ec14e24e4dd694fce8f9618fe33dfbfc2953 | 7,000 | py | Python | api/users/serializers.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | api/users/serializers.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | api/users/serializers.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers as ser
from modularodm.exceptions import ValidationValueError
from api.base.exceptions import InvalidModelValueError
from api.base.serializers import AllowMissing, JSONAPIRelationshipSerializer
from website.models import User
from api.base.serializers import (
JSONAPISerial... | 50 | 165 | 0.648857 |
8bc76f8735e1ac89bd3ed0c2b5af8ec5e0619fd5 | 4,411 | py | Python | src/gufo/err/failfast/typematch.py | gufolabs/gufo_err | d3996f355b38a3efe1fa3ecae578846ffebd7790 | [
"BSD-3-Clause"
] | null | null | null | src/gufo/err/failfast/typematch.py | gufolabs/gufo_err | d3996f355b38a3efe1fa3ecae578846ffebd7790 | [
"BSD-3-Clause"
] | null | null | null | src/gufo/err/failfast/typematch.py | gufolabs/gufo_err | d3996f355b38a3efe1fa3ecae578846ffebd7790 | [
"BSD-3-Clause"
] | null | null | null | # ---------------------------------------------------------------------
# Gufo Err: TypeMatchFailFast
# ---------------------------------------------------------------------
# Copyright (C) 2022, Gufo Labs
# ---------------------------------------------------------------------
# Python modules
from typing import Type,... | 27.228395 | 79 | 0.490138 |
81dd4037e656d86d20798bff9983f2e359c3bf6c | 4,480 | py | Python | streamml2/streamline/model_selection/models/AbstractClassifierPredictiveModel.py | conradbm/streamml2 | f2c5cec0c397b348b5faf5ea965ec8dc21518d5f | [
"MIT"
] | 1 | 2019-05-29T22:33:26.000Z | 2019-05-29T22:33:26.000Z | streamml2/streamline/model_selection/models/AbstractClassifierPredictiveModel.py | conradbm/streamml2 | f2c5cec0c397b348b5faf5ea965ec8dc21518d5f | [
"MIT"
] | null | null | null | streamml2/streamline/model_selection/models/AbstractClassifierPredictiveModel.py | conradbm/streamml2 | f2c5cec0c397b348b5faf5ea965ec8dc21518d5f | [
"MIT"
] | null | null | null | from sklearn.pipeline import Pipeline
from sklearn.model_selection import GridSearchCV
from sklearn.metrics import cohen_kappa_score
from sklearn.metrics import roc_auc_score
from sklearn.metrics import log_loss
from sklearn.metrics import f1_score
from sklearn.metrics import precision_score
from sklearn.metrics impo... | 44.356436 | 147 | 0.588839 |
a14acda5d7046acf7fe28e3a54d25d0bef878429 | 1,184 | py | Python | src/ethereum/frontier/vm/__init__.py | VieYang/eth1.0-specs | c177716e56a9e357c8835bcc5252e833b2d2ced5 | [
"CC0-1.0"
] | null | null | null | src/ethereum/frontier/vm/__init__.py | VieYang/eth1.0-specs | c177716e56a9e357c8835bcc5252e833b2d2ced5 | [
"CC0-1.0"
] | null | null | null | src/ethereum/frontier/vm/__init__.py | VieYang/eth1.0-specs | c177716e56a9e357c8835bcc5252e833b2d2ced5 | [
"CC0-1.0"
] | null | null | null | """
Ethereum Virtual Machine (EVM)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. contents:: Table of Contents
:backlinks: none
:local:
Introduction
------------
The abstract computer which runs the code stored in an
`eth1spec.eth_types.Account`.
"""
from dataclasses import dataclass
from typing import List, Set
from e... | 18.5 | 78 | 0.662162 |
c1cad061f658ad494beb8ba3a99181519c45cb83 | 1,433 | py | Python | create_admin.py | ramdaz/kuppi | f696fd4154083594846c05f860be551bff69f7a5 | [
"Unlicense"
] | null | null | null | create_admin.py | ramdaz/kuppi | f696fd4154083594846c05f860be551bff69f7a5 | [
"Unlicense"
] | null | null | null | create_admin.py | ramdaz/kuppi | f696fd4154083594846c05f860be551bff69f7a5 | [
"Unlicense"
] | null | null | null | import os, sys, getpass,re
from settings import *
from utils import *
email_re = re.compile(
r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*" # dot-atom
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"' # quoted-string
r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-... | 28.098039 | 100 | 0.632938 |
b982dbcf4ea06f4cfa5c406bdc5ef702d7620de0 | 4,350 | py | Python | sort_visualizer/algs.py | DirectDuck/sorting_visualizer | 7513b64e12c1aa9348f6957fe4ee6e3cfe870031 | [
"MIT"
] | 2 | 2020-09-12T18:48:18.000Z | 2021-07-31T16:03:29.000Z | sort_visualizer/algs.py | DirectDuck/sorting_visualizer | 7513b64e12c1aa9348f6957fe4ee6e3cfe870031 | [
"MIT"
] | 1 | 2021-07-31T16:28:33.000Z | 2021-07-31T16:28:33.000Z | sort_visualizer/algs.py | DirectDuck/sorting_visualizer | 7513b64e12c1aa9348f6957fe4ee6e3cfe870031 | [
"MIT"
] | 1 | 2021-07-31T15:50:56.000Z | 2021-07-31T15:50:56.000Z | class Sort():
def execute(self):
raise NotImplementedError(f'define execute method in {self.__class__.__name__} class')
class BubbleSort(Sort):
def execute(self):
self._bubble()
def _bubble(self):
for i in range(len(self.array) - 1):
for j in range(len(self.array) - ... | 26.851852 | 94 | 0.463678 |
067168b2f175835e8b7b030e2b851f3e9d251bc0 | 2,895 | py | Python | tools/export/embitz/__init__.py | kix99aug/mb5.9 | f7637e3426237fce04674da15bbeb093f96eda30 | [
"Apache-2.0"
] | null | null | null | tools/export/embitz/__init__.py | kix99aug/mb5.9 | f7637e3426237fce04674da15bbeb093f96eda30 | [
"Apache-2.0"
] | null | null | null | tools/export/embitz/__init__.py | kix99aug/mb5.9 | f7637e3426237fce04674da15bbeb093f96eda30 | [
"Apache-2.0"
] | null | null | null | """
mbed SDK
Copyright (c) 2014-2016 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 wr... | 31.813187 | 75 | 0.629016 |
70712dd69190ac56202da8a763b332a0540def6c | 1,114 | py | Python | tests/test_staging.py | isoteemu/TJTS5901-BeeMapTemlate | 83a9ccbda4eb2ce4edf2f05e83a78f8ee5403c0b | [
"MIT"
] | null | null | null | tests/test_staging.py | isoteemu/TJTS5901-BeeMapTemlate | 83a9ccbda4eb2ce4edf2f05e83a78f8ee5403c0b | [
"MIT"
] | null | null | null | tests/test_staging.py | isoteemu/TJTS5901-BeeMapTemlate | 83a9ccbda4eb2ce4edf2f05e83a78f8ee5403c0b | [
"MIT"
] | null | null | null | import os
import unittest
import pytest
import requests
# Module requires website_staging environment variable to be defined, and it should be url pointing to staging website.
if not os.getenv("WEBSITE_STAGING"):
pytest.skip(
"No $WEBSITE_STAGING defined, skipping availability tests",
allow_modul... | 30.108108 | 119 | 0.680431 |
f71cc027fdd19119fb0399b5df5021a92a9837ac | 2,248 | py | Python | e3d/plugin_management/PluginHandlers.py | jr-garcia/Engendro3D | 93a6a6c26be2b9a8c1520e9d83516c39532ab1ed | [
"MIT"
] | 8 | 2017-04-19T03:59:43.000Z | 2020-04-29T00:29:12.000Z | e3d/plugin_management/PluginHandlers.py | jr-garcia/Engendro3D | 93a6a6c26be2b9a8c1520e9d83516c39532ab1ed | [
"MIT"
] | null | null | null | e3d/plugin_management/PluginHandlers.py | jr-garcia/Engendro3D | 93a6a6c26be2b9a8c1520e9d83516c39532ab1ed | [
"MIT"
] | 3 | 2018-04-26T16:57:46.000Z | 2021-03-01T05:48:06.000Z | from os import path
from shutil import make_archive
import os
from json import load, dump
PLUGINEXTENSION = '.epf'
DESCRIPTIONNAME = 'description'
def packPluginFromFolder(folderPath):
folderPath = path.abspath(folderPath)
if not path.exists(folderPath):
raise FileNotFoundError('the folder does not ... | 32.57971 | 105 | 0.666815 |
4581c8e94fe5c15c9b28fe1c49c061dd0c4fcb2a | 268 | gyp | Python | node_modules/memwatch-next/binding.gyp | dfeddon/joust-multiplayer-js | c4939849a9f989479cefd540cbdd1de19818ad6c | [
"MIT"
] | 1 | 2018-09-12T15:43:32.000Z | 2018-09-12T15:43:32.000Z | node_modules/memwatch-next/binding.gyp | dfeddon/joust-multiplayer-js | c4939849a9f989479cefd540cbdd1de19818ad6c | [
"MIT"
] | null | null | null | node_modules/memwatch-next/binding.gyp | dfeddon/joust-multiplayer-js | c4939849a9f989479cefd540cbdd1de19818ad6c | [
"MIT"
] | 3 | 2018-09-12T15:43:33.000Z | 2019-07-10T09:50:15.000Z | {
'targets': [
{
'target_name': 'memwatch',
'include_dirs': [
"<!(node -e \"require('nan')\")"
],
'sources': [
'src/heapdiff.cc',
'src/init.cc',
'src/memwatch.cc',
'src/util.cc'
]
}
]
}
| 15.764706 | 40 | 0.38806 |
638f597e27b9e64edf63c225ecdb1c20ef7c254c | 8,716 | py | Python | precomputeNetMHC/netMHCCalling.py | mrForce/immunoGalaxy | 8eabd8db6dfb94851087f61b5fd60bd192e2258b | [
"MIT"
] | null | null | null | precomputeNetMHC/netMHCCalling.py | mrForce/immunoGalaxy | 8eabd8db6dfb94851087f61b5fd60bd192e2258b | [
"MIT"
] | null | null | null | precomputeNetMHC/netMHCCalling.py | mrForce/immunoGalaxy | 8eabd8db6dfb94851087f61b5fd60bd192e2258b | [
"MIT"
] | null | null | null | import threading
import tempfile
import subprocess
import csv
import queue
import os
import pdb
import itertools
from precomputedNetMHCIndex import AbstractScorer
#retry 2 times if necessary, for a total of 3 runs for a single batch of peptides.
NUM_RETRY=2
class NetMHCError(Exception):
pass
class NetMHCRunFailedEr... | 35.57551 | 156 | 0.573428 |
6fa218bf9a8b9f2cf4248df26b4e44c2fc92d177 | 275 | py | Python | data_structures/binary_search_tree/conftest.py | tyler-fishbone/data-structures-and-algorithms | 29790f2672d3ddb0aadf62725f28180b092f4568 | [
"MIT"
] | null | null | null | data_structures/binary_search_tree/conftest.py | tyler-fishbone/data-structures-and-algorithms | 29790f2672d3ddb0aadf62725f28180b092f4568 | [
"MIT"
] | 4 | 2018-03-22T19:19:11.000Z | 2018-04-11T00:35:26.000Z | data_structures/binary_search_tree/conftest.py | tyler-fishbone/data-structures-and-algorithms | 29790f2672d3ddb0aadf62725f28180b092f4568 | [
"MIT"
] | null | null | null | import pytest
from .node import Node
from .bst import BST
@pytest.fixture
def bst_ten_values_random():
""" returns a BST for a list of known values """
return BST([5,8,3,4,1,2,9,6,7,0])
@pytest.fixture
def bst_empty():
""" returns empty BST """
return BST() | 21.153846 | 52 | 0.665455 |
516734414753e6073b2908ccebac383f787b158d | 9,685 | py | Python | ndg/security/common/openssl.py | philipkershaw/ndg_security_common | 6d0925cd9876ec1a4a45978a0303189766e3ece0 | [
"BSD-3-Clause"
] | null | null | null | ndg/security/common/openssl.py | philipkershaw/ndg_security_common | 6d0925cd9876ec1a4a45978a0303189766e3ece0 | [
"BSD-3-Clause"
] | null | null | null | ndg/security/common/openssl.py | philipkershaw/ndg_security_common | 6d0925cd9876ec1a4a45978a0303189766e3ece0 | [
"BSD-3-Clause"
] | null | null | null | """OpenSSL utilities module - contains OpenSSLConfig class for
parsing OpenSSL configuration files
NERC Data Grid Project
"""
__author__ = "P J Kershaw"
__date__ = "08/02/07"
__copyright__ = "(C) 2009 Science and Technology Facilities Council"
__license__ = "BSD - see LICENSE file in top-level directory"
__contact__ =... | 35.346715 | 89 | 0.572432 |
e4e4828ff6c7115a063700d13fd216aac5b17268 | 3,745 | py | Python | src/models/enet_naive_upsampling/encoder.py | Rob174/enet-keras | 95ce39474b4b95521b64d176dfb7455d57716fde | [
"MIT"
] | 1 | 2019-01-22T06:40:21.000Z | 2019-01-22T06:40:21.000Z | src/models/enet_naive_upsampling/encoder.py | MLearing/enet-keras | 168b7e07ccf225c793efaea9b363adafab79b5a1 | [
"MIT"
] | null | null | null | src/models/enet_naive_upsampling/encoder.py | MLearing/enet-keras | 168b7e07ccf225c793efaea9b363adafab79b5a1 | [
"MIT"
] | null | null | null | # coding=utf-8
from keras.layers.advanced_activations import PReLU
from keras.layers.convolutional import Conv2D, ZeroPadding2D
from keras.layers.core import SpatialDropout2D, Permute
from keras.layers.merge import add, concatenate
from keras.layers.normalization import BatchNormalization
from keras.layers.pooling impo... | 42.556818 | 120 | 0.668625 |
25e4cd15ca15127368ef00635fd5402706ef642d | 4,256 | py | Python | app/tests/algorithms_tests/test_forms.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | 1 | 2021-02-09T10:30:44.000Z | 2021-02-09T10:30:44.000Z | app/tests/algorithms_tests/test_forms.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | null | null | null | app/tests/algorithms_tests/test_forms.py | njmhendrix/grand-challenge.org | 9bc36f5e26561a78bd405e8ea5e4c0f86c95f011 | [
"Apache-2.0"
] | null | null | null | import pytest
from grandchallenge.algorithms.models import (
Algorithm,
AlgorithmPermissionRequest,
)
from grandchallenge.core.management.commands.init_gc_demo import (
get_temporary_image,
)
from tests.algorithms_tests.factories import (
AlgorithmFactory,
AlgorithmPermissionRequestFactory,
)
from ... | 29.150685 | 79 | 0.676457 |
fabae026d6855bbb0947954b4a1c220142a13011 | 2,244 | py | Python | LogSystem_JE/venv/Lib/site-packages/pygments/styles/perldoc.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | LogSystem_JE/venv/Lib/site-packages/pygments/styles/perldoc.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | LogSystem_JE/venv/Lib/site-packages/pygments/styles/perldoc.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pygments.styles.perldoc
~~~~~~~~~~~~~~~~~~~~~~~
Style similar to the style used in the `perldoc`_ code blocks.
.. _perldoc: http://perldoc.perl.org/
:copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.... | 32.057143 | 71 | 0.470143 |
2475b7e81ea279cd25c1101ee77a84760b627d58 | 5,252 | py | Python | NeuralNetKeras/AutoEncoder.py | MAliElakhrass/DeepYed | 79878857f9f2fe07f3228aa5334383f5889c3c1b | [
"MIT"
] | 2 | 2021-11-16T02:57:11.000Z | 2021-11-16T02:57:17.000Z | NeuralNetKeras/AutoEncoder.py | MAliElakhrass/DeepYed | 79878857f9f2fe07f3228aa5334383f5889c3c1b | [
"MIT"
] | null | null | null | NeuralNetKeras/AutoEncoder.py | MAliElakhrass/DeepYed | 79878857f9f2fe07f3228aa5334383f5889c3c1b | [
"MIT"
] | null | null | null | import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
from DenseTied import DenseTied
from sklearn.model_selection import train_test_split
from tensorflow.keras import Input, Model
from tensorflow.keras.callbacks import EarlyStopping, ModelCheckpoint
from tensorflow.keras.layers import Dense
from tensorflow.keras.models i... | 33.240506 | 118 | 0.643564 |
7261002e31b246a15bc2593077d20473854789dd | 1,315 | py | Python | build_onsave.py | Decyzy/moveit_tutorials | 7be17f55f74bdd851fc6c7d8214eb2fce32a04d1 | [
"BSD-3-Clause"
] | 1 | 2021-01-29T07:35:25.000Z | 2021-01-29T07:35:25.000Z | build_onsave.py | Decyzy/moveit_tutorials | 7be17f55f74bdd851fc6c7d8214eb2fce32a04d1 | [
"BSD-3-Clause"
] | null | null | null | build_onsave.py | Decyzy/moveit_tutorials | 7be17f55f74bdd851fc6c7d8214eb2fce32a04d1 | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python3
import subprocess
import sys
import pyinotify
import os
import time
class OnWriteHandler(pyinotify.ProcessEvent):
def my_init(self, cwd, extension, cmd):
self.cwd = cwd
self.extensions = extension.split(',')
self.cmd = cmd
self.last_update_time = time.time... | 28.586957 | 76 | 0.642586 |
39ae8d1caacfa041d620b409f581ec0325fbb3ca | 9,718 | py | Python | scope/device/leica/nosepiece.py | drew-sinha/rpc-scope | 268864097b5b7d123a842f216adc446ec6b32d01 | [
"MIT"
] | null | null | null | scope/device/leica/nosepiece.py | drew-sinha/rpc-scope | 268864097b5b7d123a842f216adc446ec6b32d01 | [
"MIT"
] | null | null | null | scope/device/leica/nosepiece.py | drew-sinha/rpc-scope | 268864097b5b7d123a842f216adc446ec6b32d01 | [
"MIT"
] | null | null | null | # This code is licensed under the MIT License (see LICENSE file for details)
import collections
from ...messaging import message_device
from . import stand
from . import microscopy_method_names
POS_ABS_OBJ = 76022
GET_POS_OBJ = 76023
SET_MODE = 76025
GET_MODE = 76026
SET_IMM_DRY = 76027
GET_IMM_DRY = 76028
SET_OBJPA... | 51.967914 | 174 | 0.653941 |
a96a527e46fcef07dae10af896855b38de1ef09f | 3,912 | py | Python | scality_sproxyd_client/utils.py | scality/scality-sproxyd-client | 7330aa9634ceac4370c5b3457091f0669b0cc12a | [
"Apache-2.0"
] | 2 | 2019-07-18T13:41:27.000Z | 2021-10-06T08:19:24.000Z | scality_sproxyd_client/utils.py | scality/scality-sproxyd-client | 7330aa9634ceac4370c5b3457091f0669b0cc12a | [
"Apache-2.0"
] | 24 | 2015-02-19T17:07:39.000Z | 2016-03-02T12:36:50.000Z | scality_sproxyd_client/utils.py | scality/scality-sproxyd-client | 7330aa9634ceac4370c5b3457091f0669b0cc12a | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Scality
#
# 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, s... | 32.87395 | 83 | 0.673057 |
4f34fc31d7aaecaf3b361dc4e9b08361a50657ba | 7,706 | py | Python | Products/CMFDefault/tests/test_File.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | null | null | null | Products/CMFDefault/tests/test_File.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | 5 | 2017-07-13T00:51:25.000Z | 2021-02-04T15:08:39.000Z | Products/CMFDefault/tests/test_File.py | zopefoundation/Products.CMFDefault | a176d9aac5a7e04725dbd0f7b76c6ac357062139 | [
"ZPL-2.1"
] | 3 | 2017-07-08T03:22:35.000Z | 2018-05-20T06:42:03.000Z | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | 37.590244 | 79 | 0.661562 |
a34fc5fdbbea844045b427c09fbc246aa48ae72b | 4,694 | py | Python | reapy_boost/core/reaper/defer.py | wiccy46/reapy-boost | bcfa60bf4995e3078a2b9afe230bae2323ca6d64 | [
"MIT"
] | 2 | 2022-03-09T16:01:19.000Z | 2022-03-17T13:45:13.000Z | reapy_boost/core/reaper/defer.py | wiccy46/reapy-boost | bcfa60bf4995e3078a2b9afe230bae2323ca6d64 | [
"MIT"
] | null | null | null | reapy_boost/core/reaper/defer.py | wiccy46/reapy-boost | bcfa60bf4995e3078a2b9afe230bae2323ca6d64 | [
"MIT"
] | 1 | 2022-03-18T16:47:04.000Z | 2022-03-18T16:47:04.000Z | """Define reapy_boost.defer and reapy_boost.at_exit."""
import reapy_boost
import os
import sys
import tempfile
import typing as ty
class Deferrer:
"""Class to register and run deferred calls."""
_next_call_id: int = 0
_callbacks: ty.Dict[int, ty.Callable[..., ty.Any]] = {}
_args: ty.Dict[int, ty.T... | 28.448485 | 78 | 0.605028 |
f4b502b9a95821d846085cb9ac3555209e8fd626 | 2,514 | py | Python | tools/others/android_attack.py | Coldwave96/HackINonE | 06236b7c2b03ef1481798e084e3f27430069eac9 | [
"Apache-2.0"
] | 5 | 2020-08-10T07:26:04.000Z | 2022-01-11T07:40:15.000Z | tools/others/android_attack.py | Coldwave96/HackINonE | 06236b7c2b03ef1481798e084e3f27430069eac9 | [
"Apache-2.0"
] | null | null | null | tools/others/android_attack.py | Coldwave96/HackINonE | 06236b7c2b03ef1481798e084e3f27430069eac9 | [
"Apache-2.0"
] | 3 | 2021-01-14T03:03:04.000Z | 2021-11-30T06:46:02.000Z | # coding=utf-8
from core import HackINonE
from core import HackINonECollection
class Keydroid(HackINonE):
TITLE = "Keydroid"
DESCRIPTION = "Android Keylogger + Reverse Shell\n" \
"[!] You have to install Some Manually Refer Below Link:\n " \
"[+] https://github.com/F4dl0/ke... | 38.676923 | 88 | 0.659905 |
2cc4501305f39168b8553dcf49540cc825e007ad | 826 | py | Python | zamiaai/skills/psychology/__init__.py | 0zAND1z/zamia-ai | d9e9c6123fdadca3fae55e87ea2b2b32d82bc210 | [
"Apache-2.0"
] | 129 | 2017-03-23T14:20:33.000Z | 2022-01-03T01:52:22.000Z | zamiaai/skills/psychology/__init__.py | 0zAND1z/zamia-ai | d9e9c6123fdadca3fae55e87ea2b2b32d82bc210 | [
"Apache-2.0"
] | 6 | 2017-03-09T22:32:55.000Z | 2021-05-13T19:07:48.000Z | zamiaai/skills/psychology/__init__.py | gooofy/voxforge | da21be38e976aae67214537a27a30541afd3b5aa | [
"Apache-2.0"
] | 22 | 2017-04-07T15:44:05.000Z | 2022-03-13T02:41:08.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016, 2017, 2018 Guenter Bartsch
#
# 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... | 25.8125 | 74 | 0.728814 |
0fc1be7fef4dc192d359a858d36d0f3624c830c4 | 1,497 | py | Python | Day_01/main.py | Microgenital/Advent-of-Code-2021 | 5298f359e145976d813cda46da9a1bbeb118f7d4 | [
"MIT"
] | null | null | null | Day_01/main.py | Microgenital/Advent-of-Code-2021 | 5298f359e145976d813cda46da9a1bbeb118f7d4 | [
"MIT"
] | null | null | null | Day_01/main.py | Microgenital/Advent-of-Code-2021 | 5298f359e145976d813cda46da9a1bbeb118f7d4 | [
"MIT"
] | null | null | null | #############################
# www.adventofcode.com/2021 #
# Challenge: Day 1 #
#############################
def main_01():
# read input data from input.txt
with open('input.txt', 'r') as f:
data = f.read().splitlines()
# convert input strings to ints
intData = [int(x) for x in dat... | 24.145161 | 108 | 0.58517 |
50a9a5c1611418226fd737d27264413073f89ea0 | 14,218 | py | Python | SGL-darts/search-xxx-20210314-184821/scripts/architect_coop_pretrain.py | chaitanyaspatil/DeepLearningSGL | 3f6b55030277d109b09441a7a6a48f8be3b45d57 | [
"MIT"
] | null | null | null | SGL-darts/search-xxx-20210314-184821/scripts/architect_coop_pretrain.py | chaitanyaspatil/DeepLearningSGL | 3f6b55030277d109b09441a7a6a48f8be3b45d57 | [
"MIT"
] | null | null | null | SGL-darts/search-xxx-20210314-184821/scripts/architect_coop_pretrain.py | chaitanyaspatil/DeepLearningSGL | 3f6b55030277d109b09441a7a6a48f8be3b45d57 | [
"MIT"
] | null | null | null | import torch
import numpy as np
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
def _concat(xs):
return torch.cat([x.view(-1) for x in xs])
def softXEnt(input, target):
logprobs = F.log_softmax(input, dim=1)
return -(target * logprobs).sum() / input.shape[0]
class A... | 39.826331 | 85 | 0.619567 |
8d0ddc3a54ef03fc9bb2ca35ca89adb2ebd19b85 | 17 | py | Python | test/integration/StaticVariableDeclare/protected value.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 30 | 2019-10-29T12:47:50.000Z | 2022-02-12T06:41:39.000Z | test/integration/StaticVariableDeclare/protected value.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 247 | 2017-09-21T17:11:18.000Z | 2019-10-08T12:59:07.000Z | test/integration/StaticVariableDeclare/protected value.py | HighSchoolHacking/GLS-Draft | 9e418b6290e7c8e3f2da87668784bdba1cde5a76 | [
"MIT"
] | 17 | 2017-10-01T16:53:20.000Z | 2018-11-28T07:20:35.000Z | #
_aaa = "bbb"
#
| 4.25 | 12 | 0.411765 |
5762f8dd85bc6c8154e3cfc580e229c6a9e92080 | 531 | py | Python | sprint/tools_sam/sam2fq.py | jumphone/sprint | 94a5e5450d73b357497fba11eef818c6cc8792aa | [
"MIT"
] | 44 | 2018-03-09T22:22:50.000Z | 2021-09-15T09:40:54.000Z | sprint/tools_sam/sam2fq.py | jumphone/sprint | 94a5e5450d73b357497fba11eef818c6cc8792aa | [
"MIT"
] | 30 | 2018-03-19T05:30:05.000Z | 2022-01-21T06:54:45.000Z | sprint/tools_sam/sam2fq.py | jumphone/sprint | 94a5e5450d73b357497fba11eef818c6cc8792aa | [
"MIT"
] | 13 | 2018-06-30T10:07:02.000Z | 2021-06-10T13:25:43.000Z | def sam2fq(sam_in_dir,fq_out_dir):
fi=open(sam_in_dir)
fo=open(fq_out_dir,'w')
for line in fi:
seq=line.rstrip().split('\t')
if line[0] !='@':
# if len(bin(int(seq[1])))>=9 and bin(int(seq[1]))[-7]=='1':
# seq[0]=seq[0][0:-2]+'_1'
# elif len(bin(int(seq[1])))>=10 and bin(int(seq[1]))[-8]=='1':
# seq[0... | 26.55 | 65 | 0.508475 |
19bd7b5a1ba947fdfb6791ef4ab7d85fc8a2719f | 251 | py | Python | Part_2/ch15_scheduleTask/15_4_2_sleep.py | hyperpc/AutoStuffWithPython | e05f5e0acb5818d634e4ab84d640848cd4ae7e70 | [
"MIT"
] | null | null | null | Part_2/ch15_scheduleTask/15_4_2_sleep.py | hyperpc/AutoStuffWithPython | e05f5e0acb5818d634e4ab84d640848cd4ae7e70 | [
"MIT"
] | null | null | null | Part_2/ch15_scheduleTask/15_4_2_sleep.py | hyperpc/AutoStuffWithPython | e05f5e0acb5818d634e4ab84d640848cd4ae7e70 | [
"MIT"
] | null | null | null | import datetime, time
def test_timesleep():
halloween2016 = datetime.datetime(2016, 10, 31, 0, 0, 0)
while datetime.datetime.now() < halloween2016:
time.sleep(1)
def main():
test_timesleep()
if __name__ == '__main__':
main() | 20.916667 | 60 | 0.657371 |
a5502306e830622f85a58562fa46d0e24ae3fc56 | 657 | py | Python | appyter/ext/hashlib.py | MaayanLab/jupyter-template | dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5 | [
"Apache-2.0"
] | null | null | null | appyter/ext/hashlib.py | MaayanLab/jupyter-template | dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5 | [
"Apache-2.0"
] | 24 | 2020-04-07T17:04:47.000Z | 2020-05-27T00:51:25.000Z | appyter/ext/hashlib.py | MaayanLab/jupyter-template | dd05bfcb95c9eafb1a9df845b5d8fecae1d6b9d5 | [
"Apache-2.0"
] | null | null | null | import functools
def hashsum_io(algo, io, chunk_size=65536):
import hashlib
hashsum = hashlib.new(algo)
while True:
buf = io.read(chunk_size)
if not buf: break
hashsum.update(buf)
return hashsum.hexdigest()
sha1sum_io = functools.partial(hashsum_io, 'sha1')
def hashsum_str(algo, obj):
import ha... | 24.333333 | 95 | 0.739726 |
b0a8ba7dbc038ebdb2f61b135b4b3b1eca6f4400 | 2,522 | py | Python | torch_geometric/datasets/ppi.py | cysmnl/geometric_cognition | 473c0cf585aaf49904bfb87c35ea706e12f67f8a | [
"MIT"
] | 2 | 2018-10-20T18:12:08.000Z | 2021-06-19T15:14:10.000Z | torch_geometric/datasets/ppi.py | cysmnl/geometric_cognition | 473c0cf585aaf49904bfb87c35ea706e12f67f8a | [
"MIT"
] | null | null | null | torch_geometric/datasets/ppi.py | cysmnl/geometric_cognition | 473c0cf585aaf49904bfb87c35ea706e12f67f8a | [
"MIT"
] | null | null | null | import os
import os.path as osp
import json
import torch
import numpy as np
from torch_sparse import coalesce
from torch_geometric.data import (InMemoryDataset, Data, download_url,
extract_zip)
from torch_geometric.utils import remove_self_loops
class PPI(InMemoryDataset):
url =... | 33.626667 | 79 | 0.613402 |
fee04b6ba6947c4bae120688355c217c75d42767 | 13,647 | py | Python | gpath/parse.py | insilichem/gpathfinder | e6c7df14d473857acb007efbae3cc7b4fee1b330 | [
"Apache-2.0"
] | 5 | 2020-03-22T20:21:47.000Z | 2022-03-08T07:50:25.000Z | gpath/parse.py | insilichem/gpathfinder | e6c7df14d473857acb007efbae3cc7b4fee1b330 | [
"Apache-2.0"
] | 2 | 2020-04-09T10:49:26.000Z | 2022-03-08T04:37:27.000Z | gpath/parse.py | insilichem/gpathfinder | e6c7df14d473857acb007efbae3cc7b4fee1b330 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
##############
# GPathFinder: Identification of ligand pathways by a multi-objective
# genetic algorithm
#
# https://github.com/insilichem/gpathfinder
#
# Copyright 2019 José-Emilio Sánchez Aparicio, Giuseppe Sciortino,
# Daniel Villadrich Herrmannsdoerfer, Pablo Orenes C... | 35.725131 | 103 | 0.615447 |
39ad70df4b81f7f273ba29fe98454df0d1693366 | 4,826 | py | Python | test/functional/rpc_deprecated.py | 34ro/tapyrus-core | 52175cd1994fde3cec1bc506ebacd3fd99523103 | [
"MIT"
] | null | null | null | test/functional/rpc_deprecated.py | 34ro/tapyrus-core | 52175cd1994fde3cec1bc506ebacd3fd99523103 | [
"MIT"
] | null | null | null | test/functional/rpc_deprecated.py | 34ro/tapyrus-core | 52175cd1994fde3cec1bc506ebacd3fd99523103 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017-2018 The Bitcoin Core developers
# Copyright (c) 2019 Chaintope Inc.
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framewor... | 43.872727 | 137 | 0.678201 |
e286fc217c3e7c2b14177f968b5739574ac23967 | 3,478 | py | Python | traitarm/learning/post_base_classifier.py | hzi-bifo/Model-T | 197b52f6fe9b73e0411dbfc66f6d2a43081f5697 | [
"Apache-2.0"
] | 1 | 2021-04-07T16:10:55.000Z | 2021-04-07T16:10:55.000Z | traitarm/learning/post_base_classifier.py | hzi-bifo/Model-T | 197b52f6fe9b73e0411dbfc66f6d2a43081f5697 | [
"Apache-2.0"
] | null | null | null | traitarm/learning/post_base_classifier.py | hzi-bifo/Model-T | 197b52f6fe9b73e0411dbfc66f6d2a43081f5697 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from sklearn import tree
from sklearn import preprocessing
import nested_cv
def base_classifier(traitar_model, phenotype_feature_table, features, phenotype, out, do_normalization, get_misclassified_selected):
"""get base classifier for each feature"""
model = pd.read_csv(traitar_model, se... | 59.965517 | 178 | 0.690627 |
2c59bff60eace55ec13426b84309ceb7941e5876 | 1,850 | py | Python | specs-python/run.py | Corkle/challenge-2019-10 | 442689476fb8522e62083a19222296d5a712abff | [
"MIT"
] | null | null | null | specs-python/run.py | Corkle/challenge-2019-10 | 442689476fb8522e62083a19222296d5a712abff | [
"MIT"
] | null | null | null | specs-python/run.py | Corkle/challenge-2019-10 | 442689476fb8522e62083a19222296d5a712abff | [
"MIT"
] | null | null | null | from itertools import chain
from itertools import permutations
import json
import os
# import random
# from string import ascii_lowercase
import sys
from time import time
USER = 'specs'
LANG = 'Python 3'
NOTES = 'inefficient'
DATA = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'data')
# def get_rand... | 22.560976 | 77 | 0.565946 |
056e3c68e06ea1f2aa4555999aad51395ed46974 | 9,533 | py | Python | michelangelo/mobilenetv2.py | taylorlu/Michelangelo | 43367ac8261365f1982a314549e3e16dda9820e1 | [
"MIT"
] | null | null | null | michelangelo/mobilenetv2.py | taylorlu/Michelangelo | 43367ac8261365f1982a314549e3e16dda9820e1 | [
"MIT"
] | null | null | null | michelangelo/mobilenetv2.py | taylorlu/Michelangelo | 43367ac8261365f1982a314549e3e16dda9820e1 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
from functools import reduce
def while_loop(layer, x, training=True):
if(isinstance(layer, list)):
for l in layer:
x = while_loop(l, x)
else:
x = layer(x, training=training)
return x
class InvertedResidual(tf.keras.models.Model):
... | 38.752033 | 132 | 0.587748 |
6fbbdd3a9f5417e171b36f479cb05ba4fd2928c0 | 1,097 | py | Python | tests/bandwidth/account/test_number_info.py | Sendhub/python-bandwidth | 097762e8aa64eb041a5706890ecde03bfcecf8c5 | [
"MIT"
] | 18 | 2017-03-07T18:49:19.000Z | 2020-11-04T14:27:37.000Z | tests/bandwidth/account/test_number_info.py | Sendhub/python-bandwidth | 097762e8aa64eb041a5706890ecde03bfcecf8c5 | [
"MIT"
] | 12 | 2016-11-14T21:43:46.000Z | 2019-10-11T20:18:51.000Z | tests/bandwidth/account/test_number_info.py | Sendhub/python-bandwidth | 097762e8aa64eb041a5706890ecde03bfcecf8c5 | [
"MIT"
] | 13 | 2017-10-10T17:50:00.000Z | 2020-08-13T13:14:22.000Z | import unittest
import six
import requests
from tests.bandwidth.helpers import get_account_client as get_client
from tests.bandwidth.helpers import create_response, AUTH, headers
if six.PY3:
from unittest.mock import patch
else:
from mock import patch
from bandwidth.voice import Client
class NumberInfoTests(... | 29.648649 | 95 | 0.617138 |
ffaeedef006e4279941694b0006138cfd3d3591e | 4,435 | py | Python | torchfuel/trainers/classification.py | vturrisi/torchfuel | bf9d967013fdb8367a302e8e801a3ad856517f9c | [
"MIT"
] | 4 | 2019-04-03T20:46:54.000Z | 2019-04-09T18:55:36.000Z | torchfuel/trainers/classification.py | vturrisi/torchfuel | bf9d967013fdb8367a302e8e801a3ad856517f9c | [
"MIT"
] | null | null | null | torchfuel/trainers/classification.py | vturrisi/torchfuel | bf9d967013fdb8367a302e8e801a3ad856517f9c | [
"MIT"
] | null | null | null | import os
import sys
from typing import Any, Dict, Optional, Union
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
torchfuel_path = os.path.dirname(
os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
)
sys.path.append(torchfuel_path)
impor... | 31.013986 | 95 | 0.640135 |
81ec0c0cbfd8c95291f92499753fdc36215fde88 | 7,951 | py | Python | commons/embeddings/graph_utils.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | commons/embeddings/graph_utils.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | commons/embeddings/graph_utils.py | inyukwo1/qgm_decoder | 70e60afec140ec3e2ee04f980a384e1cf28d761c | [
"MIT"
] | null | null | null | import random
from copy import deepcopy
from collections import OrderedDict
from datasets.schema import Schema
def graph_checker(graph1, graph2, schema: Schema):
for t in graph2:
if int(t) not in graph1:
return False
ok_cols = []
for t in graph1:
if t not in graph2:
... | 40.984536 | 163 | 0.647214 |
bbe4af248175113647bbd49df687d6f481114744 | 1,918 | py | Python | docs/source/conf.py | cRyp70s/flask-messenger | c7ef536956703a9dd9a96b31d388fe6844c29d69 | [
"BSD-3-Clause"
] | 1 | 2021-10-31T02:19:10.000Z | 2021-10-31T02:19:10.000Z | docs/source/conf.py | cRyp70s/flask-messenger | c7ef536956703a9dd9a96b31d388fe6844c29d69 | [
"BSD-3-Clause"
] | null | null | null | docs/source/conf.py | cRyp70s/flask-messenger | c7ef536956703a9dd9a96b31d388fe6844c29d69 | [
"BSD-3-Clause"
] | 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... | 34.25 | 79 | 0.665276 |
0cf9e696589f3b2f04ba738209ca9da77b32192f | 2,431 | py | Python | exercicios-com-listas/exercicio19.py | diegolinkk/exercicios-python-brasil | 3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5 | [
"MIT"
] | null | null | null | exercicios-com-listas/exercicio19.py | diegolinkk/exercicios-python-brasil | 3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5 | [
"MIT"
] | null | null | null | exercicios-com-listas/exercicio19.py | diegolinkk/exercicios-python-brasil | 3bf7bdf0e98cdd06c115eedae4fa01e0c25fdba5 | [
"MIT"
] | null | null | null | # Uma empresa de pesquisas precisa tabular os resultados da seguinte enquete feita a um grande quantidade
# de organizações:
# "Qual o melhor Sistema Operacional para uso em servidores?"
# As possíveis respostas são:
# 1- Windows Server
# 2- Unix
# 3- Linux
# 4- Netware
# 5- Mac OS
# 6- Outro
# Você foi contratado... | 29.646341 | 580 | 0.613739 |
8ac4cfb920484c0a2c7a032ffbb292559f2c0331 | 2,377 | py | Python | st2actions/st2actions/runners/announcementrunner.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | 1 | 2021-04-08T03:21:49.000Z | 2021-04-08T03:21:49.000Z | st2actions/st2actions/runners/announcementrunner.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | null | null | null | st2actions/st2actions/runners/announcementrunner.py | FairwindsOps/st2 | 2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 41.701754 | 86 | 0.734119 |
71ffa834b56ad3879afbd2dbb80a31962e344b71 | 4,455 | py | Python | settings.py | faisalhusain007/PiFire_retired | 0dae8d9ef86de17de9efb3e08a082bb482df5bef | [
"MIT"
] | null | null | null | settings.py | faisalhusain007/PiFire_retired | 0dae8d9ef86de17de9efb3e08a082bb482df5bef | [
"MIT"
] | null | null | null | settings.py | faisalhusain007/PiFire_retired | 0dae8d9ef86de17de9efb3e08a082bb482df5bef | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# *****************************************
# PiFire Module Settings Editor
# *****************************************
#
# Description: This script used during install to setup module settings
#
# *****************************************
# *****************************************... | 42.028302 | 163 | 0.644669 |
acfd83d6e2fee29bddc9baf61931ceb9498a1db6 | 19,000 | py | Python | discord/utils.py | sirmammingtonham/discord.py | 4a23c713e9eae46fd351d3abb44d04d795c96e9f | [
"MIT"
] | null | null | null | discord/utils.py | sirmammingtonham/discord.py | 4a23c713e9eae46fd351d3abb44d04d795c96e9f | [
"MIT"
] | null | null | null | discord/utils.py | sirmammingtonham/discord.py | 4a23c713e9eae46fd351d3abb44d04d795c96e9f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2020 Rapptz
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 u... | 29.874214 | 130 | 0.619789 |
d257be780541fc62b4d8f218fe2c3c8b2da141a0 | 1,307 | py | Python | setup.py | clicumu/doepipeline | 9f4998dbfa38dda6d0c9b8d599bacf236f89d708 | [
"MIT"
] | 21 | 2018-12-24T02:31:07.000Z | 2021-05-18T19:09:49.000Z | setup.py | clicumu/doepipeline | 9f4998dbfa38dda6d0c9b8d599bacf236f89d708 | [
"MIT"
] | 4 | 2018-12-19T18:05:48.000Z | 2019-07-25T21:09:24.000Z | setup.py | clicumu/doepipeline | 9f4998dbfa38dda6d0c9b8d599bacf236f89d708 | [
"MIT"
] | 2 | 2018-12-20T12:13:36.000Z | 2021-12-21T17:47:38.000Z | from setuptools import setup
import os
from doepipeline import __version__
def readme():
with open('README.md') as f:
return f.read()
setup(
name='doepipeline',
version=__version__,
description='Package for optimizing pipelines using DoE.',
long_description=readme(),
long_description_... | 27.229167 | 62 | 0.603673 |
e440c2df7875d627ca1094fcd35529bab3f53544 | 2,284 | py | Python | domipy/messages/set_temperature.py | soliveira/python-domintell | 64876f9d4dae9c29f354c3cfac755c22fa980a73 | [
"MIT"
] | null | null | null | domipy/messages/set_temperature.py | soliveira/python-domintell | 64876f9d4dae9c29f354c3cfac755c22fa980a73 | [
"MIT"
] | null | null | null | domipy/messages/set_temperature.py | soliveira/python-domintell | 64876f9d4dae9c29f354c3cfac755c22fa980a73 | [
"MIT"
] | null | null | null | """
:author: Zilvinas Binisevicius <zilvinas@binis.me>
"""
import domipy
class SetTemperatureMessage(domipy.Command):
"""
Set temperature
"""
def __init__(self, moduleType, serialNumber, value):
domipy.Command.__init__(self, moduleType, serialNumber.strip(), -1, "%T", value)
class SetTemperat... | 29.662338 | 89 | 0.671191 |
91832aac48e187226f6fa6c04f3e8f5f916d82d7 | 1,370 | py | Python | playground/segmentation/coco/rcnn/mask_rcnn.res50.fpn.coco.multiscale.1x/config.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | 548 | 2020-12-03T11:30:43.000Z | 2022-03-31T11:19:26.000Z | playground/segmentation/coco/rcnn/mask_rcnn.res50.fpn.coco.multiscale.1x/config.py | wondervictor/cvpods | 614a975e5425bbaeb66bbd1ffca552d633ba89ca | [
"Apache-2.0"
] | 58 | 2020-12-04T19:47:10.000Z | 2022-03-30T06:52:13.000Z | playground/segmentation/coco/rcnn/mask_rcnn.res50.fpn.coco.multiscale.1x/config.py | wondervictor/cvpods | 614a975e5425bbaeb66bbd1ffca552d633ba89ca | [
"Apache-2.0"
] | 76 | 2020-12-03T11:58:36.000Z | 2022-03-25T08:05:15.000Z | import os.path as osp
from cvpods.configs.rcnn_fpn_config import RCNNFPNConfig
_config_dict = dict(
MODEL=dict(
WEIGHTS="detectron2://ImageNetPretrained/MSRA/R-50.pkl",
MASK_ON=True,
RESNETS=dict(DEPTH=50),
),
DATASETS=dict(
TRAIN=("coco_2017_train",),
TEST=("coco_2... | 26.346154 | 84 | 0.556204 |
0356ba4cc95ea83f5ba841c2f15db52911244496 | 525 | py | Python | media.py | dvanetten03/udacity-movie-trailer | e876ec1b2d68f2bc6cd37fb9067c733e2119d75d | [
"MIT"
] | null | null | null | media.py | dvanetten03/udacity-movie-trailer | e876ec1b2d68f2bc6cd37fb9067c733e2119d75d | [
"MIT"
] | null | null | null | media.py | dvanetten03/udacity-movie-trailer | e876ec1b2d68f2bc6cd37fb9067c733e2119d75d | [
"MIT"
] | null | null | null | import webbrowser
# Create the class movie to store movie related information
class Movie():
def __init__(self, movie_title, movie_story, pos_image, trailer_youtube):
# create space in memory for a new instance of class movie
self.title = movie_title
self.storyline = movie_story
s... | 30.882353 | 77 | 0.71619 |
c00113911537d2a08363e6f329342b564f75a01d | 7,630 | py | Python | ctapipe/tools/process.py | nbiederbeck/ctapipe | cdd2fe5205bd2747d2846cfc751c51868b4a0bdd | [
"BSD-3-Clause"
] | null | null | null | ctapipe/tools/process.py | nbiederbeck/ctapipe | cdd2fe5205bd2747d2846cfc751c51868b4a0bdd | [
"BSD-3-Clause"
] | null | null | null | ctapipe/tools/process.py | nbiederbeck/ctapipe | cdd2fe5205bd2747d2846cfc751c51868b4a0bdd | [
"BSD-3-Clause"
] | null | null | null | """
Generate DL1 (a or b) output files in HDF5 format from {R0,R1,DL0} inputs.
"""
# pylint: disable=W0201
import sys
from tqdm.auto import tqdm
from ..calib import CameraCalibrator, GainSelector
from ..core import QualityQuery, Tool
from ..core.traits import Bool, classes_with_traits, flag
from ..image import ImageCl... | 33.911111 | 88 | 0.616121 |
f31afd9d6bd285073ca3ef84131ef5ae2e005596 | 189 | py | Python | cac_tpo_final/webpersonal_back/core/views.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | cac_tpo_final/webpersonal_back/core/views.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | cac_tpo_final/webpersonal_back/core/views.py | ecanro/100DaysOfCode_Python | a86ebe5a793fd4743e0de87454ba76925efdd23d | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.shortcuts import render
# Create your views here.
def index(request):
return HttpResponse("Hello, world. You're at the core index.")
| 21 | 66 | 0.761905 |
71f9cdffa3fc1f63ac3308b5f89d783b7d83b6a5 | 547 | py | Python | app/__init__.py | distmatters/eparDataDistribution | 394797e6408dfc24baa1bb532c7ccaeed13428a9 | [
"BSD-3-Clause"
] | 1 | 2022-02-23T21:03:38.000Z | 2022-02-23T21:03:38.000Z | app/__init__.py | distmatters/eparDataDistribution | 394797e6408dfc24baa1bb532c7ccaeed13428a9 | [
"BSD-3-Clause"
] | 12 | 2018-12-27T22:07:08.000Z | 2019-04-08T22:48:05.000Z | app/__init__.py | distmatters/eparDataDistribution | 394797e6408dfc24baa1bb532c7ccaeed13428a9 | [
"BSD-3-Clause"
] | 3 | 2019-07-11T12:11:57.000Z | 2020-09-15T13:19:13.000Z | #app/init.py
"""
Copyright 2018 Evans Policy Analysis and Research Group (EPAR)
This project is licensed under the 3-Clause BSD License. Please see
license.txt file for more information.
"""
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import os
# initialize the app
app = Flask(__name__, instance_... | 21.038462 | 67 | 0.789762 |
595221a3d84109ae0d895b5d74f778d0a2e29296 | 5,994 | py | Python | homeassistant/components/huawei_lte/device_tracker.py | edofullin/core | 106dc4d28ad59cb192c60fc7a354cafa86899ea4 | [
"Apache-2.0"
] | 1 | 2021-04-28T09:51:08.000Z | 2021-04-28T09:51:08.000Z | homeassistant/components/huawei_lte/device_tracker.py | edofullin/core | 106dc4d28ad59cb192c60fc7a354cafa86899ea4 | [
"Apache-2.0"
] | 60 | 2020-08-03T07:32:56.000Z | 2022-03-31T06:02:07.000Z | homeassistant/components/huawei_lte/device_tracker.py | edofullin/core | 106dc4d28ad59cb192c60fc7a354cafa86899ea4 | [
"Apache-2.0"
] | 4 | 2017-01-10T04:17:33.000Z | 2021-09-02T16:37:24.000Z | """Support for device tracking of Huawei LTE routers."""
from __future__ import annotations
import logging
import re
from typing import Any, Callable, cast
import attr
from stringcase import snakecase
from homeassistant.components.device_tracker.config_entry import ScannerEntity
from homeassistant.components.device_... | 35.258824 | 86 | 0.685519 |
4b159026d095a7a1151751d3efb15df56cd0f872 | 5,173 | py | Python | tests/unit/types/score/test_score_map.py | vishalbelsare/jina | ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43 | [
"Apache-2.0"
] | 15,179 | 2020-04-28T10:23:56.000Z | 2022-03-31T14:35:25.000Z | tests/unit/types/score/test_score_map.py | manavshah123/jina | f18b04eb82d18a3c554e2892bbae4b95fc0cb13e | [
"Apache-2.0"
] | 3,912 | 2020-04-28T13:01:29.000Z | 2022-03-31T14:36:46.000Z | tests/unit/types/score/test_score_map.py | manavshah123/jina | f18b04eb82d18a3c554e2892bbae4b95fc0cb13e | [
"Apache-2.0"
] | 1,955 | 2020-04-28T10:50:49.000Z | 2022-03-31T12:28:34.000Z | import pytest
import numpy as np
from jina import Document
from jina.types.score import NamedScore
from jina.types.score.map import NamedScoreMapping
def test_mapped_named_score():
scores = Document().scores
scores['operation'].op_name = 'operation'
scores['operation'].value = 10.0
scores['operati... | 32.534591 | 87 | 0.670791 |
b757050b90530a7b75125773925a17d3308647ed | 20,943 | py | Python | tests/test_display.py | c-jg/librosa | a3103e025794e0df9794f34f461f1b401f0a1ab7 | [
"0BSD"
] | 3 | 2016-09-15T21:40:59.000Z | 2018-11-27T16:41:42.000Z | tests/test_display.py | c-jg/librosa | a3103e025794e0df9794f34f461f1b401f0a1ab7 | [
"0BSD"
] | null | null | null | tests/test_display.py | c-jg/librosa | a3103e025794e0df9794f34f461f1b401f0a1ab7 | [
"0BSD"
] | 1 | 2016-03-10T15:50:11.000Z | 2016-03-10T15:50:11.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# CREATED:2015-02-14 22:51:01 by Brian McFee <brian.mcfee@nyu.edu>
"""Unit tests for display module"""
# Disable cache
import os
try:
os.environ.pop("LIBROSA_CACHE_DIR")
except KeyError:
pass
from packaging import version
import matplotlib
matplotlib.use("Ag... | 28.610656 | 88 | 0.686578 |
44afe3a3fb25aa7daccf24bea88c48fe4fe83e8d | 33,277 | py | Python | ckan/logic/validators.py | derhecht/ckan | 27f0b8cf52bb2140f16e2f09f3c42ed15e7e9b99 | [
"BSD-3-Clause"
] | 2 | 2017-05-15T08:16:49.000Z | 2019-05-30T23:53:39.000Z | ckan/logic/validators.py | derhecht/ckan | 27f0b8cf52bb2140f16e2f09f3c42ed15e7e9b99 | [
"BSD-3-Clause"
] | 1 | 2021-05-13T14:40:55.000Z | 2021-05-13T14:40:55.000Z | ckan/logic/validators.py | cascaoSDC/ckan | 75a08caa7c688ce70229dfea7070cc667a15c5e8 | [
"BSD-3-Clause"
] | 4 | 2018-10-08T12:05:16.000Z | 2021-11-24T16:18:52.000Z |
# encoding: utf-8
import collections
import datetime
from itertools import count
import re
import mimetypes
import string
import json
from six import string_types, iteritems
from six.moves.urllib.parse import urlparse
import ckan.lib.navl.dictization_functions as df
import ckan.logic as logic
import ckan.lib.helper... | 33.613131 | 107 | 0.637648 |
d638f543ec9653bf40fc2397b9bdc0d624e8d4a3 | 1,893 | py | Python | examples/views/ephemeral.py | SangamBot/PDA | efa3b1348a13d2dab990455c61ec038588ac23ab | [
"MIT"
] | 1 | 2021-08-28T08:56:43.000Z | 2021-08-28T08:56:43.000Z | examples/views/ephemeral.py | SangamBot/PDA | efa3b1348a13d2dab990455c61ec038588ac23ab | [
"MIT"
] | null | null | null | examples/views/ephemeral.py | SangamBot/PDA | efa3b1348a13d2dab990455c61ec038588ac23ab | [
"MIT"
] | 2 | 2021-08-28T07:20:45.000Z | 2021-08-28T08:56:49.000Z | from pda.ext import commands
import pda
class EphemeralCounterBot(commands.Bot):
def __init__(self):
super().__init__(command_prefix=commands.when_mentioned_or('$'))
async def on_ready(self):
print(f'Logged in as {self.user} (ID: {self.user.id})')
print('------')
# Define a simple Vi... | 39.4375 | 89 | 0.698362 |
19754eae6c5f6ff2bea57e384d3750718f00acbf | 2,805 | py | Python | airflow/providers/redis/hooks/redis.py | ncolomer/airflow | cb7c67dea9cd9b9c5de10e355b63039446003149 | [
"Apache-2.0"
] | 2 | 2021-07-30T17:25:56.000Z | 2021-08-03T13:51:09.000Z | airflow/providers/redis/hooks/redis.py | ncolomer/airflow | cb7c67dea9cd9b9c5de10e355b63039446003149 | [
"Apache-2.0"
] | null | null | null | airflow/providers/redis/hooks/redis.py | ncolomer/airflow | cb7c67dea9cd9b9c5de10e355b63039446003149 | [
"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... | 33.795181 | 110 | 0.623173 |
41ba7f158f21412fac41fb5747ce735d9463032e | 2,080 | py | Python | contrib/devtools/check-doc.py | developertask/pivx-4 | 012420f23ae79c8f2e42223cc4bdb2b315e4445c | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | developertask/pivx-4 | 012420f23ae79c8f2e42223cc4bdb2b315e4445c | [
"MIT"
] | null | null | null | contrib/devtools/check-doc.py | developertask/pivx-4 | 012420f23ae79c8f2e42223cc4bdb2b315e4445c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
This checks if all command line args are documented.
Return value is 0 to indicate no error.
Author:... | 43.333333 | 305 | 0.688942 |
5e73a8a490565ce260ea75379fde0ff2412ce415 | 3,576 | py | Python | NeoSparkAnalyzer.py | m4rok97/NeoSparkAnalyzer | eecb9761316b661341dfa8420a579ba70531c031 | [
"MIT"
] | 1 | 2021-08-10T14:23:33.000Z | 2021-08-10T14:23:33.000Z | NeoSparkAnalyzer.py | m4rok97/NeoSparkAnalyzer | eecb9761316b661341dfa8420a579ba70531c031 | [
"MIT"
] | null | null | null | NeoSparkAnalyzer.py | m4rok97/NeoSparkAnalyzer | eecb9761316b661341dfa8420a579ba70531c031 | [
"MIT"
] | 1 | 2021-08-10T14:23:38.000Z | 2021-08-10T14:23:38.000Z | from pyspark.sql import SparkSession
import pyspark.sql.functions as F
from pyspark.sql.types import *
from AnomalyDetection import *
from NeoDatabase import *
import pyspark
import time as tm
import numpy as np
# region NeoSaprk Analyzer Class
class NeoSparkAnalyzer:
"""
Class that represent the main Analyz... | 36.121212 | 163 | 0.701342 |
a1f22bfd6a487ea2c37a5cc786ca80dc578273af | 5,145 | py | Python | tests/integration/widgets/tables/test_copy_paste.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/widgets/tables/test_copy_paste.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | tests/integration/widgets/tables/test_copy_paste.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2022, Anaconda, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#---------------------------------------------------... | 34.763514 | 100 | 0.566958 |
d6eb003af12374731da26b77e9a51ac85c5d8ed4 | 2,928 | py | Python | docs/conf.py | Trinkle23897/parallel-project | d605cf90542ddac7cd47ae830f713510f1a5d935 | [
"MIT"
] | 3 | 2022-03-23T00:36:28.000Z | 2022-03-24T03:25:33.000Z | docs/conf.py | Trinkle23897/Fast-Poisson-Image-Editing | d605cf90542ddac7cd47ae830f713510f1a5d935 | [
"MIT"
] | null | null | null | docs/conf.py | Trinkle23897/Fast-Poisson-Image-Editing | d605cf90542ddac7cd47ae830f713510f1a5d935 | [
"MIT"
] | 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... | 34.046512 | 79 | 0.650615 |
53c6f0888b72d993742f9db1cf73a230ae4d8790 | 1,578 | py | Python | freetype/ft_enums/ft_lcd_filters.py | josh95117/freetype-py | 1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad | [
"BSD-3-Clause-Clear"
] | 242 | 2015-01-19T09:46:55.000Z | 2022-03-24T08:18:44.000Z | freetype/ft_enums/ft_lcd_filters.py | josh95117/freetype-py | 1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad | [
"BSD-3-Clause-Clear"
] | 127 | 2015-01-02T02:29:23.000Z | 2022-03-29T16:32:12.000Z | freetype/ft_enums/ft_lcd_filters.py | josh95117/freetype-py | 1b564b7de61f0bde5c3e09ed9a1fb0f7642d6bad | [
"BSD-3-Clause-Clear"
] | 81 | 2015-01-13T12:37:51.000Z | 2022-03-09T18:52:36.000Z | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
#
# FreeType high-level python API - Copyright 2011-2015 Nicolas P. Rougier
# Distributed under the terms of the new BSD license.
#
# -----------------------------------------------------------------------------
"... | 32.204082 | 79 | 0.665399 |
30d8e76344c897cd3d76f3341b479bcc82fed5c9 | 2,905 | py | Python | heat/tests/clients/test_manila_client.py | maestro-hybrid-cloud/heat | 91a4bb3170bd81b1c67a896706851e55709c9b5a | [
"Apache-2.0"
] | null | null | null | heat/tests/clients/test_manila_client.py | maestro-hybrid-cloud/heat | 91a4bb3170bd81b1c67a896706851e55709c9b5a | [
"Apache-2.0"
] | null | null | null | heat/tests/clients/test_manila_client.py | maestro-hybrid-cloud/heat | 91a4bb3170bd81b1c67a896706851e55709c9b5a | [
"Apache-2.0"
] | null | null | null | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 40.347222 | 78 | 0.65852 |
e0253b0fa68f7695a40af6040720bd1aec3eeb30 | 2,303 | py | Python | exp/viz.py | mataiscat/coronavirus-2020 | 001adbdae47775a76b16ba04a93b80df50a7409c | [
"MIT"
] | null | null | null | exp/viz.py | mataiscat/coronavirus-2020 | 001adbdae47775a76b16ba04a93b80df50a7409c | [
"MIT"
] | null | null | null | exp/viz.py | mataiscat/coronavirus-2020 | 001adbdae47775a76b16ba04a93b80df50a7409c | [
"MIT"
] | null | null | null | """
Experiment summary
------------------
Treat each province/state in a country cases over time
as a vector, do a simple K-Nearest Neighbor between
countries. What country has the most similar trajectory
to a given country?
"""
import sys
sys.path.insert(0, '..')
from utils import data
import os
import sklearn
impo... | 26.77907 | 78 | 0.657403 |
5c61d658bf49b30fdebebbcfab4c6d29d0d60e3c | 363 | py | Python | Week2/HackerRank(Day7-13)/Day8_Solution.py | ShreyaPanale/100DaysOfCode | de7832d97fca36f783812868b867676b6f77c7b3 | [
"MIT"
] | 22 | 2021-05-25T16:01:31.000Z | 2021-06-07T06:32:27.000Z | Week2/HackerRank(Day7-13)/Day8_Solution.py | shreya-panale/100DaysOfCode | de7832d97fca36f783812868b867676b6f77c7b3 | [
"MIT"
] | null | null | null | Week2/HackerRank(Day7-13)/Day8_Solution.py | shreya-panale/100DaysOfCode | de7832d97fca36f783812868b867676b6f77c7b3 | [
"MIT"
] | null | null | null | # Enter your code here. Read input from STDIN. Print output to STDOUT
from sys import stdin
n=int(input())
phonebook={}
for i in range(n):
name,num=input().split(' ')
phonebook[name]=num
for name in stdin:
key=name.split()[0]
if key in phonebook:
print(key,"=",phonebook[key],sep="")
else:
... | 22.6875 | 69 | 0.600551 |
88e33b1c9b8c5a90b963ac05245afa3e28f2d763 | 573 | py | Python | src/get_available.py | robcronin/bdd-lock-table | 92e2d4f30b595da41b6575e1c7a3400e9210a538 | [
"Apache-2.0",
"MIT"
] | 8 | 2020-03-09T14:25:00.000Z | 2021-05-17T19:46:50.000Z | src/get_available.py | robcronin/bdd-lock-table | 92e2d4f30b595da41b6575e1c7a3400e9210a538 | [
"Apache-2.0",
"MIT"
] | 358 | 2020-05-01T08:15:11.000Z | 2021-08-03T05:55:46.000Z | src/get_available.py | robcronin/bdd-lock-table | 92e2d4f30b595da41b6575e1c7a3400e9210a538 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-08-07T13:37:38.000Z | 2020-08-07T13:37:38.000Z | import boto3
import json
import os
from src.response import make_response
from boto3.dynamodb.conditions import Key
def query(event, context):
repo_name = event.get("pathParameters").get("repoName")
bdd_lock_table = os.environ["BDD_LOCK_TABLE_NAME"]
dynamodb = boto3.resource("dynamodb")
table = dynam... | 27.285714 | 87 | 0.724258 |
41c5eefdf0aa4a65ccfc2e980be11c524a499d77 | 4,890 | py | Python | docs/conf.py | nznobody/dummyserial | e0f1b7e9ff57fe3dcc6f025a7fe8d22d1f5ae645 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | nznobody/dummyserial | e0f1b7e9ff57fe3dcc6f025a7fe8d22d1f5ae645 | [
"Apache-2.0"
] | null | null | null | docs/conf.py | nznobody/dummyserial | e0f1b7e9ff57fe3dcc6f025a7fe8d22d1f5ae645 | [
"Apache-2.0"
] | 2 | 2021-01-27T10:02:14.000Z | 2021-07-23T03:01:59.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.185185 | 79 | 0.649693 |
6874311950c0aa64b6f3a5a4343f76c32fc7ec5d | 1,574 | py | Python | guardian/__init__.py | pnuckowski/django-guardian | 8e8dab207296ee37aa1d19eaeebfad7d0642f138 | [
"MIT"
] | 1 | 2020-04-27T14:17:05.000Z | 2020-04-27T14:17:05.000Z | guardian/__init__.py | pnuckowski/django-guardian | 8e8dab207296ee37aa1d19eaeebfad7d0642f138 | [
"MIT"
] | null | null | null | guardian/__init__.py | pnuckowski/django-guardian | 8e8dab207296ee37aa1d19eaeebfad7d0642f138 | [
"MIT"
] | null | null | null | """
Implementation of per object permissions for Django.
"""
from . import checks
default_app_config = 'guardian.apps.GuardianConfig'
# PEP 396: The __version__ attribute's value SHOULD be a string.
__version__ = '2.2.0'
# Compatibility to eg. django-rest-framework
VERSION = tuple(int(x) for x in __version__.split('... | 36.604651 | 95 | 0.742058 |
dcb5913c30e46bea0cecf6975dc3093664596453 | 9,577 | py | Python | trfl/sequence_ops.py | anhtran1995/trfl | 40884d4bb39f99e4a642acdbe26113914ad0acec | [
"Apache-2.0"
] | 1 | 2020-06-11T04:28:50.000Z | 2020-06-11T04:28:50.000Z | trfl/sequence_ops.py | anhtran1995/trfl | 40884d4bb39f99e4a642acdbe26113914ad0acec | [
"Apache-2.0"
] | null | null | null | trfl/sequence_ops.py | anhtran1995/trfl | 40884d4bb39f99e4a642acdbe26113914ad0acec | [
"Apache-2.0"
] | 1 | 2019-04-14T13:58:18.000Z | 2019-04-14T13:58:18.000Z | # Copyright 2018 The trfl Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 43.931193 | 80 | 0.645505 |
aebfd2e148cdaa2fe3b7fb015e61950c11a391d4 | 1,105 | py | Python | qa/rpc-tests/reindex.py | advantage-development/v6 | fe39305f9471705537f86c1850b8b453bbc9b63f | [
"MIT"
] | null | null | null | qa/rpc-tests/reindex.py | advantage-development/v6 | fe39305f9471705537f86c1850b8b453bbc9b63f | [
"MIT"
] | null | null | null | qa/rpc-tests/reindex.py | advantage-development/v6 | fe39305f9471705537f86c1850b8b453bbc9b63f | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test -reindex with CheckBlockIndex
#
from test_framework import BitcoinTestFramework
from bitcreditrpc.aut... | 31.571429 | 102 | 0.706787 |
a23cf4e05bf1fa6cef7a7002a6177312440ef146 | 4,710 | py | Python | test/functional/rpc_net.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | null | null | null | test/functional/rpc_net.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | null | null | null | test/functional/rpc_net.py | Deimoscoin/deimos | c03a65c72ffe6fadb840bc87e6fd6b4e012def08 | [
"MIT"
] | 1 | 2018-06-12T00:50:01.000Z | 2018-06-12T00:50:01.000Z | #!/usr/bin/env python3
# Copyright (c) 2009-2019 The Bitcoin Core developers
# Copyright (c) 2014-2019 The DeimOS Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test RPC calls related to net.
Tests correspond t... | 46.176471 | 134 | 0.694904 |
5b76c1ecca864e90ac9ccaee68a514aa8216a041 | 1,315 | py | Python | BotCode/datasetFromSeparatorFile.py | nictoutoungis/InstaBot | 36ec6e3631fc96b63338e1adbddfcc4b960aed16 | [
"MIT"
] | 7 | 2021-03-02T02:18:40.000Z | 2022-03-09T17:41:12.000Z | BotCode/datasetFromSeparatorFile.py | nictoutoungis/InstaBot | 36ec6e3631fc96b63338e1adbddfcc4b960aed16 | [
"MIT"
] | 1 | 2022-01-29T08:41:16.000Z | 2022-01-29T08:41:16.000Z | BotCode/datasetFromSeparatorFile.py | nictoutoungis/InstaBot | 36ec6e3631fc96b63338e1adbddfcc4b960aed16 | [
"MIT"
] | 3 | 2021-06-22T04:34:27.000Z | 2022-02-03T18:42:20.000Z | #!/usr/bin/env python3
import random
import unicodedata
import re
textList = list()
questions = list()
answers = list()
def unicode_to_ascii(s):
return ''.join(c for c in unicodedata.normalize('NFD', s)
if unicodedata.category(c) != 'Mn')
def preprocess_sentence(w):
w = unicode_to_ascii(w.lower()... | 20.230769 | 66 | 0.58251 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.