hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2b2d2083b281f2bcf3550d8a5d3bef8394173ada | 2,877 | py | Python | examples/atrous_conv_example.py | miaecle/PNet | 981ce26cf5358fbd9af128501640d453043eb6f7 | [
"MIT"
] | 3 | 2017-05-17T01:19:18.000Z | 2017-07-19T21:41:15.000Z | examples/atrous_conv_example.py | miaecle/PNet | 981ce26cf5358fbd9af128501640d453043eb6f7 | [
"MIT"
] | null | null | null | examples/atrous_conv_example.py | miaecle/PNet | 981ce26cf5358fbd9af128501640d453043eb6f7 | [
"MIT"
] | 1 | 2021-06-19T09:32:26.000Z | 2021-06-19T09:32:26.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 27 19:43:49 2017
@author: zqwu
Example script using saved atrous-conv model to predict targets in CASP11, CASP12, CAMEO.
To run this code, please download the feature files(or generating features by HHblits, CCMpred and RaptorX):
CASP: https://s... | 39.410959 | 108 | 0.765728 |
f6c821ef42f4f0f7bb6f76406f0de309f8c8e511 | 20,758 | py | Python | tensorflow/python/eager/def_function_xla_jit_test.py | pukhlyakova/tensorflow | 573b838b131b4229179dcc86d675ecd2b09b2c52 | [
"Apache-2.0"
] | 1 | 2020-09-21T04:52:36.000Z | 2020-09-21T04:52:36.000Z | tensorflow/python/eager/def_function_xla_jit_test.py | lonelyagegeek/tensorflow | 830b72bc81f99de1ab26dc186dcc8c8fb6b9c8bc | [
"Apache-2.0"
] | 2 | 2021-08-25T16:14:02.000Z | 2022-02-10T04:14:26.000Z | tensorflow/python/eager/def_function_xla_jit_test.py | lonelyagegeek/tensorflow | 830b72bc81f99de1ab26dc186dcc8c8fb6b9c8bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.085386 | 80 | 0.635321 |
9ad9fff758d4652d40fd5bbe41f1d7f8e1b2a4a4 | 390 | py | Python | client/src/__init__.py | Sheerabth/blob-system | 808f1591247fecace4cbd121053d79205096ced3 | [
"MIT"
] | null | null | null | client/src/__init__.py | Sheerabth/blob-system | 808f1591247fecace4cbd121053d79205096ced3 | [
"MIT"
] | null | null | null | client/src/__init__.py | Sheerabth/blob-system | 808f1591247fecace4cbd121053d79205096ced3 | [
"MIT"
] | null | null | null | __app_name__ = "blob-system"
__version__ = "0.1.0"
(
SUCCESS,
DIR_ERROR,
FILE_ERROR,
DB_READ_ERROR,
DB_WRITE_ERROR,
JSON_ERROR,
ID_ERROR,
) = range(7)
ERRORS = {
DIR_ERROR: "config directory error",
FILE_ERROR: "config file error",
DB_READ_ERROR: "database read error",
DB_W... | 18.571429 | 43 | 0.651282 |
98d97aaae3157752e08a29559abeeaadcb9073a2 | 287 | py | Python | love/lover/urls.py | woshinib/text | ad40b5992d0006c95b39e6f449e0cae16deb256d | [
"MIT"
] | null | null | null | love/lover/urls.py | woshinib/text | ad40b5992d0006c95b39e6f449e0cae16deb256d | [
"MIT"
] | null | null | null | love/lover/urls.py | woshinib/text | ad40b5992d0006c95b39e6f449e0cae16deb256d | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'lover'
urlpatterns = [
path('lover_index',views.lover_index,name = 'lover_index'),
path('lover_movie', views.lover_movie,name = 'lover_movie'),
path('lover_cake', views.lover_cake,name = 'lover_cake'),
] | 28.7 | 65 | 0.689895 |
cbed60ae0203d4a04dcd2e465c594ac34522dfa9 | 637 | py | Python | boatsandjoy_api/core/validators.py | bertini36/boatsandjoy-api | b22d82eb02947218d924b381160d622ded9e1d98 | [
"MIT"
] | null | null | null | boatsandjoy_api/core/validators.py | bertini36/boatsandjoy-api | b22d82eb02947218d924b381160d622ded9e1d98 | [
"MIT"
] | 12 | 2021-04-08T21:18:37.000Z | 2022-03-12T00:39:39.000Z | boatsandjoy_api/core/validators.py | bertini36/boatsandjoy-api | b22d82eb02947218d924b381160d622ded9e1d98 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from dataclasses import asdict, dataclass
from .exceptions import InvalidDataError
class RequestValidatorInterface(ABC):
"""
This validators are used to validate api requests types and if are required
"""
@classmethod
@abstractmethod
def validate(cls, para... | 24.5 | 79 | 0.706436 |
207757132cb2743016b90f04432db7b9479a9b59 | 23,109 | py | Python | meutils/besttable.py | Jie-Yuan/MeUtils | 2bb191b0d35b809af037c0f65b37570b8828bea3 | [
"Apache-2.0"
] | 3 | 2020-12-03T07:30:02.000Z | 2021-02-07T13:37:33.000Z | meutils/besttable.py | Jie-Yuan/MeUtils | 2bb191b0d35b809af037c0f65b37570b8828bea3 | [
"Apache-2.0"
] | null | null | null | meutils/besttable.py | Jie-Yuan/MeUtils | 2bb191b0d35b809af037c0f65b37570b8828bea3 | [
"Apache-2.0"
] | 1 | 2021-02-07T13:37:38.000Z | 2021-02-07T13:37:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project : MeUtils.
# @File : besttable
# @Time : 2021/1/28 8:01 下午
# @Author : yuanjie
# @Email : yuanjie@xiaomi.com
# @Software : PyCharm
# @Description : https://github.com/foutaise/texttable/blob/master/texttable.py
# TODO: 设置df... | 32.095833 | 100 | 0.532087 |
e9b2c7b572ccb9b525f4bf3b767aed35c1d4ea25 | 4,011 | py | Python | config/settings.py | FrankCasanova/FrankyNews | 527e8fbf0a4c09e5a34e88a2106a0af376b8b6c0 | [
"MIT"
] | null | null | null | config/settings.py | FrankCasanova/FrankyNews | 527e8fbf0a4c09e5a34e88a2106a0af376b8b6c0 | [
"MIT"
] | null | null | null | config/settings.py | FrankCasanova/FrankyNews | 527e8fbf0a4c09e5a34e88a2106a0af376b8b6c0 | [
"MIT"
] | null | null | null | """
Django settings for config project.
Generated by 'django-admin startproject' using Django 3.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from environs ... | 25.877419 | 91 | 0.714784 |
4ea68884bfd2ec5ee0afaa5b76cc43ae8c2d4ade | 2,180 | py | Python | wallet/serializers.py | iesteban/bitcoin_bazaar_backend | 2aa7c61d8727dae3a9be4b19c4b2aa49ec7ecaa0 | [
"MIT"
] | 18 | 2017-03-08T06:30:55.000Z | 2020-05-08T17:30:20.000Z | wallet/serializers.py | iesteban/bitcoin_bazaar_backend | 2aa7c61d8727dae3a9be4b19c4b2aa49ec7ecaa0 | [
"MIT"
] | 871 | 2017-03-06T21:03:59.000Z | 2022-03-28T19:46:44.000Z | wallet/serializers.py | iesteban/bitcoin_bazaar_backend | 2aa7c61d8727dae3a9be4b19c4b2aa49ec7ecaa0 | [
"MIT"
] | 5 | 2017-07-07T12:10:47.000Z | 2020-05-13T15:57:56.000Z | from rest_framework import serializers
from semillas_backend.users.serializers import UserSerializer
from .models import Wallet, Transaction
class CreateTransactionSerializer(serializers.Serializer):
user_source = serializers.UUIDField()
user_dest = serializers.UUIDField()
value = serializers.DecimalFiel... | 33.538462 | 84 | 0.658257 |
63eec7be2c5cbbfe0e3f32e22c5edcc9303efea5 | 3,899 | py | Python | tools/c7n_azure/tests_azure/tests_resources/test_storage_container.py | al3pht/cloud-custodian | ce6613d1b716f336384c5e308eee300389e6bf50 | [
"Apache-2.0"
] | 2,415 | 2018-12-04T00:37:58.000Z | 2022-03-31T12:28:56.000Z | tools/c7n_azure/tests_azure/tests_resources/test_storage_container.py | al3pht/cloud-custodian | ce6613d1b716f336384c5e308eee300389e6bf50 | [
"Apache-2.0"
] | 3,272 | 2018-12-03T23:58:17.000Z | 2022-03-31T21:15:32.000Z | tools/c7n_azure/tests_azure/tests_resources/test_storage_container.py | al3pht/cloud-custodian | ce6613d1b716f336384c5e308eee300389e6bf50 | [
"Apache-2.0"
] | 773 | 2018-12-06T09:43:23.000Z | 2022-03-30T20:44:43.000Z | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from ..azure_common import BaseTest, arm_template, cassette_name, DEFAULT_SUBSCRIPTION_ID
from c7n_azure.storage_utils import StorageUtilities
from mock import patch
from c7n_azure.constants import CONTAINER_EVENT_TRIGGER_MODE
from c7n_azure... | 38.60396 | 97 | 0.553732 |
f864b788f318ea618925ef504d1957e35486b91e | 12,270 | py | Python | weatherlight-server/lib/flask_jwt/__init__.py | svanscho/weatherlight | 14ce4114381af53cf040cee7c04b5b5670bbb95c | [
"MIT"
] | 581 | 2015-01-06T03:34:55.000Z | 2022-03-27T17:16:29.000Z | weatherlight-server/lib/flask_jwt/__init__.py | svanscho/weatherlight | 14ce4114381af53cf040cee7c04b5b5670bbb95c | [
"MIT"
] | 104 | 2015-01-18T23:25:19.000Z | 2022-02-16T15:44:43.000Z | weatherlight-server/lib/flask_jwt/__init__.py | svanscho/weatherlight | 14ce4114381af53cf040cee7c04b5b5670bbb95c | [
"MIT"
] | 212 | 2015-02-02T18:55:17.000Z | 2022-03-30T11:13:38.000Z | # -*- coding: utf-8 -*-
"""
flask_jwt
~~~~~~~~~
Flask-JWT module
"""
import logging
import warnings
from collections import OrderedDict
from datetime import datetime, timedelta
from functools import wraps
import jwt
from flask import current_app, request, jsonify, _request_ctx_stack
from werkzeug.local... | 33.801653 | 99 | 0.67987 |
44c8e43072a0de4809d496ec7e65bbe9fb1cfae0 | 5,098 | py | Python | doc/conf.py | Infinidat/mitba | f4a38d1dbf5241b53251d6fffa0aab4257147d29 | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | Infinidat/mitba | f4a38d1dbf5241b53251d6fffa0aab4257147d29 | [
"BSD-3-Clause"
] | 2 | 2019-08-08T06:49:10.000Z | 2019-08-13T12:04:16.000Z | doc/conf.py | Infinidat/mitba | f4a38d1dbf5241b53251d6fffa0aab4257147d29 | [
"BSD-3-Clause"
] | 1 | 2016-05-22T15:11:00.000Z | 2016-05-22T15:11:00.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.526946 | 79 | 0.650843 |
f5379887eee97f5f3469bef9f5b624293b9f63a4 | 691 | py | Python | examples/shared.py | ucbrise/jarvis | f40ccb1708a44e4392f26ed217b69df44abca824 | [
"Apache-2.0"
] | 14 | 2017-12-13T01:52:46.000Z | 2022-01-12T11:31:20.000Z | examples/shared.py | ucbrise/jarvis | f40ccb1708a44e4392f26ed217b69df44abca824 | [
"Apache-2.0"
] | 9 | 2018-01-18T02:53:16.000Z | 2018-04-07T18:36:12.000Z | examples/shared.py | ucbrise/jarvis | f40ccb1708a44e4392f26ed217b69df44abca824 | [
"Apache-2.0"
] | 8 | 2018-01-12T21:49:39.000Z | 2021-09-03T06:27:05.000Z | #!/usr/bin/env python3
import numpy as np
# Define the names of each column in the tweets file
attribute_names = []
attribute_names.append('id')
attribute_names.append('tweet')
attribute_names.append('place')
attribute_names.append('city')
attribute_names.append('country')
attribute_names.append('code')
# Define the ... | 25.592593 | 72 | 0.725036 |
6f47a4758f775526a78c5878d10d9d94772bafae | 3,638 | py | Python | pyntel4004/src/hardware/suboperations/ram.py | alshapton/Pyntel4004 | 865a7fc5264d24f1281bee44c40a51e7e42598a0 | [
"MIT"
] | 6 | 2021-02-12T21:37:53.000Z | 2022-02-24T23:09:37.000Z | pyntel4004/src/hardware/suboperations/ram.py | alshapton/Pyntel4004 | 865a7fc5264d24f1281bee44c40a51e7e42598a0 | [
"MIT"
] | 43 | 2021-04-23T09:32:24.000Z | 2022-02-01T15:17:09.000Z | pyntel4004/src/hardware/suboperations/ram.py | alshapton/Pyntel4004 | 865a7fc5264d24f1281bee44c40a51e7e42598a0 | [
"MIT"
] | 2 | 2021-06-11T01:12:44.000Z | 2021-09-14T22:44:11.000Z | """RAM methods."""
# Import system modules
import os
import sys
sys.path.insert(1, '..' + os.sep + 'src')
from hardware.suboperations.other import decode_command_register # noqa
def rdx(self, character) -> int:
"""
Read RAM status character X.
Parameters
----------
self : Processor, mandatory
... | 22.182927 | 79 | 0.637438 |
d95464afeb553cf139e32d4310ff38c1355f877c | 1,940 | py | Python | google/appengine/_internal/antlr3/extras.py | MiCHiLU/google_appengine_sdk | 3da9f20d7e65e26c4938d2c4054bc4f39cbc5522 | [
"Apache-2.0"
] | 790 | 2015-01-03T02:13:39.000Z | 2020-05-10T19:53:57.000Z | AppServer/google/appengine/_internal/antlr3/extras.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 1,361 | 2015-01-08T23:09:40.000Z | 2020-04-14T00:03:04.000Z | AppServer/google/appengine/_internal/antlr3/extras.py | nlake44/appscale | 6944af660ca4cb772c9b6c2332ab28e5ef4d849f | [
"Apache-2.0"
] | 155 | 2015-01-08T22:59:31.000Z | 2020-04-08T08:01:53.000Z | """ @package antlr3.dottreegenerator
@brief ANTLR3 runtime package, tree module
This module contains all support classes for AST construction and tree parsers.
"""
# begin[licence]
#
# [The "BSD licence"]
# Copyright (c) 2005-2008 Terence Parr
# All rights reserved.
#
# Redistribution and use in source and binary fo... | 40.416667 | 79 | 0.769072 |
12fdeef5d26bbb94352e8d3eab0790bd1137b9c1 | 14,709 | py | Python | util.py | Koen-Git/ColorSymDetect | 5d6bb6734063f4a09c9a153527a446ce5c02a5b0 | [
"MIT"
] | 1 | 2022-03-07T20:08:32.000Z | 2022-03-07T20:08:32.000Z | util.py | Koen-Git/ColorSymDetect | 5d6bb6734063f4a09c9a153527a446ce5c02a5b0 | [
"MIT"
] | null | null | null | util.py | Koen-Git/ColorSymDetect | 5d6bb6734063f4a09c9a153527a446ce5c02a5b0 | [
"MIT"
] | null | null | null | import os
import cv2
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
import preprocess
# Return a list of all image names with a given extension in a given folder
def listImages(dir, extension):
res = []
for img in os.listdir(dir):
if img.endswith(extension):
res... | 42.025714 | 232 | 0.607451 |
4635be3de31410935a1facb10a74d414b76dcdca | 666 | py | Python | comportamentais/chain_of_responsibility/descontos.py | jgabriellima/design-patterns-python | e955d570265c154863fbfc65564dd4781f549042 | [
"Apache-2.0"
] | 363 | 2018-07-30T18:52:55.000Z | 2022-03-29T23:04:26.000Z | comportamentais/chain_of_responsibility/descontos.py | sou-rafael/design-patterns-python | e955d570265c154863fbfc65564dd4781f549042 | [
"Apache-2.0"
] | 7 | 2018-07-14T20:19:23.000Z | 2020-04-17T00:24:30.000Z | comportamentais/chain_of_responsibility/descontos.py | sou-rafael/design-patterns-python | e955d570265c154863fbfc65564dd4781f549042 | [
"Apache-2.0"
] | 99 | 2018-09-06T18:11:43.000Z | 2022-03-27T13:32:45.000Z | class DescontoCincoItens:
def __init__(self, proximo_desconto):
self.__proximo_desconto = proximo_desconto
def calcula(self, orcamento):
if orcamento.total_itens > 5:
return orcamento.valor * 0.1
return self.__proximo_desconto.calcula(orcamento)
class DescontoMaisDeQuinhen... | 27.75 | 57 | 0.695195 |
869c606a1ac8a16958bbcc35f3a62a65f9d833ea | 1,501 | py | Python | other/day21b.py | p88h/aoc2021 | b42a12ce7ca786b2b5061fdcb46bd850ed54b82c | [
"Apache-2.0"
] | 15 | 2021-12-01T16:50:40.000Z | 2022-01-04T02:44:00.000Z | other/day21b.py | p88h/aoc2021 | b42a12ce7ca786b2b5061fdcb46bd850ed54b82c | [
"Apache-2.0"
] | null | null | null | other/day21b.py | p88h/aoc2021 | b42a12ce7ca786b2b5061fdcb46bd850ed54b82c | [
"Apache-2.0"
] | 6 | 2021-12-08T01:33:56.000Z | 2021-12-29T11:45:52.000Z | from collections import defaultdict
import time
lines = open("input/day21.txt").readlines()
p1 = int(lines[0].split(": ")[1])
p2 = int(lines[1].split(": ")[1])
def run1(p1, p2):
s1 = s2 = ofs = cnt = 0
while True:
p1 = (p1+(ofs % 100)+((ofs+1) % 100)+((ofs+2) % 100)+2) % 10+1
ofs = (ofs+3) % ... | 23.092308 | 75 | 0.493671 |
3034d54c52c453cb06e1825ddb59a806a4c4a59b | 59,992 | py | Python | pandas/tests/io/parser/test_common.py | sayanmondal2098/pandas | 2f6b90aaaab6814c102eb160c5a9c11bc04a092e | [
"BSD-3-Clause"
] | 2 | 2021-04-07T13:56:06.000Z | 2021-04-12T13:45:23.000Z | pandas/tests/io/parser/test_common.py | sanjusci/pandas | a1fee9199eba7ebf423880243936b9f1501d3d3a | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/io/parser/test_common.py | sanjusci/pandas | a1fee9199eba7ebf423880243936b9f1501d3d3a | [
"BSD-3-Clause"
] | 3 | 2018-01-08T08:40:55.000Z | 2019-10-07T02:02:40.000Z | # -*- coding: utf-8 -*-
"""
Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.
"""
import codecs
from collections import OrderedDict
import csv
from datetime import datetime
from io import BytesIO, StringIO
import os
import platform
from tempfile im... | 31.05176 | 194 | 0.594996 |
a4d8388933c1181b096b272546f4684bd8a9b0a6 | 11,709 | py | Python | veles/tests/test_workflow.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 1,007 | 2015-07-20T12:01:41.000Z | 2022-03-30T23:08:35.000Z | veles/tests/test_workflow.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 52 | 2015-07-21T10:26:24.000Z | 2019-01-24T05:46:43.000Z | veles/tests/test_workflow.py | AkshayJainG/veles | 21106f41a8e7e7e74453cd16a5059a0e6b1c315e | [
"Apache-2.0"
] | 235 | 2015-07-20T09:42:42.000Z | 2021-12-06T18:12:26.000Z | # -*- coding: utf-8 -*-
"""
.. invisible:
_ _ _____ _ _____ _____
| | | | ___| | | ___/ ___|
| | | | |__ | | | |__ \ `--.
| | | | __|| | | __| `--. \
\ \_/ / |___| |___| |___/\__/ /
\___/\____/\_____|____/\____/
Created on Jun 16, 2014
███████████████████████████████████████... | 37.408946 | 79 | 0.564352 |
b5d77fd3c49b625eae746b86b2e3a401d1e46618 | 18,949 | py | Python | python/pyarrow/tests/test_feather.py | prutskov/arrow | e570db9c45ca97f77c5633e5525c02f55dbb6c4b | [
"Apache-2.0"
] | null | null | null | python/pyarrow/tests/test_feather.py | prutskov/arrow | e570db9c45ca97f77c5633e5525c02f55dbb6c4b | [
"Apache-2.0"
] | 8 | 2020-04-10T19:03:51.000Z | 2021-01-21T01:06:28.000Z | python/pyarrow/tests/test_feather.py | signavio/arrow | 866e6a82e2794b151235c19b8c5cbf1fcaf780ef | [
"CC-BY-3.0",
"Apache-2.0",
"CC0-1.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 28.494737 | 79 | 0.641723 |
10a43d048b73ac7bf087e644cd52843ffbfa7c51 | 6,807 | py | Python | alipay/aop/api/domain/AlipayEcoCplifeCommunityModifyModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayEcoCplifeCommunityModifyModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayEcoCplifeCommunityModifyModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayEcoCplifeCommunityModifyModel(object):
def __init__(self):
self._associated_pois = None
self._city_code = None
self._community_address = None
self._community... | 35.453125 | 89 | 0.613927 |
110758d9046ea080af14a37ef3f557a653821683 | 8,406 | py | Python | scripts/vs2012.py | liak-git/oneos | e28482c0bbcea1fcff4b815533486db9fa51d57f | [
"Apache-2.0"
] | 2 | 2021-10-05T02:34:18.000Z | 2022-01-18T15:22:41.000Z | scripts/vs2012.py | liak-git/oneos | e28482c0bbcea1fcff4b815533486db9fa51d57f | [
"Apache-2.0"
] | null | null | null | scripts/vs2012.py | liak-git/oneos | e28482c0bbcea1fcff4b815533486db9fa51d57f | [
"Apache-2.0"
] | 2 | 2021-10-05T02:28:50.000Z | 2022-03-23T06:39:39.000Z | #
# File : vs2012.py
# This file is part of CMCC IOT OS
# COPYRIGHT (C) 2012-2020, CMCC IOT
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at y... | 36.38961 | 129 | 0.657269 |
fb3c7fe4e7b761e25613198575d94a94557139a3 | 2,859 | py | Python | src/python/WMCore/WMBS/MySQL/Jobs/GetNumberOfJobsPerSite.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 21 | 2015-11-19T16:18:45.000Z | 2021-12-02T18:20:39.000Z | src/python/WMCore/WMBS/MySQL/Jobs/GetNumberOfJobsPerSite.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 5,671 | 2015-01-06T14:38:52.000Z | 2022-03-31T22:11:14.000Z | src/python/WMCore/WMBS/MySQL/Jobs/GetNumberOfJobsPerSite.py | khurtado/WMCore | f74e252412e49189a92962945a94f93bec81cd1e | [
"Apache-2.0"
] | 67 | 2015-01-21T15:55:38.000Z | 2022-02-03T19:53:13.000Z | #!/usr/bin/env python
"""
_GetNumberOfJobsPerSite_
MySQL implementation of Jobs.GetNumberOfJobsPerSite
"""
__all__ = []
import logging
from WMCore.Database.DBFormatter import DBFormatter
class GetNumberOfJobsPerSite(DBFormatter):
"""
_GetLocation_
Retrieve all files that are associated with the give... | 23.628099 | 104 | 0.55369 |
5a0b832993835c9c8c192c54e9188426c47cf2a0 | 1,338 | py | Python | examples/rmsd.py | carbonscott/pyrotein | 4c41eade0d014e70aadf9f9c475cbc4255a0a32e | [
"MIT"
] | 1 | 2021-11-05T21:09:23.000Z | 2021-11-05T21:09:23.000Z | examples/rmsd.py | carbonscott/pyrotein | 4c41eade0d014e70aadf9f9c475cbc4255a0a32e | [
"MIT"
] | null | null | null | examples/rmsd.py | carbonscott/pyrotein | 4c41eade0d014e70aadf9f9c475cbc4255a0a32e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
## import sys
## sys.path.insert(0, "/home/scott/Dropbox/codes/pyrotein")
## sys.path.insert(0, "/Users/scott/Dropbox/codes/pyrotein")
import os
import numpy as np
import pyrotein as pr
from loaddata import load_xlsx, label_TMs
from display import plot_dmat
# Specify c... | 26.76 | 79 | 0.679372 |
7ea6915d932610686f690851dfb2d5cbdbb56e75 | 507 | py | Python | thresholding.py | kigane/opencv-tutorial | 90f21e0a82a6db00b1c3b3982891eeac477beb3c | [
"MIT"
] | null | null | null | thresholding.py | kigane/opencv-tutorial | 90f21e0a82a6db00b1c3b3982891eeac477beb3c | [
"MIT"
] | null | null | null | thresholding.py | kigane/opencv-tutorial | 90f21e0a82a6db00b1c3b3982891eeac477beb3c | [
"MIT"
] | null | null | null | import cv2 as cv
import numpy as np
img = cv.imread('images/cat2.jpg')
resized = cv.resize(img, (800, 600), interpolation=cv.INTER_AREA)
cv.imshow('Cat', resized)
gray = cv.cvtColor(resized, cv.COLOR_BGR2GRAY)
ret, thresh = cv.threshold(gray, 125, 255, type=cv.THRESH_BINARY)
cv.imshow('Thresh', thresh)
for i in ran... | 26.684211 | 102 | 0.721893 |
50f821ead11ed4fb1c70de916b85aaad0f4f5af8 | 538 | py | Python | Algorithms/Hard/60. Permutation Sequence/answer.py | KenWoo/Algorithm | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | [
"Apache-2.0"
] | null | null | null | Algorithms/Hard/60. Permutation Sequence/answer.py | KenWoo/Algorithm | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | [
"Apache-2.0"
] | null | null | null | Algorithms/Hard/60. Permutation Sequence/answer.py | KenWoo/Algorithm | 4012a2f0a099a502df1e5df2e39faa75fe6463e8 | [
"Apache-2.0"
] | null | null | null | from typing import List
class Solution:
def getPermutation(self, n: int, k: int) -> str:
res = ''
fact = [1] * n
num = [str(i) for i in range(1, 10)]
for i in range(1, n):
fact[i] = fact[i - 1] * i
k -= 1
for i in range(n, 0, -1):
first = k //... | 25.619048 | 52 | 0.459108 |
3f4bdebf7e29b388d3beac3d4e878081295d727f | 90 | py | Python | adlibre_tms/apps/reporting/context_processors.py | adlibre/Adlibre-TMS | 4c8de1e4448203fb267d38ec0f4ec9e64d58a21d | [
"BSD-3-Clause"
] | 26 | 2015-01-06T11:09:18.000Z | 2022-03-16T06:20:53.000Z | adlibre_tms/apps/reporting/context_processors.py | adlibre/Adlibre-TMS | 4c8de1e4448203fb267d38ec0f4ec9e64d58a21d | [
"BSD-3-Clause"
] | 4 | 2015-02-26T11:00:35.000Z | 2020-06-05T18:02:02.000Z | adlibre_tms/apps/reporting/context_processors.py | adlibre/Adlibre-TMS | 4c8de1e4448203fb267d38ec0f4ec9e64d58a21d | [
"BSD-3-Clause"
] | 16 | 2015-02-08T05:24:38.000Z | 2021-06-13T14:45:30.000Z | import reporting
def reports(request):
return {'reports': reporting.all_reports(), }
| 18 | 49 | 0.722222 |
79a21b048cebb396d3a5629d64220496b6c399f1 | 824 | py | Python | FNet/Model/Layers/Inceptions/ThirdInception/secondBlock.py | ren-dishen/fnet | 460c3177ee1c8b7aa37d0dc0c8deae577dc79222 | [
"MIT"
] | null | null | null | FNet/Model/Layers/Inceptions/ThirdInception/secondBlock.py | ren-dishen/fnet | 460c3177ee1c8b7aa37d0dc0c8deae577dc79222 | [
"MIT"
] | null | null | null | FNet/Model/Layers/Inceptions/ThirdInception/secondBlock.py | ren-dishen/fnet | 460c3177ee1c8b7aa37d0dc0c8deae577dc79222 | [
"MIT"
] | null | null | null | import Model.blockFactory as factory
def block1x1(input):
tensor = factory.convolutionBlock(input, 'inception_5b_1x1_', '', 256, (1,1))
return tensor
def block3x3(input):
tensor = factory.convolutionBlock(input, 'inception_5b_3x3_', '1', 96, (1,1))
tensor = factory.zeroPadding(tensor)
tensor = fa... | 26.580645 | 83 | 0.682039 |
ea04b55f878b7a7c15e3ad1532f001987f64640f | 2,774 | py | Python | UTILS/image_read.py | emersonrafaels/ocr_tables | 11e696422f6fd8508fdc92ffe9a7d14be319e51f | [
"MIT"
] | null | null | null | UTILS/image_read.py | emersonrafaels/ocr_tables | 11e696422f6fd8508fdc92ffe9a7d14be319e51f | [
"MIT"
] | null | null | null | UTILS/image_read.py | emersonrafaels/ocr_tables | 11e696422f6fd8508fdc92ffe9a7d14be319e51f | [
"MIT"
] | null | null | null | """
FUNÇÕES PARA LEITURA DA IMAGEM.
# Arguments
object - Required : Imagem para leitura/visualização (String | Object)
# Returns
"""
__version__ = "1.0"
__author__ = """Emerson V. Rafael (EMERVIN)"""
__data_atualizacao__ = "15/10/2021"
from inspect import stack
import cv2
fro... | 22.370968 | 95 | 0.576424 |
c5f84d6c6c787a83da1986df21908308c934a159 | 12,784 | py | Python | cryptoapis/model/list_transactions_by_block_hash_ribsb_script_pub_key.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 5 | 2021-05-17T04:45:03.000Z | 2022-03-23T12:51:46.000Z | cryptoapis/model/list_transactions_by_block_hash_ribsb_script_pub_key.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | null | null | null | cryptoapis/model/list_transactions_by_block_hash_ribsb_script_pub_key.py | Crypto-APIs/Crypto_APIs_2.0_SDK_Python | c59ebd914850622b2c6500c4c30af31fb9cecf0e | [
"MIT"
] | 2 | 2021-06-02T07:32:26.000Z | 2022-02-12T02:36:23.000Z | """
CryptoAPIs
Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei... | 44.543554 | 484 | 0.579005 |
c8dd2f7012dea69fc678d6c69f0b4cf5203fe3b9 | 1,787 | py | Python | meshnet/routing.py | vladzaharia/meshnet | 87a48c678094870cc273f4940f122e899eb1f5e1 | [
"MIT"
] | 1 | 2021-02-16T05:29:03.000Z | 2021-02-16T05:29:03.000Z | meshnet/routing.py | vladzaharia/meshnet | 87a48c678094870cc273f4940f122e899eb1f5e1 | [
"MIT"
] | 1 | 2021-02-16T06:23:08.000Z | 2021-02-16T06:23:08.000Z | meshnet/routing.py | vladzaharia/meshnet | 87a48c678094870cc273f4940f122e899eb1f5e1 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from constants.nodetype import TYPE_PROVISIONING
from util.nodetype import NodeType
TIMEOUT_NODE = 5
TIMEOUT_GATEWAY = 15
class RoutingEntry:
node_id: bytes
node_type: NodeType
expiry: datetime
def __init__(self, node_id: bytes, node_type: NodeType) -> None:
... | 30.288136 | 79 | 0.647454 |
122053e28aa01cb297db8271c994bab8f8cf39c1 | 426 | py | Python | rest/migrations/0022_course_level.py | narcotis/Welbot-V2 | 7525216b61036f62d0be0b5ebb6d3476b73323c8 | [
"MIT"
] | 1 | 2021-06-04T03:28:06.000Z | 2021-06-04T03:28:06.000Z | rest/migrations/0022_course_level.py | narcotis/Welbot-V2 | 7525216b61036f62d0be0b5ebb6d3476b73323c8 | [
"MIT"
] | 2 | 2020-09-09T14:19:10.000Z | 2020-09-09T14:20:21.000Z | rest/migrations/0022_course_level.py | narcotis/Welbot-V2 | 7525216b61036f62d0be0b5ebb6d3476b73323c8 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-08-19 06:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rest', '0021_auto_20200819_1513'),
]
operations = [
migrations.AddField(
model_name='course',
name='level',
... | 21.3 | 60 | 0.593897 |
22b76ca8813f7b272af7d96dea2d68d17ee88025 | 7,351 | py | Python | xml_models/xpath_twister.py | macropin/xml-models-redux | 6297f89b0c17ab1858df12fadc4415dd1696620b | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2016-05-05T08:36:24.000Z | 2016-05-05T08:36:24.000Z | xml_models/xpath_twister.py | macropin/xml-models-redux | 6297f89b0c17ab1858df12fadc4415dd1696620b | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xml_models/xpath_twister.py | macropin/xml-models-redux | 6297f89b0c17ab1858df12fadc4415dd1696620b | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | """
Copyright 2009 Chris Tarttelin and Point2 Technologies
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of
conditions and the following dis... | 37.891753 | 114 | 0.664127 |
c013b377711a0e125b8b5830a4f6b2ca9431e839 | 1,520 | py | Python | setup.py | Peking-Epoch/pyfmt | 34513c1de219d16aa5f3de68b0f908aa10869890 | [
"MIT"
] | 1 | 2020-07-02T08:23:53.000Z | 2020-07-02T08:23:53.000Z | setup.py | Peking-Epoch/pyfmt | 34513c1de219d16aa5f3de68b0f908aa10869890 | [
"MIT"
] | null | null | null | setup.py | Peking-Epoch/pyfmt | 34513c1de219d16aa5f3de68b0f908aa10869890 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = ['Click>=7.0', 'black', 'isort>=4.0', 'autoflake']
setup_requ... | 28.148148 | 65 | 0.626316 |
e2791ce5e7ec888a75b54c1be4af3318b8640674 | 1,859 | py | Python | patterns/table_data_gateway/gateways/person_gateway.py | xstrengthofonex/enterprise-application-patterns | 5c9054ec5fc5e05ce53d3fc4190c040d2fedb59b | [
"MIT"
] | null | null | null | patterns/table_data_gateway/gateways/person_gateway.py | xstrengthofonex/enterprise-application-patterns | 5c9054ec5fc5e05ce53d3fc4190c040d2fedb59b | [
"MIT"
] | null | null | null | patterns/table_data_gateway/gateways/person_gateway.py | xstrengthofonex/enterprise-application-patterns | 5c9054ec5fc5e05ce53d3fc4190c040d2fedb59b | [
"MIT"
] | null | null | null | from patterns.table_data_gateway.db import db
class PersonGateway(object):
@staticmethod
def find_all():
sql = "SELECT * FROM person"
with db.connect() as conn:
return conn.execute(sql).fetchall()
@staticmethod
def find_with_lastname(lastname):
sql = "SELECT * FROM ... | 37.18 | 83 | 0.597633 |
99d9edacaff23812ddebbce5e37d899b33ae8988 | 4,895 | py | Python | sdk/python/pulumi_azure/mixedreality/spatial_anchors_account.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/mixedreality/spatial_anchors_account.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/mixedreality/spatial_anchors_account.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Spatia... | 48.95 | 165 | 0.692135 |
74faaf8e12618b202f7f24feee5e18d168a47271 | 11,343 | py | Python | redash/query_runner/mongodb.py | mozilla/redash | 3e76946a4182d30ddb8a6f80fdfef8d550a2359e | [
"BSD-2-Clause"
] | 24 | 2017-05-10T20:36:55.000Z | 2020-11-26T14:20:01.000Z | redash/query_runner/mongodb.py | MaxMood96/redash | 3e76946a4182d30ddb8a6f80fdfef8d550a2359e | [
"BSD-2-Clause"
] | 742 | 2016-09-28T00:38:58.000Z | 2021-07-29T17:48:45.000Z | redash/query_runner/mongodb.py | MaxMood96/redash | 3e76946a4182d30ddb8a6f80fdfef8d550a2359e | [
"BSD-2-Clause"
] | 21 | 2016-10-19T18:29:24.000Z | 2021-07-24T11:47:36.000Z | import datetime
import logging
import re
from dateutil.parser import parse
from redash.query_runner import *
from redash.utils import JSONEncoder, json_dumps, json_loads, parse_human_time
logger = logging.getLogger(__name__)
try:
import pymongo
from bson.objectid import ObjectId
from bson.timestamp impo... | 32.224432 | 178 | 0.550736 |
b8fc6dd2b5384140a2ba92a3a9ba6af348b0b35b | 8,597 | py | Python | tensorflow/python/keras/layers/preprocessing/category_crossing.py | ghaiyur-musubi/tensorflow | 821bd0d4ea30b91dda6f24238aa49de55de20527 | [
"Apache-2.0"
] | 11 | 2018-01-03T15:11:09.000Z | 2021-04-13T05:47:27.000Z | tensorflow/python/keras/layers/preprocessing/category_crossing.py | ghaiyur-musubi/tensorflow | 821bd0d4ea30b91dda6f24238aa49de55de20527 | [
"Apache-2.0"
] | 2 | 2020-08-20T18:08:19.000Z | 2020-10-02T18:35:21.000Z | tensorflow/python/keras/layers/preprocessing/category_crossing.py | ghaiyur-musubi/tensorflow | 821bd0d4ea30b91dda6f24238aa49de55de20527 | [
"Apache-2.0"
] | 10 | 2018-07-31T10:56:21.000Z | 2019-10-07T08:05:21.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.551887 | 80 | 0.680354 |
dd3a18427dccc4f5ce39a65a1740982d6f6d0c3e | 422 | py | Python | URI Online Judge/Mathematics/1161 - Factorial Sum.py | wgarcia1309/competitive-programming | a1788c8a7cbddaa753c2f468859581c1bac9e322 | [
"MIT"
] | null | null | null | URI Online Judge/Mathematics/1161 - Factorial Sum.py | wgarcia1309/competitive-programming | a1788c8a7cbddaa753c2f468859581c1bac9e322 | [
"MIT"
] | null | null | null | URI Online Judge/Mathematics/1161 - Factorial Sum.py | wgarcia1309/competitive-programming | a1788c8a7cbddaa753c2f468859581c1bac9e322 | [
"MIT"
] | null | null | null | #1161 - Factorial Sum
while(True):
try:
s=str(input())
n=s.split(" ")
v1=int(n[0])
v2=int(n[1])
if(v1>v2):
mx=v1+1
else:
mx=v2+1
r1=r2=p=1;
for x in range (2,mx):
p*=x;
if(x==v1):
r1=p;
... | 18.347826 | 30 | 0.343602 |
e7267d09cd4f212b15e39e433ea5a7a1423859f1 | 241 | py | Python | test_botnet_dataset.py | ailabteam/clone_test_botnet-detection | 95f02d4967186440f60d83db04f139c197e178b7 | [
"MIT"
] | 112 | 2020-03-12T17:59:13.000Z | 2022-03-17T00:26:58.000Z | test_botnet_dataset.py | ailabteam/clone_test_botnet-detection | 95f02d4967186440f60d83db04f139c197e178b7 | [
"MIT"
] | 14 | 2020-05-19T07:14:10.000Z | 2022-02-23T17:11:43.000Z | test_botnet_dataset.py | ailabteam/clone_test_botnet-detection | 95f02d4967186440f60d83db04f139c197e178b7 | [
"MIT"
] | 35 | 2020-03-12T15:14:23.000Z | 2022-03-10T05:56:03.000Z | from botdet.data.dataset_botnet import BotnetDataset
if __name__ == '__main__':
dataset = BotnetDataset(name='chord', split='train', graph_format='pyg')
print(dataset)
print(len(dataset))
print(dataset[0])
breakpoint()
| 24.1 | 76 | 0.701245 |
0074628ed951e6dcb0df11ee6d7a73b152d6844a | 21,745 | py | Python | server/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/clangd/signature_help_test.py | hkdb/sysconf | 99d334f7309657647059c4b37f25e33dffc81fc3 | [
"MIT"
] | 10 | 2020-07-21T21:59:54.000Z | 2021-07-19T11:01:47.000Z | server/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/clangd/signature_help_test.py | hkdb/sysconf | 99d334f7309657647059c4b37f25e33dffc81fc3 | [
"MIT"
] | null | null | null | server/.vim/bundle/YouCompleteMe/third_party/ycmd/ycmd/tests/clangd/signature_help_test.py | hkdb/sysconf | 99d334f7309657647059c4b37f25e33dffc81fc3 | [
"MIT"
] | 1 | 2021-01-30T18:17:01.000Z | 2021-01-30T18:17:01.000Z | # Copyright (C) 2020 ycmd contributors
#
# This file is part of ycmd.
#
# ycmd is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ycmd... | 34.029734 | 80 | 0.501173 |
fad78eab3bf3ce972584a9e70c8115709ed068fd | 28,150 | py | Python | virt_env/virt1/lib/python2.7/site-packages/WebTest-2.0.17-py2.7.egg/webtest/app.py | grepme/CMPUT410Lab01 | 810e565d347718334edd89114647d0264259cc3d | [
"Apache-2.0"
] | null | null | null | virt_env/virt1/lib/python2.7/site-packages/WebTest-2.0.17-py2.7.egg/webtest/app.py | grepme/CMPUT410Lab01 | 810e565d347718334edd89114647d0264259cc3d | [
"Apache-2.0"
] | 3 | 2015-02-15T18:31:10.000Z | 2015-02-22T19:56:05.000Z | virt_env/virt1/lib/python2.7/site-packages/WebTest-2.0.17-py2.7.egg/webtest/app.py | grepme/CMPUT410Lab01 | 810e565d347718334edd89114647d0264259cc3d | [
"Apache-2.0"
] | null | null | null | # (c) 2005 Ian Bicking and contributors; written for Paste
# (http://pythonpaste.org)
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license.php
"""
Routines for testing WSGI applications.
Most interesting is TestApp
"""
from __future__ import unicode_literals
import os
import re
import js... | 36.558442 | 79 | 0.561456 |
a756296c512c1fc7bcb7c81df835739631884656 | 6,082 | py | Python | tests/python/gpu/test_kvstore_gpu.py | NathanYyc/incubator-mxnet | 5eeb25995eaf702b3bdaa84c4f0e378f27d5839c | [
"Apache-2.0"
] | 1 | 2019-12-20T11:25:06.000Z | 2019-12-20T11:25:06.000Z | tests/python/gpu/test_kvstore_gpu.py | NathanYyc/incubator-mxnet | 5eeb25995eaf702b3bdaa84c4f0e378f27d5839c | [
"Apache-2.0"
] | 4 | 2021-03-30T13:16:50.000Z | 2021-10-04T08:49:33.000Z | tests/python/gpu/test_kvstore_gpu.py | NathanYyc/incubator-mxnet | 5eeb25995eaf702b3bdaa84c4f0e378f27d5839c | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 44.394161 | 107 | 0.649622 |
086bb46cdc0ebfd47f7eea3e66c1e61280174ffb | 465 | py | Python | moonleap/verbs.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | moonleap/verbs.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | moonleap/verbs.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | configured_by = ("configured",)
uses = ("use", "uses")
contains = ("has", "have", "contain", "contains")
stores = ("stores",)
has = contains + uses
is_created_as = "is-created-as"
runs = ("run", "runs", "running")
with_ = ("with",)
wraps = ("wraps",)
connects = ("connects",)
loads = ("loads",)
posts = ("posts",)
return... | 24.473684 | 49 | 0.606452 |
ea45d23053a3c6a7277d5f4726af58285791b93f | 703 | py | Python | talk.py | j-potter/ConditionOne | 2f7e8598f64029fde4000bc4dc3f646aedaf56d3 | [
"MIT"
] | 4 | 2018-10-31T05:35:36.000Z | 2021-11-08T10:28:34.000Z | talk.py | j-potter/ConditionOne | 2f7e8598f64029fde4000bc4dc3f646aedaf56d3 | [
"MIT"
] | null | null | null | talk.py | j-potter/ConditionOne | 2f7e8598f64029fde4000bc4dc3f646aedaf56d3 | [
"MIT"
] | 1 | 2021-06-24T19:48:41.000Z | 2021-06-24T19:48:41.000Z | class talk:
def __init__(self, GivenDay, GivenTime, GivenTrack, GivenTitle, GivenSpeakers, GivenDescription, GivenIDNum):
self.day = GivenDay
self.time = GivenTime
self.track = GivenTrack
self.title = GivenTitle
self.speakers = GivenSpeakers
self.description = GivenDe... | 39.055556 | 133 | 0.600284 |
2fa6ad8c608b6a2e05661acea9380f2c525ef378 | 214 | py | Python | tests/test_ssm.py | MITLibraries/alma-scripts | c312692a71a83dc0b5e60761bc3e7b37d7d42099 | [
"Apache-2.0"
] | null | null | null | tests/test_ssm.py | MITLibraries/alma-scripts | c312692a71a83dc0b5e60761bc3e7b37d7d42099 | [
"Apache-2.0"
] | 16 | 2021-07-23T20:46:29.000Z | 2022-03-10T19:34:10.000Z | tests/test_ssm.py | MITLibraries/alma-scripts | c312692a71a83dc0b5e60761bc3e7b37d7d42099 | [
"Apache-2.0"
] | null | null | null | from llama.ssm import SSM
def test_ssm_get_parameter_value(mocked_ssm):
ssm = SSM()
parameter_value = ssm.get_parameter_value("/test/example/ALMA_API_ACQ_READ_KEY")
assert parameter_value == "abc123"
| 26.75 | 84 | 0.766355 |
815511bdef274be6d1e1e47a34a646719dd2e0b8 | 814 | py | Python | SimPEG/potential_fields/magnetics/sources.py | jcapriot/simpeg | e88e653673c6b818592b6c075f76ee9215fe82b7 | [
"MIT"
] | 1 | 2020-06-04T21:57:47.000Z | 2020-06-04T21:57:47.000Z | SimPEG/potential_fields/magnetics/sources.py | jcapriot/simpeg | e88e653673c6b818592b6c075f76ee9215fe82b7 | [
"MIT"
] | null | null | null | SimPEG/potential_fields/magnetics/sources.py | jcapriot/simpeg | e88e653673c6b818592b6c075f76ee9215fe82b7 | [
"MIT"
] | 1 | 2021-01-05T18:16:54.000Z | 2021-01-05T18:16:54.000Z | import properties
import numpy as np
from scipy.constants import mu_0
from ...survey import BaseSrc
from .analytics import IDTtoxyz
from ...utils.code_utils import deprecate_class
class SourceField(BaseSrc):
""" Define the inducing field """
def __init__(self, receiver_list=None, parameters=[50000, 90, 0], *... | 30.148148 | 113 | 0.692875 |
675032299b2c9826ea3e048e7012c901b05d25f1 | 17,113 | py | Python | Python/update_installed_firmware_with_dup.py | jzcmyz/OpenManage-Enterprise | 8c8724d71b62992c2bb94ecf385edf7467990344 | [
"Apache-2.0"
] | 61 | 2019-01-28T17:47:38.000Z | 2022-03-07T21:04:44.000Z | Python/update_installed_firmware_with_dup.py | jzcmyz/OpenManage-Enterprise | 8c8724d71b62992c2bb94ecf385edf7467990344 | [
"Apache-2.0"
] | 126 | 2019-07-31T15:46:44.000Z | 2021-10-21T13:22:06.000Z | Python/update_installed_firmware_with_dup.py | jzcmyz/OpenManage-Enterprise | 8c8724d71b62992c2bb94ecf385edf7467990344 | [
"Apache-2.0"
] | 47 | 2019-05-05T23:10:38.000Z | 2021-10-19T21:29:06.000Z | #
# _author_ = Raajeev Kalyanaraman <Raajeev.Kalyanaraman@Dell.com>
#
# Copyright (c) 2021 Dell EMC Corporation
#
# 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/... | 41.536408 | 115 | 0.576988 |
a1e63556e813d011a2b71b116a345f8427cb53c3 | 106,746 | py | Python | src/opserver/opserver.py | sagarc-contrail/contrail-controller | 834302367f3ff81f1ce93f4036b6b3788dfd6994 | [
"Apache-2.0"
] | null | null | null | src/opserver/opserver.py | sagarc-contrail/contrail-controller | 834302367f3ff81f1ce93f4036b6b3788dfd6994 | [
"Apache-2.0"
] | null | null | null | src/opserver/opserver.py | sagarc-contrail/contrail-controller | 834302367f3ff81f1ce93f4036b6b3788dfd6994 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
#
# Opserver
#
# Operational State Server for VNC
#
from gevent import monkey
monkey.patch_all()
try:
from collections import OrderedDict
except ImportError:
# python 2.6 or earlier, use backport
from ordereddict import OrderedDict
from ... | 41.762911 | 138 | 0.557417 |
9161d825f7864bca2a01a9e6e0a4719000a879f7 | 1,462 | py | Python | scripts/create-ecs-task.py | 094459/blogpost-airflow-hybrid | 3ed53c75049e0ab7e9ea364d9b069bab9e3f5806 | [
"MIT"
] | 1 | 2022-03-24T13:19:44.000Z | 2022-03-24T13:19:44.000Z | scripts/create-ecs-task.py | 094459/blogpost-airflow-hybrid | 3ed53c75049e0ab7e9ea364d9b069bab9e3f5806 | [
"MIT"
] | null | null | null | scripts/create-ecs-task.py | 094459/blogpost-airflow-hybrid | 3ed53c75049e0ab7e9ea364d9b069bab9e3f5806 | [
"MIT"
] | null | null | null | #Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
#SPDX-License-Identifier: Apache-2.0
import boto3
import json
client = boto3.client("ecs", region_name="eu-west-2")
def create_task():
response = client.register_task_definition(
containerDefinitions=[
{
"nam... | 34.809524 | 160 | 0.50684 |
2d806bd41964a2615435282dfb901c55dca336b7 | 1,563 | py | Python | qishibaikecrawler/crawler.py | solodom/crawler | fcaf8570b85452194bac18a49f5a61d88ca16a60 | [
"MIT"
] | null | null | null | qishibaikecrawler/crawler.py | solodom/crawler | fcaf8570b85452194bac18a49f5a61d88ca16a60 | [
"MIT"
] | null | null | null | qishibaikecrawler/crawler.py | solodom/crawler | fcaf8570b85452194bac18a49f5a61d88ca16a60 | [
"MIT"
] | null | null | null | from urllib import request
import re
from bs4 import BeautifulSoup
def getcontent(url):
# 模拟浏览器
headers=('User-Agent','Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36')
opener=request.build_opener()
opener.addheaders=[headers]
# 安装全局op... | 33.255319 | 139 | 0.674984 |
15f3c4ec655c515a901c01c9a526baa6138e508c | 170 | py | Python | fwtheme_django_jasmin/__init__.py | cedadev/fwtheme-django-jasmin | bd1ab7a52244ca4d73a3a9d4c502132c955e8771 | [
"MIT"
] | 1 | 2019-09-08T05:39:31.000Z | 2019-09-08T05:39:31.000Z | fwtheme_django_jasmin/__init__.py | cedadev/fwtheme-django-jasmin | bd1ab7a52244ca4d73a3a9d4c502132c955e8771 | [
"MIT"
] | 1 | 2021-09-01T12:59:41.000Z | 2021-09-01T12:59:41.000Z | fwtheme_django_jasmin/__init__.py | cedadev/fwtheme-django-jasmin | bd1ab7a52244ca4d73a3a9d4c502132c955e8771 | [
"MIT"
] | null | null | null | """
Main module for the Django app.
"""
__author__ = "Matt Pritchard"
__copyright__ = "Copyright 2018 UK Science and Technology Facilities Council"
__version__ = "0.5"
| 18.888889 | 77 | 0.741176 |
4bc9ef3ca2b805444eda7e48953ff65a1b61daf7 | 466 | py | Python | dsmr_parser/value_types.py | Aeroid/dsmr_parser | dc2f4937391a0b5fdc2699979e679248571916f9 | [
"MIT"
] | 82 | 2016-11-07T13:59:38.000Z | 2022-03-21T14:48:45.000Z | dsmr_parser/value_types.py | Aeroid/dsmr_parser | dc2f4937391a0b5fdc2699979e679248571916f9 | [
"MIT"
] | 91 | 2016-09-10T20:13:18.000Z | 2022-03-07T20:51:35.000Z | dsmr_parser/value_types.py | Aeroid/dsmr_parser | dc2f4937391a0b5fdc2699979e679248571916f9 | [
"MIT"
] | 52 | 2016-11-06T19:38:32.000Z | 2022-03-19T23:16:34.000Z | import datetime
import pytz
def timestamp(value):
naive_datetime = datetime.datetime.strptime(value[:-1], '%y%m%d%H%M%S')
# TODO comment on this exception
if len(value) == 13:
is_dst = value[12] == 'S' # assume format 160322150000W
else:
is_dst = False
local_tz = pytz.timezone(... | 24.526316 | 75 | 0.684549 |
b9fc9f3c7ea6f3c2aa7406ba6b1db69c8c191a2d | 15,011 | py | Python | scholarly/scholarly.py | gerardcanal/scholarly | 76b7a20f0ae4c1f6c69c3898ea47caa0bbaeb74d | [
"Unlicense"
] | null | null | null | scholarly/scholarly.py | gerardcanal/scholarly | 76b7a20f0ae4c1f6c69c3898ea47caa0bbaeb74d | [
"Unlicense"
] | null | null | null | scholarly/scholarly.py | gerardcanal/scholarly | 76b7a20f0ae4c1f6c69c3898ea47caa0bbaeb74d | [
"Unlicense"
] | null | null | null | """scholarly.py"""
from __future__ import absolute_import, division, print_function, unicode_literals
from bs4 import BeautifulSoup
import arrow
import bibtexparser
import codecs
import hashlib
import pprint
import random
import re
import requests
import sys
import time
_GOOGLEID = hashlib.md5(str(random.random()).... | 42.888571 | 154 | 0.607155 |
d3668c2cfc7b553c1d185bf3cc06da4900313da1 | 692 | py | Python | ejercicios_basicos/funciones/funcion_closure.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_basicos/funciones/funcion_closure.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | ejercicios_basicos/funciones/funcion_closure.py | JuanDuran85/ejemplos_python | 47aa49c65384ab89654f362f3da6cd2b0ef386e5 | [
"Apache-2.0"
] | null | null | null | # concepto de closure en python: es una funcion que define a otra y ademas la puede regresar
# la funcion anidada puede acceder a las variables locales definidas en la funcion principal o externa
# funcion principal o externa
def operacion(a,b):
#definimos una funcion interna o anidada
def sumar():
re... | 27.68 | 102 | 0.734104 |
a2af0b3eedba5a972d5f2d014d037b3dc8348ebe | 985 | py | Python | server/exercises/models.py | ni4ka7a/gym-track | 71ad75f47849ccc6a5198c59fe2261796f705122 | [
"MIT"
] | null | null | null | server/exercises/models.py | ni4ka7a/gym-track | 71ad75f47849ccc6a5198c59fe2261796f705122 | [
"MIT"
] | null | null | null | server/exercises/models.py | ni4ka7a/gym-track | 71ad75f47849ccc6a5198c59fe2261796f705122 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
CATEGORY_CHOICES = (
("BR", "Barbel"),
("DM", "Dumbbell"),
("MA", "Machine"),
("CA", "Cardio"),
("WB", "Weighted Bodyweight")
)
BODY_PART_CHOICES = (
("CO", "Core"),
("AR", "Arms"),
("BA", "Back"),
("CH", "Che... | 28.142857 | 76 | 0.619289 |
b577405fb8be3e59f2bc199de7068accd2ec3bbb | 2,547 | py | Python | ramsey/RamseyGame.py | bzhaocaltech/alpha-zero-ramsey-numbers | dfd10b577c1bc26c4f445bcc2fafa8c1bcf9cb6c | [
"MIT"
] | null | null | null | ramsey/RamseyGame.py | bzhaocaltech/alpha-zero-ramsey-numbers | dfd10b577c1bc26c4f445bcc2fafa8c1bcf9cb6c | [
"MIT"
] | null | null | null | ramsey/RamseyGame.py | bzhaocaltech/alpha-zero-ramsey-numbers | dfd10b577c1bc26c4f445bcc2fafa8c1bcf9cb6c | [
"MIT"
] | 1 | 2018-10-29T23:29:29.000Z | 2018-10-29T23:29:29.000Z | from copy import deepcopy
import sys
sys.path.append('..')
from Game import Game
from Graph import Graph
class RamseyGame(Game):
def __init__(self, n, p, q):
assert p >= 2 and q >= 2
self.n = n
# For indexing purposes colors keys must be [1, 2, ...]
self.colors = {1: p, 2: q}
... | 29.964706 | 94 | 0.601099 |
419fa5034c825621a948594d34fa8d00e03a0a13 | 2,890 | py | Python | app/forms.py | TomCallR/ProjetNLP_jury | 19919551051e9de9fd5fe263200a7da8405f51de | [
"BSD-3-Clause"
] | null | null | null | app/forms.py | TomCallR/ProjetNLP_jury | 19919551051e9de9fd5fe263200a7da8405f51de | [
"BSD-3-Clause"
] | null | null | null | app/forms.py | TomCallR/ProjetNLP_jury | 19919551051e9de9fd5fe263200a7da8405f51de | [
"BSD-3-Clause"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, DateField, SubmitField, SelectField, IntegerField, SelectMultipleField
from wtforms.validators import DataRequired, Email
class InitForm(FlaskForm):
submit = SubmitField("Initialiser la base")
class CourseCreateForm(FlaskForm):
label = StringF... | 28.613861 | 103 | 0.653979 |
ec1e1152cf6e4fb30689e771231ccfa1dcd4d24b | 14,137 | py | Python | src/Building.py | ketsonroberto/PBDO | cdc1c5275bc17753be5c06a216f92391b6f1f1ab | [
"MIT"
] | null | null | null | src/Building.py | ketsonroberto/PBDO | cdc1c5275bc17753be5c06a216f92391b6f1f1ab | [
"MIT"
] | null | null | null | src/Building.py | ketsonroberto/PBDO | cdc1c5275bc17753be5c06a216f92391b6f1f1ab | [
"MIT"
] | null | null | null | import numpy as np
import copy
import sys
# from BuildingProperties import *
class Structure:
# Class to perform the sturctural analysis of a building whose properties are provided.
def __init__(self, building=None, columns=None, slabs=None, core=None, concrete=None, steel=None, cost=None):
self.bu... | 32.056689 | 115 | 0.523025 |
1818bc108ff15fc017dc522e727161e1d7496f15 | 8,857 | py | Python | src/server/bos/controllers/v1/sessiontemplate.py | Cray-HPE/bos | a4a7fc58c884d951b6051093e1a4e2aeaba6740f | [
"MIT"
] | 1 | 2022-03-15T18:17:11.000Z | 2022-03-15T18:17:11.000Z | src/server/bos/controllers/v1/sessiontemplate.py | Cray-HPE/bos | a4a7fc58c884d951b6051093e1a4e2aeaba6740f | [
"MIT"
] | null | null | null | src/server/bos/controllers/v1/sessiontemplate.py | Cray-HPE/bos | a4a7fc58c884d951b6051093e1a4e2aeaba6740f | [
"MIT"
] | 1 | 2022-03-06T12:47:06.000Z | 2022-03-06T12:47:06.000Z | # Cray-provided controllers for the Boot Orchestration Service
# Copyright 2019-2021 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restri... | 38.846491 | 129 | 0.658124 |
7dba8428969d5f922e172175362e7010eaf049fe | 8,202 | py | Python | salt/modules/mdadm.py | wikimedia/operations-debs-salt | be6342abc7401ff92f67ed59f7834f1359f35314 | [
"Apache-2.0"
] | null | null | null | salt/modules/mdadm.py | wikimedia/operations-debs-salt | be6342abc7401ff92f67ed59f7834f1359f35314 | [
"Apache-2.0"
] | null | null | null | salt/modules/mdadm.py | wikimedia/operations-debs-salt | be6342abc7401ff92f67ed59f7834f1359f35314 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Salt module to manage RAID arrays with mdadm
'''
# Import python libs
import os
import logging
# Import salt libs
import salt.utils
from salt.exceptions import CommandExecutionError, SaltInvocationError
# Set up logger
log = logging.getLogger(__name__)
# Define a function alias in order... | 25.236923 | 123 | 0.560351 |
838c18bfe76cc35f5a07d12d31699dd724c16c5f | 401 | py | Python | boutique_ado/wsgi.py | hartnetl/boutique-ado-walkthrough | ef04eb4dae443d2df1bce7fbef9de8f628b58a0b | [
"MTLL"
] | null | null | null | boutique_ado/wsgi.py | hartnetl/boutique-ado-walkthrough | ef04eb4dae443d2df1bce7fbef9de8f628b58a0b | [
"MTLL"
] | null | null | null | boutique_ado/wsgi.py | hartnetl/boutique-ado-walkthrough | ef04eb4dae443d2df1bce7fbef9de8f628b58a0b | [
"MTLL"
] | null | null | null | """
WSGI config for boutique_ado project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
ee21bc6e6fd2da8342cd778b8e5411bafe8c05dd | 32,857 | py | Python | scripts/cloud-check-control/cloudAtlasCheckControl.py | Amon-Cyn/atlas-checks | ffe3d213a866b3fa5bba9d0950378d3aa818f646 | [
"BSD-3-Clause"
] | null | null | null | scripts/cloud-check-control/cloudAtlasCheckControl.py | Amon-Cyn/atlas-checks | ffe3d213a866b3fa5bba9d0950378d3aa818f646 | [
"BSD-3-Clause"
] | 9 | 2018-09-05T16:06:10.000Z | 2019-07-29T22:49:38.000Z | scripts/cloud-check-control/cloudAtlasCheckControl.py | Amon-Cyn/atlas-checks | ffe3d213a866b3fa5bba9d0950378d3aa818f646 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
execute atlas-checks on an EC2 instance
"""
import argparse
import logging
import os
import sys
import time
import boto3
import paramiko
import scp
from botocore.exceptions import ClientError
from paramiko.auth_handler import AuthenticationException
VERSION = "1.0.0... | 38.028935 | 110 | 0.575829 |
d68dd7c0448dc9a77e633b6c109fa88cc2883068 | 9,211 | py | Python | src/azure-cli/azure/cli/command_modules/appservice/_validators.py | nexxai/azure-cli | 3f24ada49f3323d9310d46ccc1025dc99fc4cf8e | [
"MIT"
] | 2 | 2020-08-08T11:00:25.000Z | 2020-08-08T11:00:30.000Z | src/azure-cli/azure/cli/command_modules/appservice/_validators.py | nexxai/azure-cli | 3f24ada49f3323d9310d46ccc1025dc99fc4cf8e | [
"MIT"
] | 1 | 2021-06-02T02:47:28.000Z | 2021-06-02T02:47:29.000Z | src/azure-cli/azure/cli/command_modules/appservice/_validators.py | nexxai/azure-cli | 3f24ada49f3323d9310d46ccc1025dc99fc4cf8e | [
"MIT"
] | 1 | 2020-09-07T18:44:14.000Z | 2020-09-07T18:44:14.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 44.713592 | 118 | 0.674194 |
fd96619a22323a6b64a70520c8c12ee482ceb87c | 4,396 | py | Python | tensortrade/oms/orders/broker.py | alexis-rodriguez/tensortrade | b9008c9becac3b46eb91796b4950d2fe5aa97cdf | [
"Apache-2.0"
] | null | null | null | tensortrade/oms/orders/broker.py | alexis-rodriguez/tensortrade | b9008c9becac3b46eb91796b4950d2fe5aa97cdf | [
"Apache-2.0"
] | null | null | null | tensortrade/oms/orders/broker.py | alexis-rodriguez/tensortrade | b9008c9becac3b46eb91796b4950d2fe5aa97cdf | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorTrade Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 33.052632 | 80 | 0.608508 |
e3887f019edc48b64c8a799e0cde890e95a2a1b1 | 4,238 | py | Python | files/default/hopsworks_auth/hopsworks_jwt_auth.py | tkakantousis/airflow-chef | 18b869b5b1b5a9323a605403923ce6bf1a26ff7a | [
"Apache-2.0"
] | null | null | null | files/default/hopsworks_auth/hopsworks_jwt_auth.py | tkakantousis/airflow-chef | 18b869b5b1b5a9323a605403923ce6bf1a26ff7a | [
"Apache-2.0"
] | null | null | null | files/default/hopsworks_auth/hopsworks_jwt_auth.py | tkakantousis/airflow-chef | 18b869b5b1b5a9323a605403923ce6bf1a26ff7a | [
"Apache-2.0"
] | null | null | null | import sys
import requests
import flask_login
from requests.auth import AuthBase
from flask_login import login_required, logout_user, current_user, UserMixin
from flask import flash, url_for, redirect, request, current_app
from airflow import models
from airflow import configuration
from airflow.configuration import... | 28.829932 | 81 | 0.677206 |
e6f4cdcb557272ca18b82c29953abf569bbcc10f | 9,711 | py | Python | source/conf.py | AENCO-Global/Chain-Docs | baa8f6328acb983e10749af56d6d54065ac60347 | [
"Apache-2.0"
] | null | null | null | source/conf.py | AENCO-Global/Chain-Docs | baa8f6328acb983e10749af56d6d54065ac60347 | [
"Apache-2.0"
] | null | null | null | source/conf.py | AENCO-Global/Chain-Docs | baa8f6328acb983e10749af56d6d54065ac60347 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# AEN-docs documentation build configuration file, created by
# sphinx-quickstart on Mon Dec 18 16:39:26 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 29.972222 | 82 | 0.664092 |
7d7a7567f81bc66381cb3461c3fb99277a3059d5 | 6,253 | py | Python | cogs/amongUs.py | ovandermeer/Pixels-bot | 2d0cf8617aa5b189168dcb6cf8ea0e3e3461e158 | [
"MIT"
] | 1 | 2021-04-30T04:32:08.000Z | 2021-04-30T04:32:08.000Z | cogs/amongUs.py | ovandermeer/Pixels-bot | 2d0cf8617aa5b189168dcb6cf8ea0e3e3461e158 | [
"MIT"
] | null | null | null | cogs/amongUs.py | ovandermeer/Pixels-bot | 2d0cf8617aa5b189168dcb6cf8ea0e3e3461e158 | [
"MIT"
] | 1 | 2021-06-26T13:13:19.000Z | 2021-06-26T13:13:19.000Z | import discord
from discord.ext import commands
import configparser
import sys
import logging
import PixelBotData.supportingFunctions as supportingFunctions
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
handlers=[
logging.FileHandler(f"debug-{supportingF... | 37.443114 | 142 | 0.56245 |
a36f64c2e4638e2a3f62d4b0db9467ee224ffdc4 | 2,988 | py | Python | tests/telephony/test_lowlevel.py | JesseVermeulen123/conducthotline.com | 4e854b94e62c64a89fb631afbcc56d07dcfb0828 | [
"Apache-2.0"
] | 23 | 2019-03-19T05:26:09.000Z | 2021-07-21T20:36:02.000Z | tests/telephony/test_lowlevel.py | JesseVermeulen123/conducthotline.com | 4e854b94e62c64a89fb631afbcc56d07dcfb0828 | [
"Apache-2.0"
] | 23 | 2019-03-29T02:41:11.000Z | 2021-04-30T20:45:47.000Z | tests/telephony/test_lowlevel.py | JesseVermeulen123/conducthotline.com | 4e854b94e62c64a89fb631afbcc56d07dcfb0828 | [
"Apache-2.0"
] | 10 | 2019-03-19T14:01:57.000Z | 2020-11-28T12:44:45.000Z | # Copyright 2019 Alethea Katherine Flowers
#
# 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 t... | 32.835165 | 87 | 0.690428 |
06638660481cdb3f0eda2019b3c76781dafcf423 | 2,204 | py | Python | TechTry/paramikoTest/paramiko-test1.py | yangdaodao92/common-tools | a1d90c7666b50306646ce24ec2c87115876079cb | [
"Apache-2.0"
] | null | null | null | TechTry/paramikoTest/paramiko-test1.py | yangdaodao92/common-tools | a1d90c7666b50306646ce24ec2c87115876079cb | [
"Apache-2.0"
] | null | null | null | TechTry/paramikoTest/paramiko-test1.py | yangdaodao92/common-tools | a1d90c7666b50306646ce24ec2c87115876079cb | [
"Apache-2.0"
] | null | null | null | import paramiko
import select
import re
import sys
import io
# interesting_line_pattern = re.compile('xxx')
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')
def do_tail():
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.AutoAddPoli... | 34.984127 | 82 | 0.579855 |
55b87b4bcf07ebc66a001cd15474932ea3e22975 | 14,651 | py | Python | qpython3/qconnection.py | gusutabopb/qPython3 | d194f742d5a8fd69e32c895435db595fc9e15a15 | [
"Apache-2.0"
] | null | null | null | qpython3/qconnection.py | gusutabopb/qPython3 | d194f742d5a8fd69e32c895435db595fc9e15a15 | [
"Apache-2.0"
] | null | null | null | qpython3/qconnection.py | gusutabopb/qPython3 | d194f742d5a8fd69e32c895435db595fc9e15a15 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2011-2014 Exxeleron GmbH
#
# 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... | 38.965426 | 113 | 0.592315 |
e7f0bc80c971961477cb3f7a6bbc6474b04b6ffd | 51,379 | py | Python | tensorflow_datasets/core/dataset_builder.py | Rishabh-Choudhry/datasets | 2bad427bba6cdcab717698a70c96339733c5d42c | [
"Apache-2.0"
] | 2 | 2022-02-14T09:51:39.000Z | 2022-02-14T13:27:49.000Z | tensorflow_datasets/core/dataset_builder.py | Rishabh-Choudhry/datasets | 2bad427bba6cdcab717698a70c96339733c5d42c | [
"Apache-2.0"
] | null | null | null | tensorflow_datasets/core/dataset_builder.py | Rishabh-Choudhry/datasets | 2bad427bba6cdcab717698a70c96339733c5d42c | [
"Apache-2.0"
] | 1 | 2020-12-13T22:11:33.000Z | 2020-12-13T22:11:33.000Z | # coding=utf-8
# Copyright 2022 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 39.859581 | 126 | 0.697503 |
09ed425547e12c87429922399edc602039d22ce9 | 11,428 | py | Python | airflow/executors/celery_executor.py | ltxhxpdd123/gateway-airflow | b839509d21a985c7a46fb5c6d54a4b77f1bbc4ae | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-07-07T13:42:38.000Z | 2021-07-07T13:42:38.000Z | airflow/executors/celery_executor.py | eilifm/airflow | 781a82f6389e10f1ad3845d820d36515644e79a9 | [
"Apache-2.0"
] | 6 | 2020-07-07T20:21:26.000Z | 2021-09-29T17:29:29.000Z | airflow/executors/celery_executor.py | eilifm/airflow | 781a82f6389e10f1ad3845d820d36515644e79a9 | [
"Apache-2.0"
] | 1 | 2020-01-24T00:20:15.000Z | 2020-01-24T00:20:15.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 37.716172 | 100 | 0.630907 |
f1081412fbcd987368fbf35f6a71afe7c8596b03 | 4,363 | py | Python | unit_test/daemonconfig_test.py | AYCS/bigitr | 6beefbe79fab887c4ef60e0dd7fa39bca61a22cc | [
"Apache-2.0"
] | 3 | 2016-07-19T07:54:27.000Z | 2021-09-13T08:25:20.000Z | unit_test/daemonconfig_test.py | AYCS/bigitr | 6beefbe79fab887c4ef60e0dd7fa39bca61a22cc | [
"Apache-2.0"
] | 1 | 2016-02-03T14:17:47.000Z | 2016-02-03T15:22:20.000Z | unit_test/daemonconfig_test.py | mikjo/bigitr | 6beefbe79fab887c4ef60e0dd7fa39bca61a22cc | [
"Apache-2.0"
] | 4 | 2015-05-04T10:03:06.000Z | 2020-10-22T04:46:38.000Z | #
# Copyright 2012 SAS Institute
#
# 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 ... | 38.27193 | 80 | 0.655971 |
232565ab439d430cd40b5047c41845c7c15fd88c | 1,626 | py | Python | funcao4.py | lucaspompeun/metodos-matematicos-aplicados-nas-engenharias-via-sistemas-computacionais | 008d397f76a935af1aba530cc0134b9dd326d3ac | [
"MIT"
] | 16 | 2019-09-27T03:08:44.000Z | 2020-10-16T18:43:45.000Z | primeira-edicao/funcao4.py | gm2sc-ifpa/metodos-matematicos-aplicados-nas-engenharias-via-sistemas-computacionais-master | f435c366e08dc14b0557f2172ad3b841ddb7ef2e | [
"MIT"
] | null | null | null | primeira-edicao/funcao4.py | gm2sc-ifpa/metodos-matematicos-aplicados-nas-engenharias-via-sistemas-computacionais-master | f435c366e08dc14b0557f2172ad3b841ddb7ef2e | [
"MIT"
] | 5 | 2019-09-13T20:00:38.000Z | 2020-09-19T03:04:00.000Z | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 20 15:50:09 2019
INSTITUTO FEDERAL DE EDUCAÇÃO, CIÊNCIA E TECNOLOGIA DO PÁRA - IFPA ANANINDEUA
@author:
Prof. Dr. Denis C. L. Costa
Discentes:
Heictor Alves de Oliveira Costa
Lucas Pompeu Neves
Grupo... | 23.911765 | 78 | 0.608856 |
73616bf84357d9fe1135967af4ca8fbbb8360dfb | 4,075 | py | Python | pywps/inout/storage/file.py | janpisl/pywps | 73a1835359f0503e08fb007d75de699bf3cf29ed | [
"MIT"
] | null | null | null | pywps/inout/storage/file.py | janpisl/pywps | 73a1835359f0503e08fb007d75de699bf3cf29ed | [
"MIT"
] | null | null | null | pywps/inout/storage/file.py | janpisl/pywps | 73a1835359f0503e08fb007d75de699bf3cf29ed | [
"MIT"
] | null | null | null | ##################################################################
# Copyright 2018 Open Source Geospatial Foundation and others #
# licensed under MIT, Please consult LICENSE.txt for details #
##################################################################
import logging
import os
from pywps._compat ... | 35.745614 | 117 | 0.595337 |
1b3aadc177e6447d47512565e56410028b799647 | 18,087 | py | Python | data/rainbow/script1/20210221-142149/script1.py | lbaiao/sys-simulator-2 | 94f00d43309fe7b56dac5099bd4024695ba317b6 | [
"MIT"
] | 1 | 2020-06-14T13:50:28.000Z | 2020-06-14T13:50:28.000Z | data/rainbow/script1/20210221-142149/script1.py | lbaiao/sys-simulator-2 | 94f00d43309fe7b56dac5099bd4024695ba317b6 | [
"MIT"
] | null | null | null | data/rainbow/script1/20210221-142149/script1.py | lbaiao/sys-simulator-2 | 94f00d43309fe7b56dac5099bd4024695ba317b6 | [
"MIT"
] | null | null | null | # Similar to script .
# Uses CompleteEnvironment10dB
# Centralized Learning-Distributed Execution
# Simulates many times, for different number of agents, and take the averages.
# There are different channels to the BS and to the devices.
# Multiple episodes convergence. Everything is in dB.
# One NN is trained and copi... | 36.174 | 94 | 0.643998 |
71a75f01512cc0dafd36637b8e11efc3cbc99b29 | 283 | py | Python | preprocess_web/code/ravens_metadata_apps/dataverse_connect/dv_constants.py | TwoRavens/raven-metadata-service | 9461522219f5ef0f4877f24c8f5923e462bd9557 | [
"Apache-2.0"
] | null | null | null | preprocess_web/code/ravens_metadata_apps/dataverse_connect/dv_constants.py | TwoRavens/raven-metadata-service | 9461522219f5ef0f4877f24c8f5923e462bd9557 | [
"Apache-2.0"
] | 103 | 2018-03-13T20:43:59.000Z | 2021-02-06T19:27:16.000Z | preprocess_web/code/ravens_metadata_apps/dataverse_connect/dv_constants.py | TwoRavens/raven-metadata-service | 9461522219f5ef0f4877f24c8f5923e462bd9557 | [
"Apache-2.0"
] | 1 | 2019-09-11T22:36:14.000Z | 2019-09-11T22:36:14.000Z | """Used when working with Dataverse"""
# https://dataverse.harvard.edu/file.xhtml?fileId=3135445&version=RELEASED&version=.0
#
KEY_DATAVERSE_FILE_ID = 'fileId'
KEY_DATAVERSE_FILE_VERSION = 'version'
PATH_DATAFILE_ACCESS = '/api/access/datafile/'
PATH_DATAFILE_PAGE = '/file.xhtml'
| 28.3 | 85 | 0.780919 |
96b803a4952e98b85ece87bccc66c4f444d42cd3 | 880 | py | Python | poseidon/dags/sde/gp_land_use_dags.py | panda-tech/poseidon-airflow | bce5bc02b55f15330635a436056d99acb93488ef | [
"Apache-2.0"
] | null | null | null | poseidon/dags/sde/gp_land_use_dags.py | panda-tech/poseidon-airflow | bce5bc02b55f15330635a436056d99acb93488ef | [
"Apache-2.0"
] | null | null | null | poseidon/dags/sde/gp_land_use_dags.py | panda-tech/poseidon-airflow | bce5bc02b55f15330635a436056d99acb93488ef | [
"Apache-2.0"
] | null | null | null | """_dags file for 'general plan land use' sde extraction."""
from airflow.models import DAG
from trident.util import general
from dags.sde.gp_land_use_jobs import sde_to_shp
from trident.util.sde_extract_tasks import create_sde_tasks
args = general.args
conf = general.config
schedule = general.schedule['gis_weekly']
... | 26.666667 | 60 | 0.740909 |
ee86a589602346dd5e084c255b576cf0d16438c9 | 2,020 | py | Python | azure-batch/azure/batch/models/output_file_blob_container_destination.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | null | null | null | azure-batch/azure/batch/models/output_file_blob_container_destination.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | 1 | 2018-11-29T14:46:42.000Z | 2018-11-29T14:46:42.000Z | azure-batch/azure/batch/models/output_file_blob_container_destination.py | NMijat1024/azure-sdk-for-python | c49e1d6d797dceaca81813cafb1a486d67185182 | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.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 ... | 42.083333 | 82 | 0.65495 |
8b21bd43e2d9ae30ea9d5e0c9bc4db366bd9adca | 8,458 | py | Python | kubernetes/client/models/io_xk8s_cluster_controlplane_v1alpha3_aws_managed_control_plane_spec_addons.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/io_xk8s_cluster_controlplane_v1alpha3_aws_managed_control_plane_spec_addons.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/io_xk8s_cluster_controlplane_v1alpha3_aws_managed_control_plane_spec_addons.py | mariusgheorghies/python | 68ac7e168963d8b5a81dc493b1973d29e903a15b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.20.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
fr... | 38.798165 | 158 | 0.672618 |
c1d6b2a8b00321caeba3fde4d6203444cd4fe282 | 582 | py | Python | code/pgms/reverse-int.py | souradeepta/PythonPractice | fa956ca4b87a0eb92fee21fa78e59757ce665770 | [
"MIT"
] | null | null | null | code/pgms/reverse-int.py | souradeepta/PythonPractice | fa956ca4b87a0eb92fee21fa78e59757ce665770 | [
"MIT"
] | 4 | 2021-03-19T02:04:20.000Z | 2021-09-22T18:54:16.000Z | code/pgms/reverse-int.py | souradeepta/PythonPractice | fa956ca4b87a0eb92fee21fa78e59757ce665770 | [
"MIT"
] | null | null | null | def reverse(x: int) -> int:
INT_MAX = 2**32-1
INT_MIN = -2**32
ans = 0
neg_sign = False
if x < 0:
neg_sign = True
x_abs = abs(x)
while x_abs > 0:
rem = x_abs % 10
quo = x_abs //10
ans = ans*10 + rem
x_abs = quo
if neg_sign == True:
... | 19.4 | 45 | 0.517182 |
0ee7f27a64c013a0f6c76e6a0ca83c6fb4a68725 | 141 | py | Python | PythonCode/1096.py | CrystianPrintes20/ProjetoUri | 92a88ae2671a556f4d418c3605e9a2c6933dc9d8 | [
"MIT"
] | null | null | null | PythonCode/1096.py | CrystianPrintes20/ProjetoUri | 92a88ae2671a556f4d418c3605e9a2c6933dc9d8 | [
"MIT"
] | null | null | null | PythonCode/1096.py | CrystianPrintes20/ProjetoUri | 92a88ae2671a556f4d418c3605e9a2c6933dc9d8 | [
"MIT"
] | null | null | null | j = 5
for i in range(1,10,2):
print('I={} J={}'.format(i, j+2))
print('I={} J={}'.format(i, j+1))
print('I={} J={}'.format(i, j)) | 28.2 | 37 | 0.453901 |
2336258913cdae3881e4328795163527fd883de2 | 2,734 | py | Python | 06/LaborSupplyModel.py | AskerNC/lectures-2021 | d152450b2fee7be775892dde1a467639aa5e35ea | [
"MIT"
] | 9 | 2020-11-30T22:25:38.000Z | 2021-10-05T12:17:11.000Z | 06/LaborSupplyModel.py | AskerNC/lectures-2021 | d152450b2fee7be775892dde1a467639aa5e35ea | [
"MIT"
] | 1 | 2021-04-12T14:15:49.000Z | 2021-04-12T15:03:55.000Z | 06/LaborSupplyModel.py | AskerNC/lectures-2021 | d152450b2fee7be775892dde1a467639aa5e35ea | [
"MIT"
] | 30 | 2021-02-08T16:18:01.000Z | 2022-02-05T17:02:35.000Z | import numpy as np
from scipy import optimize
def implied_tax(l,w,tau0,tau1,kappa):
""" calculate implied tax of labor supply choice
Args:
l (float): labor supply
w (float): wage
tau0 (float): standard labor tax
tau1 (float): top bracket labor income tax
kappa ... | 25.792453 | 72 | 0.581931 |
f802c4f1eaa3b7681922ca206ccdc6f84fbdb934 | 1,483 | py | Python | azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-alertsmanagement/azure/mgmt/alertsmanagement/models/alerts_summary_group_item_py3.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 35.309524 | 111 | 0.590695 |
b8b019d929441b29cf4500e6739b09e722793f0c | 58 | py | Python | ncbitax2lin/__init__.py | zyxue/ncbitax2lin | 95dc13f6a8ef9a18b5569b877f7f2c2cce068412 | [
"MIT"
] | 103 | 2016-11-05T19:47:03.000Z | 2022-01-13T00:47:16.000Z | ncbitax2lin/__init__.py | zyxue/ncbitax2lin | 95dc13f6a8ef9a18b5569b877f7f2c2cce068412 | [
"MIT"
] | 14 | 2017-02-28T20:56:41.000Z | 2022-03-20T18:58:05.000Z | ncbitax2lin/__init__.py | zyxue/ncbitax2lin | 95dc13f6a8ef9a18b5569b877f7f2c2cce068412 | [
"MIT"
] | 21 | 2017-05-16T08:44:47.000Z | 2021-11-12T03:31:19.000Z | """__init__.py for this project"""
__version__ = "2.0.2"
| 14.5 | 34 | 0.655172 |
c39cdbb652276c4758a41495a383938f6ae233f9 | 15,432 | py | Python | ceilometer/tests/api/v2/test_post_samples_scenarios.py | orbitfp7/ceilometer | 9905da14bbdf06f95e1e056c9ca0e18087214d0f | [
"Apache-2.0"
] | 2 | 2015-09-07T09:15:26.000Z | 2015-09-30T02:13:23.000Z | ceilometer/tests/api/v2/test_post_samples_scenarios.py | orbitfp7/ceilometer | 9905da14bbdf06f95e1e056c9ca0e18087214d0f | [
"Apache-2.0"
] | null | null | null | ceilometer/tests/api/v2/test_post_samples_scenarios.py | orbitfp7/ceilometer | 9905da14bbdf06f95e1e056c9ca0e18087214d0f | [
"Apache-2.0"
] | 1 | 2019-09-16T02:11:41.000Z | 2019-09-16T02:11:41.000Z | #
# Copyright 2013 Red Hat, Inc
#
# Author: Angus Salkeld <asalkeld@redhat.com>
#
# 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 ... | 43.965812 | 77 | 0.535122 |
15fcd117778f71c5751ce72b2574af9e2850a778 | 3,309 | py | Python | unit/api/spellcheck/test_spell_checker.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-05-10T16:49:27.000Z | 2022-03-29T15:23:04.000Z | unit/api/spellcheck/test_spell_checker.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 2 | 2018-09-20T06:37:27.000Z | 2018-11-12T12:05:08.000Z | unit/api/spellcheck/test_spell_checker.py | flaxandteal/dp-conceptual-search | 16c6383a61ba5b7069337c2626a0dc243bfe9d35 | [
"MIT"
] | 3 | 2018-06-25T10:48:43.000Z | 2021-04-11T08:01:27.000Z | """
Tests the spellcheck spell checker API
"""
from unit.utils.search_test_app import SearchTestApp
class SpellCheckTestCase(SearchTestApp):
@property
def sample_words(self) -> dict:
"""
Returns a set of words to be used for testing, with their corrections
:return:
"""
... | 35.967391 | 116 | 0.581142 |
c76e92cb66ff615baf6fa93f979987cb9cb2e371 | 6,932 | py | Python | netbox_loadtest.py | jjmanzer/netbox-loadtest | a32eb7953dfd9936dfbddd9705127d1d9b69805a | [
"MIT"
] | null | null | null | netbox_loadtest.py | jjmanzer/netbox-loadtest | a32eb7953dfd9936dfbddd9705127d1d9b69805a | [
"MIT"
] | null | null | null | netbox_loadtest.py | jjmanzer/netbox-loadtest | a32eb7953dfd9936dfbddd9705127d1d9b69805a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Test the netbox API by running a set of scenarios at it designed to show how netbox responds to heavy load.
1. Allocate addresses using get next free logic, then deallocate those addresses.
2. Randomly grab addresses, then deallocate them in that order.
3. Use get next free address logic in... | 33.167464 | 110 | 0.641085 |
cebbc235f7e121066802d55952bc32c0962500fc | 2,024 | py | Python | pbx_gs_python_utils/utils/Save_To_ELK.py | owasp-sbot/pbx-gs-python-utils | f448aa36c4448fc04d30c3a5b25640ea4d44a267 | [
"Apache-2.0"
] | 3 | 2018-12-14T15:43:46.000Z | 2019-04-25T07:44:58.000Z | pbx_gs_python_utils/utils/Save_To_ELK.py | owasp-sbot/pbx-gs-python-utils | f448aa36c4448fc04d30c3a5b25640ea4d44a267 | [
"Apache-2.0"
] | 1 | 2019-05-11T14:19:37.000Z | 2019-05-11T14:51:04.000Z | pbx_gs_python_utils/utils/Save_To_ELK.py | owasp-sbot/pbx-gs-python-utils | f448aa36c4448fc04d30c3a5b25640ea4d44a267 | [
"Apache-2.0"
] | 4 | 2018-12-27T04:54:14.000Z | 2019-05-11T14:07:47.000Z | import datetime
from pbx_gs_python_utils.utils.Elastic_Search import Elastic_Search
class Save_To_ELK():
def __init__(self, index = None):
if index is None:
index = 'save_to_elk'
self.secret_id = 'elastic-logs-server-1'
self.elastic = self.setup(index)
def add_document(... | 38.188679 | 200 | 0.666996 |
bce3c004c49ce78496a716705c106be8f2c98a68 | 729 | py | Python | pelote/classes/incremental_id_register.py | medialab/pelote | cef80daeb19ef2fef73f8a1fcfc8477aa11bfb9a | [
"MIT"
] | 2 | 2022-03-07T20:00:10.000Z | 2022-03-21T12:36:58.000Z | pelote/classes/incremental_id_register.py | medialab/pelote | cef80daeb19ef2fef73f8a1fcfc8477aa11bfb9a | [
"MIT"
] | 55 | 2022-03-02T16:19:30.000Z | 2022-03-31T12:44:05.000Z | pelote/classes/incremental_id_register.py | medialab/pelote | cef80daeb19ef2fef73f8a1fcfc8477aa11bfb9a | [
"MIT"
] | null | null | null | # =============================================================================
# Pelote Incremental Id Register Class
# =============================================================================
#
from typing import Generic, TypeVar, Dict
K = TypeVar("K")
class IncrementalIdRegister(Generic[K]):
"""
Help... | 26.035714 | 79 | 0.475995 |
981799ed2c4a40961e9219ea4a833b390bc4b730 | 10,391 | py | Python | trdg/data_generator.py | Kankroc/TextRecognitionDataGenerator | da8a40f6f0995975dd416f3e761cf5e8c48df1cb | [
"MIT"
] | 1 | 2017-07-17T03:57:06.000Z | 2017-07-17T03:57:06.000Z | trdg/data_generator.py | Kankroc/TextRecognitionDataGenerator | da8a40f6f0995975dd416f3e761cf5e8c48df1cb | [
"MIT"
] | null | null | null | trdg/data_generator.py | Kankroc/TextRecognitionDataGenerator | da8a40f6f0995975dd416f3e761cf5e8c48df1cb | [
"MIT"
] | null | null | null | import os
import random as rnd
from PIL import Image, ImageFilter, ImageStat
from trdg import computer_text_generator, background_generator, distorsion_generator
from trdg.utils import mask_to_bboxes
try:
from trdg import handwritten_text_generator
except ImportError as e:
print("Missing modules for handwrit... | 36.205575 | 100 | 0.523049 |
137f062e1360399bf7af091125db3d9e31a34170 | 1,219 | py | Python | tests/molecular/writers/mdl_mol/conftest.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/writers/mdl_mol/conftest.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | tests/molecular/writers/mdl_mol/conftest.py | stevenbennett96/stk | 6e5af87625b83e0bfc7243bc42d8c7a860cbeb76 | [
"MIT"
] | null | null | null | import pytest
import stk
from .case_data import CaseData
@pytest.fixture(
scope='session',
params=(
lambda: CaseData(
molecule=stk.BuildingBlock('BrCCBr', [stk.BromoFactory()]),
writer=stk.MolWriter(),
string=(
'\n RDKit 3D\n\n 0 0 ... | 35.852941 | 71 | 0.480722 |
ce241199e6818046b152b476b14447abddbab28a | 1,431 | py | Python | eutils/xmlfacades/esearchresult.py | pmartin23/eutils | 9cd8f30a628b6d7a12b8b2a7b99c2a3e7531dd89 | [
"Apache-2.0"
] | null | null | null | eutils/xmlfacades/esearchresult.py | pmartin23/eutils | 9cd8f30a628b6d7a12b8b2a7b99c2a3e7531dd89 | [
"Apache-2.0"
] | null | null | null | eutils/xmlfacades/esearchresult.py | pmartin23/eutils | 9cd8f30a628b6d7a12b8b2a7b99c2a3e7531dd89 | [
"Apache-2.0"
] | 1 | 2018-10-08T16:34:55.000Z | 2018-10-08T16:34:55.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import lxml.etree
from eutils.exceptions import *
from eutils.xmlfacades.base import Base
class ESearchResult(Base):
_root_tag = 'eSearchResult'
@property
def count(self):
return int(sel... | 26.5 | 90 | 0.698812 |
7b37b9d0a70d7f7f924c4ed6459835fe0afb2fee | 14,856 | py | Python | Assignment3_regularization.py | Eni-H/Udacity-DeepLearning | e384ecae234ef7488adeb2b814a709a1bc22595f | [
"MIT"
] | null | null | null | Assignment3_regularization.py | Eni-H/Udacity-DeepLearning | e384ecae234ef7488adeb2b814a709a1bc22595f | [
"MIT"
] | null | null | null | Assignment3_regularization.py | Eni-H/Udacity-DeepLearning | e384ecae234ef7488adeb2b814a709a1bc22595f | [
"MIT"
] | null | null | null | # These are all the modules we'll be using later. Make sure you can import them
# before proceeding further.
from __future__ import print_function
import numpy as np
import tensorflow.compat.v1 as tf
from six.moves import cPickle as pickle
# Some personnal imports
import matplotlib.pyplot as plt
tf.disable_eager_execut... | 46.425 | 147 | 0.713314 |
90e961770ff07c1af97730101c9faa1d692818f8 | 5,624 | py | Python | tests/test_pass_defunctionalization.py | anonymousWork000/TVMfuzz | 0ccbb33af89758b8ead59a8c686645246ccd0545 | [
"Apache-2.0"
] | 16 | 2021-05-22T07:39:53.000Z | 2022-02-23T14:50:38.000Z | tests/test_pass_defunctionalization.py | anonymousWork000/TVMfuzz | 0ccbb33af89758b8ead59a8c686645246ccd0545 | [
"Apache-2.0"
] | null | null | null | tests/test_pass_defunctionalization.py | anonymousWork000/TVMfuzz | 0ccbb33af89758b8ead59a8c686645246ccd0545 | [
"Apache-2.0"
] | 3 | 2021-05-28T07:12:14.000Z | 2021-11-28T02:10:48.000Z | import pytest
import numpy as np
import tvm
from tvm import relay
from tvm.relay.backend.interpreter import ConstructorValue
from tvm.relay import transform, ExprVisitor, TypeVisitor
from tvm.relay.testing import Prelude
# determine if type t is a FuncType or has a nested FuncType
def has_func_type(t):
class Func... | 26.403756 | 85 | 0.613087 |
fdef4e9e812f7db547f3f6942d0735f7f7aec774 | 1,134 | py | Python | setup.py | radimsuckr/django-is-core | 72edb572c24baef5049d29b99bafacf124bfccbe | [
"BSD-3-Clause"
] | null | null | null | setup.py | radimsuckr/django-is-core | 72edb572c24baef5049d29b99bafacf124bfccbe | [
"BSD-3-Clause"
] | null | null | null | setup.py | radimsuckr/django-is-core | 72edb572c24baef5049d29b99bafacf124bfccbe | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
from is_core.version import get_version
setup(
name='django-is-core',
version=get_version(),
description="Information systems core.",
keywords='django, admin, information systems, REST',
author='Lubos Matl',
author_email='matllubos@gmail.com',
ur... | 29.076923 | 56 | 0.601411 |
f2d7c528b8daaa56c0375a39f2056d9accd50398 | 2,953 | py | Python | tests/integration/test_vagrant.py | Nightfurex/build-magic | ed6c5e36cd98a760a9cc1939589833722126e088 | [
"MIT"
] | 10 | 2020-12-11T07:33:32.000Z | 2022-03-27T20:48:12.000Z | tests/integration/test_vagrant.py | Nightfurex/build-magic | ed6c5e36cd98a760a9cc1939589833722126e088 | [
"MIT"
] | 89 | 2021-03-31T06:48:11.000Z | 2022-03-23T02:17:17.000Z | tests/integration/test_vagrant.py | Nightfurex/build-magic | ed6c5e36cd98a760a9cc1939589833722126e088 | [
"MIT"
] | 3 | 2021-06-14T20:15:04.000Z | 2022-02-10T18:20:28.000Z | """Integration tests for the Vagrant CommandRunner."""
from pathlib import Path
import shutil
import subprocess
import pytest
from build_magic.reference import ExitCode
@pytest.mark.vagrant
def test_wd(cli):
"""Verify setting the working directory works correctly."""
path = Path(__file__).parent
res = ... | 32.097826 | 80 | 0.623434 |
2f85a7bc112dbe465c144c44b4fab52fdfbee543 | 302 | py | Python | 301-400/390.elimination-game.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 301-400/390.elimination-game.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | 301-400/390.elimination-game.py | guangxu-li/leetcode-in-python | 8a5a373b32351500342705c141591a1a8f5f1cb1 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=390 lang=python3
#
# [390] Elimination Game
#
# @lc code=start
class Solution:
def lastRemaining(self, n: int) -> int:
# 1 + n // 2 for rem of reverse order delete
return 1 if n == 1 else 2 * (1 + n // 2 - self.lastRemaining(n // 2))
# @lc code=end
| 23.230769 | 85 | 0.576159 |
d56002dae3474e5ce5ba22cb1b443933f806b422 | 5,485 | py | Python | control/base.py | ligulfzhou/PyBaseProject | 47924bc35e23857f0d577809f433e4ac1ce3252d | [
"MIT"
] | 2 | 2018-12-31T06:07:48.000Z | 2019-02-19T09:00:38.000Z | control/base.py | ligulfzhou/PyBaseProject | 47924bc35e23857f0d577809f433e4ac1ce3252d | [
"MIT"
] | null | null | null | control/base.py | ligulfzhou/PyBaseProject | 47924bc35e23857f0d577809f433e4ac1ce3252d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pdb
import json
import random
import pickle
import datetime
import logging
import hashlib
from copy import deepcopy
from decimal import Decimal
from tornado import gen
from lib import utils
from settings import A_DAY
from tornado.gen import coroutine
from tornado.op... | 33.858025 | 121 | 0.616591 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.