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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ac264dfb55ffa4f5dbce60129eefc2592b43b8fe | 618 | py | Python | src/test/tests/databases/silo_altdriver.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/databases/silo_altdriver.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/databases/silo_altdriver.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: silo_altdriver
#
# Tests: Runs the silo.py test using the 'other' driver. If silo.py
# was run on PDB driver, this will run them on HDF5 driver and
# vice versa.
#
# Progr... | 29.428571 | 78 | 0.462783 |
ac6b18611cf3e66e03d9b8ae424ae44dba300ad9 | 2,775 | py | Python | test/test_npu/test_network_ops/test_unique2.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_unique2.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_unique2.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# 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/lice... | 47.844828 | 120 | 0.605045 |
025e403d6659f7b432192d8c05e767c26593975d | 8,221 | py | Python | python/oneflow/compatible/single_client/benchmarks/cnn_benchmark/of_cnn_benchmarks.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/benchmarks/cnn_benchmark/of_cnn_benchmarks.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/benchmarks/cnn_benchmark/of_cnn_benchmarks.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.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... | 31.140152 | 86 | 0.669018 |
0280ff3466dd2ed9c0ec3effe7f948597d1a814a | 516 | py | Python | test/smtptest.py | sintrb/SinMail | f4166e58186ccc3b2466ffaaf85732445b89204a | [
"Apache-2.0"
] | 1 | 2016-02-25T19:31:34.000Z | 2016-02-25T19:31:34.000Z | test/smtptest.py | sintrb/SinMail | f4166e58186ccc3b2466ffaaf85732445b89204a | [
"Apache-2.0"
] | null | null | null | test/smtptest.py | sintrb/SinMail | f4166e58186ccc3b2466ffaaf85732445b89204a | [
"Apache-2.0"
] | null | null | null | import smtplib
import email.utils
from email.mime.text import MIMEText
msg = MIMEText('This is the body of the message.')
msg['To'] = email.utils.formataddr(('Recipient', 't2@example.com'))
msg['From'] = email.utils.formataddr(('Author', 'x@example.com'))
msg['Subject'] = 'Simple test message'
server = smtplib.SMTP('... | 32.25 | 78 | 0.709302 |
0c76c3f06c8566b2dee0dc2f6e051cd6cdd8cdbf | 292 | py | Python | chillow/controller/__init__.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 3 | 2021-01-17T23:32:07.000Z | 2022-01-30T14:49:16.000Z | chillow/controller/__init__.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-01-17T13:37:56.000Z | 2021-04-14T12:28:49.000Z | chillow/controller/__init__.py | jonashellmann/informaticup21-team-chillow | f2e519af0a5d9a9368d62556703cfb1066ebb58f | [
"MIT"
] | 2 | 2021-04-02T14:53:38.000Z | 2021-04-20T11:10:17.000Z | from chillow.controller.online_controller import OnlineController
from chillow.controller.offline_controller import OfflineController
from chillow.controller.ai_evaluation_controller import AIEvaluationController
__all__ = ['OnlineController', 'OfflineController', 'AIEvaluationController']
| 48.666667 | 78 | 0.880137 |
0caa968fd1c00fad633c65eab125b760e2c0c7bf | 92 | py | Python | 2014/07/stress-groups/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/07/stress-responses/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/07/stress-responses/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 = '1cJv4KrSE1tHChcAfS3NWWNavTcptA5z_16nYqdnEgxA'
| 23 | 68 | 0.847826 |
0cb9a5f5095ac2a8957e64abfb207544090b6cdb | 579 | py | Python | core/encoder.py | jreese/seinfeld | 400204cef0cb532c3e8e223fa48490247b9149ed | [
"MIT"
] | 4 | 2015-07-09T21:14:22.000Z | 2019-07-02T21:53:50.000Z | core/encoder.py | jreese/seinfeld | 400204cef0cb532c3e8e223fa48490247b9149ed | [
"MIT"
] | null | null | null | core/encoder.py | jreese/seinfeld | 400204cef0cb532c3e8e223fa48490247b9149ed | [
"MIT"
] | null | null | null | # Copyright 2014 John Reese
# Licensed under the MIT license
import json
class Encoder(json.JSONEncoder):
def default(self, o):
try:
return o._encode()
except:
return str(o)
def dump(obj, pretty=True):
indent = None
if pretty:
indent = 4
return json.du... | 21.444444 | 91 | 0.623489 |
b2b74543c1f462f6e2d2b20c847c4aab0bb99495 | 4,221 | py | Python | src/shapes/rect.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/shapes/rect.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/shapes/rect.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | from src.shapes.line import Line
class Rect:
"""
Rect class, stores boundries and dimensions of given rectangle.
Attributes:
x, y: float on-screen coords (left, top)
width, height: dimensions of the rectangle
fill: 3-int tuple, rgb color (fill_color)
stroke_color: 3-int tu... | 41.382353 | 120 | 0.599858 |
682ebb4a01d71c7eaa18c222383775c0ff7e2c1e | 306 | py | Python | site/public/courses/SPD-2.31/archive/lab/refactoring/split_temp_variable2.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/SPD-2.31/archive/lab/refactoring/split_temp_variable2.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/SPD-2.31/archive/lab/refactoring/split_temp_variable2.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | # By Kami Bigdely
# Split temp variable
def save_into_db(info):
print("Saved into database.")
user_input = input('Please enter your username: ')
save_into_db(user_input)
user_input = int(input('Please enter your birth year: '))
age = 2020 - user_input
print("You are",age, "years old.")
| 23.538462 | 58 | 0.69281 |
cc1e39be67246420f83067c3bd3203d1572afbf2 | 15,303 | py | Python | open/hls4ml/code/ad/AD03/training/autoqtrain.py | AidanYok/tiny_results_v0.5 | 3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2 | [
"Apache-2.0"
] | null | null | null | open/hls4ml/code/ad/AD03/training/autoqtrain.py | AidanYok/tiny_results_v0.5 | 3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2 | [
"Apache-2.0"
] | null | null | null | open/hls4ml/code/ad/AD03/training/autoqtrain.py | AidanYok/tiny_results_v0.5 | 3ec2c4a4fb5c7261876bb3e468b34d4e0e2ab4b2 | [
"Apache-2.0"
] | null | null | null | """
@file 00_train.py
@brief Script for training
@author Toshiki Nakamura, Yuki Nikaido, and Yohei Kawaguchi (Hitachi Ltd.)
Copyright (C) 2020 Hitachi, Ltd. All right reserved.
"""
########################################################################
# import default python-library
##########################... | 44.228324 | 163 | 0.473306 |
0bf21ed9509330e0449c517063d0d5a19336fb7a | 1,006 | py | Python | project/api/event_category/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/event_category/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/event_category/schemas.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from marshmallow import fields
from project.api import marshmallow
from project.api.schemas import (
IdSchemaMixin,
PaginationRequestSchema,
PaginationResponseSchema,
SQLAlchemyBaseSchema,
WriteIdSchemaMixin,
)
from project.models import EventCategory
class EventCategoryModelSchema(SQLAlchemyBase... | 22.355556 | 79 | 0.7833 |
4f9029f9381f72b8d8ac7db8cb10f14e96349d83 | 422 | py | Python | exercises/pt/exc_01_03_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/exc_01_03_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/exc_01_03_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | # Importar a classe da língua inglesa (English) e criar um objeto nlp
from ____ import ____
nlp = ____
# Processar o texto
doc = ____("I like tree kangaroos and narwhals.")
# Uma partição do Doc para "tree kangaroos"
tree_kangaroos = ____
print(tree_kangaroos.text)
# Uma partição do Doc para "tree kangaroos and nar... | 26.375 | 76 | 0.772512 |
4fc75f84ff9fea5e7997284fd6245c6596f0da14 | 318 | py | Python | Utils/py/SimsparkTests/Tests/__init__.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/SimsparkTests/Tests/__init__.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/SimsparkTests/Tests/__init__.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import glob
import importlib
import os
functions = {}
for __file in glob.glob(os.path.join(os.path.dirname(__file__), '*.py')):
__name = os.path.basename(__file)
if not __name.startswith('_'):
functions[__name[:-3]] = getattr(importlib.import_module(__name__ + '.' + __name[:-3]), __name[:-3], None)
| 28.909091 | 114 | 0.669811 |
2cfacdb0c342e63a9a3a097c293fc6afb6855a66 | 1,335 | py | Python | tests/onegov/gazette/test_validators.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_validators.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/gazette/test_validators.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.gazette.collections import CategoryCollection
from onegov.gazette.validators import UnusedColumnKeyValue
from onegov.notice import OfficialNotice
from onegov.notice import OfficialNoticeCollection
from pytest import raises
from wtforms.validators import ValidationError
class DummyApp(object):
def __in... | 27.8125 | 76 | 0.718352 |
ad4b1554ddc37a8f6eeccc93baa3c4beb8bf0ee5 | 5,213 | py | Python | apps/facerecog/aifacerec_pytorch.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/facerecog/aifacerec_pytorch.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/facerecog/aifacerec_pytorch.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | # My Interpretation of https://hackernoon.com/facial-similarity-with-siamese-networks-in-pytorch-9642aa9db2f7
from torch import nn
import torch.nn.functional as F
import torch
import robolib.datamanager.atntfaces as data
from torch.utils.data import Dataset
from torch.utils.data import DataLoader
from torch.autograd im... | 33.203822 | 110 | 0.622674 |
7e3ef553b34218e915d20ccb408fba91e2f65d89 | 364 | py | Python | 3.py | alvinbengeorge/HackerRank | 11101db16df57736cbcacd0a7d9e0b61069ba750 | [
"MIT"
] | 1 | 2021-11-06T13:24:58.000Z | 2021-11-06T13:24:58.000Z | 3.py | alvinbengeorge/HackerRank | 11101db16df57736cbcacd0a7d9e0b61069ba750 | [
"MIT"
] | null | null | null | 3.py | alvinbengeorge/HackerRank | 11101db16df57736cbcacd0a7d9e0b61069ba750 | [
"MIT"
] | null | null | null | #https://www.hackerrank.com/challenges/write-a-function/problem?isFullScreen=true&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen&h_r=next-challenge&h_v=zen
def is_leap(year):
if year % 4 ==0:
if year % 100 == 0 and year % 400 !=0:
return False
return True
return False
... | 33.090909 | 163 | 0.651099 |
0e704c5946ee5c81c403bd7336705f1e60acd52d | 691 | py | Python | testlogin/PageOperation.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | testlogin/PageOperation.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | testlogin/PageOperation.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# encoding='utf-8'
# author:weibk
# time:2021/10/28 19:32
class PageOp(object):
def __init__(self, wd):
self.driver = wd
def login(self, uname, pwd):
self.driver.get('http://localhost:8080/HKR')
self.driver.maximize_window()
self.driver.find_element_by_xpath(... | 30.043478 | 79 | 0.632417 |
0e98f7af5670a23b6b88381aa922389c6921227e | 6,177 | py | Python | python/en/archive/books/Python_Natural_Language_Processing/src/pnlp-4_preprocessing-regular_expression.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/Python_Natural_Language_Processing/src/pnlp-4_preprocessing-regular_expression.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/Python_Natural_Language_Processing/src/pnlp-4_preprocessing-regular_expression.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
pnlp-4_preprocessing-regular_expression.py
Source: Python Natural Language Processing
Advanced machine learning and deep learning techniques for natural language processing
Jalaj Thanaki
파이썬 자연어 처리의 이론과 실제
효율적인 자연어 처리를 위한 머신 러닝과 딥러닝 구현하기
04. 전처리 > 기본 전처리 > 정규 표현식
pp.125~135
regex or regul... | 32.171875 | 98 | 0.553343 |
cb6c81245ff7f8ff0cac7797cb2b3c2483e81760 | 7,424 | py | Python | tests/onegov/election_day/utils/common.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/utils/common.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/utils/common.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from io import BytesIO
from onegov.ballot import Ballot
from onegov.ballot import BallotResult
from onegov.ballot import Candidate
from onegov.ballot import CandidateResult
from onegov.ballot import Election
from onegov.ballot import ElectionCompound
from onegov.ballot import ElectionResult
fr... | 29.460317 | 75 | 0.665544 |
69782874339952f68b1ca7dcb1ff872662f16e6f | 2,483 | py | Python | SuperBench/Source/popi.py | FBerendsen/SuperElastix-1 | 69d97589e34f6f2109621e917792ce18e32442fe | [
"Apache-2.0"
] | null | null | null | SuperBench/Source/popi.py | FBerendsen/SuperElastix-1 | 69d97589e34f6f2109621e917792ce18e32442fe | [
"Apache-2.0"
] | null | null | null | SuperBench/Source/popi.py | FBerendsen/SuperElastix-1 | 69d97589e34f6f2109621e917792ce18e32442fe | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
import numpy as np
import scipy
import SimpleITK as sitk
from .eval import eval_point_sets, eval_deformation_field
class POPI(object):
def __init__(self, input_directory):
self.name = 'POPI'
self.input_directory = input_directory
self.image_file_names = []
... | 45.981481 | 120 | 0.614982 |
38730bd6c1e12b79bab57dbaee5336739fb2abae | 13,456 | py | Python | tests/onegov/election_day/forms/test_screen_form.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/forms/test_screen_form.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/forms/test_screen_form.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from onegov.ballot import ComplexVote
from onegov.ballot import Election
from onegov.ballot import ElectionCompound
from onegov.ballot import ProporzElection
from onegov.ballot import Vote
from onegov.election_day.forms import ScreenForm
from onegov.election_day.models import Screen
from tests... | 32.502415 | 79 | 0.570972 |
38b823c623eecd66fafa4f37276cc426dce172b5 | 2,152 | py | Python | repo/script.video.F4mProxy/lib/flvlib/primitives.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/script.video.F4mProxy/lib/flvlib/primitives.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/script.video.F4mProxy/lib/flvlib/primitives.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | import struct
"""
The internal FLV representations of numbers.
"""
__all__ = ['get_ui32', 'make_ui32', 'get_si32_extended', 'make_si32_extended',
'get_ui24', 'make_ui24', 'get_ui16', 'make_ui16',
'get_si16', 'make_si16', 'get_ui8', 'make_ui8',
'get_double', 'make_double', '... | 20.11215 | 79 | 0.568309 |
2a996af3ec5005333276b79d0e5029975e9a7c24 | 703 | py | Python | INBa/2015/Rogko_K_A/task_6_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rogko_K_A/task_6_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rogko_K_A/task_6_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 20
#Создайте игру, в которой компьютер загадывает имя одного из семи гномов, друзей Белоснежки, а игрок должен его угадать.
# Рожко Ксения
# 23.05.2016
import random
print("Компьютер загадал название одного из семи гномов Белоснежки, а Вы должны его угадать.\n")
continents = ('Умник','Ворчун','... | 23.433333 | 120 | 0.708393 |
2d5c24fe39d46a347332f751b877f2b46d358b36 | 3,898 | py | Python | crm/forms.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | 1 | 2021-01-23T21:42:10.000Z | 2021-01-23T21:42:10.000Z | crm/forms.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | crm/forms.py | baniasbaabe/happy-qr | bf44ac19306ea6405cc7c9a100e6f83afca125b4 | [
"MIT"
] | null | null | null | from django.forms import ModelForm
from .models import *
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django import forms
class KundeForm(ModelForm):
"""
Eine Klasse zur Repräsentation einer Kundenform
...
Classes
... | 21.417582 | 91 | 0.449718 |
ea301a9b1f36664feba97edcf3c4363f5fc425a3 | 1,046 | py | Python | Curso-Em-Video-Python/2Exercicios/045_joquenpo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/045_joquenpo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/045_joquenpo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from random import randint
from time import sleep
nome = str(input('Digite Seu nome: '))
jogador = int(input('''[0] Pedra
[1] Papel
[2] Tesoura
Escolha uma opção: '''))
jogada0 = ('Pedra Papel Tesoura').split()
pc = randint(1, 2)
print('-' * 30)
print('Jo')
sleep(1)
print('Ken')
sleep(1)
print('Po')
sleep(1)
print('{}... | 25.512195 | 51 | 0.576482 |
a4d987ae78798bd1f49b5cd1c9042cb0a599c2a6 | 402 | py | Python | source/pkgsrc/devel/gyp/patches/patch-pylib_gyp_common.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/gyp/patches/patch-pylib_gyp_common.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/gyp/patches/patch-pylib_gyp_common.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-pylib_gyp_common.py,v 1.4 2017/01/11 14:47:51 wiz Exp $
* Add NetBSD support
--- pylib/gyp/common.py.orig 2017-01-11 14:31:33.000000000 +0000
+++ pylib/gyp/common.py
@@ -441,6 +441,7 @@ def CopyTool(flavor, out_path, generator
prefix = {
'aix': 'flock',
'solaris': 'flock',
+ 'netb... | 26.8 | 70 | 0.584577 |
d80ce85b714f61b32d3b017be42f24be304def5f | 1,408 | py | Python | challenge32/exploit/exploit.py | dobin/yookiterm-challenges-files | 81daab38d83bdc083bd9a66e90eea1397c5e30ed | [
"MIT"
] | 17 | 2017-05-03T22:00:30.000Z | 2021-12-07T10:15:41.000Z | challenge/32/src/exploit/exploit.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 2 | 2017-06-16T02:09:05.000Z | 2018-03-01T08:58:24.000Z | challenge/32/src/exploit/exploit.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 11 | 2017-05-04T13:04:21.000Z | 2020-12-15T23:00:02.000Z | from pwn import *
MAX_MOVIE_NAME_LEN = 40
MAX_MOVIE_DESCRIPTION_LEN = 512
s = process('./moviedb')
s.readuntil('>')
### STEP 1 ###
s.sendline('1')
s.sendafter('Name: ', 'A' * MAX_MOVIE_NAME_LEN)
s.sendafter('Description: ', 'A' * MAX_MOVIE_DESCRIPTION_LEN)
s.sendlineafter('Year: ', str(0xffffffff))
s.sendlineafter(... | 29.957447 | 118 | 0.694602 |
dc98afd9b8f4c8f7d1f4af8ca7927648a076bbe3 | 102 | py | Python | python/python_backup/PRAC_PYTHON/2_PRT_input.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/2_PRT_input.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/2_PRT_input.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=input("Enter P :");
b=input("Enter R :");
c=input("Enter T :");
si=a*b*c;
print("output SI",si); | 20.4 | 22 | 0.54902 |
5e5e6f169d5fe0b59865621f66664ac8246a5a9a | 14,293 | py | Python | SBTK_League_Helper/src/tools/dictionaries.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/tools/dictionaries.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/src/tools/dictionaries.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from .markers import AdHocMarker
from .exceptions import InitializationError, ReservedValueError
from collections import OrderedDict
######################
## ##
## CUSTOM CLASSES ##
## ##
######################
class MarkedDict(OrderedDict): # This class and its subclasses always ... | 38.525606 | 175 | 0.553698 |
21e33db131bcfdf4a384ed404553daf78e22ea4a | 228 | pyde | Python | sketches/Movie/Movie.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/Movie/Movie.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/Movie/Movie.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | add_library('video')
def setup():
global movie
size(560, 315)
movie = Movie(this, "confettisystem.mp4")
movie.loop()
def movieEvent(movie):
movie.read()
def draw():
global movie
image(movie, 0, 0)
| 15.2 | 45 | 0.622807 |
df06e932efe70e6c6f2c17d19a3f1d97262feaf0 | 5,588 | py | Python | roboraptorz/sim/simulator/Map.py | icebear8/roboRinth | c0789a9faf978f31b0ed020d26fee2b04fb298ee | [
"MIT"
] | null | null | null | roboraptorz/sim/simulator/Map.py | icebear8/roboRinth | c0789a9faf978f31b0ed020d26fee2b04fb298ee | [
"MIT"
] | null | null | null | roboraptorz/sim/simulator/Map.py | icebear8/roboRinth | c0789a9faf978f31b0ed020d26fee2b04fb298ee | [
"MIT"
] | 1 | 2019-10-22T07:47:51.000Z | 2019-10-22T07:47:51.000Z | import logging
import Robot
import copy
import curses
from matrix import Matrix
logger = logging.getLogger(__name__)
class Connection(object):
def __init__(self, start, direction, color="B"):
if direction[0][0] < 0 or direction[1][0] < 0 :
self.start = start + direction
self.direct... | 34.493827 | 154 | 0.507695 |
df19be5d05898f5e707252fb48b283bdec68d26d | 688 | py | Python | zencad/examples/1.GeomPrim/1.prim3d/cylinder.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/1.GeomPrim/1.prim3d/cylinder.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/1.GeomPrim/1.prim3d/cylinder.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
from zencad import *
m0 = cylinder(r=10, h=20)
m1 = cylinder(r=10, h=20, yaw=deg(90))
m0c = cylinder(r=10, h=20, center=True)
m1c = cylinder(r=10, h=20, yaw=deg(90), center=True)
display(m0.right(30 * 0))
display(m1.right(30 * 1))
display(m0c.right(30 * 2))
display(m1c.right(... | 23.724138 | 76 | 0.65407 |
df942ee59a134134354c0f8178f7141c176ac36e | 11,896 | py | Python | repo/service.vpn.manager/managefiles.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 1 | 2017-11-26T18:18:46.000Z | 2017-11-26T18:18:46.000Z | repo/service.vpn.manager/managefiles.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | null | null | null | repo/service.vpn.manager/managefiles.py | dbiesecke/dbiesecke.github.io | 5894473591f078fd22d1cb33794c5e656ae9b8dd | [
"MIT"
] | 3 | 2019-09-30T19:52:05.000Z | 2020-04-12T21:20:56.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Zomboided
#
# 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... | 54.568807 | 232 | 0.535894 |
d5aa06d732acb892cc0299c47bbb16ddd49247c2 | 4,993 | py | Python | UAS/UAS 7/main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 7/main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 7/main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | #Main Program
from Class import Item
wadah1, wadah2, wadah3 = [
Item(' = ', 1),
Item(' === ', 2),
Item(' ===== ', 3),
Item(' ======= ', 4),
Item('=========', 5)
],[
Item(' ', 0),
Item(' ', 0),
Item(' ', 0),
Item(' ', 0),
Item(' ', 0)
],[
It... | 24.356098 | 93 | 0.497096 |
6380f024ec5fe7c8fe4d0882d6227afac736303d | 305 | py | Python | source/api/api_message.py | weberval/SocialBot | f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b | [
"MIT"
] | 2 | 2018-04-07T14:56:12.000Z | 2020-03-26T12:06:51.000Z | source/api/api_message.py | weberval/SocialBot | f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b | [
"MIT"
] | 2 | 2018-04-07T14:55:31.000Z | 2018-04-25T07:43:29.000Z | source/api/api_message.py | weberval/SocialBot | f45e16c28fe2a1283b09b1f5c7b6334ef03f9a7b | [
"MIT"
] | 2 | 2019-09-06T22:31:43.000Z | 2020-03-26T12:06:51.000Z | import json
class APIMessage:
@staticmethod
def create(message=None, code=None, dump=None):
mes = {}
if message:
mes['message'] = message
if code:
mes['code'] = code
if dump:
mes['dump'] = dump
return json.dumps(mes)
| 17.941176 | 51 | 0.504918 |
6397a2c9604614387daf38d84ea787f898b3266f | 46,405 | py | Python | src/analyze_deaths.py | icestorm972/Covid19-PyAnalysis-Collection | 16127e9c590d37d3dfc89ec9877c52e6336d7d30 | [
"MIT"
] | 1 | 2021-05-02T09:53:25.000Z | 2021-05-02T09:53:25.000Z | src/analyze_deaths.py | icestorm972/Covid19-PyAnalysis-Collection | 16127e9c590d37d3dfc89ec9877c52e6336d7d30 | [
"MIT"
] | null | null | null | src/analyze_deaths.py | icestorm972/Covid19-PyAnalysis-Collection | 16127e9c590d37d3dfc89ec9877c52e6336d7d30 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Nov 21 20:23:06 2020
@author: David
"""
import sys
sys.path.append('.')
import os
import inspect
from pathlib import Path
import numpy as np
import pandas as pd
import scipy.signal as sig
import scipy.stats as stat
import scipy.interpolate as intp
import scipy.optimize as... | 34.996229 | 181 | 0.556169 |
63c970bccba7a0aeaff91394bf0349575376cbef | 797 | py | Python | demos/Multiscale/ThreeSidedBasic/model/parts/sys_params.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | demos/Multiscale/ThreeSidedBasic/model/parts/sys_params.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | demos/Multiscale/ThreeSidedBasic/model/parts/sys_params.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z |
# params
params = {
'eta': [.33], # for tx_volume_generator
'tampw': [100000], # transactions limit
'alpha': [.5], # for data acquisition cost generator
'beta': [.2], # for data acquisition cost generator
'costDecrease': [.015], # decrease in cost
'price': [1], # sales price
'vcRoundFundin... | 28.464286 | 62 | 0.560853 |
8948d6aee9e86417173d926bfca4b80547720803 | 7,595 | py | Python | yolov5-coreml-tflite-converter/coreml/coreml_model/coreml_export_layer.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/coreml/coreml_model/coreml_export_layer.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/coreml/coreml_model/coreml_export_layer.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import logging
import torch
from constants import XY_SLICE, WH_SLICE, SCORE_SLICE, CLASSES_SLICE, BLUE, END_COLOR
class CoreMLExportLayerGenerator:
def __init__(self, model):
self.model = model
def add_to(self, builder):
'''
Adds the yolov5 export layer to the coreml model
'... | 59.80315 | 120 | 0.599868 |
89aa999a560c4018a60a8713bf50ad9a527ebb3b | 1,312 | py | Python | Pythonskripte/p3env/fuseRandom.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Pythonskripte/p3env/fuseRandom.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Pythonskripte/p3env/fuseRandom.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | from pydub import AudioSegment as AS
from random import randint
from os import listdir
def fuse(in0,in1,out):
sound0 = AS.from_wav(in0)
sound1 = AS.from_wav(in1)
kombi_sound = sound0 + sound1
if len(kombi_sound) < 2000:
kombi_sound = kombi_sound + AS.silent(duration=(2000-len(kombi_sound)),frame... | 48.592593 | 149 | 0.716463 |
988fdc6b91dcd6ec91776bba00392f1aa9ffc585 | 24,962 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/output/generateITetrisNetworkMetrics.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/output/generateITetrisNetworkMetrics.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/output/generateITetrisNetworkMetrics.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) 2009-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... | 43.947183 | 119 | 0.620904 |
10161786b1f96f3e5409233ef8786182eaf42102 | 4,907 | py | Python | sspdemo3-13.py | carlsplace/ssp | 7f35fb53445c35dfaf282c12f8b0a55c1c5d3d2a | [
"MIT"
] | null | null | null | sspdemo3-13.py | carlsplace/ssp | 7f35fb53445c35dfaf282c12f8b0a55c1c5d3d2a | [
"MIT"
] | null | null | null | sspdemo3-13.py | carlsplace/ssp | 7f35fb53445c35dfaf282c12f8b0a55c1c5d3d2a | [
"MIT"
] | null | null | null | import networkx as nx
import numpy as np
import math
d = 0.85
alpha = 0.5
step_size = 0.1
iteration = 0
B = np.array([[0, 1, 0, 0, -1], [0, -1, 1, 0, 0]])
print B
miu = np.array([0.8, 0.2])
# features of edges
x = {
12 : np.array([5, 7]),
13 : np.array([4, 5]),
23 : np.array([6, 4]),
42 : np.array(... | 28.04 | 133 | 0.405543 |
c3ed3fcd045da3746b31a19fb024ecc140544cc1 | 4,412 | py | Python | basic/37-charm.fi/tests/test_simulations.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 987 | 2021-12-19T09:57:18.000Z | 2022-03-31T15:39:45.000Z | basic/37-charm.fi/tests/test_simulations.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 73 | 2021-07-04T03:53:57.000Z | 2021-12-18T06:17:13.000Z | basic/37-charm.fi/tests/test_simulations.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 263 | 2021-06-28T15:26:56.000Z | 2021-12-19T08:14:37.000Z | from brownie.test import given, strategy
from math import sqrt
EPS = 1e-9
@given(
lower=strategy("uint256", min_value=1, max_value=999),
upper=strategy("uint256", min_value=1001, max_value=10000),
shares=strategy("uint256", min_value=1, max_value=1000),
px1=strategy("uint256", min_value=1, max_value... | 32.925373 | 87 | 0.642339 |
6132c6edc1eae238d0c07d7a6218df95ca725a37 | 2,730 | py | Python | Packs/ShiftManagement/Scripts/GetUsersOnCall/GetUsersOnCall.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/ShiftManagement/Scripts/GetUsersOnCall/GetUsersOnCall.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/ShiftManagement/Scripts/GetUsersOnCall/GetUsersOnCall.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
from typing import List
def filter_OOO_users(get_users_response, ooo_list_name):
"""
Given the response with all OnCall users, remove the users that are Out Of Office, using the list `OOO List`.
"""
al... | 40.147059 | 127 | 0.669231 |
149415b69e6458f80970c10d188f2d28ee122dd6 | 962 | py | Python | prototype/examples/user_support/lab_orchestrator_prototype/model.py | LernmodulController/LernmodulController-LernmodulControllerDocumentation | 4d0cb3dcac01676f6a97df8f558095a27a4296af | [
"MIT"
] | null | null | null | prototype/examples/user_support/lab_orchestrator_prototype/model.py | LernmodulController/LernmodulController-LernmodulControllerDocumentation | 4d0cb3dcac01676f6a97df8f558095a27a4296af | [
"MIT"
] | null | null | null | prototype/examples/user_support/lab_orchestrator_prototype/model.py | LernmodulController/LernmodulController-LernmodulControllerDocumentation | 4d0cb3dcac01676f6a97df8f558095a27a4296af | [
"MIT"
] | 1 | 2021-09-26T12:09:52.000Z | 2021-09-26T12:09:52.000Z | import sqlalchemy as sql
from lab_orchestrator_prototype.app import db
class DockerImage(db.Model):
__tablename__ = 'docker_image'
id = sql.Column(sql.Integer, primary_key=True)
name = sql.Column(sql.String(32), unique=True)
description = sql.Column(sql.String(128))
url = sql.Column(sql.String(25... | 33.172414 | 80 | 0.713098 |
214615ca0c634ad21b70c6abfca6c8442006f24a | 25,819 | py | Python | Packs/CiscoStealthwatch/Integrations/CiscoStealthwatch/CiscoStealthwatch.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CiscoStealthwatch/Integrations/CiscoStealthwatch/CiscoStealthwatch.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CiscoStealthwatch/Integrations/CiscoStealthwatch/CiscoStealthwatch.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import requests
import dateparser
from datetime import datetime
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
class Client(BaseClient):
"""
Cisco... | 41.376603 | 100 | 0.619892 |
d330635db08287ffddcaecb20040f891cfc1be50 | 2,680 | py | Python | ts2panda/scripts/generate_js_bytecode.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | null | null | null | ts2panda/scripts/generate_js_bytecode.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | null | null | null | ts2panda/scripts/generate_js_bytecode.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | 2 | 2021-09-13T11:32:30.000Z | 2021-09-13T12:12:06.000Z | #!/usr/bin/env python3
# coding: utf-8
"""
Copyright (c) 2021 Huawei Device 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... | 30.454545 | 72 | 0.645522 |
d371776332e2b91b5021a3420f8ef313787f33ba | 889 | py | Python | zencad/examples/1.GeomPrim/3.prim1d/bspline.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/1.GeomPrim/3.prim1d/bspline.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/1.GeomPrim/3.prim1d/bspline.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
ZenCad API example: bspline.py
# https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/bspline-ex-1.html
# https://en.wikipedia.org/wiki/B-spline
"""
from zencad import *
knots_total = 5
m0 = bspline(
poles = points([(0, 0, 0), (0, 10, 0), (10, 10)]),
knots = [ i * 1 / (knots... | 22.225 | 85 | 0.606299 |
9811250715f4acc154514b99dcd1f172d78bb958 | 1,159 | py | Python | Packs/Bonusly/Scripts/IncOwnerToBonuslyUser/IncOwnerToBonuslyUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Bonusly/Scripts/IncOwnerToBonuslyUser/IncOwnerToBonuslyUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Bonusly/Scripts/IncOwnerToBonuslyUser/IncOwnerToBonuslyUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
"""
Pass in JSON key value lookup then fetches the incident owner and finds the bonusly user
"""
json_lookup = demisto.args().get('json')
if isinstance(json_lookup, str):
json_lookup = json.loads(json_lookup)
def inc_owner_bonusly_user():
owner... | 36.21875 | 110 | 0.684211 |
e2f93ae6c1a4d61957a42edea23dce012dda6621 | 642 | py | Python | HackerRank/HackerRank-Python/Basic Data Types/Nested Lists.py | tareqmahmud/Competitive-Programming | ad5e53300d70280bccbd5046ca01278fb246f314 | [
"MIT"
] | 2 | 2020-11-19T19:03:28.000Z | 2021-01-04T19:52:11.000Z | HackerRank-Python/Basic Data Types/Nested Lists.py | tareqmahmud/HackerRank | e1b9facab6582f86ea6cc63afcc640e66ba3f67e | [
"MIT"
] | null | null | null | HackerRank-Python/Basic Data Types/Nested Lists.py | tareqmahmud/HackerRank | e1b9facab6582f86ea6cc63afcc640e66ba3f67e | [
"MIT"
] | null | null | null | if __name__ == "__main__":
n = int(input())
students = []
for _ in range(n):
name = input()
score = float(input())
students.append([name, score])
# get the scores
scores = set([students[x][1] for x in range(n)]) # (5, 4, 3, 1)
scores = list(scores) # [5, 4, 3, 1]
s... | 30.571429 | 104 | 0.565421 |
3909ac67488ae9135575e48c17a532fef2d49679 | 2,429 | py | Python | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/09_schere_stein_papier.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/09_schere_stein_papier.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/09_schere_stein_papier.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Schere-Stein-Papier gegen den Computer
from random import randint as rng
objekte=['✂', '◙', '▒']
print(' _____ _____ _ _ ______ _____ ______ ')
print(' / ____|/ ____| | | | ____| __ \| ____|')
print(' | (___ | | | |__| | |__ | |__) | |__ ')
print(' \___ \| | | __ | __| | _ /| __| ')
pri... | 34.7 | 106 | 0.482091 |
1a7a836158d37b98baf3fa12eaef44f047768bf6 | 1,029 | py | Python | PINp/2015/ZATERIN_V_D/task_4_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2015/ZATERIN_V_D/task_4_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2015/ZATERIN_V_D/task_4_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Напишите программу, которая выводит имя, под которым скрывается Михаил
#Ефимович Фрилянд. Дополнительно необходимо вывести область интересов
#указанной личности, место рождения, годы рождения и смерти (если человек
#умер), вычислить возраст на данный момент (или момент смерти). Для хранения
#всех необходимых данных т... | 44.73913 | 180 | 0.773567 |
1ab72101184b857fed7188e6adf2fc2666e5d710 | 445 | py | Python | src/onegov/file/errors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/file/errors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/file/errors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | class AlreadySignedError(RuntimeError):
def __init__(self, file):
super().__init__(f"File {file.id} has already been signed")
class InvalidTokenError(RuntimeError):
def __init__(self, token):
super().__init__(f"The given token could not be validated: {token}")
class TokenConfigurationError(R... | 31.785714 | 76 | 0.716854 |
37b8ef5da8778dc9698d98d6703c20be4874c2b3 | 144 | py | Python | docker/django/restaurant/restapi/admin.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 3 | 2019-08-29T10:14:40.000Z | 2021-03-05T09:50:15.000Z | docker/django/restaurant/restapi/admin.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | null | null | null | docker/django/restaurant/restapi/admin.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 1 | 2021-03-05T09:50:29.000Z | 2021-03-05T09:50:29.000Z | from django.contrib import admin
from restapi.models import Restaurant, FoodMenu
admin.site.register(Restaurant)
admin.site.register(FoodMenu)
| 24 | 47 | 0.840278 |
03b2ae0e967ba11e749539e267b412dcf2df5318 | 2,352 | py | Python | appdaemon/apps/temperature_lamp.py | Adamvg/SmartHouse | 740b010260f6f6b38a19e2a75d431446abd54253 | [
"MIT"
] | 136 | 2019-06-27T08:11:47.000Z | 2022-03-11T12:26:53.000Z | appdaemon/apps/temperature_lamp.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 5 | 2020-05-30T00:19:22.000Z | 2022-03-25T18:49:47.000Z | appdaemon/apps/temperature_lamp.py | Venkysgithu/SmartHouse | d4e42dbbbb1f535f1684d507de411a4421b92e4d | [
"MIT"
] | 63 | 2019-07-15T21:11:58.000Z | 2022-03-13T09:43:24.000Z | import appdaemon.plugins.hass.hassapi as hass
def lerp(a, b, t):
return round(a*(1.0 - t) + b*t)
class TemperatureLamp(hass.Hass):
def initialize(self):
self.log("Started!")
self.light_id = self.args['light_id']
self.temperature_id = self.args['outside_temperature_id']
self.family_devi... | 39.2 | 118 | 0.667517 |
03cbb50a97b32ade46a30b3f95f43b9cb3894d0f | 29,990 | py | Python | src/onegov/translator_directory/report.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/report.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/report.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from io import BytesIO
from xlsxwriter import Workbook
from onegov.translator_directory.layout import DefaultLayout
"""
https://xlsxwriter.readthedocs.io/working_with_formulas.html
Write in the xlsx format
"""
class TranslatorVoucher(object):
title = 'Abrechungsbeleg Übersetzende'
title_font_size = 12
... | 35.916168 | 79 | 0.523508 |
209b1671f70707f1aacbe4cfaf7ded868ba4c50e | 5,925 | py | Python | src/onegov/wtfs/layouts/scan_job.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/layouts/scan_job.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/layouts/scan_job.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from cached_property import cached_property
from onegov.core.elements import Confirm
from onegov.core.elements import Intercooler
from onegov.core.elements import Link
from onegov.wtfs import _
from onegov.wtfs.layouts.default import DefaultLayout
from onegov.wtfs.security import AddModel
from onegov.wtfs.security impo... | 28.762136 | 76 | 0.499072 |
ff9f4574d7d37e8a2c1cbaa5e84b108a3b90589e | 806 | py | Python | projects/g3h2-algorithm/practice3/4_all_pairs_shortest_paths.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h2-algorithm/practice3/4_all_pairs_shortest_paths.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h2-algorithm/practice3/4_all_pairs_shortest_paths.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | from math import inf
def floyd_warshall(w):
n = len(w)
d = w.copy()
pi = [[i if (d[i][j] != inf and i != j) else None for j in range(n)] for i in range(n)]
for k in range(n):
pi = [[pi[i][j] if d[i][j] <= d[i][k] + d[k][j] else pi[k][j] for j in range(n)] for i in range(n)]
d = [[d[i][... | 26.866667 | 112 | 0.461538 |
44458c17b2dba7ff8abeb963d62473380aacbaba | 4,089 | py | Python | src/bo4e/enum/messwertstatuszusatz.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/messwertstatuszusatz.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/messwertstatuszusatz.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Messwertstatuszusatz(StrEnum):
"""
Aufzählung von zusätzlichen Informationen zum Status, beispielsweise in Lastgängen oder Zählwerkständen.
"""
Z84_LEERSTAND = "Z84_LEERSTAND" #: Z84_LEERSTAND
Z85_REALERZAEHLE... | 69.305085 | 119 | 0.820983 |
923093f4da51ea4217f12eb995fd30154fb88a70 | 291 | py | Python | computer-networking-a-top-down-approach/cp2/ping_server.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | 3 | 2021-08-04T07:59:48.000Z | 2022-03-26T23:58:17.000Z | computer-networking-a-top-down-approach/cp2/ping_server.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | computer-networking-a-top-down-approach/cp2/ping_server.py | Jocs/reading-notes | 26b8331877a2de034b8860bc3e3967893112d52d | [
"MIT"
] | null | null | null | from socket import *
import random
serverSocket = socket(AF_INET, SOCK_DGRAM)
serverSocket.bind(('', 12000))
while True:
rand = random.randint(0, 10)
message, address = serverSocket.recvfrom(1024)
message = message.upper()
if rand < 4:
continue
serverSocket.sendto(message, address) | 22.384615 | 47 | 0.745704 |
2bdf82f34aba91d7a06f526f37c45c64e7aec43f | 92 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.15-double-the-contant-without-comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.15-double-the-contant-without-comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.15-double-the-contant-without-comprehensions.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | li = [1, 2, 3, 4]
print(li)
new_li = []
for x in li:
new_li.append(2*x)
print(new_li)
| 10.222222 | 22 | 0.565217 |
5b488d7d49c2e0ab39b2b3d397356e9f722b97aa | 359 | py | Python | leetcode/319-Bulb-Switcher/BulbSwitcher_002_TLE.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/319-Bulb-Switcher/BulbSwitcher_002_TLE.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/319-Bulb-Switcher/BulbSwitcher_002_TLE.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def bulbSwitch(self, n):
"""
:type n: int
:rtype: int
"""
res = 0
num_of_facs = [0 for i in range(n)]
for j in range(1, n + 1):
for k in range(1, n / j + 1):
num_of_facs[j * k - 1] += 1
res += num... | 25.642857 | 43 | 0.420613 |
754de7fb7ab4b5666406455dc62f338449149b97 | 13,665 | py | Python | transonic/analyses/__init__.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/analyses/__init__.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/analyses/__init__.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | """Code analyses
================
.. autosummary::
:toctree:
blocks_if
capturex
extast
justintime
parser
util
objects_from_str
"""
import re
from pprint import pformat
import gast as ast
from transonic.analyses import beniget
from transonic.log import logger
from .util import (
... | 32.228774 | 81 | 0.592243 |
f37362e690b6c6e8eff10e81d6bdff2056a661f1 | 221 | py | Python | Python/EstruturaSequencial/Exercicios/Exercicio09.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exercicio09.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exercicio09.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | #Faça um Programa que peça a temperatura em graus Fahrenheit, transforme e mostre a temperatura em graus Celsius.
#C = 5 * ((F-32) / 9).
f = int(input('Digite o valor de f: '))
ut = f - 32
c = 5 * ((f-32) / 9)
print(c)
| 24.555556 | 113 | 0.633484 |
94845d1a91924d5131a74463891dfdfaac0186c7 | 10,372 | py | Python | examples/seq2seq/analysis.py | yym6472/transformers | abd01205561e5caec167c1fbb20bccea24d7ba46 | [
"Apache-2.0"
] | 1 | 2021-12-30T05:41:37.000Z | 2021-12-30T05:41:37.000Z | examples/seq2seq/analysis.py | yym6472/transformers | abd01205561e5caec167c1fbb20bccea24d7ba46 | [
"Apache-2.0"
] | null | null | null | examples/seq2seq/analysis.py | yym6472/transformers | abd01205561e5caec167c1fbb20bccea24d7ba46 | [
"Apache-2.0"
] | null | null | null | import json
import argparse
import collections
from utils import calculate_rouge
def split_turns(source_line):
turns = []
current_turn_tokens = []
for token in source_line.strip().split():
current_turn_tokens.append(token)
if token == "<eou>":
turns.append(current_turn_tokens)
... | 40.515625 | 150 | 0.619167 |
ca95099a9029b54d566af160d46772168602f22c | 14,451 | py | Python | research/cv/glore_res/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/glore_res/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/glore_res/train.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... | 53.921642 | 118 | 0.593869 |
b636c9f21f63ff06ee202f3b0786180d24c022a6 | 1,794 | py | Python | attackdefense/old/Real-World-Webapps/RCE/exploits/44374.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 21 | 2016-02-06T14:30:01.000Z | 2020-09-11T05:39:17.000Z | attackdefense/old/Real-World-Webapps/RCE/exploits/44374.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | null | null | null | attackdefense/old/Real-World-Webapps/RCE/exploits/44374.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 7 | 2017-02-02T16:27:02.000Z | 2021-04-30T17:14:53.000Z | # Exploit Title: osCommerce 2.3.4.1 Remote Code Execution
# Date: 29.0.3.2018
# Exploit Author: Simon Scannell - https://scannell-infosec.net <contact@scannell-infosec.net>
# Version: 2.3.4.1, 2.3.4 - Other versions have not been tested but are likely to be vulnerable
# Tested on: Linux, Windows
# If an Admin has not ... | 44.85 | 145 | 0.726867 |
fcc26c82ebe087136a20308fd2c40eeecc2361e3 | 858 | py | Python | src/onegov/user/models/group.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/models/group.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/user/models/group.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm import Base
from onegov.core.orm.mixins import TimestampMixin
from onegov.core.orm.mixins import ContentMixin
from onegov.core.orm.types import UUID
from sqlalchemy import Column
from sqlalchemy import Text
from uuid import uuid4
class UserGroup(Base, ContentMixin, TimestampMixin):
""" Define... | 28.6 | 74 | 0.713287 |
1e796e584baff058d12d22a1522b5e6046c89dab | 3,599 | py | Python | 05_Simulatoren/04_PID_Arduino/main.py | Pluscrafter/SHARKSKY | f3d5e96c9f4cd25e4c03537f1f8d9b9756042dac | [
"MIT"
] | 3 | 2019-11-28T23:18:23.000Z | 2019-12-02T14:01:02.000Z | 05_Simulatoren/04_PID_Arduino/main.py | Pluscrafter/SHARKSKY | f3d5e96c9f4cd25e4c03537f1f8d9b9756042dac | [
"MIT"
] | null | null | null | 05_Simulatoren/04_PID_Arduino/main.py | Pluscrafter/SHARKSKY | f3d5e96c9f4cd25e4c03537f1f8d9b9756042dac | [
"MIT"
] | 1 | 2019-12-02T14:34:11.000Z | 2019-12-02T14:34:11.000Z | from matplotlib import pyplot as plt
from matplotlib.widgets import Slider
import serial
import numpy as np
import math
PGain = 5
IGain = 4
DGain = 0.1
Istwert = [0]
Sollwert = [20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20... | 40.897727 | 360 | 0.632676 |
94972f64da5f93542162b13b6101894d870f88b2 | 910 | py | Python | CareerTinderServer/CareerTinder/forms.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | 1 | 2016-09-18T16:40:27.000Z | 2016-09-18T16:40:27.000Z | CareerTinderServer/CareerTinder/forms.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | CareerTinderServer/CareerTinder/forms.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django import forms
from material import *
from CareerTinder.models import DEGREE_CHOICES
class InputHireeForm(forms.Form):
name = forms.CharField(max_length=50, label='Name:', help_text='First and last name please.')
email = forms.CharField(max_length=50, label='Email:', help_tex... | 45.5 | 134 | 0.708791 |
44e6c7ffe83b614a11c7e74a83543dfedd52195b | 194 | py | Python | playbooks/roles/ood-apps-cyclecloud/files/cyclecloud/app.py | ltalirz/az-hop | b773628a43b81d7549fee0db48c3c88e96a8f922 | [
"MIT"
] | 17 | 2021-07-13T04:17:08.000Z | 2022-03-01T22:14:43.000Z | playbooks/roles/ood-apps-cyclecloud/files/cyclecloud/app.py | ltalirz/az-hop | b773628a43b81d7549fee0db48c3c88e96a8f922 | [
"MIT"
] | 253 | 2021-07-13T07:19:13.000Z | 2022-03-31T07:11:15.000Z | playbooks/roles/ood-apps-cyclecloud/files/cyclecloud/app.py | ltalirz/az-hop | b773628a43b81d7549fee0db48c3c88e96a8f922 | [
"MIT"
] | 13 | 2021-07-12T17:39:29.000Z | 2022-03-04T13:29:22.000Z | from flask import Flask, request, redirect
MyApp = Flask(__name__)
@MyApp.route("/")
def index():
return redirect(request.host_url+"cyclecloud")
if __name__ == "__main__":
MyApp.run()
| 19.4 | 50 | 0.701031 |
1596c81ee45ae65ef004d8327301dd2be5427a6c | 4,065 | py | Python | tests/onegov/org/test_directory_integration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_directory_integration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_directory_integration.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from tempfile import NamedTemporaryFile
import pytest
import transaction
from onegov.core.utils import Bunch
from onegov.directory import DirectoryCollection, DirectoryConfiguration, \
DirectoryZipArchive, DirectoryEntryCollection
from onegov.org.forms import DirectoryImportForm
from onegov.org.layout import Dire... | 25.566038 | 76 | 0.595818 |
1725a11f726a2c56d5e30cdc72ba2c0fcf3e4d6a | 567 | py | Python | plots/investition.py | Schwub/bwl_presentation | 9b57def1a440d1f713cf417522a108372893d752 | [
"MIT"
] | null | null | null | plots/investition.py | Schwub/bwl_presentation | 9b57def1a440d1f713cf417522a108372893d752 | [
"MIT"
] | null | null | null | plots/investition.py | Schwub/bwl_presentation | 9b57def1a440d1f713cf417522a108372893d752 | [
"MIT"
] | null | null | null | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
sns.set_style("whitegrid")
df = pd.read_csv("investition.csv")
g=sns.barplot(x='Jahr', y='Umsatz in Milliarden Euro', data=df, palette=sns.cubehelix_palette(8, start=0.5, rot=-.5, light=.50, dark=.20))
#g=sns.barplot(x='Jahr', y='Umsatz in Millio... | 47.25 | 138 | 0.716049 |
0091526cbd7b33c8f6638a20868bc52bf338f1ce | 749 | py | Python | 901-FFT/main-mul.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 901-FFT/main-mul.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | 901-FFT/main-mul.py | hello-arun/Python-Tutorial | aec3978f414e48d762a5fbc5cce581163c1f5f1e | [
"MIT"
] | null | null | null | # we will calculate product of two polynomial in this code
# using our own fft and ifft implementation
# Let's multiply
# A = 9 - 10x + 7x^2 + 6x^3
# B = -5 + 4x - 2x^3
# C = A*B = -45 + 86x - 75x^2 - 20x^3 + 44x^4 - 14x^5 - 12x^6
from main import fft, ifft, _round
a = [9, -10, 7, 6, 0, 0, 0, 0]
b = [-5, 4, 0, -2, 0,... | 27.740741 | 61 | 0.568758 |
a9d5f6e7f462af26ea32772ee6c9b71da0efdfac | 1,724 | py | Python | zbirka_knjig.py | majbc1999/Projekt | f6d2f0d1453d0a2c5ed2cd15dde224a2a690fd94 | [
"MIT"
] | 1 | 2019-11-14T07:43:11.000Z | 2019-11-14T07:43:11.000Z | zbirka_knjig.py | majbc1999/Projekt | f6d2f0d1453d0a2c5ed2cd15dde224a2a690fd94 | [
"MIT"
] | null | null | null | zbirka_knjig.py | majbc1999/Projekt | f6d2f0d1453d0a2c5ed2cd15dde224a2a690fd94 | [
"MIT"
] | null | null | null | from model import Knjiznica, Knjiga, povprecje
Harry_Potter_in_kamen_modrosti = Knjiga('Harry Potter in kamen modrosti', 'J. K. Rowling', '1997', 'Prva knjiga v zbriki o mladem čarovniku, ki je obnorela svet.')
Zlocin_in_kazen = Knjiga('Zločin in kazen', 'F. M. Dostojevski', '1866', 'Psihološki roman, ki obravnava pre... | 55.612903 | 188 | 0.776102 |
e7b224bd382955db1d9060ce8d04fd5746b030dc | 1,317 | py | Python | Testing/test_utilities/check_correlation_matrix.py | cianciosa/V3FIT | 18b1f4c0d596b47fbbd97508905c60e842801950 | [
"MIT"
] | null | null | null | Testing/test_utilities/check_correlation_matrix.py | cianciosa/V3FIT | 18b1f4c0d596b47fbbd97508905c60e842801950 | [
"MIT"
] | null | null | null | Testing/test_utilities/check_correlation_matrix.py | cianciosa/V3FIT | 18b1f4c0d596b47fbbd97508905c60e842801950 | [
"MIT"
] | null | null | null | #!/usr/bin/python
from optparse import OptionParser
import sys
parser = OptionParser()
parser.add_option("-f", "--file", dest="filename", help="File name to test.", metavar="FILE")
parser.add_option("-p", "--param", dest="param", help="Parameter type", metavar="PARAM", default="Reconstruction")
(option, args) = parse... | 29.931818 | 123 | 0.650721 |
4132a2ecae100a26d6a156c85bc2294566dffeee | 1,546 | py | Python | bin/write2vz.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | 1 | 2019-05-30T08:28:31.000Z | 2019-05-30T08:28:31.000Z | bin/write2vz.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | null | null | null | bin/write2vz.py | docdiesel/smartmetertools | 3b7449c7a9069696af078631aa5440f53d0f57bc | [
"MIT"
] | null | null | null | #!/usr/bin/python3
##
## write2vz.py - reads json (generated by sml_reader.py) from stdin
## - writes values to volkszaehler api
##
## Connect both scripts by pipe "sml_reader.py | write2vz.py" - and
## you're done. You need to configure the UUIDs from your volkszaehler
## instance below, and maybe the... | 27.607143 | 107 | 0.659767 |
4158d7d7c6ade8a40c94b89b547de7f52bb511da | 1,925 | py | Python | IdeaProjects/stock/stock_dev1/getPrice.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | IdeaProjects/stock/stock_dev1/getPrice.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | IdeaProjects/stock/stock_dev1/getPrice.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/python3
# coding=utf-8
import urllib.request
'''
http接口取数据
Sina股票数据接口
以大秦铁路(股票代码:601006)为例,如果要获取它的最新行情,只需访问新浪的股票数据接口:
http://hq.sinajs.cn/list=sh601006
这个url会返回一串文本,例如:
var hq_str_sh601006="大秦铁路, 27.55, 27.25, 26.91, 27.55, 26.20, 26.91, 26.92,
22114263, 589824680, 4695, 26.91, 57590, 26.90, 14700, 26.89, 1... | 32.083333 | 111 | 0.655584 |
41c94e16b554d584a6e66ec3f4ca8f9e6e18aec5 | 3,704 | py | Python | qmk_firmware/lib/python/qmk/cli/generate/rules_mk.py | DanTupi/personal_setup | 911b4951e4d8b78d6ea8ca335229e2e970fda871 | [
"MIT"
] | 2 | 2021-04-16T23:29:01.000Z | 2021-04-17T02:26:22.000Z | qmk_firmware/lib/python/qmk/cli/generate/rules_mk.py | DanTupi/personal_setup | 911b4951e4d8b78d6ea8ca335229e2e970fda871 | [
"MIT"
] | null | null | null | qmk_firmware/lib/python/qmk/cli/generate/rules_mk.py | DanTupi/personal_setup | 911b4951e4d8b78d6ea8ca335229e2e970fda871 | [
"MIT"
] | null | null | null | """Used by the make system to generate a rules.mk
"""
from pathlib import Path
from dotty_dict import dotty
from milc import cli
from qmk.decorators import automagic_keyboard, automagic_keymap
from qmk.info import info_json
from qmk.json_schema import json_load
from qmk.keyboard import keyboard_completer, keyboard_fo... | 37.795918 | 129 | 0.663337 |
68c500a2408b91a9534c473f04dfacc4a3465a30 | 334 | py | Python | 2169-count-operations-to-obtain-zero/2169-count-operations-to-obtain-zero.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 2169-count-operations-to-obtain-zero/2169-count-operations-to-obtain-zero.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 2169-count-operations-to-obtain-zero/2169-count-operations-to-obtain-zero.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def countOperations(self, num1: int, num2: int) -> int:
count = 0
small, big = (num1, num2) if num1<num2 else (num2, num1)
while (small>0 and big>0):
small, big = (small, big) if small<big else (big, small)
big = big - small
count+=1
... | 37.111111 | 68 | 0.538922 |
6b6f7063e4e7922ebf8a0a0f25a2503c94434edf | 4,081 | py | Python | src/detect_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/detect_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | src/detect_key_points.py | tuanminh3395/gr-bone-age | 248c929d75e9d88dc9fa102ea11f4eae1e0f3157 | [
"MIT"
] | null | null | null | import Tkinter as tk
from PIL import Image, ImageTk
from constants import color_red, color_yellow, color_blue, key_points_max_size, key_points_desired_size, key_points_display_size, kp_manual_path
import os
import os.path
from skimage.io import imread
from Tkinter import Frame, SUNKEN, Scrollbar, Canvas, HORIZONTAL, E,... | 31.882813 | 144 | 0.760108 |
d4448e044e66744484a057da2dc765a72110edbc | 4,970 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/12_kapitel_11_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/12_kapitel_11_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/12_kapitel_11_repetitionsfragen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 12_kapitel_11_repetitionsfragen.py
import os, re
max_text_length=70
max_text_delta=20
def output(title, string):
print('╔'+''.center(max_text_length+8, '═')+'╗')
print('║ '+title.center(max_text_length+7).upper()+'║')
print('╠'+''.center(max_text_length+8, '═')+'╣')
string=string+' '*max_text_lengt... | 68.082192 | 334 | 0.76338 |
d46fc5d85550e69c8866a4506e4b70bd0ba9a012 | 2,511 | py | Python | Invent Your Own Computer Games with Python/ch8_writing_the_hangman_code/myhangman.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | Invent Your Own Computer Games with Python/ch8_writing_the_hangman_code/myhangman.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | Invent Your Own Computer Games with Python/ch8_writing_the_hangman_code/myhangman.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import random
HANGMAN_PICS = ['''
+---+
|
|
|
=====''',
'''
+---+
O |
|
|
=====''',
'''
+---+
O |
| |
|
=====''',
'''
+---+
O |
/| |
|
=====''',
'''
+---+
O |
/|\ |
|
=====''',
'''
+---+
O |
/|\ |
/ |
... | 21.10084 | 80 | 0.559936 |
d8de0e7b386ac20f0f5cbedb7e64e1597285d047 | 100 | py | Python | scripts/Hello_World_PY.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/Hello_World_PY.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | null | null | null | scripts/Hello_World_PY.py | breezage/Hacktoberfest-1 | 6f6d52248c79c0e72fd13b599500318fce3f9ab0 | [
"MIT"
] | 1 | 2019-10-24T06:45:21.000Z | 2019-10-24T06:45:21.000Z | # LANGUAGE: Python
# AUTHOR: Nikhil
# GITHUB: https://github.com/computelarge
print("Hello World!")
| 20 | 41 | 0.73 |
2b48f34e4c9718f9805d599cb6f32b3790cb9a1d | 857 | py | Python | gemtown/advertisings/migrations/0002_auto_20190523_1438.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/advertisings/migrations/0002_auto_20190523_1438.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/advertisings/migrations/0002_auto_20190523_1438.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.13 on 2019-05-23 05:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('advertisings', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='advertising',
name='active',
... | 29.551724 | 183 | 0.582264 |
5acb807100cab4fbe56e30d2e5945beeeb940552 | 1,181 | py | Python | hausse/plugins/elements/index.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | null | null | null | hausse/plugins/elements/index.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-30T21:41:46.000Z | 2021-08-30T21:41:46.000Z | hausse/plugins/elements/index.py | andrenasturas/hausse | 58e7cb71d5105cf1d6ec7d294e85668855bf8336 | [
"MIT"
] | 1 | 2021-08-31T19:27:32.000Z | 2021-08-31T19:27:32.000Z | import logging
from pathlib import Path
from typing import List
from hausse.lib import Element, Plugin, Project
class Index(Plugin):
"""
Index
=====
Adds index in directory
Useful to create an index page ex-nihilo without specific content.
Parameters
----------
directory : Path
... | 23.156863 | 74 | 0.586791 |
5cd74d54268de355af0a6eb1f10e35da06794419 | 263 | py | Python | projects/g3h1-cp-fml-interpreter/src/log/log.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h1-cp-fml-interpreter/src/log/log.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | projects/g3h1-cp-fml-interpreter/src/log/log.py | keybrl/xdu-coursework | 9d0e905bef28c18d87d3b97643de0d32f9f08ee0 | [
"MIT"
] | null | null | null | import time
class LogManager:
def __init__(self, log_path='logs/', filename_suffix=None):
if filename_suffix is None:
self.filename_suffix = time.strftime('_%Y%m%d%H%M%S')
else:
self.filename_suffix = filename_suffix
| 26.3 | 65 | 0.646388 |
7a4d72122ea8447ef2ea2d3b2c57a2fd4fa1ff9c | 3,178 | py | Python | research/cv/pointnet2/src/layers.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/pointnet2/src/layers.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/pointnet2/src/layers.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... | 38.289157 | 120 | 0.654814 |
8f3470f5f9da3757b76ebc8ecb315a9f306adb29 | 15,768 | py | Python | wz/timetable/placement.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/timetable/placement.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/timetable/placement.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TT/placement.py - last updated 2021-09-12
Handling placement of lessons within the timetable.
==============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License... | 38.086957 | 82 | 0.571157 |
56c664810781c66566946793a32245dcf5aa07c3 | 2,577 | py | Python | Rechnernetze/Python/POP3/pop3-client_ML.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 2 | 2020-09-24T12:11:16.000Z | 2022-03-31T04:47:24.000Z | Rechnernetze/Python/POP3/pop3-client_ML.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-27T15:06:27.000Z | 2021-03-01T16:32:48.000Z | Rechnernetze/Python/POP3/pop3-client_ML.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-24T05:12:35.000Z | 2021-02-24T05:12:35.000Z | # -*- coding: utf-8 -*-
##!! Behebt das Import-Problem in Mu-Editor
import os
os.chdir(os.path.dirname(__file__))
## Importieren der Connection-Klasse
from connection import Connection
## Konfiguration der Verbindung
POP3_SERVER = "pop3.neugebauer.cc"
POP3_PORT = 110
POP3_USER = "informatik@neugebauer.cc"
POP3_PAS... | 22.605263 | 78 | 0.630966 |
74bf9543fda04215a2f87c1e57a632261d545eff | 1,904 | py | Python | src/sft/listener.py | huykingsofm/FileTransmitter | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | 1 | 2020-08-28T19:06:13.000Z | 2020-08-28T19:06:13.000Z | src/sft/listener.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | src/sft/listener.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | from hks_pylib.logger import LoggerGenerator, Display
from hks_pylib.logger import InvisibleLoggerGenerator
from hks_pylib.cryptography.ciphers.hkscipher import HKSCipher
from csbuilder.server import Listener
from sft.protocol import DEFAULT_TIMEOUT
from sft.protocol import DEFAULT_BUFFER_SIZE
from sft.protocol.send... | 31.213115 | 79 | 0.626576 |
77e1daa0cb82085a3bc3c3eb8342c2bc3d9918c4 | 14,386 | py | Python | main.py | deanln/SerialPinProgrammer | a7f11f207c267e05c720244b20e14bf6378de827 | [
"MIT"
] | null | null | null | main.py | deanln/SerialPinProgrammer | a7f11f207c267e05c720244b20e14bf6378de827 | [
"MIT"
] | null | null | null | main.py | deanln/SerialPinProgrammer | a7f11f207c267e05c720244b20e14bf6378de827 | [
"MIT"
] | null | null | null | import os, sys, serial
from PyQt4 import QtGui
from PyQt4 import QtCore
COMINDEX = 0
real_serial = serial.Serial(timeout=1)
class CanWindow(QtGui.QFrame):
def __init__(self):
super(QtGui.QFrame, self).__init__()
self.vbox = QtGui.QVBoxLayout()
self.comportbox = QtGui.QHBoxLayout()
... | 38.159151 | 75 | 0.507646 |
7ac48efa597fee05008a973519c3ed7874d8ebae | 325 | py | Python | src/ztc/tests/vm/test_memory.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/tests/vm/test_memory.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | src/ztc/tests/vm/test_memory.py | magistersart/ZTC_fork | ce72734ea575d9846b5b81f3efbfd14fa1f7e532 | [
"PostgreSQL"
] | null | null | null | #!/usr/bin/env python
"""ztc.vm.memory tests"""
import unittest
from ztc.vm.memory import Memory
class Test(unittest.TestCase):
def test_get_active(self):
m = Memory()
assert isinstance(m.active, long)
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testName']
unittest.ma... | 17.105263 | 48 | 0.649231 |
bb35a3c67ea5436874ef0921a6acebe3c7ae4a00 | 1,018 | py | Python | Python/excel-copy-paste/excel-copy-paste.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-03-25T14:23:58.000Z | 2021-03-25T14:23:58.000Z | Python/excel-copy-paste/excel-copy-paste.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-01-15T17:03:06.000Z | 2021-02-15T10:02:07.000Z | Python/excel-copy-paste/excel-copy-paste.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | null | null | null | import openpyxl
from pathlib import Path
weiter = True
verAnzahl = 1
count = 1
listab = []
rows = 50
columns = 7
row = 0
colum = 0
abstand = 62
print("")
print("")
verAnzahl = input("Anzahl der verkäufer: ")
print("")
print("Kopieren und einfügen: ")
wbGes = openpyxl.load_workbook("gesamtliste.xlsx")
sheetGes = wb... | 20.36 | 95 | 0.605108 |
8ece95ccf5a5b006c37567940f33aeec59b3b3ee | 4,330 | py | Python | networks/UNET.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 2 | 2019-06-12T13:53:00.000Z | 2020-04-29T13:11:12.000Z | networks/UNET.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 1 | 2019-12-10T12:23:06.000Z | 2019-12-10T12:23:06.000Z | networks/UNET.py | ramesh152/SegmentationExperiment | b52dbc57759c086155e79c6621e6d25a4db0e974 | [
"Apache-2.0"
] | 1 | 2020-08-05T18:12:24.000Z | 2020-08-05T18:12:24.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ)
#
# 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 ... | 42.45098 | 91 | 0.65358 |
d91ca3eda286f89df41573a5ffc4a0007afdbf8d | 1,392 | py | Python | python/oneflow/nn/common_types.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/nn/common_types.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/nn/common_types.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.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... | 38.666667 | 72 | 0.778017 |
8dc9d0b011a40353184d4e3d8c0faf2cb0081ecd | 2,374 | py | Python | interactions/create.py | AuxiliumCDNG/MET-Bot | 7e00d878c92ad4f68b0b2920235019e14c9ea2fa | [
"MIT"
] | null | null | null | interactions/create.py | AuxiliumCDNG/MET-Bot | 7e00d878c92ad4f68b0b2920235019e14c9ea2fa | [
"MIT"
] | null | null | null | interactions/create.py | AuxiliumCDNG/MET-Bot | 7e00d878c92ad4f68b0b2920235019e14c9ea2fa | [
"MIT"
] | null | null | null | import time
import requests
from statics import config
from statics import secrets
# url = f"https://discord.com/api/v8/applications/{config.DISCORD_CLIENT_ID}/commands"
url = f"https://discord.com/api/v8/applications/{config.DISCORD_CLIENT_ID}/guilds/844218034666209280/commands"
commands = [
{
"name": ... | 27.287356 | 117 | 0.521904 |
30c93f336d7e0215db5b96ad6011117ce0ad3f82 | 3,451 | py | Python | src/test_pc/test_model.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/test_pc/test_model.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/test_pc/test_model.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | 2 | 2020-02-05T05:19:18.000Z | 2020-02-05T15:04:32.000Z | import unittest
from model import model_base
import os
class TestModel(unittest.TestCase):
def setUp(self):
self.samples = 200
self.model = model_base.Model("../../Wingbeats", ".", self.samples, 1)
def testInvalidDataDirModel(self):
with self.assertRaises(SystemExit):
mod... | 41.578313 | 127 | 0.651116 |
eb99febf5f6a272c417ce3aac94afefdde6d0b45 | 280 | py | Python | python/decorator/decorate_a_class_method.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/decorator/decorate_a_class_method.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/decorator/decorate_a_class_method.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from real_world_example import timer
class Calculator:
def __init__(self, num):
self.num = num
@timer
def doubled_and_add(self):
res = sum([i * 2 for i in range(self.num)])
print(f"Result : {res}")
c = Calculator(10000)
c.doubled_and_add() | 18.666667 | 51 | 0.628571 |
6924524896f70e8d48a6a5c200fbff752d33b916 | 1,464 | py | Python | flipui/gui/mainwindow.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | flipui/gui/mainwindow.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | flipui/gui/mainwindow.py | julianschick/flipdot-brose-code | b2caf2c52c55a0d5b80dbf3d5adbbf5aec1d79c2 | [
"MIT"
] | null | null | null | from PIL import Image
from PySide2.QtWidgets import QMainWindow
from gfx.bitarray_utils import img_to_bitarray
from gfx.pixelfont import PixelFont, PixelFontVariant
from gfx.rect import Rect
from gui.mainwindow_ui import Ui_MainWindow
from gui.settingsdialog import SettingsDialog
from qutils.flipdotdisplay import Flip... | 28.153846 | 118 | 0.657787 |
bad46cf01212b7213783bbb3a498e9ef14636ac3 | 1,252 | py | Python | python/data_sutram/pypath/PyPath/json_sqlite/10_get_vehicle_pos.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/data_sutram/pypath/PyPath/json_sqlite/10_get_vehicle_pos.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/data_sutram/pypath/PyPath/json_sqlite/10_get_vehicle_pos.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | """
This is the most challenging part!!!
This needs to be done parallely, don't know how. All the bus's position shall be updated parallely after 5 sec delay.
This would create an enormous amount of data, and simulation for a day!
INPUT : vehicle_no
OUTPUT :
{
"angle": 347,
"crowd": "null",
... | 29.116279 | 117 | 0.480032 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.