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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
93a55399e96f267d74f393761c622383f1b69310 | 821 | py | Python | bin/mdf_viewer.py | manahl/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 100 | 2015-06-14T23:38:41.000Z | 2019-10-28T03:23:28.000Z | bin/mdf_viewer.py | ahlmss/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 6 | 2016-12-28T11:22:12.000Z | 2018-12-02T23:01:08.000Z | bin/mdf_viewer.py | manahl/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 40 | 2015-07-21T17:13:56.000Z | 2019-07-29T21:26:49.000Z | """
Graphical viewer for MDF valuation graphs.
"""
import argparse
import sys
import wx
from mdf.viewer import MDFViewerFrame
from datetime import datetime
if __name__ == "__main__":
arg_parser = argparse.ArgumentParser()
parsed_args = arg_parser.parse_args(sys.argv)
filename = arg_parser.filename
... | 23.457143 | 67 | 0.686967 |
93a58b4ab3561e2ddc742f5934d4ac2ba945d6b5 | 1,059 | py | Python | vsphere/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | vsphere/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | null | null | null | vsphere/tests/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import pytest
import mock
from datadog_checks.vsphere import VSphereCheck
from .utils import disable_thread_pool, get_mocked_server
def _instance():
"""
Create a default instance, used by multiple fixtures
... | 22.531915 | 73 | 0.700661 |
93a5b0c9a12ab993247c4ffe38f00616cd373cc3 | 43,310 | py | Python | src/sage/rings/quotient_ring.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/rings/quotient_ring.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/rings/quotient_ring.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | r"""
Quotient Rings
AUTHORS:
- William Stein
- Simon King (2011-04): Put it into the category framework, use the
new coercion model.
- Simon King (2011-04): Quotients of non-commutative rings by
twosided ideals.
TESTS::
sage: R.<x> = PolynomialRing(ZZ)
sage: I = R.ideal([4 + 3*x + x^2, 1 + x^2])
sag... | 33.289777 | 296 | 0.544978 |
93a5d7b63edee6c5f4a85a2ab5d6d8216fc853ba | 837 | py | Python | onadata/apps/viewer/management/commands/set_uuid_in_xml.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 87 | 2015-02-10T23:36:28.000Z | 2022-01-31T00:51:10.000Z | onadata/apps/viewer/management/commands/set_uuid_in_xml.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 443 | 2015-04-28T18:50:25.000Z | 2022-03-31T03:29:43.000Z | onadata/apps/viewer/management/commands/set_uuid_in_xml.py | amks1/kobocat | 0f36c75cc55345716558e8bece2ef48567896997 | [
"BSD-2-Clause"
] | 122 | 2015-01-13T16:27:44.000Z | 2022-01-24T09:35:56.000Z | # coding: utf-8
from django.core.management.base import BaseCommand
from django.utils.translation import ugettext as _, ugettext_lazy
from onadata.apps.viewer.models.data_dictionary import DataDictionary
from onadata.libs.utils.model_tools import queryset_iterator
class Command(BaseCommand):
help = ugettext_lazy... | 38.045455 | 71 | 0.640382 |
93a5e470ebbb4ff16568141fa13fc9e5e9834919 | 31,944 | py | Python | test/test_fnetdata.py | vanderhe/fortnet-python | 118237f0ce750852d973b213161fc04623fd7f82 | [
"BSD-2-Clause"
] | null | null | null | test/test_fnetdata.py | vanderhe/fortnet-python | 118237f0ce750852d973b213161fc04623fd7f82 | [
"BSD-2-Clause"
] | 1 | 2022-03-11T15:21:56.000Z | 2022-03-11T15:33:46.000Z | test/test_fnetdata.py | vanderhe/fortnet-python | 118237f0ce750852d973b213161fc04623fd7f82 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
#------------------------------------------------------------------------------#
# fortnet-python: Python Tools for the Fortnet Software Package #
# Copyright (C) 2021 - 2022 T. W. van der Heide #
# ... | 30.393911 | 80 | 0.682601 |
93a5fbc9615ec8df838804dbfaa20692f83902cf | 27,044 | py | Python | somaticseq/utilities/dockered_pipelines/tumor_normal_run.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 159 | 2015-07-26T15:14:44.000Z | 2022-03-31T03:29:25.000Z | somaticseq/utilities/dockered_pipelines/tumor_normal_run.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 77 | 2016-06-12T21:44:43.000Z | 2022-03-31T19:33:49.000Z | somaticseq/utilities/dockered_pipelines/tumor_normal_run.py | lethalfang/somaticseq | e6f5b1c6b98b324d418407154392778164215a65 | [
"BSD-2-Clause"
] | 64 | 2015-10-26T01:34:32.000Z | 2022-03-14T14:43:08.000Z | #!/usr/bin/env python3
import argparse, os, re
import subprocess
from datetime import datetime
from shutil import move
import somaticseq.utilities.split_Bed_into_equal_regions as split_bed
import somaticseq.utilities.dockered_pipelines.container_option as container
from somaticseq._version import __version__ as VERSIO... | 52.512621 | 425 | 0.591481 |
93a61bbea4a4992f442c2f240dac1c53ea4c0681 | 705 | py | Python | tests/test_pcapfilter.py | D3f0/pcapfilter | 8613820555dda4a4f16f69203334566ae75289c5 | [
"MIT"
] | null | null | null | tests/test_pcapfilter.py | D3f0/pcapfilter | 8613820555dda4a4f16f69203334566ae75289c5 | [
"MIT"
] | 41 | 2018-12-14T14:42:53.000Z | 2022-01-28T10:50:51.000Z | tests/test_pcapfilter.py | D3f0/pcapfilter | 8613820555dda4a4f16f69203334566ae75289c5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from tests.utils import (
PreloadedPcapFile,
ReadablePcapWriter,
assert_same_packet,
)
from tests.utils import tcp_packet # noqa: F401
from pcapfilter.pcapfilter import run_filter
def test_pcap_in_out(cli_runner, tcp_packet): # noqa: F811
input_file_h... | 24.310345 | 59 | 0.723404 |
93a64dfa96baa89520ca35d7a1a68618fec3e643 | 1,032 | py | Python | 测试/draft.py | shayxu-ai/A-Repository-for-Machine-Learning | 4b4cea15bb005d1c58f4395fde97cadf44fb0186 | [
"Apache-2.0"
] | null | null | null | 测试/draft.py | shayxu-ai/A-Repository-for-Machine-Learning | 4b4cea15bb005d1c58f4395fde97cadf44fb0186 | [
"Apache-2.0"
] | null | null | null | 测试/draft.py | shayxu-ai/A-Repository-for-Machine-Learning | 4b4cea15bb005d1c58f4395fde97cadf44fb0186 | [
"Apache-2.0"
] | null | null | null | from typing import List
class Solution:
def uniquePathsWithObstacles(self, obstacleGrid) -> int:
# 递归
# 递归的深度
# 超出时间限制,优化
# 其实是一道dp题
if not obstacleGrid or obstacleGrid[0][0] == 1:
return 0
len_row = len(obstacleGrid)
len_col = len(obstacleGrid... | 26.461538 | 63 | 0.415698 |
93a6508b440b38f51473f962694253ad63821fc9 | 3,632 | py | Python | setup.py | multixo-informatie-techne/indy-node | f8ad6ee08c8f934c7396fbaa432f2450caaaa35e | [
"Apache-2.0"
] | null | null | null | setup.py | multixo-informatie-techne/indy-node | f8ad6ee08c8f934c7396fbaa432f2450caaaa35e | [
"Apache-2.0"
] | null | null | null | setup.py | multixo-informatie-techne/indy-node | f8ad6ee08c8f934c7396fbaa432f2450caaaa35e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
v = sys.version_info
if sys.version_info < (3, 5):
msg = "FAIL: Requires Python 3.5 or later, " \
"but setup.py was run using {}.{}.{}"
v = sys.version_info
print(msg.format(v.major, v.minor, v.micro))
# ... | 36.686869 | 96 | 0.608756 |
93a652ec56463386336e696218131bf290799f13 | 27,700 | py | Python | mi/dataset/parser/vel3d_k_wfp_stc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/vel3d_k_wfp_stc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | mi/dataset/parser/vel3d_k_wfp_stc.py | rmanoni/mi-dataset | c1012a0cd8f2ea075e008cdd1ab291ed54f44d43 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
@package mi.dataset.parser.vel3d_k_wfp_stc
@file marine-integrations/mi/dataset/parser/vel3d_k_wfp_stc.py
@author Steve Myerson (Raytheon), Mark Worden
@brief Parser for the Vel3dKWfpStc dataset driver
Release notes:
Initial Release
"""
"""
The VEL3D input file is a binary file.
The first r... | 37.893297 | 79 | 0.579639 |
93a665c530fd61eb31c6a0a6640a5c6287551589 | 2,600 | py | Python | python/app/plugins/http/Weblogic/CVE_2017_10271.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 351 | 2020-02-26T05:23:26.000Z | 2022-03-26T12:39:19.000Z | python/app/plugins/http/Weblogic/CVE_2017_10271.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 15 | 2020-03-26T07:31:49.000Z | 2022-03-09T02:12:17.000Z | python/app/plugins/http/Weblogic/CVE_2017_10271.py | taomujian/linbing | fe772a58f41e3b046b51a866bdb7e4655abaf51a | [
"MIT"
] | 99 | 2020-02-28T07:30:46.000Z | 2022-03-16T16:41:09.000Z | #!/usr/bin/env python3
from app.lib.utils.request import request
from app.lib.utils.common import get_capta, get_useragent
class CVE_2017_10271_BaseVerify:
def __init__(self, url):
self.info = {
'name': 'CVE-2017-10271',
'description': 'Weblogic XMLDecoder Deserialize Vulnerability... | 38.235294 | 142 | 0.503846 |
93a6c7dfd19f49c20c82bee584ead6021baaaeaa | 4,596 | py | Python | src/azul/service/manifest.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/service/manifest.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | src/azul/service/manifest.py | VIIgit/azul | bb61965f625c667979a2f255f6bc39dcafaaf40b | [
"Apache-2.0"
] | null | null | null | import base64
import binascii
import json
import logging
import uuid
from botocore.exceptions import ClientError
from typing import Tuple, Optional, Union
from azul import config
from azul.service import AbstractService
from azul.service.step_function_helper import StateMachineError, StepFunctionHelper
from azul.type... | 42.953271 | 111 | 0.616841 |
93a6df835b3bc97b8c3a30d3738fb693266beeb3 | 13,135 | py | Python | triggers.py | vlee90/python-gtm-scripts | 16ccb7475f195d661a849610e0d984f26e29e877 | [
"Apache-2.0"
] | null | null | null | triggers.py | vlee90/python-gtm-scripts | 16ccb7475f195d661a849610e0d984f26e29e877 | [
"Apache-2.0"
] | null | null | null | triggers.py | vlee90/python-gtm-scripts | 16ccb7475f195d661a849610e0d984f26e29e877 | [
"Apache-2.0"
] | null | null | null | """Access and manage a Google Tag Manager account."""
import argparse
import sys
import httplib2
from apiclient.discovery import build
from oauth2client import client
from oauth2client import file
from oauth2client import tools
def printThis(statement):
print statement
def GetService(api_name, api_version, scope... | 30.689252 | 87 | 0.685801 |
93a6ef0feeda9e2040845c4b8ee8a8fe9583504f | 169 | py | Python | clisops/__init__.py | cehbrecht/clisops | 7d80bcbc21ee8a6248f88bb590a1fed33a060bfd | [
"BSD-3-Clause"
] | null | null | null | clisops/__init__.py | cehbrecht/clisops | 7d80bcbc21ee8a6248f88bb590a1fed33a060bfd | [
"BSD-3-Clause"
] | null | null | null | clisops/__init__.py | cehbrecht/clisops | 7d80bcbc21ee8a6248f88bb590a1fed33a060bfd | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for clisops."""
from .__version__ import __author__
from .__version__ import __email__
from .__version__ import __version__
| 28.166667 | 36 | 0.757396 |
93a72887afa07adceffb76dead53e9d01cdd948e | 38,940 | py | Python | networks/stylegan2.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | networks/stylegan2.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | networks/stylegan2.py | maua-maua-maua/nvGAN | edea24c58646780c9fb8ea942e49708ce9d62421 | [
"MIT"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this sof... | 50.051414 | 164 | 0.620236 |
93a7616b639e650b62f29bbe5f471ebd59e86dac | 464 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/offset_test.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/offset_test.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/offset_test.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2020 Bryan Siepert, written for Adafruit Industries
#
# SPDX-License-Identifier: Unlicense
import time
import board
import busio
import adafruit_tmp117
i2c = busio.I2C(board.SCL, board.SDA)
tmp117 = adafruit_tmp117.TMP117(i2c)
print("Temperature without offset: %.2f degrees C" % tmp117.temp... | 25.777778 | 77 | 0.769397 |
93a764edb1a1685abac85141e738bd0479001a01 | 31,509 | py | Python | bonneville/states/pkg.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/states/pkg.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/states/pkg.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Installation of packages using OS package managers such as yum or apt-get
=========================================================================
Salt can manage software packages via the pkg state module, packages can be
set up to be installed, latest, removed and purged. Package managem... | 35.563205 | 89 | 0.534863 |
93a7a2042971094b8edd6136d05889c8cd180a0d | 9,288 | py | Python | RELEASE_ScaleNet_minimal/utils/eval_save_utils_combine_RCNNONly.py | Jerrypiglet/scalenet | 6a5db480e650d10d1e575e93b6cee366d1912c8a | [
"Adobe-2006",
"Adobe-Glyph"
] | 33 | 2020-08-27T09:06:19.000Z | 2022-03-10T02:27:31.000Z | RELEASE_ScaleNet_minimal/utils/eval_save_utils_combine_RCNNONly.py | Jerrypiglet/scalenet | 6a5db480e650d10d1e575e93b6cee366d1912c8a | [
"Adobe-2006",
"Adobe-Glyph"
] | 2 | 2020-12-28T04:41:55.000Z | 2021-04-07T06:03:36.000Z | RELEASE_ScaleNet_minimal/utils/eval_save_utils_combine_RCNNONly.py | Jerrypiglet/scalenet | 6a5db480e650d10d1e575e93b6cee366d1912c8a | [
"Adobe-2006",
"Adobe-Glyph"
] | 5 | 2020-12-22T03:02:35.000Z | 2021-12-08T09:46:01.000Z | import torch
import os
# from eval_epoch_v4_combine_RCNNOnly import eval_epoch_combine_RCNNOnly
from eval_epoch_v5_combine_RCNNOnly_pose_multiCat import eval_epoch_combine_RCNNOnly
from maskrcnn_benchmark.utils.comm import synchronize
from .train_utils import clean_up_checkpoints
from utils.utils_misc import *
from e... | 61.509934 | 289 | 0.670435 |
93a7bf24c9b75debfc6c6de0eec40de11b52f51d | 15,999 | py | Python | oscar/lib/python2.7/site-packages/django/core/serializers/xml_serializer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/core/serializers/xml_serializer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/core/serializers/xml_serializer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
XML serializer.
"""
from __future__ import unicode_literals
from collections import OrderedDict
from xml.dom import pulldom
from xml.sax import handler
from xml.sax.expatreader import ExpatParser as _ExpatParser
from django.apps import apps
from django.conf import settings
from django.core.serialize... | 40.097744 | 112 | 0.596037 |
93a7c60030929c52927b8a3866158ee404ec1cbf | 2,958 | py | Python | examples/detailed_tbats.py | series-temporais/tbats | 1f2e0b5e769250c8ec0604fd75ef08ebbe251d37 | [
"MIT"
] | 1 | 2019-07-21T15:38:12.000Z | 2019-07-21T15:38:12.000Z | examples/detailed_tbats.py | arita37/tbats | 4e726919f08e39e74dd70a592b5258dfc7b25953 | [
"MIT"
] | null | null | null | examples/detailed_tbats.py | arita37/tbats | 4e726919f08e39e74dd70a592b5258dfc7b25953 | [
"MIT"
] | null | null | null | from tbats import TBATS
import numpy as np
# required on windows for multi-processing,
# see https://docs.python.org/2/library/multiprocessing.html#windows
if __name__ == '__main__':
steps = 14
np.random.seed(2342)
t = np.array(range(0, 160))
y = 5 * np.sin(t * 2 * np.pi / 14.5) + 5 * np.cos(t * 2 * np... | 39.44 | 105 | 0.682218 |
93a83158a9fb89cba489edd87507f2e7f7397a32 | 153 | py | Python | nequip/_version.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | 1 | 2022-03-13T10:17:53.000Z | 2022-03-13T10:17:53.000Z | nequip/_version.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | null | null | null | nequip/_version.py | leoil/nequip | 83b888797025c94b9963a508bc213a7c98da5bcb | [
"MIT"
] | null | null | null | # nequip package version file
# See Python packaging guide
# https://packaging.python.org/guides/single-sourcing-package-version/
__version__ = "0.3.3"
| 25.5 | 70 | 0.771242 |
93a840ad78543eb9e1f358bcaae8bf434a83c4ff | 33,663 | py | Python | NBA Project/venv/Lib/site-packages/plotly/figure_factory/_county_choropleth.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/figure_factory/_county_choropleth.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | NBA Project/venv/Lib/site-packages/plotly/figure_factory/_county_choropleth.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | import io
import numpy as np
import os
import pandas as pd
import warnings
from math import log, floor
from numbers import Number
from plotly import optional_imports
import plotly.colors as clrs
from plotly.figure_factory import utils
from plotly.exceptions import PlotlyError
import plotly.graph_objs as go
pd.option... | 33.035329 | 87 | 0.565309 |
93a8630f925168c3952bdb18c7b335e372afb7dc | 17,549 | py | Python | docs/examples/rgb_composite/Ui_RGBComposite.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | 1 | 2015-11-08T06:57:15.000Z | 2015-11-08T06:57:15.000Z | docs/examples/rgb_composite/Ui_RGBComposite.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | docs/examples/rgb_composite/Ui_RGBComposite.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'rgb_composite.ui'
#
# Created: Tue Feb 14 13:31:49 2012
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except A... | 63.583333 | 155 | 0.74933 |
93a8835c4b68d6982a5877fd8f90c2cea5591b50 | 7,628 | py | Python | src/sql.py | andresjuez/climb | 138c97e804fe4be1197180646e56aeab2c2436df | [
"MIT"
] | null | null | null | src/sql.py | andresjuez/climb | 138c97e804fe4be1197180646e56aeab2c2436df | [
"MIT"
] | null | null | null | src/sql.py | andresjuez/climb | 138c97e804fe4be1197180646e56aeab2c2436df | [
"MIT"
] | null | null | null | import logging
import mysql.connector
import src.definitions as md
class modelsql():
def __init__(self):
# indicates if it is connected to mysql server or not
self.bConnected = False
# indicates if a dabase is selected
self.bSelected = False
self.strSelectedDB = ""
... | 42.853933 | 208 | 0.603959 |
93a88c1d979dcf7b854b8e934c830a8388f574c5 | 1,812 | py | Python | sageintacctsdk/apis/__init__.py | rhinoworks/sageintacct-sdk-py | dd91725ef66b814e99079df9130ae2621d2faaed | [
"MIT"
] | null | null | null | sageintacctsdk/apis/__init__.py | rhinoworks/sageintacct-sdk-py | dd91725ef66b814e99079df9130ae2621d2faaed | [
"MIT"
] | null | null | null | sageintacctsdk/apis/__init__.py | rhinoworks/sageintacct-sdk-py | dd91725ef66b814e99079df9130ae2621d2faaed | [
"MIT"
] | null | null | null | """
Sage Intacct SDK init
"""
from .api_base import ApiBase
from .contacts import Contacts
from .locations import Locations
from .employees import Employees
from .accounts import Accounts
from .expense_types import ExpenseTypes
from .attachments import Attachments
from .expense_reports import ExpenseReports
from .vendo... | 26.26087 | 60 | 0.767108 |
93a8a503c84d1d5b0089729ea610a0cd12275121 | 1,967 | py | Python | src/cltl/speech_synthesis/api.py | leolani/cltl-tts | 1028acb61007a7c0a70936831dd3f092809c6dcb | [
"MIT"
] | null | null | null | src/cltl/speech_synthesis/api.py | leolani/cltl-tts | 1028acb61007a7c0a70936831dd3f092809c6dcb | [
"MIT"
] | null | null | null | src/cltl/speech_synthesis/api.py | leolani/cltl-tts | 1028acb61007a7c0a70936831dd3f092809c6dcb | [
"MIT"
] | null | null | null | import logging.config
from dataclasses import dataclass
from pathlib import Path
from typing import Optional
from cltl.combot.infra.config.local import LocalConfigurationContainer
# logging.config.fileConfig('config/logging.config')
logger = logging.getLogger(__name__)
# LocalConfigurationContainer.load_configuration... | 26.581081 | 111 | 0.666497 |
93a8f030289f2665677e1b3ad48e1220b3190843 | 6,018 | py | Python | tdrs-backend/tdpservice/security/test/test_clamav.py | riatzukiza/TANF-app | e34efc87e9703bab37db76b84cc47a041e3612a1 | [
"CC0-1.0"
] | 18 | 2020-03-25T19:57:12.000Z | 2021-07-26T15:37:50.000Z | tdrs-backend/tdpservice/security/test/test_clamav.py | raft-tech/TANF-app | a4ff39ca392591c4c218ad86df3bff5056d73152 | [
"CC0-1.0"
] | 1,465 | 2020-07-22T21:16:53.000Z | 2022-03-31T16:04:22.000Z | tdrs-backend/tdpservice/security/test/test_clamav.py | riatzukiza/TANF-app | e34efc87e9703bab37db76b84cc47a041e3612a1 | [
"CC0-1.0"
] | 15 | 2020-07-22T14:58:37.000Z | 2021-06-22T17:29:55.000Z | """Integration test(s) for clamav-rest operations."""
from os import remove
from requests.sessions import Session
import pytest
from django.contrib.admin import site as admin_site
from django.core.files.base import File
from rest_framework.status import HTTP_400_BAD_REQUEST
from tdpservice.security.admin import ClamA... | 30.09 | 80 | 0.724659 |
93a8f6cfc4722b2a335fcd437b26690fb8422e28 | 531 | py | Python | axonius_api_client/cli/grp_system/grp_remote_support/__init__.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/cli/grp_system/grp_remote_support/__init__.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/cli/grp_system/grp_remote_support/__init__.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""Command line interface for Axonius API Client."""
import click
from ...context import AliasedGroup
from . import cmd_configure, cmd_configure_analytics, cmd_configure_remote_access, cmd_get
@click.group(cls=AliasedGroup)
def remote_support():
"""Group: Manage Remote Support configurati... | 29.5 | 90 | 0.809793 |
93a97983975ecb3e51af3ff0c7714906f7fcd7b2 | 683 | py | Python | src/birdhouse_toolbox/library/wordpress/read_jwt.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | src/birdhouse_toolbox/library/wordpress/read_jwt.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | src/birdhouse_toolbox/library/wordpress/read_jwt.py | alexseitsinger/birdhouse-toolbox | 2c7c725d143b02228365ed82f57f6fecca21a614 | [
"BSD-2-Clause"
] | null | null | null | import os
import json
from json import JSONDecodeError
from ..read_config import read_config
from ...settings import DEFAULT_CONFIG_FILE_NAME
MISSING_CONFIG_MESSAGE = "No wordpress config for {site_url}"
MISSING_JWT_MESSAGE = "No wordpress jwt for {site_url}"
def read_jwt(site_url, config_file_name=DEFAULT_CONFIG_F... | 32.52381 | 78 | 0.77306 |
93a9a2b9b3ae2eb6278928c7c0a239930aec9185 | 892 | py | Python | agent/baseAgentActionLogger.py | Orpheon/All-in | 016901953904250226f388422318ef2f739bf82e | [
"MIT"
] | null | null | null | agent/baseAgentActionLogger.py | Orpheon/All-in | 016901953904250226f388422318ef2f739bf82e | [
"MIT"
] | null | null | null | agent/baseAgentActionLogger.py | Orpheon/All-in | 016901953904250226f388422318ef2f739bf82e | [
"MIT"
] | null | null | null | from typing import List, Dict, Union, Tuple
from agent.baseAgentNP import BaseAgentNP
class BaseAgentActionLogger(BaseAgentNP):
def __init__(self, agentNP):
super().__init__()
self._agentNP: BaseAgentNP = agentNP
def act(self, player_idx, round, active_rounds, current_bets, min_raise, prev_round_investme... | 37.166667 | 151 | 0.737668 |
93a9a6f42c69fb18d6f0a701851cc60c002a5859 | 2,994 | py | Python | test_utils/management/commands/crawlurls.py | kkubasik/django-test-utils | e8124541dac36bcf0fc006854f7b59fb4a40ae16 | [
"MIT"
] | 1 | 2015-11-08T11:33:47.000Z | 2015-11-08T11:33:47.000Z | test_utils/management/commands/crawlurls.py | kkubasik/django-test-utils | e8124541dac36bcf0fc006854f7b59fb4a40ae16 | [
"MIT"
] | null | null | null | test_utils/management/commands/crawlurls.py | kkubasik/django-test-utils | e8124541dac36bcf0fc006854f7b59fb4a40ae16 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.core.management.base import BaseCommand
from django.contrib.admindocs.views import extract_views_from_urlpatterns
from optparse import make_option
from test_utils.crawler import Crawler
from test_utils.patu import Patu
class Command(BaseCommand):
option_list = BaseComm... | 46.061538 | 106 | 0.614562 |
93a9ba3d4367c2757d02049b9c51388f8b09a5e4 | 117,432 | py | Python | Kerning/_kernClasses.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | 2 | 2021-02-12T20:36:29.000Z | 2021-11-03T08:04:01.000Z | Kerning/_kernClasses.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | Kerning/_kernClasses.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
class kern_classer:
def __init__(self):
self.glyph_kern_classes = OrderedDict()
def __call__(self, gn, **kwargs):
self.glyph_kern_classes[gn] = kwargs
def __iter__(self):
# yield from self.glyph_kern_classes.items()
for x in self.glyph_... | 61.386304 | 124 | 0.722929 |
93aa02ad8cd0ec8c3950ce94040f5b11e4f7bd46 | 724 | py | Python | nicos_mlz/pgaa/setups/collimation.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/pgaa/setups/collimation.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_mlz/pgaa/setups/collimation.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 | description = 'collimation devices'
group = 'lowlevel'
tango_base = 'tango://pgaahw.pgaa.frm2.tum.de:10000/pgaa/sample/'
devices = dict(
ell = device('nicos.devices.entangle.DigitalOutput',
description = '',
tangodevice = tango_base + 'elcol_press1',
lowlevel = True,
fmtstr = '%d'... | 26.814815 | 69 | 0.593923 |
93aa328d7c2f4e7fd802508b7bdb633df687e69c | 5,175 | py | Python | icecube/utils/common_utils.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 47 | 2021-08-25T09:40:29.000Z | 2022-02-16T06:52:01.000Z | icecube/utils/common_utils.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 7 | 2021-09-08T09:37:59.000Z | 2022-01-04T10:12:45.000Z | icecube/utils/common_utils.py | iceye-ltd/icecube | 9db3005f2ac2d6fb43d5562c0646527eb4ab6700 | [
"MIT"
] | 4 | 2021-09-01T12:40:23.000Z | 2021-12-07T11:00:19.000Z | #!/usr/bin/env python
"""
Common utilities that can be widely used across the package
"""
import numpy as np
import os
import glob
from itertools import groupby
import sys
import time
from icecube.utils.logger import Logger
logger = Logger(os.path.basename(__file__))
class DirUtils:
@staticmethod
def get_... | 26.675258 | 116 | 0.58628 |
93aa548e2140531a4c051b00fee9662d6d74841c | 5,194 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_usage_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_usage_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/aio/operations/_usage_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 44.016949 | 134 | 0.666153 |
93aa6c1f8fcc3b3cc4c57e71d904fdcc1b52a94c | 36,258 | py | Python | src/python/pants/option/global_options.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/option/global_options.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/option/global_options.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import multiprocessing
import os
import sys
from dataclasses import dataclass
from enum import Enum
from typing import Any
from pants.base.build_environment import (
get_buildroot,
ge... | 62.19211 | 141 | 0.68156 |
93aa7a7d01e28b8257878451795d06d0415a3deb | 5,034 | py | Python | mcarch/model/user.py | Scotsguy/MCArchive | 89847bab722c6782fa53c7b11ee83f1f5b2d9f05 | [
"MIT"
] | null | null | null | mcarch/model/user.py | Scotsguy/MCArchive | 89847bab722c6782fa53c7b11ee83f1f5b2d9f05 | [
"MIT"
] | null | null | null | mcarch/model/user.py | Scotsguy/MCArchive | 89847bab722c6782fa53c7b11ee83f1f5b2d9f05 | [
"MIT"
] | null | null | null | import enum
from datetime import datetime, timedelta
import hashlib
import uuid
from flask import Flask, request, current_app as app
from flask_sqlalchemy import SQLAlchemy
from util.sqla_uuid import GUID
from mcarch.app import db, bcrypt
class UserRole(enum.IntEnum):
user = 1
archivist = 2
moderator = 3... | 36.478261 | 92 | 0.658125 |
93aa7a86b767de6f5372c87320d52c0132b5d711 | 17,019 | py | Python | line_detection_module/yolov5/TabDetectDewarp/yolov5/models/common.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | 1 | 2021-06-30T11:01:25.000Z | 2021-06-30T11:01:25.000Z | line_detection_module/yolov5/TabDetectDewarp/yolov5/models/common.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | null | null | null | line_detection_module/yolov5/TabDetectDewarp/yolov5/models/common.py | nhatnxn/ID_Passport-OCR | 78322ec2b9648d0b027326dced7c4aec967bcab3 | [
"MIT"
] | null | null | null | # YOLOv5 common modules
import math
from copy import copy
from pathlib import Path
import numpy as np
import pandas as pd
import requests
import torch
import torch.nn as nn
from PIL import Image
from torch.cuda import amp
import sys, os
currentdir = os.path.dirname(os.path.realpath(__file__))
parentdir = os.path.di... | 42.335821 | 120 | 0.573888 |
93aa7caaa81e5d968e8607b8f3b3e3c10adb5a52 | 537 | py | Python | automol/zmat/_extra.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/zmat/_extra.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/zmat/_extra.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | """ extra Level 4 Z-Matrix functions
"""
import automol.geom
from automol.zmat._conv import geometry
def is_atom_closest_to_bond_atom(zma, idx_rad, bond_dist):
""" Check to see whether the radical atom is still closest to the bond
formation site.
"""
geo = geometry(zma)
atom_closest = True
... | 26.85 | 74 | 0.646182 |
93aa96c9b52b7aec7d7bc693cd4951a4f28494f8 | 125 | py | Python | 0x04-python-more_data_structures/1-search_replace.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x04-python-more_data_structures/1-search_replace.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x04-python-more_data_structures/1-search_replace.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
def search_replace(my_list, search, replace):
return [replace if x == search else x for x in my_list]
| 31.25 | 59 | 0.72 |
93aab28bbf4f3122e0bbb1d832fe944fa5a07431 | 1,784 | py | Python | missionaries_and_cannibals/node.py | aroques/missionaries_and_cannibals | c1e5fa1b07a010f34725bcfd3a7d0771806a4766 | [
"MIT"
] | 3 | 2019-10-01T12:46:34.000Z | 2021-07-28T21:05:52.000Z | missionaries_and_cannibals/node.py | aroques/missionaries_and_cannibals | c1e5fa1b07a010f34725bcfd3a7d0771806a4766 | [
"MIT"
] | 1 | 2018-02-17T20:10:10.000Z | 2018-02-17T22:16:21.000Z | missionaries_and_cannibals/node.py | aroques/missionaries_and_cannibals | c1e5fa1b07a010f34725bcfd3a7d0771806a4766 | [
"MIT"
] | null | null | null | #
# Adapted from https://github.com/aimacode/aima-python/blob/master/search.py
#
class Node:
"""A node in a search tree. Contains a pointer to the parent (the node
that this is a successor of) and to the actual state for this node. Note
that if a state is arrived at by two paths, then there are two node... | 34.307692 | 81 | 0.616592 |
93aabcd6b40a241f7f7ea8d5dcf8bc1e0eabd08c | 3,503 | py | Python | rdt/transformers/addons/addons_setup.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 2 | 2022-03-22T13:59:28.000Z | 2022-03-24T07:02:54.000Z | rdt/transformers/addons/addons_setup.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 12 | 2022-02-17T16:29:31.000Z | 2022-03-29T15:06:42.000Z | rdt/transformers/addons/addons_setup.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 3 | 2021-11-18T10:13:00.000Z | 2022-03-23T10:25:55.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script for the addons packages."""
import json
import os
import shutil
import sys
from copy import deepcopy
from glob import glob
from tempfile import TemporaryDirectory
from setuptools import find_namespace_packages, setup
import rdt
with open("README.md"... | 29.686441 | 85 | 0.575221 |
93aacbfc541c92dabd19e872912d3d236dd02ac5 | 482 | py | Python | nile/cmd/taskmanager.py | Orpheus11/nile | b92d514f57eec9583d9e6f2a7df83506efe2a2e8 | [
"Apache-2.0"
] | null | null | null | nile/cmd/taskmanager.py | Orpheus11/nile | b92d514f57eec9583d9e6f2a7df83506efe2a2e8 | [
"Apache-2.0"
] | null | null | null | nile/cmd/taskmanager.py | Orpheus11/nile | b92d514f57eec9583d9e6f2a7df83506efe2a2e8 | [
"Apache-2.0"
] | null | null | null | from nile.cmd.common import launch_taskmanager, get_worker_count,with_initialize
@with_initialize
def main(CONF):
workers = int(CONF.get('DEFAULT', 'workers')) or get_worker_count()
launcher = launch_taskmanager(CONF.get('DEFAULT', 'bind_port'), host=CONF.get('DEFAULT', 'bind_host'), workers=workers)
laun... | 34.428571 | 123 | 0.746888 |
93aaf63f80d6a183395aa08ea71fef50be5768eb | 4,810 | py | Python | events_page/render_templated_styles.py | los-verdes/lv-event-pagenerator | 88416b626ff2dca6e2d71fa60bff4823954b3131 | [
"MIT"
] | null | null | null | events_page/render_templated_styles.py | los-verdes/lv-event-pagenerator | 88416b626ff2dca6e2d71fa60bff4823954b3131 | [
"MIT"
] | 7 | 2022-01-16T15:36:40.000Z | 2022-01-25T22:02:12.000Z | events_page/render_templated_styles.py | los-verdes/lv-event-pagenerator | 88416b626ff2dca6e2d71fa60bff4823954b3131 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import flask
from logzero import logger
from apis import calendar as gcal
from apis.drive import (
add_category_image_file_metadata,
build_service,
download_event_images,
download_category_images,
)
from apis.mls import TeamColors
from config import cfg
BASE_DIR = os.p... | 37.578125 | 129 | 0.72869 |
93ab1be74bb5b9690af7c5d0992465b92f313b6c | 3,387 | py | Python | shopkit/contrib/product/category/app.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | shopkit/contrib/product/category/app.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | shopkit/contrib/product/category/app.py | sakkada/django-shopkit | 35e6f8ac73bf6aa40887aa9b1b860d27db8b2975 | [
"BSD-3-Clause"
] | null | null | null | from django.http import Http404
from django.conf.urls import url
from django.shortcuts import render
from ....product import app
class CategorizedProductApp(app.ProductApp):
app_name = 'category'
Category = None
category_details_templates = [
'shopkit/category/view.html',
]
category_list_... | 36.815217 | 79 | 0.591379 |
93ab472675334caf29cdfa3b8e83dee309d6ac67 | 2,717 | py | Python | leetcode/1-easy/4-tree/1-maxdepth/max_depth.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | leetcode/1-easy/4-tree/1-maxdepth/max_depth.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | leetcode/1-easy/4-tree/1-maxdepth/max_depth.py | ai7/study | be490336dc70ade62a8ff8d7866af7ac52bef4c1 | [
"MIT"
] | null | null | null | # https://leetcode.com/explore/interview/card/top-interview-questions-easy/94/trees/555/
# https://leetcode.com/problems/maximum-depth-of-binary-tree/description/
# Maximum Depth of Binary Tree
#
# Given a binary tree, find its maximum depth.
# Definition for a binary tree node.
# class TreeNode:
# def __init__(s... | 30.52809 | 88 | 0.555392 |
93ab7161de4675325c89be892123b87f2edd5f65 | 25,273 | py | Python | sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_endpoint_connections_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_endpoint_connections_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.118613 | 254 | 0.696831 |
93ab72c2ca4b8b7ac62a334ea24aa1264c340c0e | 9,682 | py | Python | common/model/ymd.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | common/model/ymd.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | common/model/ymd.py | Mark-Zwaving/weather-model-download-animation | 3687ad2ed4f368230338a3ff8f35d67933fedb93 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''Functions date time base handling'''
__author__ = 'Mark Zwaving'
__email__ = 'markzwaving@gmail.com'
__copyright__ = 'Copyright (C) Mark Zwaving. All rights reserved.'
__license__ = 'MIT License'
__version__ = '0.0.7'
__maintainer__ = 'Mark Zwaving'
__status__ = 'De... | 37.968627 | 107 | 0.660401 |
93ab9fee46c152649b9322515eaa785501845004 | 1,641 | py | Python | bibliohub/catalog/views.py | apjanco/bibliohub | 95da034d2e136bd4ae25a9b6932fd19124dacd9b | [
"MIT"
] | null | null | null | bibliohub/catalog/views.py | apjanco/bibliohub | 95da034d2e136bd4ae25a9b6932fd19124dacd9b | [
"MIT"
] | null | null | null | bibliohub/catalog/views.py | apjanco/bibliohub | 95da034d2e136bd4ae25a9b6932fd19124dacd9b | [
"MIT"
] | null | null | null | from django.shortcuts import render
# Create your views here.
from catalog.models import Book, Author, Genre
from django.views import generic
from django.views.generic import TemplateView, ListView
from .models import Book
from django.db.models import Q
# class BookListView(generic.ListView):
# """Generic cla... | 23.782609 | 88 | 0.671542 |
93abbc060754b6e655de1cc4a484e0b1fb19a1f1 | 8,105 | py | Python | pt.py | sidsukana/pocket-tensor | ce9cdc943faca4efa883db2461ce473ac2832a31 | [
"MIT"
] | 72 | 2018-07-14T08:38:15.000Z | 2021-07-15T01:18:33.000Z | pt.py | sidsukana/pocket-tensor | ce9cdc943faca4efa883db2461ce473ac2832a31 | [
"MIT"
] | 15 | 2018-06-16T21:02:39.000Z | 2021-07-23T09:59:23.000Z | pt.py | sidsukana/pocket-tensor | ce9cdc943faca4efa883db2461ce473ac2832a31 | [
"MIT"
] | 11 | 2018-07-14T12:53:22.000Z | 2020-07-28T12:43:48.000Z | import numpy as np
import struct
LAYER_DENSE = 1
LAYER_CONV_1D = 2
LAYER_CONV_2D = 3
LAYER_LOCALLY_1D = 4
LAYER_FLATTEN = 6
LAYER_ELU = 7
LAYER_ACTIVATION = 8
LAYER_MAXPOOLING_2D = 9
LAYER_LSTM = 10
LAYER_EMBEDDING = 11
LAYER_BATCH_NORMALIZATION = 12
LAYER_LEAKY_RELU = 13
LAYER_GLOBAL_MAXPOOLING_2D = 14
LAYER_INPUT = ... | 29.050179 | 75 | 0.629118 |
93abd0d55ea4ee76e87f92c91932af64defdf4aa | 55,891 | py | Python | src/wavestate/iirrational/external/tabulate/tabulate.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | src/wavestate/iirrational/external/tabulate/tabulate.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | src/wavestate/iirrational/external/tabulate/tabulate.py | wavestate/wavestate-iirrational | 01d6dba8b2131fa2a099a74f17e6540f30cee606 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Pretty-print tabular data."""
from collections import namedtuple, Iterable
from platform import python_version_tuple
import re
import math
if python_version_tuple()[0] < "3":
from itertools import izip_longest
from functools import partial
_none_type = type(No... | 33.032506 | 198 | 0.557961 |
93abd55daf713be80d2b88d87baf828cf2954d08 | 2,216 | py | Python | code/lib/oshi/oshi_rdcl_graph.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/lib/oshi/oshi_rdcl_graph.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/lib/oshi/oshi_rdcl_graph.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | #
# Copyright 2017 CNIT - Consorzio Nazionale Interuniversitario per le Telecomunicazioni
#
# 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/LICE... | 34.092308 | 187 | 0.634477 |
93abe9201e6858491613683a57bfed14fe69848d | 3,199 | py | Python | tests/test_backend_simple.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | tests/test_backend_simple.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | tests/test_backend_simple.py | tods-doc/axolotl | 6fc87bedb514677db09c039d492d1d3c7864913d | [
"Apache-2.0"
] | null | null | null | import json
from pathlib import Path
import unittest
import tempfile
import shutil
from d3m.metadata import problem as problem_module
from d3m import container
from axolotl.backend.simple import SimpleRunner
from axolotl.utils import schemas as schemas_utils, pipeline as pipeline_utils
class SimpleRunnerTestCase(un... | 38.542169 | 115 | 0.709909 |
93ac009433e6d58670067c87dc6b0bc759b4af0c | 2,651 | py | Python | tests/test_json_writer.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 23 | 2019-01-13T23:32:24.000Z | 2021-07-08T04:29:15.000Z | tests/test_json_writer.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 3 | 2019-08-09T18:42:01.000Z | 2019-12-13T15:43:24.000Z | tests/test_json_writer.py | asosnovsky/pdfmajor | 7e24c64b5b4fdc84c12b2f78dcaab0e1aa07f4ad | [
"MIT"
] | 2 | 2020-01-09T11:18:20.000Z | 2020-03-24T06:02:30.000Z | from os import remove
from tempfile import mktemp
from pdfmajor.converters.writers.json import JSONMaker
# Make temp file
FILE_NAME = mktemp()
with JSONMaker(FILE_NAME) as obj:
obj.number("a", 2)
obj.string("hello", "world")
assert(open(FILE_NAME, 'r').read() == """{
"a": 2,
"hello": "world"
}""")
with J... | 23.882883 | 62 | 0.46209 |
93ac04c8f20e909f7fb7040f55fa3813bcab80b4 | 5,505 | py | Python | contrib/.venv/lib/python3.8/site-packages/fastecdsa/tests/encoding/test_der.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/fastecdsa/tests/encoding/test_der.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/fastecdsa/tests/encoding/test_der.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | from binascii import unhexlify
from unittest import TestCase
from fastecdsa.curve import secp256k1
from fastecdsa.ecdsa import sign
from fastecdsa.encoding.der import DEREncoder, InvalidDerSignature
class TestDEREncoder(TestCase):
def test_encode_signature(self):
self.assertEqual(
DEREncoder.... | 56.752577 | 118 | 0.677021 |
93ac205482cf82196403daf146c7f41039c4c636 | 1,834 | py | Python | owtf/lib/exceptions.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/lib/exceptions.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | owtf/lib/exceptions.py | alienus/owtf | b6d81fac83c324c2b8c6fe2a974c036881c1fcd0 | [
"BSD-3-Clause"
] | null | null | null | """
owtf.lib.exceptions
~~~~~~~~~~~~~~~~~~~
Declares the framework exceptions and HTTP errors
"""
import tornado.web
class FrameworkException(Exception):
def __init__(self, value):
self.parameter = value
def __str__(self):
return repr(self.parameter)
class APIError(tornado.web.HTTPError):... | 16.825688 | 56 | 0.758451 |
93ac2392a8ef3273e9323f6352b991b3cc8206cb | 293 | py | Python | setup.py | eve-basil/common | 1d7f7c0ce12d65f65a9683b7439a756c5b9d7e4f | [
"Apache-2.0"
] | null | null | null | setup.py | eve-basil/common | 1d7f7c0ce12d65f65a9683b7439a756c5b9d7e4f | [
"Apache-2.0"
] | null | null | null | setup.py | eve-basil/common | 1d7f7c0ce12d65f65a9683b7439a756c5b9d7e4f | [
"Apache-2.0"
] | null | null | null | from setuptools import setup, find_packages
setup(
name="basil-common",
version="0.1.0.dev",
packages=find_packages(),
description="Junk drawer of commonly needed functionality for Eve Basil.",
install_requires=["falcon==0.3.0", "redis==2.10.5", "SQLAlchemy==1.0.10"],
)
| 26.636364 | 78 | 0.686007 |
93ac3a5c5463f7ead173b5067728236f282d78bd | 75,514 | py | Python | src/prpy/util.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 53 | 2015-02-07T04:58:23.000Z | 2022-03-07T15:49:07.000Z | src/prpy/util.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 283 | 2015-01-01T17:16:37.000Z | 2018-05-09T23:51:48.000Z | src/prpy/util.py | MisoRobotics/prpy | afbc8e9c3a8e4f4dc31261782962e12eb4b0ca10 | [
"BSD-3-Clause"
] | 28 | 2015-02-20T01:37:38.000Z | 2021-03-12T07:05:23.000Z | #!/usr/bin/env python
# Copyright (c) 2013, Carnegie Mellon University
# All rights reserved.
# Authors: Michael Koval <mkoval@cs.cmu.edu>
# Authors: Siddhartha Srinivasa <siddh@cs.cmu.edu>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following ... | 35.419325 | 104 | 0.642768 |
93ac3db69c5a0d956c3da9b4d5aec797a1ca6e75 | 152 | py | Python | bot.py | Get-Luusy/get.luusy | 7a165a05a1231dda6f2ab083e54788f0bd2617cd | [
"MIT"
] | null | null | null | bot.py | Get-Luusy/get.luusy | 7a165a05a1231dda6f2ab083e54788f0bd2617cd | [
"MIT"
] | null | null | null | bot.py | Get-Luusy/get.luusy | 7a165a05a1231dda6f2ab083e54788f0bd2617cd | [
"MIT"
] | null | null | null | from instabot import Bot
from config import config
bot = Bot()
bot.login(username=config["insta_name"], password=config["insta_pass"])
post_ids = []
| 16.888889 | 71 | 0.743421 |
93ac516aabcd2c1fc91adffec5097ee677e5591a | 2,148 | py | Python | andesite/node.py | twitch0001/granitepy | 55b8634699fef1c194e64bf3c032af538dd84b92 | [
"BSD-2-Clause-Patent"
] | 6 | 2019-06-13T22:14:36.000Z | 2022-03-18T15:04:40.000Z | andesite/node.py | twitch0001/granitepy | 55b8634699fef1c194e64bf3c032af538dd84b92 | [
"BSD-2-Clause-Patent"
] | 10 | 2019-06-10T22:14:09.000Z | 2019-08-05T23:24:38.000Z | andesite/node.py | twitch0001/granitepy | 55b8634699fef1c194e64bf3c032af538dd84b92 | [
"BSD-2-Clause-Patent"
] | 10 | 2019-06-13T20:33:54.000Z | 2019-10-01T23:08:37.000Z | import logging
import aiohttp
from discord.ext import commands
from .objects import Playlist, Track
from .websocket import WebSocket
log = logging.getLogger(__name__)
class Node:
def __init__(
self,
host: str,
port: int,
user_id: int,
*,
c... | 27.189873 | 106 | 0.58054 |
93ac5372a0ac40dcb3e2f3d85956329adbe97688 | 822 | py | Python | data/gqa/process_raw_data_scripts/process_data.py | eltoto1219/multimodal-pretraining | c5ca38c4f22901b6a94280b973f4a49dce4a828f | [
"MIT"
] | 795 | 2019-08-21T01:01:18.000Z | 2022-03-29T12:42:33.000Z | data/gqa/process_raw_data_scripts/process_data.py | eltoto1219/multimodal-pretraining | c5ca38c4f22901b6a94280b973f4a49dce4a828f | [
"MIT"
] | 106 | 2019-08-22T06:52:51.000Z | 2021-12-17T03:03:57.000Z | data/gqa/process_raw_data_scripts/process_data.py | eltoto1219/multimodal-pretraining | c5ca38c4f22901b6a94280b973f4a49dce4a828f | [
"MIT"
] | 166 | 2019-08-21T06:51:29.000Z | 2022-03-29T03:17:33.000Z | from pathlib import Path
import json
GQA_ROOT = '../'
path = Path(GQA_ROOT + 'data')
split2name = {
'train': 'train',
'valid': 'val',
'testdev': 'testdev',
'test': 'test',
'challenge': 'challenge'
}
for split, name in split2name.items():
with open(path / ("%s_balanced_questions.json" % na... | 26.516129 | 65 | 0.504866 |
93ac5c17c569f6d1a552627860225e7d39d4ada2 | 6,528 | py | Python | src/tentohako/agent/mixmax.py | Koukyosyumei/TenToHako | 4007033c2401aa491f6c79e0a670812cd8aa8054 | [
"MIT"
] | null | null | null | src/tentohako/agent/mixmax.py | Koukyosyumei/TenToHako | 4007033c2401aa491f6c79e0a670812cd8aa8054 | [
"MIT"
] | null | null | null | src/tentohako/agent/mixmax.py | Koukyosyumei/TenToHako | 4007033c2401aa491f6c79e0a670812cd8aa8054 | [
"MIT"
] | null | null | null | import copy
import random
from .base import BaseAgent
class MinMaxAgent(BaseAgent):
def __init__(self, name="minmax", depth=3):
"""An agents which uses minmax algorithm for search
Args:
name: the name of the agent
depth: number of recursion
Attributes:
... | 35.286486 | 90 | 0.559589 |
93ac989316c42b10a788dac218d9ef6be1e49ec8 | 3,544 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.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 ... | 47.891892 | 125 | 0.696953 |
93acb1a44ce45d4d831e0540c1f78bff0593a5d4 | 6,764 | py | Python | appengine/machine_provider/models.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2017-10-30T15:08:10.000Z | 2017-10-30T15:08:10.000Z | appengine/machine_provider/models.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | null | null | null | appengine/machine_provider/models.py | stefb965/luci-py | e0a8a5640c4104e5c90781d833168aa8a8d1f24d | [
"Apache-2.0"
] | 1 | 2020-07-05T19:54:40.000Z | 2020-07-05T19:54:40.000Z | # Copyright 2015 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Datastore models for the Machine Provider messages."""
import hashlib
from google.appengine.ext import ndb
from google.appengine.ext.ndb impo... | 32.056872 | 80 | 0.73492 |
93acb47d4c288a6a0343282ef4d93357c1f92c60 | 745 | py | Python | proxyclient/v2/security_groups.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | proxyclient/v2/security_groups.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | proxyclient/v2/security_groups.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | """
security_groups interface
"""
from six.moves.urllib import parse
from proxyclient import base
class SecurityGroup(base.Resource):
pass
class SecurityGroupManager(base.Manager):
resource_class = SecurityGroup
def list(self, search_opts=None):
if search_opts is None:
search_opts = ... | 24.833333 | 74 | 0.630872 |
93acbd6fd1d821988c9803e5d9d59778db70f9d1 | 558 | py | Python | terrascript/provider/terra_farm/virtualbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/provider/terra_farm/virtualbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/provider/terra_farm/virtualbox.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/provider/terra-farm/virtualbox.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:30:30 UTC)
import terrascript
class virtualbox(terrascript.Provider):
"""VirtualBox provider for Terraform"""
__description__ = "VirtualBox provider for Terraform"
__namespace__ = "terra-farm"
... | 27.9 | 78 | 0.727599 |
93acbe0566eae0cb33afc7d1e24cb04b6a96d903 | 545 | py | Python | eval/generate_circular_path.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | eval/generate_circular_path.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | eval/generate_circular_path.py | gregorgebhardt/kb_learning | 41e18c1238e0ea891d48aff63588366dae64e4c8 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from kb_learning.planning import WayPointConf
def generate_circular_path(center: np.ndarray, radius=.8, angular_range=(-np.pi/2, .0), num_way_points=10):
angles = np.linspace(*angular_range, num_way_points)
arc_points = np.c_[np.cos(angles), np.sin(angles)] * radius + np.asarray(center)
... | 38.928571 | 107 | 0.711927 |
93acbe7afd9dae0413d095385ec18b711c96fd1c | 74 | py | Python | esst/dcs/__init__.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 4 | 2018-06-24T14:03:44.000Z | 2019-01-21T01:20:02.000Z | esst/dcs/__init__.py | etcher-be/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | 106 | 2018-06-24T13:59:52.000Z | 2019-11-26T09:05:14.000Z | esst/dcs/__init__.py | theendsofinvention/esst | ac41cd0c07af8ca8532997f533756c529c9609a4 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Manages all that is related to the DCS application
"""
| 14.8 | 50 | 0.702703 |
93acd28f0d65c53719a8df8085ca5180b8d13e44 | 8,141 | py | Python | python/tests/test_microservice.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | 1 | 2021-06-14T12:58:38.000Z | 2021-06-14T12:58:38.000Z | python/tests/test_microservice.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | 16 | 2019-12-16T22:22:13.000Z | 2022-03-12T00:07:55.000Z | python/tests/test_microservice.py | pravingadakh/seldon-core | a72257fa851033ee09513a0b6b310087eb625e85 | [
"Apache-2.0"
] | null | null | null | from contextlib import contextmanager
import os
from os.path import dirname, join
import socket
from subprocess import Popen
import time
import requests
import pytest
from seldon_core.proto import prediction_pb2
from seldon_core.proto import prediction_pb2_grpc
import seldon_core.microservice as microservice
from seldo... | 35.70614 | 118 | 0.549195 |
93acf8a0e44ef1e091b961ac97f649b37051d233 | 11,751 | py | Python | next/apps/Butler.py | connectthefuture/NEXT | d686e64156159cd7ff19905fa5285406dc908c3c | [
"Apache-2.0"
] | null | null | null | next/apps/Butler.py | connectthefuture/NEXT | d686e64156159cd7ff19905fa5285406dc908c3c | [
"Apache-2.0"
] | null | null | null | next/apps/Butler.py | connectthefuture/NEXT | d686e64156159cd7ff19905fa5285406dc908c3c | [
"Apache-2.0"
] | 2 | 2017-06-07T16:03:16.000Z | 2021-03-01T08:48:27.000Z | import next.utils as utils
import os
import next.constants as constants
import redis
import StringIO
class Memory(object):
def __init__(self, collection='', exp_uid=''):
self.key_prefix = collection + exp_uid
self.cache = None
self.max_entry_size = 500000000 # 500MB
def check_prefix(... | 41.087413 | 123 | 0.574079 |
93acf8c4d03849134b6f46702a5cf2d90db10057 | 3,048 | py | Python | srcflib/email/__init__.py | SRCF/SRCFLib | 1483dbf2abb8dd36268bd1c49abe5385d7a501aa | [
"MIT"
] | null | null | null | srcflib/email/__init__.py | SRCF/SRCFLib | 1483dbf2abb8dd36268bd1c49abe5385d7a501aa | [
"MIT"
] | 2 | 2020-08-23T17:23:44.000Z | 2020-12-21T17:05:50.000Z | srcflib/email/__init__.py | SRCF/SRCFLib | 1483dbf2abb8dd36268bd1c49abe5385d7a501aa | [
"MIT"
] | null | null | null | """
Notification email machinery, for tasks to send credentials and instructions to users.
Email templates placed inside the `templates` directory of this module should:
- extend from `layout`
- provide `subject` and `body` blocks
"""
from enum import Enum
import os.path
from jinja2 import Environment, FileSystemLo... | 30.787879 | 96 | 0.660105 |
93acfda79f039bf9e596d59e0ef303973f0001cc | 3,192 | py | Python | src/python/pants/backend/python/lint/pylint/subsystem.py | ericsun2/pants | 49b446e5031b8c68cad6212b46f40b4fda3a0a3b | [
"Apache-2.0"
] | 1 | 2021-02-22T18:11:26.000Z | 2021-02-22T18:11:26.000Z | src/python/pants/backend/python/lint/pylint/subsystem.py | ericsun2/pants | 49b446e5031b8c68cad6212b46f40b4fda3a0a3b | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/python/lint/pylint/subsystem.py | ericsun2/pants | 49b446e5031b8c68cad6212b46f40b4fda3a0a3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from typing import List, cast
from pants.backend.python.subsystems.python_tool_base import PythonToolBase
from pants.engine.addresses import UnparsedAd... | 38.926829 | 100 | 0.613409 |
93ad2bd0106a9c19afec48305d98f20d1e551607 | 2,963 | py | Python | src/emuvim/api/openstack/openstack_dummies/base_openstack_dummy.py | StefanUPB/vim-emu | aacef8f694b996db8fea123024e9a91368f287d2 | [
"Apache-2.0"
] | null | null | null | src/emuvim/api/openstack/openstack_dummies/base_openstack_dummy.py | StefanUPB/vim-emu | aacef8f694b996db8fea123024e9a91368f287d2 | [
"Apache-2.0"
] | null | null | null | src/emuvim/api/openstack/openstack_dummies/base_openstack_dummy.py | StefanUPB/vim-emu | aacef8f694b996db8fea123024e9a91368f287d2 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2017 SONATA-NFV and Paderborn University
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 ap... | 37.506329 | 128 | 0.630442 |
93ad4670429dce642f05e496149f285cc9c10008 | 4,131 | py | Python | applications/timeflow/pages/capacities.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 13 | 2021-09-27T14:53:15.000Z | 2022-02-15T05:48:01.000Z | applications/timeflow/pages/capacities.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 45 | 2021-10-13T08:47:28.000Z | 2022-02-15T09:16:51.000Z | applications/timeflow/pages/capacities.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | null | null | null | from idom import html, use_state, component, event
from .utils import switch_state
from uiflow.components.input import Input, Selector2
from uiflow.components.layout import Row, Column, Container
from uiflow.components.table import SimpleTable
from uiflow.components.controls import Button
from ..data.common import ... | 26.824675 | 97 | 0.599129 |
93ad4b9cecf33358745ce1378e7791cef18d239f | 2,788 | py | Python | tests/common/test_run/ascend/xdivy_grad_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/xdivy_grad_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/xdivy_grad_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2020-2021 Huawei Technologies Co., Ltd
#
# 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 agre... | 42.242424 | 74 | 0.662482 |
93ad74670c0a881ef693f69ced1d91e59b5f159c | 972 | py | Python | random/collectionGame.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | random/collectionGame.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | random/collectionGame.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | import random
rarities = ['common', 'uncommon', 'rare', '']
collection = {}
collectionRate = {}
collected = []
def generateCollection(num, nRarities=3, rate=0.75):
cardsLeft = num
for r in range(nRarities):
if r < nRarities - 1:
nPerRarity = int(cardsLeft * rate)
else:
... | 22.090909 | 100 | 0.59465 |
93adf88b26596f4095166a6bd49ab261a32a7fc2 | 16,728 | py | Python | tests/test_dynamodb2/test_dynamodb_validation.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_dynamodb2/test_dynamodb_validation.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_dynamodb2/test_dynamodb_validation.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | from moto.dynamodb2.exceptions import (
AttributeIsReservedKeyword,
ExpressionAttributeValueNotDefined,
AttributeDoesNotExist,
ExpressionAttributeNameNotDefined,
IncorrectOperandType,
InvalidUpdateExpressionInvalidDocumentPath,
)
from moto.dynamodb2.models import Item, DynamoType
from moto.dynam... | 35.515924 | 120 | 0.637793 |
93ae028ceb1f09301404cd571ee429d1b123a4a4 | 821 | py | Python | pinax/apps/tribes/urls.py | peiwei/pinax | 34f95b1df4318655fe9bd90dcda8fe824e0c4117 | [
"MIT"
] | 1 | 2019-02-12T04:45:09.000Z | 2019-02-12T04:45:09.000Z | pinax/apps/tribes/urls.py | peiwei/pinax | 34f95b1df4318655fe9bd90dcda8fe824e0c4117 | [
"MIT"
] | null | null | null | pinax/apps/tribes/urls.py | peiwei/pinax | 34f95b1df4318655fe9bd90dcda8fe824e0c4117 | [
"MIT"
] | 1 | 2019-02-12T04:45:40.000Z | 2019-02-12T04:45:40.000Z | from django.conf.urls.defaults import *
from tribes.models import Tribe
from groups.bridge import ContentBridge
bridge = ContentBridge(Tribe, "tribes")
urlpatterns = patterns("tribes.views",
url(r"^$", "tribes", name="tribe_list"),
url(r"^create/$", "create", name="tribe_create"),
url(r"^your_tribes... | 30.407407 | 91 | 0.657734 |
93ae029a82dbbaba28cc3a0481060de50292ee1c | 4,021 | py | Python | alipay/aop/api/request/AlipayMerchantMrchsurplmorderPointPayRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayMerchantMrchsurplmorderPointPayRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayMerchantMrchsurplmorderPointPayRequest.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.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayMerchantMrchsurplmorderPointPayModel import AlipayMerchantMrchsurplmorderPointPayModel
class AlipayMerchantMrchsurplmorderPoin... | 27.731034 | 148 | 0.649092 |
93ae504f3a5ffc375d8c152754754325f9fca839 | 403 | py | Python | dp/b/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | dp/b/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | dp/b/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N, K = na()
H = na()
INF = float('inf')
dp = [INF] * N
dp[0] = 0
for i in range(N - 1):
for k in range(1, K + 1):
if i + k < N:
... | 21.210526 | 68 | 0.523573 |
93ae6a64165626529773da7b14688047f6d83969 | 6,251 | py | Python | indico/modules/events/forms.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | 1 | 2021-12-27T17:51:27.000Z | 2021-12-27T17:51:27.000Z | indico/modules/events/forms.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | null | null | null | indico/modules/events/forms.py | javfg/indico | 2634756ba1e9caf6dd8fc9afc3f47291fda5816d | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from datetime import time
from flask import session
from wtforms.fields import BooleanField, StringField,... | 53.42735 | 116 | 0.69045 |
93ae6f1d62c3cbdeb28174b6ddf69bc322daa75a | 581 | py | Python | practice/ai/machine-learning/the-best-aptitude-test/the-best-aptitude-test.py | zeyuanxy/HackerRank | 5194a4af780ece396501c215996685d1be529e73 | [
"MIT"
] | 4 | 2017-01-18T17:51:58.000Z | 2019-10-20T12:14:37.000Z | practice/ai/machine-learning/the-best-aptitude-test/the-best-aptitude-test.py | zeyuanxy/HackerRank | 5194a4af780ece396501c215996685d1be529e73 | [
"MIT"
] | null | null | null | practice/ai/machine-learning/the-best-aptitude-test/the-best-aptitude-test.py | zeyuanxy/HackerRank | 5194a4af780ece396501c215996685d1be529e73 | [
"MIT"
] | 8 | 2016-03-14T17:16:59.000Z | 2021-06-26T10:11:33.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Zeyuan Shang
# @Date: 2016-01-13 15:36:10
# @Last Modified by: Zeyuan Shang
# @Last Modified time: 2016-01-13 15:36:14
import numpy as np
def calc(gpas):
scores = map(float, raw_input().split())
coef = np.corrcoef(gpas, scores)[0, 1]
return 0 if ... | 25.26087 | 57 | 0.585198 |
93aedca71d98d7fa2682e4b092073d4f1c97b02f | 3,589 | py | Python | astroutils/foregrounds.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 1 | 2018-10-31T03:49:39.000Z | 2018-10-31T03:49:39.000Z | astroutils/foregrounds.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 5 | 2017-11-18T01:45:50.000Z | 2020-05-30T12:26:50.000Z | astroutils/foregrounds.py | nithyanandan/AstroUtils | 97473f52d4247bb9c8507598899215d0662e8d6f | [
"MIT"
] | 1 | 2019-10-14T08:44:40.000Z | 2019-10-14T08:44:40.000Z | import healpy as HP
import numpy as NP
#################################################################################
def power_law_spectral_index(freq, flux, verbose=True):
"""
-----------------------------------------------------------------------------
Compute the power law spectral index when ... | 37 | 141 | 0.584285 |
93aef5b68488e28fb9618d3b17d9fcdc427889b8 | 2,145 | py | Python | rptools/rpscore/__main__.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | 4 | 2021-01-14T14:52:55.000Z | 2022-01-28T09:31:59.000Z | rptools/rpscore/__main__.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | 5 | 2021-01-18T09:24:48.000Z | 2021-12-17T06:47:07.000Z | rptools/rpscore/__main__.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | 2 | 2021-09-14T07:02:20.000Z | 2022-01-31T16:59:42.000Z | from typing import (
Dict,
List
)
from logging import (
Logger,
getLogger
)
from os import (
path as os_path,
makedirs
)
from tempfile import NamedTemporaryFile
from rptools.rpscore import predict_score
from rptools.rpscore.Args import add_arguments
from rptools.rplibs import rpPathway
from rpto... | 25.843373 | 100 | 0.584149 |
93af309052532a389aee12b3dfd37d827d5d7e7a | 675 | py | Python | arquivos/amorzao.py | lucabeca/python | 2f321faf7f497319a244bc352aefd16b69b8141e | [
"Apache-2.0"
] | null | null | null | arquivos/amorzao.py | lucabeca/python | 2f321faf7f497319a244bc352aefd16b69b8141e | [
"Apache-2.0"
] | null | null | null | arquivos/amorzao.py | lucabeca/python | 2f321faf7f497319a244bc352aefd16b69b8141e | [
"Apache-2.0"
] | null | null | null | from random import randint
import time
print("Super calculadora do amor")
nome1 = input("Digite o nome da primeira pessoa: ")
nome2 = input("Digite o nome da segunda pessoa: ")
resultado = randint(0,100)
print("Consultando cupido...")
time.sleep(1)
print("Consultando estrelas...")
time.sleep(1)
print("Consultando pl... | 27 | 51 | 0.672593 |
93af3dba79f4a05e984e28ad85b0ab72fa9b64f5 | 543 | py | Python | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 03/ch03-rec14-filled-plot.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | 26 | 2016-08-25T01:33:36.000Z | 2022-03-20T11:33:31.000Z | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 03/ch03-rec14-filled-plot.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | null | null | null | python/learn/PythonDataVisualizationCookbookSE_Code/Chapter 03/ch03-rec14-filled-plot.py | flyingwjw/Documentation | 567608f388ca369b864c2d75a94647801b5dfa1e | [
"Unlicense"
] | 31 | 2016-08-16T15:32:46.000Z | 2021-01-26T19:16:48.000Z | from matplotlib.pyplot import figure, show, gca
import numpy as np
# generate x values
x = np.arange(0.0, 2, 0.01)
# two different signals are measured
y1 = np.sin(2*np.pi*x)
y2 = 1.2*np.sin(4*np.pi*x)
fig = figure()
ax = gca()
# plot and
# fill between y1 and y2 where a logical condition is met
ax.plot(x, y1, x, ... | 21.72 | 80 | 0.696133 |
93af757a787ef9ed6a6e4914952036f6d04ab252 | 131 | py | Python | sila_cetoni/io/sila/io_service/generated/digitaloutchannelcontroller/digitaloutchannelcontroller_types.py | CETONI-Software/sila_cetoni_io | aa7849a8c609cc7842d31b5848d33dce39f03989 | [
"BSD-3-Clause"
] | 1 | 2022-03-08T13:39:55.000Z | 2022-03-08T13:39:55.000Z | sila_cetoni/io/sila/io_service/generated/digitaloutchannelcontroller/digitaloutchannelcontroller_types.py | CETONI-Software/sila_cetoni_io | aa7849a8c609cc7842d31b5848d33dce39f03989 | [
"BSD-3-Clause"
] | null | null | null | sila_cetoni/io/sila/io_service/generated/digitaloutchannelcontroller/digitaloutchannelcontroller_types.py | CETONI-Software/sila_cetoni_io | aa7849a8c609cc7842d31b5848d33dce39f03989 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from typing import NamedTuple
class SetOutput_Responses(NamedTuple):
pass
State = str
| 10.916667 | 38 | 0.78626 |
93af7f01f55a2b3b02e40bd9eee092e8286dc7d3 | 1,936 | py | Python | config.py | aoltean-Q2S/DS1COM2 | 006286779989defc2c163c20d67010b306d20ccb | [
"MIT"
] | null | null | null | config.py | aoltean-Q2S/DS1COM2 | 006286779989defc2c163c20d67010b306d20ccb | [
"MIT"
] | null | null | null | config.py | aoltean-Q2S/DS1COM2 | 006286779989defc2c163c20d67010b306d20ccb | [
"MIT"
] | 1 | 2019-06-28T19:19:28.000Z | 2019-06-28T19:19:28.000Z | #!/usr/bin/python3
##
## Written with Python v3.6.3 (CPython)
## Satellite Communication Subsystem 2
##
## This file contains constants to be used in COM_2_MAIN.py. They are here
## to allow for easy access.
################################## Command Map ##############################
#############################... | 29.784615 | 84 | 0.536157 |
93af87dc72925adda2b4b1cd9214406e31b93503 | 15,081 | py | Python | facexlib/utils/face_restoration_helper.py | spy14414/facexlib | 6be8bdcfe32198374c17588132a72022ad88ae3b | [
"MIT"
] | 164 | 2021-05-15T20:15:42.000Z | 2022-03-25T19:39:24.000Z | facexlib/utils/face_restoration_helper.py | spy14414/facexlib | 6be8bdcfe32198374c17588132a72022ad88ae3b | [
"MIT"
] | 7 | 2021-08-03T15:56:49.000Z | 2022-02-24T13:50:33.000Z | facexlib/utils/face_restoration_helper.py | spy14414/facexlib | 6be8bdcfe32198374c17588132a72022ad88ae3b | [
"MIT"
] | 32 | 2021-05-16T03:10:24.000Z | 2022-03-19T12:02:00.000Z | import cv2
import numpy as np
import os
import torch
from facexlib.detection import init_detection_model
from facexlib.utils.misc import imwrite
def get_largest_face(det_faces, h, w):
def get_location(val, length):
if val < 0:
return 0
elif val > length:
return length
... | 45.288288 | 120 | 0.55613 |
93af97934de19e730caa131e886aa904a0932867 | 11,336 | py | Python | python/pyxir/quantization/decent_quantizer.py | Xilinx/pyxir | bef661d6d77adcdbd2cf4163f2cf3a1d31d40406 | [
"Apache-2.0"
] | 25 | 2020-06-17T22:41:13.000Z | 2022-03-22T16:28:22.000Z | python/pyxir/quantization/decent_quantizer.py | Xilinx/pyxir | bef661d6d77adcdbd2cf4163f2cf3a1d31d40406 | [
"Apache-2.0"
] | 25 | 2021-03-16T06:26:44.000Z | 2022-03-18T11:28:33.000Z | python/pyxir/quantization/decent_quantizer.py | Xilinx/pyxir | bef661d6d77adcdbd2cf4163f2cf3a1d31d40406 | [
"Apache-2.0"
] | 19 | 2020-07-30T10:03:02.000Z | 2021-06-29T01:18:16.000Z | # Copyright 2020 Xilinx 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, ... | 33.838806 | 101 | 0.598977 |
93af9d1f1bd701f486090a74ed31c81020c4e11a | 819 | py | Python | setup.py | iamjarvs/apstraGo | 68cc8f1c8b325abd00adc61d93eba0fc3b1f2bb5 | [
"MIT"
] | 4 | 2021-02-02T17:57:37.000Z | 2021-06-26T23:09:59.000Z | setup.py | iamjarvs/apstraGo | 68cc8f1c8b325abd00adc61d93eba0fc3b1f2bb5 | [
"MIT"
] | null | null | null | setup.py | iamjarvs/apstraGo | 68cc8f1c8b325abd00adc61d93eba0fc3b1f2bb5 | [
"MIT"
] | 2 | 2021-02-02T19:47:40.000Z | 2021-02-03T18:47:42.000Z | from setuptools import setup
from setuptools import find_packages
setup(
name='apstraGo',
version='1.3.0',
description='Python wrapper for Apstra OS',
author='Adam Jarvis',
url='https://github.com/iamjarvs/apstraGo',
install_requires=['requests', 'PyYAML', 'cerberus', 'rich'],
keywords='aps... | 28.241379 | 64 | 0.595849 |
93afaa5879dfaa2845cb812341898ff76b092a0c | 27,079 | py | Python | traffic/data/eurocontrol/ddr/so6.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | traffic/data/eurocontrol/ddr/so6.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | traffic/data/eurocontrol/ddr/so6.py | MichelKhalaf/traffic | 84e315d84a4ab9d8711414e7c275733e27a089ed | [
"MIT"
] | null | null | null | import json
import logging
import os
import subprocess
import sys
from calendar import timegm
from datetime import datetime, timedelta, timezone
from functools import lru_cache
from io import StringIO
from pathlib import Path
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterable,
Ite... | 30.121246 | 80 | 0.526903 |
93afcc5362ce5c2fb5ad7a02ef1ef57bb0fd2e65 | 4,800 | py | Python | toontown/minigame/DivingFishSpawn.py | LittleNed/toontown-stride | 1252a8f9a8816c1810106006d09c8bdfe6ad1e57 | [
"Apache-2.0"
] | 3 | 2020-01-02T08:43:36.000Z | 2020-07-05T08:59:02.000Z | toontown/minigame/DivingFishSpawn.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | null | null | null | toontown/minigame/DivingFishSpawn.py | NoraTT/Historical-Commits-Project-Altis-Source | fe88e6d07edf418f7de6ad5b3d9ecb3d0d285179 | [
"Apache-2.0"
] | 4 | 2019-06-20T23:45:23.000Z | 2020-10-14T20:30:15.000Z | from direct.showbase.DirectObject import DirectObject
from toontown.toonbase.ToontownGlobals import *
from direct.directnotify import DirectNotifyGlobal
from direct.interval.IntervalGlobal import *
from direct.actor import Actor
import random
from toontown.minigame import DivingGameGlobals
class DivingFishSpawn(Direct... | 39.669421 | 174 | 0.58 |
93afce8b0c424dce2b3780ad580834db083b09b7 | 1,007 | py | Python | api_interface/constants/http_method.py | ShreyasTheOne/Super-Duper-Fuzzer | b667e2dca3e49a370634ad4b0bd826aca06136b7 | [
"MIT"
] | null | null | null | api_interface/constants/http_method.py | ShreyasTheOne/Super-Duper-Fuzzer | b667e2dca3e49a370634ad4b0bd826aca06136b7 | [
"MIT"
] | null | null | null | api_interface/constants/http_method.py | ShreyasTheOne/Super-Duper-Fuzzer | b667e2dca3e49a370634ad4b0bd826aca06136b7 | [
"MIT"
] | null | null | null | class HTTPMethodNotAccepted(Exception):
"""
Raised when HTTP Method is not valid
"""
def __init__(self, invalid_method):
self.invalid_method = invalid_method
def __str__(self):
return f"Unrecognised or unaccepted HTTP Method {self.invalid_method}"
class HTTPMethod:
"""
De... | 24.560976 | 78 | 0.613704 |
93b02343177f9a3ee50102d5dd4b51f8b1ced9f3 | 369 | py | Python | leeeeon4_test_package/cli.py | Leeeeon4/leeeeon4_test_package | 45ea98528fc25ec9cd687c24c1b2aac88de2a04a | [
"MIT"
] | null | null | null | leeeeon4_test_package/cli.py | Leeeeon4/leeeeon4_test_package | 45ea98528fc25ec9cd687c24c1b2aac88de2a04a | [
"MIT"
] | 19 | 2021-09-09T13:34:49.000Z | 2021-09-30T13:42:24.000Z | leeeeon4_test_package/cli.py | Leeeeon4/leeeeon4_test_package | 45ea98528fc25ec9cd687c24c1b2aac88de2a04a | [
"MIT"
] | null | null | null | """Console script for leeeeon4_test_package."""
import sys
import click
from leeeeon4_test_package.leeeeon4_test_package import ingredients
@click.command()
@click.argument('count', type=int)
def main(count):
"""Console script for leeeeon4_test_package."""
ingredients(count)
return 0
if __name__ == "__m... | 21.705882 | 67 | 0.734417 |
93b04624517cb56ce0d80947cb26f792c2012a70 | 4,799 | py | Python | pudb/remote.py | albfan/pudb | 0a8b240fe4d05e6e3ab14f6f14d9926f8936e284 | [
"MIT"
] | null | null | null | pudb/remote.py | albfan/pudb | 0a8b240fe4d05e6e3ab14f6f14d9926f8936e284 | [
"MIT"
] | null | null | null | pudb/remote.py | albfan/pudb | 0a8b240fe4d05e6e3ab14f6f14d9926f8936e284 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
# mostly stolen from celery.contrib.rdb
import errno
import os
import socket
import sys
from pudb.debugger import Debugger
__all__ = ['PUDB_RDB_HOST', 'PUDB_RDB_PORT', 'default_port',
'debugger', 'set_trace... | 30.373418 | 85 | 0.62388 |
93b09b97bd16f6c5ed0f546a11bd780b152e46d5 | 17,112 | py | Python | visualizations/functions.py | OdysseasPapakyriakou/kMeans | 99416c3772b2f7ecbd703d3cc2c8169c4da6b19d | [
"MIT"
] | null | null | null | visualizations/functions.py | OdysseasPapakyriakou/kMeans | 99416c3772b2f7ecbd703d3cc2c8169c4da6b19d | [
"MIT"
] | null | null | null | visualizations/functions.py | OdysseasPapakyriakou/kMeans | 99416c3772b2f7ecbd703d3cc2c8169c4da6b19d | [
"MIT"
] | null | null | null | # Name: Odysseas Papakyriakou
# Student_ID: 12632864
"""This module provides a number of functions to visualize data"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
from transformed_datasets import *
from bokeh.plotting import figure
from bokeh.models import Hov... | 36.8 | 120 | 0.640486 |
93b0db6ee8a5ca7fd773795fd574b8424492cdf2 | 2,252 | py | Python | RaiseWikibase/utils.py | JKamlah/RaiseWikibase | d705ec23ac741d52001e205e7537d88438a57637 | [
"MIT"
] | null | null | null | RaiseWikibase/utils.py | JKamlah/RaiseWikibase | d705ec23ac741d52001e205e7537d88438a57637 | [
"MIT"
] | null | null | null | RaiseWikibase/utils.py | JKamlah/RaiseWikibase | d705ec23ac741d52001e205e7537d88438a57637 | [
"MIT"
] | null | null | null | import subprocess
import socket
import requests
import pandas as pd
def execute_shell(command):
"""Run a command in shell and print a live output"""
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
while True:
output = process.stdout.readline()
if process.poll() is n... | 34.646154 | 83 | 0.57016 |
93b102da7d24319ce85dd87f3dd6ce5e8fcd1e7d | 2,427 | py | Python | Testing/DrawBot/textbox.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Testing/DrawBot/textbox.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Testing/DrawBot/textbox.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | from pagebot.filepaths import RESOURCES_PATH
t = '''Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo conse... | 46.673077 | 689 | 0.753193 |
93b13af8cf5ae00378b6f6b2dbebd61ad5200b00 | 18,665 | py | Python | pywikibot/version.py | h4ck3rm1k3/pywikibot-core | fb4e3d4730b530739fd554458156925c59588a83 | [
"MIT"
] | null | null | null | pywikibot/version.py | h4ck3rm1k3/pywikibot-core | fb4e3d4730b530739fd554458156925c59588a83 | [
"MIT"
] | null | null | null | pywikibot/version.py | h4ck3rm1k3/pywikibot-core | fb4e3d4730b530739fd554458156925c59588a83 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Module to determine the pywikibot version (tag, revision and date)."""
#
# (C) Merlijn 'valhallasw' van Deen, 2007-2014
# (C) xqt, 2010-2016
# (C) Pywikibot team, 2007-2016
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
__versi... | 33.330357 | 80 | 0.606804 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.