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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
217bb293be3834898d7abea8000857a032db7c9c | 406 | py | Python | terrascript/data/kubernetes_alpha.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/kubernetes_alpha.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/kubernetes_alpha.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/kubernetes_alpha.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:20:48 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.data.kubernetes_alpha
#
# instead of
#
# >>> import terrascript.data.hashicorp.kubernetes_alpha
#
# This is only available for 'official... | 27.066667 | 73 | 0.761084 |
217bbbcffa3f9009008f76d951a3bad68bc8b85d | 1,988 | py | Python | tensorflow/examples/adding_an_op/zero_out_2_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 522 | 2016-06-08T02:15:50.000Z | 2022-03-02T05:30:36.000Z | tensorflow/examples/adding_an_op/zero_out_2_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/examples/adding_an_op/zero_out_2_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 108 | 2016-06-16T15:34:05.000Z | 2022-03-12T13:23:11.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 33.133333 | 93 | 0.665493 |
217bcc5cccd776e54ac54abcd4abc764b2f080c6 | 13,012 | py | Python | theano/lstm/lstm.py | DL-Benchmarks/DL-Benchmarks | 86db33854f64245b0dd55b92e9a8eed6403f6c58 | [
"MIT",
"BSD-3-Clause"
] | 82 | 2016-05-04T04:20:22.000Z | 2021-06-09T11:47:18.000Z | theano/lstm/lstm.py | lukas-schott/DL-Benchmarks | 86db33854f64245b0dd55b92e9a8eed6403f6c58 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | theano/lstm/lstm.py | lukas-schott/DL-Benchmarks | 86db33854f64245b0dd55b92e9a8eed6403f6c58 | [
"MIT",
"BSD-3-Clause"
] | 31 | 2016-04-29T06:00:09.000Z | 2021-01-30T15:52:19.000Z | # This source code is from Theano tutorial
# http://deeplearning.net/tutorial/lstm.html
# This source code is licensed under a BSD license found in the
# 3rd-party-licenses.txt file in the root directory of this source tree.
# The original code was modified by Robert Bosch LLC, USA for timing.
# All modifications a... | 34.791444 | 80 | 0.594451 |
217be2070655b915e951c35283f3e3b78cda13fe | 1,082 | py | Python | controllers/keysToMidi/core/controller.py | ginwakeup/pymidicontrollers | f0e088f8f950b49844569d188a3218a93bc5f37e | [
"MIT"
] | null | null | null | controllers/keysToMidi/core/controller.py | ginwakeup/pymidicontrollers | f0e088f8f950b49844569d188a3218a93bc5f37e | [
"MIT"
] | null | null | null | controllers/keysToMidi/core/controller.py | ginwakeup/pymidicontrollers | f0e088f8f950b49844569d188a3218a93bc5f37e | [
"MIT"
] | null | null | null | """Controller module for keyboard to midi."""
from libs.midi import midiController
class KeyboardToMidiController(midiController.MidiController):
def __init__(self):
super(KeyboardToMidiController, self).__init__()
def send_prev_track_signal(self):
msg = self._build_cc_command(102)
se... | 30.055556 | 62 | 0.713494 |
217be8d87f8486656a7a525cde4012a4e00eae3f | 12,758 | py | Python | covsirphy/cleaning/dataloader.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | covsirphy/cleaning/dataloader.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | covsirphy/cleaning/dataloader.py | rebeccadavidsson/covid19-sir | ca7a408c5fcf87e4857edd14a9276cae0b6737cf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime, timezone, timedelta
from pathlib import Path
from covsirphy.cleaning.term import Term
from covsirphy.cleaning.jhu_data import JHUData
from covsirphy.cleaning.japan_data import JapanData
from covsirphy.cleaning.oxcgrt import OxCGRTData
from co... | 39.86875 | 100 | 0.64148 |
217c3425492302634934adf8915f4052a52c6269 | 20,059 | py | Python | napari/utils/translations.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/translations.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | napari/utils/translations.py | pranathivemuri/napari | 7a7f824b686a276dc6cdc8013d8f437e3c3b03e1 | [
"BSD-3-Clause"
] | null | null | null | """
Localization utilities to find available language packs and packages with
localization data.
"""
import gettext
import os
import sys
from pathlib import Path
from typing import Optional, Union
from yaml import safe_load
from ._base import _DEFAULT_CONFIG_PATH, _DEFAULT_LOCALE
# Entry points
NAPARI_LANGUAGEPACK_... | 28.452482 | 92 | 0.543945 |
217c3e5789af88ef04f625af66e59ecc5491b973 | 3,566 | py | Python | pysoa/server/internal/event_loop.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 91 | 2017-05-08T22:41:33.000Z | 2022-02-09T11:37:07.000Z | pysoa/server/internal/event_loop.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 63 | 2017-06-14T20:08:49.000Z | 2021-06-16T23:08:25.000Z | pysoa/server/internal/event_loop.py | arareko/pysoa | a90e428558500cf692f7f6e33fd358dd2779c328 | [
"Apache-2.0"
] | 26 | 2017-10-13T23:23:13.000Z | 2022-01-11T16:58:17.000Z | """isort:skip_file"""
# noinspection PyCompatibility
import asyncio
# noinspection PyCompatibility
import concurrent.futures
import logging
import sys
import threading
from typing import (
List,
Optional,
)
from conformity import fields
from pysoa.common.compatibility import set_running_loop
from pysoa.server... | 35.66 | 118 | 0.678632 |
217c404fb2c3aec45a9b5fdc3d8aadda86b202ab | 7,989 | py | Python | vyperlogix/sockets/ftp/ftpclient.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | 1 | 2020-09-29T01:36:33.000Z | 2020-09-29T01:36:33.000Z | vyperlogix/sockets/ftp/ftpclient.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | vyperlogix/sockets/ftp/ftpclient.py | raychorn/chrome_gui | f1fade70b61af12ee43c55c075aa9cfd32caa962 | [
"CC0-1.0"
] | null | null | null | from ftplib import FTP
import sys, os, os.path, operator
__copyright__ = """\
(c). Copyright 2008-2020, Vyper Logix Corp., All Rights Reserved.
Published under Creative Commons License
(http://creativecommons.org/licenses/by-nc/3.0/)
restricted to non-commercial educational use only.,
http://www.VyperLogix.com fo... | 36.149321 | 265 | 0.55251 |
217c52d30cdd6d27f6ce5dd5edefe1ee09ee4c9a | 91 | py | Python | abc/042/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | abc/042/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | abc/042/B.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | N, L = map(int, input().split())
S = [input() for _ in range(N)]
S.sort()
print("".join(S)) | 22.75 | 32 | 0.56044 |
217c8a1ccf22621621227fedf8450c2f47f97de0 | 6,133 | py | Python | vis/visualization/activation_maximization_tf.py | yukikawana/git_analyze | 9c143a954b09551dc48da35f6a0ef60cb1229e94 | [
"MIT"
] | null | null | null | vis/visualization/activation_maximization_tf.py | yukikawana/git_analyze | 9c143a954b09551dc48da35f6a0ef60cb1229e94 | [
"MIT"
] | null | null | null | vis/visualization/activation_maximization_tf.py | yukikawana/git_analyze | 9c143a954b09551dc48da35f6a0ef60cb1229e94 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import numpy as np
from tensorflow.contrib.keras import backend as K
from ..losses_tf import ActivationMaximization
from ..optimizer import Optimizer
from ..regularizers import TotalVariation, LPNorm
from ..backprop_modifiers import get
from ..utils import utils
def visualize_... | 55.754545 | 121 | 0.686124 |
217c919500b9810e5ed274128a23be476ad60d0c | 17,816 | py | Python | tests/test_account.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | tests/test_account.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | tests/test_account.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
import os
import sys
# For coverage.
if __package__ is None:
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/..")
from unittest import main, TestCase
import requests
import requests_mock
from iris_sdk.client import Client
from iris_sdk.models.account import Account
from iri... | 36.137931 | 97 | 0.575326 |
217cb5e89cbaa93bb00d3e33b33e17f92096ad5f | 3,940 | py | Python | nicos_mlz/puma/devices/filter.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_mlz/puma/devices/filter.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 4 | 2019-11-08T10:18:16.000Z | 2021-01-13T13:07:29.000Z | nicos_mlz/puma/devices/filter.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | # -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2021 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... | 37.169811 | 79 | 0.604822 |
217cc4fc6514929b1e4b565143546e9daf654f1a | 2,399 | py | Python | salt/modules/pw_group.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | 1 | 2016-12-20T20:11:21.000Z | 2016-12-20T20:11:21.000Z | salt/modules/pw_group.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | salt/modules/pw_group.py | epoelke/salt | 80ae64e54f9f336d3cdb6e03e42f2a50469ec8f2 | [
"Apache-2.0"
] | null | null | null | '''
Manage groups on FreeBSD
'''
# Import python libs
import logging
# Import salt libs
import salt.utils
log = logging.getLogger(__name__)
try:
import grp
except ImportError:
pass
def __virtual__():
'''
Set the user module if the kernel is Linux
'''
return 'group' if __grains__['kernel'... | 18.889764 | 79 | 0.579408 |
217ccd66de4d13e94167ad847af1c99974e610c2 | 3,797 | py | Python | app/app.py | ndtallant/WaterFlow | d8bd5bc6515e502d0f45e627504e84940d25dfd8 | [
"MIT"
] | null | null | null | app/app.py | ndtallant/WaterFlow | d8bd5bc6515e502d0f45e627504e84940d25dfd8 | [
"MIT"
] | null | null | null | app/app.py | ndtallant/WaterFlow | d8bd5bc6515e502d0f45e627504e84940d25dfd8 | [
"MIT"
] | null | null | null | '''Flask app.'''
import json
import calendar
import happybase
import datetime as dt
from collections import OrderedDict
from dateutil.relativedelta import relativedelta
from flask import Flask, render_template, request
from thriftpy2.transport import TTransportException
from credentials import zookeeperHost
app = Flas... | 34.518182 | 94 | 0.616803 |
217cd53045ffa027b9b1be3a1058d230fed2d82e | 2,854 | py | Python | test_cases/stdlib/builtins/test_pow.py | Harry-Lees/typeshed | 5fa31e675980226416272271b86def0d88915f9b | [
"Apache-2.0"
] | 2 | 2022-01-02T05:45:47.000Z | 2022-01-19T04:00:42.000Z | test_cases/stdlib/builtins/test_pow.py | Harry-Lees/typeshed | 5fa31e675980226416272271b86def0d88915f9b | [
"Apache-2.0"
] | 12 | 2022-01-02T13:23:13.000Z | 2022-01-30T06:02:03.000Z | test_cases/stdlib/builtins/test_pow.py | Harry-Lees/typeshed | 5fa31e675980226416272271b86def0d88915f9b | [
"Apache-2.0"
] | null | null | null | # pyright: reportUnnecessaryTypeIgnoreComment=true
from decimal import Decimal
from fractions import Fraction
from typing import Any, NoReturn
from typing_extensions import Literal, assert_type
# See #7163
assert_type(pow(1, 0), Literal[1])
assert_type(1**0, Literal[1])
assert_type(pow(1, 0, None), Literal[1])
asser... | 32.431818 | 76 | 0.686055 |
217cf123d15f184f632339c517aafe94f88f0ad6 | 39 | py | Python | scrappy/scheduler/__init__.py | V-in/scrappy | d083614e5c6b0821ebffd68dacab7b9301b3f579 | [
"MIT"
] | 6 | 2019-04-26T00:32:10.000Z | 2020-06-20T12:57:37.000Z | scrappy/scheduler/__init__.py | V-in/scrappy | d083614e5c6b0821ebffd68dacab7b9301b3f579 | [
"MIT"
] | null | null | null | scrappy/scheduler/__init__.py | V-in/scrappy | d083614e5c6b0821ebffd68dacab7b9301b3f579 | [
"MIT"
] | null | null | null | __all__ = ["round_robin", "scheduler"]
| 19.5 | 38 | 0.692308 |
217d151cada4e48ff07f2efe47bbb73a991bed07 | 32,460 | py | Python | cardpay/api_client.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 6 | 2019-07-16T06:27:25.000Z | 2021-03-04T14:24:05.000Z | cardpay/api_client.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 5 | 2019-11-18T09:07:51.000Z | 2021-02-12T13:59:55.000Z | cardpay/api_client.py | cardpay/python-sdk-v3 | 35e7c42ca3e9a1ea6222fe2150f92ede64c70248 | [
"MIT"
] | 5 | 2019-07-18T13:42:15.000Z | 2021-11-18T12:40:32.000Z | # coding: utf-8
"""
CardPay REST API
Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to cr... | 33.088685 | 546 | 0.578466 |
217d298dbb1bc584874a1032a63b3b1db9e9881e | 5,512 | py | Python | mvpnet/models/pn2/KPConv.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | 3 | 2021-12-20T02:41:28.000Z | 2022-02-18T15:47:48.000Z | mvpnet/models/pn2/RandLaNet.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | mvpnet/models/pn2/RandLaNet.py | dcy0577/Enhancing-3D-Point-Cloud-Segmentation-Using-Multi-Modal-Fusion-with-2D-Images | b0e9c0d26177f74b20cbf95f15cefba9af695c70 | [
"MIT"
] | null | null | null | """PointNet2(single-scale grouping)
References:
@article{qi2017pointnetplusplus,
title={PointNet++: Deep Hierarchical Feature Learning on Point Sets in a Metric Space},
author={Qi, Charles R and Yi, Li and Su, Hao and Guibas, Leonidas J},
journal={arXiv preprint arXiv:1706.02413},
year={201... | 35.10828 | 102 | 0.573657 |
217d339b4ba2cf64bee3c62d445b4d7d5f0bbd8e | 1,779 | py | Python | tanacompendium/trials/api/plot/plotviews.py | nkoech/tanacompendium | b4fd81b23f2c8263735806765d93eb4a70be8aba | [
"MIT"
] | null | null | null | tanacompendium/trials/api/plot/plotviews.py | nkoech/tanacompendium | b4fd81b23f2c8263735806765d93eb4a70be8aba | [
"MIT"
] | null | null | null | tanacompendium/trials/api/plot/plotviews.py | nkoech/tanacompendium | b4fd81b23f2c8263735806765d93eb4a70be8aba | [
"MIT"
] | null | null | null | from trialscompendium.trials.models import Plot
from trialscompendium.utils.pagination import APILimitOffsetPagination
from trialscompendium.utils.permissions import IsOwnerOrReadOnly
from trialscompendium.utils.viewsutils import DetailViewUpdateDelete, CreateAPIViewHook
from rest_framework.filters import DjangoFilterB... | 34.211538 | 87 | 0.722878 |
217d4092d5d8ca914b9589a75eb78d90bb32c107 | 6,960 | py | Python | RuleGenerationProject/MCTSPlayer/MCTSNode.py | Cheung2509/RuleGenerator | 556b6bf710d1f86e16ff7b3c9abcf656b6d0810f | [
"MIT"
] | null | null | null | RuleGenerationProject/MCTSPlayer/MCTSNode.py | Cheung2509/RuleGenerator | 556b6bf710d1f86e16ff7b3c9abcf656b6d0810f | [
"MIT"
] | null | null | null | RuleGenerationProject/MCTSPlayer/MCTSNode.py | Cheung2509/RuleGenerator | 556b6bf710d1f86e16ff7b3c9abcf656b6d0810f | [
"MIT"
] | null | null | null | import copy
import random
import sys
import math
class MCTSNode:
ROLLOUT_DEPTH = 10
rootState = None
def normalise(a, b, c):
if b < c:
return (a - b) / (c - b)
else:
return a
@staticmethod
def noise(input, epsilon, rand):
if input != -epsilon:
... | 27.401575 | 87 | 0.540948 |
217d5594c405341c66bda7f6959bdcf30b663381 | 2,066 | py | Python | proxytest/backends/requests.py | yoleg/proxytest | 63c85b9b14c35de72fce4542ae44080ee6082efb | [
"MIT"
] | 2 | 2020-01-09T14:42:50.000Z | 2020-08-18T10:26:55.000Z | proxytest/backends/requests.py | yoleg/proxytest | 63c85b9b14c35de72fce4542ae44080ee6082efb | [
"MIT"
] | null | null | null | proxytest/backends/requests.py | yoleg/proxytest | 63c85b9b14c35de72fce4542ae44080ee6082efb | [
"MIT"
] | null | null | null | """
The requests backend (request processor).
Uses threading for concurrency.
Requires "requests" package. Useful for Python 3.4. Supports https proxies, unlike aiohttp (as of aiohttp 3.5.4).
"""
from proxytest import backend, parallel
from proxytest.context import ProxyTestContext, RequestInfo
try:
# noinspect... | 36.245614 | 113 | 0.650048 |
217d6815502a6dba696116b0fd901d4430342119 | 5,241 | py | Python | infra/libs/gerrit_api/credentials.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | infra/libs/gerrit_api/credentials.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | infra/libs/gerrit_api/credentials.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Handles reading and providing credentials for Gerrit.
This class supports reading credentials from both a '.netrc' file and a
'.gitcookies' file. It also... | 30.829412 | 80 | 0.690517 |
217d83714aa1f4e589f1760c945de4def98ad345 | 318 | py | Python | lemur/default.conf.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | lemur/default.conf.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | 1 | 2022-03-29T22:05:53.000Z | 2022-03-29T22:05:53.000Z | lemur/default.conf.py | x-lhan/lemur | 1d8aaa4a242af610363e961167bc31691b358773 | [
"Apache-2.0"
] | null | null | null | # This is just Python which means you can inherit and tweak settings
import os
_basedir = os.path.abspath(os.path.dirname(__file__))
THREADS_PER_PAGE = 8
# General
# These will need to be set to `True` if you are developing locally
CORS = False
DEBUG = False
# Logging
LOG_LEVEL = "DEBUG"
LOG_FILE = "lemur.log"
| 17.666667 | 68 | 0.742138 |
217d9482a71b034a245c01f1ae4ef356dca5c89a | 1,351 | py | Python | performance/driver/classes/observer/logstax/filters/Grok.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 2 | 2018-02-27T18:21:21.000Z | 2018-03-16T12:12:12.000Z | performance/driver/classes/observer/logstax/filters/Grok.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2018-06-25T07:14:41.000Z | 2018-06-25T07:14:41.000Z | performance/driver/classes/observer/logstax/filters/Grok.py | mesosphere/dcos-perf-test-driver | 8fba87cb6c6f64690c0b5bef5c7d9f2aa0fba06b | [
"Apache-2.0"
] | 1 | 2020-06-25T10:37:21.000Z | 2020-06-25T10:37:21.000Z | from .Basic import BasicFilter
# NOTE: The following block is needed only when sphinx is parsing this file
# in order to generate the documentation. It's not really useful for
# the logic of the file itself.
try:
from pygrok import Grok
except ImportError:
import logging
logging.error(
'One or ... | 28.145833 | 75 | 0.664693 |
217db26c8258f99c422e020ef061ad191ca5ccad | 2,551 | py | Python | src/segmentation/evaluation/metrics/various_metrics.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | 5 | 2021-03-30T02:22:42.000Z | 2022-01-18T20:12:30.000Z | src/segmentation/evaluation/metrics/various_metrics.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | null | null | null | src/segmentation/evaluation/metrics/various_metrics.py | prhuppertz/Burned_Area_Detection | 4091e8a5ba22c1db28b4accd71cf2994d544ffab | [
"Apache-2.0"
] | 3 | 2021-04-26T02:08:05.000Z | 2021-08-15T20:12:31.000Z | from fastai import torch_core
import numpy as np
import torch
def dice(
input: np.ndarray, targs: np.ndarray, iou: bool = False, eps: float = 1e-8
) -> float:
"Returns the dice coefficient for a binary target"
n = targs.shape[0]
input = torch.from_numpy(input).argmax(dim=1).view(n, -1)
targs = tor... | 28.344444 | 85 | 0.640141 |
217dc7e4183234fe7b58bdfc6283c982e192bdd5 | 1,514 | py | Python | pi_wars/utils/controller.py | MageJohn/pi_wars | f1167846a5f9cbc87c54dfb961cd02fc8c81b345 | [
"MIT"
] | null | null | null | pi_wars/utils/controller.py | MageJohn/pi_wars | f1167846a5f9cbc87c54dfb961cd02fc8c81b345 | [
"MIT"
] | null | null | null | pi_wars/utils/controller.py | MageJohn/pi_wars | f1167846a5f9cbc87c54dfb961cd02fc8c81b345 | [
"MIT"
] | null | null | null | from evdev import InputDevice, ecodes, list_devices
class Stick:
def __init__(self, axis_x, axis_y, deadzone=0.05):
# pass axis in as an event.code.ecodes
self.axes = (axis_x, axis_y)
self.value = [0, 0]
self.mapped_events = {
(ecodes.EV_ABS, axis_x): self,
... | 29.686275 | 67 | 0.583223 |
217dd41bfd532d6f0b595d61e773eecff0bf7942 | 8,041 | py | Python | utils/make_cython.py | Nico-Curti/scorer | 2e15f8d6d5b91369624483d889bf61ca1a9f6a14 | [
"MIT"
] | null | null | null | utils/make_cython.py | Nico-Curti/scorer | 2e15f8d6d5b91369624483d889bf61ca1a9f6a14 | [
"MIT"
] | null | null | null | utils/make_cython.py | Nico-Curti/scorer | 2e15f8d6d5b91369624483d889bf61ca1a9f6a14 | [
"MIT"
] | 3 | 2019-03-30T09:08:24.000Z | 2019-05-22T15:46:08.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
import re
import os
__author__ = ['Nico Curti']
__email__ = ['nico.curti2@unibo.it']
def make_base_pyx_script ():
body = '''# distutils: language = c++
# cython: language_level=2
from cython.o... | 35.267544 | 170 | 0.646313 |
217dfda2aeb44bbedfe807b77cda35bf91b86a18 | 6,715 | py | Python | appengine/predator/app/common/model/test/clusterfuzz_analysis_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | appengine/predator/app/common/model/test/clusterfuzz_analysis_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | appengine/predator/app/common/model/test/clusterfuzz_analysis_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from datetime import datetime
import mock
from analysis.clusterfuzz_data import ClusterfuzzData
from analysis.type_enums import CrashClient
from common.appe... | 34.086294 | 77 | 0.627997 |
217e04c5ac57531c560a9bd93f884e9d941af83a | 11,181 | py | Python | mapproxy/util/async.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/util/async.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/util/async.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # This file is part of the MapProxy project.
# Copyright (C) 2011 Omniscale <http://omniscale.de>
#
# 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... | 32.408696 | 120 | 0.602182 |
217e0cb6de93da11e552b21a786696f427afc40b | 17,451 | py | Python | userbot/plugins/animazioni3.py | sethgld/userbotseth | 2994aa84be57aed8ab036ed6f59342d9ca2f3cb2 | [
"MIT"
] | null | null | null | userbot/plugins/animazioni3.py | sethgld/userbotseth | 2994aa84be57aed8ab036ed6f59342d9ca2f3cb2 | [
"MIT"
] | null | null | null | userbot/plugins/animazioni3.py | sethgld/userbotseth | 2994aa84be57aed8ab036ed6f59342d9ca2f3cb2 | [
"MIT"
] | null | null | null | """
Commands:
.avast
.avast1
.call
.hack
.linux
.macos
.stock
.windows
"""
import asyncio
from telethon import events
from platform import uname
from userbot import CMD_HELP, ALIVE_NAME
from userbot.utils import admin_cmd
DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "I'M STUPID"
@borg.on(admin_cmd(pattern=... | 66.353612 | 759 | 0.587703 |
217e337970d8e04486965a07a942faac77c94077 | 12,193 | py | Python | onadata/apps/logger/south_migrations/0043_xform_title_255.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/south_migrations/0043_xform_title_255.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | onadata/apps/logger/south_migrations/0043_xform_title_255.py | ubpd/kobocat | 45906e07e8f05c30e3e26bab5570a8ab1ee264db | [
"BSD-2-Clause"
] | null | null | null | # coding: utf-8
from __future__ import unicode_literals, print_function, division, absolute_import
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'XForm.title'
d... | 76.685535 | 182 | 0.564422 |
217e54b24ef0060fe9cdac65f188caf42607ba3b | 5,831 | py | Python | test.py | keithrozario/aws_auto_calculator | 73226526276e59ce629d6b4d30847a48cbf4f702 | [
"Apache-2.0"
] | null | null | null | test.py | keithrozario/aws_auto_calculator | 73226526276e59ce629d6b4d30847a48cbf4f702 | [
"Apache-2.0"
] | null | null | null | test.py | keithrozario/aws_auto_calculator | 73226526276e59ce629d6b4d30847a48cbf4f702 | [
"Apache-2.0"
] | null | null | null | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import ElementClickInterceptedException
from... | 39.134228 | 127 | 0.699708 |
217e5517e82cb75ddf920971542448df8b0319b0 | 685 | py | Python | MediaCatalog/media_catalog/migrations/0004_auto_20191222_1123.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | null | null | null | MediaCatalog/media_catalog/migrations/0004_auto_20191222_1123.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 7 | 2020-06-06T01:06:19.000Z | 2022-02-10T11:15:14.000Z | MediaCatalog/media_catalog/migrations/0004_auto_20191222_1123.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:21:24.000Z | 2020-11-04T03:21:24.000Z | # Generated by Django 2.2.9 on 2019-12-22 11:23
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('media_catalog', '0003_auto_20191218_1420'),
]
operations = [
migrations.RenameModel(
old_name='User',
new_name='MediaUser',
... | 26.346154 | 96 | 0.594161 |
217ebc97a68da842fdd22c2e576ebb0f9527a125 | 11,972 | py | Python | brownian/exp.py | rmorshea/quantfi | bb29364fe19c20ab2fe77263c474b147c795a058 | [
"MIT"
] | null | null | null | brownian/exp.py | rmorshea/quantfi | bb29364fe19c20ab2fe77263c474b147c795a058 | [
"MIT"
] | null | null | null | brownian/exp.py | rmorshea/quantfi | bb29364fe19c20ab2fe77263c474b147c795a058 | [
"MIT"
] | null | null | null | import numpy as np
from random import gauss
import utility_funcs as ufuncs
import matplotlib.pyplot as plt
from matplotlib.mlab import normpdf
from IPython.html.widgets import interact
from scipy.stats import ks_2samp
from scipy.optimize import minimize
def estep(n, dt, mu, sigma, m=1, mnv=0, var=1, w_init=0, p_init=1... | 36.278788 | 99 | 0.638072 |
217edc372f0d94a10fb2bc5b9c64874d7c62d99a | 6,144 | py | Python | contiki/tools/polyloc.py | lab11/polypoint | 0a21b19db7d00c0b0d9b523a54a6b243a5e64bac | [
"Apache-2.0"
] | 132 | 2015-05-16T10:19:15.000Z | 2022-03-17T22:11:49.000Z | contiki/tools/polyloc.py | lab11/polypoint | 0a21b19db7d00c0b0d9b523a54a6b243a5e64bac | [
"Apache-2.0"
] | 14 | 2015-05-27T07:55:43.000Z | 2018-06-27T22:57:47.000Z | contiki/tools/polyloc.py | lab11/polypoint | 0a21b19db7d00c0b0d9b523a54a6b243a5e64bac | [
"Apache-2.0"
] | 56 | 2015-06-27T09:51:13.000Z | 2022-01-22T17:02:42.000Z | #!/usr/bin/env python
import sys, getopt
import os
import glob
import numpy as np
import traceback
from scipy.optimize import fmin_bfgs
NUM_ANCHORS = 10
NUM_ANTENNAS = 3
NUM_CHANNELS = 3
#ANCHOR_POSITIONS = np.matrix([
# [0.055, 0.582, 1.808],
# [4.255, 0.567, 1.756],
# [0.826, 7.179, 1.457],
# [4.263, 6... | 34.516854 | 106 | 0.573405 |
217ee8f9b5cfbfe1495a974bf99ca6301c735669 | 1,930 | py | Python | flags/data_utils/write_xml_file.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 13 | 2017-11-08T07:09:13.000Z | 2022-03-28T07:09:47.000Z | flags/data_utils/write_xml_file.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 3 | 2018-03-08T04:30:19.000Z | 2019-01-03T15:47:24.000Z | flags/data_utils/write_xml_file.py | Prasad9/Detect-Flags-SSD | c0d662bde99ed8df33d72bd06d61d5eb869d31a5 | [
"MIT"
] | 5 | 2018-01-15T15:26:44.000Z | 2021-08-18T08:02:51.000Z | import os
def write_xml_file(boxes, labels, file_size, file_path, save_folder, truncated_array, difficult_array, occluded_array):
file_name = file_path.split('/')[-1]
base_file_name = file_name.split('.')[0]
xml_file_name = '{}.xml'.format(base_file_name)
with open(os.path.join(save_folder, xml_file_name), 'w') as... | 45.952381 | 119 | 0.660104 |
217f0d010586fd59db3e8307b1531824f3ff8944 | 1,847 | py | Python | setup.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 63 | 2017-10-12T19:38:17.000Z | 2022-02-21T15:56:17.000Z | setup.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 93 | 2017-10-13T06:17:14.000Z | 2022-03-02T14:25:40.000Z | setup.py | martinell/django-carrot | 11c8790d8e68ccd7757cc9187d852acb2f528a8d | [
"Apache-2.0"
] | 19 | 2018-03-26T08:33:13.000Z | 2022-03-17T04:33:49.000Z | import os
from setuptools import find_packages, setup
from carrot import __version__
def readme():
with open('README.rst') as f:
return f.read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
if os.environ.get('TRAVIS_BRANCH') == 'develop':
name = 'django-carrot-dev'... | 31.305085 | 117 | 0.632918 |
217f1059783eb079f218ec219f7c75bcb510c3be | 105,155 | py | Python | sdk/storage/azure-storage-blob/tests/test_page_blob.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/storage/azure-storage-blob/tests/test_page_blob.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-storage-blob/tests/test_page_blob.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.
# --------------------------------------------------------------------... | 48.059872 | 192 | 0.669136 |
217f1b30817c94a6d13eba10dbeb39c108ed6270 | 18,451 | py | Python | taskflow/tests/unit/test_failure.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 299 | 2015-01-11T01:36:28.000Z | 2022-03-11T08:56:27.000Z | taskflow/tests/unit/test_failure.py | JonasMie/taskflow | 942bb76d9cf69a87e7c78f0e231ce9b94e69bb37 | [
"Apache-2.0"
] | 4 | 2015-02-06T11:12:58.000Z | 2018-10-19T18:55:58.000Z | taskflow/tests/unit/test_failure.py | jimbobhickville/taskflow | 6ea991ce94f5be46b7e4726b4c4f014e10407786 | [
"Apache-2.0"
] | 67 | 2015-01-11T14:34:24.000Z | 2022-01-14T02:57:03.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2013 Yahoo! 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... | 36.178431 | 79 | 0.627283 |
217f58d7055cef5dacbcc217c6eb26e8f40a3161 | 8,685 | py | Python | responder_login/login_manager.py | theoldmoon0602/responder-login | f147e3c6d9db2876a908c459cb7aba905ee1f414 | [
"MIT"
] | null | null | null | responder_login/login_manager.py | theoldmoon0602/responder-login | f147e3c6d9db2876a908c459cb7aba905ee1f414 | [
"MIT"
] | null | null | null | responder_login/login_manager.py | theoldmoon0602/responder-login | f147e3c6d9db2876a908c459cb7aba905ee1f414 | [
"MIT"
] | null | null | null | import inspect
import warnings
import asyncio
import datetime
from functools import wraps
from .mixins import AnonymousUserMixin
from .config import (COOKIE_NAME, COOKIE_REMEMBER_ME, COOKIE_DURATION,
COOKIE_SECURE, COOKIE_HTTPONLY, LOGIN_REQUIRED_MESSAGE, LOGIN_REQUIRED_ROUTE,
... | 36.037344 | 104 | 0.588371 |
217f6a3c8483da16f444c8e3d134d0cc97d3d749 | 221 | py | Python | config.py | Stardust87/We-are-not-alone | 6792efe029ae25abc94756b549aaa20a2b8daf0f | [
"MIT"
] | 3 | 2020-10-05T18:46:24.000Z | 2021-02-06T21:26:19.000Z | config.py | Stardust87/We-are-not-alone | 6792efe029ae25abc94756b549aaa20a2b8daf0f | [
"MIT"
] | null | null | null | config.py | Stardust87/We-are-not-alone | 6792efe029ae25abc94756b549aaa20a2b8daf0f | [
"MIT"
] | null | null | null | from livewires import games, color
import pygame
games.init(screen_width = 1000, screen_height = 700, fps = 60)
pygame.display.set_caption('WE ARE NOT ALONE')
pygame.display.set_mode([1000, 700])
games1 = games | 24.555556 | 63 | 0.737557 |
217f826120f8a67ce742c61a68b0389f871865e0 | 11,812 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_extended_database_blob_auditing_policies_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/_extended_database_blob_auditing_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_extended_database_blob_auditing_policies_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 ... | 46.687747 | 245 | 0.688368 |
217f86040e02e78b51e7423abef96e8a7a9f2087 | 4,353 | py | Python | provenance_lib/tests/test_yaml_constructors.py | ChrisKeefe/provenance_py | 1b0fe98227b11db324c49492200f7241e4405bec | [
"BSD-3-Clause"
] | 1 | 2022-03-31T19:43:47.000Z | 2022-03-31T19:43:47.000Z | provenance_lib/tests/test_yaml_constructors.py | ChrisKeefe/provenance_py | 1b0fe98227b11db324c49492200f7241e4405bec | [
"BSD-3-Clause"
] | 48 | 2021-03-20T04:51:25.000Z | 2022-03-07T19:03:36.000Z | provenance_lib/tests/test_yaml_constructors.py | ChrisKeefe/provenance_py | 1b0fe98227b11db324c49492200f7241e4405bec | [
"BSD-3-Clause"
] | null | null | null | import unittest
import warnings
import yaml
from ..yaml_constructors import MetadataInfo
class YamlConstructorTests(unittest.TestCase):
"""
YAML Constructors are used to handle the custom YAML tags defined by the
framework.
"""
def test_unknown_tag(self):
"""
Makes explicit the c... | 39.93578 | 79 | 0.622559 |
217fc68e3c584de343eeba07f6ebf75e47867a83 | 5,834 | py | Python | scripts/sim_qfunc_pt_latent.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | scripts/sim_qfunc_pt_latent.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | scripts/sim_qfunc_pt_latent.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from matplotlib.pyplot import hist
from rlkit.envs.remote import RemoteRolloutEnv
from rlkit.misc import eval_util
from rlkit.samplers.rollout_functions import rollout
from rlkit.torch.core import PyTorchModule
import rlkit.torch.pytorch_util as ptu
import argparse
import pickle
import uuid
from rlkit.core import logge... | 34.934132 | 180 | 0.623243 |
217fd4079843b1adafee80ad56d3dc566758a395 | 4,823 | py | Python | example/tutorial_tfrecord.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | example/tutorial_tfrecord.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | example/tutorial_tfrecord.py | lllcho/tensorlayer | 87591b4945a6a67dfb4ea797a575efae997fd9d2 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
"""You will learn.
1. How to save data into TFRecord format file.
2. How to read data from TFRecord format file by using Queue and Thread.
Reference:
-----------
English : https://indico.io/blog/tensorflow-data-inputs-part1-placeholders-protobufs-queues/
https://ww... | 41.577586 | 130 | 0.665768 |
217fd8deb760f1cc52e5f9693bf3624c46723cd3 | 30,800 | py | Python | scilifelab/db/statusdb.py | ssjunnebo/scilifelab | 79960f7042118f900bd1eaabe4902ee76abd8020 | [
"MIT"
] | 1 | 2016-03-21T14:04:09.000Z | 2016-03-21T14:04:09.000Z | scilifelab/db/statusdb.py | ssjunnebo/scilifelab | 79960f7042118f900bd1eaabe4902ee76abd8020 | [
"MIT"
] | 35 | 2015-01-22T08:25:02.000Z | 2020-02-17T12:09:12.000Z | scilifelab/db/statusdb.py | ssjunnebo/scilifelab | 79960f7042118f900bd1eaabe4902ee76abd8020 | [
"MIT"
] | 6 | 2015-01-16T15:32:08.000Z | 2020-01-30T14:34:40.000Z | """Database backend for connecting to statusdb"""
import re
import collections
from itertools import izip
from scilifelab.db import Couch
from scilifelab.utils.timestamp import utc_time
from scilifelab.utils.misc import query_yes_no, merge
from scilifelab.db.statusDB_utils import save_couchdb_obj
from uuid import uuid4... | 50.574713 | 201 | 0.625422 |
217fe68945880dbbecdc1319b38a3e7e1d8c2afe | 35,975 | py | Python | holoviews/core/data/__init__.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | holoviews/core/data/__init__.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | holoviews/core/data/__init__.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
try:
import itertools.izip as zip
except ImportError:
pass
import numpy as np
import param
from .. import util
from ..dimension import redim, Dimension, process_dimensions
from ..element import Element
from ..ndmapping import OrderedDict
from ..spaces import HoloMap, Dy... | 39.274017 | 103 | 0.609423 |
21801a8853be29d789aa0378975815b4a45bc625 | 1,225 | py | Python | losses/classic_losses/l2.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | losses/classic_losses/l2.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | losses/classic_losses/l2.py | ariel415el/PerceptualLossGLO-Pytorch | 7caa743b719cd95066103a69f3e78a70507de8b5 | [
"MIT"
] | null | null | null | import torch
class L2(torch.nn.Module):
def __init__(self, batch_reduction='mean'):
super(L2, self).__init__()
self.name = 'L2'
self.batch_reduction = batch_reduction
def __call__(self, x, y):
dists = (x - y).pow(2)
if self.batch_reduction == 'mean':
return... | 28.488372 | 55 | 0.561633 |
21801cc1bca01b9a1c23ef97c12b1801fbb04447 | 984 | py | Python | terrascript/resource/Sighery/njalla.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/resource/Sighery/njalla.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/resource/Sighery/njalla.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/resource/Sighery/njalla.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:22:37 UTC)
import terrascript
class njalla_record_a(terrascript.Resource):
pass
class njalla_record_aaaa(terrascript.Resource):
pass
class njalla_record_caa(terrascript.Resource):
pass
class njall... | 16.965517 | 73 | 0.751016 |
2180219f107a2db400f6074dc10e8c3b38436b34 | 1,776 | py | Python | letsencrypt-apache/setup.py | meehow/letsencrypt | 64073b234a6b87a574d873599a8d4dbf11729d5c | [
"Apache-2.0"
] | 1 | 2021-09-05T14:18:00.000Z | 2021-09-05T14:18:00.000Z | letsencrypt-apache/setup.py | meehow/letsencrypt | 64073b234a6b87a574d873599a8d4dbf11729d5c | [
"Apache-2.0"
] | null | null | null | letsencrypt-apache/setup.py | meehow/letsencrypt | 64073b234a6b87a574d873599a8d4dbf11729d5c | [
"Apache-2.0"
] | null | null | null | import sys
from setuptools import setup
from setuptools import find_packages
version = '0.1.0.dev0'
install_requires = [
'acme=={0}'.format(version),
'letsencrypt=={0}'.format(version),
'python-augeas',
'setuptools', # pkg_resources
'zope.component',
'zope.interface',
]
if sys.version_info... | 27.323077 | 78 | 0.627252 |
21802544198e9360f3feee050c62faf8c8a17d89 | 2,860 | py | Python | test/language/array_types/python/AutoArrayTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | test/language/array_types/python/AutoArrayTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | test/language/array_types/python/AutoArrayTest.py | PeachOS/zserio | ea01f6906c125a6baab7e8ed865eeb08cd46c37c | [
"BSD-3-Clause"
] | null | null | null | import unittest
import zserio
from testutils import getZserioApi
class AutoArrayTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.api = getZserioApi(__file__, "array_types.zs").auto_array
def testBitSizeOfLength1(self):
self._checkBitSizeOf(self.AUTO_ARRAY_LENGTH1)
def t... | 35.308642 | 90 | 0.709091 |
21802bc5e23bb71ae676d42aa4236cd65a8711e1 | 2,872 | py | Python | capstoneproject/helpers/view_helpers/profile_view_helper.py | athrun22/content-rating | 25ccdb02edd18d0118d60fce609b60baadef257b | [
"Apache-2.0"
] | 1 | 2018-02-08T01:50:37.000Z | 2018-02-08T01:50:37.000Z | capstoneproject/helpers/view_helpers/profile_view_helper.py | jwillikers/content-rating | 25ccdb02edd18d0118d60fce609b60baadef257b | [
"Apache-2.0"
] | null | null | null | capstoneproject/helpers/view_helpers/profile_view_helper.py | jwillikers/content-rating | 25ccdb02edd18d0118d60fce609b60baadef257b | [
"Apache-2.0"
] | null | null | null | """
This file contains helper functions for the profile view
"""
from django.contrib.auth.models import User
from capstoneproject.app_forms \
import ChangeUsernameForm, ChangePasswordForm, ChangeUsernamePasswordForm
from capstoneproject.helpers.view_helpers import view_helper
from capstoneproject.helpers.model_help... | 34.60241 | 104 | 0.702994 |
218037f08d187afae2f77205d9fae3f93ac926b4 | 3,534 | py | Python | tests/testcases/test_main.py | sutcalag/towhee | 1ca575ca569bb344773463593292fdd7b0e9e74f | [
"Apache-2.0"
] | 1 | 2021-12-09T09:47:53.000Z | 2021-12-09T09:47:53.000Z | tests/testcases/test_main.py | Nydclky/towhee | 7cad1b64a44ccfedb18f3064dd33e44eac88ac65 | [
"Apache-2.0"
] | null | null | null | tests/testcases/test_main.py | Nydclky/towhee | 7cad1b64a44ccfedb18f3064dd33e44eac88ac65 | [
"Apache-2.0"
] | null | null | null | # coding : UTF-8
from operator import methodcaller
from test_image_embedding import *
from test_pipeline import *
from test_image_object_embedding import *
def pipeline_register():
pipeline_names = ["image-embedding", "towhee/video_embedding_resnet50",
"towhee/img_object_embedding"]
ret... | 31.274336 | 78 | 0.60781 |
218068e3bde1f3d4501e5b835236d73ae0a9afc9 | 3,706 | py | Python | Florence/MaterialLibrary/AnisotropicMooneyRivlin_1.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 65 | 2017-08-04T10:21:13.000Z | 2022-02-21T21:45:09.000Z | Florence/MaterialLibrary/AnisotropicMooneyRivlin_1.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 6 | 2018-06-03T02:29:20.000Z | 2022-01-18T02:30:22.000Z | Florence/MaterialLibrary/AnisotropicMooneyRivlin_1.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 10 | 2018-05-30T09:44:10.000Z | 2021-05-18T08:06:51.000Z | from __future__ import division
import numpy as np
from numpy import einsum
from .MaterialBase import Material
from Florence.Tensor import trace, Voigt, makezero
class AnisotropicMooneyRivlin_1(Material):
"""A compressible transervely isotropic Mooney-Rivlin model with the energy given by:
W(C) = u1... | 35.295238 | 116 | 0.542903 |
2180a7997f938662d35534a84e648fd6b407648f | 14,090 | py | Python | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/activestamp/operations/_recovery_points_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# 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) AutoRe... | 44.03125 | 328 | 0.67154 |
2180ac0c8f2759a141491c37612ae102d4438100 | 1,475 | py | Python | packages/python-packages/api-stub-generator/apistub/nodes/_variable_node.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | packages/python-packages/api-stub-generator/apistub/nodes/_variable_node.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | packages/python-packages/api-stub-generator/apistub/nodes/_variable_node.py | LarryOsterman/azure-sdk-tools | 0146e05f4aee767ed7593218109546663be95ec4 | [
"MIT"
] | null | null | null | from ._base_node import NodeEntityBase
class VariableNode(NodeEntityBase):
"""Variable node represents class and instance variable defined in a class
"""
def __init__(self, *, namespace, parent_node, name, type_name, value, is_ivar):
super().__init__(namespace, parent_node, type_name)
sel... | 33.522727 | 83 | 0.583729 |
2180cbca1b92c352136c864c17d3c9bdf495ebe5 | 1,969 | py | Python | venv/Lib/site-packages/pyrogram/raw/functions/updates/get_state.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/functions/updates/get_state.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/functions/updates/get_state.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 29.38806 | 103 | 0.621635 |
2180e270f78afbb8145a97917f6341a0671a2001 | 12,223 | py | Python | juneberry/trainer.py | sei-nmvanhoudnos/Juneberry | a4824bc74180134a9ef5326addbc83110177102c | [
"MIT"
] | null | null | null | juneberry/trainer.py | sei-nmvanhoudnos/Juneberry | a4824bc74180134a9ef5326addbc83110177102c | [
"MIT"
] | null | null | null | juneberry/trainer.py | sei-nmvanhoudnos/Juneberry | a4824bc74180134a9ef5326addbc83110177102c | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
"""
This base class provides a skeleton loop for supervised training and evaluating classifiers.
It makes the following assumptions:
- Data comes with targets/labels.
It provides the following features:
- A variety of extension points to customize the process.
- Data can be provided in batches... | 41.293919 | 156 | 0.615315 |
2180ed86ebe28def0b4f747f9209320c4c5417d2 | 433 | py | Python | PyFuzzyBot/pysimbotlib/core/config.py | huak95/PySimBot-extended | cac233150ca5da87af19057d80d458a59c9d1ce9 | [
"Apache-2.0"
] | 1 | 2022-01-24T13:03:29.000Z | 2022-01-24T13:03:29.000Z | PyFuzzyBot/pysimbotlib/core/config.py | huak95/PySimBot-extended | cac233150ca5da87af19057d80d458a59c9d1ce9 | [
"Apache-2.0"
] | null | null | null | PyFuzzyBot/pysimbotlib/core/config.py | huak95/PySimBot-extended | cac233150ca5da87af19057d80d458a59c9d1ce9 | [
"Apache-2.0"
] | null | null | null | import os
ROBOT_DISTANCE_ANGLES = list(range(0, 360, 45))
ROBOT_MAX_SENSOR_DISTANCE = 100
ROBOT_DEFAULT_START_POS = (20, 560)
OBJECTIVE_DEFAULT_START_POS = (500, 50)
SIMBOTMAP_SIZE = (700, 600)
SIMBOTMAP_BBOX = (
((0, 0), (SIMBOTMAP_SIZE[0], 0)),
((SIMBOTMAP_SIZE[0], 0), (SIMBOTMAP_SIZE[0], SIMBOTMAP_SIZE[1]... | 28.866667 | 69 | 0.678984 |
218105ded0456b69334bef581afb1aa25b9e13d5 | 8,816 | py | Python | l5kit/evaluation/csv_utils.py | WannaFIy/l5kit | ee9aeda74f6681779f09cd946781964f5bcf62e1 | [
"Apache-2.0"
] | 1 | 2020-08-28T14:05:03.000Z | 2020-08-28T14:05:03.000Z | l5kit/l5kit/evaluation/csv_utils.py | shoman2/l5kit | 1e235b8617488e818be30cd7193d43588125bbab | [
"Apache-2.0"
] | null | null | null | l5kit/l5kit/evaluation/csv_utils.py | shoman2/l5kit | 1e235b8617488e818be30cd7193d43588125bbab | [
"Apache-2.0"
] | 1 | 2020-12-07T22:40:54.000Z | 2020-12-07T22:40:54.000Z | import csv
from itertools import chain
from typing import Iterator, List, Optional
import numpy as np
MAX_MODES = 3
"""
These utilities write and read csv with ground-truth and prediction data.
Both share the first two fields (timestamp and track_id) which are used to identify a single record.
GT:
Single mode futur... | 36.279835 | 117 | 0.681488 |
21811283017a265139fbbc0b53bc1b264129dd6a | 766 | py | Python | alipay/aop/api/response/AlipayTradeCreditPayConsultResponse.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/AlipayTradeCreditPayConsultResponse.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/AlipayTradeCreditPayConsultResponse.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 AlipayTradeCreditPayConsultResponse(AlipayResponse):
def __init__(self):
super(AlipayTradeCreditPayConsultResponse, self).__init__()
self._consult_result = None
... | 29.461538 | 108 | 0.733681 |
21811d1bed5a58842dd60cf8cc1c246e266df6a6 | 1,383 | py | Python | asynq/tests/test_async_task.py | JelleZijlstra/asynq | e69469b7c3af62439c82434202a349c43da4159d | [
"Apache-2.0"
] | null | null | null | asynq/tests/test_async_task.py | JelleZijlstra/asynq | e69469b7c3af62439c82434202a349c43da4159d | [
"Apache-2.0"
] | null | null | null | asynq/tests/test_async_task.py | JelleZijlstra/asynq | e69469b7c3af62439c82434202a349c43da4159d | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Quora, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 32.928571 | 91 | 0.70282 |
21812208c8dccbb53a13aa7a19101b14a5d9778a | 255 | py | Python | game_engine/material.py | igor-ribeiiro/Balance | 84d610dc391e1e6095c634bb3f6a54ca1c6581ad | [
"MIT"
] | 2 | 2018-07-12T00:16:57.000Z | 2021-02-25T06:18:33.000Z | download/subdirectories/game_engine/material.py | CarlosMatheus/PyginWeb | a6151bd4e59559a60c7c23ab8e1355517c63fe2d | [
"MIT"
] | null | null | null | download/subdirectories/game_engine/material.py | CarlosMatheus/PyginWeb | a6151bd4e59559a60c7c23ab8e1355517c63fe2d | [
"MIT"
] | 1 | 2018-06-28T23:28:40.000Z | 2018-06-28T23:28:40.000Z | from game_engine.color import Color
class Material:
def __init__(self, color=Color.white, alpha=255):
"""
set initial parameters
:param color: material color
"""
self.color = color
self.alpha = alpha
| 19.615385 | 53 | 0.6 |
21812300077dad47e7a25eeae3f49843aa356f01 | 42,465 | py | Python | cupy/random/generator.py | andy6975/cupy | 34b388e4a4fe7c59092b4d4c9c96b2f307e49e46 | [
"MIT"
] | 1 | 2021-10-04T21:57:09.000Z | 2021-10-04T21:57:09.000Z | cupy/random/generator.py | hephaex/cupy | 5cf50a93bbdebe825337ed7996c464e84b1495ba | [
"MIT"
] | 1 | 2019-08-05T09:36:13.000Z | 2019-08-06T12:03:01.000Z | cupy/random/generator.py | hephaex/cupy | 5cf50a93bbdebe825337ed7996c464e84b1495ba | [
"MIT"
] | 1 | 2022-03-24T13:19:55.000Z | 2022-03-24T13:19:55.000Z | import atexit
import binascii
import functools
import hashlib
import operator
import os
import time
import warnings
import numpy
import six
import cupy
from cupy import core
from cupy import cuda
from cupy.cuda import curand
from cupy.cuda import device
from cupy.random import _kernels
from cupy import util
class R... | 36.294872 | 87 | 0.569245 |
21812f84a7f8e8013951e1f3eb314402599cc48d | 23,015 | py | Python | resolwe_bio/processes/support_processors/multiqc.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/processes/support_processors/multiqc.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | resolwe_bio/processes/support_processors/multiqc.py | MiaZganjar/resolwe-bio | 1559435796cb40905d81c8fd14872f7ac66e66e8 | [
"Apache-2.0"
] | null | null | null | """Prepare MultiQC report."""
import json
import os
import pandas as pd
from plumbum import TEE
from resolwe.process import (
BooleanField,
Cmd,
DataField,
DirField,
FileHtmlField,
GroupField,
IntegerField,
ListField,
Process,
StringField,
)
def create_symlink(src, dst):
... | 37.120968 | 117 | 0.575885 |
21813ac3705f9081eeda18b062bfb6f456b1d002 | 149,653 | py | Python | cinder/volume/drivers/dell_emc/sc/storagecenter_api.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/dell_emc/sc/storagecenter_api.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/dell_emc/sc/storagecenter_api.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015-2017 Dell Inc, or its subsidiaries.
#
# 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 requi... | 42.346633 | 79 | 0.565909 |
218159537d241677beabbc2262da3f5c9e08726b | 721 | py | Python | src/utils/scheduler.py | takedarts/DenseResNet | d5f9c143ed3c484436a2a5bac366c3795e5d47ec | [
"MIT"
] | null | null | null | src/utils/scheduler.py | takedarts/DenseResNet | d5f9c143ed3c484436a2a5bac366c3795e5d47ec | [
"MIT"
] | null | null | null | src/utils/scheduler.py | takedarts/DenseResNet | d5f9c143ed3c484436a2a5bac366c3795e5d47ec | [
"MIT"
] | null | null | null | from torch.optim.lr_scheduler import _LRScheduler
import math
class CosineAnnealingLR(_LRScheduler):
def __init__(self, optimizer, T_max=1, T_up=0, eta_min=0, last_epoch=-1):
self.T_max = T_max
self.T_up = T_up
self.eta_min = eta_min
super().__init__(optimizer, last_epoc... | 34.333333 | 79 | 0.578363 |
21815a302e84f5672f00071118cc59a49cb5ea28 | 2,141 | py | Python | src/graph_transpiler/webdnn/backend/webgl/kernels/convert_rgba_to_r.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | 1 | 2018-07-26T13:52:21.000Z | 2018-07-26T13:52:21.000Z | src/graph_transpiler/webdnn/backend/webgl/kernels/convert_rgba_to_r.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | src/graph_transpiler/webdnn/backend/webgl/kernels/convert_rgba_to_r.py | gunpowder78/webdnn | c659ea49007f91d178ce422a1eebe289516a71ee | [
"MIT"
] | null | null | null | from typing import List
from webdnn.backend.code_generator.injectors.kernel_name_injector import KernelNameInjector
from webdnn.backend.webgl.attributes.channel_mode import ChannelMode, ChannelModeEnum
from webdnn.backend.webgl.generator import WebGLDescriptorGenerator
from webdnn.backend.webgl.kernel import Kernel
fr... | 28.932432 | 99 | 0.67305 |
2181655eba9be53a0009be3b662941340d161783 | 125,907 | py | Python | salt/minion.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/minion.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/minion.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Routines to set up a minion
'''
# Import python libs
from __future__ import absolute_import, print_function, with_statement
import os
import re
import sys
import copy
import time
import types
import signal
import fnmatch
import logging
import threading
import traceback
import contextlib
impo... | 41.512364 | 165 | 0.545704 |
218189cdbcd72c4c33506adcfda7e5a5e6dbe328 | 534 | bzl | Python | example/third_party/jakarta_xml_bind.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/jakarta_xml_bind.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | example/third_party/jakarta_xml_bind.bzl | wix-playground/rules_maven_third_party | ff0b486df194779d7d8e6c9102cd12138e3305c3 | [
"Apache-2.0"
] | null | null | null | load("@rules_maven_third_party//:import_external.bzl", import_external = "import_external")
def dependencies():
import_external(
name = "jakarta_xml_bind_jakarta_xml_bind_api",
artifact = "jakarta.xml.bind:jakarta.xml.bind-api:2.3.3",
artifact_sha256 = "c04539f472e9a6dd0c7685ea82d677282269a... | 41.076923 | 93 | 0.728464 |
21818bfc9055ea60705f931a2a80c0cf040526ff | 8,070 | py | Python | ap_evaluate.py | yuangan/PartNet | ddeca5d1c4da53c3b53b2e491126934f471d10a1 | [
"MIT"
] | null | null | null | ap_evaluate.py | yuangan/PartNet | ddeca5d1c4da53c3b53b2e491126934f471d10a1 | [
"MIT"
] | null | null | null | ap_evaluate.py | yuangan/PartNet | ddeca5d1c4da53c3b53b2e491126934f471d10a1 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import stats
import scipy.io as sio
import os
import torch
from torch import nn
from dataloader import Data_Loader
import util
import torch.utils.data
from torchfoldext import FoldExt
import sys
import json
import partnet as partnet_model
with open('./part_color_mapping.json', 'r') as f:
... | 31.27907 | 133 | 0.676456 |
21819a745a781fb98f7660e7b2ae2071793003f6 | 345 | py | Python | src/speechkit/auth.py | drygdryg/yandex-speechkit-lib-python | b45bbb6550d5bb77289ff0462e794cbc8b0669a0 | [
"MIT"
] | 2 | 2021-12-13T20:29:00.000Z | 2022-01-28T13:02:54.000Z | src/speechkit/auth.py | drygdryg/yandex-speechkit-lib-python | b45bbb6550d5bb77289ff0462e794cbc8b0669a0 | [
"MIT"
] | 1 | 2021-07-26T00:36:18.000Z | 2021-07-26T13:52:59.000Z | src/speechkit/auth.py | drygdryg/yandex-speechkit-lib-python | b45bbb6550d5bb77289ff0462e794cbc8b0669a0 | [
"MIT"
] | 2 | 2022-02-08T12:39:26.000Z | 2022-03-12T19:08:18.000Z | """
Utilities for Yandex Cloud authorisation
`IAM token <https://cloud.yandex.com/en/docs/iam/concepts/authorization/iam-token>`_
`Api-Key <https://cloud.yandex.com/en/docs/iam/concepts/authorization/api-key>`_
"""
from speechkit._auth import generate_jwt, get_iam_token, get_api_key
__all__ = ['generate_jwt', 'get_ia... | 34.5 | 84 | 0.773913 |
2181c75d55ffe0a97fec1a86dffe2b49844ac818 | 4,866 | py | Python | mylib/Entity/Entity.py | cozy9/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 2 | 2021-08-01T19:33:44.000Z | 2022-02-14T16:37:34.000Z | mylib/Entity/Entity.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | null | null | null | mylib/Entity/Entity.py | data2code/Metascape | 261901657bef5e1060f1ae86a2a3913d1e4c87c4 | [
"Apache-2.0"
] | 1 | 2019-05-22T12:44:34.000Z | 2019-05-22T12:44:34.000Z | from __future__ import absolute_import
import xml.etree.ElementTree as ET
import re
import util
class EntityList(object):
def __init__(self, name, xml):
'''name is the xml tag for the entity, e.g., Entrezgene for efetch gene db entries
It takes xml text (or a list of xml, it is resulted from multip... | 35.518248 | 169 | 0.544595 |
2181d5de4b5cb8d4f973a95568f947cfd2016fe3 | 880 | py | Python | tencent_embedding_utils/filter_Tencent_embedding.py | MangoManGeek/Chinese-Poem-Generation | 14b075b8a55862b582eae76ca538ec324238394a | [
"MIT"
] | null | null | null | tencent_embedding_utils/filter_Tencent_embedding.py | MangoManGeek/Chinese-Poem-Generation | 14b075b8a55862b582eae76ca538ec324238394a | [
"MIT"
] | null | null | null | tencent_embedding_utils/filter_Tencent_embedding.py | MangoManGeek/Chinese-Poem-Generation | 14b075b8a55862b582eae76ca538ec324238394a | [
"MIT"
] | null | null | null | from char_dict import CharDict
def process(in_path, out_path):
f_in=open(in_path,'r')
f_out=open(out_path,'w')
temp=f_in.readline().split()
num_of_lines=int(temp[0])
embedding_sz=int(temp[1])
char_dict = CharDict()
count=0
for line in f_in:
data=line.split()
word=data[0]
all_char_in_dict = True
... | 13.75 | 102 | 0.673864 |
2181eae23a4108ead6df006d2ca030e20c61a901 | 2,612 | py | Python | dialogflow_v2/__init__.py | gertventer1970/dialogflow-python-client-v2 | e78b0e6765f94fb9ecbbc72c9fc30ce7245703e2 | [
"Apache-2.0"
] | 1 | 2020-10-14T07:43:19.000Z | 2020-10-14T07:43:19.000Z | dialogflow_v2/__init__.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | dialogflow_v2/__init__.py | everydaycodings/dialogflow-python-client-v2 | c1c925d94726f49e549870e087ad79ee491056e2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 29.681818 | 85 | 0.776417 |
2181f507b9aabd690a8a35c014db8454e4d53531 | 297,472 | py | Python | intersight/models/bios_policy.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/bios_policy.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/bios_policy.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class BiosPolicy(object):
"""
NOTE: This class is a... | 36.697755 | 8,763 | 0.64314 |
2181fa58ba8a442628e8ce07343c9659d01fbd5a | 1,835 | py | Python | credoscript/models/ligliginteraction.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/models/ligliginteraction.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | credoscript/models/ligliginteraction.py | tlb-lab/credoscript | 32bdf08d84703dc2062dae4df1a95587d36c3cf7 | [
"MIT"
] | null | null | null | from sqlalchemy.orm import relationship
from sqlalchemy.sql.expression import or_
from sqlalchemy.ext.hybrid import hybrid_method
from credoscript import Base, schema
from credoscript.mixins import PathMixin
class LigLigInteraction(Base, PathMixin):
"""
Represents a ligand-ligand interaction from CREDO.
"... | 38.229167 | 142 | 0.647956 |
21820eb3836a68dd8d7ef1e4432c271068b66482 | 11,180 | py | Python | dvs/myinference.py | B06901052/deep-stabilization | b6030b463cf1f1128660e900669f43e742aa2651 | [
"Apache-2.0"
] | null | null | null | dvs/myinference.py | B06901052/deep-stabilization | b6030b463cf1f1128660e900669f43e742aa2651 | [
"Apache-2.0"
] | null | null | null | dvs/myinference.py | B06901052/deep-stabilization | b6030b463cf1f1128660e900669f43e742aa2651 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import torch
import torchvision
import torch.nn as nn
from torch.autograd import Variable
import time
import yaml
import argparse
import numpy as np
from printer import Printer
from dataset import get_data_loader, get_inference_data_loader
from model import Model
import datetime
import copy
from u... | 41.102941 | 162 | 0.592487 |
21822d18d3987e1bdd2de88ffa0de477f1365243 | 6,895 | py | Python | kadi/cmds/cmds.py | jzuhone/kadi | de4885327d256e156cfe42b2b1700775f5b4d6cf | [
"BSD-3-Clause"
] | null | null | null | kadi/cmds/cmds.py | jzuhone/kadi | de4885327d256e156cfe42b2b1700775f5b4d6cf | [
"BSD-3-Clause"
] | null | null | null | kadi/cmds/cmds.py | jzuhone/kadi | de4885327d256e156cfe42b2b1700775f5b4d6cf | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import tables
import numpy as np
from astropy.table import Table
from Chandra.Time import DateTime
import pickle
import warnings
from kadi.paths import IDX_CMDS_PATH, PARS_DICT_PATH
__all__ = ['filter']
# Warn about deprecation but use FutureWarning s... | 29.465812 | 88 | 0.592603 |
21827ad918e4f2c3939fb425834c723bdb227976 | 2,556 | py | Python | app.py | mr-soulfox/LibraryApi | 458509bde76848a1fc745f995122dd0ffd9ec8da | [
"MIT"
] | null | null | null | app.py | mr-soulfox/LibraryApi | 458509bde76848a1fc745f995122dd0ffd9ec8da | [
"MIT"
] | null | null | null | app.py | mr-soulfox/LibraryApi | 458509bde76848a1fc745f995122dd0ffd9ec8da | [
"MIT"
] | null | null | null | from flask import Flask, jsonify, request, render_template
from modules import bookshelf, getValues, updateValues, deleteValues
app = Flask(__name__)
#API page
@app.route('/', methods=['GET'])
def main():
return render_template('index.html')
#Add books on sqlite database
@app.route('/obras', methods... | 28.087912 | 93 | 0.599765 |
218290572360f6c596d5b47dede455a1a69910c8 | 696 | py | Python | examples/lecture07.py | SeattleCentral/ITC110 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | 12 | 2017-01-05T03:43:10.000Z | 2019-01-18T03:39:09.000Z | examples/lecture07.py | ogarmela/ITC110-1 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | null | null | null | examples/lecture07.py | ogarmela/ITC110-1 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | 2 | 2019-02-28T05:13:40.000Z | 2019-11-09T05:06:35.000Z | # Create an empty window
from graphics import GraphWin, Point, Circle, Line
win = GraphWin()
# win2 = GraphWin()
# class Point(x, y)
circle_center = Point(50, 60)
# class Circle(Point(), radius)
circle = Circle(circle_center, 20)
circle.setFill('red')
circle.draw(win)
# Draw a Line
# class Line(Point(), Point())
a... | 10.545455 | 50 | 0.637931 |
2182b75e1a86a819600bc1a18cdaa7034e167321 | 650 | py | Python | src/ftd/version.py | FabienTaxil/ftd | a36e0ca59eb60e216a5de1eb93d1089a7f080ec7 | [
"MIT"
] | 3 | 2022-01-26T23:43:16.000Z | 2022-02-11T07:50:49.000Z | src/ftd/version.py | lixaft/ftd | a36e0ca59eb60e216a5de1eb93d1089a7f080ec7 | [
"MIT"
] | null | null | null | src/ftd/version.py | lixaft/ftd | a36e0ca59eb60e216a5de1eb93d1089a7f080ec7 | [
"MIT"
] | null | null | null | """Manage the package version."""
import logging
import packaging.version
from maya import cmds
import ftd
__all__ = [
"MAJOR",
"MINOR",
"MICRO",
"RELEASE",
"require_maya",
"deprecated",
]
LOG = logging.getLogger(__name__)
VERSION = packaging.version.parse(ftd.__version__)
MAJOR = VERSION.... | 17.105263 | 51 | 0.696923 |
2182bceae3bf8488e658fb6d4f166352d8a78730 | 11,155 | py | Python | examples/units/basic_units.py | yuvallanger/matplotlib | e0020d318a9a9685594c6bff4631f74599321459 | [
"MIT",
"BSD-3-Clause"
] | 8 | 2017-04-11T08:55:30.000Z | 2022-03-25T04:31:26.000Z | examples/units/basic_units.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | null | null | null | examples/units/basic_units.py | epgauss/matplotlib | c9898ea9a30c67c579ab27cd61b68e2abae0fb0e | [
"MIT",
"BSD-3-Clause"
] | 14 | 2015-10-05T04:15:46.000Z | 2020-06-11T18:06:02.000Z | import math
import numpy as np
import matplotlib.units as units
import matplotlib.ticker as ticker
from matplotlib.axes import Axes
from matplotlib.cbook import iterable
class ProxyDelegate(object):
def __init__(self, fn_name, proxy_type):
self.proxy_type = proxy_type
self.fn_name = fn_name
... | 30.067385 | 79 | 0.593545 |
2182cfd8780b4716bf24709a98ebbc293c32fb54 | 22,503 | py | Python | lightcurve.py | dhuppenkothen/UTools | 5d910ed43e26636db15bd28fb07f58f037ecbf8d | [
"BSD-2-Clause"
] | 1 | 2015-03-30T23:31:11.000Z | 2015-03-30T23:31:11.000Z | lightcurve.py | dhuppenkothen/UTools | 5d910ed43e26636db15bd28fb07f58f037ecbf8d | [
"BSD-2-Clause"
] | null | null | null | lightcurve.py | dhuppenkothen/UTools | 5d910ed43e26636db15bd28fb07f58f037ecbf8d | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
#####################
#
# Class definition for the light curve class.
# Used to create light curves out of photon counting data
# or to save existing light curves in a class that's easy to use.
#
#
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('PS')
# import matplotlib.pyplot ... | 38.932526 | 146 | 0.538639 |
2182ec8347fb86551154fbca1af701d362acfe4d | 68,080 | py | Python | Sklearn_scipy_numpy/source/sklearn/metrics/classification.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 4 | 2018-01-21T21:18:35.000Z | 2022-03-23T21:57:56.000Z | Sklearn_scipy_numpy/source/sklearn/metrics/classification.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/sklearn/metrics/classification.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | """Metrics to assess performance on classification task given classe prediction
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better
"""
# Authors: Alexandre Gramfort <alexandre.gram... | 38.012284 | 86 | 0.622356 |
218315d0e8729c1c6e37ef28ccc4f582fb53f1ce | 30,864 | py | Python | src/azul/project/hca/transformers.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/project/hca/transformers.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/project/hca/transformers.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | from abc import ABCMeta, abstractmethod
from collections import Counter
import logging
from typing import Any, Iterable, List, Mapping, MutableMapping, Optional, Sequence, Set, Union
from humancellatlas.data.metadata import api
from azul import reject, require
from azul.project.hca.metadata_generator import MetadataG... | 39.927555 | 117 | 0.581033 |
21832acdd83aecc090aed6ad785cd02a8b800f71 | 1,485 | py | Python | server/src/expandLogger.py | leonard-thong/dlwlrat | 2b4b669a3b2f348d1b05125afd6b8a1907b6b212 | [
"CC-BY-3.0"
] | 2 | 2020-10-08T06:01:22.000Z | 2020-12-15T16:28:27.000Z | server/src/expandLogger.py | dreamyang-liu/SciAnnotate | dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2 | [
"CC-BY-3.0"
] | 8 | 2020-12-09T02:55:20.000Z | 2020-12-23T23:31:42.000Z | server/src/expandLogger.py | dreamyang-liu/SciAnnotate | dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2 | [
"CC-BY-3.0"
] | 4 | 2021-02-02T04:51:53.000Z | 2021-07-18T17:00:04.000Z | # -*- coding:utf-8 -*-
"""
===========================================
@author: lmy
@time: 2020/8/11 5:54 PM
@project: brat
@file: expandLogger.py
===========================================
"""
import sys
import os
EXCEPTION = "\n\033[95mEXCEPTION: "
OKBLUE = "\n\033[94m"
OKGREEN = "\n\033[92m"
WARNING... | 26.052632 | 131 | 0.556229 |
218334a2088616a351f7c4f879416deb8effa483 | 26 | py | Python | btd6_memory_info/generated/UnityEngine/UIElements/IMGUIContainer/imgui_container.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/UIElements/IMGUIContainer/imgui_container.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/UIElements/IMGUIContainer/imgui_container.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class IMGUIContainer: pass | 26 | 26 | 0.884615 |
218345188c20116cfdd6e13f320fed82758d1438 | 1,938 | py | Python | cloudmesh_cmd3light/plugins/ManCommand.py | cloudmesh/cmd3light | 48652c3557488b9871bce6d746497f48d5485659 | [
"Apache-2.0"
] | null | null | null | cloudmesh_cmd3light/plugins/ManCommand.py | cloudmesh/cmd3light | 48652c3557488b9871bce6d746497f48d5485659 | [
"Apache-2.0"
] | null | null | null | cloudmesh_cmd3light/plugins/ManCommand.py | cloudmesh/cmd3light | 48652c3557488b9871bce6d746497f48d5485659 | [
"Apache-2.0"
] | null | null | null | import textwrap
from cloudmesh_cmd3light.command import command, Cmd3Command
class ManCommand(Cmd3Command):
topics = {"man": "shell"}
def __init__(self, context):
self.context = context
if self.context.debug:
print("init command man")
def _print_rst(self, what):
""... | 24.531646 | 86 | 0.480908 |
21835372c9608431c3a58f05751b467799442c6f | 4,201 | py | Python | es_stats/classes.py | untergeek/ElasticStats-py | 107754b703d3f618b849303048af570698ff70b5 | [
"Apache-2.0"
] | 1 | 2015-12-14T05:44:02.000Z | 2015-12-14T05:44:02.000Z | es_stats/classes.py | untergeek/ElasticStats-py | 107754b703d3f618b849303048af570698ff70b5 | [
"Apache-2.0"
] | 2 | 2016-04-18T18:54:01.000Z | 2018-04-05T20:50:52.000Z | es_stats/classes.py | untergeek/ElasticStats-py | 107754b703d3f618b849303048af570698ff70b5 | [
"Apache-2.0"
] | 2 | 2016-10-31T17:51:18.000Z | 2017-03-06T04:15:58.000Z | import logging
from datetime import timedelta, datetime, date
from dotmap import DotMap
from es_stats.exceptions import MissingArgument, NotFound
from es_stats.utils import fix_key, get_value, status_map
class Stats():
"""Stats Parent Class"""
def __init__(self, client, cache_timeout=60):
self.logger ... | 35.302521 | 96 | 0.610093 |
218378e149724ff5c4630ea542590bf5189f5bd6 | 1,324 | py | Python | plugin_service/env.py | Chace-wang/bk-sops | c5f42606c796eae369d23c7de3e47d4ec166c658 | [
"Apache-2.0"
] | null | null | null | plugin_service/env.py | Chace-wang/bk-sops | c5f42606c796eae369d23c7de3e47d4ec166c658 | [
"Apache-2.0"
] | null | null | null | plugin_service/env.py | Chace-wang/bk-sops | c5f42606c796eae369d23c7de3e47d4ec166c658 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 55.166667 | 115 | 0.817221 |
21839fb36ee97fbf081b68709ded6aef583d42d7 | 10,606 | py | Python | src/features/prov_dataset.py | prajaotak/aqi_thailand2 | 0a6f8573e840c90196c1a4619758099afdd0deef | [
"MIT"
] | null | null | null | src/features/prov_dataset.py | prajaotak/aqi_thailand2 | 0a6f8573e840c90196c1a4619758099afdd0deef | [
"MIT"
] | null | null | null | src/features/prov_dataset.py | prajaotak/aqi_thailand2 | 0a6f8573e840c90196c1a4619758099afdd0deef | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import pandas as pd
import numpy as np
import json
from glob import glob
import logging
from joblib import Parallel
if __package__:
from ..imports import *
from ..gen_functions import *
from ..data.read_data import *
from ..data.fire_data import *
from ... | 34.102894 | 118 | 0.585989 |
2183ea313c2bc4c721d294a81ef088f5048c8299 | 11,344 | py | Python | task/trans_trainer.py | zijunsun/deepsea | 50ed9d9e6888461435ed05e74f9f97c846b2d3ba | [
"MIT"
] | null | null | null | task/trans_trainer.py | zijunsun/deepsea | 50ed9d9e6888461435ed05e74f9f97c846b2d3ba | [
"MIT"
] | null | null | null | task/trans_trainer.py | zijunsun/deepsea | 50ed9d9e6888461435ed05e74f9f97c846b2d3ba | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@file : trans_trainer.py
@author: zijun
@contact : zijun_sun@shannonai.com
@date : 2020/10/26 14:11
@version: 1.0
@desc :
"""
import argparse
import json
import os
import torch
from pytorch_lightning import LightningModule, Trainer
from pytorch_lightning.callbacks... | 39.664336 | 116 | 0.626939 |
2183ec0c0846f89a76b37f4a3de03af75f653eed | 13,373 | py | Python | scripts/update_demo_with_latents.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | scripts/update_demo_with_latents.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | scripts/update_demo_with_latents.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | # from multiworld.envs.mujoco.sawyer_xyz.sawyer_push_multiobj_subset import SawyerMultiobjectEnv
# from multiworld.envs.mujoco.sawyer_xyz.sawyer_reach import SawyerReachXYZEnv
import sys
from multiworld.core.image_env import ImageEnv
from multiworld.envs.real_world.sawyer.sawyer_reaching import SawyerReachXYZEnv
# fro... | 38.318052 | 147 | 0.617588 |
2183f5879dd33c0c6cebddd14594c1b63f4e642e | 9,511 | py | Python | package/tests/test_ansible_shell.py | IngaAl/Ansible-Shell | 73113c6317c96b1d5e4109e44b3029dccc828919 | [
"Apache-2.0"
] | 1 | 2016-12-29T14:14:39.000Z | 2016-12-29T14:14:39.000Z | package/tests/test_ansible_shell.py | IngaAl/Ansible-Shell | 73113c6317c96b1d5e4109e44b3029dccc828919 | [
"Apache-2.0"
] | 85 | 2016-12-21T12:58:14.000Z | 2022-03-29T21:53:30.000Z | package/tests/test_ansible_shell.py | IngaAl/Ansible-Shell | 73113c6317c96b1d5e4109e44b3029dccc828919 | [
"Apache-2.0"
] | 4 | 2016-12-09T22:41:13.000Z | 2022-02-02T12:09:16.000Z | import os
from unittest import TestCase
from cloudshell.cm.ansible.ansible_shell import AnsibleShell
from cloudshell.cm.ansible.domain.Helpers.ansible_connection_helper import AnsibleConnectionHelper
from cloudshell.cm.ansible.domain.exceptions import AnsibleException
from cloudshell.cm.ansible.domain.ansible_configur... | 39.962185 | 120 | 0.664704 |
2183f65114f4cab92b8bbaf3d9ec5821049fee5a | 13,283 | py | Python | powerline/lint/markedjson/scanner.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | 19 | 2015-09-01T20:49:16.000Z | 2022-01-08T22:13:23.000Z | powerline/lint/markedjson/scanner.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | null | null | null | powerline/lint/markedjson/scanner.py | zhaocai/powerline | 8aae1145835b4b2a71f1ed71b81d490e2907bd39 | [
"MIT"
] | 6 | 2019-04-25T03:42:35.000Z | 2020-06-05T15:25:23.000Z | # Scanner produces tokens of the following types:
# STREAM-START
# STREAM-END
# DOCUMENT-START
# DOCUMENT-END
# FLOW-SEQUENCE-START
# FLOW-MAPPING-START
# FLOW-SEQUENCE-END
# FLOW-MAPPING-END
# FLOW-ENTRY
# KEY
# VALUE
# SCALAR(value, plain, style)
#
# Read comments in the Scanner code for more details.
__all__ = ['Sc... | 27.964211 | 78 | 0.70865 |
2184050ce1594cc88a41d13e1a8a0580b1ff0975 | 169 | py | Python | iris_sdk/models/maps/ord/npa_search_order.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/ord/npa_search_order.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/ord/npa_search_order.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class NpaSearchOrderMap(BaseMap):
enable_lca = None
npa_nxx = None
quantity = None | 18.777778 | 49 | 0.733728 |
21840f4de512be84ffd9bbdc25d3b1b102acc88a | 1,020 | py | Python | sko/demo_func.py | gitter-badger/scikit-opt | fc3a5790b17cf7c8ece8127c0487652567799fe8 | [
"MIT"
] | null | null | null | sko/demo_func.py | gitter-badger/scikit-opt | fc3a5790b17cf7c8ece8127c0487652567799fe8 | [
"MIT"
] | null | null | null | sko/demo_func.py | gitter-badger/scikit-opt | fc3a5790b17cf7c8ece8127c0487652567799fe8 | [
"MIT"
] | null | null | null | import numpy as np
from scipy import spatial
def function_for_TSP(num_points, seed=None):
if seed:
np.random.seed(seed=seed)
points_coordinate = np.random.rand(num_points, 2) # generate coordinate of points
distance_matrix = spatial.distance.cdist(points_coordinate, points_coordinate, metric='eu... | 26.153846 | 120 | 0.662745 |
218431aebacb43dbd7e3dfe3a8cd25940bb605ea | 513 | py | Python | office365/teams/teamMemberSettings.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/teams/teamMemberSettings.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/teams/teamMemberSettings.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_value import ClientValue
class TeamMemberSettings(ClientValue):
"""Settings to configure whether members can perform certain actions, for example, create channels and add bots,
in the team. """
def __init__(self):
super().__init__()
self.allowCreateUpdateChan... | 34.2 | 116 | 0.727096 |
218435ccd269c5858a76b980032c3df71328b34b | 12,129 | py | Python | beast/tools/setup_batch_beast_fit.py | christinawlindberg/beast | 3926acf2349a08a7ef085c2101e7120c1fdf2a28 | [
"BSD-3-Clause"
] | 21 | 2017-03-18T13:46:06.000Z | 2022-02-21T16:02:10.000Z | beast/tools/setup_batch_beast_fit.py | christinawlindberg/beast | 3926acf2349a08a7ef085c2101e7120c1fdf2a28 | [
"BSD-3-Clause"
] | 673 | 2017-03-12T23:39:28.000Z | 2022-03-17T14:07:38.000Z | beast/tools/setup_batch_beast_fit.py | christinawlindberg/beast | 3926acf2349a08a7ef085c2101e7120c1fdf2a28 | [
"BSD-3-Clause"
] | 36 | 2017-03-18T18:00:35.000Z | 2021-09-22T06:35:55.000Z | #!/usr/bin/env python
"""
Code to create the batch files for fitting
"""
import os
import stat
import argparse
import tables
#####
import numpy as np
from astropy.table import Table
from astropy.io import fits
#####
from beast.tools import beast_settings
from beast.tools.run import create_filenames
def setup_batc... | 30.862595 | 102 | 0.549427 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.