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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
93fa67991d2b3475eae435b6a83d10316eca6319 | 67 | py | Python | swcms_social/text_pages/__init__.py | ivanff/swcms | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | null | null | null | swcms_social/text_pages/__init__.py | ivanff/swcms | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | 1 | 2019-06-25T11:17:35.000Z | 2019-06-25T11:17:54.000Z | swcms_social/text_pages/__init__.py | ivanff/swcms-social | 20d121003243abcc26e41409bc44f1c0ef3c6c2a | [
"MIT"
] | null | null | null | default_app_config = 'swcms_social.text_pages.apps.TextPagesConfig' | 67 | 67 | 0.880597 |
93fa6b5e358e2c5bb555bbf25cfde218a3e0b57e | 7,978 | py | Python | doc/source/conf.py | bruneli/statspy | 7bf07cdd25f7d5118f39fd5465853f4da9116c80 | [
"BSD-3-Clause"
] | 2 | 2015-03-07T08:34:28.000Z | 2016-07-04T18:15:28.000Z | doc/source/conf.py | bruneli/statspy | 7bf07cdd25f7d5118f39fd5465853f4da9116c80 | [
"BSD-3-Clause"
] | null | null | null | doc/source/conf.py | bruneli/statspy | 7bf07cdd25f7d5118f39fd5465853f4da9116c80 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# StatsPy documentation build configuration file, created by
# sphinx-quickstart on Sat Aug 24 17:08:55 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | 32.299595 | 80 | 0.715092 |
93fa9d839459e476a67c4f7222895bc4fe9c7d6e | 1,566 | py | Python | scripts/post_analysis/process_outputs.py | Ensembl/postgap | 8435db87b30f54f881d36689e13fd2b66ad5f8cf | [
"Apache-2.0"
] | 34 | 2016-11-08T23:43:48.000Z | 2021-09-14T14:04:13.000Z | scripts/post_analysis/process_outputs.py | Ensembl/postgap | 8435db87b30f54f881d36689e13fd2b66ad5f8cf | [
"Apache-2.0"
] | 153 | 2016-11-13T08:19:19.000Z | 2021-11-23T22:41:29.000Z | scripts/post_analysis/process_outputs.py | Ensembl/postgap | 8435db87b30f54f881d36689e13fd2b66ad5f8cf | [
"Apache-2.0"
] | 27 | 2017-01-17T15:40:35.000Z | 2022-03-18T01:52:36.000Z | # -*- coding: utf-8 -*-
'''
Spyder Editor
This is a script file to process the outputs of an analysis to create the dataframe for making plots
'''
import argparse
import pandas as pd
# get command line arguments
parser = argparse.ArgumentParser(description='to read command line arguments')
parser.add... | 43.5 | 160 | 0.724138 |
93faa5a4405de0a04d15d1ea4890ad9da6d219ed | 12,644 | py | Python | bakefont3/encode.py | golightlyb/bakefont3 | b5e05f5f96dc37136cf1cf6053c081a7b30f9ea8 | [
"MIT"
] | 7 | 2017-12-01T16:48:12.000Z | 2021-01-21T13:05:24.000Z | bakefont3/encode.py | golightlyb/bakefont3 | b5e05f5f96dc37136cf1cf6053c081a7b30f9ea8 | [
"MIT"
] | 1 | 2021-04-19T01:03:37.000Z | 2021-04-19T03:02:52.000Z | bakefont3/encode.py | golightlyb/bakefont3 | b5e05f5f96dc37136cf1cf6053c081a7b30f9ea8 | [
"MIT"
] | null | null | null | import struct
import itertools
import freetype
ENDIAN = '<' # always little endian
# If you make a modified version, please change the URL in the string to
# let people know what generated the file!
# example: Bakefont 3.0.2 (compatible; Acme Inc version 1.3)
ENCODER = "Bakefont 3.0.2 (https://github.com/golightlyb/b... | 34.358696 | 94 | 0.612148 |
93fab749667f0f789bd71f594bd48e556e57bb71 | 339 | py | Python | carbonium_fb/_logs.py | szymonszl/carbonium | e0cc9b318c116213781c661f9935cc809f73e27b | [
"BSD-3-Clause"
] | null | null | null | carbonium_fb/_logs.py | szymonszl/carbonium | e0cc9b318c116213781c661f9935cc809f73e27b | [
"BSD-3-Clause"
] | null | null | null | carbonium_fb/_logs.py | szymonszl/carbonium | e0cc9b318c116213781c661f9935cc809f73e27b | [
"BSD-3-Clause"
] | null | null | null | """This module configures logging for Carbonium"""
import logging
logging.basicConfig(format='%(asctime)s-%(name)s-%(levelname)s-%(message)s')
log = logging.getLogger('carbonium')
log.setLevel(logging.DEBUG) # FIXME, should be defined at bot instantiation
_fblog = logging.getLogger('client')
_fblog.setLevel(logging.WA... | 37.666667 | 76 | 0.764012 |
93fac5b35125130aaca1874d3455aaf8f2d454e1 | 1,083 | py | Python | 测试/sklearn_hello/metrics_hello.py | shayxu-ai/A-Repository-for-Machine-Learning | 4b4cea15bb005d1c58f4395fde97cadf44fb0186 | [
"Apache-2.0"
] | null | null | null | 测试/sklearn_hello/metrics_hello.py | shayxu-ai/A-Repository-for-Machine-Learning | 4b4cea15bb005d1c58f4395fde97cadf44fb0186 | [
"Apache-2.0"
] | null | null | null | 测试/sklearn_hello/metrics_hello.py | shayxu-ai/A-Repository-for-Machine-Learning | 4b4cea15bb005d1c58f4395fde97cadf44fb0186 | [
"Apache-2.0"
] | null | null | null | """
https://blog.csdn.net/shenxiaoming77/article/details/72627882
分类模型评估:
Precision 精准度 from sklearn.metrics import precision_score
Recall 召回率 from sklearn.metrics import recall_score
F1 F1值 from sklearn.metrics import f1_score
Confusion Matrix 混淆矩阵 from sklearn.metrics import confusion_matrix
ROC ROC曲线(Receiver ... | 31.852941 | 101 | 0.78024 |
93fad69d2743066d701e72481f7046bf3cfda6e7 | 1,314 | py | Python | pygld/api/heatpumps/maths.py | cgq-qgc/pygld | f5cef90a6b9a4d60b5beca2428a9432fdb3c95d8 | [
"MIT"
] | 4 | 2018-04-05T18:03:07.000Z | 2021-11-05T18:55:46.000Z | pygld/api/heatpumps/maths.py | cgq-qgc/pygld | f5cef90a6b9a4d60b5beca2428a9432fdb3c95d8 | [
"MIT"
] | 8 | 2017-12-16T00:38:29.000Z | 2018-07-15T04:53:35.000Z | pygld/api/heatpumps/maths.py | jnsebgosselin/pygld | f5cef90a6b9a4d60b5beca2428a9432fdb3c95d8 | [
"MIT"
] | 1 | 2020-10-08T14:44:26.000Z | 2020-10-08T14:44:26.000Z | # -*- coding: utf-8 -*-
# Copyright © 2018 Jean-Sébastien Gosselin
# https://github.com/jnsebgosselin/qwatson
#
# This file is part of PyGLD.
# Licensed under the terms of the GNU General Public License.
# ---- Standard imports
# ---- Third party imports
import numpy as np
# ---- Local imports
def multi_polyfit2... | 24.333333 | 79 | 0.619482 |
93fb0133920047a11112b0857d646d621473a4c2 | 1,832 | py | Python | cloudmesh/metric/openstack/cm_metric_openstack.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | cloudmesh/metric/openstack/cm_metric_openstack.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | 4 | 2021-06-08T20:20:08.000Z | 2022-03-11T23:30:22.000Z | cloudmesh/metric/openstack/cm_metric_openstack.py | JulienPalard/cloudmesh | 1759b88daef3a13917492d028fdabe08f03ca996 | [
"Apache-2.0"
] | null | null | null | from cloudmesh.config.cm_config import get_mongo_db
class cm_metric_openstack:
def __init__(self, collection=None):
if collection is None:
collection = "metric"
self.db_qstat = get_mongo_db(collections)
def update(self, query, values=None):
'''
executes a query ... | 28.184615 | 69 | 0.53548 |
93fb04e0ae701ee838d26dc1f5015c0fb1ef8b0d | 149 | py | Python | tests/test_factory.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | null | null | null | tests/test_factory.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | 46 | 2018-12-16T02:38:34.000Z | 2021-06-01T22:44:45.000Z | tests/test_factory.py | cangkevin/asain-show-rss-website-wrapper | ca7953e2b764705d1a78c691e1920b2f632e6bc9 | [
"MIT"
] | 1 | 2019-01-06T04:13:51.000Z | 2019-01-06T04:13:51.000Z | def test_config(app, client):
assert app.config["TESTING"]
assert app.config["BASE_URL"] == "http://base_url/"
assert client is not None
| 29.8 | 55 | 0.677852 |
93fb38178c000b209ee8628a6c2d0c2085ac6c6d | 1,302 | py | Python | common/fabfile.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | null | null | null | common/fabfile.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | 3 | 2021-03-20T00:02:37.000Z | 2022-02-11T03:46:59.000Z | common/fabfile.py | vbohinc/CommunityCellularManager | ab330fcb1bc70ee3a8e9bcdac2846ab6c327f87c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2
"""
Package the CCM common components.
Copyright (c) 2016-present, Facebook, Inc.
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. An additional grant
of patent rights can be found in the PATENTS ... | 25.529412 | 75 | 0.64977 |
93fb486d857b3ddab50c6f6c4d42e8b45deda933 | 956 | py | Python | src/pymodaq_plugins_femto/daq_move_plugins/daq_move_GlassInsertion.py | CEMES-CNRS/pymodaq_plugins_femto | f58fb9a65b2e3351ea2a47e46c566682a69e3a11 | [
"MIT"
] | null | null | null | src/pymodaq_plugins_femto/daq_move_plugins/daq_move_GlassInsertion.py | CEMES-CNRS/pymodaq_plugins_femto | f58fb9a65b2e3351ea2a47e46c566682a69e3a11 | [
"MIT"
] | null | null | null | src/pymodaq_plugins_femto/daq_move_plugins/daq_move_GlassInsertion.py | CEMES-CNRS/pymodaq_plugins_femto | f58fb9a65b2e3351ea2a47e46c566682a69e3a11 | [
"MIT"
] | 1 | 2021-04-21T13:53:17.000Z | 2021-04-21T13:53:17.000Z | from pymodaq.daq_move.utility_classes import DAQ_Move_base # base class
from pymodaq.daq_move.utility_classes import comon_parameters # common set of parameters for all actuators
from pymodaq.daq_utils.daq_utils import ThreadCommand, getLineInfo # object used to send info back to the main thread
from easydict import... | 41.565217 | 118 | 0.686192 |
93fb4aef1d8d8d68d5d1c4bd6676a225600a30a5 | 4,343 | py | Python | receita/tools/build.py | vkruoso/receita-tools | fd62a252c76541c9feac6470b9048b31348ffe86 | [
"MIT"
] | 27 | 2015-01-20T11:33:56.000Z | 2019-10-26T18:12:47.000Z | receita/tools/build.py | vkruoso/receita-tools | fd62a252c76541c9feac6470b9048b31348ffe86 | [
"MIT"
] | 29 | 2015-07-19T04:25:07.000Z | 2019-08-19T12:52:21.000Z | receita/tools/build.py | vkruoso/receita-tools | fd62a252c76541c9feac6470b9048b31348ffe86 | [
"MIT"
] | 5 | 2015-07-29T22:48:36.000Z | 2018-10-08T13:53:07.000Z | import glob
import json
import os
import sys
import unicodecsv
class BaseCSV(object):
ERROR = 'ERROR'
def __init__(self, output):
path = os.path.join(output, self._filename + '.csv')
self._f = open(path, 'w')
self.writer = unicodecsv.DictWriter(
self._f, fieldnames=self.... | 24.676136 | 74 | 0.51393 |
93fbab2d13a1886afb4de438d033e71d3641ac0f | 18 | py | Python | btd6_memory_info/generated/Assets/Scripts/Unity/Map/Effects/Stormy/stormy.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/Map/Effects/Stormy/stormy.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Unity/Map/Effects/Stormy/stormy.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class Stormy: pass | 18 | 18 | 0.833333 |
93fbddeb7490e4c4c6b3c60bd8fb015d57736eea | 596 | py | Python | rlkit/torch/td3/mode_switching_td3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | rlkit/torch/td3/mode_switching_td3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | rlkit/torch/td3/mode_switching_td3.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | from rlkit.torch.td3.td3 import TD3
class ModeSwitchingTd3(TD3):
def __init__(
self,
train_mode,
test_mode,
*args,
**kwargs
):
self.train_mode = train_mode
self.test_mode = test_mode
super().__init__(*args, **kwargs)
# ... | 25.913043 | 64 | 0.595638 |
93fbe2a3ec15ba1f8ab3d7fd469f05223b3ce46b | 8,964 | py | Python | scan/test/fetch/db_fetch/test_db_fetch_vedges_ovs.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/db_fetch/test_db_fetch_vedges_ovs.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/db_fetch/test_db_fetch_vedges_ovs.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 45.272727 | 80 | 0.535587 |
93fc075b12069d55ef8ad898933742a9b338c2bb | 1,382 | py | Python | backtracking/0051-n-queens-backtracking-array.py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-01-10T17:03:21.000Z | 2021-01-10T17:03:21.000Z | backtracking/0051-n-queens-backtracking-array.py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | null | null | null | backtracking/0051-n-queens-backtracking-array.py | ZHUANGHP/LeetCode-Solution-Python | af2b14abb7f50ee061bcd601c8666b32e448cbd8 | [
"Apache-2.0"
] | 1 | 2021-07-25T07:53:14.000Z | 2021-07-25T07:53:14.000Z | from typing import List
class Solution:
def solveNQueens(self, n: int) -> List[List[str]]:
res = []
if n == 0:
return res
nums = [i for i in range(n)]
col = [False for _ in range(n)]
master = [False for _ in range(2 * n - 1)]
slave = [False for _ in ra... | 28.204082 | 85 | 0.484081 |
93fc20baf4dc535f456a71a70d3385be98b9b2a0 | 1,313 | py | Python | listen/test/event_based_scan/test_instance_delete.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/test/event_based_scan/test_instance_delete.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | listen/test/event_based_scan/test_instance_delete.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 52.52 | 83 | 0.570449 |
93fc4215a35ef54113253fc37d71e9e3671af150 | 3,168 | py | Python | scripts/arbitrary_sm.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | null | null | null | scripts/arbitrary_sm.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | null | null | null | scripts/arbitrary_sm.py | gregsmi/sample-metadata | f8d18c3e750475f40147097c2861cc6ffc712a2e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# pylint: disable=no-member,consider-using-with
"""
Run the sample-metadata API through the analysis runner
in a very generic, customisable way!
For example:
python scripts/arbitrary_sm.py \
sample get_sample_by_external_id \
--json '{"project": "acute-care", "external_id": "... | 28.285714 | 82 | 0.662879 |
93fd0b7b625cbf5019990b8eac35ea696cf5eb03 | 1,895 | py | Python | helix/rifdock/submit_cluster.py | ckrivacic/helix_matcher | e1acb518117faf7de9a91270f86d78e066eea903 | [
"MIT"
] | 2 | 2021-04-26T15:14:08.000Z | 2021-06-07T10:56:37.000Z | helix/rifdock/submit_cluster.py | ckrivacic/helix_matcher | e1acb518117faf7de9a91270f86d78e066eea903 | [
"MIT"
] | null | null | null | helix/rifdock/submit_cluster.py | ckrivacic/helix_matcher | e1acb518117faf7de9a91270f86d78e066eea903 | [
"MIT"
] | null | null | null | import pandas as pd
import subprocess
import sys, os, re
import pickle
from klab.rosetta import input_files
from roseasy import pipeline
from roseasy.big_jobs import run_command
'''
Usage:
python3 submit_cluster.py <folder>
'''
def submit_qsub(parent, folders):
python_path = os.environ['ROSEASY_PYTHON']
... | 27.071429 | 93 | 0.638522 |
93fd291034b4bdccd7b9c67498125ee96c4d5815 | 2,476 | py | Python | scripts/leetcode/fb/TheMaze.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | scripts/leetcode/fb/TheMaze.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | 8 | 2020-09-05T16:04:31.000Z | 2022-02-27T09:57:51.000Z | scripts/leetcode/fb/TheMaze.py | bhimeshchauhan/competitive_programming | e0777bb0c425ffa03d8173a83e50ca55c4a3fcf5 | [
"MIT"
] | null | null | null | """
The Maze
There is a ball in a maze with empty spaces (represented as 0) and walls (represented as 1).
The ball can go through the empty spaces by rolling up, down, left or right, but it won't stop
rolling until hitting a wall. When the ball stops, it could choose the next direction.
Given the m x n maze, the ba... | 33.917808 | 128 | 0.577141 |
93fd4607816e9157348008128bfaf7a147e61975 | 22,708 | py | Python | test/mapping/phmrc_age_mapping.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-23T12:57:47.000Z | 2020-04-18T17:13:08.000Z | test/mapping/phmrc_age_mapping.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-09T22:10:07.000Z | 2022-02-16T04:57:06.000Z | test/mapping/phmrc_age_mapping.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 11 | 2018-12-11T22:01:13.000Z | 2022-01-07T11:38:02.000Z | MAPPING = [
{
'sid': 'Adult age binary (yes)',
'symptom': 'age',
'module': 'adult',
'gen_5_4a': 55,
'endorsed': True,
},
{
'sid': 'Adult age binary (no)',
'symptom': 'age',
'module': 'adult',
'gen_5_4a': 45,
'endorsed': False,
... | 25.629797 | 72 | 0.461159 |
93fd802af34d8fabbb65bc514c116f9e6f4b2f16 | 411 | py | Python | examples/nD_labels.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 1 | 2022-03-01T19:38:06.000Z | 2022-03-01T19:38:06.000Z | examples/nD_labels.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 17 | 2020-06-11T21:02:03.000Z | 2021-02-02T19:10:19.000Z | examples/nD_labels.py | mkitti/napari | 4e954d30b5a1b70c5e495db1b8f48a3bdda1ff86 | [
"BSD-3-Clause"
] | 1 | 2020-07-19T18:03:35.000Z | 2020-07-19T18:03:35.000Z | """
Display a labels layer above of an image layer using the add_labels and
add_image APIs
"""
from skimage import data
from scipy import ndimage as ndi
import napari
with napari.gui_qt():
blobs = data.binary_blobs(length=128, volume_fraction=0.1, n_dim=3)
viewer = napari.view_image(blobs.astype(float), name... | 25.6875 | 71 | 0.734793 |
93fd9156c7e53386585885ed3a64f6873c66dd8b | 77 | py | Python | pmxbot/web/__main__.py | Crunch-io/crunchbot | c26a381c10bc5368bd0d208e09ff16d1fb5563ae | [
"MIT"
] | 1 | 2019-04-15T14:04:03.000Z | 2019-04-15T14:04:03.000Z | pmxbot/web/__main__.py | Cloudxtreme/pmxbot | 4b95ed84f1cc60ba0f0fd999ee0a59e6dcf5152e | [
"MIT"
] | 2 | 2018-06-11T20:19:44.000Z | 2020-07-06T03:54:16.000Z | pmxbot/web/__main__.py | Crunch-io/crunchbot | c26a381c10bc5368bd0d208e09ff16d1fb5563ae | [
"MIT"
] | null | null | null | import pmxbot.web.viewer
if __name__ == '__main__':
pmxbot.web.viewer.run()
| 19.25 | 26 | 0.74026 |
93fdcf5cf24fc1cf7055e30be0ddc4d46a03e096 | 3,393 | py | Python | data_loader.py | artyompal/google_landmark_2019 | 34effb2771967da0011e546a775cb5ebeebc45ed | [
"Apache-2.0"
] | 10 | 2019-06-05T21:48:03.000Z | 2021-09-17T11:21:45.000Z | data_loader.py | artyompal/google_landmark_2019 | 34effb2771967da0011e546a775cb5ebeebc45ed | [
"Apache-2.0"
] | null | null | null | data_loader.py | artyompal/google_landmark_2019 | 34effb2771967da0011e546a775cb5ebeebc45ed | [
"Apache-2.0"
] | 5 | 2019-06-06T04:34:52.000Z | 2020-08-26T20:04:54.000Z | ''' Data loaders for training & validation. '''
import math
import os
import pickle
from collections import defaultdict
from glob import glob
from typing import *
import numpy as np
import pandas as pd
import torch
import torch.utils.data
import torchvision.transforms as transforms
from PIL import Image
from tqdm i... | 33.594059 | 95 | 0.585617 |
93fdea39b0e5c309d6e58e09dff25fe0e5d9c896 | 2,619 | py | Python | rules/TasksFileHasValidNameRule.py | ansible-middleware/ansible-lint-custom-rules | 181ec6b8e562fc136caf6fe67a488c9e996686a3 | [
"MIT"
] | 1 | 2022-02-18T07:43:41.000Z | 2022-02-18T07:43:41.000Z | rules/TasksFileHasValidNameRule.py | ansible-middleware/ansible-lint-custom-rules | 181ec6b8e562fc136caf6fe67a488c9e996686a3 | [
"MIT"
] | null | null | null | rules/TasksFileHasValidNameRule.py | ansible-middleware/ansible-lint-custom-rules | 181ec6b8e562fc136caf6fe67a488c9e996686a3 | [
"MIT"
] | null | null | null | # Copyright (C) 2020,2021 Satoru SATOH <satoru.satoh@gmail.com>
# SPDX-License-Identifier: MIT
#
# pylint: disable=invalid-name
"""Lint rule class to test if tasks files have valid filenames.
"""
import functools
import pathlib
import re
import typing
import warnings
import ansiblelint.errors
import ansiblelint.file_u... | 28.16129 | 79 | 0.623902 |
93fe162a6120bd9613ce820db6d6ac1980921090 | 7,463 | py | Python | python/sorngen_genFctnSORN.py | mbaerthel/sorngen | 835a2cf37e1788bf5b91ba77a8c4c52c29db5b70 | [
"MIT"
] | 1 | 2021-04-17T22:38:04.000Z | 2021-04-17T22:38:04.000Z | python/sorngen_genFctnSORN.py | mbaerthel/sorngen | 835a2cf37e1788bf5b91ba77a8c4c52c29db5b70 | [
"MIT"
] | null | null | null | python/sorngen_genFctnSORN.py | mbaerthel/sorngen | 835a2cf37e1788bf5b91ba77a8c4c52c29db5b70 | [
"MIT"
] | null | null | null | ##################################################################
##
## file: sorngen_genFctnSORN.py
##
## (c) 2018/2019 Moritz Bärthel
## University of Bremen
##
##################################################################
# function genFctnSORN
def genFctnSORN(OP,*datatypes):
""" Defines a SORN LUT obje... | 46.067901 | 316 | 0.683639 |
93fe2f245eaefb12003777754098415a526712ee | 6,013 | py | Python | papas/parsers/configparse.py | edponce/papas | 7deb831d852c4f172ef87270bb3629cee5269799 | [
"MIT"
] | null | null | null | papas/parsers/configparse.py | edponce/papas | 7deb831d852c4f172ef87270bb3629cee5269799 | [
"MIT"
] | null | null | null | papas/parsers/configparse.py | edponce/papas | 7deb831d852c4f172ef87270bb3629cee5269799 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from configparser import (
ParsingError, InterpolationSyntaxError, InterpolationDepthError,
InterpolationMissingOptionError, NoSectionError, NoOptionError
)
import configparser
import collections
import re
__all__ = ['MyParser']
class MyInterpolation(configparser.ExtendedInterpolati... | 34.959302 | 78 | 0.508398 |
93fe461aa566d7ea557eef492ef5000fa224698a | 9,071 | py | Python | tests/repository_test.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | tests/repository_test.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | tests/repository_test.py | bukzor/pre-commit | 7d546c1f815a41f17af276e2f8d0636efdd87a6d | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
import io
import mock
import os.path
import pytest
from plumbum import local
from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA
from pre_commit.clientlib.validate_config import validate_config_extra
from pre_commit.jsonsch... | 30.036424 | 78 | 0.672362 |
93fe57fad273691ca94ff88c8177809200005062 | 3,589 | py | Python | tensorflow2/class3/HW3_base_todo.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 1 | 2021-03-27T05:31:08.000Z | 2021-03-27T05:31:08.000Z | tensorflow2/class3/HW3_base_todo.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | null | null | null | tensorflow2/class3/HW3_base_todo.py | riciche/SimpleCVReproduction | 4075de39f9c61f1359668a413f6a5d98903fcf97 | [
"Apache-2.0"
] | 1 | 2021-11-13T13:12:37.000Z | 2021-11-13T13:12:37.000Z | import os
import time
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import Model, Sequential
from tensorflow.keras import backend as K
from tensorflow.keras.layers import (Activation, Conv2D, Dense, Flatten, Input,
... | 29.178862 | 79 | 0.691279 |
93fe65e045438b3d97e9a2ec3a9cc66ff297c3ad | 8,594 | py | Python | bark_ml/tests/capability_gnn_actor/data_generation.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | 3 | 2020-04-25T12:38:55.000Z | 2020-04-29T11:55:45.000Z | bark_ml/tests/capability_gnn_actor/data_generation.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | 1 | 2020-07-19T06:58:21.000Z | 2020-07-19T06:58:21.000Z | bark_ml/tests/capability_gnn_actor/data_generation.py | mansoorcheema/bark-ml | 349c0039a5f54778d6b7aea7fd18e3e979efc3a3 | [
"MIT"
] | 1 | 2022-01-27T13:08:46.000Z | 2022-01-27T13:08:46.000Z | # Copyright (c) 2020 fortiss GmbH
#
# Authors: Silvan Wimmer
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import os
import numpy as np
import time
import pickle
import logging
from collections import OrderedDict
# BARK imports
fr... | 37.203463 | 83 | 0.664184 |
93fe6b03ddd57d77c42a8dd3f988f9b60f0d3863 | 374 | py | Python | monitoring/dht.py | tBaxter/pi-things | ecba577748178f1a85b393144d872a16112ee26d | [
"CC0-1.0"
] | null | null | null | monitoring/dht.py | tBaxter/pi-things | ecba577748178f1a85b393144d872a16112ee26d | [
"CC0-1.0"
] | null | null | null | monitoring/dht.py | tBaxter/pi-things | ecba577748178f1a85b393144d872a16112ee26d | [
"CC0-1.0"
] | null | null | null | import Adafruit_DHT
import time
DHT_SENSOR = Adafruit_DHT.DHT11
DHT_PIN = 4
while True:
humidity, temperature = Adafruit_DHT.read(DHT_SENSOR, DHT_PIN)
if humidity is not None and temperature is not None:
print("Temp={0:0.1f}C Humidity={1:0.1f}%".format(temperature, humidity))
else:
print... | 26.714286 | 80 | 0.695187 |
93fe819d923fab50aa6c06679cc1b3354bff543c | 2,387 | py | Python | tests/unit/utils/test_time_formats.py | ymubarka/merlin | 3f1e4318c20ccdcca95dd6044bc0d8727ed9ca8a | [
"MIT"
] | 50 | 2019-11-20T03:14:16.000Z | 2022-03-30T07:55:37.000Z | tests/unit/utils/test_time_formats.py | ymubarka/merlin | 3f1e4318c20ccdcca95dd6044bc0d8727ed9ca8a | [
"MIT"
] | 150 | 2019-11-26T23:31:55.000Z | 2022-03-28T21:23:05.000Z | tests/unit/utils/test_time_formats.py | ymubarka/merlin | 3f1e4318c20ccdcca95dd6044bc0d8727ed9ca8a | [
"MIT"
] | 12 | 2019-11-20T20:48:33.000Z | 2021-08-10T15:08:36.000Z | import datetime
from typing import List, Optional, Union
import pytest
from merlin.utils import convert_timestring, repr_timedelta
@pytest.mark.parametrize(
"time_string, expected_result, method",
[
("01:00:00", "01:00:00", "HMS"),
("01:00:00", "3600.0s", "FSD"),
("1:00", "00:01:00",... | 42.625 | 127 | 0.627566 |
93fe92740bef003f73f98dc82586aaba103ad91d | 4,136 | py | Python | datatools/gdbgeneration/gdb_ext_tscreator.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | 8 | 2018-10-30T16:48:44.000Z | 2021-03-08T01:44:41.000Z | datatools/gdbgeneration/gdb_ext_tscreator.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | null | null | null | datatools/gdbgeneration/gdb_ext_tscreator.py | plin1112/ANI-Tools | 76280c918fc79fee8c266b8bc9ab57f86104ec99 | [
"MIT"
] | 5 | 2018-04-05T15:51:12.000Z | 2019-05-23T21:38:31.000Z | import gdbsearchtools as gdb
import pyaniasetools as aat
import hdnntools as hdn
import rdkit
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
from rdkit.ForceField.rdForceField import *
import numpy as np
import os
import linecache
import mmap
import random
def mapcount(filename):... | 25.85 | 141 | 0.588733 |
93fe94c7650988b08b07e6e55e62c755c62672bd | 1,062 | py | Python | src/layout/models/models.py | carlzoulingxiang/UBC-dashboard-project | 537c2b47fe3940923ef9dc3f8e51c6526101b567 | [
"MIT"
] | null | null | null | src/layout/models/models.py | carlzoulingxiang/UBC-dashboard-project | 537c2b47fe3940923ef9dc3f8e51c6526101b567 | [
"MIT"
] | 1 | 2022-03-07T00:59:06.000Z | 2022-03-07T00:59:06.000Z | src/layout/models/models.py | ubco-mds-2021-labs/dashboard1-group-c | ed1390d889af2cf59b906c23bb654d3bd78776e8 | [
"MIT"
] | null | null | null | import altair as alt
from data import load_data
from app import cache
wind = load_data(index=True)
@cache.memoize(timeout=50)
def bar_chart(selector: str = None) -> str:
"""
Function returns a bar chart of model count in each province
Args:
Selector: province. Defaults to None.
Returns... | 28.702703 | 106 | 0.641243 |
93fe9e2f1e1f158bae289e8d6c55a95a810360e5 | 3,358 | py | Python | apischema/json_schema/types.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | null | null | null | apischema/json_schema/types.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | null | null | null | apischema/json_schema/types.py | kevinheavey/apischema | 6307a67c4545d1e16e1ee49bd44d9e0fd155820d | [
"MIT"
] | null | null | null | from enum import Enum
from functools import wraps
from inspect import signature
from typing import (
Any,
Callable,
Collection,
Dict,
Mapping,
Pattern,
Sequence,
Type,
TypeVar,
Union,
cast,
)
from apischema.conversions import Conversion, serializer
from apischema.types impor... | 25.830769 | 82 | 0.640262 |
93fed4ee31c826a3094b2faa6fe0f4b946e736cf | 20,122 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_only_authentications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_only_authentications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_server_azure_ad_only_authentications_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.370192 | 227 | 0.686015 |
93ff4ec77bd604fc069903a202a618366417794a | 3,795 | py | Python | venv/lib/python3.8/site-packages/mplfinance/_mplwraps.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/mplfinance/_mplwraps.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/mplfinance/_mplwraps.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib.figure as mplfigure
from mplfinance import _styles
"""
This file contains:
(1) A wrapper of method `matplotlib.pyplot.figure()` that creates a
`mplfinance.Mpf_Figure` which is derived from `matplotlib.figure.Figure`
The wrapper function is t... | 33.289474 | 102 | 0.650329 |
93ff5c361ecf66e92b011673e261df568d823d8b | 4,754 | py | Python | tests/test_overloadaction_sum.py | fossilfree/Numerous | 121cd00456f263cab9def10cb99a21655f5832c9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_overloadaction_sum.py | fossilfree/Numerous | 121cd00456f263cab9def10cb99a21655f5832c9 | [
"BSD-3-Clause"
] | null | null | null | tests/test_overloadaction_sum.py | fossilfree/Numerous | 121cd00456f263cab9def10cb99a21655f5832c9 | [
"BSD-3-Clause"
] | null | null | null | from numerous.engine.system import Item, Subsystem
from numerous.multiphysics import EquationBase, Equation
from numerous.engine.model import Model
from numerous.engine.simulation import Simulation
import numpy as np
import pytest
from pytest import approx
from numerous.engine.simulation.solvers.base_solver import sol... | 33.013889 | 114 | 0.673959 |
93ff7966b6e3b1867adab2be581f10ae1bb42dac | 1,418 | py | Python | filegenerator.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | filegenerator.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | 1 | 2022-03-12T00:57:37.000Z | 2022-03-12T00:57:37.000Z | filegenerator.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | from django.http import StreamingHttpResponse
from django.utils.text import get_valid_filename
from mighty.functions import make_searchable
import csv
class StreamingBuffer:
def write(self, value): return value
class FileGenerator:
filename = None
items = []
fields = ()
ct_list = {
"text/c... | 33.761905 | 91 | 0.653738 |
93ff849ab9ac72b726b586eb485ee6a2ad62ee61 | 18,093 | py | Python | mudpi/extensions/nfc/__init__.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 163 | 2020-02-17T16:34:54.000Z | 2022-02-28T23:12:11.000Z | mudpi/extensions/nfc/__init__.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 28 | 2020-05-05T19:42:25.000Z | 2021-08-04T18:36:32.000Z | mudpi/extensions/nfc/__init__.py | icyspace/mudpi-core | d2afffacee0ba5c5ca57eada3017495d8697c5a4 | [
"BSD-4-Clause"
] | 31 | 2020-02-27T18:30:42.000Z | 2022-01-18T21:14:56.000Z | """
NFC Extension
Allows reading and writing to
NFC cards and tags.
"""
import nfc
import ndef
import time
import datetime
import threading
from uuid import uuid4
from mudpi.workers import Worker
from mudpi.extensions import BaseExtension
from mudpi.logger.Logger import Logger, LOG_LEVEL
from mudpi.constan... | 37.228395 | 187 | 0.52921 |
93ff87e90faabe64090f64e20ec78214616b5fbb | 1,569 | py | Python | leetcode/145_Binary_Tree_Postorder_Traversal.py | PhillipLeeHub/algorithm-and-data-structure | c0c27fee1b4fd634084da0b41395a26307d76e69 | [
"MIT"
] | 1 | 2020-05-01T21:29:17.000Z | 2020-05-01T21:29:17.000Z | leetcode/145_Binary_Tree_Postorder_Traversal.py | PhillipLeeHub/algorithm-and-data-structure | c0c27fee1b4fd634084da0b41395a26307d76e69 | [
"MIT"
] | null | null | null | leetcode/145_Binary_Tree_Postorder_Traversal.py | PhillipLeeHub/algorithm-and-data-structure | c0c27fee1b4fd634084da0b41395a26307d76e69 | [
"MIT"
] | 1 | 2020-06-12T23:32:14.000Z | 2020-06-12T23:32:14.000Z | '''
145. Binary Tree Postorder Traversal Easy
Given the root of a binary tree, return the postorder traversal of its nodes' values.
Example 1:
Input: root = [1,null,2,3]
Output: [3,2,1]
Example 2:
Input: root = []
Output: []
Example 3:
Input: root = [1]
Output: [1]
Example 4:
Input: root = [1,2]
Output: [2,1... | 20.376623 | 85 | 0.547482 |
93ffbb9e4d50f99c594e2d471683a3460f6d0206 | 423 | py | Python | app/__init__.py | BABAYAGI/newsapi | 6127d51e702983f2928849bef08c5920f7d06a96 | [
"MIT"
] | null | null | null | app/__init__.py | BABAYAGI/newsapi | 6127d51e702983f2928849bef08c5920f7d06a96 | [
"MIT"
] | null | null | null | app/__init__.py | BABAYAGI/newsapi | 6127d51e702983f2928849bef08c5920f7d06a96 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
from config import config_options
app = Flask(__name__,instance_relative_config= True)
bootstrap = Bootstrap(app)
def create_app(config_name):
app = Flask(__name__)
app.config.from_object(config_options[config_name])
bootstrap.init_app(app)
... | 23.5 | 55 | 0.78487 |
93ffc5eaeb11f3fdcb3280b9fb3f6cc76621d27f | 826 | py | Python | mountaintools/vdomr/server_example/server_example.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | mountaintools/vdomr/server_example/server_example.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | mountaintools/vdomr/server_example/server_example.py | tjd2002/spikeforest2 | 2e393564b858b2995aa2ccccd9bd73065681b5de | [
"Apache-2.0"
] | null | null | null | import vdomr as vd
import os
class Status(vd.Component):
def __init__(self):
vd.Component.__init__(self)
self._status = ''
def setStatus(self, status):
self._status = status
self.refresh()
def render(self):
return vd.div('STATUS: '+self._status)
class MyApp():
... | 21.179487 | 69 | 0.564165 |
93ffe256bb883213089656df46f3c604957bc939 | 3,134 | py | Python | rest-service/manager_rest/responses_v2.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 1 | 2015-11-03T14:27:11.000Z | 2015-11-03T14:27:11.000Z | rest-service/manager_rest/responses_v2.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | 2 | 2021-03-20T05:33:19.000Z | 2021-03-26T00:38:21.000Z | rest-service/manager_rest/responses_v2.py | acidburn0zzz/cloudify-manager | ee2224c52347f7461a95976179ab61aee74a49dd | [
"Apache-2.0"
] | null | null | null | #########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. 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... | 39.670886 | 79 | 0.64582 |
9e0034f9d5c809db61f452233efe633aeeff58fd | 8,516 | py | Python | zombreak_server.py | devdo-eu/zombreak | 05958a7e3980de1933eebda8645dda2db3d0da71 | [
"MIT"
] | null | null | null | zombreak_server.py | devdo-eu/zombreak | 05958a7e3980de1933eebda8645dda2db3d0da71 | [
"MIT"
] | 1 | 2021-04-01T06:18:33.000Z | 2021-04-01T06:18:33.000Z | zombreak_server.py | devdo-eu/zombreak | 05958a7e3980de1933eebda8645dda2db3d0da71 | [
"MIT"
] | null | null | null | from typing import Optional
from fastapi import FastAPI
from fastapi.responses import HTMLResponse, JSONResponse
from pydantic import BaseModel
from collections.abc import Callable, Awaitable
import asyncio
from player.player_shelter import PlayerShelter
import logic.game_state as game
import uuid
import os.path as pat... | 37.350877 | 116 | 0.688351 |
9e004c960e1045833749d5aef4bc1d3bcaa1e3c5 | 143 | py | Python | python/illusionist/__init__.py | ocefpaf/illusionist | fc4db24230a5ed6f5756df3aacef344fe12fabf3 | [
"Apache-2.0"
] | 9 | 2020-06-11T17:09:17.000Z | 2021-11-16T13:44:05.000Z | python/illusionist/__init__.py | ocefpaf/illusionist | fc4db24230a5ed6f5756df3aacef344fe12fabf3 | [
"Apache-2.0"
] | 2 | 2020-08-30T19:58:30.000Z | 2021-09-29T02:08:55.000Z | python/illusionist/__init__.py | ocefpaf/illusionist | fc4db24230a5ed6f5756df3aacef344fe12fabf3 | [
"Apache-2.0"
] | 1 | 2021-09-30T17:20:32.000Z | 2021-09-30T17:20:32.000Z | from .exporter_html import IllusionistHTMLExporter # noqa
from .exporter_nb import IllusionistNotebookExporter # noqa
__version__ = "0.3.0"
| 28.6 | 60 | 0.811189 |
9e005c3026732583f4a0a366c22408f916d8b861 | 4,781 | py | Python | alipay/aop/api/response/AlipayOpenSearchBoxQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenSearchBoxQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayOpenSearchBoxQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.SearchBoxAccountModule import SearchBoxAccountModule
from alipay.aop.api.domain.SearchBoxBasicInfoModule import SearchBoxBasicInfoModule
from alipay.aop.api.domain.Sear... | 35.947368 | 105 | 0.694415 |
9e008cd2f79b8bf4a0fbea4e321d007db4045a9f | 13,130 | py | Python | conans/test/model/settings_test.py | TyRoXx/conan | 644516b5126f78f46275a9f6a01148183c9d149f | [
"MIT"
] | 1 | 2017-05-06T06:56:08.000Z | 2017-05-06T06:56:08.000Z | conans/test/model/settings_test.py | TyRoXx/conan | 644516b5126f78f46275a9f6a01148183c9d149f | [
"MIT"
] | 1 | 2016-06-12T11:19:49.000Z | 2016-06-14T18:38:14.000Z | conans/test/model/settings_test.py | tru/conan | b9266be3cd026e4a8ea1262e557f4259ed36e9f1 | [
"MIT"
] | null | null | null | from conans.errors import ConanException
import unittest
from conans.model.settings import Settings
from conans.model.config_dict import bad_value_msg, undefined_field, undefined_value
class SettingsTest(unittest.TestCase):
def setUp(self):
data = {"compiler": {
"Visual Studio... | 40.276074 | 99 | 0.541813 |
9e009e849e4925848b46fc83ba388211e446a00c | 1,155 | py | Python | src_hindi/position_encoding.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 7 | 2021-12-14T07:12:00.000Z | 2022-02-25T00:23:44.000Z | src_hindi/position_encoding.py | AI-Swasthyam/fixMyPose | 37c668adcd54bca3f259f1bfee07588f77861bc1 | [
"MIT"
] | 2 | 2021-11-22T15:27:38.000Z | 2021-12-01T13:29:29.000Z | src_hindi/position_encoding.py | hyounghk/FixMyPose | 1b31c7f9e25ade6ee929cbbdc56d50162a8c2218 | [
"MIT"
] | null | null | null | import math
import torch
import torch.nn as nn
class PositionEncoding(nn.Module):
def __init__(self, n_filters=128, max_len=500):
super(PositionEncoding, self).__init__()
# Compute the positional encodings once in log space.
pe = torch.zeros(max_len, n_filters) # (L, D)
position... | 26.25 | 103 | 0.6 |
9e00a022ae8f22c883bfdf87d45ae7667c74ff9d | 5,509 | py | Python | src/speech/train_joint_spec_full.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 6 | 2020-08-03T03:13:25.000Z | 2022-02-11T08:32:10.000Z | src/speech/train_joint_spec_full.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 1 | 2020-09-08T16:10:38.000Z | 2020-09-08T16:10:38.000Z | src/speech/train_joint_spec_full.py | dem123456789/Speech-Emotion-Recognition-with-Dual-Sequence-LSTM-Architecture | a072cb940201bbcdb2d0f4d0dfa1dde478fa4464 | [
"MIT"
] | 2 | 2020-08-03T21:37:21.000Z | 2021-03-26T02:19:17.000Z | import torch
from torch import optim
from model_joint_spec_full import SpectrogramModel
from process_joint_spec_full import IEMOCAP,my_collate
from torch.utils.data import DataLoader
from torch.optim.lr_scheduler import ReduceLROnPlateau, CosineAnnealingLR, MultiStepLR
import pdb
from torch.nn import DataParallel
impor... | 49.1875 | 198 | 0.662008 |
9e00af7e47041a58f919269e994c8ff6640c74f4 | 528 | py | Python | setup.py | otimgren/centrex-data-analysis | 114252cb61e0ec73a423467cee59b29677decfc5 | [
"MIT"
] | null | null | null | setup.py | otimgren/centrex-data-analysis | 114252cb61e0ec73a423467cee59b29677decfc5 | [
"MIT"
] | null | null | null | setup.py | otimgren/centrex-data-analysis | 114252cb61e0ec73a423467cee59b29677decfc5 | [
"MIT"
] | null | null | null | from setuptools import find_packages, setup
VERSION = "0.1"
DESCRIPTION = "Data analysis tools for the CeNTREX experiment."
setup(
name="data_analysis",
version=VERSION,
author="Oskari Timgren",
description=DESCRIPTION,
packages=find_packages(where="src"),
package_dir={"": "src"},
install_... | 22 | 63 | 0.568182 |
9e00dcb0d8f39d2f686f1122be1ecfec5e40c4e6 | 5,908 | py | Python | pipeline_dp/aggregate_params.py | yuan2z/PipelineDP | 54634930374a77c7bb1037b5b771f90acd751b60 | [
"Apache-2.0"
] | null | null | null | pipeline_dp/aggregate_params.py | yuan2z/PipelineDP | 54634930374a77c7bb1037b5b771f90acd751b60 | [
"Apache-2.0"
] | null | null | null | pipeline_dp/aggregate_params.py | yuan2z/PipelineDP | 54634930374a77c7bb1037b5b771f90acd751b60 | [
"Apache-2.0"
] | null | null | null | """Contains utility classes used for specifying DP aggregation parameters, noise types, and norms."""
from dataclasses import dataclass
from enum import Enum
from typing import Any, Iterable, Callable, Union
class Metrics(Enum):
COUNT = 'count'
PRIVACY_ID_COUNT = 'privacy_id_count'
SUM = 'sum'
MEAN =... | 35.166667 | 101 | 0.703622 |
9e00f9e5674f4ef9ac68c58d60b04436096fd39f | 284,115 | py | Python | tests/test_backend.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | null | null | null | tests/test_backend.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | null | null | null | tests/test_backend.py | LoicDagnas/tensorflow-onnx | 6691850e79047d05d85017573170fd8240393b57 | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: Apache-2.0
"""Unit tests using onnx backends."""
import os
import unittest
from distutils.version import LooseVersion
from itertools import product
import numpy as np
from numpy.testing import assert_almost_equal
import tensorflow as tf
from tensorflow.python.ops import lookup_ops
from b... | 48.741637 | 120 | 0.593186 |
9e013c5eefa6fa50b78f5d22aa384c70b511f1a6 | 1,461 | py | Python | tests/workers/test_cbc_padding_oracle_ok.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/workers/test_cbc_padding_oracle_ok.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | tests/workers/test_cbc_padding_oracle_ok.py | timb-machine-mirrors/tlsmate | 1313161b9170311f466a3a43b3d84797cecc0291 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Implements a class to be used for unit testing.
"""
import pathlib
from tlsmate.workers.padding_oracle import ScanPaddingOracle
from tlsmate.tlssuite import TlsSuiteTester
from tlsmate.tlssuite import TlsLibrary
class TestCase(TlsSuiteTester):
"""Class used for tests with pytest.
F... | 33.976744 | 76 | 0.682409 |
9e013ec97e4991c9080778cfe8213dbdda40e590 | 2,945 | py | Python | apps/hashblock_cli/scripts/iso4217_to_assets.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 5 | 2018-04-05T07:02:04.000Z | 2018-07-10T09:39:03.000Z | apps/hashblock_cli/scripts/iso4217_to_assets.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | 89 | 2018-03-11T14:46:07.000Z | 2018-09-07T14:50:42.000Z | apps/hashblock_cli/scripts/iso4217_to_assets.py | hashblock/sawtooth-uom | 0b8f131ee4f2a3a70a19f21bc88fe064d39fe5cd | [
"MIT"
] | null | null | null | # ------------------------------------------------------------------------------
# Copyright 2018 Frank V. Castellucci and Arthur Greef
#
# 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
#
# ... | 32.01087 | 80 | 0.563667 |
9e0178f971d6d5d9a8799d6830dc9ae8c70a87de | 392 | py | Python | docs/_ext/djangodummy/settings.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 1 | 2016-10-05T05:17:35.000Z | 2016-10-05T05:17:35.000Z | docs/_ext/djangodummy/settings.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 17 | 2016-09-30T13:43:20.000Z | 2021-06-10T20:44:40.000Z | docs/_ext/djangodummy/settings.py | luiscberrocal/django-acp-calendar | 7251d7cbb1ba16983bbc3ba9af6178eb31408bee | [
"BSD-3-Clause"
] | 6 | 2016-04-11T14:41:44.000Z | 2017-10-20T21:16:39.000Z | # Settings file to allow parsing API documentation of Django modules,
# and provide defaults to use in the documentation.
#
# This file is placed in a subdirectory,
# so the docs root won't be detected by find_packages()
# Display sane URLs in the docs:
STATIC_URL = '/static/'
# Avoid error for missing the secret key... | 24.5 | 69 | 0.75 |
9e022273d85252f77ed31e9111d362ff1ca44a57 | 851 | py | Python | aio_graphite_api/finders/standard_finder.py | yunstanford/aio-graphite-api | 819b82c451c23ce5928e711202bde79a5399c3da | [
"Apache-2.0"
] | 1 | 2016-12-09T04:14:16.000Z | 2016-12-09T04:14:16.000Z | aio_graphite_api/finders/standard_finder.py | yunstanford/aio-graphite-api | 819b82c451c23ce5928e711202bde79a5399c3da | [
"Apache-2.0"
] | 1 | 2017-02-06T22:15:07.000Z | 2017-02-06T23:01:04.000Z | aio_graphite_api/finders/standard_finder.py | yunstanford/aio-graphite-api | 819b82c451c23ce5928e711202bde79a5399c3da | [
"Apache-2.0"
] | null | null | null | import os
from aio_graphite_api.models.node import BranchNode, LeafNode
try:
from os import scandir, walk
except ImportError:
from scandir import scandir, walk
def _has_wild_cards(query):
return query.find('{') > -1 or query.find('[') > -1 or query.find('*') > -1 or query.find('?') > -1
class StandardFinde... | 21.275 | 100 | 0.688602 |
9e0224e041ff0fbf2aa63be607e9a7149ef7a709 | 2,689 | py | Python | tests/unit/models/reddit/test_collections.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 72 | 2020-07-14T02:02:21.000Z | 2022-03-15T13:10:02.000Z | tests/unit/models/reddit/test_collections.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 68 | 2020-07-16T05:29:43.000Z | 2022-03-14T12:04:56.000Z | tests/unit/models/reddit/test_collections.py | Lordshinjo/asyncpraw | d94d89a992d9b5b300439ea6884a9df1d95511e2 | [
"BSD-2-Clause"
] | 19 | 2020-07-22T15:34:30.000Z | 2022-03-27T20:28:46.000Z | """Test classes from collections.py."""
import pytest
from asyncpraw.models import Collection
from asyncpraw.models.reddit.collections import SubredditCollections
from ... import UnitTest
class TestCollection(UnitTest):
def test_eq(self):
uuid = "fake_uuid"
permalink = f"https://reddit.com/r/sub... | 37.347222 | 81 | 0.650428 |
9e0232781fc108cfdf76b6429da03631f56bcc14 | 10,781 | py | Python | tests/test_pytest_datafiles.py | tomjnixon/pytest-datafiles | 3494b4890969bff8dbd8fd804e1bf11cb994a0d9 | [
"MIT"
] | null | null | null | tests/test_pytest_datafiles.py | tomjnixon/pytest-datafiles | 3494b4890969bff8dbd8fd804e1bf11cb994a0d9 | [
"MIT"
] | null | null | null | tests/test_pytest_datafiles.py | tomjnixon/pytest-datafiles | 3494b4890969bff8dbd8fd804e1bf11cb994a0d9 | [
"MIT"
] | null | null | null | """
Tests for the pytest-datafiles pytest plugin
"""
import os
from py import path # pylint: disable=E0611
import pytest
pytest_plugins = 'pytester' # pylint: disable=C0103
TEST_DIR = os.path.dirname(os.path.realpath(__file__))
FIXTURE_DIR = os.path.join(TEST_DIR, '_fixture_files')
FIXTURE_FILES = [
os.path.... | 29.699725 | 79 | 0.639551 |
9e028414b9433fb15c1474edb36256fa2b8f3a67 | 327 | py | Python | site_ifoundadog/settings_dev.py | jeturcotte/ifoundadog | e7b9867ada1890af10cc4bbe6328af97723e87ee | [
"Apache-2.0"
] | null | null | null | site_ifoundadog/settings_dev.py | jeturcotte/ifoundadog | e7b9867ada1890af10cc4bbe6328af97723e87ee | [
"Apache-2.0"
] | null | null | null | site_ifoundadog/settings_dev.py | jeturcotte/ifoundadog | e7b9867ada1890af10cc4bbe6328af97723e87ee | [
"Apache-2.0"
] | null | null | null | import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
# Database
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
... | 23.357143 | 70 | 0.657492 |
9e0290b628dc565d1eb167d1867a139356d038b2 | 6,249 | py | Python | pebm/Preprocessing.py | SheinaG/pebm_new | ab5822a66c18d18dcf52e1b6af8b1bd515462fd2 | [
"MIT"
] | null | null | null | pebm/Preprocessing.py | SheinaG/pebm_new | ab5822a66c18d18dcf52e1b6af8b1bd515462fd2 | [
"MIT"
] | null | null | null | pebm/Preprocessing.py | SheinaG/pebm_new | ab5822a66c18d18dcf52e1b6af8b1bd515462fd2 | [
"MIT"
] | null | null | null | import numpy as np
import mne
from scipy.signal import butter, sosfiltfilt
from scipy.spatial import cKDTree
from pebm.ebm.FiducialPoints import FiducialPoints
from pebm._ErrorHandler import _check_shape_, WrongParameter
class Preprocessing:
def __init__(self, signal: np.array, fs: int):
"""
... | 35.708571 | 129 | 0.546007 |
9e02bb6ad81b4c63110a84305af2359683d41858 | 151 | py | Python | tbonlineproject/tweets/admin.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | null | null | null | tbonlineproject/tweets/admin.py | nathangeffen/tbonline3 | 1b8a3af8d2dc1ee8083ca6638d025e94bd98f253 | [
"MIT"
] | 3 | 2021-06-08T23:57:13.000Z | 2022-01-13T03:42:01.000Z | tbonlineproject/tweets/admin.py | nathangeffen/tbonline-2 | 0d5869197e66a0057fa07cb99f21dde7f5b47c30 | [
"MIT"
] | null | null | null | from django.contrib import admin
from tweets.models import TwitterUsername, Hashtag
admin.site.register(TwitterUsername)
admin.site.register(Hashtag)
| 25.166667 | 50 | 0.847682 |
9e02ce8068bd55e5077b423ff723342b9f1fbdc6 | 4,813 | py | Python | src/lib/pnfont.py | yoshinari-nomura/pinot | 7a3aa5054e31fd7321f6691d04f42b8b8834b516 | [
"MIT"
] | null | null | null | src/lib/pnfont.py | yoshinari-nomura/pinot | 7a3aa5054e31fd7321f6691d04f42b8b8834b516 | [
"MIT"
] | null | null | null | src/lib/pnfont.py | yoshinari-nomura/pinot | 7a3aa5054e31fd7321f6691d04f42b8b8834b516 | [
"MIT"
] | null | null | null | from struct import unpack
# 1st byte mask:
# | 1st byte | prefix mask | value mask |
# |---------------------+------------------+------------------|
# | 0xxxxxxx (0x00 + x) | 1000_0000 (0x80) | 0111_1111 (0x7f) |
# | 110xxxxx (0xc0 + x) | 1110_0000 (0xe0) | 0001_1111 (0x1f) |
# | 1110xxxx (0xe0 +... | 30.656051 | 114 | 0.505506 |
9e02de2d4792d45fd1dc145462fe3c986d645465 | 6,243 | py | Python | mailpile/mailboxes/mbox.py | Sebrowsky/Mailpile | 79ff1dd989a0994758fcaccd9154944a32020c46 | [
"Apache-2.0"
] | 2 | 2017-02-03T07:00:57.000Z | 2020-12-18T01:07:34.000Z | mailpile/mailboxes/mbox.py | Sebrowsky/Mailpile | 79ff1dd989a0994758fcaccd9154944a32020c46 | [
"Apache-2.0"
] | null | null | null | mailpile/mailboxes/mbox.py | Sebrowsky/Mailpile | 79ff1dd989a0994758fcaccd9154944a32020c46 | [
"Apache-2.0"
] | null | null | null | import mailbox
import os
import threading
import mailpile.mailboxes
from mailpile.mailboxes import MBX_ID_LEN, NoSuchMailboxError
from mailpile.util import *
class MailpileMailbox(mailbox.mbox):
"""A mbox class that supports pickling and a few mailpile specifics."""
@classmethod
def parse_path(cls, fn, ... | 33.929348 | 77 | 0.526029 |
9e02f58c1a06155b39d3632b164a2f470de46811 | 271 | py | Python | tests/testapp/urls.py | Thermondo/viewflow-extensions | 5d2bbfe28ced7dda3e6832b96ea031c1b871053e | [
"Apache-2.0"
] | 16 | 2016-03-11T14:30:48.000Z | 2021-01-19T08:09:19.000Z | tests/testapp/urls.py | Thermondo/viewflow-extensions | 5d2bbfe28ced7dda3e6832b96ea031c1b871053e | [
"Apache-2.0"
] | 32 | 2016-05-23T10:59:09.000Z | 2019-01-03T09:13:11.000Z | tests/testapp/urls.py | Thermondo/viewflow-extensions | 5d2bbfe28ced7dda3e6832b96ea031c1b871053e | [
"Apache-2.0"
] | 7 | 2016-03-11T17:55:47.000Z | 2020-02-24T18:20:58.000Z | from django.conf.urls import include, url
from viewflow.flow.viewset import FlowViewSet
from . import flows
urlpatterns = [
url(r'^savable-flow/', include((FlowViewSet(flows.SavableFlow).urls, 'testapp'),
namespace='savable')),
]
| 27.1 | 84 | 0.649446 |
9e031e381fa368b23a8299740f64e1e6169e9077 | 7,942 | py | Python | test/unit/stat/test_period.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | null | null | null | test/unit/stat/test_period.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | 5 | 2016-11-28T16:59:44.000Z | 2017-03-18T17:10:40.000Z | test/unit/stat/test_period.py | arielmakestuff/loadlimit | 70d3d23eecfe7922699098ea4901cc8673d14576 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# test/unit/stat/test_period.py
# Copyright (C) 2016 authors and contributors (see AUTHORS file)
#
# This module is released under the MIT License.
"""Test Period class"""
# ============================================================================
# Imports
# ===============================... | 27.672474 | 78 | 0.469277 |
9e034528615ac2455242d9d8a808e83ed441896f | 5,572 | py | Python | VideoSearchWithAutoMLVision/AutoML_Vision_Classifier_PowerSkill/powerskill/extractor.py | tomconte/media-services-video-indexer | 245d15eaf90d001833623fbd335f7d9acf96dd31 | [
"MIT"
] | null | null | null | VideoSearchWithAutoMLVision/AutoML_Vision_Classifier_PowerSkill/powerskill/extractor.py | tomconte/media-services-video-indexer | 245d15eaf90d001833623fbd335f7d9acf96dd31 | [
"MIT"
] | null | null | null | VideoSearchWithAutoMLVision/AutoML_Vision_Classifier_PowerSkill/powerskill/extractor.py | tomconte/media-services-video-indexer | 245d15eaf90d001833623fbd335f7d9acf96dd31 | [
"MIT"
] | null | null | null | import base64
import heapq
import io
import logging
import os
import string
from zipfile import ZipFile
import requests
from azureml.contrib.automl.dnn.vision.classification.inference.score import _score_with_model
from azureml.contrib.automl.dnn.vision.common.model_export_utils import run_inference
from dotenv import... | 32.395349 | 109 | 0.638011 |
9e036419fc0e671b4662b00338ec946c0a59887a | 5,215 | py | Python | alipay/aop/api/domain/AlipayEcoContractMessageSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayEcoContractMessageSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayEcoContractMessageSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayEcoContractMessageSendModel(object):
def __init__(self):
self._batch_no = None
self._cert_no = None
self._cert_type = None
self._flow_id = None
self.... | 32.191358 | 87 | 0.575839 |
9e036a28251f227a2b3468a06696e5f0e9213dec | 5,431 | py | Python | alipay/aop/api/response/AlipayUserFamilyShareZmgoQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayUserFamilyShareZmgoQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayUserFamilyShareZmgoQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayUserFamilyShareZmgoQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayUserFamilyShareZmgoQueryResponse, self).__init__()
self._agreement_name = None... | 30.857955 | 111 | 0.666912 |
9e03c9bc344007344c30b245f4131454f0b64d5b | 9,473 | py | Python | ngsutils/bam/count.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 57 | 2015-03-09T01:26:45.000Z | 2022-02-22T07:26:01.000Z | ngsutils/bam/count.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-02-03T23:24:46.000Z | 2022-03-16T20:08:10.000Z | ngsutils/bam/count.py | bgruening/ngsutils | 417e90dc1918fb553dd84990f2c54bd8cea8f44d | [
"BSD-3-Clause"
] | 33 | 2015-01-18T16:47:47.000Z | 2022-02-22T07:28:09.000Z | #!/usr/bin/env python
## category RNA-seq
## desc Calculates counts/FPKM for genes/BED regions/repeats (also CNV)
'''
Counts the number of reads in genes or regions
This takes a gene/region model and a BAM file and calculates how many reads
show support of each gene/region.
Possible annotation models: gtf, exon, bed,... | 37.59127 | 124 | 0.611633 |
9e03d5451cf60a84cb4f9e8c1f6f28304fec0654 | 2,001 | py | Python | setup-cxfreeze.py | Jhynjhiruu/ninfs | 9e0f5889cafd595c56e2db936177ef1b0f4ac02e | [
"MIT"
] | null | null | null | setup-cxfreeze.py | Jhynjhiruu/ninfs | 9e0f5889cafd595c56e2db936177ef1b0f4ac02e | [
"MIT"
] | null | null | null | setup-cxfreeze.py | Jhynjhiruu/ninfs | 9e0f5889cafd595c56e2db936177ef1b0f4ac02e | [
"MIT"
] | null | null | null | import sys
from cx_Freeze import setup, Executable
build_exe_options = {
'includes': [
'ninfs',
'ninfs.gui',
'ninfs.mount.cci',
'ninfs.mount.cdn',
'ninfs.mount.cia',
'ninfs.mount.exefs',
'ninfs.mount.nandctr',
'ninfs.mount.nandhac',
'ninfs.mou... | 28.585714 | 107 | 0.567216 |
9e042c35cbc356f24c06ae536c8a99f64735b74a | 1,226 | py | Python | google-datacatalog-kafka-connector/tests/google/datacatalog_connectors/kafka/test_utils/__init__.py | bonifacyj/datacatalog-connectors-message-brokers | 0f72c800ebf1e570b638a0ad930d48e9dc44a25e | [
"Apache-2.0"
] | 1 | 2021-04-30T22:52:41.000Z | 2021-04-30T22:52:41.000Z | google-datacatalog-kafka-connector/tests/google/datacatalog_connectors/kafka/test_utils/__init__.py | bonifacyj/datacatalog-connectors-message-brokers | 0f72c800ebf1e570b638a0ad930d48e9dc44a25e | [
"Apache-2.0"
] | 2 | 2020-10-01T14:24:12.000Z | 2020-11-12T16:40:01.000Z | google-datacatalog-kafka-connector/tests/google/datacatalog_connectors/kafka/test_utils/__init__.py | bonifacyj/datacatalog-connectors-message-brokers | 0f72c800ebf1e570b638a0ad930d48e9dc44a25e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 40.866667 | 74 | 0.762643 |
9e043a6950e7f44416f8651a17c0c85914419c84 | 50,566 | py | Python | protos/gen/python/protos/public/modeldb/ExperimentRunService_pb2_grpc.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | protos/gen/python/protos/public/modeldb/ExperimentRunService_pb2_grpc.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | protos/gen/python/protos/public/modeldb/ExperimentRunService_pb2_grpc.py | CaptEmulation/modeldb | 78b10aca553e386554f9740db63466b1cf013a1a | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from ..modeldb import CommonService_pb2 as modeldb_dot_CommonService__pb2
from ..modeldb import ExperimentRunService_pb2 as modeldb_dot_ExperimentRunService__pb2
class ExperimentRunServiceStub(object):
# missing associated documentat... | 54.255365 | 131 | 0.789938 |
9e044349c0cd7c4f98a1ef19da58b616aa122009 | 1,180 | py | Python | 0x0A-python-inheritance/9-rectangle.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x0A-python-inheritance/9-rectangle.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x0A-python-inheritance/9-rectangle.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
"""This module contains a class Rectangle that inherits from BaseGeometry
(7-base_geometry.py). (task based on 8-rectangle.py).
"""
BaseGeometry = __import__('7-base_geometry').BaseGeometry
class Rectangle(BaseGeometry):
"""class Rectangle that inherits from BaseGeometry
(7-base_geo... | 26.818182 | 73 | 0.592373 |
9e045230aaf44ecbcfca6ecab55fe60f6ecbad66 | 3,959 | py | Python | tests/test_executor.py | cychenyin/windmill | cc90126f8ba57531b28b1bc722927e8b66dc31b1 | [
"MIT"
] | 3 | 2015-03-02T17:01:35.000Z | 2021-08-29T23:19:12.000Z | tests/test_executor.py | cychenyin/windmill | cc90126f8ba57531b28b1bc722927e8b66dc31b1 | [
"MIT"
] | 1 | 2021-09-15T02:31:19.000Z | 2021-09-15T02:31:19.000Z | tests/test_executor.py | cychenyin/windmill | cc90126f8ba57531b28b1bc722927e8b66dc31b1 | [
"MIT"
] | 4 | 2015-10-02T07:53:34.000Z | 2022-02-21T22:09:25.000Z | from datetime import datetime
from threading import Event
from types import TracebackType
import time
import pytest
from apscheduler.events import EVENT_JOB_ERROR, EVENT_JOB_MISSED, EVENT_JOB_EXECUTED
from apscheduler.executors.base import MaxInstancesReachedError
from apscheduler.schedulers.base import BaseScheduler... | 31.420635 | 116 | 0.728467 |
9e04965b3dfe87a25a4ee98da572016721f224c1 | 1,085 | py | Python | src/tscc/timescaling.py | MithunNallana/Time-Scaled-Collision-Cone | 86115c0f3dfd5138d4ac22f33e1a6919be2172b6 | [
"MIT"
] | 1 | 2021-03-23T04:59:23.000Z | 2021-03-23T04:59:23.000Z | src/tscc/timescaling.py | MithunNallana/Time-Scaled-Collision-Cone | 86115c0f3dfd5138d4ac22f33e1a6919be2172b6 | [
"MIT"
] | null | null | null | src/tscc/timescaling.py | MithunNallana/Time-Scaled-Collision-Cone | 86115c0f3dfd5138d4ac22f33e1a6919be2172b6 | [
"MIT"
] | 1 | 2021-09-16T09:47:00.000Z | 2021-09-16T09:47:00.000Z | import numpy as np
from tscc.optimization.computeconstraints import computeconstraints
from tscc.optimization.computescale import computescale
from tscc.utils.scalegrid import scalegrid
def timescaling(stateRobo, radiusRobo, limitsRobo, stateObst, radiusObst,
deltaT, deltaTSmall):
# initial gues... | 31 | 73 | 0.684793 |
9e049eb148fccc6ea791aa27943ad092d8842675 | 2,428 | py | Python | InvestmentFundamentalsAndDataAnalytics/Examples/Section-17_109-MC-EulerDiscretization-PartI-Solution_IEX.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | InvestmentFundamentalsAndDataAnalytics/Examples/Section-17_109-MC-EulerDiscretization-PartI-Solution_IEX.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | InvestmentFundamentalsAndDataAnalytics/Examples/Section-17_109-MC-EulerDiscretization-PartI-Solution_IEX.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | #!/usr/bin/env python
# coding: utf-8
# ## Monte Carlo - Euler Discretization - Part I
# *Suggested Answers follow (usually there are multiple ways to solve a problem in Python).*
# Download the data for Microsoft (‘MSFT’) from IEX for the period ‘2015-1-1’ until '2017-3-21'.
# In[1]:
import numpy as np
import pandas... | 36.238806 | 214 | 0.683278 |
9e04bff55f4565075dbbeb9162b0176d2cd9591b | 1,710 | py | Python | setup.py | elijahc/tricorder | 1c39dfd1f4b114ee9d67258414a358535b8b129e | [
"MIT"
] | null | null | null | setup.py | elijahc/tricorder | 1c39dfd1f4b114ee9d67258414a358535b8b129e | [
"MIT"
] | 4 | 2020-07-18T02:02:09.000Z | 2022-01-25T22:34:37.000Z | setup.py | elijahc/tricorder | 1c39dfd1f4b114ee9d67258414a358535b8b129e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
# TODO: Put pa... | 27.580645 | 78 | 0.643275 |
9e04cbc7a363f5a5677208828385a7efde583c55 | 12,193 | py | Python | tests/unit/modules/win_system_test.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | tests/unit/modules/win_system_test.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/win_system_test.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
from datetime import datetime
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.helpers import ensure_in_syspath
from salttestin... | 40.108553 | 114 | 0.591651 |
9e051225720f4e03794bc22295524dec33258235 | 682 | py | Python | parse_args.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | parse_args.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | parse_args.py | tak-sakumoto/formatomato | 4713338135b2ac3960cc2f9a6f017199853cdc52 | [
"MIT"
] | null | null | null | import argparse
def parse_args():
"""
Parsing arguments
"""
parser = argparse.ArgumentParser()
parser.add_argument("--input_dataset_path", default=None, type=str)
parser.add_argument("--dataset_name", default=None, type=str)
parser.add_argument("--config_path", default=None, type=str)
... | 35.894737 | 89 | 0.70088 |
9e052d03695e8021a4fe354197859991fad6f300 | 3,462 | py | Python | simplipy/system/v2.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | simplipy/system/v2.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | simplipy/system/v2.py | FindingJohnny/simplisafe-python | e660938c8280dd47d5a90c49a39f77bba27e8a30 | [
"MIT"
] | null | null | null | """Define a V2 (original) SimpliSafe system."""
from typing import Dict
from simplipy.sensor.v2 import SensorV2
from simplipy.system import (
CONF_DURESS_PIN,
CONF_MASTER_PIN,
DEFAULT_MAX_USER_PINS,
System,
SystemStates,
get_entity_type_from_data,
)
def create_pin_payload(pins: dict) -> Dict[... | 33.61165 | 87 | 0.593299 |
9e055876fe3aac8a4520c6362ae10cc08e151df6 | 7,210 | py | Python | main_scripts/preparing_for_train.py | biy001/social-cnn-pytorch | e838d55b90f1da9ae2751c185bff87901b0648e3 | [
"MIT"
] | 29 | 2018-12-19T03:50:56.000Z | 2022-03-08T21:18:22.000Z | main_scripts/preparing_for_train.py | biy001/social-cnn-pytorch | e838d55b90f1da9ae2751c185bff87901b0648e3 | [
"MIT"
] | 1 | 2019-08-29T07:00:58.000Z | 2019-08-29T07:00:58.000Z | main_scripts/preparing_for_train.py | biy001/social-cnn-pytorch | e838d55b90f1da9ae2751c185bff87901b0648e3 | [
"MIT"
] | 11 | 2018-12-21T16:20:04.000Z | 2021-06-11T13:00:15.000Z | '''
input_pipeline_fill_0_mix_all_data:
Before:
--> Dumping dev data with size 7167 to pickle file
--> Dumping test data with size 7167 to pickle file
--> Dumping train data with size 57336 to pickle file
After deleting zero rows:
--> Dumping dev data with size 7141 to pickle file
--> Dumping test data with size 714... | 43.433735 | 216 | 0.71276 |
9e057e7cb340b69f47b1cda002b8f7ce62508d0b | 282 | py | Python | lang/python/net/AccessOnly.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 8 | 2015-06-07T13:25:48.000Z | 2022-03-22T23:14:50.000Z | lang/python/net/AccessOnly.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | 30 | 2016-01-29T01:36:41.000Z | 2018-09-19T07:01:22.000Z | lang/python/net/AccessOnly.py | liuyang1/test | a4560e0c9ffd0bc054d55bbcf12a894ab5b7d417 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from socket import *
from time import sleep
import AT
host = 'localhost'
dstport = 10001
sock = socket(AF_INET,SOCK_DGRAM)
dstaddr=(host,dstport)
while 1:
dsttext=AT.addr2text(dstaddr)
print dsttext
sock.sendto(dsttext,(host,8081))
sleep(10)
sock.close()
| 18.8 | 33 | 0.751773 |
9e058c57ee84f1d22b4a69c1245805b2d04b5cae | 7,235 | py | Python | axolotl/backend/simple.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | axolotl/backend/simple.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | axolotl/backend/simple.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | import typing
import uuid
from d3m import utils as d3m_utils
from d3m import runtime as runtime_module
from d3m.metadata.problem import Problem
from d3m.metadata.pipeline import Pipeline
from d3m.metadata.base import Context
from d3m.metadata import pipeline_run as pipeline_run_module
from axolotl.backend.base import... | 40.194444 | 116 | 0.663165 |
9e058d7195adc077fd3561c92955dbc2d813ef04 | 8,521 | py | Python | ThirdParty/Twisted/twisted/application/test/test_internet.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 7 | 2015-04-28T13:26:11.000Z | 2020-02-09T17:01:04.000Z | ThirdParty/Twisted/twisted/application/test/test_internet.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/Twisted/twisted/application/test/test_internet.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for (new code in) L{twisted.application.internet}.
"""
from zope.interface import implements
from zope.interface.verify import verifyClass
from twisted.internet.protocol import Factory
from twisted.trial.unittest import TestCase
from ... | 33.679842 | 79 | 0.678207 |
9e05b006c4e130eb6a1ba5623821e721c47e7c3a | 313 | py | Python | pylateral/__init__.py | boxysean/pylateral | efa8df0cd4da14c5a1f25dda3bf39687a66deccd | [
"MIT"
] | 2 | 2020-11-23T14:16:24.000Z | 2020-11-23T14:59:37.000Z | pylateral/__init__.py | boxysean/pylateral | efa8df0cd4da14c5a1f25dda3bf39687a66deccd | [
"MIT"
] | null | null | null | pylateral/__init__.py | boxysean/pylateral | efa8df0cd4da14c5a1f25dda3bf39687a66deccd | [
"MIT"
] | 1 | 2020-12-09T05:45:53.000Z | 2020-12-09T05:45:53.000Z | """
Parallel helpers.
Q: "Why do serial when you can do parallel?"
Possible A: "Because of unintended consequences!"
"""
from .cache import cache_result, CacheScopes
from .task_module import task
from .task_group_module import task_group
from .task_pool_module import join, task_pool, TaskPoolAlreadyAllocated
| 24.076923 | 71 | 0.798722 |
9e05c1b4cb4d98163fd41f004c042e0d78bcc27b | 3,094 | py | Python | scan/test/fetch/kube_fetch/test_data/kube_fetch_vnics_vpp.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/kube_fetch/test_data/kube_fetch_vnics_vpp.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/kube_fetch/test_data/kube_fetch_vnics_vpp.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 36.833333 | 79 | 0.515514 |
9e05e17737199f6fe5b5a9f61a80ebfe1c40e8f2 | 4,669 | py | Python | chaospy/distributions/collection/mv_normal.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | 1 | 2020-04-29T20:53:25.000Z | 2020-04-29T20:53:25.000Z | chaospy/distributions/collection/mv_normal.py | agonzs11/Polinomio-del-caos | 5a415ece07e6535488174bac69a6c0fcc2ca272d | [
"MIT"
] | null | null | null | chaospy/distributions/collection/mv_normal.py | agonzs11/Polinomio-del-caos | 5a415ece07e6535488174bac69a6c0fcc2ca272d | [
"MIT"
] | null | null | null | """Multivariate Normal Distribution."""
import numpy
from scipy import special
from .normal import normal
from ..baseclass import Dist
class MvNormal(Dist):
"""
Multivariate Normal Distribution.
Args:
loc (float, Dist):
Mean vector
scale (float, Dist):
Covariance... | 30.717105 | 90 | 0.507389 |
9e05f8be66d11af671f435ed133612f31f082635 | 12,530 | py | Python | ocean_lib/models/data_token.py | araa47/ocean.py | 71549c5b28a37e394fab6376aaf4aff92ab3241b | [
"Apache-2.0"
] | null | null | null | ocean_lib/models/data_token.py | araa47/ocean.py | 71549c5b28a37e394fab6376aaf4aff92ab3241b | [
"Apache-2.0"
] | null | null | null | ocean_lib/models/data_token.py | araa47/ocean.py | 71549c5b28a37e394fab6376aaf4aff92ab3241b | [
"Apache-2.0"
] | null | null | null | import json
import os
import time
from collections import namedtuple
from eth_utils import remove_0x_prefix
from web3 import Web3
from web3.utils.events import get_event_data
from websockets import ConnectionClosed
from ocean_lib.ocean.util import to_base_18, from_base_18
from ocean_lib.web3_internal.contract_base im... | 40.947712 | 119 | 0.644294 |
9e06251825e05353e61ef5cddd8ca3747c9f5b88 | 3,985 | py | Python | alipay/aop/api/request/KoubeiCateringDishEstimateQueryRequest.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/KoubeiCateringDishEstimateQueryRequest.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/KoubeiCateringDishEstimateQueryRequest.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.KoubeiCateringDishEstimateQueryModel import KoubeiCateringDishEstimateQueryModel
class KoubeiCateringDishEstimateQueryRequest(object... | 27.482759 | 148 | 0.645922 |
9e0657d4ba6b986175a6c4198d90736ce2f5b973 | 5,468 | py | Python | tests/generate.py | twodayslate/openc2-lycan-python | 57d68bf1bffb79af34be677645049d3c45d690a4 | [
"MIT"
] | 6 | 2018-04-27T14:55:36.000Z | 2022-02-06T16:42:53.000Z | tests/generate.py | twodayslate/openc2-lycan-python | 57d68bf1bffb79af34be677645049d3c45d690a4 | [
"MIT"
] | 25 | 2018-06-21T17:50:56.000Z | 2020-04-08T15:38:14.000Z | tests/generate.py | twodayslate/openc2-lycan-python | 57d68bf1bffb79af34be677645049d3c45d690a4 | [
"MIT"
] | 10 | 2018-04-25T15:17:35.000Z | 2021-08-14T09:36:23.000Z | from openc2 import parse
from openc2 import (
parse,
Command,
Args,
Payload,
Device,
DomainName,
EmailAddress,
IPv4Connection,
Response,
File,
Artifact,
Process,
Features,
InternationalizedDomainName,
InternationalizedEmailAddress,
IPv4Address,
IPv6Add... | 26.803922 | 88 | 0.655084 |
9e06589b14a0b8174f2bb6102a4f9fa056154cb9 | 1,831 | py | Python | alipay/aop/api/response/AlipayOpenIotbpaasDevicebindApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayOpenIotbpaasDevicebindApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayOpenIotbpaasDevicebindApplyResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.IoTBPaaSDeviceApplyBindInfo import IoTBPaaSDeviceApplyBindInfo
class AlipayOpenIotbpaasDevicebindApplyResponse(AlipayResponse):
def __init__(self):
super... | 30.516667 | 114 | 0.682141 |
9e067840227b83c76abc1c32ef6cfa442f39e83b | 102 | py | Python | kPOD/__init__.py | hfung4/kPOD | a0cc3d764593191315a4ada60705ca624a323812 | [
"MIT"
] | 7 | 2020-07-02T04:06:44.000Z | 2022-03-14T08:04:35.000Z | kPOD/__init__.py | hfung4/kPOD | a0cc3d764593191315a4ada60705ca624a323812 | [
"MIT"
] | 3 | 2020-08-28T07:24:19.000Z | 2021-06-09T01:38:52.000Z | kPOD/__init__.py | hfung4/kPOD | a0cc3d764593191315a4ada60705ca624a323812 | [
"MIT"
] | 4 | 2021-01-31T06:17:05.000Z | 2022-03-29T12:56:54.000Z | # import main package
from .main.kPOD import k_pod
# import examples
from .examples.examples import * | 20.4 | 32 | 0.784314 |
9e06a29dbfd843e89b10e2229b0e8a259152f788 | 37,723 | py | Python | nepali_datetime/__init__.py | dxillar/nepali-datetime | 4165f2d768c0e994262a6942c49e3b5a92e4bfdd | [
"MIT"
] | 27 | 2020-11-01T14:24:56.000Z | 2022-02-22T04:29:55.000Z | nepali_datetime/__init__.py | voidash/nepali-datetime | 4165f2d768c0e994262a6942c49e3b5a92e4bfdd | [
"MIT"
] | 13 | 2020-10-12T04:51:07.000Z | 2021-07-16T14:38:41.000Z | nepali_datetime/__init__.py | voidash/nepali-datetime | 4165f2d768c0e994262a6942c49e3b5a92e4bfdd | [
"MIT"
] | 12 | 2020-11-02T16:18:19.000Z | 2022-01-12T18:37:29.000Z | """An inspired library from Python's `datetime` library which will operate on top of
Bikram Sambat (B.S) date. Currently supported B.S date range is 1975 - 2100. Most of the code &
documentation are derived from Python3.5 's datetime.py module & later modified to support
nepali_datetime.
Supports >= Python3.5
"""
__ve... | 34.608257 | 120 | 0.567717 |
9e06f80bcbc9390e9739312e88bff1db3f1c8ae5 | 2,270 | py | Python | flask_app.py | AMiller42/brainbox | 312c4492013faa8238237b683cfaadd06f740bf7 | [
"MIT"
] | null | null | null | flask_app.py | AMiller42/brainbox | 312c4492013faa8238237b683cfaadd06f740bf7 | [
"MIT"
] | null | null | null | flask_app.py | AMiller42/brainbox | 312c4492013faa8238237b683cfaadd06f740bf7 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
from flask_cors import CORS
import multiprocessing, secrets
import brainbox
import git
app = Flask(__name__)
CORS(app)
import os, sys, shutil
THIS_FOLDER = os.path.dirname(os.path.abspath(__file__)) + "/.."
sys.path.insert(1, THIS_FOLDER)
shutil.rmtree("sessions", ig... | 30.675676 | 110 | 0.623789 |
9e06f9f6eaff116994accde5356b2df012fe5b8b | 2,354 | py | Python | spectral_parser/parsing/prepare_global_param.py | GavinPHR/Spectral-Parser | 4d1f071f29ac158e67f32a105aa6483c6479fae8 | [
"MIT"
] | 4 | 2021-03-18T10:03:14.000Z | 2021-05-05T21:37:59.000Z | spectral_parser/parsing/prepare_global_param.py | GavinPHR/Spectral-Parser | 4d1f071f29ac158e67f32a105aa6483c6479fae8 | [
"MIT"
] | null | null | null | spectral_parser/parsing/prepare_global_param.py | GavinPHR/Spectral-Parser | 4d1f071f29ac158e67f32a105aa6483c6479fae8 | [
"MIT"
] | 1 | 2021-03-18T10:03:18.000Z | 2021-03-18T10:03:18.000Z | """
Loading all the saved parameters and cast
them into Numba compatible types.
"""
import config
from numba.core import types
from numba.typed import Dict
import numpy as np
import numba
__author__ = 'Haoran Peng'
__email__ = 'gavinsweden@gmail.com'
__license__ = 'MIT'
numba.config.THREADING_LAYER = 'safe'
def to_... | 33.628571 | 78 | 0.714104 |
9e06fd03bb0e20cb8057a64f73d6ab3026ea7388 | 2,150 | py | Python | husky_ws/src/scripts/gazebo_read_link_pose.py | filesmuggler/husky_simulation | 2c45f27b5b15fce6171dcae2b7060dfcc8b0bb72 | [
"MIT"
] | null | null | null | husky_ws/src/scripts/gazebo_read_link_pose.py | filesmuggler/husky_simulation | 2c45f27b5b15fce6171dcae2b7060dfcc8b0bb72 | [
"MIT"
] | 4 | 2020-05-07T13:31:11.000Z | 2020-06-09T00:14:08.000Z | husky_ws/src/scripts/gazebo_read_link_pose.py | filesmuggler/husky_simulation | 2c45f27b5b15fce6171dcae2b7060dfcc8b0bb72 | [
"MIT"
] | 1 | 2021-03-06T07:02:51.000Z | 2021-03-06T07:02:51.000Z | #! /usr/bin/env python
from gazebo_msgs.srv import GetLinkState
import rospy
from geometry_msgs.msg import Pose
import tf2_ros
import tf2_geometry_msgs # **Do not use geometry_msgs. Use this instead for PoseStamped
import rospkg
from gazebo_msgs.msg import ModelState
from gazebo_msgs.srv import SetModelState
cl... | 35.245902 | 129 | 0.649302 |
9e0711d1717d7cef4a7e59186ba8643684802af6 | 3,453 | py | Python | alipay/aop/api/domain/AlipayUserDtbankcustActivityorderQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserDtbankcustActivityorderQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayUserDtbankcustActivityorderQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayUserDtbankcustActivityorderQueryModel(object):
def __init__(self):
self._activity_id = None
self._activity_order_id = None
self._logon_id = None
self._out_bi... | 29.767241 | 85 | 0.593976 |
9e0720918e030cc92bbf34610e41d53839f9f97c | 1,868 | py | Python | emerald/help_operations.py | femmerling/EmeraldBox | 68f5776577f0c929ca1f5ba23f1dfe480f813037 | [
"MIT"
] | 17 | 2015-01-15T21:41:16.000Z | 2021-01-10T15:34:09.000Z | emerald/help_operations.py | femmerling/EmeraldBox | 68f5776577f0c929ca1f5ba23f1dfe480f813037 | [
"MIT"
] | null | null | null | emerald/help_operations.py | femmerling/EmeraldBox | 68f5776577f0c929ca1f5ba23f1dfe480f813037 | [
"MIT"
] | 5 | 2015-02-07T02:41:18.000Z | 2016-11-11T02:50:21.000Z | def help():
# This lists the commands used by the db_tools.py.
print '\nThe general usage pattern of the tool is python box.py [options] [extra parameters]\n'
print 'The following are the available options:\n'
print ' --initiate or -i : Generates a new controller handler. You should specify a con... | 74.72 | 151 | 0.651499 |
9e076e2e5c52340978ea5d3d9294673400bc5ea5 | 2,402 | py | Python | sdks/python/appcenter_sdk/models/ExternalRepositoryProvider.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/ExternalRepositoryProvider.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/ExternalRepositoryProvider.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class ExternalReposi... | 27.295455 | 83 | 0.559534 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.