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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ff8153889ffe5a04a405045d9fb2a4fe1a5d6117 | 1,006 | py | Python | courses/MITx 6.00.1x/ps4/ps4dev-2.py | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | courses/MITx 6.00.1x/ps4/ps4dev-2.py | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | courses/MITx 6.00.1x/ps4/ps4dev-2.py | NomikOS/learning | 268f94605214f6861ef476ca7573e68c068ccbe5 | [
"Unlicense"
] | null | null | null | from ps4a import *
def updateHand(hand, word):
"""
Assumes that 'hand' has all the letters in word.
In other words, this assumes that however many times
a letter appears in 'word', 'hand' has at least as
many of that letter in it.
Updates the hand: uses up the letters in the given word
a... | 27.189189 | 64 | 0.596421 |
c81e47a73e627151029a4717db4ca2f81a32f314 | 756 | py | Python | forums/migrations/0003_auto_20211128_0937.py | bhokin/ThaiMoung | afac52ad1fefe2c78b6d69b2b08c63aee699ee20 | [
"MIT"
] | 1 | 2022-02-13T04:31:00.000Z | 2022-02-13T04:31:00.000Z | forums/migrations/0003_auto_20211128_0937.py | XOQDY/ThaiMoung | afac52ad1fefe2c78b6d69b2b08c63aee699ee20 | [
"MIT"
] | 40 | 2021-10-13T07:30:30.000Z | 2022-01-30T08:24:14.000Z | forums/migrations/0003_auto_20211128_0937.py | XOQDY/ThaiMoung | afac52ad1fefe2c78b6d69b2b08c63aee699ee20 | [
"MIT"
] | 3 | 2021-10-31T17:58:58.000Z | 2021-11-12T17:05:14.000Z | # Generated by Django 3.2.8 on 2021-11-28 02:37
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('forums', '0002_auto_20211128_0754'),
]
operation... | 29.076923 | 113 | 0.646825 |
82a2c134032549d8c116b888fd9405744409f68b | 5,731 | py | Python | pypureclient/flasharray/FA_2_10/models/remote_protection_group_snapshot_post.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 14 | 2018-12-07T18:30:27.000Z | 2022-02-22T09:12:33.000Z | pypureclient/flasharray/FA_2_10/models/remote_protection_group_snapshot_post.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 28 | 2019-09-17T21:03:52.000Z | 2022-03-29T22:07:35.000Z | pypureclient/flasharray/FA_2_10/models/remote_protection_group_snapshot_post.py | Flav-STOR-WL/py-pure-client | 03b889c997d90380ac5d6380ca5d5432792d3e89 | [
"BSD-2-Clause"
] | 15 | 2020-06-11T15:50:08.000Z | 2022-03-21T09:27:25.000Z | # coding: utf-8
"""
FlashArray REST API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.10
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re
import six
import typing
from ... | 35.81875 | 424 | 0.584889 |
4bcc68098ab6bc14648b6581b197bb4c15a342a4 | 2,428 | py | Python | irim/core/irim.py | pputzky/invertible_rim | 91c6659475b80d6f0a451448a0b6156fcfbecce4 | [
"MIT"
] | 31 | 2019-11-27T03:40:23.000Z | 2022-02-26T10:49:34.000Z | irim/core/irim.py | pputzky/invertible_rim | 91c6659475b80d6f0a451448a0b6156fcfbecce4 | [
"MIT"
] | null | null | null | irim/core/irim.py | pputzky/invertible_rim | 91c6659475b80d6f0a451448a0b6156fcfbecce4 | [
"MIT"
] | 8 | 2020-04-05T10:21:01.000Z | 2021-10-06T07:49:57.000Z | import torch
from irim.core.invert_to_learn import InvertibleLayer, InvertibleModule
class IRIM(InvertibleModule):
def __init__(self, rnn, grad_fun, n_channels=1):
super(IRIM, self).__init__()
self.rnn = rnn
self.grad_fun = InvertibleGradUpdate(grad_fun, n_channels)
def forward(self, ... | 35.188406 | 117 | 0.568781 |
687dd89a016819f91a2abbcdd1e027fadda9e507 | 2,137 | py | Python | twill_util.py | hasahmed/Twill | 1f330c07306524b5b7dc3d7509e7fcb855062667 | [
"MIT"
] | null | null | null | twill_util.py | hasahmed/Twill | 1f330c07306524b5b7dc3d7509e7fcb855062667 | [
"MIT"
] | null | null | null | twill_util.py | hasahmed/Twill | 1f330c07306524b5b7dc3d7509e7fcb855062667 | [
"MIT"
] | null | null | null | import os
class Util():
def __init__(self):
self._twitter_auth_file = os.path.join(os.path.expanduser("~"), ".twitter_auth")
def key_value_parser(self, file_contents):
'''
Returns a dictionary representation of file contents that are in the format `key : value`.
Is used in API ... | 36.844828 | 117 | 0.618156 |
80b1377021e3c1220a1fa969b267d9c6c3e64341 | 1,178 | py | Python | src/lambdaplatform/tasks/image_tagger.py | schlarpc/lambdaplatform | 0f58174bf156cdfd03302b6beef998c24b5d0654 | [
"MIT"
] | 4 | 2021-07-14T23:09:59.000Z | 2021-08-07T02:33:34.000Z | src/lambdaplatform/tasks/image_tagger.py | schlarpc/lambdaplatform | 0f58174bf156cdfd03302b6beef998c24b5d0654 | [
"MIT"
] | null | null | null | src/lambdaplatform/tasks/image_tagger.py | schlarpc/lambdaplatform | 0f58174bf156cdfd03302b6beef998c24b5d0654 | [
"MIT"
] | null | null | null | import boto3
from . import common
def handler(event):
with common.cloudformation_custom_resource(event) as resource:
if event["RequestType"] in {"Create", "Update"}:
ecr = boto3.client("ecr")
response = ecr.batch_get_image(
repositoryName=event["ResourceProperties"... | 35.69697 | 82 | 0.504244 |
596ec846b6620a4d80178b7253f47a3d1d290f5b | 9,750 | py | Python | eim/models/base.py | ziqri11/google-research | 5f4fa9b98e9c86f2cb72411675287b46988283b8 | [
"Apache-2.0"
] | 4 | 2020-02-04T16:23:45.000Z | 2021-08-30T11:56:01.000Z | eim/models/base.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 10 | 2020-09-26T00:19:12.000Z | 2022-03-12T00:04:29.000Z | eim/models/base.py | RubensZimbres/google-research | 562c7c6ef959cb3cb382b1b660ccc45e8f5289c4 | [
"Apache-2.0"
] | 2 | 2019-12-07T19:01:03.000Z | 2020-03-19T16:53:04.000Z | # coding=utf-8
# Copyright 2019 The Google Research 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 applicab... | 36.516854 | 80 | 0.654462 |
12bf055d39feca6077f0b287c3f407b78de42746 | 142 | py | Python | media/apps.py | monginadiana/My-gallery | aa5f80e73491a27ea965ec5cffd4f2c91ae4c7e5 | [
"MIT"
] | 1 | 2021-12-23T12:43:17.000Z | 2021-12-23T12:43:17.000Z | media/apps.py | monginadiana/My-gallery | aa5f80e73491a27ea965ec5cffd4f2c91ae4c7e5 | [
"MIT"
] | null | null | null | media/apps.py | monginadiana/My-gallery | aa5f80e73491a27ea965ec5cffd4f2c91ae4c7e5 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MediaConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'media'
| 20.285714 | 56 | 0.753521 |
0f94e8f15b7ee58d8487fa54a26233f81e14d6a3 | 5,895 | py | Python | migration/20170713-13-move-authentication-configuration-to-external-integrations.py | datalogics/circulation | a4767404a63dd034d101e6ee76f824626e5d5269 | [
"Apache-2.0"
] | null | null | null | migration/20170713-13-move-authentication-configuration-to-external-integrations.py | datalogics/circulation | a4767404a63dd034d101e6ee76f824626e5d5269 | [
"Apache-2.0"
] | 6 | 2016-10-25T14:55:39.000Z | 2017-10-09T15:37:03.000Z | migration/20170713-13-move-authentication-configuration-to-external-integrations.py | datalogics/circulation | a4767404a63dd034d101e6ee76f824626e5d5269 | [
"Apache-2.0"
] | 2 | 2016-09-29T16:28:14.000Z | 2021-08-04T12:28:21.000Z | #!/usr/bin/env python
"""Move authentication integration details from the Configuration file
into the database as ExternalIntegrations
"""
import os
import sys
import json
import logging
from nose.tools import set_trace
bin_dir = os.path.split(__file__)[0]
package_dir = os.path.join(bin_dir, "..")
sys.path.append(os.p... | 38.279221 | 118 | 0.736047 |
177ae1de183bc4b3148bd41cd325c0d7420368e1 | 2,185 | py | Python | main.py | ItsThompson/BetterEcosiaSearch | 5ff892e900590815e25e4e0dc0270bad1ce2c079 | [
"MIT"
] | 1 | 2020-10-20T19:15:56.000Z | 2020-10-20T19:15:56.000Z | main.py | ItsThompson/BetterEcosiaSearch | 5ff892e900590815e25e4e0dc0270bad1ce2c079 | [
"MIT"
] | null | null | null | main.py | ItsThompson/BetterEcosiaSearch | 5ff892e900590815e25e4e0dc0270bad1ce2c079 | [
"MIT"
] | null | null | null | import time
import json
import random
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
class EcosiaSearch():
# Recommended wait: 2 seconds
def __init__(self, wait):
self.bot = webdriver.Chrome()
self.wait = wait
self.search_list = ["facebook", "youtube", "a... | 47.5 | 102 | 0.569794 |
ca701ec20579612c901ad113f80e054b73c579eb | 608 | py | Python | tasks/filesystem.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | tasks/filesystem.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | tasks/filesystem.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# type: ignore
# copyright: (c) 2020 by Jesse Johnson.
# license: Apache 2.0, see LICENSE for more details.
'''Validation Task-Runner.'''
import os
import shutil
from invoke import task
@task
def mkdir(ctx, path):
'''Make directory path.'''
try:
os.makedirs(path, exist_ok=Tru... | 20.965517 | 65 | 0.639803 |
ba10bf1bcd23622686d9a527f4aa02c3621cb9fb | 2,908 | py | Python | afterglow_core/resources/catalog_plugins/vsx_catalog.py | SkynetRTN/afterglow-core | cd9d84e68cc7126887d0aa7f96f608b91b0b0ae3 | [
"Apache-2.0"
] | 2 | 2021-05-24T15:12:07.000Z | 2022-02-17T19:58:16.000Z | afterglow_core/resources/catalog_plugins/vsx_catalog.py | SkynetRTN/afterglow-core | cd9d84e68cc7126887d0aa7f96f608b91b0b0ae3 | [
"Apache-2.0"
] | 1 | 2022-02-27T03:01:06.000Z | 2022-02-27T03:01:06.000Z | afterglow_core/resources/catalog_plugins/vsx_catalog.py | SkynetRTN/afterglow-core | cd9d84e68cc7126887d0aa7f96f608b91b0b0ae3 | [
"Apache-2.0"
] | 2 | 2021-06-08T18:16:40.000Z | 2021-07-09T14:19:49.000Z | """
Afterglow Core: AAVSO International Variable Star indeX (VSX) interface
"""
from typing import List as TList, Union
from astropy.table import Table
from ...models import CatalogSource, Mag
from .vizier_catalogs import VizierCatalog
__all__ = ['VSXCatalog']
class VSXCatalog(VizierCatalog):
"""
VSX/Viz... | 31.268817 | 78 | 0.479367 |
0ab789e7672029a23b94bd16d725812e55e351bc | 7,558 | py | Python | openiti/new_books/convert/epub_converter_hindawi.py | OpenITI/oipy | 71f8c560dfb5814c34f222be49b2ea5a436d5914 | [
"MIT"
] | 8 | 2020-03-14T13:34:36.000Z | 2021-11-24T09:02:27.000Z | openiti/new_books/convert/epub_converter_hindawi.py | OpenITI/oipy | 71f8c560dfb5814c34f222be49b2ea5a436d5914 | [
"MIT"
] | 1 | 2020-04-08T17:22:09.000Z | 2020-04-11T08:49:19.000Z | openiti/new_books/convert/epub_converter_hindawi.py | OpenITI/oipy | 71f8c560dfb5814c34f222be49b2ea5a436d5914 | [
"MIT"
] | 3 | 2020-01-08T16:48:41.000Z | 2021-07-09T06:30:03.000Z | """Convert Epubs from the Hindawi library to OpenITI mARkdown.
The converter has two main functions:
* convert_file: convert a single epub file.
* convert_files_in_folder: convert all epub files in a given folder
Usage examples:
>>> folder = r"test/hindawi/"
>>> meta_fp = folder+"hindawi_metadata_man.yml"
... | 40.417112 | 81 | 0.626488 |
d49f810efe3d83a785032c0c8957c20b7cf50907 | 39,000 | py | Python | qa/rpc-tests/test_framework/mininode.py | sgprpay/sgpr | 00e63112ec51b58b570787324c744cf2d90bf04c | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/mininode.py | sgprpay/sgpr | 00e63112ec51b58b570787324c744cf2d90bf04c | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/mininode.py | sgprpay/sgpr | 00e63112ec51b58b570787324c744cf2d90bf04c | [
"MIT"
] | null | null | null | # mininode.py - Sgpr P2P network half-a-node
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# This python code was modified from ArtForz' public domain half-a-node, as
# found in the mini-node branch of http://github.com/... | 29.147982 | 184 | 0.569872 |
388c45d3e5ef60414dbf268e830e13ab7da57c84 | 1,855 | py | Python | examples/dfp/v201711/activity_service/get_active_activities.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | 1 | 2019-10-21T04:10:22.000Z | 2019-10-21T04:10:22.000Z | examples/dfp/v201711/activity_service/get_active_activities.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201711/activity_service/get_active_activities.py | christineyi3898/googleads-python-lib | cd707dc897b93cf1bbb19355f7424e7834e7fb55 | [
"Apache-2.0"
] | 1 | 2019-10-21T04:10:51.000Z | 2019-10-21T04:10:51.000Z | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.673077 | 79 | 0.709434 |
a460b35f8428cdd8a7002451418bde438a54ba69 | 18,700 | py | Python | Translation/src/experiments/europarl_mlp_wavenet_experiment.py | daphnemt181/MScProject | 8691bf984efe08f8f12c006c307cfcba4c21aae5 | [
"BSD-3-Clause"
] | null | null | null | Translation/src/experiments/europarl_mlp_wavenet_experiment.py | daphnemt181/MScProject | 8691bf984efe08f8f12c006c307cfcba4c21aae5 | [
"BSD-3-Clause"
] | null | null | null | Translation/src/experiments/europarl_mlp_wavenet_experiment.py | daphnemt181/MScProject | 8691bf984efe08f8f12c006c307cfcba4c21aae5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Experiment for WaveNet on translation (en->fr)
"""
import argparse
import os
import sys
import timeit
import time
import datetime
import cPickle as pickle
from pprint import pprint
import codecs
# so that we can pipe unicode
sys.stdout = codecs.getwriter('utf8')(sys.stdout)
sys.stderr = co... | 39.368421 | 118 | 0.558128 |
86927fb050170a4c9fec41a7a5dfce56a62aff75 | 787 | py | Python | model_pack.py | zhangan15/scene_classify | 5adb22478241087092c4d9362bc8e4c3b11f2be3 | [
"Apache-2.0"
] | null | null | null | model_pack.py | zhangan15/scene_classify | 5adb22478241087092c4d9362bc8e4c3b11f2be3 | [
"Apache-2.0"
] | null | null | null | model_pack.py | zhangan15/scene_classify | 5adb22478241087092c4d9362bc8e4c3b11f2be3 | [
"Apache-2.0"
] | 1 | 2020-12-11T07:58:41.000Z | 2020-12-11T07:58:41.000Z | # -*- coding: utf-8 -*-
from ucumos.modeling import Model
from ucumos.session import AcumosSession
from ucumos.metadata import Requirements
from model_service import ModelService
scene_classifier = ModelService()
# 封装模型API接口函数: 初始化模型数据。该接口函数仅供系统调用,必须存在,不要修改或删除!!!
def init_model_data(text: str) -> str:
scene_class... | 32.791667 | 150 | 0.726811 |
25e3f3b6d8adee00ef08bc981c8490951571d053 | 1,136 | py | Python | extensions/interactions/SetInput/SetInput.py | meydman/oppia | 2cd0a516c31f0b94d8d9091533ef86c0b32c5dab | [
"Apache-2.0"
] | 2 | 2015-11-05T20:52:49.000Z | 2021-04-07T05:20:32.000Z | extensions/interactions/SetInput/SetInput.py | CMDann/oppia | 50994926e9e4fab925a0cf1f366cad3de2ed4d7b | [
"Apache-2.0"
] | null | null | null | extensions/interactions/SetInput/SetInput.py | CMDann/oppia | 50994926e9e4fab925a0cf1f366cad3de2ed4d7b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | 35.5 | 74 | 0.744718 |
bbb1c1e3f546ab31ecf5c793776e65c27fb8a297 | 1,868 | py | Python | aliyun-python-sdk-baas/aliyunsdkbaas/request/v20180731/DescribeAppliesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-baas/aliyunsdkbaas/request/v20180731/DescribeAppliesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-baas/aliyunsdkbaas/request/v20180731/DescribeAppliesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.357143 | 74 | 0.753212 |
d1848885bf6437a6ee8fda5d4d3823b47dd28166 | 1,173 | py | Python | instagram/models.py | Rodgersouko/insta | 24d0ecc6b2ec0451704a4be8c000277eeb4c1978 | [
"MIT"
] | 1 | 2021-02-25T20:48:27.000Z | 2021-02-25T20:48:27.000Z | instagram/models.py | Rodgersouko/insta | 24d0ecc6b2ec0451704a4be8c000277eeb4c1978 | [
"MIT"
] | null | null | null | instagram/models.py | Rodgersouko/insta | 24d0ecc6b2ec0451704a4be8c000277eeb4c1978 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
profile_picture = models.ImageField(uploa... | 36.65625 | 87 | 0.721228 |
1a2e8daf630d795bb6810f4f71ad723601708057 | 15,285 | py | Python | experiment/node_generation.py | XiaoLiSean/Cognitive-Map | 6b2019e5b3a46902b06c8d5d1e86b39425042de9 | [
"MIT"
] | null | null | null | experiment/node_generation.py | XiaoLiSean/Cognitive-Map | 6b2019e5b3a46902b06c8d5d1e86b39425042de9 | [
"MIT"
] | null | null | null | experiment/node_generation.py | XiaoLiSean/Cognitive-Map | 6b2019e5b3a46902b06c8d5d1e86b39425042de9 | [
"MIT"
] | 1 | 2021-11-04T06:25:31.000Z | 2021-11-04T06:25:31.000Z | from ai2thor.controller import Controller
from matplotlib import pyplot as plt
from matplotlib.pyplot import MultipleLocator
from dijkstar import Graph, find_path
from scipy import spatial
from distutils.util import strtobool
import numpy as np
from sklearn.cluster import KMeans
from PIL import Image
import time
import... | 35.629371 | 172 | 0.704482 |
b39f6463197ad92c75c1dd7b058a2a398f165cb6 | 445 | py | Python | 01_api_test.py | dilanHewawitharana/SELF-LEARNING-RESTful-API-with-FLASK | 115eafb4de98ad59478c37c58a1e1473eb86bb98 | [
"MIT"
] | null | null | null | 01_api_test.py | dilanHewawitharana/SELF-LEARNING-RESTful-API-with-FLASK | 115eafb4de98ad59478c37c58a1e1473eb86bb98 | [
"MIT"
] | null | null | null | 01_api_test.py | dilanHewawitharana/SELF-LEARNING-RESTful-API-with-FLASK | 115eafb4de98ad59478c37c58a1e1473eb86bb98 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
class HelloWorld(Resource):
def get(self):
return {'data': 'Hello, World'}
class HelloName(Resource):
def get(self, name):
return {'data': 'Hello, {}'.format(name)}
api.add_resource(HelloWorl... | 23.421053 | 55 | 0.683146 |
3d21320062f277b87e1506d0a2dd8ad6949c4e1f | 5,004 | py | Python | tools/create-test-comparison-graphics.py | lillgroup/GaMD-OpenMM | 4b00eb8feb327cd8db51c28c9b0b246dee12bf5a | [
"MIT"
] | null | null | null | tools/create-test-comparison-graphics.py | lillgroup/GaMD-OpenMM | 4b00eb8feb327cd8db51c28c9b0b246dee12bf5a | [
"MIT"
] | null | null | null | tools/create-test-comparison-graphics.py | lillgroup/GaMD-OpenMM | 4b00eb8feb327cd8db51c28c9b0b246dee12bf5a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import matplotlib.pyplot as plt
from pprint import pprint
def main():
if len(sys.argv) < 5:
usage()
sys.exit(1)
cmd_directory = sys.argv[1]
gamd_1_directory = sys.argv[2]
gamd_2_directory = sys.argv[3]
gamd_3_directory = sys.argv[4]
phi_filepat... | 32.705882 | 186 | 0.709632 |
aba3ae5f31f1868882e83855890e73ac7121910a | 274 | py | Python | Python/ChefAndMean.py | sumitesh9/Competitive-Programming | f7798058c13aa4b9e7ff418d84b55ce54dcb7224 | [
"MIT"
] | 1 | 2020-07-30T06:13:47.000Z | 2020-07-30T06:13:47.000Z | Python/ChefAndMean.py | sumitesh9/Competitive-Programming | f7798058c13aa4b9e7ff418d84b55ce54dcb7224 | [
"MIT"
] | null | null | null | Python/ChefAndMean.py | sumitesh9/Competitive-Programming | f7798058c13aa4b9e7ff418d84b55ce54dcb7224 | [
"MIT"
] | null | null | null | t=int(input())
for i in range(0,t):
n=int(input())
l=list(map(int,input().split()))
mean=sum(l)/len(l)
if mean%1!=0:
print("Impossible")
else:
flag=0
for i in range(0,n):
if(l[i]==mean):
print(i+1)
flag=1
break
if(flag==0):
print("Impossible") | 17.125 | 33 | 0.569343 |
2a3bf7729bf996ddcdd4426c563c44bbf13fa324 | 5,888 | py | Python | semantic_release/vcs_helpers.py | alissonperez/python-semantic-release | 7278dcf1bdb3c6be8b122e41f55e3127b89335b0 | [
"MIT"
] | null | null | null | semantic_release/vcs_helpers.py | alissonperez/python-semantic-release | 7278dcf1bdb3c6be8b122e41f55e3127b89335b0 | [
"MIT"
] | null | null | null | semantic_release/vcs_helpers.py | alissonperez/python-semantic-release | 7278dcf1bdb3c6be8b122e41f55e3127b89335b0 | [
"MIT"
] | null | null | null | """VCS Helpers
"""
import os
import re
from pathlib import PurePath
from typing import Optional, Tuple
from urllib.parse import urlsplit
import ndebug
from git import GitCommandError, InvalidGitRepositoryError, Repo, TagObject
from git.exc import BadName
from .errors import GitError, HvcsRepoParseError
from .settings... | 27.643192 | 97 | 0.632813 |
4c10698122f92852718982b20a5fa136d197dddf | 2,552 | py | Python | deep_dircmp/__init__.py | ramwin/python-deep-dircmp | 8cf9397e9bd7ba70ff814ac6b848a88bd0fab63d | [
"BSD-3-Clause"
] | null | null | null | deep_dircmp/__init__.py | ramwin/python-deep-dircmp | 8cf9397e9bd7ba70ff814ac6b848a88bd0fab63d | [
"BSD-3-Clause"
] | null | null | null | deep_dircmp/__init__.py | ramwin/python-deep-dircmp | 8cf9397e9bd7ba70ff814ac6b848a88bd0fab63d | [
"BSD-3-Clause"
] | null | null | null | import filecmp
import os.path
__version__ = '0.1.0'
class DeepDirCmp(filecmp.dircmp):
"""
A version of dircmp which does not compare files shallow, and has recursive getters.
"""
def phase3(self):
xx = filecmp.cmpfiles(self.left, self.right, self.common_files, shallow=False)
self.sam... | 35.943662 | 112 | 0.638323 |
92f0762d251e0b86873f430d3cf47ed1df4f4122 | 7,758 | py | Python | applications/incompressible_fluid_application/test_examples/mass_conservation.gid/run_benchmark.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 2 | 2020-04-30T19:13:08.000Z | 2021-04-14T19:40:47.000Z | applications/incompressible_fluid_application/test_examples/mass_conservation.gid/run_benchmark.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 13 | 2019-10-07T12:06:51.000Z | 2020-02-18T08:48:33.000Z | applications/incompressible_fluid_application/test_examples/mass_conservation.gid/run_benchmark.py | lcirrott/Kratos | 8406e73e0ad214c4f89df4e75e9b29d0eb4a47ea | [
"BSD-4-Clause"
] | 1 | 2020-06-12T08:51:24.000Z | 2020-06-12T08:51:24.000Z | from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7
import edgebased_levelset_var
#
#
# setting the domain size for the problem to be solved
domain_size = edgebased_levelset_var.domain_size
# kratos_root/benchmarking
kratos_benchmarki... | 33.153846 | 134 | 0.683939 |
c14e854d2d5dce7138f333a284625440b60b6140 | 8,628 | py | Python | otp/ai/BanManagerAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 1 | 2021-02-25T06:22:49.000Z | 2021-02-25T06:22:49.000Z | otp/ai/BanManagerAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | null | null | null | otp/ai/BanManagerAI.py | TrueBlueDogemon/Toontown | ebed7fc3f2ef06a529cf02eda7ab46361aceef9d | [
"MIT"
] | 2 | 2020-11-08T03:38:35.000Z | 2021-09-02T07:03:47.000Z | from direct.directnotify import DirectNotifyGlobal
from toontown.uberdog.ClientServicesManagerUD import executeHttpRequest
import datetime
from direct.fsm.FSM import FSM
from direct.distributed.PyDatagram import PyDatagram
from direct.distributed.MsgTypes import *
from otp.ai.MagicWordGlobal import *
from direct.showba... | 36.252101 | 147 | 0.574177 |
966c0b99bc9359443957558ce211b9072b586b55 | 4,059 | py | Python | backend/plays/tests/test_models.py | shinkenuu/Desafio-Full-Stack | 6c96d7a09e3bdb01183411c778242f86d01aaf12 | [
"MIT"
] | null | null | null | backend/plays/tests/test_models.py | shinkenuu/Desafio-Full-Stack | 6c96d7a09e3bdb01183411c778242f86d01aaf12 | [
"MIT"
] | null | null | null | backend/plays/tests/test_models.py | shinkenuu/Desafio-Full-Stack | 6c96d7a09e3bdb01183411c778242f86d01aaf12 | [
"MIT"
] | null | null | null | from django.db.utils import IntegrityError
from django.test.testcases import TestCase
from ..models import Play, Reservation
from ..settings import PLAY_FEE_PERCENT, PLAY_PRICE, PLAY_TOTAL_ACCENTS
from .factories import AttendeeFactory, PlayFactory, ReservationFactory
class PlayTestCase(TestCase):
def test_pers... | 36.9 | 117 | 0.730722 |
17a45c4710725bad1b0e04010bd7eb8ff1728047 | 1,208 | py | Python | DS-400/Medium/264-Ugly Number II/DP.py | ericchen12377/Leetcode-Algorithm-Python | eb58cd4f01d9b8006b7d1a725fc48910aad7f192 | [
"MIT"
] | 2 | 2020-04-24T18:36:52.000Z | 2020-04-25T00:15:57.000Z | DS-400/Medium/264-Ugly Number II/DP.py | ericchen12377/Leetcode-Algorithm-Python | eb58cd4f01d9b8006b7d1a725fc48910aad7f192 | [
"MIT"
] | null | null | null | DS-400/Medium/264-Ugly Number II/DP.py | ericchen12377/Leetcode-Algorithm-Python | eb58cd4f01d9b8006b7d1a725fc48910aad7f192 | [
"MIT"
] | null | null | null | class Solution:
# look-up table to speed up query response time
# it is updated by dynamic programming
table = []
def build_look_up_table(self):
dp = Solution.table
# base case, minimum ugly number is 1
dp.append(1)
# general case, compute next ugly number from previ... | 24.16 | 68 | 0.544702 |
3de72e58b2208eacf508e6048d3fb6d66bf2e167 | 8,412 | py | Python | research/lfads/synth_data/generate_chaotic_rnn_data.py | 873040/Abhishek | 2ddd716e66bc5cc6e6f0787508dd07da0e02e75a | [
"Apache-2.0"
] | 82,518 | 2016-02-05T12:07:23.000Z | 2022-03-31T23:09:47.000Z | research/lfads/synth_data/generate_chaotic_rnn_data.py | 873040/Abhishek | 2ddd716e66bc5cc6e6f0787508dd07da0e02e75a | [
"Apache-2.0"
] | 9,021 | 2016-03-08T01:02:05.000Z | 2022-03-31T08:06:35.000Z | research/lfads/synth_data/generate_chaotic_rnn_data.py | 873040/Abhishek | 2ddd716e66bc5cc6e6f0787508dd07da0e02e75a | [
"Apache-2.0"
] | 54,341 | 2016-02-06T17:19:55.000Z | 2022-03-31T10:27:44.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 41.850746 | 98 | 0.713148 |
7318b7c4d0630ae1ee718cd3e4b83470e3480228 | 2,345 | py | Python | dev/circuitpython/examples/rfm9x_node1_ack.py | scripsi/picodeebee | 0ec77e92f09fa8711705623482e57a5e0b702696 | [
"MIT"
] | 7 | 2021-03-15T10:06:20.000Z | 2022-03-23T02:53:15.000Z | Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/rfm9x_node1_ack.py | IanSMoyes/SpiderPi | cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1 | [
"Apache-2.0"
] | 5 | 2021-04-27T18:21:11.000Z | 2021-05-02T14:17:14.000Z | Lights/adafruit-circuitpython-bundle-6.x-mpy-20210310/examples/rfm9x_node1_ack.py | IanSMoyes/SpiderPi | cc3469980ae87b92d0dc43c05dbd579f0fa8c4b1 | [
"Apache-2.0"
] | null | null | null | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
# Example to send a packet periodically between addressed nodes with ACK
# Author: Jerry Needell
#
import time
import board
import busio
import digitalio
import adafruit_rfm9x
# set the time interval (seconds) fo... | 34.485294 | 87 | 0.684435 |
c0fbceeac5b20597c7dabf7c6fee5a0b0a3e41d3 | 1,413 | py | Python | cs459_2/week03_admin/myproject/myapp/migrations/0001_initial.py | Chalatzzz/2020 | bae6a56068d87882a151af07696f80194d29387a | [
"BSD-3-Clause"
] | null | null | null | cs459_2/week03_admin/myproject/myapp/migrations/0001_initial.py | Chalatzzz/2020 | bae6a56068d87882a151af07696f80194d29387a | [
"BSD-3-Clause"
] | null | null | null | cs459_2/week03_admin/myproject/myapp/migrations/0001_initial.py | Chalatzzz/2020 | bae6a56068d87882a151af07696f80194d29387a | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2 on 2020-01-22 08:11
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Bike',
fields=[
('id', models.AutoField(auto_... | 33.642857 | 114 | 0.540694 |
68917cfad37de4992e79a037aef606177ad455a7 | 1,531 | py | Python | indico/core/webpack.py | bpedersen2/indico | 8410ee5f8f8530a8692f3dd2d4015c3074b0aa30 | [
"MIT"
] | 1 | 2021-12-27T17:51:27.000Z | 2021-12-27T17:51:27.000Z | indico/core/webpack.py | bpedersen2/indico | 8410ee5f8f8530a8692f3dd2d4015c3074b0aa30 | [
"MIT"
] | 5 | 2021-04-08T19:26:47.000Z | 2022-01-24T16:30:18.000Z | indico/core/webpack.py | bpedersen2/indico | 8410ee5f8f8530a8692f3dd2d4015c3074b0aa30 | [
"MIT"
] | 2 | 2019-02-24T17:29:10.000Z | 2021-04-08T19:23:27.000Z | # 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.
import os
from flask_webpackext import FlaskWebpackExt
from flask_webpackext.manifest import JinjaManifes... | 36.452381 | 92 | 0.70934 |
668b9ec611ed0a6e27107d15adbb625eef8a6091 | 1,887 | py | Python | distance_consistency_plot.py | bencebecsy/galaxy-priors | ab1cde7daaa1da9f7ff93076fefc16c7895c9940 | [
"MIT"
] | 1 | 2018-11-04T00:35:53.000Z | 2018-11-04T00:35:53.000Z | distance_consistency_plot.py | bencebecsy/galaxy-priors | ab1cde7daaa1da9f7ff93076fefc16c7895c9940 | [
"MIT"
] | 1 | 2017-07-26T18:28:23.000Z | 2017-07-26T18:28:23.000Z | distance_consistency_plot.py | bencebecsy/galaxy-priors | ab1cde7daaa1da9f7ff93076fefc16c7895c9940 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import sys
DPI=300
infile=sys.argv[1]
glade = np.load(infile)
#filter
filt = range(glade.shape[0])
#print glade.shape[0]
#columns:(0) PGC number (1) GWGC name (2) HyperLEDA name (3) 2MASS name (4) SDSS-DR12... | 25.849315 | 126 | 0.603074 |
26de1205809be492c2f71713a1a0a803b7b8de19 | 25,774 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_extensions_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2021-09-07T18:35:49.000Z | 2021-09-07T18:35:49.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_extensions_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/aio/operations/_virtual_machine_extensions_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 51.240557 | 216 | 0.680647 |
bb96f84452bc7e062140094b88b2fa4772d704e7 | 481 | py | Python | chemception/models/assay.py | FrancescoZ/Chemception | e6c6bf943d80f4813e899d7524691f77d43bc344 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | chemception/models/assay.py | FrancescoZ/Chemception | e6c6bf943d80f4813e899d7524691f77d43bc344 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | chemception/models/assay.py | FrancescoZ/Chemception | e6c6bf943d80f4813e899d7524691f77d43bc344 | [
"BSD-2-Clause",
"MIT"
] | null | null | null | from rdkit import Chem
import cv2
import os
import numpy as np
import os.path
class Assay:
id = ""
CIDCompound = []
SIDCompound = []
result = []
Description = ""
ActivityName = []
Type = ""
def __init__(self,id,description,ttype):
self.id=id
self.Description=description
self.Type = ttype
def AddTest(... | 17.178571 | 43 | 0.715177 |
49395a7e98c23085dca97c6a646b9c0b95b298b8 | 2,645 | py | Python | ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py | emcvipr/ambari | 045e0d2ac94b8b81819d2efbfd7e1bddc67a7756 | [
"Apache-2.0",
"MIT"
] | 3 | 2019-06-20T11:49:36.000Z | 2020-12-11T10:44:29.000Z | ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py | cas-packone/ambari-chs | 68033fbd4b810b6642853f2ad9128cbbd4e0cb7b | [
"Apache-2.0"
] | null | null | null | ambari-server/src/test/python/stacks/2.3/ATLAS/test_service_check.py | cas-packone/ambari-chs | 68033fbd4b810b6642853f2ad9128cbbd4e0cb7b | [
"Apache-2.0"
] | 3 | 2017-10-31T11:42:31.000Z | 2021-04-26T07:17:53.000Z | #!/usr/bin/env python
'''
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")... | 41.328125 | 176 | 0.616257 |
c70cda4dbabe034c314031cb06f2e4d3cbc0b057 | 5,241 | py | Python | orchestra/google/cloud/operators/gcp_bigquery_operator.py | danielemassaiu/orchestra | 4803530a7df9c685893aca87250e3f736de23bc8 | [
"Apache-2.0"
] | 54 | 2019-01-23T10:30:56.000Z | 2022-03-08T13:57:22.000Z | orchestra/google/cloud/operators/gcp_bigquery_operator.py | danielemassaiu/orchestra | 4803530a7df9c685893aca87250e3f736de23bc8 | [
"Apache-2.0"
] | 19 | 2019-04-10T20:45:51.000Z | 2021-06-28T16:53:24.000Z | orchestra/google/cloud/operators/gcp_bigquery_operator.py | danielemassaiu/orchestra | 4803530a7df9c685893aca87250e3f736de23bc8 | [
"Apache-2.0"
] | 25 | 2019-04-01T21:08:25.000Z | 2021-10-21T00:51:00.000Z | #
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 38.255474 | 80 | 0.718374 |
c747222badf5b1ccf28c370181ff4f57c82fdd6f | 291 | py | Python | Bot/extensions/settings/settings.py | ChrissisCodeXD/Hikari-TestProject | 236c8fc9081172d9edff6d629e5d11c5abe64205 | [
"MIT"
] | null | null | null | Bot/extensions/settings/settings.py | ChrissisCodeXD/Hikari-TestProject | 236c8fc9081172d9edff6d629e5d11c5abe64205 | [
"MIT"
] | null | null | null | Bot/extensions/settings/settings.py | ChrissisCodeXD/Hikari-TestProject | 236c8fc9081172d9edff6d629e5d11c5abe64205 | [
"MIT"
] | null | null | null | import lightbulb
from imports import *
settings_plugin = lightbulb.Plugin("settings.settings", "all the Settings for the Bot")
async def generate_rows(bot, guild_id):
pass
def load(bot):
bot.add_plugin(settings_plugin)
def unload(bot):
bot.remove_plugin(settings_plugin)
| 16.166667 | 87 | 0.749141 |
0edd53500178692abd58fe7180622c9bf99a5fc6 | 1,973 | py | Python | pyticketswitch/offer.py | ingresso-group/pyticketswitch | 4e100b5aa26e8986c4bc3a46c13cdff50188e048 | [
"MIT"
] | 4 | 2015-08-10T13:12:20.000Z | 2017-11-07T12:08:06.000Z | pyticketswitch/offer.py | ingresso-group/pyticketswitch | 4e100b5aa26e8986c4bc3a46c13cdff50188e048 | [
"MIT"
] | 89 | 2015-08-10T13:45:21.000Z | 2022-03-23T16:20:10.000Z | pyticketswitch/offer.py | ingresso-group/pyticketswitch | 4e100b5aa26e8986c4bc3a46c13cdff50188e048 | [
"MIT"
] | 11 | 2015-08-10T11:34:22.000Z | 2020-05-26T06:03:10.000Z | from pyticketswitch.mixins import JSONMixin
class Offer(JSONMixin, object):
"""Describes a reduction in price.
Attributes:
seatprice (float): the price per seat/ticket.
surcharge (float): the additional charges per seat/ticket.
original_seatprice (float): the original price per seat/t... | 37.942308 | 79 | 0.642676 |
437c7bdb8ba332afbcfc2be8007947aa4991b009 | 15,228 | py | Python | lib/dataset/coco.py | MonsterPeng/Deformable-ConvNets-master-org | caa81c13e3a473824b53c00e262055ec1a8a6e6a | [
"Apache-2.0"
] | 2 | 2018-10-24T01:47:49.000Z | 2020-05-30T15:23:02.000Z | lib/dataset/coco.py | MonsterPeng/Deformable-ConvNets-master-org | caa81c13e3a473824b53c00e262055ec1a8a6e6a | [
"Apache-2.0"
] | null | null | null | lib/dataset/coco.py | MonsterPeng/Deformable-ConvNets-master-org | caa81c13e3a473824b53c00e262055ec1a8a6e6a | [
"Apache-2.0"
] | null | null | null | import cPickle
import cv2
import os
import json
import numpy as np
from imdb import IMDB
# coco api
from .pycocotools.coco import COCO
from .pycocotools.cocoeval import COCOeval
from .pycocotools import mask as COCOmask
from utils.mask_coco2voc import mask_coco2voc
from utils.mask_voc2coco import mask_voc2coco
from u... | 41.045822 | 108 | 0.561072 |
ba9305f658c6cfdf0775c06d42023b6ae1dd43a4 | 2,913 | py | Python | venv/Lib/site-packages/comtypes/server/automation.py | cvangheem/Twitchbot | 48bb065951e88e4d2e9ef8d0c1a3afb0150a5eb5 | [
"MIT"
] | 64 | 2020-07-22T06:24:18.000Z | 2022-03-27T10:48:15.000Z | venv/Lib/site-packages/comtypes/server/automation.py | AsterLaoWhy/Navi | 819e4cc9e70721d65da5979e0c7a6fead9eb9d6e | [
"MIT"
] | 9 | 2021-08-14T01:27:36.000Z | 2021-08-24T18:10:18.000Z | venv/Lib/site-packages/comtypes/server/automation.py | AsterLaoWhy/Navi | 819e4cc9e70721d65da5979e0c7a6fead9eb9d6e | [
"MIT"
] | 17 | 2020-09-14T02:46:41.000Z | 2022-03-01T09:52:33.000Z | import logging
from ctypes import *
from comtypes.hresult import *
from comtypes import COMObject, IUnknown
from comtypes.automation import IDispatch, IEnumVARIANT
logger = logging.getLogger(__name__)
# XXX When the COMCollection class is ready, insert it into __all__
__all__ = ["VARIANTEnumerator"]
class VARIANT... | 30.989362 | 93 | 0.576382 |
a7e3a9b5119c3391f3e5e0509f46c1de8f851382 | 3,213 | py | Python | h/resources.py | discodavey/h | 7bff8478b3a5b936de82ac9fcd89b355f4afd3aa | [
"MIT"
] | 1 | 2018-03-09T02:15:16.000Z | 2018-03-09T02:15:16.000Z | h/resources.py | discodavey/h | 7bff8478b3a5b936de82ac9fcd89b355f4afd3aa | [
"MIT"
] | 16 | 2018-03-14T21:23:46.000Z | 2019-04-29T18:55:28.000Z | h/resources.py | discodavey/h | 7bff8478b3a5b936de82ac9fcd89b355f4afd3aa | [
"MIT"
] | 1 | 2021-03-12T09:45:04.000Z | 2021-03-12T09:45:04.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from pyramid.security import (
ALL_PERMISSIONS,
DENY_ALL,
Allow,
principals_allowed_by_permission,
)
from h import storage
from h.models import AuthClient
from h.auth import role
from h.interfaces import IGroupService
class Root(object... | 28.433628 | 77 | 0.633364 |
16107515be940d62d6039eb3564bf3875db60a48 | 16,228 | py | Python | crocoite/behavior.py | backwardn/crocoite | d93e59456e432562e6ceb7a275af47682cc30aa9 | [
"MIT"
] | 41 | 2017-11-17T20:56:19.000Z | 2021-08-23T01:27:08.000Z | crocoite/behavior.py | backwardn/crocoite | d93e59456e432562e6ceb7a275af47682cc30aa9 | [
"MIT"
] | 27 | 2018-10-29T14:44:53.000Z | 2020-04-30T11:02:26.000Z | crocoite/behavior.py | backwardn/crocoite | d93e59456e432562e6ceb7a275af47682cc30aa9 | [
"MIT"
] | 8 | 2018-10-04T20:52:47.000Z | 2022-01-05T21:06:59.000Z | # Copyright (c) 2017–2018 crocoite contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, ... | 36.881818 | 117 | 0.620532 |
4a3b9ce50c19fd973f4add9d287615cb0b320763 | 902 | py | Python | src/ride.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-06-27T08:48:24.000Z | 2019-06-27T08:48:24.000Z | src/ride.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ride.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# Copyright 2008-2012 Nokia Siemens Networks Oyj
#
# 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
#
# Unl... | 32.214286 | 75 | 0.747228 |
eaef0f5082916f5003d24b0751c308ebada738cd | 247 | py | Python | docs/gdscript-docs-maker/src/gdscript_docs_maker/gdscript/project_info.py | 3ddelano/mongo-driver-godot | 3afb693df19f103d7146f7944d6dfaf0b0a0148b | [
"MIT"
] | 6 | 2022-03-09T17:13:18.000Z | 2022-03-21T13:18:05.000Z | docs/gdscript-docs-maker/src/gdscript_docs_maker/gdscript/project_info.py | 3ddelano/mongo-driver-godot | 3afb693df19f103d7146f7944d6dfaf0b0a0148b | [
"MIT"
] | null | null | null | docs/gdscript-docs-maker/src/gdscript_docs_maker/gdscript/project_info.py | 3ddelano/mongo-driver-godot | 3afb693df19f103d7146f7944d6dfaf0b0a0148b | [
"MIT"
] | 1 | 2022-03-09T19:36:50.000Z | 2022-03-09T19:36:50.000Z | from dataclasses import dataclass
@dataclass
class ProjectInfo:
name: str
description: str
version: str
@staticmethod
def from_dict(data: dict):
return ProjectInfo(data["name"], data["description"], data["version"])
| 19 | 78 | 0.684211 |
db072b3639f51f871ca70202c1576fcbecdee4e6 | 26,945 | py | Python | efficientdet/inference.py | mamromer/automl | 79370be71f208f2c1e00ff75f62a0eed19769e92 | [
"Apache-2.0"
] | null | null | null | efficientdet/inference.py | mamromer/automl | 79370be71f208f2c1e00ff75f62a0eed19769e92 | [
"Apache-2.0"
] | null | null | null | efficientdet/inference.py | mamromer/automl | 79370be71f208f2c1e00ff75f62a0eed19769e92 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google Research. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 36.56038 | 119 | 0.660939 |
5bc1e7246a1692d508b5787d884cd548a92368a6 | 2,298 | py | Python | bin/scraper.py | alexanderluce/youtube-channel-spider | 2c68be55a1ab1586ad7ee528ebd2f21bdb5ee939 | [
"MIT"
] | null | null | null | bin/scraper.py | alexanderluce/youtube-channel-spider | 2c68be55a1ab1586ad7ee528ebd2f21bdb5ee939 | [
"MIT"
] | null | null | null | bin/scraper.py | alexanderluce/youtube-channel-spider | 2c68be55a1ab1586ad7ee528ebd2f21bdb5ee939 | [
"MIT"
] | null | null | null | import pandas as pd
import os
from googleapiclient.discovery import build
from config import api_key
import argparse
data_path = os.getcwd() + "/results/"
yt = build('youtube', 'v3', developerKey=api_key)
base_video_url ="https://www.youtube.com/watch?v={}"
def list_upload_data(upload_id):
videos = list()
pag... | 34.298507 | 132 | 0.660139 |
8f788e313003328de8863704e68d13680434dbc2 | 1,371 | py | Python | safe_transaction_service/history/management/commands/reindex_master_copies.py | becoswap-dev/safe-transaction-service | bf2d3060874ee6f4d7883f15780cfa6456d9d9cf | [
"MIT"
] | 67 | 2019-08-16T16:26:42.000Z | 2022-03-21T20:32:43.000Z | safe_transaction_service/history/management/commands/reindex_master_copies.py | becoswap-dev/safe-transaction-service | bf2d3060874ee6f4d7883f15780cfa6456d9d9cf | [
"MIT"
] | 550 | 2019-07-11T12:09:06.000Z | 2022-03-31T16:32:00.000Z | safe_transaction_service/history/management/commands/reindex_master_copies.py | becoswap-dev/safe-transaction-service | bf2d3060874ee6f4d7883f15780cfa6456d9d9cf | [
"MIT"
] | 83 | 2019-12-06T11:22:32.000Z | 2022-03-30T10:09:22.000Z | from django.core.management.base import BaseCommand
from ...services import IndexServiceProvider
class Command(BaseCommand):
help = "Force reindexing of Safe events/traces (depending on the running mode)"
def add_arguments(self, parser):
parser.add_argument(
"--addresses",
na... | 31.883721 | 87 | 0.603939 |
a6b3181a256ebb56954a7fe5b2430ff36a136a82 | 1,280 | py | Python | time_series_model_basics/simulate_data.py | kikejimenez/time_series_model_basics | fb0d2b8e8327c60822f0f98477fb1268844a8f32 | [
"Apache-2.0"
] | null | null | null | time_series_model_basics/simulate_data.py | kikejimenez/time_series_model_basics | fb0d2b8e8327c60822f0f98477fb1268844a8f32 | [
"Apache-2.0"
] | null | null | null | time_series_model_basics/simulate_data.py | kikejimenez/time_series_model_basics | fb0d2b8e8327c60822f0f98477fb1268844a8f32 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: nbs/00_SimulateData.ipynb (unless otherwise specified).
__all__ = ['__numpy_time_series', 'pandas_time_series']
# Cell
import numpy as np
import pandas as pd
# Cell
def __numpy_time_series(
num_points=30,
level=3,
trend_amplitude=1 / 3,
sinus_amplitude=1,
... | 21.333333 | 99 | 0.625 |
c7f1717b7b08be761b2556bcd74259c8b16273a1 | 1,631 | py | Python | tracardi/service/plugin/runner.py | Tracardi/tracardi | 1505c38e43e6e69595212d2a3f6917edc5841390 | [
"MIT"
] | 153 | 2021-11-02T00:35:41.000Z | 2022-03-25T16:37:44.000Z | tracardi/service/plugin/runner.py | Tracardi/tracardi | 1505c38e43e6e69595212d2a3f6917edc5841390 | [
"MIT"
] | 243 | 2021-10-17T17:00:22.000Z | 2022-03-28T10:13:34.000Z | tracardi/service/plugin/runner.py | Tracardi/tracardi | 1505c38e43e6e69595212d2a3f6917edc5841390 | [
"MIT"
] | 14 | 2021-10-17T11:39:04.000Z | 2022-03-14T14:44:02.000Z | from tracardi.domain.event import Event
from tracardi.domain.payload.tracker_payload import TrackerPayload
from tracardi.domain.profile import Profile
from tracardi.service.notation.dot_accessor import DotAccessor
from tracardi.service.plugin.domain.console import Console
class ActionRunner:
id = None
debug =... | 32.62 | 103 | 0.657879 |
3dcd7abf36443f4c692733d4ac89fb40863b0039 | 2,033 | py | Python | examples/basic_usage.py | nj-vs-vh/pyindigo | 4fbaf9d382d9fc48660ff0327801e6f379fe56c3 | [
"BSD-2-Clause"
] | 5 | 2021-01-07T14:53:52.000Z | 2021-11-22T09:20:25.000Z | examples/basic_usage.py | nj-vs-vh/pyindigo | 4fbaf9d382d9fc48660ff0327801e6f379fe56c3 | [
"BSD-2-Clause"
] | null | null | null | examples/basic_usage.py | nj-vs-vh/pyindigo | 4fbaf9d382d9fc48660ff0327801e6f379fe56c3 | [
"BSD-2-Clause"
] | null | null | null | import time
import pyindigo.core as indigo
from pyindigo.core.properties import CommonProperties, CCDSpecificProperties
from pyindigo.core import indigo_callback
from pyindigo.core.enums import IndigoDriverAction, IndigoLogLevel
@indigo_callback
def print_property(action, prop):
print(f"{action}: {prop}")
# w... | 32.790323 | 118 | 0.778652 |
c42a2b4a25bde73eebac903fd8899487510b2a97 | 7,168 | py | Python | addon/globalPlugins/yandexTranslate/yandexfreetranslate.py | zstanecic/YandexTranslate | 10de4791aee7ca1e03c07e687b57856f4418154c | [
"MIT"
] | 5 | 2020-11-20T22:31:56.000Z | 2021-12-21T16:55:57.000Z | addon/globalPlugins/yandexTranslate/yandexfreetranslate.py | zstanecic/YandexTranslate | 10de4791aee7ca1e03c07e687b57856f4418154c | [
"MIT"
] | 1 | 2020-11-10T21:44:29.000Z | 2020-11-15T09:06:30.000Z | addon/globalPlugins/yandexTranslate/yandexfreetranslate.py | zstanecic/YandexTranslate | 10de4791aee7ca1e03c07e687b57856f4418154c | [
"MIT"
] | 4 | 2020-08-29T14:47:27.000Z | 2021-04-28T19:57:52.000Z | try: from utils import smartsplit
except: from .utils import smartsplit
import ssl
import gzip
import json
import os
import os.path
import re
import sys
import time
try:
import urllib.parse as urllibparse
import urllib.request as urllibrequest
import urllib.error as urlliberror
except ImportError:
import urllib as ... | 34.796117 | 111 | 0.700893 |
bd4d5f0c7fdb798bd236bc19511a1fa9df0234a5 | 2,854 | py | Python | shopyo/frontend_tst.py | FullteaOfEEIC/shopyo | 1e7ffcb96d31b0926574e23d497f9fb2a3aba4af | [
"MIT"
] | null | null | null | shopyo/frontend_tst.py | FullteaOfEEIC/shopyo | 1e7ffcb96d31b0926574e23d497f9fb2a3aba4af | [
"MIT"
] | null | null | null | shopyo/frontend_tst.py | FullteaOfEEIC/shopyo | 1e7ffcb96d31b0926574e23d497f9fb2a3aba4af | [
"MIT"
] | null | null | null | import time
from flask_testing import LiveServerTestCase
from selenium import webdriver
from app import create_app
from modules.admin.models import User
from modules.settings.models import Settings
from shopyoapi.init import db
options = webdriver.ChromeOptions()
options.add_argument("--headless")
options.add_argume... | 33.186047 | 84 | 0.662579 |
ad0e1dfb69988cbf9da781afb9a6533d3287d933 | 5,753 | py | Python | bowler/helpers.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 11 | 2021-07-14T12:51:58.000Z | 2022-03-10T09:05:32.000Z | bowler/helpers.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 3 | 2020-09-22T07:00:25.000Z | 2020-11-14T03:36:42.000Z | bowler/helpers.py | MingMingShangTian/paddle1to2 | 4a711ea310242d0a18e692ddebf3e02f90457b8f | [
"Apache-2.0"
] | 5 | 2021-01-06T05:58:46.000Z | 2022-02-14T01:42:59.000Z | #!/usr/bin/env python3
#
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
from typing import List, Optional, Sequence, Union
from tools import click
from fissix.pgen2.token im... | 26.031674 | 95 | 0.574483 |
bc1288afd007ba54f3262baeb07524b8127d2c4c | 63 | py | Python | tests/formatters/test_sphinx.py | byaka/sublime_docblockr_python | bcfdb58edc9ed26d0d8fec38bf1d2649647f4a4a | [
"MIT"
] | 61 | 2015-12-21T11:58:40.000Z | 2021-07-09T03:45:15.000Z | tests/formatters/test_sphinx.py | byaka/sublime_docblockr_python | bcfdb58edc9ed26d0d8fec38bf1d2649647f4a4a | [
"MIT"
] | 28 | 2015-12-15T08:50:59.000Z | 2021-07-14T10:59:34.000Z | tests/formatters/test_sphinx.py | byaka/sublime_docblockr_python | bcfdb58edc9ed26d0d8fec38bf1d2649647f4a4a | [
"MIT"
] | 15 | 2016-01-19T14:22:39.000Z | 2021-08-25T15:11:46.000Z | def test_exists(formatter_sphinx):
assert formatter_sphinx
| 21 | 34 | 0.825397 |
33d3cd70360444df605cad15af3994451ebdbe38 | 1,273 | py | Python | pyviz3d/points.py | daveredrum/PyViz3D | e7020fe8f34b70af76b981d431f251aba3cffc70 | [
"MIT"
] | 1 | 2022-01-04T07:07:09.000Z | 2022-01-04T07:07:09.000Z | pyviz3d/points.py | daveredrum/PyViz3D | e7020fe8f34b70af76b981d431f251aba3cffc70 | [
"MIT"
] | null | null | null | pyviz3d/points.py | daveredrum/PyViz3D | e7020fe8f34b70af76b981d431f251aba3cffc70 | [
"MIT"
] | null | null | null | # Points class i.e. point cloud.
import numpy as np
class Points:
def __init__(self, positions, colors, normals, point_size, visible, alpha, shading_type=1):
self.positions = positions
self.colors = colors
self.normals = normals
self.point_size = point_size
self.visible = v... | 34.405405 | 111 | 0.630793 |
9f5956b12946f669594018704c419be44b849a3a | 2,330 | py | Python | cpp/src/examples/keyczar_tool.py | nawien-sharma/keyczar | c55563bbd70f4b6fefc7444e296aab9894475f9a | [
"Apache-2.0"
] | null | null | null | cpp/src/examples/keyczar_tool.py | nawien-sharma/keyczar | c55563bbd70f4b6fefc7444e296aab9894475f9a | [
"Apache-2.0"
] | null | null | null | cpp/src/examples/keyczar_tool.py | nawien-sharma/keyczar | c55563bbd70f4b6fefc7444e296aab9894475f9a | [
"Apache-2.0"
] | 1 | 2021-04-13T05:05:30.000Z | 2021-04-13T05:05:30.000Z | # Demonstrates KeyczarTool's basic commands and encrypts a short message.
#
# Example: python keyczar_tool.py ~/tmp-dir
#
import os
import sys
import keyczar
PLAINTEXT = 'Secret message'
def RunCommands(keyset_type, keyset_password, rsa_path, rsa_pub_path):
kt = keyczar.KeyczarTool(keyset_type)
# Creates a R... | 35.30303 | 77 | 0.7 |
d0fafff02219d51c10a68203ffcfde50a877a9c6 | 3,317 | py | Python | pygme/astroprofiles/nfw.py | emsellem/pygme | cce7805d26c2791e8c342d74f3b89f6fdc23af8c | [
"BSD-3-Clause"
] | null | null | null | pygme/astroprofiles/nfw.py | emsellem/pygme | cce7805d26c2791e8c342d74f3b89f6fdc23af8c | [
"BSD-3-Clause"
] | 1 | 2015-07-24T15:06:55.000Z | 2015-08-12T07:17:43.000Z | pygme/astroprofiles/nfw.py | emsellem/pygme | cce7805d26c2791e8c342d74f3b89f6fdc23af8c | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
"""
This module provides functions useful for Navarro-Frenk-White profile
"""
### Importing the required stuff from different modules
import numpy as np
from numpy import pi, log10, log, exp, sqrt
__version__ = '1.1.0 (March 3, 2012)'
########################################
## Some constant -... | 36.450549 | 116 | 0.489599 |
53c89097a59eea1989ff872f49004543c7190fa6 | 5,824 | py | Python | homeassistant/components/efergy/sensor.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 2 | 2019-10-19T15:07:32.000Z | 2022-01-29T10:33:20.000Z | homeassistant/components/efergy/sensor.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 4 | 2021-02-08T21:05:14.000Z | 2021-09-08T02:57:03.000Z | homeassistant/components/efergy/sensor.py | alemuro/home-assistant | 9b1315d8e55f0ca906c4c8a1b2ae8c2ea511dc90 | [
"Apache-2.0"
] | 2 | 2019-01-21T05:49:23.000Z | 2019-02-19T16:30:48.000Z | """Support for Efergy sensors."""
import logging
import requests
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import CONF_CURRENCY, POWER_WATT, ENERGY_KILO_WATT_HOUR
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity ... | 34.874251 | 87 | 0.59375 |
4cba9dd9e5f356b28d16d367ad02558cf6cac400 | 1,126 | py | Python | other/DHT22.py | Ethan7102/FYP | c6560a0b95ad78d5e1a341ab2d93c063e10c6631 | [
"MIT"
] | null | null | null | other/DHT22.py | Ethan7102/FYP | c6560a0b95ad78d5e1a341ab2d93c063e10c6631 | [
"MIT"
] | null | null | null | other/DHT22.py | Ethan7102/FYP | c6560a0b95ad78d5e1a341ab2d93c063e10c6631 | [
"MIT"
] | 1 | 2021-01-23T07:59:57.000Z | 2021-01-23T07:59:57.000Z | #!/usr/bin/python
import os
import sys
import time
import subprocess
try:
import Adafruit_DHT
except ImportError:
subprocess.call([sys.executable, "-m", "pip", "install", "Adafruit_DHT"])
finally:
import Adafruit_DHT
DHT_SENSOR = Adafruit_DHT.DHT22
DHT_PIN = 17 # GPIO17, 11th
try:
record = open('/h... | 29.631579 | 108 | 0.5746 |
a21af9c6d1f8214e630b1d6e302893c39d7efa7c | 1,047 | py | Python | Module 3/Chapter 6/camera_capture/upload_picture.py | PacktPublishing/Arduino-Building-exciting-LED-based-projects-and-espionage-devices | 5c49bac5728ab510ef644ccf08f8316a12927730 | [
"MIT"
] | 9 | 2017-05-01T21:01:46.000Z | 2021-11-08T13:11:11.000Z | Module 3/Chapter 6/camera_capture/upload_picture.py | PacktPublishing/Arduino-Building-exciting-LED-based-projects-and-espionage-devices | 5c49bac5728ab510ef644ccf08f8316a12927730 | [
"MIT"
] | null | null | null | Module 3/Chapter 6/camera_capture/upload_picture.py | PacktPublishing/Arduino-Building-exciting-LED-based-projects-and-espionage-devices | 5c49bac5728ab510ef644ccf08f8316a12927730 | [
"MIT"
] | 7 | 2017-07-30T15:42:43.000Z | 2021-04-22T17:27:19.000Z | # coding=utf-8
# Script to upload files to Dropbox
# Import correct libraries
import base64
import sys
from temboo.core.session import TembooSession
from temboo.Library.Dropbox.FilesAndMetadata import UploadFile
print str(sys.argv[1])
# Encode image
with open(str(sys.argv[1]), "rb") as image_file:
encoded_string... | 31.727273 | 75 | 0.820439 |
76b62e22cb04cab7830c25483f67593ad6f81262 | 1,106 | py | Python | arekit/contrib/networks/context/configurations/rcnn.py | nicolay-r/AREk | 19c39ec0dc9a17464cade03b9c4da0c6d1d21191 | [
"MIT"
] | 18 | 2019-12-14T18:43:11.000Z | 2022-03-21T05:55:36.000Z | arekit/contrib/networks/context/configurations/rcnn.py | nicolay-r/AREk | 19c39ec0dc9a17464cade03b9c4da0c6d1d21191 | [
"MIT"
] | 284 | 2020-08-08T20:52:44.000Z | 2022-03-31T05:26:20.000Z | arekit/contrib/networks/context/configurations/rcnn.py | nicolay-r/AREk | 19c39ec0dc9a17464cade03b9c4da0c6d1d21191 | [
"MIT"
] | 1 | 2021-08-07T13:17:43.000Z | 2021-08-07T13:17:43.000Z | import tensorflow as tf
from arekit.contrib.networks.context.configurations.rnn import RNNConfig
from arekit.contrib.networks.tf_helpers.cell_types import CellTypes
class RCNNConfig(RNNConfig):
__context_embedding_size = 300
def __init__(self):
super(RCNNConfig, self).__init__()
super(RCNNCo... | 27.65 | 90 | 0.720615 |
a9ffadef6f20848d51dcb541f822a8aa74ac592f | 3,103 | py | Python | stommel_mpi/stommel_mpi_long_5e4.py | OceanParcels/parcels_efficiency | 69fc2ab3282f544ff40207aa13e671c2b424c0d2 | [
"MIT"
] | null | null | null | stommel_mpi/stommel_mpi_long_5e4.py | OceanParcels/parcels_efficiency | 69fc2ab3282f544ff40207aa13e671c2b424c0d2 | [
"MIT"
] | null | null | null | stommel_mpi/stommel_mpi_long_5e4.py | OceanParcels/parcels_efficiency | 69fc2ab3282f544ff40207aa13e671c2b424c0d2 | [
"MIT"
] | null | null | null | from parcels import (FieldSet, ParticleSet, JITParticle,
Variable, AdvectionRK4)
import numpy as np
import math
from datetime import timedelta as delta
import time as clock
import os
from argparse import ArgumentParser
from mpi4py import MPI
comm = MPI.COMM_WORLD
rank = comm.Get_rank()
size = com... | 27.705357 | 93 | 0.589752 |
3885a903ed8847fb20a71b96d4e80d1a8221ef26 | 1,515 | py | Python | NationalHighSchoolExamDataCrawler/multithreading test 2.py | dewanderelex/WebScrapingTools | 2edcb03b0d00f3f45e4e0c4a4d3aa9f565d49309 | [
"MIT"
] | null | null | null | NationalHighSchoolExamDataCrawler/multithreading test 2.py | dewanderelex/WebScrapingTools | 2edcb03b0d00f3f45e4e0c4a4d3aa9f565d49309 | [
"MIT"
] | null | null | null | NationalHighSchoolExamDataCrawler/multithreading test 2.py | dewanderelex/WebScrapingTools | 2edcb03b0d00f3f45e4e0c4a4d3aa9f565d49309 | [
"MIT"
] | null | null | null | import multiprocessing,time, bs4, requests, os, xlsxwriter
from multiprocessing import Pool
start_time = time.time()
workbook = xlsxwriter.Workbook('PhoDiemData3.xlsx')
worksheet = workbook.add_worksheet()
class sV:
row = 2
col = 0
def generateID(n):
canID = str(n)
count = 0
num = n
while num ... | 28.584906 | 95 | 0.615842 |
b97cc8a9d46e79c97ec3c57e187d406969a36617 | 10,716 | py | Python | salt/modules/augeas_cfg.py | BuildOps/salt | 20ddd4c29dde31baff36bbd81082db76d22f080a | [
"Apache-2.0"
] | null | null | null | salt/modules/augeas_cfg.py | BuildOps/salt | 20ddd4c29dde31baff36bbd81082db76d22f080a | [
"Apache-2.0"
] | null | null | null | salt/modules/augeas_cfg.py | BuildOps/salt | 20ddd4c29dde31baff36bbd81082db76d22f080a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Manages configuration files via augeas
This module requires the ``augeas`` Python module.
.. _Augeas: http://augeas.net/
.. warning::
Minimal installations of Debian and Ubuntu have been seen to have packaging
bugs with python-augeas, causing the augeas module to fail to import. ... | 26.072993 | 111 | 0.552352 |
43239516e775cf950e0ecd24d140a40b1583b009 | 2,696 | py | Python | chaco/selectable_overlay_container.py | burnpanck/chaco | 6457cdd28625991ba69fbbee105051cab237aa51 | [
"BSD-3-Clause"
] | 3 | 2017-09-17T17:32:06.000Z | 2022-03-15T13:04:43.000Z | chaco/selectable_overlay_container.py | burnpanck/chaco | 6457cdd28625991ba69fbbee105051cab237aa51 | [
"BSD-3-Clause"
] | null | null | null | chaco/selectable_overlay_container.py | burnpanck/chaco | 6457cdd28625991ba69fbbee105051cab237aa51 | [
"BSD-3-Clause"
] | 5 | 2015-05-17T16:08:11.000Z | 2021-02-23T09:23:42.000Z | """ Defines the SelectableOverlayPlotContainer class.
"""
from __future__ import with_statement
from numpy import array, float64
# Enthought library imports
from traits.api import Bool, Float, Enum
from enable.api import ColorTrait
# Local imports
from plot_containers import OverlayPlotContainer
class SelectableOv... | 36.931507 | 81 | 0.64503 |
11a2a7533a8d263525d362d9fe0b4d5f457e6dc5 | 423 | py | Python | examples/variable_args.py | aczh/zmqpc | 49c45e0392d671c3c07f4b1aac2bb9f1af33533f | [
"MIT"
] | null | null | null | examples/variable_args.py | aczh/zmqpc | 49c45e0392d671c3c07f4b1aac2bb9f1af33533f | [
"MIT"
] | 1 | 2019-07-18T07:21:00.000Z | 2019-07-18T07:21:00.000Z | examples/variable_args.py | aczh/zmqpc | 49c45e0392d671c3c07f4b1aac2bb9f1af33533f | [
"MIT"
] | null | null | null | '''
Example of publishing more args than callback receives.
'''
import time
from zmqpc import Events
from resources import logging_config
pub = Events()
sub = Events()
def on_message(arg1, kwarg1=None, kwarg2=None):
print(arg1)
print(kwarg1)
print(kwarg2)
sub.connect(on_message, 'apple')
for i in range(... | 21.15 | 94 | 0.706856 |
e324ce354412d4f593f22565a94fcbedf7be3ea5 | 277 | py | Python | fpo-api/api/models/Region.py | seeker25/violation-dispute-form | 2e919ac4bff000dc7e044ee71790106a742ca1cf | [
"Apache-2.0"
] | null | null | null | fpo-api/api/models/Region.py | seeker25/violation-dispute-form | 2e919ac4bff000dc7e044ee71790106a742ca1cf | [
"Apache-2.0"
] | 11 | 2020-05-28T13:28:50.000Z | 2022-02-27T01:02:08.000Z | fpo-api/api/models/Region.py | seeker25/violation-dispute-form | 2e919ac4bff000dc7e044ee71790106a742ca1cf | [
"Apache-2.0"
] | 6 | 2020-05-28T13:28:59.000Z | 2020-06-15T15:14:03.000Z | from django.db import models
class Region(models.Model):
def __str__(self):
return self.name
id = models.AutoField(
auto_created=True, primary_key=True, serialize=False, verbose_name="ID"
)
name = models.CharField(blank=True, max_length=255)
| 23.083333 | 79 | 0.689531 |
47f4458b404de642ee05a225cb17599efdc13b73 | 11,522 | py | Python | vtpl_api/models/source_end_point.py | vtpl1/videonetics_api | bef179df12f449db0c50c3910daca50b7d40ac49 | [
"RSA-MD"
] | null | null | null | vtpl_api/models/source_end_point.py | vtpl1/videonetics_api | bef179df12f449db0c50c3910daca50b7d40ac49 | [
"RSA-MD"
] | 1 | 2021-02-26T07:31:37.000Z | 2021-02-26T07:31:37.000Z | vtpl_api/models/source_end_point.py | vtpl1/videonetics_api | bef179df12f449db0c50c3910daca50b7d40ac49 | [
"RSA-MD"
] | 2 | 2020-11-04T02:52:55.000Z | 2020-11-05T08:09:50.000Z | # coding: utf-8
"""
Engine api
Engine APIs # noqa: E501
OpenAPI spec version: 1.0.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class SourceEndPoint(object):
"""NOTE: This class is auto generated by the swagger cod... | 26.857809 | 223 | 0.576983 |
5f429a84c6885a534cb65cd57cea330a10c23df2 | 1,226 | py | Python | Pyto/Samples/SciKit-Image/plot_contours.py | snazari/Pyto | bcea7bbef35cab21ce73087b1a0c00a07d07ec72 | [
"MIT"
] | 701 | 2018-10-22T11:54:09.000Z | 2022-03-31T14:39:30.000Z | Pyto/Samples/SciKit-Image/plot_contours.py | snazari/Pyto | bcea7bbef35cab21ce73087b1a0c00a07d07ec72 | [
"MIT"
] | 229 | 2018-10-24T09:15:31.000Z | 2021-12-24T16:51:37.000Z | Pyto/Samples/SciKit-Image/plot_contours.py | Wristlebane/Pyto | 901ac307b68486d8289105c159ca702318bea5b0 | [
"MIT"
] | 131 | 2018-11-25T18:33:03.000Z | 2022-03-24T03:18:07.000Z | """
===============
Contour finding
===============
We use a marching squares method to find constant valued contours in an image.
In ``skimage.measure.find_contours``, array values are linearly interpolated
to provide better precision of the output contours. Contours which intersect
the image edge are open; all other... | 29.190476 | 78 | 0.722675 |
097575451823b1258ab0bc1980eaa94be38bf030 | 772 | py | Python | Basics/E00_Installation/E03_TestInstall.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Basics/E00_Installation/E03_TestInstall.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Basics/E00_Installation/E03_TestInstall.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# www.pagebot.io
# Licensed under MIT conditions
#
# -----------------------------------------------------------------------------
#
# E03_Te... | 17.953488 | 79 | 0.582902 |
95601bf7a654c02b833503515997e551354d2d74 | 79,687 | py | Python | numba/ir_utils.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | numba/ir_utils.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | numba/ir_utils.py | mawanda-jun/numba | 8c6658375c1f8fe50e1a5ccd11d4e7bf5a8053de | [
"BSD-2-Clause",
"Apache-2.0"
] | 1 | 2020-09-18T15:03:46.000Z | 2020-09-18T15:03:46.000Z | #
# Copyright (c) 2017 Intel Corporation
# SPDX-License-Identifier: BSD-2-Clause
#
from __future__ import print_function, absolute_import
import numpy
import types as pytypes
import collections
import operator
import warnings
from llvmlite import ir as lir
import numba
from numba.six import exec_
from numba import ... | 39.390509 | 109 | 0.601127 |
66ddf371dd8a4c22bd198cec9d1bcf8dcf8cf976 | 1,832 | py | Python | haas_lib_bundles/python/docs/examples/auto_humidifier/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/auto_humidifier/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/auto_humidifier/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | import utime # 延时函数在utime库中
from driver import GPIO,I2C
import sht3x
from ssd1306 import SSD1306_I2C
hum_s = 0
oled = None
sht3xDev = None
humi_gpio = None
def sht3x_init():
global sht3xDev
i2cDev = I2C()
i2cDev.open("sht3x")
sht3xDev = sht3x.SHT3X(i2cDev)
def humi_ctrl_init():
global humi_gpi... | 23.189873 | 80 | 0.554585 |
3798f4850bb8029f1e41e69a58f384763cfdff1d | 6,023 | py | Python | project-bikesharing/my_answers.py | david-ma/deep-learning-v2-pytorch | f265de19c3445b912aa03a3c37b664ddc963515b | [
"MIT"
] | null | null | null | project-bikesharing/my_answers.py | david-ma/deep-learning-v2-pytorch | f265de19c3445b912aa03a3c37b664ddc963515b | [
"MIT"
] | null | null | null | project-bikesharing/my_answers.py | david-ma/deep-learning-v2-pytorch | f265de19c3445b912aa03a3c37b664ddc963515b | [
"MIT"
] | null | null | null | import numpy as np
import math
class NeuralNetwork(object):
def __init__(self, input_nodes, hidden_nodes, output_nodes, learning_rate):
# Set number of nodes in input, hidden and output layers.
self.input_nodes = input_nodes
self.hidden_nodes = hidden_nodes
self.output_nodes = outpu... | 40.153333 | 115 | 0.603022 |
f94cc4cb6efee784b431aa2ef50c539cfe0dd5eb | 5,182 | py | Python | tools/hikyuu/test/Indicator.py | CodingNowNow/jiaoyi | 57513f8cf0d282fa70ac9e8e76ff785d7a2a019c | [
"MIT"
] | 2 | 2020-05-01T06:23:14.000Z | 2020-05-21T02:42:48.000Z | hikyuu/test/Indicator.py | allen9mu/hikyuu | bed68183029e5a653e3e0ad53510036605e1d610 | [
"MIT"
] | 1 | 2019-04-16T03:23:15.000Z | 2019-04-16T03:23:15.000Z | hikyuu/test/Indicator.py | archya/hikyuu | 2305a977a78bab832bf8fcb4d66482dfef442c9d | [
"MIT"
] | 1 | 2020-03-31T16:45:23.000Z | 2020-03-31T16:45:23.000Z | #!/usr/bin/python
# -*- coding: utf8 -*-
# gb18030
#===============================================================================
# 作者:fasiondog
# 历史:1)20130220, Added by fasiondog
#===============================================================================
import unittest
from test_init import *
from hikyuu.i... | 31.02994 | 80 | 0.50521 |
7650ac46e9a8732e55832476c00625c10ba0aa49 | 28,516 | py | Python | test/functional/wallet_bumpfee.py | tcoin01/Agrocoin | d0d1f7c4c0c35320618432454381c98a8e4ec282 | [
"MIT"
] | null | null | null | test/functional/wallet_bumpfee.py | tcoin01/Agrocoin | d0d1f7c4c0c35320618432454381c98a8e4ec282 | [
"MIT"
] | null | null | null | test/functional/wallet_bumpfee.py | tcoin01/Agrocoin | d0d1f7c4c0c35320618432454381c98a8e4ec282 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2016-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the bumpfee RPC.
Verifies that the bumpfee RPC creates replacement transactions successfully when... | 48.168919 | 175 | 0.714686 |
c0347fdc41fc7f37ebec12239c29a81d1603c793 | 12,630 | py | Python | app/objects/secondclass/c_link.py | Mati607/caldera | 895c3ff84715aa7333ea02545ba8d022cbc9e053 | [
"Apache-2.0"
] | null | null | null | app/objects/secondclass/c_link.py | Mati607/caldera | 895c3ff84715aa7333ea02545ba8d022cbc9e053 | [
"Apache-2.0"
] | null | null | null | app/objects/secondclass/c_link.py | Mati607/caldera | 895c3ff84715aa7333ea02545ba8d022cbc9e053 | [
"Apache-2.0"
] | null | null | null | import asyncio
import logging
import uuid
from base64 import b64decode
from datetime import datetime
from importlib import import_module
import marshmallow as ma
from app.objects.c_ability import Ability, AbilitySchema
from app.objects.secondclass.c_executor import Executor, ExecutorSchema
from app.objects.secondclas... | 40.610932 | 121 | 0.608709 |
ed8e3e0852f9e319770dc5967116921e868e41fa | 283 | py | Python | django_deployer/paas_templates/wsgi.py | natea/django-deployer | 5ce7d972db2f8500ec53ad89e7eb312d3360d074 | [
"MIT"
] | 19 | 2015-02-06T06:14:39.000Z | 2021-01-06T22:27:03.000Z | django_deployer/paas_templates/wsgi.py | natea/django-deployer | 5ce7d972db2f8500ec53ad89e7eb312d3360d074 | [
"MIT"
] | null | null | null | django_deployer/paas_templates/wsgi.py | natea/django-deployer | 5ce7d972db2f8500ec53ad89e7eb312d3360d074 | [
"MIT"
] | 2 | 2015-12-22T17:22:15.000Z | 2016-03-02T12:15:01.000Z | import os
import sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),'{{ project_name }}')))
os.environ['DJANGO_SETTINGS_MODULE'] = '{{ django_settings }}_{{ provider }}'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler() | 47.166667 | 97 | 0.756184 |
bb69408c747c2afc01ea4cd232f6866edf4a14c7 | 5,870 | py | Python | Python/pylint/checkers/one_dot_per_line.py | codecop/LCD-Numbers-Object-Calisthenics-Kata | 8556fad369634f16a6803d0e286c189e29660258 | [
"BSD-3-Clause"
] | 1 | 2021-04-26T19:23:20.000Z | 2021-04-26T19:23:20.000Z | Python/pylint/checkers/one_dot_per_line.py | codecop/LCD-Numbers-Object-Calisthenics-Kata | 8556fad369634f16a6803d0e286c189e29660258 | [
"BSD-3-Clause"
] | null | null | null | Python/pylint/checkers/one_dot_per_line.py | codecop/LCD-Numbers-Object-Calisthenics-Kata | 8556fad369634f16a6803d0e286c189e29660258 | [
"BSD-3-Clause"
] | null | null | null | """checks for Object Calisthenics rule 5: One dot per line."""
import astroid
from pylint.checkers import BaseChecker
from pylint.checkers.utils import check_messages
from pylint.interfaces import IAstroidChecker
class ChainedCallsChecker(BaseChecker):
"""checks chain with call in the end."""
__i... | 38.366013 | 88 | 0.553663 |
0671503e7e1ae7df196318452360b0d62609eed0 | 1,373 | py | Python | config/middleware.py | lucyliu94/remindersapp_backend | 5efd3e5d2a134887bb01cffbb1a9246752f48934 | [
"MIT"
] | 1 | 2021-12-27T20:48:55.000Z | 2021-12-27T20:48:55.000Z | config/middleware.py | DonovanGallaway/sheet-music-backend | 9e00e2f511df297ce5125aca5c766fe4de5ec283 | [
"MIT"
] | null | null | null | config/middleware.py | DonovanGallaway/sheet-music-backend | 9e00e2f511df297ce5125aca5c766fe4de5ec283 | [
"MIT"
] | null | null | null | """Middleware Configuration Settings."""
from masonite.middleware import (
ResponseMiddleware,
MaintenanceModeMiddleware,
GuardMiddleware,
)
from app.http.middleware.AuthenticationMiddleware import AuthenticationMiddleware
from app.http.middleware.CsrfMiddleware import CsrfMiddleware
from app.http.middlew... | 29.847826 | 85 | 0.764749 |
9b10a2adc8193cf3b9a07d7043d44ed6956e3e7e | 392 | py | Python | form_builders/urls.py | Jirayr-Solvee/django-form-builders | e681a917dc707e4e014def660624f27008d67092 | [
"MIT"
] | 6 | 2020-12-01T01:27:54.000Z | 2021-09-03T21:52:55.000Z | form_builders/urls.py | Jirayr-Solvee/django-form-builders | e681a917dc707e4e014def660624f27008d67092 | [
"MIT"
] | null | null | null | form_builders/urls.py | Jirayr-Solvee/django-form-builders | e681a917dc707e4e014def660624f27008d67092 | [
"MIT"
] | null | null | null | from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from . import views
urlpatterns = [
path("create", views.index),
path("new-form", csrf_exempt(views.create_form)),
path("get-forms-list", csrf_exempt(views.get_forms_list)),
path("get-form-data/<int:pk>/", csrf_exempt(v... | 28 | 65 | 0.716837 |
5a5549575a101441b0afbd741581d2aeae96622e | 13,872 | py | Python | world/dominion/migrations/0013_auto_20171029_1416.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 5 | 2019-03-16T08:26:53.000Z | 2019-11-27T15:42:16.000Z | world/dominion/migrations/0013_auto_20171029_1416.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 7 | 2018-09-29T05:08:15.000Z | 2021-06-10T21:35:32.000Z | world/dominion/migrations/0013_auto_20171029_1416.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 7 | 2018-09-19T21:11:29.000Z | 2019-11-19T12:46:14.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-10-29 14:16
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
# can't access Class constants in migrations, so we need to copy them here. No way around the DRY... | 41.285714 | 120 | 0.565456 |
eeefc24051c82a59a934934828dc3d46d26af675 | 3,315 | py | Python | pyscf/prop/nsr/uhf.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | 1 | 2019-01-25T08:00:22.000Z | 2019-01-25T08:00:22.000Z | pyscf/prop/nsr/uhf.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | null | null | null | pyscf/prop/nsr/uhf.py | robert-anderson/pyscf | cdc56e168cb15f47e8cdc791a92d689fa9b655af | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... | 30.412844 | 76 | 0.625641 |
cb20dbbedae4758e08f3a3ee29b7f7c0b008f8c4 | 141 | py | Python | Ejercicio 9/ejercicio9(1).py | migueliiin/Individual | b5e6de3b595f761d073970103c4db00a58e28a8e | [
"Apache-2.0"
] | null | null | null | Ejercicio 9/ejercicio9(1).py | migueliiin/Individual | b5e6de3b595f761d073970103c4db00a58e28a8e | [
"Apache-2.0"
] | null | null | null | Ejercicio 9/ejercicio9(1).py | migueliiin/Individual | b5e6de3b595f761d073970103c4db00a58e28a8e | [
"Apache-2.0"
] | null | null | null | n1=float(input('Numero 1:'))
n2=float(input('Numero 2:'))
n3=float(input('Numero 3:'))
media=(n1+n2+n3)/3
print('La media es de '+str(media)) | 28.2 | 35 | 0.659574 |
04c9c5ba7ad140ebdca3e24acd80b48523f7205e | 6,763 | py | Python | uditransfer/configuration.py | xudesheng/uditransfer | 63d84741ac70434de19b5f19fab884b1e71aa81d | [
"Apache-2.0"
] | null | null | null | uditransfer/configuration.py | xudesheng/uditransfer | 63d84741ac70434de19b5f19fab884b1e71aa81d | [
"Apache-2.0"
] | null | null | null | uditransfer/configuration.py | xudesheng/uditransfer | 63d84741ac70434de19b5f19fab884b1e71aa81d | [
"Apache-2.0"
] | null | null | null | import sys
import os
import logging
import codecs
from ConfigParser import SafeConfigParser
import ConfigParser
class monitor_configuration():
def __init__(self, configuration_file):
self.folder_localinbox = None
self.folder_localoutbox = None
self.folder_remoteinbox = None
self.fo... | 35.408377 | 103 | 0.63803 |
a2283719772e805803a5f3363f3031411888442f | 200 | py | Python | practicals/week2-3/problem3.py | armgabrielyan/intro-to-python | 6a2abdab543b36c6412c8d9515d9078b93de7443 | [
"MIT"
] | null | null | null | practicals/week2-3/problem3.py | armgabrielyan/intro-to-python | 6a2abdab543b36c6412c8d9515d9078b93de7443 | [
"MIT"
] | null | null | null | practicals/week2-3/problem3.py | armgabrielyan/intro-to-python | 6a2abdab543b36c6412c8d9515d9078b93de7443 | [
"MIT"
] | null | null | null | n1 = int(input('Enter the first number: '))
n2 = int(input('Enter the second number: '))
if n1 > n2:
print(f'The number {n1} is the greatest')
else:
print(f'The number {n2} is the greatest')
| 25 | 45 | 0.645 |
5825038bc5b8284d38500ebd9b7a8571a93cccfe | 394 | py | Python | pytab/__init__.py | HiroshiARAKI/ptable | 4ba75038450949dbe1553769a15d60bdcd20509f | [
"MIT"
] | 1 | 2020-11-30T12:05:52.000Z | 2020-11-30T12:05:52.000Z | pytab/__init__.py | HiroshiARAKI/pytable | 4ba75038450949dbe1553769a15d60bdcd20509f | [
"MIT"
] | null | null | null | pytab/__init__.py | HiroshiARAKI/pytable | 4ba75038450949dbe1553769a15d60bdcd20509f | [
"MIT"
] | null | null | null | """
pyTable
-- A wrapped useful and tiny library to plot Table worked on MatplotLib.
Copyright (c) 2020 HiroshiARAKI All Rights Reserved.
:website https://hirlab.net/nblog
:author Hiroshi ARAKI
:mail araki@hirlab.net
:License MIT
"""
from .table import (
table,
show,
save,
show_col... | 17.909091 | 72 | 0.670051 |
45070c1a154831ec5137c9f1b70417f32d2b7807 | 142 | py | Python | src/python/py_io.py | SnailDev/SnailDev.Laboratory | e698c75b41e3a96d694424f296a96143da699ada | [
"MIT"
] | null | null | null | src/python/py_io.py | SnailDev/SnailDev.Laboratory | e698c75b41e3a96d694424f296a96143da699ada | [
"MIT"
] | null | null | null | src/python/py_io.py | SnailDev/SnailDev.Laboratory | e698c75b41e3a96d694424f296a96143da699ada | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# 打开一个文件
f = open("C:/Users/myjac/Desktop/vcode.txt", "r")
for line in f:
print(line, end='')
# 关闭打开的文件
f.close()
| 10.923077 | 49 | 0.605634 |
5407c99e8e2947c2cb20ce6a8a14dcba308562e5 | 7,799 | py | Python | elb-instances-dumper.py | iamnavpreet/aws-loadbalancer-instance-dumper | fe062edbf63b4f4b7f549094a2f2575102521b7f | [
"MIT"
] | null | null | null | elb-instances-dumper.py | iamnavpreet/aws-loadbalancer-instance-dumper | fe062edbf63b4f4b7f549094a2f2575102521b7f | [
"MIT"
] | null | null | null | elb-instances-dumper.py | iamnavpreet/aws-loadbalancer-instance-dumper | fe062edbf63b4f4b7f549094a2f2575102521b7f | [
"MIT"
] | null | null | null | import boto3
import logging
import argparse
from botocore.exceptions import ClientError
from pprint import pprint
import json
def cli_args():
"""
Setting up the cli arguments and help messages.
:return: parsed arguments
:rtype: Dict
"""
parser = argparse.ArgumentParser(description="Dump List o... | 36.443925 | 111 | 0.581485 |
056b5ace2cafe5a07677ffe76c9f62d81bab091d | 1,418 | py | Python | src/adobe/pdfservices/operation/internal/http/http_request.py | hvntravel/pdfservices-python-sdk | af2511604dc2558e43c6be44692fb9faa0e3e8d8 | [
"Apache-2.0"
] | 2 | 2021-11-19T10:00:53.000Z | 2022-01-30T21:19:50.000Z | src/adobe/pdfservices/operation/internal/http/http_request.py | hvntravel/pdfservices-python-sdk | af2511604dc2558e43c6be44692fb9faa0e3e8d8 | [
"Apache-2.0"
] | 1 | 2021-06-26T15:17:21.000Z | 2021-06-26T15:17:21.000Z | src/adobe/pdfservices/operation/internal/http/http_request.py | hvntravel/pdfservices-python-sdk | af2511604dc2558e43c6be44692fb9faa0e3e8d8 | [
"Apache-2.0"
] | 2 | 2022-01-02T16:01:02.000Z | 2022-03-24T01:23:14.000Z | # Copyright 2021 Adobe. All rights reserved.
# This file is licensed to you 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... | 50.642857 | 117 | 0.744711 |
82a6c46b9ef254f458820145b8c392c2d1b2ecb3 | 338 | py | Python | hello.py | hnryu0311/branch-practice | 58370ac759ef41c0fa3df716d9cc9d19c9e1bdfc | [
"MIT"
] | null | null | null | hello.py | hnryu0311/branch-practice | 58370ac759ef41c0fa3df716d9cc9d19c9e1bdfc | [
"MIT"
] | null | null | null | hello.py | hnryu0311/branch-practice | 58370ac759ef41c0fa3df716d9cc9d19c9e1bdfc | [
"MIT"
] | null | null | null | for i in range(1,100+1):
if i % 3 == 0 or i % 5==0:
print("fizz"*(i%3==0) + "buzz"*(i%5==0))
else:
print(i)
#for i in range(1, 100):
# if i % 3 == 0:
# print("fizz")
# elif i % 5 == 0:
# print("buzz")
# elif i % 15 == 0:
# print("fizzbuzz")
# else:
# print(... | 18.777778 | 48 | 0.39645 |
fdb5554093a20ceff199db26772816db1bbe6922 | 1,418 | py | Python | test_slices.py | mgrosvenor/captian | 8aa25f67342421cd78f7765e59538af0f348fb33 | [
"BSD-3-Clause"
] | 3 | 2015-07-17T02:31:28.000Z | 2015-12-16T11:42:01.000Z | test_slices.py | mgrosvenor/captian | 8aa25f67342421cd78f7765e59538af0f348fb33 | [
"BSD-3-Clause"
] | null | null | null | test_slices.py | mgrosvenor/captian | 8aa25f67342421cd78f7765e59538af0f348fb33 | [
"BSD-3-Clause"
] | 1 | 2016-12-18T15:29:41.000Z | 2016-12-18T15:29:41.000Z | #! /usr/bin/python
# Copyright (c) 2015, Matthew P. Grosvenor
# All rights reserved. See LICENSE for more details
import sys
import redo
hosts = ["test%i" % x for x in range(0,15)]
redo = redo.Redo(hosts)
tests_index = [-1,1,"test7"]
results = ["['test14']", "['test1']", "['test7']"]
i = 1
for i in range(0,len(r... | 26.754717 | 95 | 0.53385 |
781619a21b840b8535aa41b48e5cdf61edeb69fc | 4,585 | py | Python | build/lib/data_xray/scan/scanviz.py | amplifilo/data-xray | c68c9b352efde0776189210794aeef84ae2cf6c2 | [
"Apache-2.0"
] | null | null | null | build/lib/data_xray/scan/scanviz.py | amplifilo/data-xray | c68c9b352efde0776189210794aeef84ae2cf6c2 | [
"Apache-2.0"
] | null | null | null | build/lib/data_xray/scan/scanviz.py | amplifilo/data-xray | c68c9b352efde0776189210794aeef84ae2cf6c2 | [
"Apache-2.0"
] | null | null | null | from ..modules import *
#####SXM IMAGE FILES
##this is the new version working with xarray dataset
#from plotly import tools
from tqdm import tqdm
#list of functions for image analysis
def AxesColorLimits(arr2d):
return [np.mean(arr2d) - 3*np.std(arr2d/np.max(arr2d)),np.mean(arr2d) + 3*np.std(arr2d/np.max(arr2d)... | 32.288732 | 106 | 0.601963 |
74b42ee296c889a3d621675841bbfad457648ee4 | 1,781 | py | Python | zvt/recorders/joinquant/common.py | DrXin/zvt | 55040c8a27fae97367f255975bb160101fba5d9a | [
"MIT"
] | null | null | null | zvt/recorders/joinquant/common.py | DrXin/zvt | 55040c8a27fae97367f255975bb160101fba5d9a | [
"MIT"
] | null | null | null | zvt/recorders/joinquant/common.py | DrXin/zvt | 55040c8a27fae97367f255975bb160101fba5d9a | [
"MIT"
] | 1 | 2020-12-15T10:38:49.000Z | 2020-12-15T10:38:49.000Z | # -*- coding: utf-8 -*-
from zvt.contract import IntervalLevel
from zvt.domain import ReportPeriod
def to_jq_trading_level(trading_level: IntervalLevel):
if trading_level < IntervalLevel.LEVEL_1HOUR:
return trading_level.value
if trading_level == IntervalLevel.LEVEL_1HOUR:
return '60m'
if... | 32.381818 | 91 | 0.678832 |
7a621dc2ef708a15f3a404148913f018bf6c35e0 | 4,383 | py | Python | regrippy/plugins/networkinfo.py | timtaylor3/regrippy | 30b84198b208f0d4a4fc2646b9b149fafa83494c | [
"Apache-2.0"
] | null | null | null | regrippy/plugins/networkinfo.py | timtaylor3/regrippy | 30b84198b208f0d4a4fc2646b9b149fafa83494c | [
"Apache-2.0"
] | null | null | null | regrippy/plugins/networkinfo.py | timtaylor3/regrippy | 30b84198b208f0d4a4fc2646b9b149fafa83494c | [
"Apache-2.0"
] | null | null | null | # Plugin written by Tim Taylor, timtaylor3@yahoo.com
from datetime import datetime
from regrippy import BasePlugin, PluginResult, mactime
class Plugin(BasePlugin):
__REGHIVE__ = ["SOFTWARE", "SYSTEM"]
def run(self):
if self.hive_name == "SOFTWARE":
path = "Microsoft\\Windows NT\\CurrentVe... | 40.962617 | 115 | 0.41159 |
ff272d5bbc5a321df1391cfd8469f7c9a451e2c7 | 1,315 | py | Python | test/functional/feature_shutdown.py | bitcoinrtx/bitcoinrtx | 00bcd7e3674174460bb0704e2f61aaad813db6fb | [
"MIT"
] | null | null | null | test/functional/feature_shutdown.py | bitcoinrtx/bitcoinrtx | 00bcd7e3674174460bb0704e2f61aaad813db6fb | [
"MIT"
] | null | null | null | test/functional/feature_shutdown.py | bitcoinrtx/bitcoinrtx | 00bcd7e3674174460bb0704e2f61aaad813db6fb | [
"MIT"
] | 1 | 2021-02-27T15:32:44.000Z | 2021-02-27T15:32:44.000Z | #!/usr/bin/env python3
#
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoind shutdown."""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal, get_rpc_proxy, wa... | 37.571429 | 103 | 0.714068 |
eb89c69ca2eba7764d4456ba97bdb2a63c5dba8b | 2,503 | py | Python | tests/speed_test.py | ajakubek/python-sha3 | 1ceadda69d9f657fa164980314c21314275ea819 | [
"CC0-1.0"
] | 2 | 2017-06-26T18:54:56.000Z | 2021-11-09T10:17:15.000Z | tests/speed_test.py | ajakubek/python-sha3 | 1ceadda69d9f657fa164980314c21314275ea819 | [
"CC0-1.0"
] | 1 | 2015-12-01T22:25:22.000Z | 2015-12-02T01:24:07.000Z | tests/speed_test.py | ajakubek/python-sha3 | 1ceadda69d9f657fa164980314c21314275ea819 | [
"CC0-1.0"
] | null | null | null | import itertools
import sha3
import sys
import threading
import timeit
def pow2(first_exp, exp_limit):
return [2**exp for exp in range(first_exp, exp_limit)]
def sha_bench_factory(sha_type, update_size, total_size=4*1024*1024):
assert update_size <= total_size
vector = '\0' * update_size
def sha_be... | 33.373333 | 83 | 0.691171 |
dd8837b536e46bcc996f7720bd8269a31c0c8fb2 | 2,568 | py | Python | dotcloud/client/response.py | shykes/dotcloud-cli | 62d0f089de53834446ad0fe8a65863b10275f4ee | [
"MIT"
] | 1 | 2017-05-03T14:44:52.000Z | 2017-05-03T14:44:52.000Z | dotcloud/client/response.py | shykes/dotcloud-cli | 62d0f089de53834446ad0fe8a65863b10275f4ee | [
"MIT"
] | null | null | null | dotcloud/client/response.py | shykes/dotcloud-cli | 62d0f089de53834446ad0fe8a65863b10275f4ee | [
"MIT"
] | null | null | null | import json
import httplib # only for exception
def bytes_to_lines(stream):
"""Reads single bytes from stream, emits lines.
This hack makes me sick, but requests makes this impossible
to do reliably, otherwise."""
line = ""
for byte in stream:
line += byte
if line.endswi... | 25.939394 | 81 | 0.562695 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.