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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
049fc3f7ffd14ad644601e60e6531cc0f42bed95 | 10,116 | py | Python | betriebstechnik/rufzeichen.py | mw-ste/amateurfunkausbildung | 92c7670a47faec9e20d08e4ab2c0373fbeb4a49e | [
"MIT"
] | null | null | null | betriebstechnik/rufzeichen.py | mw-ste/amateurfunkausbildung | 92c7670a47faec9e20d08e4ab2c0373fbeb4a49e | [
"MIT"
] | null | null | null | betriebstechnik/rufzeichen.py | mw-ste/amateurfunkausbildung | 92c7670a47faec9e20d08e4ab2c0373fbeb4a49e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jun 14 19:25:33 2021
@author: Michael
"""
import re
sign_types = {
"KS": "Klubstation",
"RL": "Relais",
"PZ": "Person",
"AB": "Ausbildung",
"FB": "Funkbake",
"SZ": "Experimental"
}
# In[]
def any_ma... | 21.615385 | 67 | 0.646105 |
04ee72c093c66ed72c668e9c12255e75b49d5b1a | 105 | py | Python | python/python_backup/PRAC_PYTHON/ab1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/ab1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/ab1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | y=input("Enter Year:")
if(y%4==0 or y%400==0) :
print"Leap Year";
else :
print"Non Leap Year";
| 17.5 | 25 | 0.571429 |
8e0d8686cf5cd9b895c2bcf9b6ed3450ba85f286 | 1,644 | py | Python | exercises/es/test_02_13.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/es/test_02_13.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/es/test_02_13.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
len(pattern1) == 2
), "El número de tokens en pattern1 no concuerda con el número real de tokens en el string."
assert (
len(pattern2) == 2
), "El número de tokens en pattern2 no concuerda con el número real de tokens en el string."
# Pattern 1 validation
ass... | 43.263158 | 96 | 0.638686 |
1e5d05fe021840e765c83373513053d1d9895de6 | 3,587 | py | Python | test/test_npu/test_network_ops/test_slow_conv_transpose2d_backward.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_slow_conv_transpose2d_backward.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_slow_conv_transpose2d_backward.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... | 39.855556 | 98 | 0.691664 |
94ade01b184a680f4926fa623c4751d5ecd0573a | 549 | py | Python | _Dist/NeuralNetworks/_Tests/Madelon/TestDT2NN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | _Dist/NeuralNetworks/_Tests/Madelon/TestDT2NN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | _Dist/NeuralNetworks/_Tests/Madelon/TestDT2NN.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import os
import sys
root_path = os.path.abspath("../../../../")
if root_path not in sys.path:
sys.path.append(root_path)
from _Dist.NeuralNetworks.c_BasicNN.NN import Basic
from _Dist.NeuralNetworks.d_Traditional2NN.Toolbox import DT2NN
from _Dist.NeuralNetworks._Tests.Madelon.MadelonUtil import get_madelon
x, y... | 36.6 | 99 | 0.754098 |
94cfc81b85a86f454868ab54c82a329096627abb | 1,214 | py | Python | start.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | start.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | start.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | #!/usr/bin/env python
# coding=utf-8
import argparse
import importlib
import sys
import os
import numpy as np
ALIASES = {
"pong": "facepong2.pong",
"paparazzi": "mainloop_and_utils.paparazzi",
"mainloop": "mainloop_and_utils.mainloop",
"converter": "mainloop_and_utils.converter"
}
def main():
ke... | 23.803922 | 71 | 0.621087 |
bfadb3cf5e1e42131e10849a12a687a0f42b4863 | 516 | py | Python | apps/multivers/migrations/0005_product_multivers_name.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 1 | 2017-01-08T13:21:43.000Z | 2017-01-08T13:21:43.000Z | apps/multivers/migrations/0005_product_multivers_name.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 17 | 2018-12-03T14:22:14.000Z | 2021-07-14T15:15:12.000Z | apps/multivers/migrations/0005_product_multivers_name.py | LvanArkel/sbzwebsite | a26efbb050585312c53010f14f86c23616a8071f | [
"BSD-3-Clause"
] | 2 | 2018-12-03T14:58:49.000Z | 2019-12-01T13:24:42.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-02 14:18
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('multivers', '0004_auto_20170202_1459'),
]
operations = [
migrations.AddFiel... | 23.454545 | 70 | 0.625969 |
7857c5336c86b8f163ac16e2ed3942762d0f69a9 | 285 | py | Python | projects/models/__init__.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/models/__init__.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/models/__init__.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | from .component import Component
from .experiment import Experiment
from .operators import Operator
from .dependencies import Dependency
from .project import Project
from .template import Template
__all__ = ['Component', 'Experiment', 'Operator', 'Dependency', 'Project', 'Template']
| 31.666667 | 86 | 0.792982 |
01b969a3ca932e1f92365524d3de2c4a82f9bb70 | 4,657 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/output/analyze_pedestrian_jam.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/analyze_pedestrian_jam.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/analyze_pedestrian_jam.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2012-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 avail... | 38.487603 | 120 | 0.603822 |
9745b96e78cc74fe6919e2de4f339bcc269d1022 | 429 | py | Python | Skripte/Python/plot_mems_character.py | tomg404/WSeminar19-21 | 6f1ebaf6222f0db892b568bf021b87717d461345 | [
"MIT"
] | null | null | null | Skripte/Python/plot_mems_character.py | tomg404/WSeminar19-21 | 6f1ebaf6222f0db892b568bf021b87717d461345 | [
"MIT"
] | null | null | null | Skripte/Python/plot_mems_character.py | tomg404/WSeminar19-21 | 6f1ebaf6222f0db892b568bf021b87717d461345 | [
"MIT"
] | null | null | null | from vars import *
x = np.array([500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000, 5500])
y = np.array([88 , 128, 496, 744, 520, 392, 480, 504, 424, 424, 456])
plotTitle = "Spannungsspitzen beim MEMS-Mikrofon in Abhängigkeit von Frequenz"
plt.rcParams['axes.axisbelow'] = True
plt.grid()
plt.scatter... | 30.642857 | 79 | 0.685315 |
976e9c8d036791cbee8d12ea3c98bff3bed55a9d | 868 | py | Python | BIZa/2014/DubsAlexandra/task_6_47.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BIZa/2014/DubsAlexandra/task_6_47.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BIZa/2014/DubsAlexandra/task_6_47.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 47
# Создайте игру, в которой компьютер загадывает название одной из двенадцати линий московского метрополитена, а игрок должен его угадать.
# Dubs A. E.
# 20.04.2016
import random
print ("Программа случайным образом загадывает название одного из одной из двенадцати линий московского метрополитен... | 39.454545 | 227 | 0.773041 |
c1a5e8fd10dc36e4bdecdfe64f5e9404c2922dfa | 1,013 | py | Python | python/pyqt/LearnPyQt/h_box_layout.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/LearnPyQt/h_box_layout.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pyqt/LearnPyQt/h_box_layout.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import sys
from PyQt5.QtWidgets import (
QApplication,
QMainWindow,
QWidget,
QHBoxLayout,
)
from PyQt5.QtGui import (
QPalette,
QColor,
)
class Color(QWidget):
def __init__(self, color, *args, **kwargs):
super(Color, self).__init__(*args, **kwargs)
self.setAutoFillBackgrou... | 21.104167 | 57 | 0.640671 |
68b897b5ed4be7c905d3de3b2a7108ec4e7e1a20 | 691 | py | Python | Python/generate_passwrd_with_security.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 81 | 2021-10-01T13:19:13.000Z | 2021-10-06T08:43:35.000Z | Python/generate_passwrd_with_security.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 67 | 2021-10-01T13:43:46.000Z | 2021-10-06T13:55:49.000Z | Python/generate_passwrd_with_security.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 394 | 2021-10-01T11:55:24.000Z | 2021-10-06T13:45:57.000Z | import secrets
import string
def createAlphabet(lowercase=True, uppercase=True, digits=True, symbols=True, whitespace=False) -> str:
alphabet = ''
if lowercase:
alphabet += string.ascii_lowercase
if uppercase:
alphabet += string.ascii_uppercase
if digits:
alphabet += string.dig... | 24.678571 | 103 | 0.670043 |
ec55ffabdb4bb4fd93744af9cc42775a96acbc81 | 985 | py | Python | Problems/Depth-First Search/medium/DeleteLeavesWithGivenValue/delete_leaves_with_given_value.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/medium/DeleteLeavesWithGivenValue/delete_leaves_with_given_value.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/medium/DeleteLeavesWithGivenValue/delete_leaves_with_given_value.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import Optional
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
def removeLeafNodes(self, root: Optional[TreeNode], target: int) -> Optional[TreeNode]:
left, right = N... | 28.970588 | 89 | 0.648731 |
d47fda0372f2ad42b507dc24305cfe7f91c9f785 | 595 | py | Python | server/api/src/ibm_tools.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | server/api/src/ibm_tools.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | server/api/src/ibm_tools.py | gustavodsf/rdx_hack | 3b504bf8181495fdd1c3a06f963970469f6655f1 | [
"MIT"
] | null | null | null | from ibm_watson import TextToSpeechV1
import json
class IbmTools(object):
def from_text_to_speech(self, txt):
text_to_speech = TextToSpeechV1(
iam_apikey='Vm2QNF3Iu-HBKoxBykJqRFF-ul5OVVuKzAUaQYe4UtMk',
url='https://stream.watsonplatform.net/text-to-speech/api'
)
wi... | 33.055556 | 70 | 0.578151 |
cf11a093787f7c116f22e5cb47d437f5f5f2001d | 1,222 | py | Python | vkapp/bot/dao/newsDAO.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | 1 | 2017-11-23T13:33:13.000Z | 2017-11-23T13:33:13.000Z | vkapp/bot/dao/newsDAO.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | vkapp/bot/dao/newsDAO.py | ParuninPavel/lenta4_hack | 6d3340201deadf5757e37ddd7cf5580b928d7bda | [
"MIT"
] | null | null | null | from vkapp.bot.models import Blogger, News, AdminReview, Publication
from .usersDAO import get_or_create_blogger
from datetime import datetime, timedelta, time
def new_news(link, media, uid, pic):
blogger = get_or_create_blogger(uid)
news = News(link=link, blogger=blogger, media=media, pic=pic)
news.save(... | 30.55 | 94 | 0.680033 |
cf5bbdc4a647fa3fe7cfd05732baa98974b0eb26 | 100 | py | Python | src/onegov/onboarding/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/onboarding/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/onboarding/theme/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.onboarding.theme.onboarding_theme import OnboardingTheme
__all__ = ['OnboardingTheme']
| 25 | 68 | 0.84 |
d87f29074d14f9e693a6aae072027258299a6396 | 241 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.8-leap-year.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.8-leap-year.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-004/pg-4.8-leap-year.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | year = input("Plase Enter a Year: ")
year = int(year)
if year % 4 != 0:
print("no")
else:
if year % 100 == 0:
if year % 400 == 0:
print("Yes")
else:
print("no")
else:
print("Yes")
| 17.214286 | 36 | 0.435685 |
d89877ae42603f3acd1f09a5a65cc5c9c91a518f | 97 | py | Python | yolov5-coreml-tflite-converter/tflite/setup.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/setup.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/setup.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="tflite",
packages=["tf_utils", "tf_model"],
)
| 13.857143 | 38 | 0.659794 |
41e51335f093d12c306ba12a0a33efcbc10a2ace | 451 | py | Python | Python/examples/http_requests.py | bunny8469/Hello-World | 722b5961cbcd9b2c2eec2cb6aa700eaa451e008b | [
"MIT"
] | 133 | 2021-01-15T16:29:40.000Z | 2022-03-21T16:35:42.000Z | Python/examples/http_requests.py | bunny8469/Hello-World | 722b5961cbcd9b2c2eec2cb6aa700eaa451e008b | [
"MIT"
] | 117 | 2021-01-17T08:54:22.000Z | 2022-01-17T16:38:11.000Z | Python/examples/http_requests.py | bunny8469/Hello-World | 722b5961cbcd9b2c2eec2cb6aa700eaa451e008b | [
"MIT"
] | 146 | 2021-01-15T12:57:19.000Z | 2022-03-15T20:10:23.000Z | from requests import get, post
# Send "get" http requests:
res = get("http://www.google.com")
# Check, page is loaded or not:
if res.status_code == 404 or is not 200:
print("You have an error to load page!")
else:
print("GET requests sent successfuly!")
# You can access response test
code = res.text
print(code)
... | 18.791667 | 42 | 0.689579 |
5a8caee8e73ca75baf50f2ef5791c730cd2a7776 | 1,349 | py | Python | src/backend/main.py | tonyLyx1/CSC4001-Better-SIS | 98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91 | [
"MIT"
] | 2 | 2021-04-07T03:12:33.000Z | 2021-05-25T10:01:40.000Z | src/backend/main.py | tonyLyx1/CSC4001-Better-SIS | 98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91 | [
"MIT"
] | null | null | null | src/backend/main.py | tonyLyx1/CSC4001-Better-SIS | 98c69317a2c2ea4bfe45b3fc6f3db4766c4aae91 | [
"MIT"
] | 3 | 2021-04-07T03:12:44.000Z | 2021-04-13T11:21:03.000Z | from schedule import Schedule
from student import Student,Preference
from course import Course, Instructor, Session
import DB.dbModels as dbMdl
from DB.dbModels import db
from data_insertion import data_insert
from get_instance import get_student, get_course, courses, instructors, students
ALPHABETS = 'abcdefghijklmn... | 19.271429 | 85 | 0.690141 |
5a91eeed5e27023fdca7c95d5e4e34d57652defa | 4,441 | py | Python | Packs/CommonScripts/Scripts/UnPackFile/UnPackFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/UnPackFile/UnPackFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/UnPackFile/UnPackFile.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import os
from os.path import isdir, isfile
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
from pyunpack import Archive
filePath = None
fileEntryID = ''
if 'fileName' in demisto.args() or 'lastPackedFileInWarroom' in demisto.args():
entries = demisto.executeCommand('get... | 40.743119 | 120 | 0.59964 |
5ad8cab7ec801fc317563a672e77a6ac0a21c732 | 2,545 | py | Python | src/classifier/classifier_training/incremental_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 14 | 2021-08-24T12:36:37.000Z | 2022-03-18T12:14:36.000Z | src/classifier/classifier_training/incremental_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | null | null | null | src/classifier/classifier_training/incremental_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 1 | 2021-10-21T20:22:55.000Z | 2021-10-21T20:22:55.000Z | import os
import hydra.utils
import pandas as pd
from src.classifier.classifier_training.training import train_classifier
def _get_data_increments(data_len, percentage):
# creates list of upperbounds to index different amounts of data
increments = []
for p in range(percentage, 100 + percentage, percenta... | 28.277778 | 81 | 0.570923 |
51fcce3fbfa0f67cbc2fdd0eba6f75b272b0feb5 | 329 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/populate_database.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/populate_database.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/populate_database.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Read in a .json file and pipe it into a Django database
#
import sys
import os
import datetime
import commands
import re
from django.core.management import setup_environ
import settings
setup_environ(settings)
if len(sys.argv) != 1:
print "Usage: populate_database.py in.json"
exit(0);
... | 13.16 | 57 | 0.726444 |
85343a3acf4af6fd1d2fc615b44862dc113b6bce | 7,659 | py | Python | geol/crawler/foursquare_crawler.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | geol/crawler/foursquare_crawler.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | geol/crawler/foursquare_crawler.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | import requests
import pandas as pd
import time
import pkg_resources
import os
import foursquare
from geopy.distance import great_circle
from geol.geol_logger.geol_logger import logger
from geol.utils import constants
class Foursquare:
def __init__(self, client_id="",
client_secret... | 36.471429 | 109 | 0.506855 |
856cc530b7ad9bbc81d4b18ec3cb2cf3e42e26b8 | 1,218 | py | Python | src/bo4e/com/unterschrift.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/com/unterschrift.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/com/unterschrift.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Unterschrift class
and corresponding marshmallow schema for de-/serialization
"""
from datetime import datetime
import attr
from marshmallow import fields
from bo4e.com.com import COM, COMSchema
# pylint: disable=too-few-public-methods
@attr.s(auto_attribs=True, kw_only=True)
class Unterschrift(COM):
... | 26.478261 | 179 | 0.722496 |
85783db787cab15d130305eb65da3b810f3ec911 | 1,308 | pyde | Python | sketches/floydsteinberg/floydsteinberg.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/floydsteinberg/floydsteinberg.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/floydsteinberg/floydsteinberg.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | FACTOR = 1
def setup():
global akt
size(800, 640)
this.surface.setTitle("Floyd Steinberg Dithering")
akt = loadImage("akt.jpg");
image(akt, 0, 0)
noLoop()
def index(x, y):
return(x + y * akt.width)
def draw():
akt.filter(GRAY)
akt.loadPixels()
for y in range(akt.heigh... | 24.222222 | 54 | 0.431957 |
748cbdc277f0a03d89697ebcbc28b9da8f0915bc | 1,153 | py | Python | bin/jsonpathfinder.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 5 | 2017-04-18T20:21:06.000Z | 2020-12-28T05:44:39.000Z | bin/jsonpathfinder.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 35 | 2016-09-21T18:04:51.000Z | 2020-03-11T02:39:20.000Z | bin/jsonpathfinder.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 2 | 2018-12-17T03:16:35.000Z | 2020-10-18T10:09:01.000Z | #!/usr/bin/env python3
# coding=utf-8
import codecs
import json
import sys
from typing import Any, Dict
def traverse(path: str, obj: Any) -> None:
"""
Traverse the object recursively and print every path / value pair.
"""
if isinstance(obj, list):
for i, subnode in enumerate(obj):
... | 23.530612 | 78 | 0.542064 |
777c31793096f6d606a2a363f104e9de2b412302 | 2,393 | py | Python | src/onegov/feriennet/collections/occasion_attendees.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/collections/occasion_attendees.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/collections/occasion_attendees.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from collections import namedtuple, OrderedDict, Counter
from onegov.activity import Activity, Attendee, Occasion, OccasionCollection
from onegov.user import User
OccasionAttendee = namedtuple(
'OccasionAttendee', ('attendee', 'info', 'group_code'))
class OccasionAttendeeCollection(OccasionCollection):
def... | 29.9125 | 78 | 0.571667 |
796109fc9715412538e1fca9c5e8e6a43a65784d | 1,491 | py | Python | Packs/ApiModules/Scripts/AnsibleApiModule/TestsInput/markdown.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ApiModules/Scripts/AnsibleApiModule/TestsInput/markdown.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ApiModules/Scripts/AnsibleApiModule/TestsInput/markdown.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | MOCK_SINGLE_LEVEL_LIST = [
1,
'b',
3,
'x'
]
EXPECTED_MD_LIST = """ * 0: 1
* 1: b
* 2: 3
* 3: x
"""
MOCK_SINGLE_LEVEL_DICT = {
'Server': 'abc',
'IP': '123.123.123.123',
'Changed': 'Yes'
}
EXPECTED_MD_DICT = """ * Server: abc
* IP: 123.123.123.123
* Changed: Yes
"""
MOCK_MULTI_... | 15.371134 | 48 | 0.457411 |
696d20c8afcdac1366075a67398e8f6d6e436823 | 423 | py | Python | Coursera/The Raspberry Pi Platform and Python Programming for the Raspberry Pi/Week-3/Assignment/Module_3_Peer_Assignment.py | rishav3101/Online-Courses-Learning | 1e9356af331b27b6ee33d376d8d7104edaeac2fa | [
"MIT"
] | 331 | 2019-10-22T09:06:28.000Z | 2022-03-27T13:36:03.000Z | Coursera/The Raspberry Pi Platform and Python Programming for the Raspberry Pi/Week-3/Assignment/Module_3_Peer_Assignment.py | rishav3101/Online-Courses-Learning | 1e9356af331b27b6ee33d376d8d7104edaeac2fa | [
"MIT"
] | 8 | 2020-04-10T07:59:06.000Z | 2022-02-06T11:36:47.000Z | Coursera/The Raspberry Pi Platform and Python Programming for the Raspberry Pi/Week-3/Assignment/Module_3_Peer_Assignment.py | rishav3101/Online-Courses-Learning | 1e9356af331b27b6ee33d376d8d7104edaeac2fa | [
"MIT"
] | 572 | 2019-07-28T23:43:35.000Z | 2022-03-27T22:40:08.000Z | class Main():
def __init__(self):
self.li = []
for _ in range(3):
print("Enter a number: ", end='')
self.li.append(int(input()))
self.li.sort()
def output(self):
print("The sorted list is: ", end='')
for i in range(len(self.li)):
prin... | 21.15 | 45 | 0.477541 |
15e19c21a0efe8c64027a56c326352e8fd474212 | 339 | py | Python | pyntcloud/ransac/__init__.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/ransac/__init__.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/ransac/__init__.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z |
"""
HAKUNA MATATA
"""
from .fitters import single_fit
from .models import RansacPlane, RansacSphere
from .samplers import RandomRansacSampler, VoxelgridRansacSampler
RANSAC_MODELS = {
"plane": RansacPlane,
"sphere": RansacSphere
}
RANSAC_SAMPLERS = {
"random": RandomRansacSampler,
"voxelgrid": Voxelg... | 18.833333 | 65 | 0.752212 |
c60052d9cb34543f2645b3f0927776a6ea031810 | 2,961 | py | Python | tests/views/test_utils.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/views/test_utils.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/views/test_utils.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | def test_send_mails(client, seeder, app, utils):
from project.models import AdminUnitMemberInvitation
from project.views.utils import send_mail
user_id, admin_unit_id = seeder.setup_base()
email = "new@member.de"
invitation_id = seeder.create_invitation(admin_unit_id, email)
with app.test_requ... | 36.555556 | 86 | 0.649443 |
d6f9cb4ee88b0c655c3d7448a1064643319a092e | 1,519 | py | Python | books/PythonCleanCode/ch6_descriptors/descriptors_cpython_3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch6_descriptors/descriptors_cpython_3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch6_descriptors/descriptors_cpython_3.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 6: Descriptors
> How Python uses descriptors internally: @classmethod
"""
from types import MethodType
class ClassMethod:
def __init__(self, method):
self.method = method
def __call__(self, *args, **kwargs):
return self.method(*args, **kwargs)
... | 22.338235 | 75 | 0.601712 |
03434c3e18d82e8ac50b8bdf145bd5ac3517ee84 | 478 | py | Python | Backend/models/counties.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/models/counties.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/models/counties.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
from db import db
class County(db.Model):
__tablename__ = 'landkreise_extended'
ags = db.Column('ids', db.String, primary_key=True, nullable=False, )
name = db.Column(db.String, nullable=False)
desc = db.Column('bez', db.String, nullable=False)... | 22.761905 | 73 | 0.698745 |
302f19bac33f7da3268de82bd15c7f38b6119822 | 49,183 | py | Python | Programm/emoticon_emoji_erkenner_v1.py | christopher-chandler/emoticon_emoji_recognizer | 4cc5ed3ab97fff320c75e7f3f5affb0d4be6d038 | [
"MIT"
] | null | null | null | Programm/emoticon_emoji_erkenner_v1.py | christopher-chandler/emoticon_emoji_recognizer | 4cc5ed3ab97fff320c75e7f3f5affb0d4be6d038 | [
"MIT"
] | null | null | null | Programm/emoticon_emoji_erkenner_v1.py | christopher-chandler/emoticon_emoji_recognizer | 4cc5ed3ab97fff320c75e7f3f5affb0d4be6d038 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Erkenner von Unicode-Emojis und ASCII-Emoticons sowie entsprechender Neubildungen
Kurs: CL 1 - CL-Programmierung
Datum: 09/09/2020
# Christopher Michael Chandler # Gianluca Cultraro
# B.A, Romanische Philologie Franzoesisch und Linguistik # B.A, Medienwissensch... | 48.987052 | 163 | 0.635199 |
0657188594cfa028077e409fda455d702dece26b | 3,979 | py | Python | official/nlp/tinybert/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/tinybert/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/tinybert/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 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.259615 | 104 | 0.708721 |
88e4e5c1ffb55cbd3b4b36d1e5f3fbbd8f311fdc | 2,178 | py | Python | app/models/abtms/ComprovantePF.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/ComprovantePF.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/ComprovantePF.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | 1 | 2019-03-13T14:34:24.000Z | 2019-03-13T14:34:24.000Z | from app.models.auth.DatabaseFactory import DatabaseFactory
class ComprovantePF():
def __init__(self, charge_id=0, code=0, user=0, year=0, status="", path=""):
self.code = code
self.charge_id = charge_id
self.user = user
self.year = year
self.status = status
self.pat... | 30.25 | 119 | 0.551423 |
4e2d21f4e40510c77bb1815754d971166425dee7 | 190 | py | Python | ParsingAndScraping/ivi/ivi_main.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | ParsingAndScraping/ivi/ivi_main.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | ParsingAndScraping/ivi/ivi_main.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | from ParsingAndScraping.ivi.parser import parse_this
def main():
film_name = input('Введите название фильма ')
return parse_this(film_name)
if __name__ == '__main__':
main()
| 17.272727 | 52 | 0.715789 |
ee44a041b1b626b3ae5618388f0310a43da9e147 | 3,131 | py | Python | ELK/elasticsearch/_resources/python-demo/es_search.py | LubinLew/lubinlew.github.io | 9a27359c8a5e2288e7203bce766407c9b9baf82f | [
"BSD-2-Clause"
] | null | null | null | ELK/elasticsearch/_resources/python-demo/es_search.py | LubinLew/lubinlew.github.io | 9a27359c8a5e2288e7203bce766407c9b9baf82f | [
"BSD-2-Clause"
] | null | null | null | ELK/elasticsearch/_resources/python-demo/es_search.py | LubinLew/lubinlew.github.io | 9a27359c8a5e2288e7203bce766407c9b9baf82f | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import os
import re
import datetime
import traceback
import geoip2.database
from elasticsearch import Elasticsearch
from elasticsearch.connection import create_ssl_context
def get_es_time(tm):
timestr = "%d-%02d-%02dT%02d:%02d:00+08:00" % (tm.year, tm.month, tm.day, tm.h... | 32.278351 | 140 | 0.490259 |
a016f26fa011016d54bf18e5ea0270729fa16d4b | 20,194 | py | Python | tests/views/test_event.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/views/test_event.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/views/test_event.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import pytest
from psycopg2.errors import UniqueViolation
@pytest.mark.parametrize(
"external_link", [None, "https://example.com", "www.example.com"]
)
def test_read(client, seeder, utils, external_link):
user_id, admin_unit_id = seeder.setup_base(log_in=False)
event_id = seeder.create_event(admin_unit_id... | 30.972393 | 130 | 0.66287 |
eec8195faa44c685e03dcbbdc77d366f19e90c39 | 182 | py | Python | nz_crawl_demo/day11/first_celery/apps/task1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day11/first_celery/apps/task1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day11/first_celery/django_celery/first_celery/apps/task1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from apps import app
@app.task()
def add(x,y,name):
print("你好:%s" % name )
return x+y
# @app.task(queue='task1_add2')
@app.task
def add2(x,y):
print(x*y)
return x*y
| 15.166667 | 31 | 0.598901 |
014ca1138259a1736ebe93c5291ca546bc959ee2 | 332 | py | Python | Python/Collections/piling_up.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Collections/piling_up.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Collections/piling_up.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | from collections import deque
for _ in range(int(input())):
t, c, stack = int(input()), deque(map(int, input().split())), []
while c:
if (stack[-1] >= max(c[0], c[-1]) if stack else 1):
stack.append(c.pop() if c[-1] > c[0] else c.popleft())
else:
break
print('No' if c... | 36.888889 | 68 | 0.521084 |
1111a76e74e29cf961c513d6b5b8c646be0ab559 | 947 | py | Python | project_euler/sudoku.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | project_euler/sudoku.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | project_euler/sudoku.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # create sudoku puzzle
from random import randint
from pprint import pprint
n = 5
def nums_generate(n):
num_list = [x for x in range(1,n+1)]
result = []
for i in range(n):
result.append(num_list.pop(randint(0, len(num_list)-1)))
return result
def array_generate(n):
result = []
for i i... | 23.097561 | 64 | 0.49736 |
28dba0b69ba8dadddae524266d68c933f7e1cb69 | 405 | py | Python | exercises/pt/solution_01_03_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_01_03_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/pt/solution_01_03_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # Importar spaCy e o objeto nlp do Português
import spacy
nlp = spacy.blank("pt")
# Processar o texto
doc = nlp("Eu tenho três cachorros e dois gatos.")
# Uma partição do Doc para "três cachorros"
tres_cachorros = doc[2:4]
print(tres_cachorros.text)
# Uma partição do Doc para "três cachorros e dois gatos" (sem inclu... | 27 | 76 | 0.753086 |
c982892ce35ca7047f229b6336763ff19d2d852d | 379 | py | Python | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/23.01-Selection-Sort.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/23.01-Selection-Sort.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/23.01-Selection-Sort.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | def selection_sort(lists):
ln = len(lists)
for i in range(ln):
mn = i
for j in range(i+1, ln):
if lists[mn] > lists[j]:
mn = j
lists[mn], lists[i] = lists[i], lists[mn]
return lists
if __name__ == "__main__":
values = [5, 3, 8, 6, 7, 2]
print(val... | 22.294118 | 49 | 0.51715 |
6e724689f4c7d1448ed846bbe7b3138673534a12 | 6,770 | py | Python | test/test_npu/test_network_ops/test_masked_fill.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_masked_fill.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_masked_fill.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... | 47.342657 | 109 | 0.635746 |
42dc577d9ced21ccbce78dbdc2e72e6fcd6b9ac2 | 134 | py | Python | Pythonjunior2020/Woche1/Aufgabe_1_4_1.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_4_1.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_4_1.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # 1.2.3, Woche 1, Block 2, Aufgabe 3
# Dekleration
hallo = "Hey Simon."
frage = "Wann geht dein Flug?"
# Ausgabe
print(hallo,frage) | 16.75 | 36 | 0.671642 |
95cb60a55d21f6383ceafb326ae93fa68e0ab4d4 | 507 | py | Python | kiosk/migrations/0006_produktpalette_imverkauf.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | kiosk/migrations/0006_produktpalette_imverkauf.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | kiosk/migrations/0006_produktpalette_imverkauf.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-11-05 16:54
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('kiosk', '0005_remove_produktpalette_kommentar'),
]
operations = [
migrations.... | 23.045455 | 58 | 0.631164 |
c278e77c5cccf3c1525280c64550e896bf9645c0 | 733 | py | Python | jocker/archive.py | omab/jocker | 44a79d4c12bb4df9c3333da75eb34964de64ad20 | [
"BSD-2-Clause"
] | 3 | 2017-10-18T08:11:58.000Z | 2019-07-31T23:53:37.000Z | jocker/archive.py | omab/jocker | 44a79d4c12bb4df9c3333da75eb34964de64ad20 | [
"BSD-2-Clause"
] | null | null | null | jocker/archive.py | omab/jocker | 44a79d4c12bb4df9c3333da75eb34964de64ad20 | [
"BSD-2-Clause"
] | null | null | null | import shutil
import logging
import dirsync
def compress(dirname):
"""
Compress the directory into a .tar.gz file.
"""
return dirname
def decompress(filename):
"""
Decompress the .tar.gz into a directory.
"""
return filename
def copy_tree(src, dest):
"""Copy the tree structure... | 20.361111 | 54 | 0.641201 |
dd0e0f0aad4e21c0df054b665756306bdb947d60 | 640 | py | Python | backend/apps/iamstudent/migrations/0008_auto_20200402_2211.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/iamstudent/migrations/0008_auto_20200402_2211.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/iamstudent/migrations/0008_auto_20200402_2211.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-02 22:11
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('iamstudent', '0007_auto_20200402_2055'),
]
operations = [
migrations.AddField(
model_name='studentlistfiltermodel',
... | 26.666667 | 62 | 0.640625 |
3c54b01d424d22f36c8f353fa154081b501bb280 | 593 | py | Python | frappe-bench/apps/erpnext/erpnext/domains/healthcare.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/domains/healthcare.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/domains/healthcare.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | data = {
'desktop_icons': [
'Patient',
'Patient Appointment',
'Consultation',
'Lab Test',
'Healthcare',
'Accounts',
'Buying',
'Stock',
'HR',
'ToDo'
],
'default_portal_role': 'Patient',
'restricted_roles': [
'Healthcare Administrator',
'LabTest Approver',
'Laboratory User',
'Nursing User'... | 20.448276 | 77 | 0.662732 |
056719eb94c87b01eee1d2985c5f17f52d6009b4 | 1,506 | py | Python | haas_lib_bundles/python/docs/examples/environment_monitor_485/haas506/code/test.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/environment_monitor_485/haas506/code/test.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/environment_monitor_485/haas506/code/test.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | import utime
import modbus as mb
import yuanda_htb485
import zzio606
def test_htb485():
ret = mb.init('modbus_485_4800')
if ret < 0:
raise ValueError("init modbus failed.")
htb485Obj = yuanda_htb485.HTB485(mb, 1)
humidity = htb485Obj.getHumidity()
temperature = htb485Obj.getTemperatur... | 25.525424 | 47 | 0.667331 |
5573e8f8f0bc148ccdc295281fd1495fedcf119a | 718 | py | Python | abfahrt/unittest/__main__.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/unittest/__main__.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/unittest/__main__.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | import unittest
# The unittest unit testing framework was originally inspired by JUnit and has a similar flavor as major unit testing frameworks in other languages.
# It supports test automation, sharing of setup and shutdown code for tests, aggregation of tests into collections, and independence of the tests from the ... | 47.866667 | 224 | 0.828691 |
75fb18d0afdf1e1f248387b10cab3a2f2a5a2d6b | 694 | py | Python | Kapitel_1/_9_dunder_repr_pc.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_1/_9_dunder_repr_pc.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_1/_9_dunder_repr_pc.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Deklaration der Klasse mit einem Konstruktor und der 'Dunder'-rpr-Method --- #
class PC:
def __init__(self, cpu, gpu):
self.cpu = cpu
self.gpu = gpu
def __repr__(self):
argument_string_list = [f"{key}={value!r}" for key, value in self.__dict__.items()]
init_string = ', '.j... | 38.555556 | 91 | 0.670029 |
bd1661bc07d641bca76aa9085408feb3aa6531f5 | 1,702 | py | Python | base/function.py | francisar/wechat | 8932feb4aacc6df27a472e3278780fcdd41bc47c | [
"MIT"
] | null | null | null | base/function.py | francisar/wechat | 8932feb4aacc6df27a472e3278780fcdd41bc47c | [
"MIT"
] | null | null | null | base/function.py | francisar/wechat | 8932feb4aacc6df27a472e3278780fcdd41bc47c | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding:utf-8 -*-
import sys
import ConfigParser
import time
import socket
class Config:
def __init__(self, path='config.ini'):
self.path = path
self.cf = ConfigParser.ConfigParser()
self.cf.read(self.path)
def get(self, field, key):
try:
re... | 22.394737 | 73 | 0.584606 |
1f9b883d57897823a2a29b85b31e012748ecc2e5 | 292 | py | Python | pacman-termux/test/pacman/tests/smoke004.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/smoke004.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/smoke004.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Read a package DB with several PGP signatures"
for i in range(1000):
sp = pmpkg("pkg%03d" % i)
sp.desc = "test description for package %d" % i
sp.pgpsig = "asdfasdfsdfasdfsdafasdfsdfasd"
self.addpkg2db("sync", sp)
self.args = "-Ss"
self.addrule("PACMAN_RETCODE=0")
| 24.333333 | 66 | 0.708904 |
1f7fc81f051a5877c1472795e8deee5983f8f1ac | 1,405 | py | Python | UAS/UAS 8.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 8.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 8.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | #Alpro uas no 8
papan = ['a', 'a', 'a', ' ', 'b', 'b', 'b']
benar = ['b', 'b', 'b', ' ', 'a', 'a', 'a']
langkah = 0
print('pindahkan posisi huruf \'a\' ke posisi huruf \'b\' sehingga menjadi susunan seperti ', benar)
print('dengan ketentuan hanya boleh mengambil satu langkah atau melangkahi satu huruf\n')
while... | 32.674419 | 101 | 0.595018 |
2f4d8f22ba6c855c7eaa3a1174b21870f9ca66aa | 330 | py | Python | multimeter/RPi/GPIO.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | multimeter/RPi/GPIO.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | multimeter/RPi/GPIO.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | '''
Created on 24.02.2017
Mockup for development
@author: steinorb
'''
BOARD = 1
OUT = 1
IN = 1
BCM = 1
def setmode(a):
print(a)
def setup(a, b):
print(a, b)
def output(a, b):
print(a, b)
def input(a):
return 0
def cleanup():
pass
def setwarnings(flag):... | 11.37931 | 23 | 0.521212 |
c06cd4586ff67218ecea1b6af2345b041dfb5262 | 380 | py | Python | Packs/RegexReplace/Scripts/RegexReplace/RegexReplace.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/RegexReplace/Scripts/RegexReplace/RegexReplace.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/RegexReplace/Scripts/RegexReplace/RegexReplace.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import re
import demistomock as demisto
from CommonServerPython import * # noqa: F401
args = demisto.args()
flags = 0
if argToBoolean(args.get('ignore_case', False)):
flags |= re.IGNORECASE
input_text = args['value']
pattern = re.compile(r'{}'.format(args['regex']), flags=flags)
output_text = pattern.sub(args... | 22.352941 | 62 | 0.734211 |
9e40916833683b87e291f00e61d8dfc3c56ea928 | 6,577 | py | Python | python/DeepLearning/lesson1/week4/mytest/main.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/DeepLearning/lesson1/week4/mytest/main.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/DeepLearning/lesson1/week4/mytest/main.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import numpy.random
import matplotlib.pyplot as plt
import random
# 设置常量
# HIDDEN_LAYER_NUM = 隐层的个数
# LEARNING_RATE = 学习率
# NET_DEEP_ARRAY = 神经网络的深度(输入层X为0)对应的神经元个数
# DEFAULT_TRAIN_TIMES = 默认训练次数
LEARNING_RATE = 1.2
NET_DEEP_ARRAY = []
DEFAULT_TRAIN_TIMES = 5000
# RANDOM_SEED = 随机数的种子
RANDOM_SEED = ... | 24.449814 | 92 | 0.518473 |
cdff56614819927ce36dffbb72ccd471d715c1d8 | 2,419 | py | Python | ledger/migrations/0001_initial.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | ledger/migrations/0001_initial.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | ledger/migrations/0001_initial.py | Thames1990/BadBatBets | 8dffb69561668b8991bf4103919e4b254d4ca56a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-06 19:36
from __future__ import unicode_literals
import bets.util
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
... | 38.396825 | 126 | 0.575858 |
b585f9d684c4d3c058e6edeebf7a07d433806be5 | 2,154 | py | Python | listings/chapter07/windows.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 6 | 2021-08-04T19:42:53.000Z | 2022-01-17T14:24:45.000Z | listings/chapter07/windows.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2021-08-30T06:32:08.000Z | 2021-08-30T06:42:46.000Z | listings/chapter07/windows.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2022-02-17T10:32:17.000Z | 2022-02-17T10:32:17.000Z | class Window:
NO_FEATURES = 0
TITLE_BAR = 1
CLOSE_BUTTON = 2
def __init__(self, features = NO_FEATURES, title = '', content = ''):
self.features = features
self.title = title
self.content = content
def has_feature(self, feature):
return self.features & feature
... | 29.916667 | 76 | 0.543175 |
5721b4f5070f8f7c924ca1efc41dd307d92b00d1 | 1,057 | py | Python | transonic/test_init.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/test_init.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/test_init.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | import importlib
from shutil import rmtree
from transonic import Transonic, mpi
from transonic.compiler import wait_for_all_extensions
from transonic.config import backend_default
from transonic.mpi import Path
def test_not_transonified():
path_for_test = (
Path(__file__).parent.parent / "_transonic_tes... | 24.022727 | 76 | 0.736991 |
2785be924a1e27fcd20b61d7c6267a5e9f8f6be6 | 2,372 | py | Python | src/onegov/translator_directory/views/documents.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/views/documents.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/translator_directory/views/documents.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.translator_directory import _
from onegov.core.security import Secret
from onegov.core.templates import render_macro
from onegov.file import File
from onegov.file.utils import extension_for_content_type
from onegov.org.views.files import view_upload_file
from onegov.translator_directory import TranslatorDir... | 32.054054 | 75 | 0.697723 |
27897e3157dac20ef246f13a44ca1121585505b5 | 1,406 | py | Python | Python/pandas/17_DatumZeit.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/pandas/17_DatumZeit.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/pandas/17_DatumZeit.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | import datetime
import pandas as pd
import numpy as np
dtf = pd.to_datetime([
"1/1/1970",
np.datetime64("2011-11-21"),
datetime.datetime(2021, 1, 2)
])
# Range von Tage, mit startdatum
# periods: wieviel elemente
# freq: welche Abstände H: Stunde, S: sekunde, M: Monate allg. timeseries.offset_aliases
dtf =... | 28.12 | 88 | 0.681366 |
27edfec45a20a232cc16627f6170cca14a92367b | 921 | py | Python | src/python3_learn_video/name_main.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/name_main.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/name_main.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | """
__name__ 和 __main__的关系:
当作为整个模块导入时,__name__ 不等于 __main__
print('------------------------------------------------')
print(__name__)
import TemperatureConversion as tc
print(tc.__name__)
print('------------------------------------------------')
"""
"""
搜索路径:
print('-------------------------------------------... | 23.025 | 57 | 0.40608 |
8b8a0611d47f72ac6fa626ec6afcec3902a57ed7 | 12,466 | py | Python | wz/core/base.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/core/base.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/core/base.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
core/base.py
Last updated: 2021-10-06
Basic configuration and structural stuff.
=+LICENCE=================================
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.... | 34.341598 | 79 | 0.582384 |
efc03d5b40a0a456b93eb1d5214c0342b76bdaaa | 2,144 | py | Python | challenge16/exp-challenge16.py | dobin/yookiterm-challenges-files | 81daab38d83bdc083bd9a66e90eea1397c5e30ed | [
"MIT"
] | 17 | 2017-05-03T22:00:30.000Z | 2021-12-07T10:15:41.000Z | challenge/16/src/exp-challenge16.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 2 | 2017-06-16T02:09:05.000Z | 2018-03-01T08:58:24.000Z | challenge/16/src/exp-challenge16.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 11 | 2017-05-04T13:04:21.000Z | 2020-12-15T23:00:02.000Z | #!/usr/bin/python
import struct
from pwn import *
# http://shell-storm.org/shellcode/files/shellcode-78.php
shellcode = ""
shellcode += "\x31\xc0\x31\xdb\x31\xd2\xb0\x01\x89\xc6\xfe\xc0\x89\xc7\xb2"
shellcode += "\x06\xb0\x29\x0f\x05\x93\x48\x31\xc0\x50\x68\x02\x01\x11\x5c"
shellcode += "\x88\x44\x24\x01\x48\x89\xe6\... | 28.586667 | 86 | 0.697295 |
efe2db08314c57bd59ee078b29667d0527f4de9f | 844 | py | Python | NeuralNet/Oli/evaluateNN.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | 6 | 2017-04-12T14:05:19.000Z | 2021-01-29T11:23:50.000Z | NeuralNet/Oli/evaluateNN.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | NeuralNet/Oli/evaluateNN.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | from NeuralNet.Oli.libs.ProcessingPipeline import ProcessingPipeline
from NeuralNet.Oli.libs.Preprocessor import SimplePreprocessor, IPreprocessor
#__________Configuration__________#
# Path to folder which contains subfolders with the images
IMG_PATH = '../../images/Dataset_2'
# Name for model when saved
MODEL_LOAD_PA... | 30.142857 | 85 | 0.81872 |
3228a1555cc16bd4e31c045ee1b973720d6b63e0 | 2,462 | py | Python | packages/watchmen-meta/src/watchmen_meta/dqc/monitor_rule_lock_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/dqc/monitor_rule_lock_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/dqc/monitor_rule_lock_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from watchmen_auth import PrincipalService
from watchmen_meta.common import StorageService
from watchmen_model.dqc import MonitorJobLock, MonitorJobLockId
from watchmen_storage import EntityHelper, EntityIdHelper, EntityRow, EntityShaper, SnowflakeGenerator, \
TransactionalStorageSPI
from watchmen_utilities import get... | 31.164557 | 105 | 0.783916 |
326346f68fd39804b40692999547baa3713fda8e | 545 | py | Python | Miniprojekt och Studio/Mini3/mini3Flash.py | Guziobi/GKT-Projekt | b0d63974fe672380345c83c9882cc782db81b182 | [
"MIT"
] | null | null | null | Miniprojekt och Studio/Mini3/mini3Flash.py | Guziobi/GKT-Projekt | b0d63974fe672380345c83c9882cc782db81b182 | [
"MIT"
] | null | null | null | Miniprojekt och Studio/Mini3/mini3Flash.py | Guziobi/GKT-Projekt | b0d63974fe672380345c83c9882cc782db81b182 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from VLE import *
P = 1520 # mmHg
T = 87 # C
Xf = 0.35
tol = 0.001
Tb_m = 64.7
Tb_e = 77.1
A1 = 7.87863
B1 = 1473.11
C1 = 230.0
A2 = 7.09803
B2 = 1238.71
C2 = 217.0
ABC1 = [A1, B1, C1]
ABC2 = [A2, B2, C2]
Lambda12 = 0.62551
Lambda21 = 0.49384
Xsum = []
#X1 = []
... | 12.97619 | 55 | 0.587156 |
327330356da4ed77e4f2c717225307230ef43512 | 8,661 | py | Python | pvtool/file_upload.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | 1 | 2019-10-31T13:34:12.000Z | 2019-10-31T13:34:12.000Z | pvtool/file_upload.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | 1 | 2019-05-27T13:03:25.000Z | 2019-05-27T13:03:25.000Z | pvtool/file_upload.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | null | null | null | import os
import pandas as pd
from .db import db, Measurement, PvModule, FlasherData, ManufacturerData, MeasurementValues
import configparser
from flask import flash
from .routes._main import internal_server_error
UPLOAD_FOLDER = os.path.join('/var/www/pv-FHNW/', 'pvtool/files')
ALLOWED_EXTENSIONS = set(['csv', 'xls',... | 39.368182 | 134 | 0.699688 |
3ee70f10c3f6d546057d3d199945dd95b5a39990 | 4,843 | py | Python | verto/tests/FrameTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 4 | 2017-04-10T06:09:54.000Z | 2019-05-04T02:07:40.000Z | verto/tests/FrameTest.py | uccser/verto | d36aa88b208f1700fafc033679bd1e9775496d25 | [
"MIT"
] | 268 | 2017-04-03T20:40:46.000Z | 2022-02-04T20:10:08.000Z | verto/tests/FrameTest.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.GenericTagBlockProcessor import GenericTagBlockProcessor
from verto.errors.ArgumentMissingError import ArgumentMissingError
from verto.errors.ArgumentDefinitionError import ArgumentDefinitionError
from ... | 46.12381 | 132 | 0.714846 |
3eecac30594efcc77a514789cc2e2b7f8d1b6ed4 | 1,183 | py | Python | 05.Greedy/Dijkstra.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 05.Greedy/Dijkstra.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 05.Greedy/Dijkstra.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | #Input
# 6 9
# 1 2 7
# 1 3 9
# 1 6 14
# 2 3 10
# 2 4 15
# 3 4 11
# 3 6 2
# 4 5 6
# 5 6 9
import sys
N, M = map(int, input().split(" "))
G = [[0]* (N+1) for _ in range(N+1)]
def pprint(arr):
for line in arr:
print(line)
visited = [0 for _ in range(1+N)]
for _ in range(M):
v1, v2, cost = map(int,sys.s... | 19.716667 | 63 | 0.516484 |
eb179fed849f8f3c7aa0862db03d8fe11ecb9540 | 2,229 | py | Python | src/onegov/wtfs/forms/invoice.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/forms/invoice.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/forms/invoice.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm.func import unaccent
from onegov.form import Form
from onegov.wtfs import _
from onegov.wtfs.models import Municipality
from wtforms import SelectField
from wtforms import StringField
from wtforms.fields.html5 import DateField
from wtforms.validators import InputRequired
class CreateInvoicesForm(... | 26.223529 | 70 | 0.593091 |
de2c71f0afa7a3491e8be73fe7c46ad281529689 | 9,401 | py | Python | etl/load/primitives/row/load_row.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/load/primitives/row/load_row.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/load/primitives/row/load_row.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | # sql query to load a row into CDM
import datetime
import traceback
import random
import asyncio
CHUCK_SIZE=5000
async def upsert_g(conn, row, dataset_id = None, many=False):
sql = '''
INSERT into cdm_g (fid, value, confidence)
values {values}
on conflict ({dataset_id_key} fid) do update
set value = ... | 39.5 | 120 | 0.629401 |
ded1ed0711e6683b3cf33f8dd72b843ee415301c | 231 | py | Python | Algorithms/Implementation/sequence_equation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/sequence_equation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/sequence_equation.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
n = int(input().strip())
temp = list(map(int, input().split()))
p = [0]
p.extend(temp)
for i in range(1, n + 1):
for j in range(1, n + 1):
if p[p[j]] == i:
print(j)
break
| 19.25 | 38 | 0.484848 |
720468a209820f8c59419d71371d36abc350d857 | 83 | py | Python | demos/System_Dynamics/Compartment_Models/stochastic_seir/sim_params.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | demos/System_Dynamics/Compartment_Models/stochastic_seir/sim_params.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | demos/System_Dynamics/Compartment_Models/stochastic_seir/sim_params.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z | # SIMULATION_TIME_STEPS = days
SIMULATION_TIME_STEPS = 200
MONTE_CARLO_RUNS = 10
| 13.833333 | 30 | 0.807229 |
a0f929f03912eb1ecd2359291308bccac12cda61 | 1,396 | py | Python | python/interface/informal_interface.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/interface/informal_interface.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/interface/informal_interface.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | class InformalParserInterface:
def load_data_source(self, path: str, file_name: str) -> str:
"""Load in the file for extracting text."""
pass
def extract_text(self, full_file_name: str) -> dict:
"""Extract text from the currently loaded file."""
pass
class PdfParser(... | 33.238095 | 84 | 0.661175 |
dfbf4870a645476cf657bde24fae1521800b0ca6 | 92 | py | Python | Projects/simple/banner.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Projects/simple/banner.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | Projects/simple/banner.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | import pyfiglet as let
result = let.figlet_format('vignesh',font="banner3-D")
print(result) | 23 | 54 | 0.771739 |
26256c42fbb72701b3c2f88ee92307ebbf46364b | 551 | py | Python | src/ingestion/task.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 156 | 2021-11-19T18:50:14.000Z | 2022-03-31T19:48:59.000Z | src/ingestion/task.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 30 | 2021-12-27T19:30:56.000Z | 2022-03-30T17:49:00.000Z | src/ingestion/task.py | monosidev/monosi | a88b689fc74010b10dbabb32f4b2bdeae865f4d5 | [
"Apache-2.0"
] | 14 | 2022-01-17T23:24:34.000Z | 2022-03-29T09:27:47.000Z | from dataclasses import dataclass
from typing import Any, List
@dataclass
class TaskUnit:
request: Any
def run(self, extractor):
yield extractor.run(self)
@dataclass
class MultiTaskUnit(TaskUnit):
request: Any
def run(self, extractor):
return extractor.run_multiple(self)
@dataclass... | 18.366667 | 43 | 0.673321 |
f802eada87757b94f1f9e483fd244402310bfcd0 | 623 | py | Python | logya/create.py | yaph/logya | 9647f58a0b8653b56ad64332e235a76cab3acda9 | [
"MIT"
] | 12 | 2015-03-04T03:23:56.000Z | 2020-11-17T08:09:17.000Z | logya/create.py | elaOnMars/logya | a9f256ac8840e21b348ac842b35683224e25b613 | [
"MIT"
] | 78 | 2015-01-05T11:40:41.000Z | 2022-01-23T21:05:39.000Z | logya/create.py | elaOnMars/logya | a9f256ac8840e21b348ac842b35683224e25b613 | [
"MIT"
] | 6 | 2015-04-20T06:58:42.000Z | 2022-01-31T00:36:29.000Z | # -*- coding: utf-8 -*-
import shutil
from sys import exit
from pkg_resources import resource_filename
from logya.util import paths
def create(dir_site: str, name: str, site: str = None, **kwargs):
target = paths(dir_site=dir_site).root.joinpath(name)
if target.exists():
exit(f'Error: "{target}" al... | 28.318182 | 96 | 0.664526 |
f888ae0875a3741aa8c687bf7672bc22cadf8bb9 | 428 | py | Python | source/pkgsrc/devel/py-anytree/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-anytree/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-anytree/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2020/01/08 21:25:31 adam Exp $
Avoid files outside PYSITELIB.
--- setup.py.orig 2020-01-08 21:21:42.000000000 +0000
+++ setup.py
@@ -49,7 +49,6 @@ config['extras_require'] = {
}
config['tests_require'] = ['nose']
config['test_suite'] = 'nose.collector'
-config['data_files'] = [('', ['... | 28.533333 | 60 | 0.668224 |
f8a4f7bb68c75dbd2b9f1b1846e0dc99694f7b61 | 70 | py | Python | 8_scripting/01_parameter_ubergeben.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 8_scripting/01_parameter_ubergeben.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | 8_scripting/01_parameter_ubergeben.py | DavidStahl97/Python-Grundkurs | 6796d19116d2f838b193b106d00bc2e74a8cdcb4 | [
"MIT"
] | null | null | null | # Modul sys wird importiert:
# Iteration über sämtliche Argumente:
| 11.666667 | 37 | 0.757143 |
e489d5ee52505b257608842f454bbfeafb544665 | 12,092 | py | Python | skimind/kernel/interfacedb/modelTables.py | NathBangwa/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 1 | 2020-11-13T18:30:47.000Z | 2020-11-13T18:30:47.000Z | skimind/kernel/interfacedb/modelTables.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | 5 | 2020-11-13T18:16:48.000Z | 2021-09-08T01:04:59.000Z | skimind/kernel/interfacedb/modelTables.py | nathanbangwa243/SkimindFoot | 8ae3a00074c56dd981fbfdab30e29898ddcaf6be | [
"MIT"
] | null | null | null |
# tools
import collections
# skimind.gFunctions
from . import gFunctions
# skimind.config
from . import skiconfig
# container
import collections
#---------------------------------------------------------------------------
# TABLE MATCHS
#-------------------------------------------------------------------------... | 30.079602 | 98 | 0.510089 |
f2ef52b33349ba49dcac5cc03f637c804ffbcbe0 | 995 | py | Python | src/onegov/election_day/utils/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/utils/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/utils/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.election_day.utils.common import add_cors_header
from onegov.election_day.utils.common import add_last_modified_header
from onegov.election_day.utils.common import add_local_results
from onegov.election_day.utils.common import get_parameter
from onegov.election_day.utils.filenames import pdf_filename
from o... | 36.851852 | 77 | 0.825126 |
4b9a44128940ee3dd60245e448580a9ba9aafa0b | 847 | py | Python | INBa/2015/Rogko_K_A/task_7_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rogko_K_A/task_7_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Rogko_K_A/task_7_20.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 20
#Создайте игру, в которой компьютер загадывает имя одного из семи гномов, друзей Белоснежки, а игрок должен его угадать.
# Рожко Ксения
# 23.05.2016
import random
print("Компьютер загадал название одного из семи гномов Белоснежки, а Вы должны его угадать.\n")
gnoms = ('Умник','Ворчун','Весел... | 19.25 | 120 | 0.664699 |
d99ce84fe742cfa2212485b64055fa44b6da25a8 | 11,697 | py | Python | official/cv/maskrcnn/src/maskrcnn/bbox_assign_sample_stage2.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/maskrcnn/src/maskrcnn/bbox_assign_sample_stage2.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/maskrcnn/src/maskrcnn/bbox_assign_sample_stage2.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020-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 agre... | 50.636364 | 117 | 0.680174 |
8abf1e9647ddf9405a7348888d2ff681bb996a19 | 1,454 | py | Python | build/lib/AESEncryptor_heureka_code/Exceptions/TextExceptions.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | build/lib/AESEncryptor_heureka_code/Exceptions/TextExceptions.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | build/lib/AESEncryptor_heureka_code/Exceptions/TextExceptions.py | heureka-code/AESEncryptor-heureka-code | 9b11ed77148971672f6e6113a4411fae56e5712c | [
"MIT"
] | null | null | null | __date__ = "11.03.2021"
__status__ = "Development"
__annotations__ = "Enthält die Exceptions für das Verschlüsseln und Entschlüsseln von Texten"
__doc__ = """
Text Exceptions:
TextError:
ist die Klasse, von der die anderen Text Exceptions erben.
TextIsEncrypted:
wird ausgelöst, wenn der Text nicht verschlüss... | 25.508772 | 114 | 0.70564 |
0a0a9c1fa4bb7e7bc9fc7329f0421e06ce78a594 | 787 | py | Python | IVTa/2014/BRONNIKOV_I_S/task_6_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/BRONNIKOV_I_S/task_6_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/BRONNIKOV_I_S/task_6_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 6. Вариант 50
# Создайте игру, в которой компьютер загадывает нназвание одной из пятнадцати республик,
# входящих в состав СССР, а игрок должен его угадать.
# Bronnikov I. S.
# 25.05.2016
import random
USSR = ["РСФСР", "Украинская ССР", "Белорусская ССР" "Узбекская ССР" "Казахская ССР" "Грузинская СС... | 39.35 | 259 | 0.703939 |
7c19ab3718c94d74749eb4d9ef48d45ac9d4cc48 | 7,091 | py | Python | tests/transformers/bigbird/test_tokenizer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/transformers/bigbird/test_tokenizer.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/transformers/bigbird/test_tokenizer.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 appli... | 38.748634 | 88 | 0.616697 |
7c7268665d9e9feeb09f028ce4ea50c913f2b335 | 1,924 | py | Python | order/migrations/0014_auto_20201204_0905.py | hhdMrLion/Product-System | e870225ab10c32688a87426d5943d922c47c4404 | [
"MIT"
] | 1 | 2021-06-18T03:03:42.000Z | 2021-06-18T03:03:42.000Z | order/migrations/0014_auto_20201204_0905.py | hhdMrLion/Product-System | e870225ab10c32688a87426d5943d922c47c4404 | [
"MIT"
] | null | null | null | order/migrations/0014_auto_20201204_0905.py | hhdMrLion/Product-System | e870225ab10c32688a87426d5943d922c47c4404 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.16 on 2020-12-04 01:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('order', '0013_auto_20201203_1742'),
]
operations = [
migrations.AlterModelOptions(
... | 35.62963 | 134 | 0.56237 |
7cf2360f4fce11b0353b7aa243a4e5d010b4bd6b | 1,670 | py | Python | ciphey/basemods/Decoders/a1z26.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 2 | 2020-09-28T23:27:22.000Z | 2021-09-09T17:24:26.000Z | ciphey/basemods/Decoders/a1z26.py | drpacket/Ciphey | b46e00c611ee4b5f5795e967a50b05a63cbb5ef0 | [
"MIT"
] | 1 | 2021-04-21T06:02:32.000Z | 2021-04-21T06:02:32.000Z | ciphey/basemods/Decoders/a1z26.py | drpacket/Ciphey | b46e00c611ee4b5f5795e967a50b05a63cbb5ef0 | [
"MIT"
] | 1 | 2020-09-29T17:48:23.000Z | 2020-09-29T17:48:23.000Z | from typing import Optional, Dict, List
from ciphey.iface import Config, ParamSpec, T, U, Decoder, registry
from loguru import logger
import re
@registry.register
class A1z26(Decoder[str, str]):
def decode(self, ctext: T) -> Optional[U]:
"""
Performs A1Z26 decoding
"""
logger.tr... | 29.298246 | 95 | 0.535329 |
6b29514559a2458318b49f2a5ecfda5d90c0d599 | 2,547 | py | Python | tools/pythonpkg/tests/fast/test_map.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | tools/pythonpkg/tests/fast/test_map.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | tools/pythonpkg/tests/fast/test_map.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | import duckdb
import pandas as pd
import numpy
import pytest
class TestMap(object):
def test_map(self, duckdb_cursor):
testrel = duckdb.values([1, 2])
conn = duckdb.connect()
conn.execute('CREATE TABLE t (a integer)')
empty_rel = conn.table('t')
newdf1 = testrel.map(lambda ... | 27.989011 | 80 | 0.546133 |
86933876039805f9a0dd7fde190318e20ce478db | 1,652 | py | Python | research/cv/resnet50_bam/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/resnet50_bam/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/resnet50_bam/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 30.592593 | 78 | 0.63862 |
d4a6f74ae2f877f772bcb27c0bf8ad924c015e27 | 6,420 | py | Python | experiments/sumo_rl/environment/traffic_signal_longterm.py | june6723/sumo-rl-offset | 775cddc8d168fb7c4959610a96a791d746fa0afd | [
"MIT"
] | 4 | 2020-10-11T01:30:13.000Z | 2021-04-27T16:03:41.000Z | experiments/sumo_rl/environment/traffic_signal_longterm.py | june6723/sumo-rl-offset | 775cddc8d168fb7c4959610a96a791d746fa0afd | [
"MIT"
] | null | null | null | experiments/sumo_rl/environment/traffic_signal_longterm.py | june6723/sumo-rl-offset | 775cddc8d168fb7c4959610a96a791d746fa0afd | [
"MIT"
] | null | null | null | import os
import sys
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)
else:
sys.exit("Please declare the environment variable 'SUMO_HOME'")
import traci
class TrafficSignal:
"""
This class represents a Traffic Signal of an intersection
... | 40.125 | 158 | 0.617134 |
079535edfbaf7aa3db1f746c96ce80f11f4f4d9a | 278 | py | Python | year_3/comppi_1/puborgreg/urls.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/comppi_1/puborgreg/urls.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/comppi_1/puborgreg/urls.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('', include('core.urls')),
path('api/', include('managers.urls')),
path('api/', include('puborgs.urls')),
path('djangoadmin/', admin.site.urls, name='djangoadmin')
]
| 21.384615 | 61 | 0.658273 |
b94d25a28eef9edbc75fcb443e661f2297d44bf7 | 5,470 | py | Python | Decrypt-main/Dec.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Decrypt-main/Dec.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Decrypt-main/Dec.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # kalo gak tau cara gunain nya gak usah pake ya asw
# kalo ada yang error fix sendiri aja :v
# only marshal or zlib base64 from https://github.com/Dumai-991/
#open scored
import os
import re
import sys
try: import uncompyle6
except: os.system("python -m pip install uncompyle6")
########################################... | 34.1875 | 199 | 0.595978 |
b994caf3159f6eac7f43ea51ad9c372e9cac218c | 3,699 | py | Python | tests/core/test_command.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | tests/core/test_command.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | tests/core/test_command.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | import unittest
from bolt.core.command import Command, RegexCommand, ParseCommand
from bolt.discord.events import MessageCreate
from bolt.discord.models.message import Message
class TestCommand(unittest.TestCase):
def dummycallback(self):
pass
def test_command_matches(self):
command = Command... | 36.99 | 91 | 0.678291 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.