hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a176365969ad2eb5bafa9d7782f054b890effc0 | 803 | py | Python | manage.py | dumel93/project- | f9ad52d9c8449953e2151fd1c13b39631113eea7 | [
"MIT"
] | 3 | 2019-03-15T23:43:26.000Z | 2021-07-05T10:21:48.000Z | manage.py | dumel93/project- | f9ad52d9c8449953e2151fd1c13b39631113eea7 | [
"MIT"
] | null | null | null | manage.py | dumel93/project- | f9ad52d9c8449953e2151fd1c13b39631113eea7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "typer.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that the
... | 34.913043 | 77 | 0.641345 |
4a17644a3fc03e3381aefecc3c3a08464b190760 | 6,759 | py | Python | src/datadog_api_client/v2/model/relationship_to_user_data.py | mrhwick/datadog-api-client-python | 9f57bf378b80b7558070087182722f4ca88d630d | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/relationship_to_user_data.py | mrhwick/datadog-api-client-python | 9f57bf378b80b7558070087182722f4ca88d630d | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v2/model/relationship_to_user_data.py | mrhwick/datadog-api-client-python | 9f57bf378b80b7558070087182722f4ca88d630d | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
import nulltype # ... | 39.994083 | 121 | 0.586033 |
4a1764654b2959aaa0d4e8dfe74ebd572de731f1 | 1,156 | py | Python | environment/Lib/site-packages/openpyxl/chart/picture.py | pumbas600/CriticalPath | 31889c875dedf733aeb9a4ebeba8bf8930e86176 | [
"MIT"
] | 6 | 2019-12-07T07:30:34.000Z | 2022-01-20T14:26:44.000Z | environment/Lib/site-packages/openpyxl/chart/picture.py | pumbas600/CriticalPath | 31889c875dedf733aeb9a4ebeba8bf8930e86176 | [
"MIT"
] | 11 | 2020-06-06T01:28:35.000Z | 2022-03-12T00:16:34.000Z | environment/Lib/site-packages/openpyxl/chart/picture.py | pumbas600/CriticalPath | 31889c875dedf733aeb9a4ebeba8bf8930e86176 | [
"MIT"
] | 1 | 2021-06-29T11:46:07.000Z | 2021-06-29T11:46:07.000Z | # Copyright (c) 2010-2019 openpyxl
from openpyxl.descriptors.serialisable import Serialisable
from openpyxl.descriptors.nested import (
NestedBool,
NestedFloat,
NestedMinMax,
NestedNoneSet,
)
class PictureOptions(Serialisable):
tagname = "pictureOptions"
applyToFront = NestedBool(allow_none... | 32.111111 | 102 | 0.676471 |
4a1764b56ddc665fae993e48f9aefbea177e6cf9 | 9,480 | py | Python | tests/unit/python/foglamp/services/core/api/test_support.py | ashwinscale/FogLAMP | dac6f286d31978b6ce00303df8398ea5b2031d79 | [
"Apache-2.0"
] | null | null | null | tests/unit/python/foglamp/services/core/api/test_support.py | ashwinscale/FogLAMP | dac6f286d31978b6ce00303df8398ea5b2031d79 | [
"Apache-2.0"
] | 1 | 2018-05-10T16:04:34.000Z | 2018-05-10T16:04:34.000Z | tests/unit/python/foglamp/services/core/api/test_support.py | ashwinscale/FogLAMP | dac6f286d31978b6ce00303df8398ea5b2031d79 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# FOGLAMP_BEGIN
# See: http://foglamp.readthedocs.io/
# FOGLAMP_END
import json
import pathlib
from pathlib import PosixPath
from unittest.mock import patch, mock_open, Mock, MagicMock
from aiohttp import web
import pytest
from foglamp.services.core import routes
from foglamp.services.core... | 52.087912 | 323 | 0.65865 |
4a176605da5dcd9578355543e7a4efc6fd622399 | 1,977 | py | Python | pymagnitude/third_party/allennlp/tests/modules/seq2seq_encoders/multi_head_self_attention_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 1,520 | 2018-03-01T13:37:49.000Z | 2022-03-25T11:40:20.000Z | pymagnitude/third_party/allennlp/tests/modules/seq2seq_encoders/multi_head_self_attention_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 87 | 2018-03-03T15:12:50.000Z | 2022-02-21T15:24:12.000Z | pymagnitude/third_party/allennlp/tests/modules/seq2seq_encoders/multi_head_self_attention_test.py | tpeng/magnitude | aec98628b5547773ca8c4114ec6d1ad51e21b230 | [
"MIT"
] | 121 | 2018-03-03T08:40:53.000Z | 2022-03-16T05:19:38.000Z | # pylint: disable=invalid-name,no-self-use,too-many-public-methods
from __future__ import absolute_import
import numpy
import torch
from allennlp.common.testing import AllenNlpTestCase
from allennlp.modules.seq2seq_encoders import MultiHeadSelfAttention
from allennlp.common.params import Params
class MultiHeadSelfA... | 43.933333 | 98 | 0.592312 |
4a1768f440a49b2e56c80eb34d28246b74ff2fe6 | 21,788 | py | Python | huaweicloud-sdk-aom/huaweicloudsdkaom/v2/aom_async_client.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-aom/huaweicloudsdkaom/v2/aom_async_client.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-aom/huaweicloudsdkaom/v2/aom_async_client.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
from __future__ import absolute_import
import datetime
import re
import importlib
import six
from huaweicloudsdkcore.client import Client, ClientBuilder
from huaweicloudsdkcore.exceptions import exceptions
from huaweicloudsdkcore.utils import http_utils
from huaweicloudsdkcore.sdk_stream_request imp... | 30.011019 | 113 | 0.628006 |
4a176b06145b76168b3068bf959fe1897e0d477a | 13,075 | py | Python | tests/kafkatest/tests/core/security_rolling_upgrade_test.py | cookingcodewithme/kafka | c534bf45cecb8c06abea699b62084d6aee74705c | [
"Apache-2.0"
] | 2 | 2020-06-24T07:15:17.000Z | 2020-06-24T07:15:20.000Z | tests/kafkatest/tests/core/security_rolling_upgrade_test.py | cookingcodewithme/kafka | c534bf45cecb8c06abea699b62084d6aee74705c | [
"Apache-2.0"
] | 4 | 2021-06-11T09:13:34.000Z | 2022-01-31T09:37:19.000Z | tests/kafkatest/tests/core/security_rolling_upgrade_test.py | cookingcodewithme/kafka | c534bf45cecb8c06abea699b62084d6aee74705c | [
"Apache-2.0"
] | 3 | 2018-07-11T16:56:43.000Z | 2019-04-19T23:58:24.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 use ... | 51.476378 | 132 | 0.749369 |
4a176c8d07ccffce39b81f46dac6f2e489fb251d | 4,050 | py | Python | data_process/handle_n2v.py | MortonWang/geo_IF | 4e27aeb9e005cdfb151777bc730de6d8372d1b7f | [
"MIT"
] | 5 | 2020-06-19T13:39:59.000Z | 2022-03-04T13:05:58.000Z | data_process/handle_n2v.py | MortonWang/geo_IF | 4e27aeb9e005cdfb151777bc730de6d8372d1b7f | [
"MIT"
] | null | null | null | data_process/handle_n2v.py | MortonWang/geo_IF | 4e27aeb9e005cdfb151777bc730de6d8372d1b7f | [
"MIT"
] | null | null | null | '''
Reference implementation of node2vec.
Author: Aditya Grover
For more details, refer to the paper:
node2vec: Scalable Feature Learning for Networks
Aditya Grover and Jure Leskovec
Knowledge Discovery and Data Mining (KDD), 2016
'''
import argparse
import networkx as nx
import numpy as np
from gensim.models impo... | 32.4 | 116 | 0.678025 |
4a176c8d366f9fd00d1b4342ea323b9db685d11c | 6,931 | py | Python | more_configs/config_google_and_zhwikipedia.py | zxq2233/zmirror | a304e36e84948636215b7d8e2c921b94c4e60d26 | [
"MIT"
] | 8 | 2016-10-18T15:17:09.000Z | 2021-07-15T08:36:28.000Z | more_configs/config_google_and_zhwikipedia.py | zxq2233/zmirror | a304e36e84948636215b7d8e2c921b94c4e60d26 | [
"MIT"
] | null | null | null | more_configs/config_google_and_zhwikipedia.py | zxq2233/zmirror | a304e36e84948636215b7d8e2c921b94c4e60d26 | [
"MIT"
] | 4 | 2017-12-20T16:16:16.000Z | 2020-08-04T05:24:15.000Z | # coding=utf-8
# 这是为Google和中文维基(无缝整合)镜像配置的示例配置文件
#
# 使用方法:
# 复制本文件到 zmirror.py 同级目录, 并重命名为 config.py
#
# 各项设置选项的详细介绍请看 config_default.py 中对应的部分
# 本配置文件假定你的服务器本身在墙外
# 如果服务器本身在墙内(或者在本地环境下测试, 请修改`Proxy Settings`中的设置
#
# 由于google搜索结果经常会出现中文维基, 所以顺便把它也加入了.
# google跟中文维基之间使用了本程序的镜像隔离功能, 可以保证中文维基站的正常使用
#
# 本配置文件试图还原出一个功能完整的... | 36.098958 | 114 | 0.700765 |
4a176ced3371416d03eb2716453db5c987880a3b | 228 | py | Python | Homework1/join_methods.py | Tavinson/BigDataClass_HW1 | 017ea807cb7698164c0c5178a1df17660ef383ac | [
"Apache-2.0"
] | null | null | null | Homework1/join_methods.py | Tavinson/BigDataClass_HW1 | 017ea807cb7698164c0c5178a1df17660ef383ac | [
"Apache-2.0"
] | null | null | null | Homework1/join_methods.py | Tavinson/BigDataClass_HW1 | 017ea807cb7698164c0c5178a1df17660ef383ac | [
"Apache-2.0"
] | null | null | null | def join_dataframes_one_column(left,right,column,method):
return left.join(right,column,how=method)
def join_dataframes_two_columns(left,right,column1,column2,method):
return left.join(right, [column1,column2], how=method)
| 32.571429 | 67 | 0.811404 |
4a176d484449b6700f9d296a482f3b9be9991926 | 9,031 | py | Python | contrib/testgen/gen_key_io_test_vectors.py | BlockMechanic/crown | e6b1873ca79c484a3621e503eb8ce464f85dd2c7 | [
"MIT"
] | 1 | 2021-10-12T05:27:56.000Z | 2021-10-12T05:27:56.000Z | contrib/testgen/gen_key_io_test_vectors.py | BlockMechanic/crown | e6b1873ca79c484a3621e503eb8ce464f85dd2c7 | [
"MIT"
] | 15 | 2022-01-14T09:13:52.000Z | 2022-03-21T09:40:29.000Z | contrib/testgen/gen_key_io_test_vectors.py | BlockMechanic/crown | e6b1873ca79c484a3621e503eb8ce464f85dd2c7 | [
"MIT"
] | 2 | 2021-10-12T05:39:32.000Z | 2022-01-03T10:41:04.000Z | #!/usr/bin/env python3
# Copyright (c) 2012-2020 The Crown Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Generate valid and invalid base58 address and private key test vectors.
Usage:
PYTHONPATH=../../tes... | 36.562753 | 133 | 0.617318 |
4a176e955bdbaace6e952007047fad7773c4652b | 4,617 | py | Python | app.py | Jim-Shaddix/Neutron-Scattering-Dashboard | 26f12e8f94db978d5102320a66e67448d03b2733 | [
"MIT"
] | null | null | null | app.py | Jim-Shaddix/Neutron-Scattering-Dashboard | 26f12e8f94db978d5102320a66e67448d03b2733 | [
"MIT"
] | null | null | null | app.py | Jim-Shaddix/Neutron-Scattering-Dashboard | 26f12e8f94db978d5102320a66e67448d03b2733 | [
"MIT"
] | null | null | null | import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from tabs import tabs
"""
This file initializes the application and formats
how the application gets displayed.
"""
# Support for Font Awsome (doesn't seem to work ... )
# html.Script(src="https:/... | 29.787097 | 124 | 0.557288 |
4a176ed8f1aea7c7442a248019a3ffc1ea330b15 | 116 | py | Python | python basics and applications/3/3-3/3-3-6.py | DzmitrySakalenka/stepik_courses | 7c43ac35cd921e8f6f96fb4f15f77ace38cc2d21 | [
"MIT"
] | null | null | null | python basics and applications/3/3-3/3-3-6.py | DzmitrySakalenka/stepik_courses | 7c43ac35cd921e8f6f96fb4f15f77ace38cc2d21 | [
"MIT"
] | null | null | null | python basics and applications/3/3-3/3-3-6.py | DzmitrySakalenka/stepik_courses | 7c43ac35cd921e8f6f96fb4f15f77ace38cc2d21 | [
"MIT"
] | null | null | null | import sys
import re
for line in sys.stdin:
line = line.rstrip()
print(re.sub(r'human', r'computer', line)) | 19.333333 | 46 | 0.663793 |
4a176ff54a1c0cd602a4a976cb461c88c364b58a | 123,292 | py | Python | o/soft_robot/derivation_of_dynamics/derived/ikko_dake/eqs/numpy_style/C0_1.py | YoshimitsuMatsutaIe/ctrlab2021_soudan | 7841c981e6804cc92d34715a00e7c3efce41d1d0 | [
"MIT"
] | null | null | null | o/soft_robot/derivation_of_dynamics/derived/ikko_dake/eqs/numpy_style/C0_1.py | YoshimitsuMatsutaIe/ctrlab2021_soudan | 7841c981e6804cc92d34715a00e7c3efce41d1d0 | [
"MIT"
] | null | null | null | o/soft_robot/derivation_of_dynamics/derived/ikko_dake/eqs/numpy_style/C0_1.py | YoshimitsuMatsutaIe/ctrlab2021_soudan | 7841c981e6804cc92d34715a00e7c3efce41d1d0 | [
"MIT"
] | null | null | null | import numpy
def f(q, q_dot, xi):
l1, l2, l3 = q[0,0], q[1,0], q[2,0]
l1_dot, l2_dot, l3_dot = q_dot[0,0], q_dot[1,0], q_dot[2,0]
return l1_dot*(-2.4045095001e+18*l1**17 + 2.31139995715999e+19*l1**16*l2 + 1.65335189894899e+19*l1**16*l3 - 1.84371441091536e+17*l1**16 - 1.15408521784635e+20*l1**15*l2**2 - 1.2... | 20,548.666667 | 123,153 | 0.680263 |
4a177136674952c3e75060f31ab8d2a9fbacfbad | 12,249 | py | Python | 2021.12.21/Distilling Knowledge via Knowledge Review/code/Detection/model/rcnn.py | ToniChopp/MIRACLE-Paper-Sharing-Album | 72a3843101483fc8b53df2746c488da066eda2a1 | [
"MIT"
] | 7 | 2021-11-01T08:44:06.000Z | 2022-01-10T09:42:34.000Z | 2021.12.21/Distilling Knowledge via Knowledge Review/code/Detection/model/rcnn.py | ToniChopp/MIRACLE-Paper-Sharing-Album | 72a3843101483fc8b53df2746c488da066eda2a1 | [
"MIT"
] | null | null | null | 2021.12.21/Distilling Knowledge via Knowledge Review/code/Detection/model/rcnn.py | ToniChopp/MIRACLE-Paper-Sharing-Album | 72a3843101483fc8b53df2746c488da066eda2a1 | [
"MIT"
] | 1 | 2021-11-16T16:31:05.000Z | 2021-11-16T16:31:05.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
import logging
import numpy as np
from typing import Dict, List, Optional, Tuple
import torch
from torch import nn
from detectron2.config import configurable
from detectron2.data.detection_utils import convert_image_to_rgb
from detectron2.structures import ImageList, ... | 42.679443 | 106 | 0.645359 |
4a17729041d683120c27a0d1d3218d0fc361b23d | 280 | py | Python | app/secret_key.py | chick0/dashboard | b29034ef0a770bf9e1aefaf0479a6bc93a82cc3a | [
"MIT"
] | 1 | 2021-07-27T07:43:20.000Z | 2021-07-27T07:43:20.000Z | app/secret_key.py | chick0/upload | 5f63590706d9a5083cbb2a42a1e5e386e9590424 | [
"MIT"
] | null | null | null | app/secret_key.py | chick0/upload | 5f63590706d9a5083cbb2a42a1e5e386e9590424 | [
"MIT"
] | null | null | null | from secrets import token_bytes
SECRET_KEY = token_bytes(32)
try:
with open(".SECRET_KEY", mode="rb") as key_reader:
SECRET_KEY = key_reader.read()
except FileNotFoundError:
with open(".SECRET_KEY", mode="wb") as key_writer:
key_writer.write(SECRET_KEY)
| 25.454545 | 54 | 0.707143 |
4a17740fedd63df644d1055ddc218fe74606d434 | 7,511 | py | Python | lib/klepto/tests/test_cache.py | JustinDeOcampo/Alfred-JapaneseTranslator | b8614c718384b2303813fdabb580d4ffd8e3f5c6 | [
"MIT"
] | 2 | 2020-07-13T00:04:23.000Z | 2021-02-05T17:07:39.000Z | lib/klepto/tests/test_cache.py | JustinDeOcampo/Alfred-JapaneseTranslator | b8614c718384b2303813fdabb580d4ffd8e3f5c6 | [
"MIT"
] | null | null | null | lib/klepto/tests/test_cache.py | JustinDeOcampo/Alfred-JapaneseTranslator | b8614c718384b2303813fdabb580d4ffd8e3f5c6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 2013-2016 California Institute of Technology.
# Copyright (c) 2016-2020 The Uncertainty Quantification Foundation.
# License: 3-clause BSD. The full license text is available at:
# - https://github.com/uqfoundation/kl... | 27.715867 | 94 | 0.565704 |
4a17748670725abe834a8ca74cb5aba8bdf51d7d | 16,960 | py | Python | tests/i18n_tests.py | euku/spbot | e6d505c8965b4e6730b3dc4505f92e35a3edb2e2 | [
"MIT"
] | 1 | 2022-02-10T00:20:42.000Z | 2022-02-10T00:20:42.000Z | tests/i18n_tests.py | euku/spbot | e6d505c8965b4e6730b3dc4505f92e35a3edb2e2 | [
"MIT"
] | null | null | null | tests/i18n_tests.py | euku/spbot | e6d505c8965b4e6730b3dc4505f92e35a3edb2e2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Test i18n module."""
#
# (C) Pywikibot team, 2007-2022
#
# Distributed under the terms of the MIT license.
#
from contextlib import suppress
import pywikibot
from pywikibot import bot, config, i18n
from pywikibot.exceptions import TranslationError
from tests.aspects import DefaultSiteTestCase, Pw... | 36.789588 | 79 | 0.573349 |
4a1775ee2af3a89617af0407b435708d60637350 | 992 | py | Python | Python/Swap Variables/swap_vars.py | dipakpawar152000/programming | f343857d413c7dcce876c7720c0ffc4e44b63a48 | [
"Apache-2.0"
] | 33 | 2019-10-20T15:28:26.000Z | 2021-12-17T22:34:22.000Z | Python/Swap Variables/swap_vars.py | dipakpawar152000/programming | f343857d413c7dcce876c7720c0ffc4e44b63a48 | [
"Apache-2.0"
] | 111 | 2019-05-10T18:52:55.000Z | 2022-02-04T08:53:42.000Z | Python/Swap Variables/swap_vars.py | dipakpawar152000/programming | f343857d413c7dcce876c7720c0ffc4e44b63a48 | [
"Apache-2.0"
] | 141 | 2019-10-20T15:00:02.000Z | 2021-03-23T05:51:12.000Z | #!/usr/bin/python
# swap two variables using temporary variable
def swap_temp(a, b):
print("-" * 32)
print("Swap with temporary varaiable")
print("-" * 32)
print("Before a: {} b: {}".format(a, b))
tmp = b
b = a
a = tmp
print("After a: {} b: {}".format(a, b))
# swap two variables using... | 21.106383 | 56 | 0.517137 |
4a17762ca734ab47084db0c6376aeceab450c119 | 1,299 | py | Python | board/board.py | dwaffe/connect4deepLearning | 167c26a3f4f7040ca714c4bdb1c14bfb51c64d9e | [
"MIT"
] | null | null | null | board/board.py | dwaffe/connect4deepLearning | 167c26a3f4f7040ca714c4bdb1c14bfb51c64d9e | [
"MIT"
] | null | null | null | board/board.py | dwaffe/connect4deepLearning | 167c26a3f4f7040ca714c4bdb1c14bfb51c64d9e | [
"MIT"
] | null | null | null | from board.piece import Piece
from board.field import Field
import numpy as np
class Board:
def __init__(self, rows: int, columns: int) -> None:
self._rows = rows
self._columns = columns
self._board = [[Field() for i in range(columns)] for j in range(rows)]
self._move_counter = 0
... | 27.0625 | 111 | 0.622787 |
4a1776c2cda3b51aaa3036353fafab6e04c95268 | 908 | py | Python | tests/data/test_data_transforms_tensor.py | wenliangzhao2018/d2go | a9dce74e5caf4c2260371a1abb603e3d5f14d763 | [
"Apache-2.0"
] | 687 | 2021-03-03T07:50:15.000Z | 2022-03-25T19:31:57.000Z | tests/data/test_data_transforms_tensor.py | wenliangzhao2018/d2go | a9dce74e5caf4c2260371a1abb603e3d5f14d763 | [
"Apache-2.0"
] | 193 | 2021-03-03T17:15:57.000Z | 2022-03-31T03:13:47.000Z | tests/data/test_data_transforms_tensor.py | wenliangzhao2018/d2go | a9dce74e5caf4c2260371a1abb603e3d5f14d763 | [
"Apache-2.0"
] | 90 | 2021-03-03T16:08:36.000Z | 2022-03-30T23:42:19.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import unittest
import numpy as np
import torch
from d2go.data.transforms import tensor as tensor_aug
from detectron2.data.transforms.augmentation import AugmentationList
class TestDataTransformsTensor(unittest.TestCase):... | 30.266667 | 70 | 0.713656 |
4a177824e9266a09f6c8ad85eb48c70ae2e1b15d | 5,054 | py | Python | pyxley/charts/mg/axes.py | snowind/pyxley | cff9e50b8d80b9794c6907355e541f166959cd6c | [
"MIT"
] | 2,536 | 2015-06-26T20:12:30.000Z | 2022-03-01T07:26:44.000Z | pyxley/charts/mg/axes.py | zhiaozhou/pyxley | 2dab00022d977d986169cd8a629b3a2f91be893f | [
"MIT"
] | 51 | 2015-07-17T14:16:43.000Z | 2021-07-09T21:34:36.000Z | pyxley/charts/mg/axes.py | zhiaozhou/pyxley | 2dab00022d977d986169cd8a629b3a2f91be893f | [
"MIT"
] | 335 | 2015-07-16T20:22:00.000Z | 2022-02-25T07:18:15.000Z | from .mg import OptionHelper
class Axes(OptionHelper):
"""Axes object for metricgraphics.
This class is used to specify axes options for the metricsgraphics api.
https://github.com/mozilla/metrics-graphics/wiki/Axes
"""
_allowed_axes = [
"inflator",
"max_x", "max_y",
... | 29.383721 | 85 | 0.576177 |
4a17782784db5d8ecbbf8985ee6dc4475756beb8 | 1,025 | py | Python | interface/uni_lab/common/resourcePlanId_for_others.py | aoruilin/SeleniumBase | 304fd7a23661ebf561da47d4cd8f7365dba519ca | [
"MIT"
] | null | null | null | interface/uni_lab/common/resourcePlanId_for_others.py | aoruilin/SeleniumBase | 304fd7a23661ebf561da47d4cd8f7365dba519ca | [
"MIT"
] | null | null | null | interface/uni_lab/common/resourcePlanId_for_others.py | aoruilin/SeleniumBase | 304fd7a23661ebf561da47d4cd8f7365dba519ca | [
"MIT"
] | null | null | null | import requests
from interface.uni_lab.common.login_for_others import login_interface
from interface.uni_lab.common.pointId_for_others import get_point_id
from base.data import Ips
ip = Ips.ip_for_uniLab
pointId = get_point_id()
URL = ip + '/pc/course/getResourcePlanList?pointId=%s&pageNum=1&pageSize=4' % pointId[1]
H... | 32.03125 | 104 | 0.69561 |
4a1778456ba0fd77158ac9bf61b8c0fc9d52345b | 266 | py | Python | tests/artificial/transf_Quantization/trend_Lag1Trend/cycle_5/ar_12/test_artificial_32_Quantization_Lag1Trend_5_12_0.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/artificial/transf_Quantization/trend_Lag1Trend/cycle_5/ar_12/test_artificial_32_Quantization_Lag1Trend_5_12_0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/artificial/transf_Quantization/trend_Lag1Trend/cycle_5/ar_12/test_artificial_32_Quantization_Lag1Trend_5_12_0.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 5, transform = "Quantization", sigma = 0.0, exog_count = 0, ar_order = 12); | 38 | 166 | 0.733083 |
4a177916750e9896c2ece29365ff8467c9be57a8 | 440 | py | Python | AI/AI_dum.py | SaicharanKandukuri/snippets-python-from-scrach | b0823fde3cf1a88bf43d97bdc542de7e32c76dac | [
"MIT"
] | 1 | 2021-05-29T03:09:24.000Z | 2021-05-29T03:09:24.000Z | AI/AI_dum.py | SaicharanKandukuri/snippets-python-from-scrach | b0823fde3cf1a88bf43d97bdc542de7e32c76dac | [
"MIT"
] | null | null | null | AI/AI_dum.py | SaicharanKandukuri/snippets-python-from-scrach | b0823fde3cf1a88bf43d97bdc542de7e32c76dac | [
"MIT"
] | null | null | null | # notes
# Jhon McCarthy 1956
# ^ AI nerd
# Shakey robot
# ^ Dum robot shakes all the time
# Q: why AI famous?
# A: cause humans are lazy..
# first program was "lisp" which is used to predict shapes
# ----------------------------------------------
# Human learn by Experience
# AI :1 -> runs from instruc... | 22 | 58 | 0.506818 |
4a177a7fef16a6b92da7fd787ca8da05807a9b09 | 206 | py | Python | Chapter12/04_http_urequests.py | PacktPublishing/MicroPython-Cookbook | ffd6aa15c303459570a89ba31b5bc734f05cb387 | [
"MIT"
] | 16 | 2019-07-01T16:24:22.000Z | 2022-03-03T06:54:57.000Z | Chapter12/04_http_urequests.py | ccwu0918/MicroPython-Cookbook | ffd6aa15c303459570a89ba31b5bc734f05cb387 | [
"MIT"
] | null | null | null | Chapter12/04_http_urequests.py | ccwu0918/MicroPython-Cookbook | ffd6aa15c303459570a89ba31b5bc734f05cb387 | [
"MIT"
] | 19 | 2019-04-17T08:30:12.000Z | 2022-01-14T03:05:37.000Z | from netcheck import wait_for_networking
import urequests
def main():
wait_for_networking()
url = 'http://micropython.org/ks/test.html'
html = urequests.get(url).text
print(html)
main()
| 15.846154 | 47 | 0.703883 |
4a177b75b187d516e23b1aff0bb0150c7ee61fc6 | 5,732 | py | Python | custom_components/ultrasync/sensor.py | chatziko/ha-ultrasync | c96ec26c1c2da59fa4b260d7ea3fd3c1e2f30653 | [
"MIT"
] | 9 | 2020-12-22T02:53:37.000Z | 2022-03-28T16:41:36.000Z | custom_components/ultrasync/sensor.py | chatziko/ha-ultrasync | c96ec26c1c2da59fa4b260d7ea3fd3c1e2f30653 | [
"MIT"
] | 15 | 2020-12-09T03:05:48.000Z | 2022-01-24T00:44:52.000Z | custom_components/ultrasync/sensor.py | chatziko/ha-ultrasync | c96ec26c1c2da59fa4b260d7ea3fd3c1e2f30653 | [
"MIT"
] | 4 | 2020-12-22T02:38:48.000Z | 2021-08-09T09:06:22.000Z | """Monitor the Interlogix/Hills ComNav UltraSync Hub."""
import logging
from typing import Callable, List
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import CONF_NAME
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from ho... | 32.384181 | 88 | 0.605024 |
4a177beaf25343b7a4d10ec405776f17757d2961 | 1,785 | py | Python | telemetry/third_party/web-page-replay/setup.py | ravitejavalluri/catapult | 246a39a82c2213d913a96fff020a263838dc76e6 | [
"BSD-3-Clause"
] | 226 | 2015-01-01T23:21:53.000Z | 2021-08-25T06:20:54.000Z | telemetry/third_party/web-page-replay/setup.py | ravitejavalluri/catapult | 246a39a82c2213d913a96fff020a263838dc76e6 | [
"BSD-3-Clause"
] | 55 | 2015-01-15T17:21:11.000Z | 2021-08-18T10:12:31.000Z | telemetry/third_party/web-page-replay/setup.py | ravitejavalluri/catapult | 246a39a82c2213d913a96fff020a263838dc76e6 | [
"BSD-3-Clause"
] | 64 | 2015-01-07T14:04:43.000Z | 2022-01-04T12:08:16.000Z | #!/usr/bin/env python
# Copyright 2012 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... | 31.875 | 85 | 0.670028 |
4a177c3bf99f0c2fa306fac5ca17df185780db1b | 506 | py | Python | pygears/svgen/modules/flatten.py | Risto97/pygears | 19393e85101a16762cb3bbbf3010946ef69217f2 | [
"MIT"
] | null | null | null | pygears/svgen/modules/flatten.py | Risto97/pygears | 19393e85101a16762cb3bbbf3010946ef69217f2 | [
"MIT"
] | null | null | null | pygears/svgen/modules/flatten.py | Risto97/pygears | 19393e85101a16762cb3bbbf3010946ef69217f2 | [
"MIT"
] | null | null | null | from pygears.rtl.gear import RTLGearHierVisitor
from pygears.svgen.inst import SVGenInstPlugin, svgen_inst
from pygears.svgen.util import svgen_visitor
@svgen_visitor
class RemoveTupleFlattenVisitor(RTLGearHierVisitor):
def flatten_tuple(self, node):
node.bypass()
class SVGenFlattenPlugin(SVGenInstPlugi... | 28.111111 | 60 | 0.735178 |
4a177c83817bf05182a104fdd6be09d11a59e411 | 2,803 | py | Python | docs/source/conf.py | Tiernan8r/quantum_computing_project | dd636aa302ab4abee84bad8a7df71fa0e019a36a | [
"Apache-2.0"
] | 4 | 2022-02-18T15:02:00.000Z | 2022-02-22T15:23:41.000Z | docs/source/conf.py | Tiernan8r/quantum_computing_project | dd636aa302ab4abee84bad8a7df71fa0e019a36a | [
"Apache-2.0"
] | 7 | 2022-02-24T22:32:12.000Z | 2022-03-22T09:07:50.000Z | docs/source/conf.py | Tiernan8r/quantum_computing_project | dd636aa302ab4abee84bad8a7df71fa0e019a36a | [
"Apache-2.0"
] | 4 | 2022-02-11T09:55:44.000Z | 2022-02-23T12:08:49.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.369048 | 79 | 0.660007 |
4a177c92bcaf7ad0f2ce47c2e53388d3017349f5 | 26,798 | py | Python | vendor/plugit-development-client/plugIt/views.py | ebu/test-engine-ondemand | 31d5ef4e2ddb6d80f22f166aa25cd6e883181c66 | [
"BSD-3-Clause"
] | 4 | 2017-03-22T02:31:11.000Z | 2020-09-16T20:47:16.000Z | vendor/plugit-development-client/plugIt/views.py | ebu/test-engine-ondemand | 31d5ef4e2ddb6d80f22f166aa25cd6e883181c66 | [
"BSD-3-Clause"
] | 1 | 2015-01-08T03:44:52.000Z | 2015-01-08T03:44:52.000Z | vendor/plugit-development-client/plugIt/views.py | ebu/test-engine-ondemand | 31d5ef4e2ddb6d80f22f166aa25cd6e883181c66 | [
"BSD-3-Clause"
] | 2 | 2015-04-24T01:52:22.000Z | 2020-09-16T20:47:24.000Z | # -*- coding: utf-8 -*-
from django.shortcuts import get_object_or_404, render_to_response, redirect
from django.template import RequestContext
from django.core.context_processors import csrf
from django.views.decorators.csrf import csrf_exempt
from django.http import Http404, HttpResponse, HttpResponseForbidden, Http... | 31.124274 | 276 | 0.655273 |
4a177f18e88e93530dc32ed9f6a98dc2fba37c1e | 248 | py | Python | processors/properties/propertyLowPrice.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 35 | 2017-10-25T17:10:35.000Z | 2022-03-20T18:12:06.000Z | processors/properties/propertyLowPrice.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 2 | 2017-09-20T17:39:15.000Z | 2018-04-01T17:20:29.000Z | processors/properties/propertyLowPrice.py | Zvezdin/blockchain-predictor | df6f939037471dd50b7b9c96673d89b04b646ef2 | [
"MIT"
] | 10 | 2017-12-01T13:47:04.000Z | 2021-12-16T06:53:17.000Z | from .property import Property
class PropertyLowPrice(Property):
def __init__(self):
super().__init__()
self.name = "lowPrice"
self.requires = ['tick']
def processTick(self, data):
return self.minOfColumn(data[self.requires[0]], 'low')
| 22.545455 | 56 | 0.717742 |
4a177f4d714c33b4f39b2974402fcaa91bc99a41 | 139 | py | Python | backend/app/schemas/__init__.py | mkbeh/fastapi-admin-panel | ba12ad16fe1fdd0f9ec2282b8aa9965bce858cda | [
"MIT"
] | 7 | 2020-12-04T17:45:31.000Z | 2022-02-08T02:12:58.000Z | backend/app/schemas/__init__.py | mkbeh/fastapi-admin-panel | ba12ad16fe1fdd0f9ec2282b8aa9965bce858cda | [
"MIT"
] | null | null | null | backend/app/schemas/__init__.py | mkbeh/fastapi-admin-panel | ba12ad16fe1fdd0f9ec2282b8aa9965bce858cda | [
"MIT"
] | 1 | 2020-12-04T17:38:44.000Z | 2020-12-04T17:38:44.000Z | from .common import *
from .general.token import *
from .general.auth import *
from .general.account import *
from .general.role import *
| 19.857143 | 30 | 0.748201 |
4a17803ef03cd4a3f7c5439385d1ff98c14d6b49 | 3,268 | py | Python | container_sdk/model/container/pod_detail_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | container_sdk/model/container/pod_detail_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | container_sdk/model/container/pod_detail_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pod_detail.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | 38.904762 | 384 | 0.793452 |
4a1783083bcfba08d0e06f6a513f95b055201082 | 7,560 | py | Python | astropy/cosmology/io/tests/test_ecsv.py | zabop/astropy | 11b3214f18b74aea5e3f8349e50ae1b09c39d30e | [
"BSD-3-Clause"
] | 1 | 2019-03-11T12:26:49.000Z | 2019-03-11T12:26:49.000Z | astropy/cosmology/io/tests/test_ecsv.py | nabobalis/astropy | 9f77b9a0ffe18e4c767e36f00e2e8728135c0e11 | [
"BSD-3-Clause"
] | 1 | 2019-10-09T18:54:27.000Z | 2019-10-09T18:54:27.000Z | astropy/cosmology/io/tests/test_ecsv.py | nabobalis/astropy | 9f77b9a0ffe18e4c767e36f00e2e8728135c0e11 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# THIRD PARTY
import pytest
# LOCAL
from astropy.cosmology.core import _COSMOLOGY_CLASSES
from astropy.cosmology.io.ecsv import read_ecsv, write_ecsv
from astropy.table import QTable, Table, vstack
from .base import ReadWriteDirectTestBase, ReadWriteTes... | 37.241379 | 92 | 0.612698 |
4a1783b14d9f817d1d6bcb745aaadf370a29b464 | 34,151 | py | Python | django/contrib/auth/tests/test_views.py | AlexHill/django | fe1389e911b0cdc487e5547c09c920c12f4e1ce0 | [
"BSD-3-Clause"
] | 1 | 2016-08-14T13:08:47.000Z | 2016-08-14T13:08:47.000Z | django/contrib/auth/tests/test_views.py | AlexHill/django | fe1389e911b0cdc487e5547c09c920c12f4e1ce0 | [
"BSD-3-Clause"
] | null | null | null | django/contrib/auth/tests/test_views.py | AlexHill/django | fe1389e911b0cdc487e5547c09c920c12f4e1ce0 | [
"BSD-3-Clause"
] | null | null | null | from importlib import import_module
import itertools
import os
import re
from django.conf import global_settings, settings
from django.contrib.sites.models import Site, RequestSite
from django.contrib.admin.models import LogEntry
from django.contrib.auth.models import User
from django.core import mail
from django.core... | 42.957233 | 117 | 0.63597 |
4a1783e03093eea5f0ed6e436518aee0d6b80d5b | 4,952 | py | Python | src/virtual-wan/azext_vwan/vendored_sdks/v2018_08_01/v2018_08_01/models/express_route_cross_connection.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/virtual-wan/azext_vwan/vendored_sdks/v2018_08_01/v2018_08_01/models/express_route_cross_connection.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/virtual-wan/azext_vwan/vendored_sdks/v2018_08_01/v2018_08_01/models/express_route_cross_connection.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.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 ... | 46.716981 | 117 | 0.663368 |
4a1783f464ea7bc1eae9d0b99eb0f6596fad22c4 | 1,808 | py | Python | applications/CoSimulationApplication/python_scripts/base_classes/co_simulation_convergence_criteria.py | HubertBalcerzak/Kratos | c15689d53f06dabb36dc44c13eeac73d3e183916 | [
"BSD-4-Clause"
] | null | null | null | applications/CoSimulationApplication/python_scripts/base_classes/co_simulation_convergence_criteria.py | HubertBalcerzak/Kratos | c15689d53f06dabb36dc44c13eeac73d3e183916 | [
"BSD-4-Clause"
] | 1 | 2019-10-15T13:11:37.000Z | 2019-10-15T13:11:37.000Z | applications/CoSimulationApplication/python_scripts/base_classes/co_simulation_convergence_criteria.py | Gaoliu19910601/Kratos | 0bac5e132d02061680fc90f1e52d4930b5ed7fa3 | [
"BSD-4-Clause"
] | null | null | null | from __future__ import print_function, absolute_import, division # makes these scripts backward compatible with python 2.6 and 2.7
# Importing the Kratos Library
import KratosMultiphysics as KM
# CoSimulation imports
import KratosMultiphysics.CoSimulationApplication.co_simulation_tools as cs_tools
import KratosMulti... | 30.133333 | 131 | 0.69469 |
4a1786075e3cd1f186a6269408e906d0f981e472 | 3,163 | py | Python | sdk/python/pulumi_azure_native/subscription/v20191001preview/get_subscription_alias.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/subscription/v20191001preview/get_subscription_alias.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/subscription/v20191001preview/get_subscription_alias.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 30.708738 | 161 | 0.643377 |
4a1786312ec2a1f9cc548ea01bf8aa510552f16f | 83 | py | Python | estructura_repeticion.py | BrayanTorres2/Aprende_a_programar_Eanx | 1a6818a4da34fea8eeb0e93f5f6b67bdf63fd109 | [
"MIT"
] | null | null | null | estructura_repeticion.py | BrayanTorres2/Aprende_a_programar_Eanx | 1a6818a4da34fea8eeb0e93f5f6b67bdf63fd109 | [
"MIT"
] | null | null | null | estructura_repeticion.py | BrayanTorres2/Aprende_a_programar_Eanx | 1a6818a4da34fea8eeb0e93f5f6b67bdf63fd109 | [
"MIT"
] | null | null | null | suma=0
for i in range(97,1004):
if(i%2==0):
suma=suma+i
print(suma) | 16.6 | 25 | 0.542169 |
4a17864f6ac8bf6811e5e43267a2ab8f9134aeb9 | 320 | py | Python | manga_py/providers/manhwa_club.py | sonvt1710/manga-py | 848a78e93b890af0c92056a1a9fc7f6ce5707cf6 | [
"MIT"
] | 337 | 2019-08-27T16:14:50.000Z | 2022-03-29T09:58:22.000Z | manga_py/providers/manhwa_club.py | sonvt1710/manga-py | 848a78e93b890af0c92056a1a9fc7f6ce5707cf6 | [
"MIT"
] | 225 | 2019-08-25T15:02:01.000Z | 2022-03-31T06:36:09.000Z | manga_py/providers/manhwa_club.py | sonvt1710/manga-py | 848a78e93b890af0c92056a1a9fc7f6ce5707cf6 | [
"MIT"
] | 41 | 2019-10-04T13:28:02.000Z | 2022-03-19T08:18:34.000Z | from .rawdevart_com_old import RawDevArtComOld
class ManhwaClub(RawDevArtComOld):
_chapter_selector = r'/chapter-(\d+(?:\.\d+)?)'
def get_content(self):
return self._get_content('{}/manhwa/{}')
def get_manga_name(self) -> str:
return self._get_name('/manhwa/([^/]+)')
main = ManhwaClub
| 21.333333 | 51 | 0.65 |
4a1786f80bc0bfb48c2025ccbe9774d62da7195a | 9,521 | py | Python | pyrustic/manager/handler/init_handler.py | tutlane/pyrustic | b20653aef35735480e02eff04f8bb60570364ea8 | [
"MIT"
] | null | null | null | pyrustic/manager/handler/init_handler.py | tutlane/pyrustic | b20653aef35735480e02eff04f8bb60570364ea8 | [
"MIT"
] | null | null | null | pyrustic/manager/handler/init_handler.py | tutlane/pyrustic | b20653aef35735480e02eff04f8bb60570364ea8 | [
"MIT"
] | null | null | null | import os
import os.path
import pkgutil
from pyrustic.manager.misc import funcs
from pyrustic.jasonix import Jasonix
class InitHandler:
"""
Description
-----------
Use this command to init your project.
Pyrustic Manager will install a basic
project structure in your project.
The PROJECT_DI... | 40.34322 | 72 | 0.603088 |
4a178764ca89d88643700d816ba5d2fe97aac0d1 | 3,411 | py | Python | build/service/log_pb2.py | evanshih1999/IoTHW | 068f2fbe9fde82e20b0bc4a6e44a876546335fc4 | [
"MIT"
] | null | null | null | build/service/log_pb2.py | evanshih1999/IoTHW | 068f2fbe9fde82e20b0bc4a6e44a876546335fc4 | [
"MIT"
] | null | null | null | build/service/log_pb2.py | evanshih1999/IoTHW | 068f2fbe9fde82e20b0bc4a6e44a876546335fc4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: log.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf im... | 26.038168 | 196 | 0.75667 |
4a17878f3508cf6793010c8e0f98832c9c9ca4fd | 342 | py | Python | particle_filter_student/scripts/common/Particle.py | EdMlt/Particle_Filter_plane_simulator | 12bb30c62baf6d5302b04bc456eadc02258efa9e | [
"Apache-2.0"
] | null | null | null | particle_filter_student/scripts/common/Particle.py | EdMlt/Particle_Filter_plane_simulator | 12bb30c62baf6d5302b04bc456eadc02258efa9e | [
"Apache-2.0"
] | null | null | null | particle_filter_student/scripts/common/Particle.py | EdMlt/Particle_Filter_plane_simulator | 12bb30c62baf6d5302b04bc456eadc02258efa9e | [
"Apache-2.0"
] | null | null | null | # from collections import namedtuple
# MyStruct = namedtuple("MyStruct", "field1 field2 field3")
class Particle:
x = 0
y = 0
w = 0
proba=0
def __init__(self,x_0,y_0,w_0,proba_0):
self.x=x_0
self.y = y_0
self.w = w_0
self.proba = proba_0
def id(self):
return str(s... | 20.117647 | 59 | 0.593567 |
4a1787a9b324c7199b3378b0d97584bc8057ed23 | 295 | py | Python | Desafios/Desafio52.py | Felix-xilef/Curso-de-Python | cdff7c7f3850e6326e274c8c1987b9e1a18ce910 | [
"MIT"
] | null | null | null | Desafios/Desafio52.py | Felix-xilef/Curso-de-Python | cdff7c7f3850e6326e274c8c1987b9e1a18ce910 | [
"MIT"
] | null | null | null | Desafios/Desafio52.py | Felix-xilef/Curso-de-Python | cdff7c7f3850e6326e274c8c1987b9e1a18ce910 | [
"MIT"
] | null | null | null | numero = int(input('\n\tDigite um número inteiro: '))
for i in range(2, numero):
if numero % i == 0:
print('\n\tO Número não é primo!')
input('\n\nPressione <enter> para continuar')
exit()
print('\n\tO número é primo!')
input('\n\nPressione <enter> para continuar')
| 29.5 | 53 | 0.610169 |
4a1787f695c0c7ed035b0083b8dfdb493bfe3e48 | 2,039 | py | Python | gslab_scons/builders/build_lyx.py | lboxell/gslab_python | 0e6d687962146d8745cd80d5c888c69647863d2d | [
"MIT"
] | null | null | null | gslab_scons/builders/build_lyx.py | lboxell/gslab_python | 0e6d687962146d8745cd80d5c888c69647863d2d | [
"MIT"
] | null | null | null | gslab_scons/builders/build_lyx.py | lboxell/gslab_python | 0e6d687962146d8745cd80d5c888c69647863d2d | [
"MIT"
] | null | null | null | import os
import subprocess
import shutil
import gslab_scons.misc as misc
from gslab_scons import log_timestamp
from gslab_scons._exception_classes import ExecCallError
def build_lyx(target, source, env):
'''Compile a pdf from a LyX file
This function is a SCons builder that compiles a .lyx file
as a pdf... | 31.369231 | 71 | 0.647376 |
4a178909df3f6b71deadf502474eaa54f2aef715 | 7,576 | py | Python | vgg_example.py | hvkwak/vgg-face.pytorch | eef10b358ff61dbdfe0192cba865fcc988c29ec2 | [
"MIT"
] | null | null | null | vgg_example.py | hvkwak/vgg-face.pytorch | eef10b358ff61dbdfe0192cba865fcc988c29ec2 | [
"MIT"
] | null | null | null | vgg_example.py | hvkwak/vgg-face.pytorch | eef10b358ff61dbdfe0192cba865fcc988c29ec2 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchfile
import cv2 as cv
import numpy as np
import os
# import tqdm
from os import listdir
from os.path import isfile, join, isdir
class VGG(nn.Module):
def __init__(self):
super().__init__()
self.block_size = [2, 2, 3, ... | 37.137255 | 108 | 0.572994 |
4a178b19c4c0caeeb41c171fa0096db5acbad6a9 | 4,879 | py | Python | pyqtgraph/examples/_paramtreecfg.py | StSav012/pyqtgraph | 65e17c4e3707eb3bd4d91cdc13504d9b150f4360 | [
"MIT"
] | 1 | 2022-01-30T20:04:51.000Z | 2022-01-30T20:04:51.000Z | pyqtgraph/examples/_paramtreecfg.py | StSav012/pyqtgraph | 65e17c4e3707eb3bd4d91cdc13504d9b150f4360 | [
"MIT"
] | null | null | null | pyqtgraph/examples/_paramtreecfg.py | StSav012/pyqtgraph | 65e17c4e3707eb3bd4d91cdc13504d9b150f4360 | [
"MIT"
] | null | null | null | import numpy as np
from pyqtgraph.parametertree.parameterTypes import QtEnumParameter as enum
from pyqtgraph.Qt import QtWidgets
dlg = QtWidgets.QFileDialog
cfg = {
'list': {
'limits': {
'type': 'checklist',
'limits': ['a', 'b', 'c']
}
},
'file': {
'acceptM... | 25.279793 | 118 | 0.3843 |
4a178b9876c56dbc502b8f9853456f59a804c769 | 2,684 | py | Python | make/internal/directive.py | tompis/casual | d838716c7052a906af8a19e945a496acdc7899a2 | [
"MIT"
] | null | null | null | make/internal/directive.py | tompis/casual | d838716c7052a906af8a19e945a496acdc7899a2 | [
"MIT"
] | null | null | null | make/internal/directive.py | tompis/casual | d838716c7052a906af8a19e945a496acdc7899a2 | [
"MIT"
] | null | null | null | '''
Created on 13 maj 2012
@author: hbergk
'''
import os
import sys
import re
from casual.make.output import Output
#
# Defines the return from "all" functions, that can be used
# in other function, as Install or whatnot...
#
class Target:
def __init__(self, output, source = '', name = None, operation = No... | 21.301587 | 75 | 0.539493 |
4a178c2dceb5c7ef5e5665ff0bac79afdf6fd289 | 6,834 | py | Python | networkx/algorithms/bipartite/cluster.py | tombeek111/networkx | 0770b228e0aab5acf8842981947857fdf85205ab | [
"BSD-3-Clause"
] | 1 | 2019-12-03T14:58:04.000Z | 2019-12-03T14:58:04.000Z | networkx/algorithms/bipartite/cluster.py | tombeek111/networkx | 0770b228e0aab5acf8842981947857fdf85205ab | [
"BSD-3-Clause"
] | 1 | 2019-12-19T16:49:00.000Z | 2019-12-20T06:22:46.000Z | networkx/algorithms/bipartite/cluster.py | tombeek111/networkx | 0770b228e0aab5acf8842981947857fdf85205ab | [
"BSD-3-Clause"
] | 2 | 2020-02-13T10:33:34.000Z | 2020-08-09T07:59:26.000Z | """Functions for computing clustering of pairs
"""
import itertools
import networkx as nx
__all__ = ['clustering',
'average_clustering',
'latapy_clustering',
'robins_alexander_clustering']
def cc_dot(nu, nv):
return float(len(nu & nv)) / len(nu | nv)
def cc_max(nu, nv):
... | 24.67148 | 80 | 0.592918 |
4a178c31e6aefb80d22b1ef37e5a2d033438b840 | 248 | py | Python | bindings/python/ensmallen_graph/datasets/linqs/__init__.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/linqs/__init__.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/linqs/__init__.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """This sub-module offers methods to automatically retrieve the graphs from LINQS repository."""
from .citeseer import CiteSeer
from .cora import Cora
from .pubmeddiabetes import PubMedDiabetes
__all__ = [
"CiteSeer", "Cora", "PubMedDiabetes",
] | 27.555556 | 96 | 0.774194 |
4a178c663e081d75ddb550a36bac78dec566804a | 6,293 | py | Python | base/learners/skill_discovery/base.py | lee15253/edl_bk | 6777f5803138e6a64dabb096fe18a495728aabe3 | [
"MIT"
] | null | null | null | base/learners/skill_discovery/base.py | lee15253/edl_bk | 6777f5803138e6a64dabb096fe18a495728aabe3 | [
"MIT"
] | null | null | null | base/learners/skill_discovery/base.py | lee15253/edl_bk | 6777f5803138e6a64dabb096fe18a495728aabe3 | [
"MIT"
] | null | null | null | # Copyright (c) 2019, salesforce.com, inc.
# All rights reserved.
# SPDX-License-Identifier: MIT
# For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
import torch
from ..base import BaseLearner
class BaseSkillDiscoveryLearner(BaseLearner):
def __init__(self, env_... | 37.682635 | 112 | 0.604004 |
4a178c8abb19aa3742d27c18f09762a8a1a4c069 | 4,182 | py | Python | EMDMeasurment/EMD.py | Javert899/VisualComparison2EventLogs | a7bda790922928010a7cd8d1691c92a098ffd11d | [
"Apache-2.0"
] | null | null | null | EMDMeasurment/EMD.py | Javert899/VisualComparison2EventLogs | a7bda790922928010a7cd8d1691c92a098ffd11d | [
"Apache-2.0"
] | null | null | null | EMDMeasurment/EMD.py | Javert899/VisualComparison2EventLogs | a7bda790922928010a7cd8d1691c92a098ffd11d | [
"Apache-2.0"
] | 1 | 2022-03-04T07:40:55.000Z | 2022-03-04T07:40:55.000Z | import math
import numpy as np
import pandas as pd
from collections import Counter
from Levenshtein import distance as levenshtein_distance
from pyemd import emd,emd_with_flow
from pyemd import emd_with_flow
class EMD:
def __init__(self):
self = self
def log_freq(self,simple_log):
sum_seq = 0... | 41.82 | 156 | 0.581779 |
4a178c989b6d363705a8c371fe5a84de83975533 | 1,059 | py | Python | lib/linkedin/constants.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 206 | 2015-10-15T07:05:08.000Z | 2021-02-19T11:48:36.000Z | lib/linkedin/constants.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 8 | 2017-10-16T10:18:31.000Z | 2022-03-09T14:24:27.000Z | lib/linkedin/constants.py | goztrk/django-htk | c56bf112e5d627780d2f4288460eae5cce80fa9e | [
"MIT"
] | 61 | 2015-10-15T08:12:44.000Z | 2022-03-10T12:25:06.000Z | LINKEDIN_PROFILE_API_BASE_URL = 'https://api.linkedin.com/v1/people/~:(%s)?format=json'
# LinkedIn treasure trove: http://developer.linkedin.com/documents/profile-fields
LINKEDIN_PROFILE_FIELDS = [
'id',
'first-name',
'last-name',
'summary',
'picture-url',
'location:(name)',
'industry',
... | 40.730769 | 87 | 0.711992 |
4a178d648503524d3b3eca00b54407da3d024a9b | 4,063 | py | Python | python/surf/devices/cypress/_CypressS25Fl.py | qarlosalberto/surf | 69df91296d77efc9e812da051841545e320ebf69 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-05-13T19:56:51.000Z | 2021-05-21T13:33:02.000Z | python/surf/devices/cypress/_CypressS25Fl.py | qarlosalberto/surf | 69df91296d77efc9e812da051841545e320ebf69 | [
"BSD-3-Clause-LBNL"
] | null | null | null | python/surf/devices/cypress/_CypressS25Fl.py | qarlosalberto/surf | 69df91296d77efc9e812da051841545e320ebf69 | [
"BSD-3-Clause-LBNL"
] | null | null | null | #-----------------------------------------------------------------------------
# Description: PyRogue Cypress S25FL PROM Series
#
# Note: Used with surf/devices/Micron/n25q firmware
#
#-----------------------------------------------------------------------------
# This file is part of the 'SLAC Firmware Standard Librar... | 37.971963 | 119 | 0.527443 |
4a179093ebdfe4d821d0f9db4daeb1257ac1214e | 2,912 | py | Python | tests/unit/trace/test_link.py | bshaffer/opencensus-python | c624558c6829982d3464a5df29b48952f1fe23bc | [
"Apache-2.0"
] | null | null | null | tests/unit/trace/test_link.py | bshaffer/opencensus-python | c624558c6829982d3464a5df29b48952f1fe23bc | [
"Apache-2.0"
] | 1 | 2018-04-08T18:01:16.000Z | 2018-04-08T18:01:16.000Z | tests/unit/trace/test_link.py | bshaffer/opencensus-python | c624558c6829982d3464a5df29b48952f1fe23bc | [
"Apache-2.0"
] | 1 | 2019-09-01T06:00:13.000Z | 2019-09-01T06:00:13.000Z | # Copyright 2017, OpenCensus 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 in w... | 29.414141 | 74 | 0.638049 |
4a17911a87fa523b6df5154b23a3f7669b99e349 | 35,110 | py | Python | synapse/handlers/room.py | Lrizika/synapse | 97174780ce726962ca1beb3788b62f16e9fad270 | [
"Apache-2.0"
] | 1 | 2019-06-22T04:17:50.000Z | 2019-06-22T04:17:50.000Z | synapse/handlers/room.py | fikalefaza/synapse | 4f68188d0bbdb1966250375d34125572eb82a117 | [
"Apache-2.0"
] | null | null | null | synapse/handlers/room.py | fikalefaza/synapse | 4f68188d0bbdb1966250375d34125572eb82a117 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014 - 2016 OpenMarket Ltd
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | 36.010256 | 90 | 0.566534 |
4a179215803a821f3c96f1b77f547273d50393e3 | 1,701 | py | Python | RLAnIntro/RLAnIntro_Chap7_RandomWalk_n_step_TD.py | HuangJingGitHub/PracMakePert_py | 1e947b0804fdcd50b2a3afc0af9d824cb55978cd | [
"Apache-2.0"
] | 2 | 2019-05-28T15:04:20.000Z | 2019-05-28T15:04:22.000Z | RLAnIntro/RLAnIntro_Chap7_RandomWalk_n_step_TD.py | HuangJingGitHub/PracMakePert_py | 1e947b0804fdcd50b2a3afc0af9d824cb55978cd | [
"Apache-2.0"
] | null | null | null | RLAnIntro/RLAnIntro_Chap7_RandomWalk_n_step_TD.py | HuangJingGitHub/PracMakePert_py | 1e947b0804fdcd50b2a3afc0af9d824cb55978cd | [
"Apache-2.0"
] | 1 | 2019-08-30T06:06:33.000Z | 2019-08-30T06:06:33.000Z | import numpy as np
import matplotlib.pyplot as plt
from tqdm import tqdm
STATES_NUM = 19
STATES = np.arange(1, STATES_NUM + 1)
STATE_START = 10
STATE_TERMINAL = [0, STATES_NUM + 1]
VALUES = np.arange(1, STATES_NUM + 1) / (STATES_NUM + 1)
GAMMA = 0.8
def temporal_difference(value, n, alpha):
state = ... | 28.830508 | 89 | 0.513228 |
4a17921bd754d1185b2e80468aa345ba84abc076 | 1,206 | py | Python | database/restconfiguration.py | tomdoel/pyxnatbrowser | 573701e34538d6bae488d0a2d2a8864e974e5a8a | [
"BSD-2-Clause"
] | null | null | null | database/restconfiguration.py | tomdoel/pyxnatbrowser | 573701e34538d6bae488d0a2d2a8864e974e5a8a | [
"BSD-2-Clause"
] | null | null | null | database/restconfiguration.py | tomdoel/pyxnatbrowser | 573701e34538d6bae488d0a2d2a8864e974e5a8a | [
"BSD-2-Clause"
] | null | null | null | # https://github.com/tomdoel/pyxnatbrowser
# Author: Tom Doel www.tomdoel.com
# Distributed under the Simplified BSD License.
class RestConfiguration(object):
def __init__(self):
self.__applicationDirectory = None
self.__serverName = None
self.__baseUrl = None
self.__userName = No... | 22.333333 | 47 | 0.665008 |
4a1793e72b69c07a457fc78f8c97bb1703ab6471 | 1,412 | py | Python | cs2130-python/program_04_base_conversion.py | clmay/school | a4780ca6f517614ab5a5d9a44d0c6d8bc00783b6 | [
"MIT"
] | null | null | null | cs2130-python/program_04_base_conversion.py | clmay/school | a4780ca6f517614ab5a5d9a44d0c6d8bc00783b6 | [
"MIT"
] | null | null | null | cs2130-python/program_04_base_conversion.py | clmay/school | a4780ca6f517614ab5a5d9a44d0c6d8bc00783b6 | [
"MIT"
] | 1 | 2019-12-26T20:32:31.000Z | 2019-12-26T20:32:31.000Z | def main():
while True:
print()
val = input("Enter a non-negative base-10 integer (or 'q' to quit): ")
if val.lower() == 'q':
break
try:
val = int(val)
except ValueError as err:
print_error()
continue
if val < 0:
... | 23.147541 | 78 | 0.49221 |
4a1794432c086a69a41dc226c2d833d0b38323f5 | 4,213 | py | Python | src/helpers/mailer.py | lesh1k/VKStalk | bcf10a944a0259efe7899cc3d15b056b7d148837 | [
"MIT"
] | 1 | 2021-09-26T08:10:05.000Z | 2021-09-26T08:10:05.000Z | src/helpers/mailer.py | lesh1k/VKStalk | bcf10a944a0259efe7899cc3d15b056b7d148837 | [
"MIT"
] | 1 | 2016-08-27T09:13:08.000Z | 2016-08-28T11:33:00.000Z | src/helpers/mailer.py | lesh1k/VKStalk | bcf10a944a0259efe7899cc3d15b056b7d148837 | [
"MIT"
] | null | null | null | # Mail sending from v4.0.1. In v.5.0.0+ this was not implemented
# Needs review, cleaning and refactoring
def SendMail(self, mail_type='daily', msg='default_message', filename=''):
# ConsoleLog('Sending ' + mail_type + ' email...')
TEXT = ''
SUBJECT = ''
if mail_type == 'daily':
# Add number ... | 38.3 | 142 | 0.606931 |
4a1794796e5c545d9e64380cf6156f5a13a95908 | 961 | py | Python | setup.py | xinabox/Python-CORE | 656e5bbf6638e2b6142cfd72b25a67349e353881 | [
"MIT"
] | null | null | null | setup.py | xinabox/Python-CORE | 656e5bbf6638e2b6142cfd72b25a67349e353881 | [
"MIT"
] | null | null | null | setup.py | xinabox/Python-CORE | 656e5bbf6638e2b6142cfd72b25a67349e353881 | [
"MIT"
] | null | null | null | import setuptools
import sys
with open("README.md", "r") as fh:
long_description = fh.read()
install_requires = list()
if sys.platform == "linux2" or sys.platform == "linux":
install_requires = ["smbus2",]
if sys.platform == "esp8266":
sys.path.pop(0)
sys.path.append("..")
setuptools.setup(
name=... | 29.121212 | 85 | 0.665973 |
4a1794d7e857cdc7defec5557c6b6b2e67b19ff2 | 1,665 | py | Python | scripts/tflite_model_tools/tflite/LogicalAndOptions.py | LaudateCorpus1/edgeai-tidl-tools | d98789769a711e5a3700dfdc20d877073bd87da7 | [
"CNRI-Python"
] | 15 | 2021-09-05T03:43:54.000Z | 2022-03-29T14:17:29.000Z | scripts/tflite_model_tools/tflite/LogicalAndOptions.py | LaudateCorpus1/edgeai-tidl-tools | d98789769a711e5a3700dfdc20d877073bd87da7 | [
"CNRI-Python"
] | 21 | 2021-09-01T06:58:31.000Z | 2022-03-31T06:33:15.000Z | scripts/tflite_model_tools/tflite/LogicalAndOptions.py | LaudateCorpus1/edgeai-tidl-tools | d98789769a711e5a3700dfdc20d877073bd87da7 | [
"CNRI-Python"
] | 6 | 2021-09-22T06:44:19.000Z | 2022-02-07T06:28:35.000Z | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class LogicalAndOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsLogicalAndOptions(cls, buf, offset):
n = fla... | 28.220339 | 114 | 0.705706 |
4a1796190c9377bfd82024d800cb59b5c425b3ff | 120 | py | Python | basic/primenos.py | AKASHDKR/pythonrepo | 3b15c4dbbe913e72c3a88fd35bff65b79ce15b9e | [
"Apache-2.0"
] | 4 | 2021-07-19T08:29:01.000Z | 2022-03-08T15:40:10.000Z | basic/primenos.py | AKASHDKR/pythonrepo | 3b15c4dbbe913e72c3a88fd35bff65b79ce15b9e | [
"Apache-2.0"
] | null | null | null | basic/primenos.py | AKASHDKR/pythonrepo | 3b15c4dbbe913e72c3a88fd35bff65b79ce15b9e | [
"Apache-2.0"
] | null | null | null | a=10
b=25
for i in range(a,b+1):
if i>1:
for j in range(2,i):
if(i%j==0):
break
else:
print(i) | 13.333333 | 23 | 0.475 |
4a1796479e2babb601a9c5321ba0cef4d4a6e1a2 | 42,006 | py | Python | egret/parsers/parser.py | bknueven/Egret | 37567c1ec3bc0072b61124ce46ceb28add9ad539 | [
"BSD-3-Clause"
] | null | null | null | egret/parsers/parser.py | bknueven/Egret | 37567c1ec3bc0072b61124ce46ceb28add9ad539 | [
"BSD-3-Clause"
] | 1 | 2019-12-11T22:45:12.000Z | 2019-12-11T22:45:12.000Z | egret/parsers/parser.py | bknueven/Egret | 37567c1ec3bc0072b61124ce46ceb28add9ad539 | [
"BSD-3-Clause"
] | null | null | null | # ___________________________________________________________________________
#
# EGRET: Electrical Grid Research and Engineering Tools
# Copyright 2019 National Technology & Engineering Solutions of Sandia, LLC
# (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S.
# Government retains certain r... | 43.171634 | 171 | 0.604128 |
4a17974d253a13ef8cf4a3148326a3e5e4882089 | 18,945 | py | Python | src/contiguityPlot.py | ngannguyen/referenceViz | 6990a00739a712ccd1371e996229882252fa8f91 | [
"MIT"
] | 1 | 2020-03-15T12:17:10.000Z | 2020-03-15T12:17:10.000Z | src/contiguityPlot.py | ngannguyen/referenceViz | 6990a00739a712ccd1371e996229882252fa8f91 | [
"MIT"
] | null | null | null | src/contiguityPlot.py | ngannguyen/referenceViz | 6990a00739a712ccd1371e996229882252fa8f91 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Create contiguity plots
nknguyen at soe dot ucsc dot edu
May 11 2011
Input: two contiguityStats.xml files to be compared and contrast
(e.g: contiguityStats_reference.xml and contiguityStats_hg19.xml)
"""
import os, sys
from optparse import OptionParser
import xml.etree.ElementTree as ET
#fro... | 37.514851 | 211 | 0.622486 |
4a1797d097cce00d94b6eae4f7f9029aff50a1cb | 1,534 | py | Python | NLP/tweet_NLP(Review).py | Neeraj0001/Machine-Learning-Python- | ffebfb302d5759f05cb37a55f47bccdea27e3b14 | [
"MIT"
] | null | null | null | NLP/tweet_NLP(Review).py | Neeraj0001/Machine-Learning-Python- | ffebfb302d5759f05cb37a55f47bccdea27e3b14 | [
"MIT"
] | null | null | null | NLP/tweet_NLP(Review).py | Neeraj0001/Machine-Learning-Python- | ffebfb302d5759f05cb37a55f47bccdea27e3b14 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import nltk
import re
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
ps=PorterStemmer()
df = pd.read_csv('train.csv',engine='python')
clean_review=[]
l=len(df.index)
for i in range(l):
word=re.sub('[^a-zA-Z]',' ',df['tweet... | 24.349206 | 88 | 0.785528 |
4a179a34367ff6e37cb223e6b2b84d6a1ba1577d | 3,921 | py | Python | pyspi/spi_frame.py | tsiegert/pyspi | bd2ef1cb54ab9ca6e49df092cdb9ed6ae28318ae | [
"BSD-3-Clause"
] | null | null | null | pyspi/spi_frame.py | tsiegert/pyspi | bd2ef1cb54ab9ca6e49df092cdb9ed6ae28318ae | [
"BSD-3-Clause"
] | null | null | null | pyspi/spi_frame.py | tsiegert/pyspi | bd2ef1cb54ab9ca6e49df092cdb9ed6ae28318ae | [
"BSD-3-Clause"
] | null | null | null | import astropy.coordinates as coord
import astropy.units as u
import numpy as np
from astropy.coordinates import BaseCoordinateFrame, Attribute, RepresentationMapping
from astropy.coordinates import frame_transform_graph, spherical_to_cartesian
from pyspi.spi_pointing import _construct_sc_matrix
class SPIFrame(B... | 30.161538 | 85 | 0.58327 |
4a179b3e5b945001b345b68f997cb2351d0985ce | 35,668 | py | Python | virtual/lib/python3.6/site-packages/werkzeug/serving.py | kenmutuma001/Blog | 6b19a77b71694bbe9f5e84207de46c68f87ebc5e | [
"Unlicense"
] | 13 | 2020-02-02T13:53:50.000Z | 2022-03-20T19:50:02.000Z | virtual/lib/python3.6/site-packages/werkzeug/serving.py | kenmutuma001/Blog | 6b19a77b71694bbe9f5e84207de46c68f87ebc5e | [
"Unlicense"
] | 8 | 2019-03-24T19:36:30.000Z | 2019-04-02T18:09:39.000Z | virtual/lib/python3.6/site-packages/werkzeug/serving.py | kenmutuma001/Blog | 6b19a77b71694bbe9f5e84207de46c68f87ebc5e | [
"Unlicense"
] | 10 | 2019-12-25T20:42:37.000Z | 2021-11-17T15:19:00.000Z | # -*- coding: utf-8 -*-
"""
werkzeug.serving
~~~~~~~~~~~~~~~~
There are many ways to serve a WSGI application. While you're developing
it you usually don't want a full blown webserver like Apache but a simple
standalone one. From Python 2.5 onwards there is the `wsgiref`_ server in
the standa... | 33.776515 | 88 | 0.598323 |
4a179c7128878fdcf2352facb1fde9371d2ccb47 | 1,194 | py | Python | mailmsg/createmsgpage.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | mailmsg/createmsgpage.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | 1 | 2020-02-05T13:00:29.000Z | 2020-02-05T13:00:29.000Z | mailmsg/createmsgpage.py | allankellynet/mimas | 10025d43bba9e84f502a266760786842e7158a05 | [
"MIT"
] | null | null | null | #-----------------------------------------------------
# Mimas: conference submission and review system
# (c) Allan Kelly 2016-2020 http://www.allankelly.net
# Licensed under MIT License, see LICENSE file
# -----------------------------------------------------
# System imports
# Google imports
from google.appengine.ex... | 27.767442 | 84 | 0.592965 |
4a179e148d964b2e4d1e704f14e3f016d64cbc9b | 20,246 | py | Python | test/functional/test_runner.py | jcooper036/garrycoin | b8bb83486619527dfdecfc00a94603611dc050ee | [
"MIT"
] | null | null | null | test/functional/test_runner.py | jcooper036/garrycoin | b8bb83486619527dfdecfc00a94603611dc050ee | [
"MIT"
] | null | null | null | test/functional/test_runner.py | jcooper036/garrycoin | b8bb83486619527dfdecfc00a94603611dc050ee | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Run regression test suite.
This module calls down into individual test cases via subprocess. It will
f... | 38.417457 | 195 | 0.624617 |
4a179ed99fbfd08e5e8934cc58e0773d4656458b | 1,861 | py | Python | utils/dictSet.py | mouton5000/DiscreteEventApplicationEditor | 4a4272fd9b0a7f3f228fee1e9e7b351e4a21cd33 | [
"MIT"
] | null | null | null | utils/dictSet.py | mouton5000/DiscreteEventApplicationEditor | 4a4272fd9b0a7f3f228fee1e9e7b351e4a21cd33 | [
"MIT"
] | null | null | null | utils/dictSet.py | mouton5000/DiscreteEventApplicationEditor | 4a4272fd9b0a7f3f228fee1e9e7b351e4a21cd33 | [
"MIT"
] | null | null | null | class DictContainer:
"""
A container for dictionnaries such that each dict is unique.
"""
def __init__(self):
self._tree = _DictTree(isRoot=True)
def add(self, d):
return self._tree.add(d, set([]))
class _DictTree:
def __init__(self, label=None, value=None, isRoot=False):
... | 30.016129 | 79 | 0.56475 |
4a179fc9cce88d72eae9c5810c81ae343ea779a9 | 7,612 | py | Python | template_maker/builder/views.py | codeforamerica/template-maker | 66d4744c123d5b868cf259e947dc924bb5a25c9a | [
"BSD-3-Clause"
] | 9 | 2015-02-23T22:03:30.000Z | 2020-01-31T19:06:50.000Z | template_maker/builder/views.py | codeforamerica/template-maker | 66d4744c123d5b868cf259e947dc924bb5a25c9a | [
"BSD-3-Clause"
] | 37 | 2015-03-01T01:10:22.000Z | 2015-12-31T17:24:42.000Z | template_maker/builder/views.py | codeforamerica/template-maker | 66d4744c123d5b868cf259e947dc924bb5a25c9a | [
"BSD-3-Clause"
] | 2 | 2016-01-21T09:59:17.000Z | 2021-04-16T10:51:04.000Z | from flask import (
Blueprint, request, make_response,
render_template, redirect, abort, url_for,
flash, current_app
)
from flask.ext.login import current_user
from template_maker.extensions import login_manager
from template_maker.users.models import User
from template_maker.builder.forms import (
Te... | 37.313725 | 111 | 0.709406 |
4a17a001272c1b7cc40db3bf8872ac8392c053ee | 22,078 | py | Python | mycroft/skills/intent_service.py | mcdonc/mycroft-core | 3c76177e75c1859a4a23b639438379455033d063 | [
"Apache-2.0"
] | null | null | null | mycroft/skills/intent_service.py | mcdonc/mycroft-core | 3c76177e75c1859a4a23b639438379455033d063 | [
"Apache-2.0"
] | null | null | null | mycroft/skills/intent_service.py | mcdonc/mycroft-core | 3c76177e75c1859a4a23b639438379455033d063 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 39.637343 | 79 | 0.61704 |
4a17a060b02e6ef592d47a2abae0a2f135913672 | 1,100 | py | Python | storage/legacy/pythos/pynetwork/node_0/test.py | opensourceplanet/ICS | 1946aa22ca7f02c08be8359c0ca5de1b13af2dc5 | [
"MIT"
] | null | null | null | storage/legacy/pythos/pynetwork/node_0/test.py | opensourceplanet/ICS | 1946aa22ca7f02c08be8359c0ca5de1b13af2dc5 | [
"MIT"
] | null | null | null | storage/legacy/pythos/pynetwork/node_0/test.py | opensourceplanet/ICS | 1946aa22ca7f02c08be8359c0ca5de1b13af2dc5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# for testing the current local build
# initial import
try:
import os, sys
import platform
from classes import User, Idea
import ipfs
import subprocess
import time
#import bloacks, bloacks, chain, client
#import generate, menu, writer, ledger
except:
print('... | 22.44898 | 98 | 0.68 |
4a17a1f9f76874ee93b5b546a81961ad94a0456d | 1,635 | py | Python | evaluator.py | Zenodia/nativePytorch_NMT | bfced09eb6e5476d34619dfc0dd41d4ed610248f | [
"MIT"
] | 60 | 2018-09-28T07:53:11.000Z | 2020-11-06T11:59:07.000Z | evaluator.py | Pravin74/transformer-pytorch | c31e163ed57321e405771ef7fb556d4d92fd5efb | [
"MIT"
] | 2 | 2021-02-15T14:08:08.000Z | 2021-09-12T12:52:37.000Z | evaluator.py | Pravin74/transformer-pytorch | c31e163ed57321e405771ef7fb556d4d92fd5efb | [
"MIT"
] | 18 | 2018-09-28T07:56:35.000Z | 2020-11-24T00:11:33.000Z | from nltk.translate.bleu_score import sentence_bleu, corpus_bleu, SmoothingFunction
from tqdm import tqdm
class Evaluator:
def __init__(self, predictor, save_filepath):
self.predictor = predictor
self.save_filepath = save_filepath
def evaluate_dataset(self, test_dataset):
tokenize =... | 40.875 | 111 | 0.609786 |
4a17a292f686c0c3b7391a8dfb24a906b7100089 | 2,243 | py | Python | myutils/wbutils.py | sony/dolp-colorconstancy | ebd57216db0a91bb1a5d27613cff15c2bcd9de0d | [
"MIT"
] | 1 | 2022-03-25T01:38:13.000Z | 2022-03-25T01:38:13.000Z | myutils/wbutils.py | sony/dolp-colorconstancy | ebd57216db0a91bb1a5d27613cff15c2bcd9de0d | [
"MIT"
] | null | null | null | myutils/wbutils.py | sony/dolp-colorconstancy | ebd57216db0a91bb1a5d27613cff15c2bcd9de0d | [
"MIT"
] | 2 | 2022-03-25T16:50:56.000Z | 2022-03-28T07:49:17.000Z | """
wbutils.py
Copyright (c) 2022 Sony Group Corporation
This software is released under the MIT License.
http://opensource.org/licenses/mit-license.php
"""
import numpy as np
def polarAWB_achromatic(imean, weight):
pixels_r = np.copy(imean[..., 0])
pixels_g = np.copy(imean[..., 1])
pixels_b = np.copy(im... | 34.507692 | 97 | 0.674543 |
4a17a369272dd73d61bcf9a1aa9faee2c7c67761 | 193 | py | Python | src/runner/i_discord_bot_runner.py | konrad2508/kokomi-discord-bot | 5a9d459e92d552fa24ba3ada5188db19d93f0aaa | [
"MIT"
] | 2 | 2022-03-02T15:56:41.000Z | 2022-03-10T16:30:41.000Z | src/runner/i_discord_bot_runner.py | konrad2508/kokomi-discord-bot | 5a9d459e92d552fa24ba3ada5188db19d93f0aaa | [
"MIT"
] | 2 | 2022-03-10T16:30:20.000Z | 2022-03-16T14:33:59.000Z | src/runner/i_discord_bot_runner.py | konrad2508/kokomi-discord-bot | 5a9d459e92d552fa24ba3ada5188db19d93f0aaa | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
class IDiscordBotRunner(ABC):
'''Class responsible for running the bot.'''
@abstractmethod
def run(self) -> None:
'''Runs the bot.'''
| 19.3 | 48 | 0.647668 |
4a17a37af30ca2e4f0cea24a2a2e6d334e799fc8 | 188 | py | Python | challs/electronic_codebad/build.py | gkanwar/ctf2021 | faf17d833f72ddcfb8a54c6d50a781de5f937381 | [
"MIT"
] | null | null | null | challs/electronic_codebad/build.py | gkanwar/ctf2021 | faf17d833f72ddcfb8a54c6d50a781de5f937381 | [
"MIT"
] | null | null | null | challs/electronic_codebad/build.py | gkanwar/ctf2021 | faf17d833f72ddcfb8a54c6d50a781de5f937381 | [
"MIT"
] | null | null | null | import struct
with open('flag.bmp', 'rb') as f:
raw_bytes = f.read()
with open('flag.bin', 'wb') as f:
off = struct.unpack('<I', raw_bytes[10:14])[0]
f.write(raw_bytes[off:])
| 23.5 | 50 | 0.606383 |
4a17a383ac65a80ef23430148eca21cd0cb3ea48 | 125 | py | Python | visits_detector/core/__init__.py | AlexFridman/visits-detector | 3df0c719c60c751ad449341fe5f68383352e8f5e | [
"MIT"
] | null | null | null | visits_detector/core/__init__.py | AlexFridman/visits-detector | 3df0c719c60c751ad449341fe5f68383352e8f5e | [
"MIT"
] | null | null | null | visits_detector/core/__init__.py | AlexFridman/visits-detector | 3df0c719c60c751ad449341fe5f68383352e8f5e | [
"MIT"
] | null | null | null | from extract_events_reducer import ExtractEventsReducer
from filter_and_map_to_index_mapper import FilterAndMapToIndexMapper
| 41.666667 | 68 | 0.936 |
4a17a5d702ba2181f4473d34de18257f0bc46d60 | 17,110 | py | Python | examples/pytorch/text-classification/run_xnli.py | edbeeching/transformers | 104c065277562ba276c46c329144e10c44dce286 | [
"Apache-2.0"
] | 3 | 2022-01-15T08:06:07.000Z | 2022-03-10T07:13:18.000Z | examples/pytorch/text-classification/run_xnli.py | arron1227/transformers | b18dfd95e1f60ae65a959a7b255fc06522170d1b | [
"Apache-2.0"
] | null | null | null | examples/pytorch/text-classification/run_xnli.py | arron1227/transformers | b18dfd95e1f60ae65a959a7b255fc06522170d1b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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.
... | 40.164319 | 119 | 0.677206 |
4a17a723c370c9afb22ba9a67968aba4ea399881 | 1,097 | py | Python | vtcdata/code/make_parameter_files_facetask.py | mvdoc/famretino2 | c5c7d1a757aedca81f62f4b2d0738f8fdb019e48 | [
"Apache-2.0"
] | null | null | null | vtcdata/code/make_parameter_files_facetask.py | mvdoc/famretino2 | c5c7d1a757aedca81f62f4b2d0738f8fdb019e48 | [
"Apache-2.0"
] | null | null | null | vtcdata/code/make_parameter_files_facetask.py | mvdoc/famretino2 | c5c7d1a757aedca81f62f4b2d0738f8fdb019e48 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import os
import os.path as op
from scipy.io import loadmat
rois = ['V1', 'V2', 'V3', 'hV4', 'IOG', 'pFus', 'mFus']
def filter_voxels(res, cutoff=50):
# as in Kay et al., select non-noisy voxels with at least 50% variance explained
idx = res['aggregatedtestperformance'][0] >= cutoff
ret... | 30.472222 | 84 | 0.620784 |
4a17a8f610810fcb135cfeb49b9d7e6dc26b24a1 | 20,455 | py | Python | paypal/express/views.py | evonove/django-oscar-paypal | f3561efb4654470e84087c2a7823d95feb8d28f1 | [
"BSD-3-Clause"
] | null | null | null | paypal/express/views.py | evonove/django-oscar-paypal | f3561efb4654470e84087c2a7823d95feb8d28f1 | [
"BSD-3-Clause"
] | 2 | 2022-02-02T10:13:09.000Z | 2022-02-02T12:07:25.000Z | paypal/express/views.py | evonove/django-oscar-paypal | f3561efb4654470e84087c2a7823d95feb8d28f1 | [
"BSD-3-Clause"
] | null | null | null | import logging
from decimal import Decimal as D
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import get_object_o... | 40.991984 | 110 | 0.629919 |
4a17a970c13474241c609c4f473e7d5b5a9948de | 12,355 | py | Python | src/sentry/plugins/bases/issue.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | null | null | null | src/sentry/plugins/bases/issue.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | null | null | null | src/sentry/plugins/bases/issue.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | null | null | null | """
sentry.plugins.bases.issue
~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import six
from django import forms
from django.conf import settings
from django.utils.html imp... | 35.19943 | 102 | 0.584945 |
4a17a9d8adb3e5be2f0cd4d147a9430a0f7e93bb | 8,813 | py | Python | forms_builder/forms/admin.py | barsch/django-forms-builder | eb634dade42933dadc045818d5840719fef2d913 | [
"BSD-2-Clause"
] | null | null | null | forms_builder/forms/admin.py | barsch/django-forms-builder | eb634dade42933dadc045818d5840719fef2d913 | [
"BSD-2-Clause"
] | null | null | null | forms_builder/forms/admin.py | barsch/django-forms-builder | eb634dade42933dadc045818d5840719fef2d913 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import unicode_literals
from future.builtins import bytes, open
from csv import writer
from mimetypes import guess_type
from os.path import join
from datetime import datetime
from io import BytesIO, StringIO
from django.contrib import admin
from django.core.files.storage import FileSystemStorage
try:
... | 42.574879 | 82 | 0.593782 |
4a17a9e0dd403f2c98c53462b5a1efff3ca7287f | 982 | py | Python | tests/clvm/test_serialized_program.py | 13767849/chia-blockchain | ad7d7e0cced7f2f6deddc9e006dbaeee6dab8f66 | [
"Apache-2.0"
] | 1 | 2021-05-28T01:38:23.000Z | 2021-05-28T01:38:23.000Z | tests/clvm/test_serialized_program.py | 13767849/chia-blockchain | ad7d7e0cced7f2f6deddc9e006dbaeee6dab8f66 | [
"Apache-2.0"
] | null | null | null | tests/clvm/test_serialized_program.py | 13767849/chia-blockchain | ad7d7e0cced7f2f6deddc9e006dbaeee6dab8f66 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
from src.types.blockchain_format.program import Program, SerializedProgram
from src.wallet.puzzles.load_clvm import load_clvm
SHA256TREE_MOD = load_clvm("sha256tree_module.clvm")
# TODO: test multiple args
class TestSerializedProgram(TestCase):
def test_tree_hash(self):
p =... | 35.071429 | 74 | 0.718941 |
4a17aa01bfcd38111b4677980d4a9c504ccc966a | 29,988 | py | Python | src/transformers/modeling_tf_openai.py | josecannete/transformers | c76c3cebed3c707178d9f721349c5abd5206a57f | [
"Apache-2.0"
] | 75 | 2020-10-07T04:55:48.000Z | 2022-03-31T09:06:18.000Z | src/transformers/modeling_tf_openai.py | rpowalski/transformers | dfe012ad9d6b6f0c9d30bc508b9f1e4c42280c07 | [
"Apache-2.0"
] | 14 | 2020-10-26T11:44:55.000Z | 2022-03-25T07:36:48.000Z | src/transformers/modeling_tf_openai.py | rpowalski/transformers | dfe012ad9d6b6f0c9d30bc508b9f1e4c42280c07 | [
"Apache-2.0"
] | 19 | 2020-10-10T23:08:24.000Z | 2022-01-14T09:44:17.000Z | # coding=utf-8
# Copyright 2018 The OpenAI Team Authors and HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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... | 46.71028 | 193 | 0.668667 |
4a17aa8afee64e06dcd3b3e9237e5d029c468b78 | 683 | py | Python | qmacroThinkingAloud.py | yasinnaal/Code-Python | 81828dbb959368a62a901dbc38f966ed5f3f8783 | [
"CC0-1.0"
] | 1 | 2021-03-30T10:47:09.000Z | 2021-03-30T10:47:09.000Z | qmacroThinkingAloud.py | yasinnaal/Python-YN | 81828dbb959368a62a901dbc38f966ed5f3f8783 | [
"CC0-1.0"
] | null | null | null | qmacroThinkingAloud.py | yasinnaal/Python-YN | 81828dbb959368a62a901dbc38f966ed5f3f8783 | [
"CC0-1.0"
] | null | null | null |
#qmacro Thinking Aloud
categories = ["Major", "Minor", "Mini", "Micro"]
blog = ["qmacro.org SAP Community", "autodidactics", "(something missing)", "Twitter"]
blog_e_length = len(blog)
blog_c_length = sum(len(i) for i in blog)
hdash = "-"* (blog_e_length + blog_c_length)
def DrawBoard(rows,cols):
pri... | 35.947368 | 87 | 0.551977 |
4a17aba439f324aa522353bbd6ebe83bc014f15b | 334 | py | Python | Scripts/003_hackerrank/Python/p095.py | OrangePeelFX/Python-Tutorial | 0d47f194553666304765f5bbc928374b7aec8a48 | [
"MIT"
] | null | null | null | Scripts/003_hackerrank/Python/p095.py | OrangePeelFX/Python-Tutorial | 0d47f194553666304765f5bbc928374b7aec8a48 | [
"MIT"
] | 1 | 2021-06-02T00:28:17.000Z | 2021-06-02T00:28:17.000Z | Scripts/003_hackerrank/Python/p095.py | florianwns/python-scripts | 0d47f194553666304765f5bbc928374b7aec8a48 | [
"MIT"
] | 1 | 2020-01-13T11:08:18.000Z | 2020-01-13T11:08:18.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Problem 095
String Split and Join
Source : https://www.hackerrank.com/challenges/python-string-split-and-join/problem
"""
def split_and_join(line):
return "-".join(line.split())
if __name__ == '__main__':
line = input()
result = split_and_join(line)
... | 19.647059 | 83 | 0.670659 |
4a17ac6ae62b6f8483f7dadac701423c45644934 | 1,065 | py | Python | dev/merger/__init__.py | ekpo-d/merger | a07c595e97b91defbae82bce502286bf51281dbf | [
"MIT"
] | null | null | null | dev/merger/__init__.py | ekpo-d/merger | a07c595e97b91defbae82bce502286bf51281dbf | [
"MIT"
] | 4 | 2020-03-24T15:35:06.000Z | 2021-02-02T21:42:15.000Z | dev/merger/__init__.py | ekpo-d/merger | a07c595e97b91defbae82bce502286bf51281dbf | [
"MIT"
] | null | null | null | # merger/__init__.py
from flask import Flask, jsonify, make_response
from flask.ext.bcrypt import Bcrypt
from flask.ext.sqlalchemy import SQLAlchemy
from merger.config import BaseConfig
# config
app = Flask(__name__)
app.config.from_object(BaseConfig)
bcrypt = Bcrypt(app)
db = SQLAlchemy(app)
@app.route('/')
def ... | 24.204545 | 72 | 0.752113 |
4a17acc8f0dca210533216b90eab2663df37257a | 893 | py | Python | Tracker/event.py | nordwind80/BT-Tracker | 558c15b399871c1ca11d0c4ae1eb598e3060931e | [
"MIT"
] | 1 | 2019-05-05T06:46:27.000Z | 2019-05-05T06:46:27.000Z | Tracker/event.py | nordwind80/BT-Tracker | 558c15b399871c1ca11d0c4ae1eb598e3060931e | [
"MIT"
] | null | null | null | Tracker/event.py | nordwind80/BT-Tracker | 558c15b399871c1ca11d0c4ae1eb598e3060931e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#
# Author: eaglewings
# E-Mail: ZWFnbGV3aW5ncy55aUBnbWFpbC5jb20=
# Created Time: 2019-04-14 20:14
# Last Modified:
# Description:
# - Project: BT Trackers Updater
# - File Name: event.py
# - singleton instance of Event
import time
from functools import wraps
class Eve... | 20.295455 | 42 | 0.596865 |
4a17ad1792b9a31e2b9b1dc82893365e38804c27 | 1,466 | py | Python | StardewSpeak/lib/speech-client/speech-client/characters.py | evfredericksen/StardewBot | f5d80cbeb95840aa4366d9104eb766935491a8e3 | [
"MIT"
] | 10 | 2021-06-02T18:30:40.000Z | 2022-01-15T18:11:05.000Z | StardewSpeak/lib/speech-client/speech-client/characters.py | evfredericksen/StardewBot | f5d80cbeb95840aa4366d9104eb766935491a8e3 | [
"MIT"
] | 1 | 2021-11-12T16:16:23.000Z | 2021-11-18T18:44:07.000Z | StardewSpeak/lib/speech-client/speech-client/characters.py | evfredericksen/StardewBot | f5d80cbeb95840aa4366d9104eb766935491a8e3 | [
"MIT"
] | null | null | null | import constants
npcs = {
'abigail': constants.ABIGAIL,
'alex': constants.ALEX,
'birdie': constants.BIRDIE,
'[the] bouncer': constants.BOUNCER,
'caroline': constants.CAROLINE,
'clint': constants.CLINT,
'demetrius': constants.DEMETRIUS,
'[the] dwarf': constants.DWARF,
'elliott': cons... | 30.541667 | 49 | 0.643929 |
4a17ad2fc97b21843cbf79aff137d7169b6027ec | 36,511 | py | Python | sabnzbd/nzbqueue.py | wfriesen/sabnzbd | c2ba998e7b47e28d1c904976293eba518b073d2e | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | sabnzbd/nzbqueue.py | wfriesen/sabnzbd | c2ba998e7b47e28d1c904976293eba518b073d2e | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | sabnzbd/nzbqueue.py | wfriesen/sabnzbd | c2ba998e7b47e28d1c904976293eba518b073d2e | [
"MIT",
"PSF-2.0",
"0BSD"
] | null | null | null | #!/usr/bin/python3 -OO
# Copyright 2007-2020 The SABnzbd-Team <team@sabnzbd.org>
#
# 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 your option) any late... | 39.772331 | 151 | 0.572677 |
4a17ae374709b77704deca0baa98401f9412a475 | 23,347 | py | Python | hdf5index.py | CodingNowNow/jiaoyi | 57513f8cf0d282fa70ac9e8e76ff785d7a2a019c | [
"MIT"
] | 1 | 2019-03-22T06:36:56.000Z | 2019-03-22T06:36:56.000Z | hdf5index.py | nvsnvyu/hikyuu | 57513f8cf0d282fa70ac9e8e76ff785d7a2a019c | [
"MIT"
] | null | null | null | hdf5index.py | nvsnvyu/hikyuu | 57513f8cf0d282fa70ac9e8e76ff785d7a2a019c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf8 -*-
# cp936
"""
建立HDF5索引
"""
import datetime
import tables
class IndexRecord(tables.IsDescription):
datetime = tables.UInt64Col() #IGNORE:E1101
start = tables.UInt64Col() #IGNORE:E1101
def UpdateWeekIndex(h5file):
try:
group = h5file.getNode("/... | 32.381415 | 103 | 0.544524 |
4a17afbc52e5d6b325da534ac2ba0e25af4f5e88 | 1,065 | bzl | Python | js/js_grpc_web_library.bzl | ashwin153/rules_proto_grpc | 093ffe3d6303bcd848121db4fa347ba6c9d3985a | [
"Apache-2.0"
] | 162 | 2019-07-15T22:35:30.000Z | 2022-03-28T21:16:29.000Z | js/js_grpc_web_library.bzl | ashwin153/rules_proto_grpc | 093ffe3d6303bcd848121db4fa347ba6c9d3985a | [
"Apache-2.0"
] | 166 | 2019-07-18T16:07:51.000Z | 2022-03-31T17:35:39.000Z | js/js_grpc_web_library.bzl | ashwin153/rules_proto_grpc | 093ffe3d6303bcd848121db4fa347ba6c9d3985a | [
"Apache-2.0"
] | 92 | 2019-08-21T04:15:24.000Z | 2022-03-11T18:42:54.000Z | """Generated definition of js_grpc_web_library."""
load("//js:js_grpc_web_compile.bzl", "js_grpc_web_compile")
load("//internal:compile.bzl", "proto_compile_attrs")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
def js_grpc_web_library(name, **kwargs):
# Compile protos
name_pb = name + "_pb"
... | 26.625 | 74 | 0.585915 |
4a17afc86c3a9d35002a2ac15fa9b6e0eecdc7d3 | 449 | py | Python | website/tracks/migrations/0015_auto_20161209_1248.py | abecede753/trax | 00fb2abdcab5b5ff564e2e97d26e5b16c631b778 | [
"MIT"
] | null | null | null | website/tracks/migrations/0015_auto_20161209_1248.py | abecede753/trax | 00fb2abdcab5b5ff564e2e97d26e5b16c631b778 | [
"MIT"
] | 10 | 2016-11-28T09:32:53.000Z | 2018-03-18T10:24:14.000Z | website/tracks/migrations/0015_auto_20161209_1248.py | abecede753/trax | 00fb2abdcab5b5ff564e2e97d26e5b16c631b778 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-12-09 12:48
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tracks', '0014_auto_20161206_1246'),
]
operations = [
migrations.AlterField... | 21.380952 | 48 | 0.614699 |
4a17afd878f17d509df58fc4f883d34fe4506c64 | 709 | py | Python | Program_3.py | Saumya-09/Machine_learning | ac7ea20b6a65efbbd8bad36c5b9512468ca40486 | [
"MIT"
] | null | null | null | Program_3.py | Saumya-09/Machine_learning | ac7ea20b6a65efbbd8bad36c5b9512468ca40486 | [
"MIT"
] | null | null | null | Program_3.py | Saumya-09/Machine_learning | ac7ea20b6a65efbbd8bad36c5b9512468ca40486 | [
"MIT"
] | null | null | null | #Write a python program to perform Linear classification using AND and OR logic.
#Code:
from random import choice
from numpy import array, dot, random
def unit_step(x): return 0 if x < 0.5 else 1
training_data = [
(array([0, 0, 1]), 0),
(array([0, 1, 1]), 1),
(array([1, 0, 1]), 1),
(array([1, 1, 1... | 19.694444 | 80 | 0.600846 |
4a17b0646716da0295ed8aab0c6e2e2ef68814fc | 11,146 | py | Python | fairseq/tasks/multitask_translation.py | wirehack/multitask_transformer | a973e3cd43bc7d2dbcda5ffa4b1eafcaba936afe | [
"BSD-3-Clause"
] | 1 | 2019-10-26T16:29:10.000Z | 2019-10-26T16:29:10.000Z | fairseq/tasks/multitask_translation.py | wirehack/multitask_transformer | a973e3cd43bc7d2dbcda5ffa4b1eafcaba936afe | [
"BSD-3-Clause"
] | null | null | null | fairseq/tasks/multitask_translation.py | wirehack/multitask_transformer | a973e3cd43bc7d2dbcda5ffa4b1eafcaba936afe | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import itertools
import os
import ... | 43.36965 | 106 | 0.611251 |
4a17b0e594052fb06783ed0482621e605c13356a | 10,840 | py | Python | abcpy/NN_utilities/algorithms.py | anish-lu-yihe/abcpy | be58367c4d7e38ee696238e3d8405e8abe2defb7 | [
"BSD-3-Clause-Clear"
] | 1 | 2021-08-24T10:40:55.000Z | 2021-08-24T10:40:55.000Z | abcpy/NN_utilities/algorithms.py | anish-lu-yihe/abcpy | be58367c4d7e38ee696238e3d8405e8abe2defb7 | [
"BSD-3-Clause-Clear"
] | null | null | null | abcpy/NN_utilities/algorithms.py | anish-lu-yihe/abcpy | be58367c4d7e38ee696238e3d8405e8abe2defb7 | [
"BSD-3-Clause-Clear"
] | null | null | null | try:
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
from torch.utils.data import Dataset
from abcpy.NN_utilities.datasets import Similarities, SiameseSimilarities, TripletSimilarities, \
ParameterSimulationPairs
from abcpy.NN_utili... | 46.926407 | 132 | 0.692066 |
4a17b14345dad7f81bf976984020256402740f5e | 851 | py | Python | CMPE451/practice_app/recommend/tests.py | oztasoi/bachelor-projects | a3e3a39efc9fed09db7290227848552f9604befa | [
"MIT"
] | null | null | null | CMPE451/practice_app/recommend/tests.py | oztasoi/bachelor-projects | a3e3a39efc9fed09db7290227848552f9604befa | [
"MIT"
] | null | null | null | CMPE451/practice_app/recommend/tests.py | oztasoi/bachelor-projects | a3e3a39efc9fed09db7290227848552f9604befa | [
"MIT"
] | null | null | null | from django.test import TestCase
from .models import Customer
from .models import Product
from .models import Similarity
from .models import WillBuy
# Create your tests here.
class CustomerTest(TestCase):
def create_customer(self, user, email):
return Customer.objects.create(user=user, email=email)
... | 32.730769 | 70 | 0.694477 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.