hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
912e8bd619db8b35a54853c0752382479567fd04 | 30,680 | py | Python | tensorflow/python/keras/layers/pooling.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/keras/layers/pooling.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/keras/layers/pooling.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.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... | 37.460317 | 80 | 0.66294 |
912ee4a32132720095f1cf869c23b95bbead32d1 | 699 | py | Python | sample/network.py | yukota/elpod | eb1733eb956f6803f99a9e20f7d213ca1e9bcd8a | [
"MIT"
] | null | null | null | sample/network.py | yukota/elpod | eb1733eb956f6803f99a9e20f7d213ca1e9bcd8a | [
"MIT"
] | null | null | null | sample/network.py | yukota/elpod | eb1733eb956f6803f99a9e20f7d213ca1e9bcd8a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import networkx
import matplotlib.pyplot as plt
if __name__ == '__main__':
print("start")
graph = networkx.DiGraph()
node = set(["a", "b", "c", "d", "e"])
print(node)
graph.add_nodes_from(node)
edge_weight = [("a", "b", 1), ("b", "d", 3), ("a", "c", 1), ("c", "e", 1), (... | 25.888889 | 93 | 0.579399 |
912ef7690fa9aaa39758acd978e759bb4c21f7ba | 106 | py | Python | config.py | Digital-Twin-Operational-Platform/Cristallo | 20e21f6ae0f0f99002a229c8c966fd72020698c3 | [
"BSD-3-Clause"
] | 6 | 2021-07-14T08:43:20.000Z | 2022-02-02T19:40:26.000Z | config.py | Digital-Twin-Operational-Platform/Cristallo | 20e21f6ae0f0f99002a229c8c966fd72020698c3 | [
"BSD-3-Clause"
] | null | null | null | config.py | Digital-Twin-Operational-Platform/Cristallo | 20e21f6ae0f0f99002a229c8c966fd72020698c3 | [
"BSD-3-Clause"
] | 2 | 2021-07-05T08:08:43.000Z | 2022-03-28T09:46:02.000Z | import os
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess' | 26.5 | 73 | 0.716981 |
912ef7c8bc73a1de7e9203bef55c450a65ecb264 | 4,064 | py | Python | alipay/aop/api/request/AlipayBossFncGfsettleprodInvoicerelateCreateRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayBossFncGfsettleprodInvoicerelateCreateRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayBossFncGfsettleprodInvoicerelateCreateRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayBossFncGfsettleprodInvoicerelateCreateModel import AlipayBossFncGfsettleprodInvoicerelateCreateModel
class AlipayBossFncGfsett... | 28.027586 | 148 | 0.652559 |
912efbfc52ee65502abcc913a7112290155b8d49 | 6,676 | py | Python | parlai/agents/drqa/utils.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 17 | 2020-03-27T17:25:52.000Z | 2021-11-19T03:46:25.000Z | parlai/agents/drqa/utils.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-11-01T10:12:52.000Z | 2021-12-10T09:06:44.000Z | parlai/agents/drqa/utils.py | hengyicai/Adaptive_Multi-curricula_Learning_for_Dialog | e2d2c613ac4075ce023d6b4acb0a5eddac4e7837 | [
"MIT"
] | 3 | 2020-05-04T04:37:42.000Z | 2021-07-19T11:09:37.000Z | #!/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 torch
import unicodedata
from collections import Counter
from parlai.core.build_data import modelzoo_path
# ---... | 34.412371 | 80 | 0.560965 |
912f06ca64194bb0554b99690bcd313f058775de | 5,247 | py | Python | intropyproject-classify-pet-images/classify_images.py | MartynaKosciukiewicz/pet_image_classifier | 4ab776d0b5a7301a11784fae83b978c1d744c5e2 | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/classify_images.py | MartynaKosciukiewicz/pet_image_classifier | 4ab776d0b5a7301a11784fae83b978c1d744c5e2 | [
"MIT"
] | null | null | null | intropyproject-classify-pet-images/classify_images.py | MartynaKosciukiewicz/pet_image_classifier | 4ab776d0b5a7301a11784fae83b978c1d744c5e2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/classify_images.py
#
# PROGRAMMER: Martyna Kosciukiewicz
# DATE CREATED: 1/03/2021
# REVISED DATE: 4/03/2021
... | 50.451923 | 91 | 0.676768 |
912f77c439cc7c2f811fe0d78a2e7ae506b5d122 | 26,034 | py | Python | logdag/showdag.py | cpflat/logdag | 0b9ac0f803a0005ff930fb77663f921e000719b0 | [
"BSD-3-Clause"
] | 6 | 2019-04-04T07:09:56.000Z | 2020-03-03T20:42:43.000Z | logdag/showdag.py | cpflat/logdag | 0b9ac0f803a0005ff930fb77663f921e000719b0 | [
"BSD-3-Clause"
] | 1 | 2021-05-11T01:12:56.000Z | 2021-05-11T01:12:56.000Z | logdag/showdag.py | amulog/logdag | 0b9ac0f803a0005ff930fb77663f921e000719b0 | [
"BSD-3-Clause"
] | 2 | 2021-08-24T11:42:15.000Z | 2021-09-09T02:21:34.000Z | import pickle
import networkx as nx
from collections import defaultdict
from amulog import common
from . import arguments
from . import log2event
KEY_WEIGHT = "weight"
# fmt_int = lambda x: "{:,d}".format(x)
# fmt_ratio = lambda x: "{:.1f}".format(x)
# fmt_int_ratio = lambda x, y: "{:,d}({:.1f}%)".format(x, y)
cla... | 33.548969 | 83 | 0.563724 |
912f8264bd493bd45d63437a5534dac4c7a22efd | 11,579 | py | Python | egs/word_embedding/steps/tfrnnlm/rnnlm_base.py | charlesliucn/LanMIT | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | 17 | 2019-07-08T08:34:50.000Z | 2021-11-19T13:39:29.000Z | egs/word_embedding/steps/tfrnnlm/rnnlm_base.py | charlesliucn/kaldi-lm | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | null | null | null | egs/word_embedding/steps/tfrnnlm/rnnlm_base.py | charlesliucn/kaldi-lm | 537dab22335a21285699776ce66d95cb14c3db52 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
# Copyright (C) 2017 Intellisist, Inc. (Author: Hainan Xu)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 34.876506 | 139 | 0.679074 |
912fd9ab209156c2db3bc0544ab93fa731ffe120 | 22 | py | Python | btd6_memory_info/generated/UnityEngine/Networking/networking.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Networking/networking.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Networking/networking.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class Networking: pass | 22 | 22 | 0.863636 |
912feb80b20f09270a93611d944e214d5cfc628e | 2,009 | py | Python | src/python/pants/backend/experimental/scala/register.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/experimental/scala/register.py | xyzst/pants | d6a357fe67ee7e8e1aefeae625e107f5609f1717 | [
"Apache-2.0"
] | 6 | 2022-01-25T15:49:26.000Z | 2022-02-09T11:21:13.000Z | src/python/pants/backend/experimental/scala/register.py | thejcannon/pants | 7c24f42cb78cc462b63698cef736eda7a85c40e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.backend.java.package import deploy_jar # TODO: Should move to the JVM package.
from pants.backend.java.target_types import DeployJarTarget # TODO: Should move to the JVM packag... | 32.934426 | 100 | 0.714783 |
912ffa961c164ca3657342b84859eec3bbff2be2 | 1,309 | py | Python | traffic_optimization/consumers/models/station.py | slangenbach/udacity-ds-nanodegree | 4401b5a977d38321fa5afe0ad15a2e6506c4f2f9 | [
"MIT"
] | 8 | 2020-03-07T23:39:43.000Z | 2021-01-20T00:00:09.000Z | traffic_optimization/consumers/models/station.py | slangenbach/udacity-ds-nanodegree | 4401b5a977d38321fa5afe0ad15a2e6506c4f2f9 | [
"MIT"
] | null | null | null | traffic_optimization/consumers/models/station.py | slangenbach/udacity-ds-nanodegree | 4401b5a977d38321fa5afe0ad15a2e6506c4f2f9 | [
"MIT"
] | 8 | 2020-03-31T12:57:54.000Z | 2020-10-12T15:06:49.000Z | """Contains functionality related to Stations"""
import logging
logger = logging.getLogger(__name__)
class Station:
"""Defines the Station Model"""
def __init__(self, station_id, station_name, order):
"""Creates a Station Model"""
self.station_id = station_id
self.station_name = sta... | 30.44186 | 86 | 0.623377 |
91300b3f9cfdaeff744412600d275cbaf89a17fa | 2,439 | py | Python | src/datasets_manipulation/dictionary.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 6 | 2020-04-17T17:37:24.000Z | 2021-12-04T03:03:46.000Z | src/datasets_manipulation/dictionary.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 62 | 2019-05-21T21:06:42.000Z | 2020-01-26T17:33:45.000Z | src/datasets_manipulation/dictionary.py | gabimelo/portuguese_wsc | b07308712e0e9b63fbb10b5b8a8a4be95fc1ed1c | [
"MIT"
] | 1 | 2019-07-22T10:19:38.000Z | 2019-07-22T10:19:38.000Z | import json
import pickle
from src.helpers import consts
class Dictionary(object):
def __init__(self):
self.word2idx = {'<unk>': 0}
self.word_count = {'<unk>': 0}
self.idx2word = ['<unk>']
def add_word(self, word):
if word not in self.word2idx:
self.idx2word.appen... | 35.347826 | 107 | 0.625666 |
913019f8d9c8e7289a3b8272f2e2803a56c0cc84 | 904 | py | Python | collegiate-explorer-admin/cc_admin/common/Neo4jConnectionPool.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 3 | 2021-05-24T23:06:40.000Z | 2021-11-08T10:32:42.000Z | collegiate-explorer-admin/cc_admin/common/Neo4jConnectionPool.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 4 | 2020-10-12T03:00:43.000Z | 2020-11-17T01:47:56.000Z | collegiate-explorer-admin/cc_admin/common/Neo4jConnectionPool.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 2 | 2021-03-01T15:30:26.000Z | 2022-01-13T21:30:20.000Z | __author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '10/20/2020 11:10 AM'
from neo4j import GraphDatabase
from django.conf import settings
db_configuration = settings.DATABASES['default']
class ConnectionPool:
def __init__(self, uri=None, user=None, pwd=None):
user = db_configuration['U... | 28.25 | 78 | 0.649336 |
91301f15ad87e133777371b346864ecf7b964f27 | 8,082 | py | Python | tensorflow/contrib/distributions/python/ops/bijectors/affine_linear_operator.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/contrib/distributions/python/ops/bijectors/affine_linear_operator.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/contrib/distributions/python/ops/bijectors/affine_linear_operator.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.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... | 36.570136 | 80 | 0.662089 |
9130317ee9b0dfce5968d9a8cb8c72bdd263b38f | 3,811 | py | Python | youtube_streaming.py | dalsgit/streaming | bac9e845c17f17a7588160cc33942e1e032394b9 | [
"MIT"
] | null | null | null | youtube_streaming.py | dalsgit/streaming | bac9e845c17f17a7588160cc33942e1e032394b9 | [
"MIT"
] | null | null | null | youtube_streaming.py | dalsgit/streaming | bac9e845c17f17a7588160cc33942e1e032394b9 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from apiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.oauth2.credentials import Credentials
import json, configparser, os
config = configparser.ConfigParser()
config.read(os.path.join(os.path.dirname(__file__), 'config.ini'))
api_key=config['youtube'... | 35.95283 | 145 | 0.71556 |
91304cdedf531f1eacdb4ad8a2745435bab13725 | 3,430 | py | Python | Chatbots/actions.py | LeoArruda/nuRobot | 058c6507eea956516f5fed9d6a0cfb4d2633f87c | [
"Apache-2.0"
] | 2 | 2018-07-17T18:22:07.000Z | 2020-02-15T16:18:20.000Z | Chatbots/actions.py | LeoArruda/nuRobot | 058c6507eea956516f5fed9d6a0cfb4d2633f87c | [
"Apache-2.0"
] | 1 | 2018-07-15T01:15:58.000Z | 2018-07-15T01:15:58.000Z | Chatbots/actions.py | LeoArruda/nuRobot | 058c6507eea956516f5fed9d6a0cfb4d2633f87c | [
"Apache-2.0"
] | 1 | 2020-02-13T05:29:35.000Z | 2020-02-13T05:29:35.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from rasa_core.actions.action import Action
from rasa_core.events import SlotSet
from rasa_core.events import AllSlotsReset
from rasa_core.events import Restarted
# from pymongo import MongoClient
# client = ... | 33.960396 | 172 | 0.63965 |
9130590110b136c7766f8501f8060d64b40a9771 | 2,694 | py | Python | tests/test_errors.py | acutesoftware/rawdata | 9218077a7086fe8a78a4dc508c80a9fae772de13 | [
"MIT"
] | 10 | 2015-06-04T13:05:56.000Z | 2020-01-22T23:58:10.000Z | tests/test_errors.py | acutesoftware/rawdata | 9218077a7086fe8a78a4dc508c80a9fae772de13 | [
"MIT"
] | 5 | 2015-06-17T03:57:12.000Z | 2016-06-09T13:37:35.000Z | tests/test_errors.py | acutesoftware/rawdata | 9218077a7086fe8a78a4dc508c80a9fae772de13 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# test_errors.py
import unittest
import os
import sys
root_fldr = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
test_fldr = os.path.dirname(__file__) + os.sep + 'test_results'
sys.path.insert(1, root_fldr + os.sep + 'rawdata')
import generate
import errors
class TestCreate(unitte... | 37.943662 | 89 | 0.627691 |
913061ef8d8d771528e7ec01b74383b52ccfc848 | 2,393 | py | Python | codes/projects/test_continuous_parameter/drivers_vaeiaf/scheduler_prediction_and_plotting_vaeiaf.py | hwangoh/uq-vae | 382548e6f6dd7f9d72feff0e0752beec871db348 | [
"MIT"
] | 2 | 2021-07-28T16:47:18.000Z | 2021-08-03T00:53:58.000Z | codes/projects/test_discrete_parameter/drivers_vaeiaf/scheduler_prediction_and_plotting_vaeiaf.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | null | null | null | codes/projects/test_discrete_parameter/drivers_vaeiaf/scheduler_prediction_and_plotting_vaeiaf.py | HwanGoh/uq-vae | 24a3d26987e2ec807d57601b14c68b22f3652a18 | [
"MIT"
] | 2 | 2021-09-29T08:31:46.000Z | 2021-11-07T10:26:45.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''Schedules hyperparameter scenarios and drives training
You will need to specify:
- In generate_scenarios_list() the set of hyperparameter scenarios you
wish to use
- In subprocess.Popen() whether the parameter-to-observable map is
modelled or learne... | 39.229508 | 91 | 0.53949 |
913066a6d355fd848037fb48f8c680db83bc0a2b | 1,210 | py | Python | sugaroid/__main__.py | vardaan-raj/sugaroid | d0476fb9c44a73fee2e0de45162f2b1ac86452aa | [
"MIT"
] | 4 | 2020-09-28T13:52:40.000Z | 2020-10-30T15:24:50.000Z | sugaroid/__main__.py | sreyasaju/sugaroid | d58e06fb664daa16fda1bf23cc73068efcd5634c | [
"MIT"
] | null | null | null | sugaroid/__main__.py | sreyasaju/sugaroid | d58e06fb664daa16fda1bf23cc73068efcd5634c | [
"MIT"
] | null | null | null | """
MIT License
Sugaroid Artificial Inteligence
Chatbot Core
Copyright (c) 2020-2021 Srevin Saju
Copyright (c) 2021 The Sugaroid Project
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 re... | 39.032258 | 78 | 0.801653 |
913067ebe4bffe0f2bd8bed627f3b5b1d69e4084 | 164 | py | Python | tests/donn/__init__.py | sharan-amutharasu/DONN | c14557e8ef57f3e1c1b73c1fa98cb6ba19a82904 | [
"MIT"
] | 3 | 2018-08-17T05:31:25.000Z | 2020-02-13T19:43:02.000Z | donn/__init__.py | sharan-amutharasu/DONN | c14557e8ef57f3e1c1b73c1fa98cb6ba19a82904 | [
"MIT"
] | 1 | 2018-11-19T06:16:50.000Z | 2018-11-19T06:17:53.000Z | donn/__init__.py | sharan-amutharasu/DONN | c14557e8ef57f3e1c1b73c1fa98cb6ba19a82904 | [
"MIT"
] | 2 | 2018-12-06T05:01:07.000Z | 2018-12-06T11:59:47.000Z | from . import main
from .main import Optimizer
from .main import predict
from .main import allowed_layers
from .base_model import run_base_model
from .main import * | 27.333333 | 38 | 0.817073 |
913072a28bdd1cb57d9e850c267ab729c5a8d527 | 22,165 | py | Python | ramp-database/ramp_database/tools/tests/test_submission.py | tomMoral/ramp-board | 9e3aa335a90701e2ae4c6295eb2b77f3555f54de | [
"BSD-3-Clause"
] | null | null | null | ramp-database/ramp_database/tools/tests/test_submission.py | tomMoral/ramp-board | 9e3aa335a90701e2ae4c6295eb2b77f3555f54de | [
"BSD-3-Clause"
] | null | null | null | ramp-database/ramp_database/tools/tests/test_submission.py | tomMoral/ramp-board | 9e3aa335a90701e2ae4c6295eb2b77f3555f54de | [
"BSD-3-Clause"
] | null | null | null | import datetime
import os
import shutil
import pytest
import numpy as np
from numpy.testing import assert_allclose
import pandas as pd
from pandas.testing import assert_frame_equal
from ramp_utils import read_config
from ramp_utils import generate_ramp_config
from ramp_utils.testing import database_config_template
f... | 43.546169 | 79 | 0.726416 |
91308c0f4d36e4ef12f20b889b1f816241baafd6 | 4,345 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/tests/test_frc_business_card_from_url_async.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import pytest
import functools
from devtools_testutils.aio import recorded_by_proxy_async
from devtools_testutils import set_custom_default_matcher
from ... | 49.375 | 130 | 0.713234 |
91309558f0c464bf09bd5be1cdf9e56e703d781d | 3,771 | py | Python | src/party_analysis/bar_related_plots.py | shelleyshuzhang/mon-iot-traffic-analysis | fb4cead55fed8163af5975ccf2ccea3c63b8c97a | [
"Apache-2.0"
] | 1 | 2020-10-18T07:56:47.000Z | 2020-10-18T07:56:47.000Z | src/party_analysis/bar_related_plots.py | shelleyshuzhang/mon-iot-traffic-analysis | fb4cead55fed8163af5975ccf2ccea3c63b8c97a | [
"Apache-2.0"
] | null | null | null | src/party_analysis/bar_related_plots.py | shelleyshuzhang/mon-iot-traffic-analysis | fb4cead55fed8163af5975ccf2ccea3c63b8c97a | [
"Apache-2.0"
] | null | null | null | import gc
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import numpy as np
import pandas as pd
from protocol_analysis import visualization_protocols as vis
def bar_h_plot(data: list, names: list, title, color_p,
fig_dpi, num_name, save_name):
if names.__len__() >= 20:
... | 33.972973 | 101 | 0.6131 |
9130b284e6a10e88cf42ab030f31ed972fa638df | 13,863 | py | Python | tests/test_io.py | pji/pjinoise | 3967d69fa57be1136cdeb8f4a5d187ee455fa783 | [
"MIT"
] | 1 | 2021-04-07T06:20:55.000Z | 2021-04-07T06:20:55.000Z | tests/test_io.py | pji/pjinoise | 3967d69fa57be1136cdeb8f4a5d187ee455fa783 | [
"MIT"
] | null | null | null | tests/test_io.py | pji/pjinoise | 3967d69fa57be1136cdeb8f4a5d187ee455fa783 | [
"MIT"
] | null | null | null | """
test_io
~~~~~~~
Unit tests for the pjinoise.io module.
"""
import argparse
import json
import unittest as ut
from unittest.mock import call, MagicMock, mock_open, patch, PropertyMock
from typing import Sequence
import cv2
import numpy as np
from pjinoise import io
from pjinoise import model as m
from pjinoise im... | 31.435374 | 73 | 0.484599 |
9130b3bdf660f080ffc8cfe5c55cc17855c3916a | 1,465 | py | Python | imagenet_training/utils.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | imagenet_training/utils.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | imagenet_training/utils.py | daniilgaltsev/ImageNet-Training | 9ca1d26cde07782398c7f366d5bf510c9e988236 | [
"MIT"
] | null | null | null | """Utility functions for imagenet_training module."""
import hashlib
from pathlib import Path
from typing import Union
from urllib.request import urlretrieve
from tqdm import tqdm
def compute_sha256(filename: Union[Path, str]) -> str:
"""Computes sha256 checksum of a file.
Args:
filename: path to t... | 31.847826 | 95 | 0.649147 |
9130c59838ca9f05494c451b3ac65479a741bec6 | 265 | py | Python | pyctcdecode/__init__.py | kensho-technologies/pyctcdecode | c33f94bce283ea9af79d30e2b815e3bf34a137c9 | [
"Apache-2.0"
] | 203 | 2021-06-08T22:49:56.000Z | 2022-03-31T11:55:21.000Z | pyctcdecode/__init__.py | kensho-technologies/pyctcdecode | c33f94bce283ea9af79d30e2b815e3bf34a137c9 | [
"Apache-2.0"
] | 40 | 2021-06-11T20:58:07.000Z | 2022-03-23T10:58:27.000Z | pyctcdecode/__init__.py | kensho-technologies/pyctcdecode | c33f94bce283ea9af79d30e2b815e3bf34a137c9 | [
"Apache-2.0"
] | 39 | 2021-06-09T21:03:35.000Z | 2022-03-26T13:14:23.000Z | # Copyright 2021-present Kensho Technologies, LLC.
from .alphabet import Alphabet # noqa
from .decoder import BeamSearchDecoderCTC, build_ctcdecoder # noqa
from .language_model import LanguageModel # noqa
__package_name__ = "pyctcdecode"
__version__ = "0.3.0"
| 29.444444 | 67 | 0.792453 |
9130d181ccbc24af96226817911dd4b458ba63dd | 17,684 | py | Python | binderhub/tests/test_repoproviders.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | binderhub/tests/test_repoproviders.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | binderhub/tests/test_repoproviders.py | jupyterhub/builderhub | 37551212e47f515186b62fa02443f50b6e7b5839 | [
"BSD-3-Clause"
] | null | null | null | from unittest import TestCase
from urllib.parse import quote
import pytest
from tornado.ioloop import IOLoop
from binderhub.repoproviders import (
DataverseProvider,
FigshareProvider,
GistRepoProvider,
GitHubRepoProvider,
GitLabRepoProvider,
GitRepoProvider,
HydroshareProvider,
ZenodoP... | 33.054206 | 111 | 0.656695 |
9130d427ec7b27dab6637cd5fe346955c217f20f | 1,126 | py | Python | third_party/a2c_ppo_acktr/__init__.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | 30 | 2021-06-16T23:28:58.000Z | 2022-03-23T17:20:58.000Z | third_party/a2c_ppo_acktr/__init__.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | 1 | 2021-06-25T09:21:29.000Z | 2021-08-11T23:14:14.000Z | third_party/a2c_ppo_acktr/__init__.py | googleinterns/gail-dyn | 31c93b12d068dede0dbe69547f0b2e500374f260 | [
"Apache-2.0"
] | 8 | 2021-06-19T12:51:50.000Z | 2021-12-23T08:31:10.000Z | # MIT License
#
# Copyright (c) 2017 Ilya Kostrikov
#
# 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... | 51.181818 | 81 | 0.76643 |
9130ea0b0d2d4f938c6d665c0296583e5250b85b | 3,081 | py | Python | lib/windows/SoftwareInfo.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | 2 | 2019-08-04T17:07:15.000Z | 2020-02-27T21:10:33.000Z | lib/windows/SoftwareInfo.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | null | null | null | lib/windows/SoftwareInfo.py | ashiscs/Cinfo | 7e8fa8ce19f323425fab6117e68ac2678b4e17dc | [
"MIT"
] | null | null | null | try:
import _winreg as reg
except:
import winreg as reg
class SoftwareInfo:
'''
className:SoftwareInfo
Description:Return the Installed Software name with version and publisher name
'''
def getVal(self,name,asubkey):
try:
return reg.QueryValueEx(asubkey, name)[0]
... | 35.825581 | 129 | 0.56605 |
9130ec2c007e562ff85da84b086dd5c872c4063d | 1,051 | py | Python | superset/sql_validators/__init__.py | rodrigoguariento/incubator-superset | b2633a51d43faaca74751349b96fc32784d4b377 | [
"Apache-2.0"
] | 30 | 2020-10-24T02:30:31.000Z | 2022-03-29T23:21:48.000Z | superset/sql_validators/__init__.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 339 | 2017-03-09T00:02:21.000Z | 2022-03-29T22:28:50.000Z | superset/sql_validators/__init__.py | Odirlei-Stein/incubator-superset | 52afc33b31475536b287b56d262b9eaa32f479ab | [
"Apache-2.0"
] | 9 | 2020-12-21T16:20:20.000Z | 2022-03-18T06:04:37.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... | 42.04 | 78 | 0.780209 |
91310cb507b7e86373cacb6ddc3713cfbe3dd0f0 | 7,121 | py | Python | dev/ideas/linear_state_update_with_codegen.py | achilleas-k/brian2 | 906563b6b1321585b082f79f74f1b4ab386347ec | [
"BSD-2-Clause"
] | 1 | 2019-12-25T16:33:37.000Z | 2019-12-25T16:33:37.000Z | dev/ideas/linear_state_update_with_codegen.py | divyashivaram/brian2 | ac086e478efa50be772c6cee55b52b43018bc77a | [
"BSD-2-Clause"
] | null | null | null | dev/ideas/linear_state_update_with_codegen.py | divyashivaram/brian2 | ac086e478efa50be772c6cee55b52b43018bc77a | [
"BSD-2-Clause"
] | null | null | null | from brian import *
from scipy import weave
import time
import numexpr
N = 10000
eqs = '''
dv/dt = (ge+gi-(v+49*mV))/(10*ms) : volt
dge/dt = -ge/(5*ms) : volt
dgi/dt = -gi/(10*ms) : volt
'''
P = NeuronGroup(N, eqs)
Scopy = P._S.copy()
run(20*ms)
B = P._state_updater.B
A = P._state_updater.A
C... | 25.341637 | 76 | 0.486729 |
913117b473bfce1badc650e733cf28bf39cec5ad | 7,790 | py | Python | dr/ppo/utils.py | jigangkim/domain_randomization | 07a309a9e824b5332219871abe8f0f657694b292 | [
"MIT"
] | 7 | 2019-06-09T13:03:18.000Z | 2022-02-19T08:50:51.000Z | dr/ppo/utils.py | jigangkim/domain_randomization | 07a309a9e824b5332219871abe8f0f657694b292 | [
"MIT"
] | 1 | 2019-07-12T23:59:46.000Z | 2021-11-21T04:09:09.000Z | dr/ppo/utils.py | jigangkim/domain_randomization | 07a309a9e824b5332219871abe8f0f657694b292 | [
"MIT"
] | 3 | 2020-05-01T13:18:25.000Z | 2021-03-30T11:52:33.000Z | import argparse
import os
import random
import gym
import numpy as np
import torch
def set_global_seeds(seed):
torch.manual_seed(seed)
np.random.seed(seed)
random.seed(seed)
if torch.cuda.is_available():
torch.cuda.manual_seed_all(seed)
def set_torch_num_threads():
try:
nt = in... | 33.869565 | 115 | 0.635687 |
9131290187ce440fa4870b5305a2081b3cb85d6d | 4,614 | py | Python | losses/general_adaptive_loss/cubic_spline.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 29 | 2020-07-04T00:04:28.000Z | 2022-03-18T01:49:34.000Z | idas/losses/general_adaptive_loss/cubic_spline.py | gvalvano/unet_crf_as_rnn | 31b79741b77614764dcf3d2690fe0b0fab44934d | [
"Apache-2.0"
] | 2 | 2020-10-31T14:41:02.000Z | 2021-11-21T18:16:19.000Z | losses/general_adaptive_loss/cubic_spline.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 7 | 2020-10-21T01:02:52.000Z | 2021-11-14T16:52:18.000Z | # coding=utf-8
# Copyright 2019 Gabriele Valvano
#
# 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 l... | 40.831858 | 79 | 0.692458 |
91312e2b78195be7d9d2a963aa3dc514634e0bfd | 4,637 | py | Python | p24.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | p24.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | p24.py | cemulate/python-challenge | 1c3b790d3a32cd51b3bc9ed4d1acc2760405f358 | [
"MIT"
] | null | null | null | from PIL import Image, ImageDraw
maze = Image.open("maze.png")
msolved = maze.copy()
mdraw = ImageDraw.Draw(msolved)
def enum(**enums):
return type('Enum', (), enums)
Direction = enum(UP=0, DOWN=1, LEFT=2, RIGHT=3)
dirNames = {Direction.UP:"Up",
Direction.DOWN:"Down",
Direction.RIGHT:"Right",
Direction.... | 26.803468 | 76 | 0.660772 |
913166a419e94cd49d0bfdd21fdad98d969bac52 | 1,883 | py | Python | apps/main.py | agmaengine/kbana | 65408358062848bf9a2e08f0c2a7b80d387bc753 | [
"MIT"
] | null | null | null | apps/main.py | agmaengine/kbana | 65408358062848bf9a2e08f0c2a7b80d387bc753 | [
"MIT"
] | null | null | null | apps/main.py | agmaengine/kbana | 65408358062848bf9a2e08f0c2a7b80d387bc753 | [
"MIT"
] | null | null | null |
try:
import kbana
except ModuleNotFoundError:
# import local module
import os
import sys
local_module_path = os.path.dirname(os.path.dirname(__file__))
sys.path.append(local_module_path)
import keyboard
from kbana.analysis import Analysis
from kbana.analysis import visualize_finger_load
from ... | 28.104478 | 92 | 0.667021 |
91317c2bc434634a203607f38ebd09f42bf5de6e | 1,837 | py | Python | tests/test_inherits_path_option.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | 1 | 2020-06-27T23:28:35.000Z | 2020-06-27T23:28:35.000Z | tests/test_inherits_path_option.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | null | null | null | tests/test_inherits_path_option.py | tdyas/pex | e2d6bab09f8e9245f608402a904421268223ee58 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
from contextlib import contextmanager
from pex.common import temporary_dir
from pex.pex_builder import PEXBuilder
from pex.testing import run_simple_pex
@contextmanager
def wr... | 38.270833 | 97 | 0.745781 |
9131853064684197176f17d3c1a8601dfb275479 | 1,573 | py | Python | tests/crud/test_base.py | STYLER-Inc/styler-rest-framework | edd2b6ab5f2989f8e0d688756e9e3839c652dd62 | [
"MIT"
] | 3 | 2020-08-31T06:29:15.000Z | 2021-09-08T09:24:52.000Z | tests/crud/test_base.py | STYLER-Inc/styler-rest-framework | edd2b6ab5f2989f8e0d688756e9e3839c652dd62 | [
"MIT"
] | 31 | 2020-08-20T01:27:05.000Z | 2022-02-10T07:17:21.000Z | tests/crud/test_base.py | STYLER-Inc/styler-rest-framework | edd2b6ab5f2989f8e0d688756e9e3839c652dd62 | [
"MIT"
] | null | null | null | from unittest.mock import Mock
from styler_rest_framework.crud.base import CRUDBase
class TestCRUDbase:
""" Test CRUD base
"""
def test_get(self):
""" It should call related function
"""
db = Mock()
model = Mock()
base = CRUDBase(model)
base.get(db, 'test_... | 21.547945 | 63 | 0.559441 |
9131a10021dfc28d3bd86b61d545acb6b8b24c51 | 4,139 | py | Python | test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_multiapi_service_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_multiapi_service_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/multiapi/Expected/AcceptanceTests/MultiapiCredentialDefaultPolicy/multiapicredentialdefaultpolicy/v3/_multiapi_service_client.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.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 ... | 42.234694 | 126 | 0.690505 |
9131ad1cfb641e885b5874ab8199bb0f3bbee06d | 19,783 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 46.658019 | 229 | 0.669666 |
9131b632eca7329bdbbfb9bcabecdf3b70ef9762 | 437 | py | Python | python/app.py | PWalis/Music-Segmenter | ad3017afd8c837a765ae8627524745743a81fd1d | [
"MIT"
] | null | null | null | python/app.py | PWalis/Music-Segmenter | ad3017afd8c837a765ae8627524745743a81fd1d | [
"MIT"
] | null | null | null | python/app.py | PWalis/Music-Segmenter | ad3017afd8c837a765ae8627524745743a81fd1d | [
"MIT"
] | null | null | null | from flask import Flask
from spotify_api import set_song_random, seek_back
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, world!'
@app.route('/random')
def random_song():
set_song_random()
return 'You are now listening to a random song from your saved list'
@app.route('/back/<se... | 24.277778 | 72 | 0.718535 |
9131e4a2e3f24671eb864e255e304b4e0ad12a13 | 18,533 | py | Python | blocks_v3_2.py | uci-iasl/SeReMAS | 0dc2ffee4b078a87efae831185d099b032539769 | [
"MIT"
] | 1 | 2021-12-03T21:58:47.000Z | 2021-12-03T21:58:47.000Z | blocks_v3_2.py | uci-iasl/SeReMAS | 0dc2ffee4b078a87efae831185d099b032539769 | [
"MIT"
] | null | null | null | blocks_v3_2.py | uci-iasl/SeReMAS | 0dc2ffee4b078a87efae831185d099b032539769 | [
"MIT"
] | 2 | 2021-07-31T13:52:44.000Z | 2021-09-07T02:21:47.000Z | import time
import cv2
from queue import LifoQueue as Queue
from queue import Empty
import data_types
import datetime
from threading import Thread
from inspect import getframeinfo, stack
from config_v3_2 import *
import socket
import pickle
import _thread
import net_p3
from blocks_detection import Model
import numpy as... | 37.899796 | 201 | 0.597906 |
91320af31be627f42de654779a69fd40864c3fc1 | 1,899 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/large_person_group.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/large_person_group.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/models/large_person_group.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 38.755102 | 99 | 0.629279 |
913235548ffc9515c504c6b847e63292ab1c96ea | 574 | py | Python | src/crl/remotescript/pathops.py | nokia/crl-remotescript | 63228f7c74f3e5367470da61c1f9a70a1233d99b | [
"BSD-3-Clause"
] | 3 | 2019-05-22T11:32:55.000Z | 2019-06-12T13:02:28.000Z | src/crl/remotescript/pathops.py | nokia/crl-remotescript | 63228f7c74f3e5367470da61c1f9a70a1233d99b | [
"BSD-3-Clause"
] | 10 | 2019-03-10T08:28:08.000Z | 2019-07-26T07:44:11.000Z | src/crl/remotescript/pathops.py | nokia/crl-remotescript | 63228f7c74f3e5367470da61c1f9a70a1233d99b | [
"BSD-3-Clause"
] | 7 | 2019-03-10T08:27:09.000Z | 2020-01-24T19:48:27.000Z | __copyright__ = 'Copyright (C) 2019, Nokia'
import sys
def append(path, extension):
path = path.rstrip('/')
extension = extension.rstrip('/')
return path + extension
def join(path1, path2):
path1 = path1.rstrip('/')
path2 = path2.rstrip('/')
return path1 + '/' + path2
def directorize(path... | 20.5 | 97 | 0.611498 |
9132523604f226d22e74f4ce44ea8dd36614fe58 | 2,492 | py | Python | test/test_perf.py | dbuhryk/NN_app01 | d44558e3b7b8295bb847e85572cf76237a9cb6c5 | [
"MIT"
] | null | null | null | test/test_perf.py | dbuhryk/NN_app01 | d44558e3b7b8295bb847e85572cf76237a9cb6c5 | [
"MIT"
] | null | null | null | test/test_perf.py | dbuhryk/NN_app01 | d44558e3b7b8295bb847e85572cf76237a9cb6c5 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Test suite for performance profiling and testing with isolated HTTP WEB Server in a standalone process
"""
from app01.app01_imp import app
from multiprocessing import Process
from time import sleep
import socket
import unittest
from urllib3 import HTTPConnectionPool
import os
import timeit
import lo... | 30.024096 | 120 | 0.614366 |
91328062ffff721011b943abc3df6b9cf2d8fcb5 | 4,561 | py | Python | devito/types/caching.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 2 | 2019-04-05T20:52:23.000Z | 2019-11-03T21:36:53.000Z | devito/types/caching.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 9 | 2019-06-11T20:54:19.000Z | 2020-04-06T17:56:10.000Z | devito/types/caching.py | BrunoMot/devito | b6e077857765b7b5fad812ec5774635ca4c6fbb7 | [
"MIT"
] | 2 | 2018-11-15T12:03:48.000Z | 2018-11-15T13:16:19.000Z | import gc
import weakref
import sympy
__all__ = ['Cached', '_SymbolCache', 'CacheManager']
_SymbolCache = {}
"""The symbol cache."""
class AugmentedWeakRef(weakref.ref):
def __new__(cls, obj, meta):
obj = super().__new__(cls, obj)
obj.nbytes = meta.get('nbytes', 0)
return obj
class C... | 28.685535 | 84 | 0.580794 |
913283ed52e48a9641512c5ae6174b20ad955336 | 2,846 | py | Python | tests/unit_test/test_csharp.py | Lufedi/reaper | bdf56b499e5b704c27b9f6c053d798c2a10fa4cf | [
"Apache-2.0"
] | 106 | 2015-07-21T16:18:26.000Z | 2022-03-31T06:45:34.000Z | tests/unit_test/test_csharp.py | Kowndinya2000/enhanced_repo_reaper | 744f794ba53bde5667b3b0f99b07273d0e32a495 | [
"Apache-2.0"
] | 21 | 2015-07-11T03:48:28.000Z | 2022-01-18T12:57:30.000Z | tests/unit_test/test_csharp.py | Kowndinya2000/enhanced_repo_reaper | 744f794ba53bde5667b3b0f99b07273d0e32a495 | [
"Apache-2.0"
] | 26 | 2015-07-22T22:38:21.000Z | 2022-03-14T10:11:56.000Z | import os
import unittest
from attributes.unit_test.discoverer import get_test_discoverer
from tests import get_lsloc, REPOS_PATH
class CSharpTestDiscovererTestCase(unittest.TestCase):
def setUp(self):
self.discoverer = get_test_discoverer('C#')
@unittest.skipIf(not os.path.exists(REPOS_PATH), 'setu... | 37.447368 | 75 | 0.655657 |
9132a380fa659516f3f4e6da01e2d8789812da33 | 774 | py | Python | tests/test_plots.py | rgreen1995/PTMCMCSampler | 3260a48bf34f78511381cf0c8aeaa8ec2ce81f10 | [
"MIT"
] | 1 | 2019-07-22T09:19:03.000Z | 2019-07-22T09:19:03.000Z | tests/test_plots.py | rgreen1995/PTMCMCSampler | 3260a48bf34f78511381cf0c8aeaa8ec2ce81f10 | [
"MIT"
] | 36 | 2019-07-04T14:31:37.000Z | 2019-07-30T09:29:32.000Z | tests/test_plots.py | rgreen1995/PTMCMCSampler | 3260a48bf34f78511381cf0c8aeaa8ec2ce81f10 | [
"MIT"
] | 2 | 2019-07-04T12:43:12.000Z | 2019-07-23T08:48:35.000Z | import pytest
import matplotlib
import numpy as np
from PTMCMCSampler import plots
def test_get_colors():
"""Test the `get_colors` function
"""
n = 10
colors = plots.get_colors(n)
assert len(colors) == n
def test_chain_plots():
"""Test that we can produce a chain plot
"""
samples = n... | 26.689655 | 80 | 0.689922 |
9132d602e467c752245fd62a2a63165ebb1c88fa | 4,464 | py | Python | src/bloombox/schema/commerce/Payment_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 4 | 2018-01-23T20:13:11.000Z | 2018-07-28T22:36:09.000Z | src/bloombox/schema/commerce/Payment_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 159 | 2018-02-02T09:55:52.000Z | 2021-07-21T23:41:59.000Z | src/bloombox/schema/commerce/Payment_pb2.py | Bloombox/Python | 1b125fbdf54efb390afe12aaa966f093218c4387 | [
"Apache-2.0"
] | 3 | 2018-01-23T20:13:15.000Z | 2020-01-17T01:07:53.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: commerce/Payment.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import mess... | 31.659574 | 677 | 0.731183 |
9132ed80f91cb1f55a6c9124047f063f2a796979 | 1,237 | py | Python | tartangan/trainers/components/metrics/katib.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | tartangan/trainers/components/metrics/katib.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | tartangan/trainers/components/metrics/katib.py | awentzonline/tartangan | 2d36a81fa0ae91fe6b9b4e1f26763285630837fb | [
"MIT"
] | null | null | null | import configparser
import os
import smart_open
from tartangan.utils.fs import maybe_makedirs
from tartangan.utils.kubeflow import key_to_kf_name
from .base import FileBasedMetricsComponent
class KatibMetricsComponent(FileBasedMetricsComponent):
"""Output metrics in a format suitable for Katib.
```
...e... | 28.113636 | 69 | 0.620049 |
91332216eebc79d602373f6f75e18b4a6f7283bd | 4,138 | py | Python | blueoil/templates/lmnet/object_detection.tpl.py | n-nez/blueoil | 8529940bf02a499e28e5a34a9745fb31412d357e | [
"Apache-2.0"
] | null | null | null | blueoil/templates/lmnet/object_detection.tpl.py | n-nez/blueoil | 8529940bf02a499e28e5a34a9745fb31412d357e | [
"Apache-2.0"
] | null | null | null | blueoil/templates/lmnet/object_detection.tpl.py | n-nez/blueoil | 8529940bf02a499e28e5a34a9745fb31412d357e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... | 32.077519 | 116 | 0.745046 |
9133801033c2e76d6402d7d3c907f16f6c33c42d | 133 | py | Python | homeassistant/components/__init__.py | Cribstone/home-assistant | 328b9a84c0169c8067f2aa8d07392519de8a5e35 | [
"MIT"
] | 1 | 2022-01-09T18:02:24.000Z | 2022-01-09T18:02:24.000Z | homeassistant/components/__init__.py | Cribstone/home-assistant | 328b9a84c0169c8067f2aa8d07392519de8a5e35 | [
"MIT"
] | null | null | null | homeassistant/components/__init__.py | Cribstone/home-assistant | 328b9a84c0169c8067f2aa8d07392519de8a5e35 | [
"MIT"
] | null | null | null | """
homeassistant.components
~~~~~~~~~~~~~~~~~~~~~~~~
This package contains components that can be plugged into Home Assistant.
"""
| 19 | 73 | 0.639098 |
9133a243de598625332ff509e578956f16871fc3 | 12,708 | py | Python | mvqag/experiments/abnormality/our_img_only_baseline.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/experiments/abnormality/our_img_only_baseline.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | mvqag/experiments/abnormality/our_img_only_baseline.py | VirkSaab/Medical-VQA | 6d77963cc81940fc680a18d931e0d88a3264f5fa | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torchvision as tv
import torchvision.transforms as T
import pandas as pd
from PIL import Image
from pathlib import Path
from mvqag import CNF_PATH
from mvqag.utils import load_yaml, get_recent_githash, load_qa_file
from mvqag.data import VQADataset, DataLoaders
from mvqag.model... | 35.104972 | 77 | 0.569484 |
9133e41b8eb58e6cdfbb7e40c0d4cdbffbcbff2d | 3,070 | py | Python | leetcode_python/Dynamic_Programming/target-sum.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 18 | 2019-08-01T07:45:02.000Z | 2022-03-31T18:05:44.000Z | leetcode_python/Dynamic_Programming/target-sum.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Dynamic_Programming/target-sum.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | 15 | 2019-12-29T08:46:20.000Z | 2022-03-08T14:14:05.000Z | # V0
# IDEA : DP
# IDEA :
# dp[0][0] = 1;
# dp[i + 1][x + nums[i]] += dp[i][x];
# dp[i + 1][x - nums[i]] += dp[i][x];
# ( dp[i][j] -> at index = i, # of the way can have sum = j )
class Solution:
def findTargetSumWays(self, nums, S):
"""
:type nums: List[int]
:type S: int
:rtype: i... | 26.465517 | 94 | 0.465147 |
9133eff2512f0fdfe283cd337568ef81ac8fd5ab | 5,268 | py | Python | src/z3c/form/browser/select.py | erral/z3c.form | 9d6d83c71d8b83752a0dde162ef358116a804564 | [
"ZPL-2.1"
] | 5 | 2015-09-02T15:03:34.000Z | 2018-05-09T04:12:36.000Z | src/z3c/form/browser/select.py | erral/z3c.form | 9d6d83c71d8b83752a0dde162ef358116a804564 | [
"ZPL-2.1"
] | 65 | 2015-02-20T12:19:15.000Z | 2022-03-22T08:14:09.000Z | src/z3c/form/browser/select.py | erral/z3c.form | 9d6d83c71d8b83752a0dde162ef358116a804564 | [
"ZPL-2.1"
] | 27 | 2015-02-17T19:32:14.000Z | 2020-07-21T05:42:03.000Z | ##############################################################################
#
# Copyright (c) 2007 Zope Foundation and Contributors.
# All Rights Reserved.
#
# 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 SOF... | 35.594595 | 88 | 0.636105 |
9133f4ebe4552672aa289ca8a875b8a7aeca24ee | 1,269 | py | Python | facebook_sublet_group_bot/fbxmpp.py | ritikforreal1/FB_Mod_Bot | 97b045db81fab91f7e0f4a46c7472ee6bcdcd7a7 | [
"MIT",
"Unlicense"
] | 33 | 2015-07-22T13:07:49.000Z | 2019-01-07T21:37:27.000Z | facebook_sublet_group_bot/fbxmpp.py | ritikforreal1/FB_Mod_Bot | 97b045db81fab91f7e0f4a46c7472ee6bcdcd7a7 | [
"MIT",
"Unlicense"
] | 2 | 2017-03-07T10:12:21.000Z | 2017-03-07T10:34:13.000Z | facebook_sublet_group_bot/fbxmpp.py | ritikforreal1/FB_Mod_Bot | 97b045db81fab91f7e0f4a46c7472ee6bcdcd7a7 | [
"MIT",
"Unlicense"
] | 18 | 2015-05-10T11:55:09.000Z | 2019-01-07T21:39:51.000Z | import sleekxmpp
import logging
logging.basicConfig(level=logging.FATAL)
# Based on what I learned here:
# http://goo.gl/oV5KtZ
# Slightly updated since some parts didn't work
class SendMsgBot(sleekxmpp.ClientXMPP):
"""
A basic SleekXMPP bot that will log in, send a message,
and then log out.
"""
... | 27.586957 | 74 | 0.635934 |
91345683d4a2c59c6c97c8015ae5760511ce2977 | 7,151 | py | Python | ogsolar/libs/wifi_watchdog.py | pjaos/rpi_ogsolar | 716756ffe25301bfb3f6b0727c83222d2d1e8de7 | [
"MIT"
] | null | null | null | ogsolar/libs/wifi_watchdog.py | pjaos/rpi_ogsolar | 716756ffe25301bfb3f6b0727c83222d2d1e8de7 | [
"MIT"
] | null | null | null | ogsolar/libs/wifi_watchdog.py | pjaos/rpi_ogsolar | 716756ffe25301bfb3f6b0727c83222d2d1e8de7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from optparse import OptionParser
from subprocess import call
from time import sleep
import sys
from p3lib.uio import UIO
from p3lib.pconfig import ConfigManager
class WiFiWatchDog(object):
"""@brief Responsible for maintaining WiFi connectivity."""
WIFI_SSID ... | 43.078313 | 359 | 0.613341 |
91345cc2f268eff1d901b48215e0cf58635bb1ce | 98,597 | py | Python | yggdrasil/communication/CommBase.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/communication/CommBase.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | yggdrasil/communication/CommBase.py | Xyzic/yggdrasil | 44369514ffdf01960bfcce418c172dc6dc564051 | [
"BSD-3-Clause"
] | null | null | null | import os
import copy
import uuid
import atexit
import logging
import types
import time
import collections
import numpy as np
from yggdrasil import tools, multitasking
from yggdrasil.tools import YGG_MSG_EOF
from yggdrasil.communication import (
new_comm, get_comm, determine_suffix, TemporaryCommunicationError,
... | 41.288526 | 89 | 0.57518 |
91346bf878db4fe8c7d02de8e8eaa36829f4ba62 | 66,150 | py | Python | atom/nucleus/python/nucleus_api/api/securities_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/api/securities_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/api/securities_api.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and pyt... | 42.622423 | 157 | 0.62715 |
91348f020d210870fdff9c73d90ee583da1e02e2 | 1,693 | py | Python | gb_promoters.py | lilymaryam/UC_Davis_iGEM | a3f8e6803cdd1e2424b3fe01364a93f08d41803d | [
"MIT"
] | null | null | null | gb_promoters.py | lilymaryam/UC_Davis_iGEM | a3f8e6803cdd1e2424b3fe01364a93f08d41803d | [
"MIT"
] | null | null | null | gb_promoters.py | lilymaryam/UC_Davis_iGEM | a3f8e6803cdd1e2424b3fe01364a93f08d41803d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import gzip
import re
import argparse
parser = argparse.ArgumentParser(
description='Extracts promoters from GenBank file.')
parser.add_argument('--genbank', required=True, type=str,
metavar='<str>', help='genbank file')
parser.add_argument('--upstream', required=False, type=int, d... | 24.185714 | 72 | 0.587123 |
91349ee37b530e19be9ae50412ea9974539f1d5e | 13,739 | py | Python | tensor2tensor/bin/t2t_datagen.py | jonmcwong/tensor2tensor | 71f2c2d8624858e5e6a091f7d7c67c43f097ef19 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/bin/t2t_datagen.py | jonmcwong/tensor2tensor | 71f2c2d8624858e5e6a091f7d7c67c43f097ef19 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/bin/t2t_datagen.py | jonmcwong/tensor2tensor | 71f2c2d8624858e5e6a091f7d7c67c43f097ef19 | [
"Apache-2.0"
] | 1 | 2020-06-19T17:36:10.000Z | 2020-06-19T17:36:10.000Z | # coding=utf-8
# Copyright 2020 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 42.404321 | 106 | 0.717883 |
9134a67f7e1875cb6f67c1e3c2ce7f2217ee5e2c | 1,979 | py | Python | google-cloud-sdk/lib/surface/error_reporting/events/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/error_reporting/events/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/error_reporting/events/delete.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.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... | 34.719298 | 79 | 0.718545 |
9134aa2dada278d211e2782f5dfe37045a5e6c71 | 3,378 | py | Python | bot.py | ggashish/Makoda | d16ed8014cde6dc22fa50c95ec365e8744402559 | [
"MIT"
] | 3 | 2021-08-07T13:01:32.000Z | 2021-08-25T16:19:15.000Z | bot.py | ggashish/Makoda | d16ed8014cde6dc22fa50c95ec365e8744402559 | [
"MIT"
] | null | null | null | bot.py | ggashish/Makoda | d16ed8014cde6dc22fa50c95ec365e8744402559 | [
"MIT"
] | null | null | null | import os
import discord
import asyncio
import aiohttp
import config
from utils.context import Context
from tortoise import Tortoise
from discord.ext import commands
from colorama import Fore, Style, init
from utils.helper import make_error
from discord.ext.commands import AutoShardedBot
init(autoreset=True)
os.env... | 33.445545 | 91 | 0.622854 |
9134be9a49a82fa69f81a4d87d86f568c823ce56 | 4,230 | py | Python | develop/dataloader.py | SaebyeolShin/KMWPS | be4ba8dfbc918108fa007c0ad35f348402e6e994 | [
"MIT"
] | null | null | null | develop/dataloader.py | SaebyeolShin/KMWPS | be4ba8dfbc918108fa007c0ad35f348402e6e994 | [
"MIT"
] | null | null | null | develop/dataloader.py | SaebyeolShin/KMWPS | be4ba8dfbc918108fa007c0ad35f348402e6e994 | [
"MIT"
] | null | null | null | from prerequisite import *
from preprocess import *
class TextDataset(Dataset):
def __init__(self, test, tp, data_path='./data/', datatype='train', max_length=30, is_train=False):
"""if datatype == 'train':
file_df = tp.copy()
# file_df = file_df[file_df['fold']!=1].reset_i... | 37.105263 | 112 | 0.562411 |
9135033ab00989b297c03ae558edc66d9962d0b5 | 32,588 | py | Python | buildman/manager/ephemeral.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 1 | 2020-10-16T19:30:41.000Z | 2020-10-16T19:30:41.000Z | buildman/manager/ephemeral.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | 15 | 2020-06-18T15:32:06.000Z | 2022-03-03T23:06:24.000Z | buildman/manager/ephemeral.py | jakedt/quay | 424c1a19d744be444ed27aa1718fd74af311d863 | [
"Apache-2.0"
] | null | null | null | import logging
import uuid
import calendar
import json
import time
from collections import namedtuple
from datetime import datetime, timedelta
from six import iteritems
from prometheus_client import Counter, Histogram
from trollius import From, coroutine, Return, async, sleep
from buildman.orchestrator import (
... | 39.548544 | 108 | 0.631245 |
913517acca87b70cc3621c1ac6cc93d8e16740b7 | 806 | py | Python | sushy_tools/error.py | arnewiebalck/sushy-tools | 262c7dc48fd2fd3662e05e947a2ee46d09c68757 | [
"Apache-2.0"
] | null | null | null | sushy_tools/error.py | arnewiebalck/sushy-tools | 262c7dc48fd2fd3662e05e947a2ee46d09c68757 | [
"Apache-2.0"
] | null | null | null | sushy_tools/error.py | arnewiebalck/sushy-tools | 262c7dc48fd2fd3662e05e947a2ee46d09c68757 | [
"Apache-2.0"
] | 1 | 2019-06-05T12:10:04.000Z | 2019-06-05T12:10:04.000Z | # Copyright 2018 Red Hat, 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... | 35.043478 | 78 | 0.724566 |
91351f5c851df908a2060086738405dfcbedb151 | 9,482 | py | Python | electrum/plugins/safe_t/clientbase.py | akshaynexus/qtum-electrum | 9fdda51bbc7e541b6f5743f16313d0b8b6123b48 | [
"MIT"
] | null | null | null | electrum/plugins/safe_t/clientbase.py | akshaynexus/qtum-electrum | 9fdda51bbc7e541b6f5743f16313d0b8b6123b48 | [
"MIT"
] | null | null | null | electrum/plugins/safe_t/clientbase.py | akshaynexus/qtum-electrum | 9fdda51bbc7e541b6f5743f16313d0b8b6123b48 | [
"MIT"
] | null | null | null | import time
from struct import pack
from electrum import ecc
from electrum.i18n import _
from electrum.util import UserCancelled
from electrum.keystore import bip39_normalize_passphrase
from electrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32
from electrum.logging import Logger
from electrum.plugins.... | 38.544715 | 119 | 0.619911 |
91358af9b616b2bfc41462a4d99122125256bba0 | 111,235 | py | Python | setup.py | Pixmew/cpython | aa01011003bb855cd52abfd49f2443446590d913 | [
"0BSD"
] | null | null | null | setup.py | Pixmew/cpython | aa01011003bb855cd52abfd49f2443446590d913 | [
"0BSD"
] | 12 | 2020-11-17T06:58:07.000Z | 2022-03-01T20:01:16.000Z | setup.py | Pixmew/cpython | aa01011003bb855cd52abfd49f2443446590d913 | [
"0BSD"
] | null | null | null | # Autodetecting setup.py script for building the Python extensions
import argparse
import importlib._bootstrap
import importlib.machinery
import importlib.util
import os
import re
import sys
import sysconfig
from glob import glob, escape
try:
import subprocess
del subprocess
SUBPROCESS_BOOTSTRAP = False
... | 42.472318 | 115 | 0.552578 |
9135957ef596a248b80747b9d6f5c15d76701b58 | 459 | py | Python | collegiate-explorer-admin/cc_admin/apps/search/urls.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 3 | 2021-05-24T23:06:40.000Z | 2021-11-08T10:32:42.000Z | collegiate-explorer-admin/cc_admin/apps/search/urls.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 4 | 2020-10-12T03:00:43.000Z | 2020-11-17T01:47:56.000Z | collegiate-explorer-admin/cc_admin/apps/search/urls.py | Chit-Chaat/Collegiate_Explorer_APP | f30171d01fec62a836332b5508374144fbb487c7 | [
"MIT"
] | 2 | 2021-03-01T15:30:26.000Z | 2022-01-13T21:30:20.000Z | __author__ = 'Aaron Yang'
__email__ = 'byang971@usc.edu'
__date__ = '10/19/2020 6:35 PM'
from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from . import views
urlpatterns = [
path('query', csrf_exempt(views.index)),
path('test', views.testNeo4j, name='just_for_test'),
path... | 27 | 56 | 0.712418 |
9135a4332fde513d9785c8dcb721519755e92dca | 1,167 | py | Python | src/filetransfer/const.py | andreas19/FileTransfer | 48a6bde2332d57f83064bf0eebfdc4ec4364d6cd | [
"BSD-3-Clause"
] | 1 | 2019-05-10T15:57:39.000Z | 2019-05-10T15:57:39.000Z | src/filetransfer/const.py | andreas19/FileTransfer | 48a6bde2332d57f83064bf0eebfdc4ec4364d6cd | [
"BSD-3-Clause"
] | null | null | null | src/filetransfer/const.py | andreas19/FileTransfer | 48a6bde2332d57f83064bf0eebfdc4ec4364d6cd | [
"BSD-3-Clause"
] | null | null | null | """Constants module."""
from enum import Enum
FTP_PORT = 21 #: Default FTP port.
SSH_PORT = 22 #: Default SSH/SFTP port.
SMTP_PORT = 25 #: Default SMTP port.
class ExitCodes(Enum):
"""Exit Codes."""
SUCCESS = (0, 'success')
ERRORS = (1, 'with errors')
FAILURE = (2, 'failure')
CONFIG = (3, ... | 22.442308 | 80 | 0.562982 |
9135bc5e2d64f1eedfa58cdab3ca9ca9b0ce8e20 | 7,302 | py | Python | functions/secrets_scanner/DumpsterDiver/DumpsterDiver.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | null | null | null | functions/secrets_scanner/DumpsterDiver/DumpsterDiver.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 4 | 2021-02-12T09:50:38.000Z | 2021-06-17T10:33:09.000Z | functions/secrets_scanner/DumpsterDiver/DumpsterDiver.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 2 | 2021-02-22T09:29:28.000Z | 2021-06-12T13:54:18.000Z | #!/usr/bin/env python3
from . import advancedSearch
from . import core
import os
import sys
import argparse
from termcolor import colored
import colorama
colorama.init()
# Borrowed from https://bitbucket.org/ruamel/std.argparse
class SmartFormatter(argparse.HelpFormatter):
def _split_lines(self, text, width):
... | 34.443396 | 118 | 0.58573 |
9135d481b8e906398ecba6990c5fd8af335244a8 | 12,915 | py | Python | tests/models/test_cleartasks.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 3 | 2015-08-25T13:56:44.000Z | 2020-03-21T10:26:58.000Z | tests/models/test_cleartasks.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 37 | 2020-07-21T07:50:02.000Z | 2022-03-29T22:31:28.000Z | tests/models/test_cleartasks.py | santecapital/airflow | 7f02e56c9cb8b548624d13e9c2c2b89d753f996b | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2020-07-17T14:02:28.000Z | 2022-02-23T04:29:58.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... | 38.552239 | 90 | 0.597677 |
9135f243c3733ebe0322e68f2164aaacbe69bc02 | 6,616 | py | Python | stanCode_Projects/hangman_game/hangman.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/hangman_game/hangman.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/hangman_game/hangman.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | """
File: hangman.py
Name: Johnson
-----------------------------
This program plays hangman game.
Users sees a dashed word, trying to
correctly figure the un-dashed word out
by inputting one character each round.
If the user input is correct, show the
updated word on console. Players have N_TURNS
chances to try and win... | 31.807692 | 120 | 0.376511 |
9135ff96b5dcea9d384f3118996320daee9659da | 1,618 | py | Python | src/utils/utils.py | shy166/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | null | null | null | src/utils/utils.py | shy166/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | 3 | 2020-05-16T04:29:28.000Z | 2020-05-16T08:05:16.000Z | src/utils/utils.py | syeehyn/hinreddit | e19abfa584b8b0cf801dd6968ac7b42d4b68ee96 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from scipy import sparse
import os
import json
from sklearn.model_selection import train_test_split
from sklearn.metrics import f1_score, fbeta_score, accuracy_score, confusion_matrix
from src import *
from src.models import hinmodel
MAT_DIR = 'interim/hinembed'
def evaluate(test_size, method, data... | 36.772727 | 113 | 0.560569 |
91363947b7b57470da8821dee44db7399b50ba05 | 6,181 | py | Python | tests/modeling/test_roi_pooler.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | tests/modeling/test_roi_pooler.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | tests/modeling/test_roi_pooler.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import logging
import unittest
import torch
from detectron.modeling.poolers import ROIPooler, _fmt_box_list
from detectron.structures import Boxes, RotatedBoxes
from detectron.utils.testing import random_boxes
logger = logging.getLogger(__name__)
class TestROIPoole... | 34.724719 | 87 | 0.601035 |
91364d2ad592324e28b2c55c8ae5f2bba07e87b6 | 4,309 | py | Python | unicorn_binance_rest_api/unicorn_binance_rest_api_exceptions.py | oliver-zehentleitner/-unicorn-binance-rest-api- | de8b96a213109ed050a2b98736e0a6de099f08d8 | [
"MIT"
] | 18 | 2021-04-03T16:59:36.000Z | 2021-12-30T21:12:09.000Z | unicorn_binance_rest_api/unicorn_binance_rest_api_exceptions.py | oliver-zehentleitner/-unicorn-binance-rest-api- | de8b96a213109ed050a2b98736e0a6de099f08d8 | [
"MIT"
] | 12 | 2021-04-30T10:02:05.000Z | 2022-01-01T19:52:18.000Z | unicorn_binance_rest_api/unicorn_binance_rest_api_exceptions.py | oliver-zehentleitner/-unicorn-binance-rest-api- | de8b96a213109ed050a2b98736e0a6de099f08d8 | [
"MIT"
] | 7 | 2021-05-14T23:50:08.000Z | 2021-12-16T21:38:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# File: unicorn_binance_rest_api_exceptions.py
#
# Part of ‘UNICORN Binance REST API’
# Project website: https://github.com/LUCIT-Systems-and-Development/unicorn-binance-rest-api
# Documentation: https://lucit-systems-and-development.github.io/unicorn-binance-rest-api
# ... | 35.61157 | 106 | 0.714551 |
91364fe63b2ac9c9c37b6c94fbeaef6f0f37b236 | 462 | py | Python | goods/migrations/0010_actionlog_traintype.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | 3 | 2018-10-16T09:36:12.000Z | 2019-04-15T03:12:49.000Z | goods/migrations/0010_actionlog_traintype.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | goods/migrations/0010_actionlog_traintype.py | huachao2017/goodsdl | 3616d53b90696a97a5d56a064e2a14d484b821d7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-21 16:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('goods', '0009_trainimage_traintype'),
]
operations = [
migrations.AddField(... | 22 | 57 | 0.625541 |
9136608ea240555cbfd5f4da4b1fffde8fc0e1cd | 616 | py | Python | bincoeff.py | Dikaeinstein/Think_Python | 370cb5af25230ff20994206e2d8023fd1d4c2c74 | [
"MIT"
] | null | null | null | bincoeff.py | Dikaeinstein/Think_Python | 370cb5af25230ff20994206e2d8023fd1d4c2c74 | [
"MIT"
] | null | null | null | bincoeff.py | Dikaeinstein/Think_Python | 370cb5af25230ff20994206e2d8023fd1d4c2c74 | [
"MIT"
] | null | null | null | cache = {}
def binomial_coeff(n, k):
"""Compute the binomial coefficient 'n choose k'.
n: number of trials
k: number of successes
returns: int
"""
if k == 0:
return 1
if n == 0:
return 0
try:
return cache[n,k]
except KeyError:
cache[n,k... | 20.533333 | 77 | 0.537338 |
9136819c94b5f6b50ae57589e55bee400d07d608 | 202 | py | Python | archive/nexus-api-v2/Database/Utilities/Gender.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/Utilities/Gender.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | null | null | null | archive/nexus-api-v2/Database/Utilities/Gender.py | cloud-hybrid/delta | 402b00ed5aaa32ccef628361e9635879b7ace44f | [
"BSD-3-Clause"
] | 1 | 2022-01-03T05:33:15.000Z | 2022-01-03T05:33:15.000Z | """
...
"""
from . import *
class Type(Integer, Enumeration):
"""
ISO/IEC 5218 - Gender Codes
"""
NULL = 0x0
MALE = 0x1
FEMALE = 0x2
OTHER = 0x9
__all__ = [
"Type"
]
| 10.1 | 33 | 0.49505 |
9136cebcf6b12f0227e9855620e8711eff295eac | 22,652 | py | Python | chroma_core/plugins/linux.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | 1 | 2021-02-08T16:59:14.000Z | 2021-02-08T16:59:14.000Z | chroma_core/plugins/linux.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | chroma_core/plugins/linux.py | AlexTalker/integrated-manager-for-lustre | 251099e5c776f3c1898af50bb7cc77924c7cf7c7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
import json
from logging import DEBUG
from toolz import merge
from django.db import transaction
from chroma_core.lib.storage_plugin.api import attributes
from chroma_co... | 39.532286 | 117 | 0.600212 |
9136dc93654d1905309dd4a68c5960d6ec664e27 | 715 | py | Python | runner.py | tiahflorens/ict2019 | 47d35da2d834d1b11ba33a01465da8b10ac66f0c | [
"Apache-2.0"
] | null | null | null | runner.py | tiahflorens/ict2019 | 47d35da2d834d1b11ba33a01465da8b10ac66f0c | [
"Apache-2.0"
] | 5 | 2021-03-19T03:28:49.000Z | 2022-03-11T23:59:03.000Z | runner.py | tiahflorens/ict2019 | 47d35da2d834d1b11ba33a01465da8b10ac66f0c | [
"Apache-2.0"
] | null | null | null | import os
OBAMA = 'obama'
EXE = '/home/peter/anaconda3/envs/py36/bin/python'
PY = 'video_demo.py'
OUTDIR = '/home/peter/extra/dataset/gist/demo2019/ver1'
datapath ='/home/peter/extra/dataset/gist/demo2019/trim'
for ff in os.listdir(datapath):
# if ff in ['trim_fight_jh_s1_student4.mp4', 'trim_fight_jh_s2_student... | 34.047619 | 92 | 0.675524 |
9136e52014fd96c63205b6c9dd2827603a7586eb | 2,921 | py | Python | tests/test_helper.py | sanders41/meilisearch-cli | b691be610e84640fe9877aed23131e995eb717b8 | [
"MIT"
] | 2 | 2022-03-17T02:25:05.000Z | 2022-03-30T07:32:21.000Z | tests/test_helper.py | sanders41/meilisearch-cli | b691be610e84640fe9877aed23131e995eb717b8 | [
"MIT"
] | 86 | 2021-10-17T19:23:01.000Z | 2022-03-29T00:34:19.000Z | tests/test_helper.py | sanders41/meilisearch-cli | b691be610e84640fe9877aed23131e995eb717b8 | [
"MIT"
] | 2 | 2021-11-09T17:58:01.000Z | 2021-12-22T00:46:35.000Z | import json
from unittest.mock import patch
import pytest
import requests
from meilisearch.errors import MeiliSearchError
from meilisearch.index import Index
from meilisearch_cli._config import console
from meilisearch_cli._helpers import check_index_status, create_panel
from meilisearch_cli.main import app
@pytest... | 27.299065 | 93 | 0.603903 |
91372df718dc8c0531e97ab3b1c8c980245cc760 | 3,150 | py | Python | dragons/helpers/functions/utils.py | TeamDragons/Dragons-Userbot | e40584f4dc898b785523adea4519ffb412dc92c4 | [
"MIT"
] | 3 | 2021-08-11T08:33:39.000Z | 2022-01-17T00:09:11.000Z | dragons/helpers/functions/utils.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | null | null | null | dragons/helpers/functions/utils.py | sophiashirashaki/Dragons-Userbot | 2255c18428e488a267eaec1ec8c081fabcde167a | [
"MIT"
] | 6 | 2021-08-14T08:20:41.000Z | 2022-03-20T02:31:45.000Z | import time
from datetime import datetime
from emoji import get_emoji_regexp
from telethon.tl.types import Channel, PollAnswer
async def get_message_link(channelid, msgid):
if str(channelid).startswith("-"):
channelid = str(channelid)[1:]
if channelid.startswith("100"):
channelid = channelid[... | 30.882353 | 135 | 0.597778 |
91373e431e5a62e892f7ac64d126a0077942a3c7 | 563 | py | Python | pantsuitUp/interviewMe/migrations/0001_initial.py | PantsuitUp/Whack2017 | 9463b90b0a38a5ccc57062190cc692db7155b3a0 | [
"Apache-2.0"
] | null | null | null | pantsuitUp/interviewMe/migrations/0001_initial.py | PantsuitUp/Whack2017 | 9463b90b0a38a5ccc57062190cc692db7155b3a0 | [
"Apache-2.0"
] | 4 | 2020-06-05T17:52:33.000Z | 2022-03-11T23:17:53.000Z | pantsuitUp/interviewMe/migrations/0001_initial.py | PantsuitUp/Whack2017 | 9463b90b0a38a5ccc57062190cc692db7155b3a0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-11 20:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Feedba... | 23.458333 | 114 | 0.600355 |
91377b7992cc2c132b02ae30a5f5aeea5ee3c5bc | 54 | py | Python | ceacoest/testsupport/__init__.py | dimasad/ceacoest | 4a5eb946e118145d054cac785cc8b4d834c28192 | [
"MIT"
] | 3 | 2018-12-12T21:11:30.000Z | 2020-08-03T02:26:03.000Z | ceacoest/testsupport/__init__.py | dimasad/ceacoest | 4a5eb946e118145d054cac785cc8b4d834c28192 | [
"MIT"
] | null | null | null | ceacoest/testsupport/__init__.py | dimasad/ceacoest | 4a5eb946e118145d054cac785cc8b4d834c28192 | [
"MIT"
] | 2 | 2018-12-03T14:34:10.000Z | 2021-08-17T17:04:12.000Z | """Pytest plugins and test support infrastructure."""
| 27 | 53 | 0.759259 |
91379003f5f088f62801b08a56a69b39ad9d286e | 6,036 | py | Python | appengine/findit/findit_v2/model/proto/gen/compile_failure_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/findit_v2/model/proto/gen/compile_failure_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | appengine/findit/findit_v2/model/proto/gen/compile_failure_pb2.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: compile_failure.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection a... | 41.627586 | 521 | 0.771372 |
9137ba54aade4b29f453ee4815d1c7651afed5c3 | 1,400 | py | Python | mw/lib/reverts/functions.py | nemobis/Mediawiki-Utilities | f8b2a4dbc8815f27c53fba6c2226328d7a4ab1ca | [
"MIT"
] | null | null | null | mw/lib/reverts/functions.py | nemobis/Mediawiki-Utilities | f8b2a4dbc8815f27c53fba6c2226328d7a4ab1ca | [
"MIT"
] | null | null | null | mw/lib/reverts/functions.py | nemobis/Mediawiki-Utilities | f8b2a4dbc8815f27c53fba6c2226328d7a4ab1ca | [
"MIT"
] | null | null | null | from .detector import Detector
from . import defaults
def detect(checksum_revisions, radius=defaults.RADIUS):
"""
Detects reverts that occur in a sequence of revisions. Note that,
`revision` data meta will simply be returned in the case of a revert.
This function serves as a convenience wrapper arou... | 29.787234 | 95 | 0.595 |
9137cdbca53cf88168191d8363c053d379ed9957 | 26,040 | py | Python | salt/cloud/clouds/softlayer_hw.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | 1 | 2018-02-03T17:30:56.000Z | 2018-02-03T17:30:56.000Z | salt/cloud/clouds/softlayer_hw.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/softlayer_hw.py | skrobul/salt | ef7fb71082cce7a9783e00b9c65062fefae09263 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
SoftLayer HW Cloud Module
=========================
The SoftLayer HW cloud module is used to control access to the SoftLayer
hardware cloud system
Use of this module only requires the ``apikey`` parameter. Set up the cloud
configuration at:
``/etc/salt/cloud.providers`` or ``/etc/salt/clo... | 31.990172 | 108 | 0.533525 |
9137f8bb8429f067eb07ae622539f5f81db3c6a5 | 4,700 | py | Python | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_receipts.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_receipts.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_receipts.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 37.6 | 87 | 0.529362 |
91385233db320da9e0aa0f7ea8fb980ef6e5d2dc | 2,330 | py | Python | src/toil/utils/toilKill.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 348 | 2018-07-08T03:38:28.000Z | 2022-03-11T18:57:44.000Z | src/toil/utils/toilKill.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 1,700 | 2018-07-05T18:28:49.000Z | 2022-03-31T14:09:04.000Z | src/toil/utils/toilKill.py | Hexotical/toil | 312b6e1f221ee7f7f187dd6dbfce1aecffd00e09 | [
"Apache-2.0"
] | 126 | 2018-07-11T18:59:29.000Z | 2022-01-24T03:14:02.000Z | # Copyright (C) 2015-2021 Regents of the University of California
#
# 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... | 43.962264 | 131 | 0.713734 |
913852bb17638a7be8710b908bb5c58857cc9ea5 | 2,243 | py | Python | MachineLearning/Personl Rank/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | MachineLearning/Personl Rank/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | MachineLearning/Personl Rank/main.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | # 2018-10-20
# Personl Rank
# python 机器学习算法
import numpy as np
def loadData(file_path):
'''
导入用户商品数据
'''
f = open(file_path)
data = []
for line in f.readlines():
lines = line.strip().split("\t")
tmp = []
for x in lines:
if x != "-":
tmp.append(1) # 打过分记为1
else:
tmp.append(0) # 未打分记为0
data.a... | 17.253846 | 70 | 0.596968 |
91388e1c3f4c63a91a8857e8021adc7c002a9609 | 2,424 | py | Python | kairon/action_server/data_objects.py | Anitej/kairon | 61d6bd7f230a744303abab42e3b54b0381fee7da | [
"Apache-2.0"
] | null | null | null | kairon/action_server/data_objects.py | Anitej/kairon | 61d6bd7f230a744303abab42e3b54b0381fee7da | [
"Apache-2.0"
] | null | null | null | kairon/action_server/data_objects.py | Anitej/kairon | 61d6bd7f230a744303abab42e3b54b0381fee7da | [
"Apache-2.0"
] | null | null | null | import validators
from mongoengine import (
Document,
EmbeddedDocument,
EmbeddedDocumentField,
StringField,
DateTimeField,
BooleanField,
ListField, DictField,
)
from mongoengine.errors import ValidationError
from datetime import datetime
from validators import ValidationFailure
class Http... | 35.130435 | 89 | 0.707096 |
9138a8ab18991267f9882ff78d10c3cfd171ad59 | 1,402 | py | Python | sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_topic.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_topic.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_eg_events_to_a_topic.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""
FILE:... | 35.948718 | 87 | 0.696148 |
9138d81d09f604e5a07d2edd045d355e9dd0e645 | 1,607 | py | Python | debate/urls.py | steventimberman/debateIt | 32b17552894b2c54a5f57c36257f4b6bc8846711 | [
"MIT"
] | null | null | null | debate/urls.py | steventimberman/debateIt | 32b17552894b2c54a5f57c36257f4b6bc8846711 | [
"MIT"
] | 4 | 2017-08-16T03:50:16.000Z | 2017-08-22T05:41:04.000Z | debate/urls.py | steventimberman/masterDebater | 32b17552894b2c54a5f57c36257f4b6bc8846711 | [
"MIT"
] | 1 | 2020-11-04T08:39:22.000Z | 2020-11-04T08:39:22.000Z | from django.conf.urls import include, url
from . import views
from django.contrib.auth.views import login, logout
app_name = 'debate'
urlpatterns = [
url(r'^login/$', login, {'template_name': 'debate/login.html'}, name='login'),
url(r'^logout/$', logout, {'template_name': 'debate/logout.html'}, name='logout')... | 51.83871 | 112 | 0.662726 |
9138f5d8ce6eafe98ace8c8be68925efabf026ab | 1,031 | py | Python | katas/may2018/exer.py | igoroya/pycodingkatas | 75b14d0a30b2b2248d064a4b4ffcf43ba14535d8 | [
"MIT"
] | null | null | null | katas/may2018/exer.py | igoroya/pycodingkatas | 75b14d0a30b2b2248d064a4b4ffcf43ba14535d8 | [
"MIT"
] | null | null | null | katas/may2018/exer.py | igoroya/pycodingkatas | 75b14d0a30b2b2248d064a4b4ffcf43ba14535d8 | [
"MIT"
] | null | null | null | '''
Created on 22 May 2018
Reverse the word order in a csv string (with ";" separator),
keeping the letters in proper order in each word
(Solution I handed in a code interview)
@author: igoroya
'''
def reorder_char_array(char_array):
new_array = ''
temp_string = ''
words = []
for c in char_array:... | 20.215686 | 60 | 0.602328 |
91390f70d01a978d21afde390b7e5716467938d4 | 1,946 | py | Python | tortoise/tests/fields/test_json.py | nsidnev/tortoise-orm | e6870a22414862068cbfcc1c94d23ab4f6817f2a | [
"Apache-2.0"
] | null | null | null | tortoise/tests/fields/test_json.py | nsidnev/tortoise-orm | e6870a22414862068cbfcc1c94d23ab4f6817f2a | [
"Apache-2.0"
] | null | null | null | tortoise/tests/fields/test_json.py | nsidnev/tortoise-orm | e6870a22414862068cbfcc1c94d23ab4f6817f2a | [
"Apache-2.0"
] | null | null | null | from tortoise.contrib import test
from tortoise.exceptions import IntegrityError
from tortoise.tests import testmodels
class TestJSONFields(test.TestCase):
async def test_empty(self):
with self.assertRaises(IntegrityError):
await testmodels.JSONFields.create()
async def test_create(self):... | 43.244444 | 94 | 0.652621 |
913932844266f0b7c7c2a7290e2a31dd488936be | 9,423 | py | Python | dataset_generator/dataset_generator.py | EirikGG/3DModelDsGen | de973e51be69c36d2c5b9d99d6726db3d1a5980e | [
"MIT"
] | 1 | 2021-06-23T02:04:25.000Z | 2021-06-23T02:04:25.000Z | dataset_generator/dataset_generator.py | EirikGG/SyntheticDataGenObjectDetection | de973e51be69c36d2c5b9d99d6726db3d1a5980e | [
"MIT"
] | null | null | null | dataset_generator/dataset_generator.py | EirikGG/SyntheticDataGenObjectDetection | de973e51be69c36d2c5b9d99d6726db3d1a5980e | [
"MIT"
] | null | null | null | import os, humanize, time, pyrender, trimesh
import numpy as np
from dataset_generator.scene import scene_handler
from dataset_generator.tools import loader, saver, visualizer
def generate_dataset(
n_imgs:int,
model_path:str,
output_path:str,
model_name:str='3d_model',
depth_img:bool=True,
bo... | 45.302885 | 115 | 0.525735 |
913957e8d6735ca07a92b392d22679a4f08d1bdd | 2,342 | py | Python | importing/migrations/0006_importresponse.py | perimetro20/asiaticon | 40e833d9ad3e3d8a97803fa10fec64f69ca622cb | [
"MIT"
] | null | null | null | importing/migrations/0006_importresponse.py | perimetro20/asiaticon | 40e833d9ad3e3d8a97803fa10fec64f69ca622cb | [
"MIT"
] | null | null | null | importing/migrations/0006_importresponse.py | perimetro20/asiaticon | 40e833d9ad3e3d8a97803fa10fec64f69ca622cb | [
"MIT"
] | null | null | null | # Generated by Django 2.0.4 on 2018-11-06 00:44
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('importing', '0005_importrequest_photo'),
]
operations = [
migrations.CreateModel(
name='ImportR... | 58.55 | 129 | 0.638343 |
91395c9c8cd8dca954ec896533ae4d365f9121d4 | 432 | bzl | Python | third_party/dom4j.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/dom4j.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | third_party/dom4j.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load(":import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "dom4j_dom4j",
artifact = "dom4j:dom4j:1.6.1",
artifact_sha256 = "593552ffea3c5823c6602478b5002a7c525fd904a3c44f1abe4065c22edfac73",
srcjar_sha256 = "4d37275f80991a37be460e7... | 33.230769 | 93 | 0.68287 |
913978e81993075c0f0b96123c954bf72260d762 | 23,841 | py | Python | components/google-cloud/google_cloud_pipeline_components/aiplatform/utils.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | components/google-cloud/google_cloud_pipeline_components/aiplatform/utils.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | components/google-cloud/google_cloud_pipeline_components/aiplatform/utils.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2021 The Kubeflow 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 applicabl... | 35.060294 | 106 | 0.642381 |
9139aaceedda355356882afe1182c1d9964820e4 | 3,471 | py | Python | experiments/ashvin/icml2020/hand/pen/gaussian/bc4.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian/bc4.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/gaussian/bc4.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies import GaussianP... | 29.922414 | 130 | 0.571305 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.