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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f230de5d04d6eda92e826261aa15d43ce3b3f7f6 | 34 | py | Python | src/python/flask/__init__.py | computer-geek64/guinn | 11e10a9fbf1f99fd0ff8e15d7a812679ae7015f4 | [
"MIT"
] | 2 | 2020-06-25T00:06:38.000Z | 2020-09-11T18:59:45.000Z | src/python/flask/__init__.py | computer-geek64/guinn | 11e10a9fbf1f99fd0ff8e15d7a812679ae7015f4 | [
"MIT"
] | 20 | 2020-06-25T00:16:35.000Z | 2020-06-25T19:24:14.000Z | src/python/flask/__init__.py | computer-geek64/guinn | 11e10a9fbf1f99fd0ff8e15d7a812679ae7015f4 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# __init__.py
| 8.5 | 18 | 0.676471 |
462d3a04d5c9ea54d7c66ecfdba721f8eef129a6 | 8,667 | py | Python | ambari-server/src/test/python/TestStackSelect.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 1,664 | 2015-01-03T09:35:21.000Z | 2022-03-31T04:55:24.000Z | ambari-server/src/test/python/TestStackSelect.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 3,018 | 2015-02-19T20:16:10.000Z | 2021-11-13T20:47:48.000Z | ambari-server/src/test/python/TestStackSelect.py | likenamehaojie/Apache-Ambari-ZH | 5973025bd694cdbb4b49fb4c4e0d774782811ff6 | [
"Apache-2.0"
] | 1,673 | 2015-01-06T14:14:42.000Z | 2022-03-31T07:22:30.000Z | # !/usr/bin/env python
'''
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"... | 32.460674 | 114 | 0.641975 |
734cbb20862fe502328a3173591901167ca62ca8 | 8,513 | py | Python | tests/test_package_tools.py | eyllanesc/bincrafters-package-tools | 110a6715b2bfa2099b6f1c1ce555941035efecbd | [
"MIT"
] | null | null | null | tests/test_package_tools.py | eyllanesc/bincrafters-package-tools | 110a6715b2bfa2099b6f1c1ce555941035efecbd | [
"MIT"
] | null | null | null | tests/test_package_tools.py | eyllanesc/bincrafters-package-tools | 110a6715b2bfa2099b6f1c1ce555941035efecbd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import platform
import pytest
from bincrafters import build_shared
from bincrafters import build_template_boost_default
from bincrafters import build_template_boost_header_only
from bincrafters import build_template_default
from bincrafters import build_template_header_only
from bincr... | 34.188755 | 127 | 0.725009 |
f49b7032f77f990fe80cee042cdf6d03aaf85a37 | 1,449 | py | Python | src/medius/mediuspackets/getworldsecuritylevel.py | Dnawrkshp/robo | 5ba20305f7a0c9dfe03229e0d49bde416bea6353 | [
"MIT"
] | null | null | null | src/medius/mediuspackets/getworldsecuritylevel.py | Dnawrkshp/robo | 5ba20305f7a0c9dfe03229e0d49bde416bea6353 | [
"MIT"
] | null | null | null | src/medius/mediuspackets/getworldsecuritylevel.py | Dnawrkshp/robo | 5ba20305f7a0c9dfe03229e0d49bde416bea6353 | [
"MIT"
] | null | null | null | from enums.enums import MediusEnum, CallbackStatus, WorldSecurityLevelType
from utils import utils
from medius.mediuspackets.getworldsecuritylevelresponse import GetWorldSecurityLevelResponseSerializer
class GetWorldSecurityLevelSerializer:
data_dict = [
{'name': 'mediusid', 'n_bytes': 2, 'cast': None},
... | 42.617647 | 103 | 0.638371 |
fe197ec5cd8ecc39a29a9c2308fbdb6174de608d | 127 | py | Python | tests/regression/RandomReg_10/ws_RandomReg_10_SVR_poly_mssql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 1 | 2019-07-09T14:45:18.000Z | 2019-07-09T14:45:18.000Z | tests/regression/RandomReg_10/ws_RandomReg_10_SVR_poly_mssql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 5 | 2017-11-13T13:35:37.000Z | 2021-11-11T12:57:20.000Z | tests/regression/RandomReg_10/ws_RandomReg_10_SVR_poly_mssql_code_gen.py | antoinecarme/sklearn2sql_heroku | d680db10683daa419324461eeea851dd8b103ad5 | [
"BSD-3-Clause"
] | 1 | 2021-09-19T15:05:33.000Z | 2021-09-19T15:05:33.000Z | from sklearn2sql_heroku.tests.regression import generic as reg_gen
reg_gen.test_model("SVR_poly" , "RandomReg_10" , "mssql")
| 25.4 | 66 | 0.795276 |
78e0c68b9fb9df6388d7ae28d1cf4b382e73c027 | 3,810 | py | Python | biped/include/left_arm.py | DIvyanshu-Goel/Biped | 883d3e889319d612f3bf56efda856db25c68adb7 | [
"CC0-1.0"
] | null | null | null | biped/include/left_arm.py | DIvyanshu-Goel/Biped | 883d3e889319d612f3bf56efda856db25c68adb7 | [
"CC0-1.0"
] | null | null | null | biped/include/left_arm.py | DIvyanshu-Goel/Biped | 883d3e889319d612f3bf56efda856db25c68adb7 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
import sys
import rospy
import time
import numpy as np
from std_msgs.msg import *
from math import *
from dynamixel_msgs.msg import JointState
from biped.msg import *
from biped.srv import *
#for details on motor ids see Data_Server.py
start_pos = [0, 0 ,0 ,0];
motorid_LA = [4,5,6,7];
update_rate... | 44.823529 | 147 | 0.603675 |
3d9a249e4d77402626dfab0b47682f0f57576660 | 10,804 | py | Python | accelbyte_py_sdk/api/platform/operations/subscription/cancel_subscription.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/platform/operations/subscription/cancel_subscription.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | accelbyte_py_sdk/api/platform/operations/subscription/cancel_subscription.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template file: justice_py_sdk_codegen/__main__.py
# pylint: disable=duplicate-code
# pylint: disable=li... | 33.7625 | 191 | 0.621066 |
158e35b9d74415b21f683b7015b7fa3c59a92827 | 2,299 | py | Python | official/vision/detection/layers/det/pooler.py | aspnetcs/Models | 640a0e0ed9c2b9f739f5070b8b41680678b5213a | [
"Apache-2.0"
] | 1 | 2021-01-22T05:52:38.000Z | 2021-01-22T05:52:38.000Z | official/vision/detection/layers/det/pooler.py | aspnetcs/Models | 640a0e0ed9c2b9f739f5070b8b41680678b5213a | [
"Apache-2.0"
] | null | null | null | official/vision/detection/layers/det/pooler.py | aspnetcs/Models | 640a0e0ed9c2b9f739f5070b8b41680678b5213a | [
"Apache-2.0"
] | 1 | 2021-09-19T13:12:18.000Z | 2021-09-19T13:12:18.000Z | # -*- coding:utf-8 -*-
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License")
#
# Copyright (c) 2014-2020 Megvii Inc. All rights reserved.
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT ARRANTIE... | 33.318841 | 88 | 0.626794 |
c368da6f15c2cff9e529291db66ba4b07d7f868c | 943 | py | Python | tests/test_yarn_backend.py | fhoering/mlflow-yarn | 58fd7484dd885b94c081defef22ea05a3dfefeba | [
"Apache-2.0"
] | 7 | 2020-07-17T13:44:45.000Z | 2020-09-18T08:44:25.000Z | tests/test_yarn_backend.py | fhoering/mlflow-yarn | 58fd7484dd885b94c081defef22ea05a3dfefeba | [
"Apache-2.0"
] | 1 | 2020-08-06T16:57:38.000Z | 2020-08-06T16:57:38.000Z | tests/test_yarn_backend.py | fhoering/mlflow-yarn | 58fd7484dd885b94c081defef22ea05a3dfefeba | [
"Apache-2.0"
] | 3 | 2020-07-17T14:56:17.000Z | 2022-02-21T11:33:30.000Z | import logging
import os
import pytest
import skein
from mlflow_yarn import yarn_backend, _upload_logs
_logger = logging.getLogger(__name__)
@pytest.mark.parametrize(
"cmd, expected_entry_point, expected_args",
[
("python -m my_package.my_module --param1 'Hello python' b",
"my... | 27.735294 | 74 | 0.654295 |
f85629658d58e030dca0b17f8a1ff12bb080fcb3 | 5,752 | py | Python | .history/my_classes/ScopesClosuresAndDecorators/decorators_1_20210714132537.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/decorators_1_20210714132537.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/decorators_1_20210714132537.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """Decorators
Recall the simple closure example we did which allowed us to maintain a count of ho9w many times a function was called:
def counter(fn):
count = 0
def inner(*args, **kwargs): # using *args. **kwargs means we can call any function fn with any combination of positional and keyword arguments
... | 37.594771 | 205 | 0.513387 |
8c8c100107d0e4989b6d0895afb2c0a954cbcace | 1,991 | py | Python | xgb_attributes.py | lihuinian/lncRNAIdentification | 2b2b51dfbbe1608f50d6fc75c0bc08fcd5daace0 | [
"MIT"
] | 1 | 2021-05-15T08:28:33.000Z | 2021-05-15T08:28:33.000Z | xgb_attributes.py | lihuinian/lncRNAIdentification | 2b2b51dfbbe1608f50d6fc75c0bc08fcd5daace0 | [
"MIT"
] | 1 | 2021-06-30T16:22:48.000Z | 2021-06-30T16:22:48.000Z | xgb_attributes.py | lihuinian/lncRNAIdentification | 2b2b51dfbbe1608f50d6fc75c0bc08fcd5daace0 | [
"MIT"
] | 1 | 2021-08-12T02:25:52.000Z | 2021-08-12T02:25:52.000Z | import pandas as pd
import xgboost as xgb
import operator
import matplotlib.pyplot as plt
class XGBAttributes:
def __init__(self, data,base_name):
self.data = data
self.base_name = base_name
def create_feature_map(self,features,feature_map):
outfile = open(feature_map,'w')
... | 32.112903 | 87 | 0.566047 |
636ffd67e525f497deb4fa744ef81b83b7c60e5c | 542 | py | Python | modules/gltf/config.py | you-win/godot | 6658f5c4754e1e9957e0dcd53049b4be6610b1d4 | [
"MIT",
"Apache-2.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | modules/gltf/config.py | you-win/godot | 6658f5c4754e1e9957e0dcd53049b4be6610b1d4 | [
"MIT",
"Apache-2.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | modules/gltf/config.py | you-win/godot | 6658f5c4754e1e9957e0dcd53049b4be6610b1d4 | [
"MIT",
"Apache-2.0",
"CC-BY-4.0",
"Unlicense"
] | null | null | null | def can_build(env, platform):
return not env["disable_3d"]
def configure(env):
pass
def get_doc_classes():
return [
"EditorSceneImporterGLTF",
"GLTFAccessor",
"GLTFAnimation",
"GLTFBufferView",
"GLTFCamera",
"GLTFDocument",
"GLTFLight",
"GL... | 17.483871 | 34 | 0.54797 |
e21da40ffdaf3fb850e569772278ae438347fd59 | 24,395 | py | Python | models/local_aggregation_operators.py | PointCloudYC/PointNet-modern.pytorch | 1a0b373fcb21f24b667a0bb4831211da5b92f98d | [
"Apache-2.0"
] | 2 | 2021-05-20T14:36:23.000Z | 2022-02-01T11:33:56.000Z | models/local_aggregation_operators.py | PointCloudYC/PointNet-modern.pytorch | 1a0b373fcb21f24b667a0bb4831211da5b92f98d | [
"Apache-2.0"
] | null | null | null | models/local_aggregation_operators.py | PointCloudYC/PointNet-modern.pytorch | 1a0b373fcb21f24b667a0bb4831211da5b92f98d | [
"Apache-2.0"
] | null | null | null | import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(ROOT_DIR)
sys.path.append(os.path.join(ROOT_DIR, 'ops', 'pt_custom_ops'))
import torch
import torch.nn as nn
import torch.nn.functional as F
from .utils import create_kernel_points, radius_g... | 50.612033 | 214 | 0.609797 |
88d8d242e3edac4cb09f788fcb233cf9e1a0a78d | 17,742 | py | Python | samples/NGPF/SDN/NGPF-OFSwitch/ngpf_ofswitch.py | vlad-shulika/ixnetwork-api-py | 2ed71d52dd210a2d08250256c3b198a9c7c67dca | [
"MIT"
] | 3 | 2018-12-04T20:06:13.000Z | 2022-02-04T01:28:45.000Z | samples/NGPF/SDN/NGPF-OFSwitch/ngpf_ofswitch.py | vlad-shulika/ixnetwork-api-py | 2ed71d52dd210a2d08250256c3b198a9c7c67dca | [
"MIT"
] | 3 | 2018-05-23T17:32:56.000Z | 2020-08-26T13:00:42.000Z | samples/NGPF/SDN/NGPF-OFSwitch/ngpf_ofswitch.py | vlad-shulika/ixnetwork-api-py | 2ed71d52dd210a2d08250256c3b198a9c7c67dca | [
"MIT"
] | 9 | 2018-12-04T20:09:24.000Z | 2021-05-12T10:28:05.000Z | # -*- coding: cp1252 -*-
#!/usr/bin/tclsh
################################################################################
# #
# Copyright 1997 - 2019 by IXIA Keysight #
# All Rights Reserved. ... | 50.982759 | 121 | 0.507553 |
695476e4cf6f37fb3d6fa7203e34fc7e306c0043 | 4,417 | py | Python | train_cnn.py | PootieT/deep_learning_final_project | c1a16b232f5806d2b8b9668807e82aee3fd992ee | [
"MIT"
] | 1 | 2018-03-23T03:20:20.000Z | 2018-03-23T03:20:20.000Z | train_cnn.py | PootieT/deep_learning_final_project | c1a16b232f5806d2b8b9668807e82aee3fd992ee | [
"MIT"
] | null | null | null | train_cnn.py | PootieT/deep_learning_final_project | c1a16b232f5806d2b8b9668807e82aee3fd992ee | [
"MIT"
] | null | null | null | """
Train on images split into directories. This assumes we've split
our videos into frames and moved them to their respective folders.
Based on:
https://keras.io/preprocessing/image/
and
https://keras.io/applications/
"""
from keras.applications.vgg16 import VGG16
from keras.optimizers import SGD
from keras.preproces... | 32.477941 | 132 | 0.698438 |
ae2578ec8dfc677193a64e7e20e188fc16338fea | 1,617 | py | Python | clients/kratos/python/test/test_identity.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 77 | 2020-02-14T17:27:36.000Z | 2022-03-25T08:44:52.000Z | clients/kratos/python/test/test_identity.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 125 | 2020-02-07T21:45:52.000Z | 2022-03-31T12:54:24.000Z | clients/kratos/python/test/test_identity.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 44 | 2020-01-31T22:05:47.000Z | 2022-03-09T14:41:22.000Z | """
Ory Kratos API
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini... | 35.933333 | 446 | 0.772418 |
06184fcca59df0a650a2ac13f685f6e263817651 | 1,025 | py | Python | gltflib/models/__init__.py | Onboard-Team/gltflib | 1aef8e5edcd6336b170226b0666bf78f92f02ee9 | [
"MIT"
] | 56 | 2019-06-17T10:46:25.000Z | 2022-03-30T14:48:36.000Z | gltflib/models/__init__.py | Onboard-Team/gltflib | 1aef8e5edcd6336b170226b0666bf78f92f02ee9 | [
"MIT"
] | 198 | 2019-11-15T03:33:25.000Z | 2022-03-30T07:02:21.000Z | gltflib/models/__init__.py | Onboard-Team/gltflib | 1aef8e5edcd6336b170226b0666bf78f92f02ee9 | [
"MIT"
] | 11 | 2019-10-15T01:37:05.000Z | 2022-03-24T12:11:12.000Z | from .accessor import Accessor
from .animation import Animation
from .animation_sampler import AnimationSampler
from .asset import Asset
from .attributes import Attributes
from .buffer import Buffer
from .buffer_view import BufferView
from .camera import Camera
from .channel import Channel
from .image import Image
from... | 34.166667 | 60 | 0.858537 |
c28a8dc358a0c2dd3d6249546ac6f064da191a56 | 340 | py | Python | matrix/ops/squeeze.py | wesselb/matrix | ba343d69945d7cbc67330d01a87eee363ce5d408 | [
"MIT"
] | 3 | 2021-07-30T17:38:08.000Z | 2021-11-21T04:41:40.000Z | matrix/ops/squeeze.py | wesselb/matrix | ba343d69945d7cbc67330d01a87eee363ce5d408 | [
"MIT"
] | null | null | null | matrix/ops/squeeze.py | wesselb/matrix | ba343d69945d7cbc67330d01a87eee363ce5d408 | [
"MIT"
] | null | null | null | import lab as B
from wbml.warning import warn_upmodule
from ..matrix import AbstractMatrix, structured
from ..util import ToDenseWarning
__all__ = []
@B.dispatch
def squeeze(a: AbstractMatrix):
if structured(a):
warn_upmodule(f"Squeezing {a}: converting to dense.", category=ToDenseWarning)
return B.... | 22.666667 | 86 | 0.741176 |
5104c2f8d322436379b4351260f4652ed1867414 | 6,628 | py | Python | experiments/archived/20210119/bag_model/criterions/kld_loss.py | fxnnxc/text_summarization | b8c8a5f491bc44622203602941c1514b2e006fe3 | [
"Apache-2.0"
] | 5 | 2020-10-14T02:30:44.000Z | 2021-05-06T12:48:28.000Z | experiments/archived/20210119/bag_model/criterions/kld_loss.py | fxnnxc/text_summarization | b8c8a5f491bc44622203602941c1514b2e006fe3 | [
"Apache-2.0"
] | 2 | 2020-12-19T05:59:31.000Z | 2020-12-22T11:05:31.000Z | experiments/archived/20210119/bag_model/criterions/kld_loss.py | fxnnxc/text_summarization | b8c8a5f491bc44622203602941c1514b2e006fe3 | [
"Apache-2.0"
] | 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 math
import torch
import torch.nn as nn
from fairseq import metrics, utils
from fairseq.criterions import FairseqCriterion, register_c... | 38.988235 | 105 | 0.601086 |
0f020d1c783e194f96af84de9326eba25595435c | 1,763 | py | Python | paddlespeech/server/engine/base_engine.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 1,379 | 2021-11-10T02:42:21.000Z | 2022-03-31T13:34:25.000Z | paddlespeech/server/engine/base_engine.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 268 | 2021-11-10T14:07:34.000Z | 2022-03-31T02:25:20.000Z | paddlespeech/server/engine/base_engine.py | jerryuhoo/PaddleSpeech | 1eec7b5e042da294c7524af92f0fae4c32a71aa3 | [
"Apache-2.0"
] | 296 | 2021-11-15T02:37:11.000Z | 2022-03-31T12:14:46.000Z | # Copyright (c) 2022 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 appli... | 29.881356 | 99 | 0.653432 |
cf5121152d0141826295552676482e2ccf425854 | 3,387 | py | Python | sif/acquisitions/improvement_acquisition.py | JamesBrofos/Sif | a38ddb14f598f9f35d3ed9e872260b938e961433 | [
"MIT"
] | 1 | 2022-03-24T18:59:27.000Z | 2022-03-24T18:59:27.000Z | sif/acquisitions/improvement_acquisition.py | JamesBrofos/Sif | a38ddb14f598f9f35d3ed9e872260b938e961433 | [
"MIT"
] | 4 | 2020-03-24T15:39:08.000Z | 2021-02-02T21:44:05.000Z | sif/acquisitions/improvement_acquisition.py | JamesBrofos/Sif | a38ddb14f598f9f35d3ed9e872260b938e961433 | [
"MIT"
] | 1 | 2019-11-05T19:28:06.000Z | 2019-11-05T19:28:06.000Z | import numpy as np
from .abstract_acquisition import AbstractAcquisitionFunction
class ImprovementAcquisitionFunction(AbstractAcquisitionFunction):
"""Improvement-Based Acquisition Function Class
Common acquisition function can be interpreted as improvements over the best
seen observation so far. In part... | 49.086957 | 81 | 0.674638 |
b82f29f2a011b8d59edd3202fd9e05c2f6f2ea33 | 1,401 | py | Python | blackmamba/lib/future/builtins/iterators.py | oz90210/blackmamba | 65c82c8e99028d6fbb57098ce82d0a394df215a0 | [
"MIT"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | blackmamba/lib/future/builtins/iterators.py | oz90210/blackmamba | 65c82c8e99028d6fbb57098ce82d0a394df215a0 | [
"MIT"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | blackmamba/lib/future/builtins/iterators.py | oz90210/blackmamba | 65c82c8e99028d6fbb57098ce82d0a394df215a0 | [
"MIT"
] | 698 | 2015-06-02T19:18:35.000Z | 2022-03-29T16:57:15.000Z | """
This module is designed to be used as follows::
from future.builtins.iterators import *
And then, for example::
for i in range(10**15):
pass
for (a, b) in zip(range(10**15), range(-10**15, 0)):
pass
Note that this is standard Python 3 code, plus some imports that do
nothing on P... | 25.944444 | 73 | 0.690221 |
025699d6521ddb2e551c47a8698ef1dc12efb77f | 6,879 | py | Python | tbfy.data/SharedDataMethods.py | TBFY/anomaly-detection-tool | 7d62192a90a58bdf8cf2641415572d922d6a9f70 | [
"Apache-2.0"
] | null | null | null | tbfy.data/SharedDataMethods.py | TBFY/anomaly-detection-tool | 7d62192a90a58bdf8cf2641415572d922d6a9f70 | [
"Apache-2.0"
] | null | null | null | tbfy.data/SharedDataMethods.py | TBFY/anomaly-detection-tool | 7d62192a90a58bdf8cf2641415572d922d6a9f70 | [
"Apache-2.0"
] | null | null | null |
'''
Series of methods shared by data processing methods
'''
class SharedDataMethods:
def __init__(self, conf=None):
self.conf = conf
def storeMJUOrganizationNames2Db(self, dataList, idIndex, nameIndex):
'''
function gets a list of lists and extracts company names nad ids and stores ... | 33.072115 | 139 | 0.576973 |
2bbc6bf6135f7daeb9e4389f1944d5cd6d4829a0 | 9,354 | py | Python | mt/mvae/distributions/von_mises_fisher.py | macio232/mvae | df3d5158ce29744e54b378ad663361e8b785632a | [
"Apache-2.0"
] | 53 | 2019-11-20T05:39:54.000Z | 2022-02-05T06:36:43.000Z | mt/mvae/distributions/von_mises_fisher.py | macio232/mvae | df3d5158ce29744e54b378ad663361e8b785632a | [
"Apache-2.0"
] | 8 | 2020-03-14T20:25:08.000Z | 2021-06-10T08:06:15.000Z | mt/mvae/distributions/von_mises_fisher.py | macio232/mvae | df3d5158ce29744e54b378ad663361e8b785632a | [
"Apache-2.0"
] | 10 | 2020-03-14T20:17:47.000Z | 2021-12-01T14:08:06.000Z | # Copyright 2019 Ondrej Skopek.
#
# 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... | 42.135135 | 120 | 0.607654 |
e3fa4dacd2b257aa922d13a87191e983b6419a48 | 2,091 | py | Python | tobiko/tests/unit/test_testcase.py | FedericoRessi/tobiko | 188825386dc30197a37b7fe8be03318c73abbc48 | [
"Apache-2.0"
] | 1 | 2022-01-11T20:50:06.000Z | 2022-01-11T20:50:06.000Z | tobiko/tests/unit/test_testcase.py | FedericoRessi/tobiko | 188825386dc30197a37b7fe8be03318c73abbc48 | [
"Apache-2.0"
] | null | null | null | tobiko/tests/unit/test_testcase.py | FedericoRessi/tobiko | 188825386dc30197a37b7fe8be03318c73abbc48 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Red Hat
#
# 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 ... | 29.450704 | 78 | 0.673362 |
b9aaafcda022a53332c59f74f160de6f908af81e | 1,207 | py | Python | caffe2/python/onnx/tests/onnx_backend_test.py | shigengtian/caffe2 | e19489d6acd17fea8ca98cd8e4b5b680e23a93c5 | [
"Apache-2.0"
] | 1 | 2018-03-26T13:25:03.000Z | 2018-03-26T13:25:03.000Z | caffe2/python/onnx/tests/onnx_backend_test.py | shigengtian/caffe2 | e19489d6acd17fea8ca98cd8e4b5b680e23a93c5 | [
"Apache-2.0"
] | null | null | null | caffe2/python/onnx/tests/onnx_backend_test.py | shigengtian/caffe2 | e19489d6acd17fea8ca98cd8e4b5b680e23a93c5 | [
"Apache-2.0"
] | 1 | 2018-12-20T09:14:48.000Z | 2018-12-20T09:14:48.000Z | ## @package onnx
# Module caffe2.python.onnx.tests.onnx_backend_test
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import unittest
import onnx.backend.test
import caffe2.python.onnx.backend as c2
# This... | 31.763158 | 84 | 0.700083 |
c8b5ae597be7973ea4f02317d8dc6a6832eef016 | 3,176 | py | Python | aliyun-python-sdk-sas/aliyunsdksas/request/v20181203/DescribeSnapshotsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-sas/aliyunsdksas/request/v20181203/DescribeSnapshotsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-sas/aliyunsdksas/request/v20181203/DescribeSnapshotsRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.408163 | 76 | 0.762594 |
6a66aa8f419e06b13a40dd2d3bbfb13fa09f1b8a | 268 | py | Python | nameservice/admin.py | BryantS11/SkyNS | 829c212f0557941299f105b871ffbea58cb8421c | [
"MIT"
] | null | null | null | nameservice/admin.py | BryantS11/SkyNS | 829c212f0557941299f105b871ffbea58cb8421c | [
"MIT"
] | null | null | null | nameservice/admin.py | BryantS11/SkyNS | 829c212f0557941299f105b871ffbea58cb8421c | [
"MIT"
] | null | null | null | from django.contrib import admin
from nameservice.models import NameServiceModel, UserPortalModel, PortalModel
# Register your models here.
admin.site.register(NameServiceModel) # Add to Admin Page
admin.site.register(PortalModel)
admin.site.register(UserPortalModel) | 38.285714 | 77 | 0.843284 |
c1d74f64a9b461193426a8f68753258a8cbd1327 | 5,119 | py | Python | messages.py | Salz0/Derzhavets_bot | 7a592aed68cdbf450a30fb569a1eb26f9a3359d1 | [
"CC0-1.0"
] | null | null | null | messages.py | Salz0/Derzhavets_bot | 7a592aed68cdbf450a30fb569a1eb26f9a3359d1 | [
"CC0-1.0"
] | null | null | null | messages.py | Salz0/Derzhavets_bot | 7a592aed68cdbf450a30fb569a1eb26f9a3359d1 | [
"CC0-1.0"
] | null | null | null | from aiogram.utils.emoji import emojize
from aiogram.utils.markdown import text
# QUESTIONNAIRE MESSAGES:
questionnaire_start = text(emojize("Привіт!👋\nРозкажи, будь ласка: де та з ким ти хочеш жити 😏"))
questionnaire_floor = text(emojize("Де саме ти хотів би оселитися?🧳"))
questionnaire_room = text(emojize("Який н... | 31.024242 | 105 | 0.702481 |
d2b7dc577966a6258a7ba19b302661730fe6477d | 2,038 | py | Python | setup.py | andersy005/repo2apptainer | 6ba9bda304ecb410e74d53d4124c98aaf0660a1e | [
"BSD-3-Clause"
] | 1 | 2022-03-16T20:12:08.000Z | 2022-03-16T20:12:08.000Z | setup.py | andersy005/repo2apptainer | 6ba9bda304ecb410e74d53d4124c98aaf0660a1e | [
"BSD-3-Clause"
] | 1 | 2022-03-16T20:13:51.000Z | 2022-03-16T20:13:51.000Z | setup.py | andersy005/repo2apptainer | 6ba9bda304ecb410e74d53d4124c98aaf0660a1e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
"""The setup script."""
from setuptools import find_packages, setup
with open('requirements.txt') as f:
INSTALL_REQUIRES = f.read().strip().split('\n')
with open('README.md', encoding='utf8') as f:
LONG_DESCRIPTION = f.read()
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'Li... | 37.740741 | 127 | 0.678606 |
c5f95092a181e5f020105edb2d276a6f68c9970c | 287 | py | Python | security_management/config/desktop.py | swsiong97/FYP2 | dd1cdacfad2c5ab8c3f413e5814f703287a77b86 | [
"MIT"
] | null | null | null | security_management/config/desktop.py | swsiong97/FYP2 | dd1cdacfad2c5ab8c3f413e5814f703287a77b86 | [
"MIT"
] | null | null | null | security_management/config/desktop.py | swsiong97/FYP2 | dd1cdacfad2c5ab8c3f413e5814f703287a77b86 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"module_name": "Security Management",
"color": "grey",
"icon": "octicon octicon-file-directory",
"type": "module",
"label": _("Security Management")
}
]
| 19.133333 | 44 | 0.637631 |
b12945ba640ad4a03105665c4e82e2d609d22997 | 3,171 | py | Python | tests/test_vector.py | slode/triton | d440c510f4841348dfb9109f03858c75adf75564 | [
"MIT"
] | null | null | null | tests/test_vector.py | slode/triton | d440c510f4841348dfb9109f03858c75adf75564 | [
"MIT"
] | null | null | null | tests/test_vector.py | slode/triton | d440c510f4841348dfb9109f03858c75adf75564 | [
"MIT"
] | null | null | null | # Copyright (c) 2013 Stian Lode
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distrib... | 24.022727 | 79 | 0.602964 |
58af5c42bd86edc39f13aea8565ea27908be97a5 | 31,311 | py | Python | tensorflow/python/kernel_tests/seq2seq_test.py | returncode13/tensorflow | c5f94b10bbb30e525fa3ca313e7ccb173040c90a | [
"Apache-2.0"
] | 2 | 2020-07-30T05:06:30.000Z | 2020-08-28T05:10:49.000Z | tensorflow/python/kernel_tests/seq2seq_test.py | alainrk/tensorflow | 314d9cd9b607460f8bfea80fc828b1521ca18443 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/seq2seq_test.py | alainrk/tensorflow | 314d9cd9b607460f8bfea80fc828b1521ca18443 | [
"Apache-2.0"
] | 2 | 2018-03-14T03:10:40.000Z | 2018-09-13T13:59:40.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... | 46.181416 | 80 | 0.630833 |
1f7ea0638309be4c1eea3547e687c9a22e7fb544 | 229 | py | Python | server.py | jia1/the-tagger | 5daaa766f6c32a0b9ae8f824fa6eeff7c31dc6d2 | [
"BSD-3-Clause"
] | null | null | null | server.py | jia1/the-tagger | 5daaa766f6c32a0b9ae8f824fa6eeff7c31dc6d2 | [
"BSD-3-Clause"
] | null | null | null | server.py | jia1/the-tagger | 5daaa766f6c32a0b9ae8f824fa6eeff7c31dc6d2 | [
"BSD-3-Clause"
] | null | null | null | from os import environ
from gevent.pywsgi import WSGIServer
from app import app
if __name__ == '__main__':
port = int(environ.get('PORT', 5000))
http_server = WSGIServer(('', port), app)
http_server.serve_forever()
| 22.9 | 45 | 0.707424 |
b3547a06ba49d8157815eef1c9b9c5d5d9c2d63b | 3,434 | py | Python | torchrec/metrics/ctr.py | huaxz1986/torchrec | 1975ee0a8f2b12c89be753a1477bf4a3d4b005bd | [
"BSD-3-Clause"
] | 814 | 2022-02-23T17:24:14.000Z | 2022-03-31T16:52:23.000Z | torchrec/metrics/ctr.py | huaxz1986/torchrec | 1975ee0a8f2b12c89be753a1477bf4a3d4b005bd | [
"BSD-3-Clause"
] | 89 | 2022-02-23T17:29:56.000Z | 2022-03-31T23:44:13.000Z | torchrec/metrics/ctr.py | huaxz1986/torchrec | 1975ee0a8f2b12c89be753a1477bf4a3d4b005bd | [
"BSD-3-Clause"
] | 68 | 2022-02-23T17:42:17.000Z | 2022-03-28T06:39:55.000Z | #!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from typing import Any, cast, Dict, List, Optional, Type
import torch
from torchrec.met... | 32.704762 | 103 | 0.630169 |
57c0c528c2a690cdfa0d42522548995d33429e29 | 41 | py | Python | miRNASNP3/miRNASNP3/wsgi.py | chunjie-sam-liu/miRNASNP-v3 | 41fab95b496b639674010863895547db0fc108bc | [
"MIT"
] | 1 | 2020-07-02T08:51:37.000Z | 2020-07-02T08:51:37.000Z | miRNASNP3/miRNASNP3/wsgi.py | chunjie-sam-liu/miRNASNP-v3 | 41fab95b496b639674010863895547db0fc108bc | [
"MIT"
] | null | null | null | miRNASNP3/miRNASNP3/wsgi.py | chunjie-sam-liu/miRNASNP-v3 | 41fab95b496b639674010863895547db0fc108bc | [
"MIT"
] | null | null | null | from miRNASNP3 import app as application
| 20.5 | 40 | 0.853659 |
88c7dc3462e46c6ddc52039e75aa15ae28ef4e6d | 12,143 | py | Python | mushr_rhc_ros/src/utils/utils.py | rogeriobonatti/mushr_rhc | 8316cad6544997c1742cc5f5b539f5886eb00e7f | [
"BSD-3-Clause"
] | null | null | null | mushr_rhc_ros/src/utils/utils.py | rogeriobonatti/mushr_rhc | 8316cad6544997c1742cc5f5b539f5886eb00e7f | [
"BSD-3-Clause"
] | null | null | null | mushr_rhc_ros/src/utils/utils.py | rogeriobonatti/mushr_rhc | 8316cad6544997c1742cc5f5b539f5886eb00e7f | [
"BSD-3-Clause"
] | null | null | null | import torch
import numpy as np
import pickle
import os
from datetime import datetime
import glob
import re
import matplotlib.pyplot as plt
plt.switch_backend('agg')
from collections import deque
from tqdm import tqdm
from torchvision import transforms
import numbers
import cv2
from torch.optim import Optimizer
from t... | 33.918994 | 118 | 0.575146 |
04dac8a52ec4cb9223eff83bae00cb4a1da30c00 | 416 | py | Python | nxos_config_import/migrations/0010_objectconfigurationstatus_post_url.py | j-sulliman/acici | 25f20bf2cdc1ceb1b4752ef0608e9628035912d3 | [
"BSD-3-Clause"
] | 4 | 2019-07-20T11:37:32.000Z | 2020-02-03T07:09:12.000Z | nxos_config_import/migrations/0010_objectconfigurationstatus_post_url.py | j-sulliman/acici | 25f20bf2cdc1ceb1b4752ef0608e9628035912d3 | [
"BSD-3-Clause"
] | 8 | 2019-12-04T23:46:30.000Z | 2021-06-10T18:30:30.000Z | nxos_config_import/migrations/0010_objectconfigurationstatus_post_url.py | j-sulliman/acici | 25f20bf2cdc1ceb1b4752ef0608e9628035912d3 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-22 01:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('nxos_config_import', '0009_auto_20190322_1408'),
]
operations = [
migrations.AddField(
model_name='objectconfigurationstatus',
... | 21.894737 | 58 | 0.622596 |
aea93112148420de46d0b46b760952c0a6b7f4b3 | 2,619 | py | Python | tests/unit/test_vendor.py | jrottenberg/pipenv | cda15b3b30e04e038ee286bced6c47a311f1e0ec | [
"MIT"
] | 6,263 | 2017-01-20T17:41:36.000Z | 2022-02-15T20:48:57.000Z | tests/unit/test_vendor.py | jrottenberg/pipenv | cda15b3b30e04e038ee286bced6c47a311f1e0ec | [
"MIT"
] | 1,100 | 2017-01-20T19:41:52.000Z | 2017-12-06T09:15:13.000Z | tests/unit/test_vendor.py | jrottenberg/pipenv | cda15b3b30e04e038ee286bced6c47a311f1e0ec | [
"MIT"
] | 366 | 2017-01-21T10:06:52.000Z | 2021-11-25T17:09:19.000Z | # -*- coding: utf-8 -*-
# We need to import the patched packages directly from sys.path, so the
# identity checks can pass.
import pipenv # noqa
import datetime
import os
import pytest
import pytz
import tomlkit
from pipfile.api import PipfileParser
class TestPipfileParser:
def test_inject_environment_variab... | 29.761364 | 80 | 0.568156 |
22e29be30bd1cd510331860b36fc76f97239c129 | 1,953 | py | Python | pyro_models/arm/electric_inter.py | jpchen/pyro-models | b9e6ae6271e6cd622fbb4d34d67c450d5a954c9b | [
"Apache-2.0"
] | 30 | 2019-02-22T03:03:18.000Z | 2022-01-22T15:57:37.000Z | pyro_models/arm/electric_inter.py | jpchen/pyro-models | b9e6ae6271e6cd622fbb4d34d67c450d5a954c9b | [
"Apache-2.0"
] | 7 | 2019-02-26T18:28:57.000Z | 2021-06-11T17:21:06.000Z | pyro_models/arm/electric_inter.py | jpchen/pyro-models | b9e6ae6271e6cd622fbb4d34d67c450d5a954c9b | [
"Apache-2.0"
] | 8 | 2019-02-25T22:06:14.000Z | 2022-02-18T23:19:49.000Z | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
# model file: example-models/ARM/Ch.9/electric_inter.stan
import torch
import pyro
import pyro.distributions as dist
def init_vector(name, dims=None):
return pyro.sample(name, dist.Normal(torch.zeros(dims), 0.2 * torch.ones(dims))... | 29.590909 | 137 | 0.661546 |
ba5a7df1e415465a86688d012b7d9ff21908abca | 5,126 | py | Python | docs/conf.py | medlab/oum | 29e0c90cca1a3c40f6dd6ced93edb06c06633c10 | [
"BSD-3-Clause"
] | 2 | 2018-07-09T15:52:42.000Z | 2018-08-17T19:34:02.000Z | docs/conf.py | medlab/oum | 29e0c90cca1a3c40f6dd6ced93edb06c06633c10 | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | medlab/oum | 29e0c90cca1a3c40f6dd6ced93edb06c06633c10 | [
"BSD-3-Clause"
] | null | null | null | # -*- 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.152941 | 79 | 0.639875 |
fa96b13665ac46d76b641a24dff69d6663bf6c13 | 13,409 | py | Python | sdk/python/pulumi_google_native/compute/v1/target_vpn_gateway.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 44 | 2021-04-18T23:00:48.000Z | 2022-02-14T17:43:15.000Z | sdk/python/pulumi_google_native/compute/v1/target_vpn_gateway.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 354 | 2021-04-16T16:48:39.000Z | 2022-03-31T17:16:39.000Z | sdk/python/pulumi_google_native/compute/v1/target_vpn_gateway.py | AaronFriel/pulumi-google-native | 75d1cda425e33d4610348972cd70bddf35f1770d | [
"Apache-2.0"
] | 8 | 2021-04-24T17:46:51.000Z | 2022-01-05T10:40:21.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 45.454237 | 475 | 0.648147 |
06c617626e6bd7977fda0a88cba35b101388aec8 | 319 | py | Python | setup.py | eplouf/sleeplib | d54e7e4a7f4196f5b7ac59e4230232fc7fe5978f | [
"BSD-3-Clause"
] | null | null | null | setup.py | eplouf/sleeplib | d54e7e4a7f4196f5b7ac59e4230232fc7fe5978f | [
"BSD-3-Clause"
] | null | null | null | setup.py | eplouf/sleeplib | d54e7e4a7f4196f5b7ac59e4230232fc7fe5978f | [
"BSD-3-Clause"
] | null | null | null |
from distutils.core import setup
import sleeplib
setup(name='sleeplib',
version='1.0',
description='Python library to access Philips SmartSleep api',
author='Kilian Hart',
author_email='dev@afturgurluk.net',
url='https://github.com/eplouf/sleeplib',
packages=['sleeplib'],
)
| 22.785714 | 68 | 0.664577 |
c56bb4bb0a4a6c87e07a59d62fada4257958049e | 3,657 | py | Python | intersight/models/feedback_feedback_data_ref.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/feedback_feedback_data_ref.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | intersight/models/feedback_feedback_data_ref.py | ategaw-cisco/intersight-python | 9d6476620507281b1dc358e29ac452d56081bbb0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-262
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class FeedbackFeedbackDataRef(object):
"""
NOTE: Th... | 24.38 | 77 | 0.547443 |
9a6f7546d3dea4cfea41f287d157b3de21714406 | 34,154 | py | Python | lib/honcore/client.py | keabard/KeaBot | b4c39c88a11b171738d3623a9cd234e2e4342b7d | [
"Unlicense"
] | 1 | 2018-09-20T02:16:50.000Z | 2018-09-20T02:16:50.000Z | lib/honcore/client.py | keabard/KeaBot | b4c39c88a11b171738d3623a9cd234e2e4342b7d | [
"Unlicense"
] | null | null | null | lib/honcore/client.py | keabard/KeaBot | b4c39c88a11b171738d3623a9cd234e2e4342b7d | [
"Unlicense"
] | null | null | null | """
HoNCore. Python library providing connectivity and functionality
with HoN's chat server.
"""
import sys, struct, socket, time
import deserialise, common
from common import Channel
from requester import Requester
from networking import ChatSocket, GameSocket
from utils import ping_server
from constants import *
fro... | 43.015113 | 180 | 0.594074 |
cd09505b9c1b5dd39206095dad3834cb2cb7e951 | 9,027 | py | Python | davis_decode.py | ventillo/esp8266_cc1101_davis_vantage_vue_wifi_decoder | d309db1c5cfe4066bd2138f350481dbd5b364239 | [
"Unlicense"
] | 5 | 2020-06-30T11:08:34.000Z | 2021-08-16T12:22:26.000Z | davis_decode.py | ventillo/esp8266_cc1101_davis_vantage_vue_wifi_decoder | d309db1c5cfe4066bd2138f350481dbd5b364239 | [
"Unlicense"
] | null | null | null | davis_decode.py | ventillo/esp8266_cc1101_davis_vantage_vue_wifi_decoder | d309db1c5cfe4066bd2138f350481dbd5b364239 | [
"Unlicense"
] | 1 | 2020-12-13T18:49:32.000Z | 2020-12-13T18:49:32.000Z | import urequests
import machine
try:
_DEBUG = DEBUG
except:
_DEBUG = False
def send_to_influx(host, port, db, user, password, davis_unit_id, wind, measurement, name, value, tags):
post = "http://{}:{}/write?db={}".format(host, port, db)
if _DEBUG:
print(b"SENDING TO: {}".format(post))
if m... | 36.695122 | 189 | 0.535837 |
6e3cd06b07e31e79273e40337fd0ac0edf7751ef | 28,098 | py | Python | slack_invite_flow/quip.py | omaraboumrad/slack-invite-flow | 2cf63d95cac355ae0e7c3e57c7f927975ed3639c | [
"Apache-2.0"
] | 3 | 2016-11-07T16:16:54.000Z | 2017-05-25T21:38:49.000Z | slack_invite_flow/quip.py | omaraboumrad/slack-invite-flow | 2cf63d95cac355ae0e7c3e57c7f927975ed3639c | [
"Apache-2.0"
] | null | null | null | slack_invite_flow/quip.py | omaraboumrad/slack-invite-flow | 2cf63d95cac355ae0e7c3e57c7f927975ed3639c | [
"Apache-2.0"
] | 3 | 2016-11-07T16:55:26.000Z | 2021-11-09T09:35:40.000Z | # Copyright 2014 Quip
#
# 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, softwar... | 40.780842 | 80 | 0.588583 |
efc9ac3b6c6bd3a8a2ee90360d4a909f9bafe70b | 23 | py | Python | python/module/hl2d/__init__.py | DerThorsten/hl2d | d21b711f3427188b1de63cb5a77f791f4a7f0c8b | [
"MIT"
] | null | null | null | python/module/hl2d/__init__.py | DerThorsten/hl2d | d21b711f3427188b1de63cb5a77f791f4a7f0c8b | [
"MIT"
] | null | null | null | python/module/hl2d/__init__.py | DerThorsten/hl2d | d21b711f3427188b1de63cb5a77f791f4a7f0c8b | [
"MIT"
] | null | null | null | from . _hl2d import *
| 7.666667 | 21 | 0.652174 |
3885739c3deabf6fcc7d9e96a67ba881c8c33451 | 963 | py | Python | src/sentry/api/endpoints/team_stats.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/team_stats.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/team_stats.py | erhuabushuo/sentry | 8b3bad10155aaacfdff80910e5972e64304e880c | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from rest_framework.response import Response
from six.moves import range
from sentry.app import tsdb
from sentry.api.base import BaseStatsEndpoint
from sentry.api.permissions import assert_perm
from sentry.models import Team, Project
class TeamStatsEndpoint(BaseStatsEndpoint):... | 27.514286 | 72 | 0.656282 |
62722c7eb5ddf4057a4cfd1d79d52b55c096de35 | 2,590 | py | Python | playground/detection/widerface/fcos/fcos.res50.fpn.widerface.600size.0.5x_crop.plus.norm_sync/config.py | hanqiu-hq/cvpods | 597fa669151fdad87c250fa118a9e3a555f4fb5e | [
"Apache-2.0"
] | 548 | 2020-12-03T11:30:43.000Z | 2022-03-31T11:19:26.000Z | playground/detection/widerface/fcos/fcos.res50.fpn.widerface.600size.0.5x_crop.plus.norm_sync/config.py | wondervictor/cvpods | 614a975e5425bbaeb66bbd1ffca552d633ba89ca | [
"Apache-2.0"
] | 58 | 2020-12-04T19:47:10.000Z | 2022-03-30T06:52:13.000Z | playground/detection/widerface/fcos/fcos.res50.fpn.widerface.600size.0.5x_crop.plus.norm_sync/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.fcos_config import FCOSConfig
_config_dict = dict(
MODEL=dict(
WEIGHTS="detectron2://ImageNetPretrained/MSRA/R-50.pkl",
RESNETS=dict(DEPTH=50),
FCOS=dict(
NUM_CLASSES=1,
CENTERNESS_ON_REG=True,
NORM_REG_TARGETS=T... | 31.204819 | 85 | 0.526641 |
122e4a2b5d25fbeb4ac53055f8aca8f63f4f9060 | 1,217 | py | Python | setup.py | asdfkaba/markdown-urlize | 27f1fa8c0b187df48647f3b7a72a86731e0608e4 | [
"BSD-2-Clause"
] | 8 | 2015-12-17T11:27:13.000Z | 2021-06-09T23:54:04.000Z | setup.py | asdfkaba/markdown-urlize | 27f1fa8c0b187df48647f3b7a72a86731e0608e4 | [
"BSD-2-Clause"
] | 3 | 2015-02-20T15:48:26.000Z | 2019-11-25T16:24:48.000Z | setup.py | asdfkaba/markdown-urlize | 27f1fa8c0b187df48647f3b7a72a86731e0608e4 | [
"BSD-2-Clause"
] | 8 | 2015-02-20T16:08:33.000Z | 2019-01-21T09:11:57.000Z | import os
from setuptools import setup
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name='markdown-urlize',
version='0.2.0',
description='A more liberal autolink extension for python Markd... | 32.891892 | 72 | 0.619556 |
e158c4972dbb4672dc18aba5f47986b791bf7aec | 384 | py | Python | invenio_theme_tugraz/version.py | freelion93/invenio-theme-tugraz | 336613e0d8ae9286c88ea49c584d108a2739f2e2 | [
"MIT"
] | null | null | null | invenio_theme_tugraz/version.py | freelion93/invenio-theme-tugraz | 336613e0d8ae9286c88ea49c584d108a2739f2e2 | [
"MIT"
] | null | null | null | invenio_theme_tugraz/version.py | freelion93/invenio-theme-tugraz | 336613e0d8ae9286c88ea49c584d108a2739f2e2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 mojib wali.
#
# invenio-theme-tugraz is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""Version information for invenio-theme-tugraz.
This file is imported by ``invenio_theme_tugraz.__i... | 24 | 73 | 0.710938 |
01d8f1fa8a5419f352d0419a6b9a2ff4fdc8f790 | 418 | py | Python | python-seleninm.py | ichengzi/learn-python | c1753ef624b2d0bfcfa7058818b4ea36fdf060de | [
"MIT"
] | null | null | null | python-seleninm.py | ichengzi/learn-python | c1753ef624b2d0bfcfa7058818b4ea36fdf060de | [
"MIT"
] | null | null | null | python-seleninm.py | ichengzi/learn-python | c1753ef624b2d0bfcfa7058818b4ea36fdf060de | [
"MIT"
] | null | null | null | # coding = utf-8
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
driver = webdriver.Chrome()
driver.get('http://www.baidu.com')
el = driver.find_element_by_id('kw')
el.send_keys('chengzi'+Keys.RETURN)
time.sleep(1)
print driver.title
# 返回百度页面底部备案信息
text = ... | 19.904762 | 48 | 0.717703 |
25969d9b24d7a57531fea41b00ca1e5a37bc0ee0 | 286 | py | Python | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0013.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | 1 | 2020-07-03T13:54:18.000Z | 2020-07-03T13:54:18.000Z | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0013.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | 01-DesenvolvimentoDeSistemas/02-LinguagensDeProgramacao/01-Python/01-ListaDeExercicios/02-Aluno/Roberto/exc0013.py | moacirsouza/nadas | ad98d73b4281d1581fd2b2a9d29001acb426ee56 | [
"MIT"
] | null | null | null | print('[-- Faça um algoritmo que leia o salário de um funcionário e mostre seu novo salário, com 15% de aumento. --]\n')
salario = float(input('Qual o salário do funcionário? R$ '))
novosalario = salario*1.15
print('O Novo Salário do Funcionário é: R${:.2f} ' .format(novosalario))
| 35.75 | 120 | 0.702797 |
b7250f5fc5fe7164b1c31ec9d1418728dcabdd3b | 2,936 | py | Python | lib/spack/spack/s3_handler.py | radical-cybertools/spack | c11ce3bd1fc87cbb3cc8519d13c27892a9f1d66e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/s3_handler.py | radical-cybertools/spack | c11ce3bd1fc87cbb3cc8519d13c27892a9f1d66e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | lib/spack/spack/s3_handler.py | radical-cybertools/spack | c11ce3bd1fc87cbb3cc8519d13c27892a9f1d66e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from io import BufferedReader
import six.moves.urllib.error as urllib_error
import six.moves.urllib.request as urllib_req... | 31.913043 | 98 | 0.64203 |
3f1bde024acb2d4261a827f93aa051152861937d | 3,892 | py | Python | genesis.py | wonabru/chainnet | f8ec1e2b580af837cba3322ffe69b95156b1b9a1 | [
"MIT"
] | 5 | 2019-04-20T18:54:55.000Z | 2019-08-23T09:17:20.000Z | genesis.py | wonabru/chainnet | f8ec1e2b580af837cba3322ffe69b95156b1b9a1 | [
"MIT"
] | null | null | null | genesis.py | wonabru/chainnet | f8ec1e2b580af837cba3322ffe69b95156b1b9a1 | [
"MIT"
] | null | null | null | from wallet import CWallet
class CGenesis:
def __init__(self):
self.e = 65537
#self.initAccountPubKey = CWallet().getPublicKey(self.getPrivKey())
self.initAccountPubKey = 'g9MsRcZGTHomRZD6pN4Nr1uq8L+scPZ/mOAsWBsU3LSBS99k4A5rA/XP5n7VfFpF4DNXhSJce4ZAo' \
'Qb... | 82.808511 | 209 | 0.656732 |
4e31c0b8983263aad44761f77a9773f225432b82 | 2,336 | py | Python | rdflib/exceptions.py | ROZBEH/rdflib | 5b9da927714a92a8888407f42b46249002964e8e | [
"BSD-3-Clause"
] | 1,424 | 2015-01-04T13:10:22.000Z | 2022-03-29T15:12:38.000Z | rdflib/exceptions.py | ROZBEH/rdflib | 5b9da927714a92a8888407f42b46249002964e8e | [
"BSD-3-Clause"
] | 1,148 | 2015-01-01T18:26:18.000Z | 2022-03-31T21:51:53.000Z | rdflib/exceptions.py | ROZBEH/rdflib | 5b9da927714a92a8888407f42b46249002964e8e | [
"BSD-3-Clause"
] | 459 | 2015-01-03T14:41:34.000Z | 2022-03-14T22:06:47.000Z | """
TODO:
"""
__all__ = [
"Error",
"TypeCheckError",
"SubjectTypeError",
"PredicateTypeError",
"ObjectTypeError",
"ContextTypeError",
"ParserError",
]
class Error(Exception):
"""Base class for rdflib exceptions."""
def __init__(self, msg=None):
Exception.__init__(self, ms... | 23.36 | 79 | 0.598887 |
0bf2d04b802848fed914565caed1893b47d9d583 | 14,015 | py | Python | openmdao.lib/src/openmdao/lib/drivers/test/test_broydensolver.py | mjfwest/OpenMDAO-Framework | a5521f47ad7686c25b203de74e1c7dff5fd7a52b | [
"Apache-2.0"
] | 69 | 2015-01-02T19:10:08.000Z | 2021-11-14T04:42:28.000Z | openmdao.lib/src/openmdao/lib/drivers/test/test_broydensolver.py | jcchin/OpenMDAO-Framework | 038e89b06da1c74f00918f4c6fbd8bd365e25657 | [
"Apache-2.0"
] | 3 | 2015-01-15T23:08:18.000Z | 2015-03-11T16:57:35.000Z | openmdao.lib/src/openmdao/lib/drivers/test/test_broydensolver.py | jcchin/OpenMDAO-Framework | 038e89b06da1c74f00918f4c6fbd8bd365e25657 | [
"Apache-2.0"
] | 31 | 2015-09-16T00:37:35.000Z | 2022-01-10T06:27:55.000Z | """
Test the broyden solver component.
"""
import unittest
import numpy
from openmdao.main.api import Assembly, Component, set_as_top, Driver
from openmdao.main.interfaces import IHasParameters, implements
from openmdao.main.hasparameters import HasParameters
from openmdao.util.decorators import add_delegate
from ope... | 32.292627 | 84 | 0.600642 |
5b7a43fba0eda764f69300b1a36bf7b3ce0948b5 | 21,203 | py | Python | test/functional/pruning.py | gautes/TrollCoinCore | 21392fb66e6abf50d48598827dbbf15a129e51b1 | [
"MIT"
] | null | null | null | test/functional/pruning.py | gautes/TrollCoinCore | 21392fb66e6abf50d48598827dbbf15a129e51b1 | [
"MIT"
] | null | null | null | test/functional/pruning.py | gautes/TrollCoinCore | 21392fb66e6abf50d48598827dbbf15a129e51b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 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 the pruning code.
WARNING:
This test uses 4GB of disk space.
This test takes 30 mins or more (up ... | 47.754505 | 158 | 0.605245 |
3d3cdb0a5a58ddfcd7cbc69348751eb940fa87de | 5,574 | py | Python | 2021/util.py | blin00/advent-of-code | 0a8cafb1eb6c2ec0b35af2af1fdbf6498ca0a83f | [
"Unlicense"
] | 7 | 2021-12-11T00:04:11.000Z | 2021-12-30T11:13:36.000Z | 2021/util.py | blin00/advent-of-code | 0a8cafb1eb6c2ec0b35af2af1fdbf6498ca0a83f | [
"Unlicense"
] | null | null | null | 2021/util.py | blin00/advent-of-code | 0a8cafb1eb6c2ec0b35af2af1fdbf6498ca0a83f | [
"Unlicense"
] | 2 | 2021-12-18T10:15:43.000Z | 2021-12-22T05:11:32.000Z | import re
from operator import add
from collections import deque, defaultdict, Counter
import copy
import sys
sys.setrecursionlimit(int(1e7))
# convention that positive y is down
# increment to clockwise/turn right, decrement to counterclockwise/turn left
DIRS = {
0: (0, -1),
1: (1, 0),
2: (0, 1),
3: ... | 23.420168 | 135 | 0.507714 |
4946a6cbbe993ed6eb7117832b266839d20da7e8 | 14,235 | py | Python | fanficfare/adapters/adapter_samandjacknet.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | 1 | 2019-06-13T11:20:33.000Z | 2019-06-13T11:20:33.000Z | fanficfare/adapters/adapter_samandjacknet.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | fanficfare/adapters/adapter_samandjacknet.py | davidferguson/FanFicUpload | dcc3010b9c35c6d0e479cfc2aa07d951d280d9b2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2011 Fanficdownloader team, 2015 FanFicFare team
#
# 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... | 41.622807 | 157 | 0.593888 |
d89a7458776c93889d3ad9bd9f3e1fb5b9804a54 | 2,707 | py | Python | nnunet/training/network_training/nnUNet_variants/optimizer_and_lr/nnUNetTrainerV2_SGD_ReduceOnPlateau.py | nasyxx/nnUNet | 92d5f2352349eed278e22f7a38cb86b0fccd7c75 | [
"Apache-2.0"
] | 1,621 | 2019-02-14T02:56:51.000Z | 2022-03-31T02:53:17.000Z | nnunet/training/network_training/nnUNet_variants/optimizer_and_lr/nnUNetTrainerV2_SGD_ReduceOnPlateau.py | nasyxx/nnUNet | 92d5f2352349eed278e22f7a38cb86b0fccd7c75 | [
"Apache-2.0"
] | 72 | 2019-02-21T04:45:38.000Z | 2022-02-09T23:49:43.000Z | nnunet/training/network_training/nnUNet_variants/optimizer_and_lr/nnUNetTrainerV2_SGD_ReduceOnPlateau.py | nasyxx/nnUNet | 92d5f2352349eed278e22f7a38cb86b0fccd7c75 | [
"Apache-2.0"
] | 424 | 2019-02-15T04:05:55.000Z | 2022-03-30T02:06:34.000Z | # Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany
#
# 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://w... | 53.078431 | 116 | 0.669006 |
11ad8e3acabea4ba3b75419ee9e4dad9037911b9 | 1,397 | py | Python | blog/main/forms.py | leni1/microblog | d51f47618b3eb446e351f3d3ae493cb6a5a15d45 | [
"MIT"
] | null | null | null | blog/main/forms.py | leni1/microblog | d51f47618b3eb446e351f3d3ae493cb6a5a15d45 | [
"MIT"
] | null | null | null | blog/main/forms.py | leni1/microblog | d51f47618b3eb446e351f3d3ae493cb6a5a15d45 | [
"MIT"
] | null | null | null | from flask import request
from flask_wtf import FlaskForm
from wtforms import StringField, SubmitField, TextAreaField
from wtforms.validators import DataRequired, Length, ValidationError
from blog.models import User
class EditProfileForm(FlaskForm):
username = StringField('Username', validators=[DataRequired()])... | 34.925 | 77 | 0.686471 |
f5caa832736b359d3224b8637472c7b99155288c | 1,170 | py | Python | isi_sdk_8_0_1/test/test_filepool_policy_file_matching_pattern_or_criteria_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0_1/test/test_filepool_policy_file_matching_pattern_or_criteria_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0_1/test/test_filepool_policy_file_matching_pattern_or_criteria_item.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_0_1
from i... | 28.536585 | 157 | 0.77265 |
e79dfa02b3d24e30a1b89946d9c283565690bbb9 | 3,559 | py | Python | tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/concurrency_test.py | AdeshChoudhar/tensorflow | 1065fdc54e336a6278a4795ffa69c17c4336dfec | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/concurrency_test.py | AdeshChoudhar/tensorflow | 1065fdc54e336a6278a4795ffa69c17c4336dfec | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/mlir/quantization/tensorflow/python/integration_test/concurrency_test.py | AdeshChoudhar/tensorflow | 1065fdc54e336a6278a4795ffa69c17c4336dfec | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 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... | 35.949495 | 103 | 0.710593 |
8e9952fd707a97411332fd3c2673a4694d4e8d34 | 21,147 | py | Python | official/vision/beta/projects/yolo/ops/preprocess_ops.py | kia-ctw/models | 007070820109ec57cfb048ff505be090d4e88d10 | [
"Apache-2.0"
] | 3 | 2022-03-05T10:46:52.000Z | 2022-03-22T06:00:05.000Z | official/vision/beta/projects/yolo/ops/preprocess_ops.py | kia-ctw/models | 007070820109ec57cfb048ff505be090d4e88d10 | [
"Apache-2.0"
] | 1 | 2021-09-02T12:43:42.000Z | 2021-09-02T12:43:42.000Z | official/vision/beta/projects/yolo/ops/preprocess_ops.py | kia-ctw/models | 007070820109ec57cfb048ff505be090d4e88d10 | [
"Apache-2.0"
] | 2 | 2021-08-17T22:07:17.000Z | 2021-12-25T12:25:47.000Z | # Copyright 2021 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... | 40.35687 | 80 | 0.627181 |
29c39053b6c531b448d818701277b8183cb177b2 | 17,367 | py | Python | test/python/quantum_info/operators/channel/test_choi.py | diego-plan9/qiskit-terra | a4120d70bd631ad2add228fdb1f86706bc5f2339 | [
"Apache-2.0"
] | 1 | 2018-05-29T03:58:03.000Z | 2018-05-29T03:58:03.000Z | test/python/quantum_info/operators/channel/test_choi.py | diego-plan9/qiskit-terra | a4120d70bd631ad2add228fdb1f86706bc5f2339 | [
"Apache-2.0"
] | 3 | 2018-11-13T17:33:37.000Z | 2018-12-03T09:35:00.000Z | test/python/quantum_info/operators/channel/test_choi.py | diego-plan9/qiskit-terra | a4120d70bd631ad2add228fdb1f86706bc5f2339 | [
"Apache-2.0"
] | 2 | 2017-12-03T15:48:14.000Z | 2018-03-11T13:08:03.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# 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... | 36.18125 | 77 | 0.559279 |
0f8baee0e403f41a1bed9b0c40acc83d1ebb9ef5 | 4,510 | py | Python | tests/unit/deployers/gcp/test_gcpserving.py | suomitekai/fairing | 9ca6a1138529b3f0b21979d62c7cb1f303bc52e0 | [
"Apache-2.0"
] | 334 | 2018-09-03T23:10:02.000Z | 2022-03-07T23:12:24.000Z | tests/unit/deployers/gcp/test_gcpserving.py | suomitekai/fairing | 9ca6a1138529b3f0b21979d62c7cb1f303bc52e0 | [
"Apache-2.0"
] | 562 | 2018-09-03T21:33:42.000Z | 2022-03-29T12:47:43.000Z | tests/unit/deployers/gcp/test_gcpserving.py | suomitekai/fairing | 9ca6a1138529b3f0b21979d62c7cb1f303bc52e0 | [
"Apache-2.0"
] | 160 | 2018-11-06T17:55:32.000Z | 2022-02-15T09:59:10.000Z | """Tests for GCPServing Deployer."""
import json
import httplib2
from unittest.mock import patch
from kubeflow.fairing.deployers.gcp.gcpserving import GCPServingDeployer
from googleapiclient.errors import HttpError
def create_http_error(error_code, message):
error_content = json.dumps({
'error': {
... | 37.89916 | 101 | 0.71663 |
a4c692e12071e94e8e15d3ac7e5627369e577939 | 1,076 | py | Python | isi_sdk_8_0_1/test/test_cluster_node_state_servicelight_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_0_1/test/test_cluster_node_state_servicelight_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_0_1/test/test_cluster_node_state_servicelight_extended.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_0_1
from i... | 26.243902 | 132 | 0.752788 |
63e390f785bfd16e747eb3b80d0391695d2cc4d8 | 5,960 | py | Python | nevergrad/instrumentation/core.py | ClementWalter/nevergrad | b9c3c3840abc5948d0f0a2560d811aea6cbc5ce9 | [
"MIT"
] | null | null | null | nevergrad/instrumentation/core.py | ClementWalter/nevergrad | b9c3c3840abc5948d0f0a2560d811aea6cbc5ce9 | [
"MIT"
] | null | null | null | nevergrad/instrumentation/core.py | ClementWalter/nevergrad | b9c3c3840abc5948d0f0a2560d811aea6cbc5ce9 | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import copy
from typing import Any, Tuple, Optional, Dict, Set, TypeVar, Callable
import numpy as np
from ..common.typeto... | 36.564417 | 117 | 0.63943 |
2ff41257cb55bff03ae6cc32f2c1a8f1e98b5ed9 | 43 | py | Python | pythonCore/ch11/mymodule/test.py | Furzoom/learnpython | a3034584e481d4e7c55912d9da06439688aa67ea | [
"MIT"
] | null | null | null | pythonCore/ch11/mymodule/test.py | Furzoom/learnpython | a3034584e481d4e7c55912d9da06439688aa67ea | [
"MIT"
] | null | null | null | pythonCore/ch11/mymodule/test.py | Furzoom/learnpython | a3034584e481d4e7c55912d9da06439688aa67ea | [
"MIT"
] | null | null | null | __author__ = 'MN'
print('in module test')
| 10.75 | 23 | 0.674419 |
74d21cccf5b485dd1c1ff6cfb087bea9b5dc6a73 | 14,152 | py | Python | tests/_core/test_step.py | vishalbelsare/baikal | 332623c1d6121d3321f9cd9972fc36b6d16462d4 | [
"BSD-3-Clause"
] | 622 | 2019-11-17T02:58:25.000Z | 2022-01-23T11:14:31.000Z | tests/_core/test_step.py | vishalbelsare/baikal | 332623c1d6121d3321f9cd9972fc36b6d16462d4 | [
"BSD-3-Clause"
] | 41 | 2019-10-30T14:08:53.000Z | 2021-10-21T18:41:15.000Z | tests/_core/test_step.py | vishalbelsare/baikal | 332623c1d6121d3321f9cd9972fc36b6d16462d4 | [
"BSD-3-Clause"
] | 31 | 2019-11-18T00:25:03.000Z | 2021-07-28T04:05:26.000Z | from contextlib import contextmanager
from functools import partial
import pytest
from sklearn.base import TransformerMixin, BaseEstimator
from baikal import Input, Step, set_config
from baikal._core.data_placeholder import DataPlaceholder
from baikal._core.step import InputStep
from tests.helpers.fixtures import te... | 33.535545 | 88 | 0.651851 |
a202e0bbd8f87396163757c11019034dac56efd3 | 8,154 | py | Python | qqbot/qrcodemanager.py | hatsuyuki280/qqbot | afc6f276f31fd6ba93a43785207735c0392ab3fe | [
"MIT"
] | 7 | 2019-08-06T09:42:34.000Z | 2021-06-18T00:34:02.000Z | qqbot/qrcodemanager.py | hatsuyuki280/qqbot | afc6f276f31fd6ba93a43785207735c0392ab3fe | [
"MIT"
] | 4 | 2021-06-08T19:22:30.000Z | 2022-03-11T23:32:13.000Z | qqbot/qrcodemanager.py | hatsuyuki280/qqbot | afc6f276f31fd6ba93a43785207735c0392ab3fe | [
"MIT"
] | 5 | 2018-12-04T14:41:31.000Z | 2020-08-27T10:54:30.000Z | # -*- coding: utf-8 -*-
import sys, os
p = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if p not in sys.path:
sys.path.insert(0, p)
import os, platform, uuid, subprocess, time
from qqbot.utf8logger import WARN, INFO, DEBUG, ERROR
from qqbot.common import StartDaemonThread, LockedValue, HasCommand,... | 33.418033 | 110 | 0.50466 |
541ce25e98c8e49118dacc2e87b5ff09a7cdae2c | 17,182 | py | Python | ironic/tests/unit/db/test_conductor.py | markbeierl/ironic | bcf5b37c736bc36abe94489c366fe26f198a7e7a | [
"Apache-2.0"
] | null | null | null | ironic/tests/unit/db/test_conductor.py | markbeierl/ironic | bcf5b37c736bc36abe94489c366fe26f198a7e7a | [
"Apache-2.0"
] | null | null | null | ironic/tests/unit/db/test_conductor.py | markbeierl/ironic | bcf5b37c736bc36abe94489c366fe26f198a7e7a | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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... | 41.907317 | 79 | 0.623501 |
420afb42ef6ccb43a7bdc75f6128dd7f20b063ce | 4,113 | py | Python | python/torch_mlir/eager_mode/torch_mlir_tensor.py | rdadolf/torch-mlir | 86eb493a443ffceada475e33dcd648628b16a808 | [
"Apache-2.0"
] | 1 | 2021-11-30T06:55:32.000Z | 2021-11-30T06:55:32.000Z | python/torch_mlir/eager_mode/torch_mlir_tensor.py | rdadolf/torch-mlir | 86eb493a443ffceada475e33dcd648628b16a808 | [
"Apache-2.0"
] | null | null | null | python/torch_mlir/eager_mode/torch_mlir_tensor.py | rdadolf/torch-mlir | 86eb493a443ffceada475e33dcd648628b16a808 | [
"Apache-2.0"
] | 1 | 2022-03-07T12:29:58.000Z | 2022-03-07T12:29:58.000Z | # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# Also available under a BSD-style license. See LICENSE.
import warnings
import torch
from torch.utils._pytree import tre... | 36.723214 | 132 | 0.625577 |
1adce2048b27813cb20c0d4f95ce3b08350bc956 | 3,614 | py | Python | tensorflow/contrib/eager/python/tfe_test.py | priyanshu-max/tensorflow | 5e97d96c809232a716d6b04ec9b128ebaf1b73f7 | [
"Apache-2.0"
] | 3 | 2017-10-27T05:37:59.000Z | 2018-05-25T02:46:40.000Z | tensorflow/contrib/eager/python/tfe_test.py | priyanshu-max/tensorflow | 5e97d96c809232a716d6b04ec9b128ebaf1b73f7 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/eager/python/tfe_test.py | priyanshu-max/tensorflow | 5e97d96c809232a716d6b04ec9b128ebaf1b73f7 | [
"Apache-2.0"
] | 2 | 2018-09-24T10:57:31.000Z | 2018-10-26T03:03:53.000Z | # Copyright 2017 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... | 33.155963 | 80 | 0.684283 |
9346377d0bdae552639bae8cb3b52ca0b2effa50 | 66,526 | py | Python | tensorflow/python/keras/callbacks_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 7 | 2018-04-12T07:48:57.000Z | 2021-12-03T12:35:02.000Z | tensorflow/python/keras/callbacks_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 6 | 2022-01-15T07:17:47.000Z | 2022-02-14T15:28:22.000Z | tensorflow/python/keras/callbacks_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 2 | 2018-04-06T14:28:15.000Z | 2018-11-30T03:53:55.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... | 34.309438 | 80 | 0.646529 |
cd7645219b1b846450894e90a50a6d38a267615f | 57 | py | Python | mikaponics/task/filters/__init__.py | mikaponics/mikaponics-back | 98e1ff8bab7dda3492e5ff637bf5aafd111c840c | [
"BSD-3-Clause"
] | 2 | 2019-04-30T23:51:41.000Z | 2019-05-04T00:35:52.000Z | mikaponics/task/filters/__init__.py | mikaponics/mikaponics-back | 98e1ff8bab7dda3492e5ff637bf5aafd111c840c | [
"BSD-3-Clause"
] | 27 | 2019-04-30T20:22:28.000Z | 2022-02-10T08:10:32.000Z | mikaponics/task/filters/__init__.py | mikaponics/mikaponics-back | 98e1ff8bab7dda3492e5ff637bf5aafd111c840c | [
"BSD-3-Clause"
] | null | null | null | from task.filters.task_item_filter import TaskItemFilter
| 28.5 | 56 | 0.894737 |
9fe6d221551805b6aba8278921e2231ca331d825 | 9,624 | py | Python | bop_toolkit/scripts/eval_bop19.py | shbe-aau/multi-view-pose-estimation | 22cea6cd09684fe655fb2214bc14856f589048e1 | [
"MIT"
] | 2 | 2020-04-27T11:28:06.000Z | 2020-05-16T18:37:40.000Z | bop_toolkit/scripts/eval_bop19.py | shbe-aau/multi-view-pose-estimation | 22cea6cd09684fe655fb2214bc14856f589048e1 | [
"MIT"
] | null | null | null | bop_toolkit/scripts/eval_bop19.py | shbe-aau/multi-view-pose-estimation | 22cea6cd09684fe655fb2214bc14856f589048e1 | [
"MIT"
] | null | null | null | # Author: Tomas Hodan (hodantom@cmp.felk.cvut.cz)
# Center for Machine Perception, Czech Technical University in Prague
"""Evaluation script for the BOP Challenge 2019/2020."""
import os
import time
import argparse
import subprocess
import numpy as np
from bop_toolkit_lib import config
from bop_toolkit_lib import in... | 36.180451 | 124 | 0.628221 |
c183023f61b1f05fd90932fc2a38d1f9cee4097a | 584 | py | Python | tumblr_scraper/__init__.py | giosali/tumblr-scraper | bfa91ba4576e3bc742f21b7be6807f712b4c2fd1 | [
"MIT"
] | 1 | 2022-01-15T10:50:53.000Z | 2022-01-15T10:50:53.000Z | tumblr_scraper/__init__.py | giosali/tumblr-scraper | bfa91ba4576e3bc742f21b7be6807f712b4c2fd1 | [
"MIT"
] | null | null | null | tumblr_scraper/__init__.py | giosali/tumblr-scraper | bfa91ba4576e3bc742f21b7be6807f712b4c2fd1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# _
# _/_ / //
# / , , _ _ _ / // _ ( _, _ __, ,_ _ _
# (__(_/_/ / / /_/_)(/_/ (_---/_)_(__/ (_(_/(__/|_)_(/_/ (_
# /|
# (/
"""
tumblr-scraper
~~~~~~~~... | 29.2 | 73 | 0.462329 |
6567e697eda68ad77e2dad94cb7cb361057064de | 4,701 | py | Python | mp/eval/evaluate.py | MECLabTUDA/OOD-Gen | f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e | [
"MIT"
] | null | null | null | mp/eval/evaluate.py | MECLabTUDA/OOD-Gen | f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e | [
"MIT"
] | null | null | null | mp/eval/evaluate.py | MECLabTUDA/OOD-Gen | f85ea9106ae1425f18e34c9d82fa3ca4925d8d9e | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Functions to calculate metrics and losses for subject dataloaders and datasets.
# The differences lie in that dataloaders may transform (e.g. resize) the
# targets in a way that affects the result.
# -----------------------------------... | 42.351351 | 82 | 0.639226 |
95f0db267734f743e7ac4f286cb84b72a4cf0c47 | 906 | py | Python | scripts/fundamentals/list_comprehension.py | duttashi/learnpy | c08b76b173b06d66187e51a6939d55d5dd12cb5a | [
"MIT"
] | null | null | null | scripts/fundamentals/list_comprehension.py | duttashi/learnpy | c08b76b173b06d66187e51a6939d55d5dd12cb5a | [
"MIT"
] | 77 | 2019-04-20T06:54:19.000Z | 2022-01-16T08:15:20.000Z | scripts/fundamentals/list_comprehension.py | duttashi/learnpy | c08b76b173b06d66187e51a6939d55d5dd12cb5a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 14 17:12:03 2020
List comprehension
@author: Ashish
"""
numbers = [1, 3, 5]
squares = [x * 2 for x in numbers]
# -- Dealing with strings --
friends = ["Rolf", "Sam", "Samantha", "Saurabh", "Jen"]
starts_s = []
for friend in friends:
if friend.star... | 23.230769 | 85 | 0.63245 |
7f5f32c154fe6d976c43b7dd0ead68234a49816f | 17,112 | py | Python | uuv_simulator/uuv_world_plugins/uuv_nc_parser/scripts/connect_ocean_data.py | laughlinbarker/underice_ekf | d74a83b2d02cef986fc904cf588a408382d728a6 | [
"BSD-2-Clause"
] | null | null | null | uuv_simulator/uuv_world_plugins/uuv_nc_parser/scripts/connect_ocean_data.py | laughlinbarker/underice_ekf | d74a83b2d02cef986fc904cf588a408382d728a6 | [
"BSD-2-Clause"
] | null | null | null | uuv_simulator/uuv_world_plugins/uuv_nc_parser/scripts/connect_ocean_data.py | laughlinbarker/underice_ekf | d74a83b2d02cef986fc904cf588a408382d728a6 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2016 The UUV Simulator 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... | 40.453901 | 138 | 0.541316 |
3d1cd72766d275cab484315ae40f22625bd864e3 | 3,048 | py | Python | SCRAPERS/YFSpider/YFSpider/settings.py | tgtads/yahooFinanceEventStudy | 46d8f64a302178328622c14a538686342d4012bc | [
"MIT"
] | null | null | null | SCRAPERS/YFSpider/YFSpider/settings.py | tgtads/yahooFinanceEventStudy | 46d8f64a302178328622c14a538686342d4012bc | [
"MIT"
] | null | null | null | SCRAPERS/YFSpider/YFSpider/settings.py | tgtads/yahooFinanceEventStudy | 46d8f64a302178328622c14a538686342d4012bc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Scrapy settings for YFSpider project
#
# For simplicity, this file contains only settings considered important or
# commonly used. You can find more settings consulting the documentation:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
# http://scrapy.readthedocs.org/en/lates... | 34.247191 | 109 | 0.783136 |
1b751c2214d7cb3ceda7d11fb5a9b61abafade8f | 5,886 | py | Python | examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-multi-host.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 3,787 | 2019-08-30T04:55:10.000Z | 2022-03-31T23:30:07.000Z | examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-multi-host.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,439 | 2019-08-29T16:35:52.000Z | 2022-03-31T11:55:31.000Z | examples/pipeline/hetero_sbt/pipeline-hetero-sbt-regression-multi-host.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 1,179 | 2019-08-29T16:18:32.000Z | 2022-03-31T12:55:38.000Z | #
# Copyright 2019 The FATE 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 appli... | 48.644628 | 123 | 0.698097 |
11d964943942a907dfddfc40812d1f47c1cd057e | 5,428 | py | Python | tests/test_trainer/test_pipeline/model/resnet.py | RichardoLuo/ColossalAI | 797a9dc5a9e801d7499b8667c3ef039a38aa15ba | [
"Apache-2.0"
] | 1,630 | 2021-10-30T01:00:27.000Z | 2022-03-31T23:02:41.000Z | tests/test_trainer/test_pipeline/model/resnet.py | RichardoLuo/ColossalAI | 797a9dc5a9e801d7499b8667c3ef039a38aa15ba | [
"Apache-2.0"
] | 166 | 2021-10-30T01:03:01.000Z | 2022-03-31T14:19:07.000Z | tests/test_trainer/test_pipeline/model/resnet.py | RichardoLuo/ColossalAI | 797a9dc5a9e801d7499b8667c3ef039a38aa15ba | [
"Apache-2.0"
] | 253 | 2021-10-30T06:10:29.000Z | 2022-03-31T13:30:06.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from typing import List, Optional
import torch
import torch.nn as nn
from torch import Tensor
from colossalai.registry import LAYERS
from colossalai.registry import MODELS
from colossalai.nn.model import ModelFromConfig
@MODELS.register_module
class VanillaResNet(Mod... | 33.097561 | 106 | 0.511606 |
3aa5764d9d841dc42d19b58f35d730dbfc9460ee | 1,455 | py | Python | functional_test/live_tests/orders_test.py | ikr0m/scala-pet-store | 82e90c788e8daf14348b4cf56d6b3840ee8bda80 | [
"Apache-2.0"
] | 997 | 2017-05-22T06:21:17.000Z | 2022-03-29T20:36:23.000Z | functional_test/live_tests/orders_test.py | ikr0m/scala-pet-store | 82e90c788e8daf14348b4cf56d6b3840ee8bda80 | [
"Apache-2.0"
] | 222 | 2017-07-12T17:05:28.000Z | 2022-03-28T14:36:48.000Z | functional_test/live_tests/orders_test.py | ikr0m/scala-pet-store | 82e90c788e8daf14348b4cf56d6b3840ee8bda80 | [
"Apache-2.0"
] | 227 | 2017-08-04T03:31:07.000Z | 2022-03-29T20:37:22.000Z | import pytest
from hamcrest import assert_that, is_, none, not_none
from pet_store_client import PetStoreClient
def test_place_order(pet_context, customer_context, pet_store_client):
order = {
"petId": pet_context['id'],
"status": "Placed",
"complete": False
}
response = pet_store_... | 28.529412 | 86 | 0.679038 |
e4024d9760dd5ad661b916bccd11ca4eb9eb5ce6 | 12,904 | py | Python | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 2 | 2019-08-23T21:14:00.000Z | 2021-09-07T18:32:34.000Z | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/operations/_server_security_alert_policies_operations.py | ankitarorabit/azure-sdk-for-python | dd90281cbad9400f8080754a5ef2f56791a5a88f | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # 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 ... | 52.455285 | 236 | 0.686376 |
f323c9e7bccb6a07d971e30e8bb403b80c1564b5 | 809 | py | Python | h1watch.py | zadewg/VARIOUS | 3ab6df37b95c6e98ccbee1912d7497cd4aca7e98 | [
"MIT"
] | 3 | 2019-04-18T10:31:34.000Z | 2022-03-26T03:09:29.000Z | h1watch.py | zadewg/VARIOUS | 3ab6df37b95c6e98ccbee1912d7497cd4aca7e98 | [
"MIT"
] | null | null | null | h1watch.py | zadewg/VARIOUS | 3ab6df37b95c6e98ccbee1912d7497cd4aca7e98 | [
"MIT"
] | 1 | 2018-09-15T09:59:10.000Z | 2018-09-15T09:59:10.000Z |
import urllib, json, io
#baseurl = 'https://hackerone.com/programs/search?query=type:hackerone&sort=published_at:descending&page={}'
baseurl = "https://hackerone.com/directory?query=type%3Ahackerone&sort=published_at%3Adescending&page={}"
paths, scope = [], []
i = 1
while True:
r = urllib.urlopen(baseurl.format(i)... | 26.966667 | 109 | 0.669963 |
0a84f5d557e36b93d97e364a599cfdeb6be77e7e | 483 | py | Python | blog_api/migrations/0002_alter_posts_tags.py | islam-kamel/cookie_blog | c285e51f32d3f29dae74d59720c620f7f4007de3 | [
"MIT"
] | null | null | null | blog_api/migrations/0002_alter_posts_tags.py | islam-kamel/cookie_blog | c285e51f32d3f29dae74d59720c620f7f4007de3 | [
"MIT"
] | null | null | null | blog_api/migrations/0002_alter_posts_tags.py | islam-kamel/cookie_blog | c285e51f32d3f29dae74d59720c620f7f4007de3 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-11 06:19
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('blog_api', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='posts',
... | 24.15 | 127 | 0.637681 |
77fc993e8202f9afcd76db7fd3eb166c34402dc7 | 1,937 | py | Python | tests/unit/test_tensor_tf2.py | triton-inference-server/model_navigator | ec2915f4f5a6b9ed7e1b59290899e2b56b98bcc7 | [
"ECL-2.0",
"Apache-2.0"
] | 49 | 2021-04-09T18:32:07.000Z | 2022-03-29T07:32:24.000Z | tests/unit/test_tensor_tf2.py | triton-inference-server/model_navigator | ec2915f4f5a6b9ed7e1b59290899e2b56b98bcc7 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2021-07-13T09:00:12.000Z | 2021-11-15T17:16:35.000Z | tests/unit/test_tensor_tf2.py | triton-inference-server/model_navigator | ec2915f4f5a6b9ed7e1b59290899e2b56b98bcc7 | [
"ECL-2.0",
"Apache-2.0"
] | 7 | 2021-04-09T18:31:56.000Z | 2022-03-01T08:08:04.000Z | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | 31.241935 | 74 | 0.660816 |
381dc442d0c8cbcd7fa7de8fcf3d4a59de313acb | 138,918 | py | Python | sdk/python/pulumi_azure_native/datamigration/v20180419/_inputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/datamigration/v20180419/_inputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/datamigration/v20180419/_inputs.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 41.554891 | 395 | 0.681172 |
9d86431ab563cff83673d49c61b10f18b9125389 | 250 | py | Python | clients/keto/python/ory_keto_client/api/__init__.py | mojotalantikite/sdk | 00fc86e98570e88911cfc66ce76637f8f1ac9dbe | [
"Apache-2.0"
] | null | null | null | clients/keto/python/ory_keto_client/api/__init__.py | mojotalantikite/sdk | 00fc86e98570e88911cfc66ce76637f8f1ac9dbe | [
"Apache-2.0"
] | null | null | null | clients/keto/python/ory_keto_client/api/__init__.py | mojotalantikite/sdk | 00fc86e98570e88911cfc66ce76637f8f1ac9dbe | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from ory_keto_client.api.engines_api import EnginesApi
from ory_keto_client.api.health_api import HealthApi
from ory_keto_client.api.version_api import VersionApi
| 27.777778 | 54 | 0.856 |
4ac9fa743eb5135d43262ae894f9753cf0960711 | 787 | py | Python | tests/plantcv/test_image_fusion.py | ygarrot/plantcv | e934a891e0d1bf8987ca6a9f982a4ac1f420bfe7 | [
"MIT"
] | 1 | 2022-02-03T12:08:59.000Z | 2022-02-03T12:08:59.000Z | tests/plantcv/test_image_fusion.py | HUISTENCOFFEE/plantcv | f38f7de53663522eb770870b70823d5fc46d0c0f | [
"MIT"
] | null | null | null | tests/plantcv/test_image_fusion.py | HUISTENCOFFEE/plantcv | f38f7de53663522eb770870b70823d5fc46d0c0f | [
"MIT"
] | null | null | null | import pytest
import cv2
import numpy as np
from skimage import img_as_ubyte
from plantcv.plantcv import image_fusion, Spectral_data
def test_image_fusion(test_data):
"""Test for PlantCV."""
# Read in test data
# 16-bit image
img1 = cv2.imread(test_data.fmax, -1)
img2 = cv2.imread(test_data.fmin)
... | 29.148148 | 82 | 0.681067 |
494f50174b6ec4e2ba418a6b603b0ffe37032e89 | 5,698 | py | Python | bin/select-lines.py | nrc-cnrc/PortageTextProcessing | 08db31a0c02a99024cc9019be959ae25945eb4ae | [
"MIT"
] | null | null | null | bin/select-lines.py | nrc-cnrc/PortageTextProcessing | 08db31a0c02a99024cc9019be959ae25945eb4ae | [
"MIT"
] | 1 | 2022-01-13T21:46:45.000Z | 2022-01-13T22:01:49.000Z | bin/select-lines.py | nrc-cnrc/PortageTextProcessing | 08db31a0c02a99024cc9019be959ae25945eb4ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# coding=utf-8
# @file select-lines.py
# @brief Select a set of lines by index from a file.
#
# @author Darlene Stewart
#
# Traitement multilingue de textes / Multilingual Text Processing
# Centre de recherche en technologies numériques / Digital Technologies Research Centre
# Conseil national d... | 34.325301 | 109 | 0.649702 |
73db102f283c0a1bebd140f5658651290ffd47bc | 1,223 | py | Python | setup.py | chaos-dremel/autobuild | 90499aeeb2d322b0901d617c3784a10f7f1b47e9 | [
"MIT"
] | null | null | null | setup.py | chaos-dremel/autobuild | 90499aeeb2d322b0901d617c3784a10f7f1b47e9 | [
"MIT"
] | null | null | null | setup.py | chaos-dremel/autobuild | 90499aeeb2d322b0901d617c3784a10f7f1b47e9 | [
"MIT"
] | 1 | 2020-01-13T21:40:44.000Z | 2020-01-13T21:40:44.000Z | import os
from setuptools import setup, Extension
from agibuild.settings import VERSION
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def re... | 28.44186 | 79 | 0.615699 |
0c08e084992d15af059e133030abd016d6cafe2c | 1,398 | py | Python | opportune/models/accounts.py | Mildly-Sketchy/Mildly-Sketchy | d215d5c478bfbdac0056ed0144edfe8c9efa557f | [
"MIT"
] | null | null | null | opportune/models/accounts.py | Mildly-Sketchy/Mildly-Sketchy | d215d5c478bfbdac0056ed0144edfe8c9efa557f | [
"MIT"
] | 2 | 2019-12-26T16:41:26.000Z | 2020-01-06T18:52:13.000Z | opportune/models/accounts.py | Mildly-Sketchy/Mildly-Sketchy | d215d5c478bfbdac0056ed0144edfe8c9efa557f | [
"MIT"
] | 1 | 2018-06-13T18:16:45.000Z | 2018-06-13T18:16:45.000Z | from .meta import Base
from sqlalchemy.exc import DBAPIError
from cryptacular import bcrypt
from sqlalchemy.orm import relationship
from sqlalchemy import (
Column,
Integer,
String,
Boolean,
)
manager = bcrypt.BCRYPTPasswordManager()
class Account(Base):
__tablename__ = 'accounts'
id = Column... | 28.530612 | 91 | 0.669528 |
52cb466d000ba2ada5b9df18700fed472b601c13 | 1,470 | py | Python | contrib/devtools/fix-copyright-headers.py | CoinWarden/Mrcoin | 1c9f336f34342bca0d4530d214eb71c7dbdcf682 | [
"MIT"
] | null | null | null | contrib/devtools/fix-copyright-headers.py | CoinWarden/Mrcoin | 1c9f336f34342bca0d4530d214eb71c7dbdcf682 | [
"MIT"
] | null | null | null | contrib/devtools/fix-copyright-headers.py | CoinWarden/Mrcoin | 1c9f336f34342bca0d4530d214eb71c7dbdcf682 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Run this script inside of src/ and it will look for all the files
that were changed this year that still have the last year in the
copyright headers, and it will fix the headers on that file using
a perl regex one liner.
For example: if it finds something like this and we're in 2014
// Copyr... | 27.222222 | 81 | 0.692517 |
b4770408ad5bcb425356c1235bead29f39584e12 | 183 | py | Python | 07-17/character-count.py | bronsonavila/automate-boring-stuff-python-notes | 4de654f4da0db8a12a4abb3c7856b57b454b7b58 | [
"Unlicense"
] | 37 | 2019-01-07T12:07:38.000Z | 2022-03-18T08:59:56.000Z | 07-17/character-count.py | bronsonavila/automate-boring-stuff-python-notes | 4de654f4da0db8a12a4abb3c7856b57b454b7b58 | [
"Unlicense"
] | null | null | null | 07-17/character-count.py | bronsonavila/automate-boring-stuff-python-notes | 4de654f4da0db8a12a4abb3c7856b57b454b7b58 | [
"Unlicense"
] | 33 | 2019-06-10T07:00:02.000Z | 2022-02-14T13:14:31.000Z | import pprint
message = 'All cows eat grass'
count = {}
for character in message:
count.setdefault(character.lower(), 0)
count[character.lower()] += 1
pprint.pprint(count) | 16.636364 | 42 | 0.693989 |
cbc723d6e21dd8292a33f71a7899ded245fb5be8 | 1,927 | py | Python | csm2txt.py | ssb22/wm6-utils | f50a7ab9d8af0ec66d8c0ef0a1940a0f0aa47110 | [
"Unlicense"
] | null | null | null | csm2txt.py | ssb22/wm6-utils | f50a7ab9d8af0ec66d8c0ef0a1940a0f0aa47110 | [
"Unlicense"
] | null | null | null | csm2txt.py | ssb22/wm6-utils | f50a7ab9d8af0ec66d8c0ef0a1940a0f0aa47110 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python2
# .csm (PIMBackup Messages dump) to .txt
# v1.1 Silas S. Brown 2018-2019
# public domain - no warranty
# Where to find history:
# on GitHub at https://github.com/ssb22/wm6-utils
# and on GitLab at https://gitlab.com/ssb22/wm6-utils
# and on BitBucket https://bitbucket.org/ssb22/wm6-utils
# and ... | 30.587302 | 151 | 0.565127 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.