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
e23f96a15d1da24a942f0af62f7f954739d3879d
6,264
py
Python
deeplearning EX/Ex3.py
deliciousYSH/Misc.Code
5e957ca16b2a7b2a1dff5f0a1dec563dd4757d18
[ "MIT" ]
null
null
null
deeplearning EX/Ex3.py
deliciousYSH/Misc.Code
5e957ca16b2a7b2a1dff5f0a1dec563dd4757d18
[ "MIT" ]
null
null
null
deeplearning EX/Ex3.py
deliciousYSH/Misc.Code
5e957ca16b2a7b2a1dff5f0a1dec563dd4757d18
[ "MIT" ]
null
null
null
import torchvision as tv import torchvision.transforms as transforms from torchvision.transforms import ToPILImage from torch import nn import torch as t from torch.nn import functional as F from torch import optim show = ToPILImage() # 可以把Tensor转成Image,方便可视化 t.set_num_threads(8) # 第一次运行程序torchvision会自动下载CIFAR-10数...
28.216216
71
0.550447
2c5b3d08c38208f6a399b07e2ad256e504d9ea34
2,223
py
Python
pyhton/data-structures/overlay/src/main/python/main.py
NovaOrdis/playground
6fe076b5d246ac5b492ab8d5de04eef43d797b62
[ "Apache-2.0" ]
5
2016-11-16T02:18:45.000Z
2018-03-14T19:57:11.000Z
pyhton/data-structures/overlay/src/main/python/main.py
NovaOrdis/playground
6fe076b5d246ac5b492ab8d5de04eef43d797b62
[ "Apache-2.0" ]
null
null
null
pyhton/data-structures/overlay/src/main/python/main.py
NovaOrdis/playground
6fe076b5d246ac5b492ab8d5de04eef43d797b62
[ "Apache-2.0" ]
10
2016-06-06T18:28:13.000Z
2018-07-01T18:20:06.000Z
import yaml def descend(path, data): """ Gets a dot separated YAML path and a data structure. Attempt to descend the data structure following the keys and return the value associated with the leaf or None on any kind of mismatch or missing data. :param path: a dot-separated YAML path. Example: 'level_...
35.854839
117
0.704004
2ca5672b903ce8d3a855be882a57a7436331c704
10,018
py
Python
tests/test_build_utils.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
17
2020-11-20T15:58:02.000Z
2022-02-06T19:18:20.000Z
tests/test_build_utils.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
3
2021-02-17T13:47:44.000Z
2021-10-14T13:53:15.000Z
tests/test_build_utils.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
6
2020-11-23T09:51:26.000Z
2022-02-11T13:46:57.000Z
import os import sys from typing import Tuple import pytest from universal_build import build_utils valid_patch_version = "1.1.4" valid_minor_version = "2.2.0" def setup_module(module): build_utils._get_remote_git_tags = _mocked_get_remote_git_tags build_utils.exit_process = _mocked_exit_process build_...
37.241636
175
0.626672
46eab70867b714bdbc3bf5cd77ef16cc9638e018
129
py
Python
Python/Strings/string_formatting.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Python/Strings/string_formatting.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Python/Strings/string_formatting.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
a = int(input()) f = '{0:{w}d} {0:{w}o} {0:{w}X} {0:{w}b}' print('\n'.join([f.format(i+1, w=a.bit_length()) for i in range(a)]))
32.25
69
0.503876
20176dab7764fdc98ca68e4d9ba9c8a18cca4f8b
693
py
Python
___Python/KarPoo/po1_kennenlernen/p03_lambda/m05_filtern.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/KarPoo/po1_kennenlernen/p03_lambda/m05_filtern.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/KarPoo/po1_kennenlernen/p03_lambda/m05_filtern.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
celsius_temperaturen = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3] #Durchschnittstemperaturen in Bilefeld nach Monat #def mindestens15(temperatur): # return temperatur >= 15 mindestens15 = lambda temperatur: temperatur >= 15 # entspricht der o.g. Funktion def mindestens15(temperatur): ...
43.3125
139
0.737374
64d5a5e2f689bbc81907a37f9c60d753e9bb5649
77
py
Python
Online-Judges/CodingBat/Python/String-01/11-left2.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/String-01/11-left2.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/String-01/11-left2.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def left2(str): first = str[:2] last = str[2:] return last+first
15.4
21
0.558442
b3c7d7430a6df6f1b42faf1a14d27e94f35b1be5
1,453
py
Python
pyntcloud/io/off.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/io/off.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/io/off.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
import pandas as pd import numpy as np def read_off(filename): with open(filename) as off: first_line = off.readline() if "OFF" not in first_line: raise ValueError('The file does not start whith the word OFF') color = True if "C" in first_line else False count = 1 ...
33.022727
85
0.469374
b3e10c64e23f0fa8b4bf18b9ea927470c5a8ee98
588
py
Python
storage/emulated/0/qpython/scripts3/auto_picture.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
storage/emulated/0/qpython/scripts3/auto_picture.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
storage/emulated/0/qpython/scripts3/auto_picture.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
#import androidhelper,sys #droid = androidhelper.Android() #droid.cameraCapturePicture('/storage/emulated/0/autoqpython.jpg') #"the,path,must,be,/storage/emulated/0/,if,/sdcard,not,exist" #droid.cameraStopPreview() #sys.exit(1) #droid.cameraInteractiveCapturePicture('/sdcard/qpython.jpg') import androidhelper ...
30.947368
67
0.683673
03b0f14b0c0eb0034080141719db07937efe1735
82
py
Python
Online-Judges/CodingBat/Python/Warmup-01/04-diff21.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/Warmup-01/04-diff21.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/Warmup-01/04-diff21.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def diff21(n): if n > 21: return (int(n) - 21)* 2 else: return 21 - n
13.666667
27
0.5
03e5c6443e9673748c8da46c88caf848466c5485
408
py
Python
Algorithms/Greedy/luck_balance.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Greedy/luck_balance.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Greedy/luck_balance.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys N, K = list(map(int, (input().strip().split()))) temp = [list(map(int, (input().strip().split()))) for i in range(0, N)] important, unimportant = [], [] for t in temp: if t[1] == 1: important.append(t[0]) else: unimportant.append(t[0]) important = sorted(imp...
24
71
0.610294
45693aa4b9990fcb549b8fb2e25927ce911d6f09
9,354
py
Python
tests/rbac/common/base/base_message_tests.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
tests/rbac/common/base/base_message_tests.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
tests/rbac/common/base/base_message_tests.py
fthornton67/sawtooth-next-directory
79479afb8d234911c56379bb1d8abf11f28ef86d
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Copyright 2019 Contributors to Hyperledger Sawtooth # # 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 ...
29.695238
88
0.691362
4571986def636baa5e27979c2c8524dac4cd1c1e
2,816
py
Python
Gmail-Bruteforce/Core/header.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
Gmail-Bruteforce/Core/header.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
Gmail-Bruteforce/Core/header.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
header =""" ███████▓█████▓▓╬╬╬╬╬╬╬╬▓███▓╬╬╬╬╬╬╬▓╬╬▓█ ████▓▓▓▓╬╬▓█████╬╬╬╬╬╬███▓╬╬╬╬╬╬╬╬╬╬╬╬╬█ ███▓▓▓▓╬╬╬╬╬╬▓██╬╬╬╬╬╬▓▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ ████▓▓▓╬╬╬╬╬╬╬▓█▓╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬▓█ ...
67.047619
99
0.002131
b337bf252f7259b751837a4619f57857045a7138
1,071
py
Python
mongodb/mongodb_consistent_backup/official/setup.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
282
2016-06-16T14:41:44.000Z
2022-03-02T03:43:02.000Z
mongodb/mongodb_consistent_backup/official/setup.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
146
2016-06-16T08:55:45.000Z
2020-09-08T10:37:32.000Z
mongodb/mongodb_consistent_backup/official/setup.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
94
2016-06-16T10:49:07.000Z
2022-03-28T09:14:03.000Z
#!/usr/bin/env python from setuptools import setup, find_packages __version__ = "#.#.#" def readme(): with open("README.rst") as f: return f.read() setup( name='mongodb-consistent-backup', version=__version__, license="ASL-2", description='Tool for getting consistent backups from MongoD...
29.75
91
0.631186
b338d1f163d77b1f004563f0c5110289fd9bb347
2,087
py
Python
ingress/ambassador/end-to-end/stats-test-service/stats-test.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
63
2018-02-04T03:31:22.000Z
2022-03-07T08:27:39.000Z
ingress/ambassador/end-to-end/stats-test-service/stats-test.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
3
2021-03-26T00:22:50.000Z
2021-03-26T00:26:07.000Z
ingress/ambassador/end-to-end/stats-test-service/stats-test.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
40
2018-01-22T16:31:16.000Z
2022-03-08T04:40:42.000Z
import sys # Copyright 2018 Datawire. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
28.202703
77
0.622904
b3706ca50e6de217ab98577c3cce410836f3ead4
87
py
Python
mysite/charge/apps.py
hschueh/TrollersHackNTU
9303a07909f89b7b2511db1fc5185be35047e0c4
[ "Apache-2.0" ]
null
null
null
mysite/charge/apps.py
hschueh/TrollersHackNTU
9303a07909f89b7b2511db1fc5185be35047e0c4
[ "Apache-2.0" ]
null
null
null
mysite/charge/apps.py
hschueh/TrollersHackNTU
9303a07909f89b7b2511db1fc5185be35047e0c4
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class ChargeConfig(AppConfig): name = 'charge'
14.5
33
0.747126
2fecb261e702b2a8856ce2fcf4677f46a0caf545
1,198
py
Python
PMIa/2015/NIKISHIN_P_S/task_9_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/NIKISHIN_P_S/task_9_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2015/NIKISHIN_P_S/task_9_22.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 9. Вариант 22. # 1-50. Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен его отгадать. Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток узнать, есть ли какая-либо буква в слове, причем программа может отвечать только "Да" и "Нет". Вслед за тем игрок должен попроб...
36.30303
316
0.666945
4429adcc0f5651908091dbbeb96d7ccd284a5705
20,910
py
Python
Packs/ParseHTMLTables/Scripts/ParseHTMLTables/ParseHTMLTables_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ParseHTMLTables/Scripts/ParseHTMLTables/ParseHTMLTables_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ParseHTMLTables/Scripts/ParseHTMLTables/ParseHTMLTables_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto import json def test_main(mocker): from ParseHTMLTables import main test_data = [ { "value": """ <html> <h1>table1</h1> <table> <tr> <th>1.head1</th> ...
31.972477
67
0.176901
a63b132ed79e785a574764689c07a17f825756eb
591
py
Python
___Python/Michael/p03_lambda/m05_filtern.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Michael/p03_lambda/m05_filtern.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Michael/p03_lambda/m05_filtern.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
celsius_temperaturen = [0.7, 2.1, 4.2, 8.2, 12.5, 15.6, 16.9, 16.3, 13.6, 9.5, 4.6, 2.3] # Durchschnittstemperaturen in Bielefeld nach Monat in °C def mindestens15(temperatur): return temperatur >= 15 # mindestens15 = lambda temperatur: temperatur >= 15 def zwischen5und10(temperatur): return 5 <= tem...
42.214286
147
0.724196
a6ea5a3a41b1f58d12e7a1e39e347e681707bc30
260
py
Python
src/onegov/activity/collections/publication_request.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/activity/collections/publication_request.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/activity/collections/publication_request.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.activity.models.publication_request import PublicationRequest from onegov.core.collection import GenericCollection class PublicationRequestCollection(GenericCollection): @property def model_class(self): return PublicationRequest
26
73
0.823077
755db91d6624b776ade8dd44b1821bf6768c2c34
362
py
Python
apps/views/posts.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
apps/views/posts.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
apps/views/posts.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from flask import Blueprint,jsonify from flask_login import current_user #实例化蓝本对象 posts = Blueprint('posts',__name__) @posts.route('/collect/<int:pid>/') def collect(pid): if current_user.is_favorite(pid): #取消收藏 current_user.del_favorite(pid) else: #添加收藏 current_user.add_favorit...
25.857143
38
0.687845
1b070427655cf32632c34a29768062df3260a1d5
2,847
py
Python
src/python3_learn_video/OOA_OOD_OOP.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/OOA_OOD_OOP.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/OOA_OOD_OOP.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
""" OOP:面向对象编程 OOA:面向对象分析 OOD:面向对象设计 self 是什么??????????????????????? Python 的 self 相当于 C++ 的 this 指针 """ class Ball: def setName(self, name): self.name = name def kick(self): print('我叫%s,谁踢我...' % self.name) print('--------------------------------------') a = Ball() a.setName('球A') b ...
15.143617
57
0.471725
1b0dae7232391eba2fefcb2c36fca10f65f3c375
138
py
Python
src/gvz/apps.py
Integreat/gemeindeverzeichnis-django
0089b97ea02b4741263c37357260c497b66a306d
[ "Apache-2.0" ]
7
2021-04-24T19:11:15.000Z
2021-10-30T12:59:16.000Z
src/gvz/apps.py
Integreat/gemeindeverzeichnis-django
0089b97ea02b4741263c37357260c497b66a306d
[ "Apache-2.0" ]
10
2021-04-25T10:25:12.000Z
2021-04-26T17:55:20.000Z
src/gvz/apps.py
Integreat/gemeindeverzeichnis-django
0089b97ea02b4741263c37357260c497b66a306d
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class GvzConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'gvz'
19.714286
56
0.746377
9422711f248ad773cfacdce80273ded60beca229
642
py
Python
Tutorials/10 Days of Statistics/Day 4/binomial_distribution2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Tutorials/10 Days of Statistics/Day 4/binomial_distribution2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Tutorials/10 Days of Statistics/Day 4/binomial_distribution2.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/bin/python3 import sys from math import factorial as fac def binomial(x, y): try: return fac(x) // fac(y) // fac(x - y) except ValueError: return 0 def bin_dist(n, k, p, q): return binomial(n, k) * p**k * q**(n-k) def f(n, k, p, q): mass = 0 for i in range(k+1): mass +...
17.351351
58
0.517134
84cd4b8980b0e9895b93b0bc7e1348a1c11058f7
993
py
Python
analysis/scripts/project_functions.py
data301-2020-winter2/course-project-group_1049
7808342d9bb60822f0daf65a2a37a0b61b597045
[ "MIT" ]
null
null
null
analysis/scripts/project_functions.py
data301-2020-winter2/course-project-group_1049
7808342d9bb60822f0daf65a2a37a0b61b597045
[ "MIT" ]
2
2021-03-12T05:07:28.000Z
2021-03-29T21:33:11.000Z
analysis/scripts/project_functions.py
data301-2020-winter2/course-project-group_1049
7808342d9bb60822f0daf65a2a37a0b61b597045
[ "MIT" ]
1
2021-03-11T21:21:21.000Z
2021-03-11T21:21:21.000Z
import pandas as pd def load_and_process(url): df=( pd.read_csv(url) .drop(['id', 'created_at', 'last_move_at', 'increment_code', 'opening_eco', 'opening_ply'],axis=1) .sort_values(by=['rated', 'white_id', 'black_id'], ascending=True) .reset_index(drop=True) ) for ind, ...
29.205882
106
0.551863
b6bb148690a0a7bcfb8b6f9cacbaa0f93d976b3e
1,209
py
Python
dash/migrations/0002_dossier.py
bdioui/DashboardFeder
455737c828f1c04651af495f60d6637131b911f5
[ "MIT" ]
null
null
null
dash/migrations/0002_dossier.py
bdioui/DashboardFeder
455737c828f1c04651af495f60d6637131b911f5
[ "MIT" ]
null
null
null
dash/migrations/0002_dossier.py
bdioui/DashboardFeder
455737c828f1c04651af495f60d6637131b911f5
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-25 15:33 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('dash', '0001_initial'), ...
36.636364
118
0.587262
6d4145161b3de4e6d732b6f4f1a3ff7846b817b1
271
py
Python
stiefo/__init__.py
effjot/stiefogen
da149f22912fa3b31fc2660ff01e4e0ca08d5efe
[ "MIT" ]
14
2015-04-30T08:50:53.000Z
2021-08-23T13:58:12.000Z
stiefo/__init__.py
effjot/stiefogen
da149f22912fa3b31fc2660ff01e4e0ca08d5efe
[ "MIT" ]
4
2020-08-28T20:45:47.000Z
2021-04-06T21:56:25.000Z
stiefo/__init__.py
effjot/stiefogen
da149f22912fa3b31fc2660ff01e4e0ca08d5efe
[ "MIT" ]
5
2015-05-01T06:40:40.000Z
2019-12-12T22:17:29.000Z
from stiefo.wordlist import wordlist from stiefo.parse import * # __all__ is set in module from stiefo.symbols import stiefoWortZuKurve, slant, isword from stiefo.render import render_screen, render_pdf from stiefo.stiefo_curves_interactive import Ui_stiefo_curves
45.166667
62
0.833948
1ec90cd4d3a1f70ca9cc2abf7310039ff7092481
184
py
Python
apps/mail/admin.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
1
2017-01-08T13:21:43.000Z
2017-01-08T13:21:43.000Z
apps/mail/admin.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
17
2018-12-03T14:22:14.000Z
2021-07-14T15:15:12.000Z
apps/mail/admin.py
LvanArkel/sbzwebsite
a26efbb050585312c53010f14f86c23616a8071f
[ "BSD-3-Clause" ]
2
2018-12-03T14:58:49.000Z
2019-12-01T13:24:42.000Z
from django.contrib import admin from apps.mail import models @admin.register(models.Group) class GroupAdmin(admin.ModelAdmin): list_display = ("name", "type", "outgoing_email")
23
53
0.76087
bf47616b3794f8f8ad63ec89456e89d1de3e511e
1,638
py
Python
RDS/circle3_central_services/token_storage/src/lib/Exceptions/StorageException.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
10
2020-06-24T08:22:24.000Z
2022-01-13T16:17:36.000Z
RDS/circle3_central_services/token_storage/src/lib/Exceptions/StorageException.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
78
2020-01-23T14:32:06.000Z
2022-03-07T14:11:16.000Z
RDS/circle3_central_services/token_storage/src/lib/Exceptions/StorageException.py
Sciebo-RDS/Sciebo-RDS
d71cf449ed045a2a7a049e2cb77c99fd5a9195bd
[ "MIT" ]
1
2020-06-24T08:33:48.000Z
2020-06-24T08:33:48.000Z
from RDS import User, Token, OAuth2Token, Service from ..Storage import Storage class UserExistsAlreadyError(Exception): def __init__(self, storage: Storage, user: User, msg=None): if msg is None: msg = f"{user} already exists in {storage}" super(UserExistsAlreadyError, self).__init__...
32.117647
77
0.655678
785b940ba085d87e09304a1157726e4966ca5657
2,678
py
Python
utils/models_names.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
utils/models_names.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
utils/models_names.py
kkahloots/Generative-Models-03
5399fb8a504543b0a4196a81b182ead79ee247df
[ "MIT" ]
null
null
null
from utils.codes import Models def get_model_name_AE(model, config): conv = 'Conv' if config.isConv else '' model_name = model + '_' \ + conv + '_' \ + config.dataset_name+ '_' \ + 'lat' + str(config.latent_dim) + '_' \ + 'h' + str(...
41.2
71
0.494025
78a26711c4d8fdf9b09f5f097348228bfa2fab82
581
py
Python
Contests/Single Source Shortest Path.py
MastaCoder/Projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
5
2018-10-11T01:55:40.000Z
2021-12-25T23:38:22.000Z
Contests/Single Source Shortest Path.py
MastaCoder/mini_projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
null
null
null
Contests/Single Source Shortest Path.py
MastaCoder/mini_projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
1
2019-02-22T14:42:50.000Z
2019-02-22T14:42:50.000Z
N, M = map(int, input().split()) graph = [[] for i in range(N + 1)] for i in range(M): u, v, w = map(int, input().split()) graph[u].append((v, w)) graph[v].append((u, w)) dist = [9999999999 for i in range(N + 1)] pq = {(0, 1)} dist[1] = 0 while len(pq) > 0: min_node = pq.pop()[1] for adj, weight...
23.24
47
0.519793
78afc59dd51a6da6e8a6a5c9feab4423eef9f567
156
py
Python
site/public/courses/CS-1.2/src/linked-list/main.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
1
2021-08-24T20:22:19.000Z
2021-08-24T20:22:19.000Z
site/public/courses/CS-1.2/src/linked-list/main.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
site/public/courses/CS-1.2/src/linked-list/main.py
KitsuneNoctus/makeschool
5eec1a18146abf70bb78b4ee3d301f6a43c9ede4
[ "MIT" ]
null
null
null
from LinkedList import LinkedList from Node import Node node1 = Node(1) my_linkedlist = LinkedList() my_linkedlist.head(node1) my_list = [3, 4, 54]
19.5
34
0.730769
1555dba3f234d4311345fbed656ae9298b0a138b
2,138
py
Python
.vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/text_synchronization.py
malbaker/dom_dotfiles
c452a9c8f86669f4f6289ddcd24e12690819991b
[ "MIT" ]
null
null
null
.vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/text_synchronization.py
malbaker/dom_dotfiles
c452a9c8f86669f4f6289ddcd24e12690819991b
[ "MIT" ]
null
null
null
.vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/jedilsp/pygls/lsp/types/text_synchronization.py
malbaker/dom_dotfiles
c452a9c8f86669f4f6289ddcd24e12690819991b
[ "MIT" ]
null
null
null
############################################################################ # Original work Copyright 2017 Palantir Technologies, Inc. # # Original work licensed under the MIT License. # # See ThirdPartyNotices.txt in the project root for license information. # # All modifi...
45.489362
79
0.570627
01f354bf8d6b7c0e1680ef1604996b92fd811407
1,115
py
Python
tarefas-poo/lista-02/processa-numeros/view/paineis/painel_no_intervalo.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-02/processa-numeros/view/paineis/painel_no_intervalo.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
tarefas-poo/lista-02/processa-numeros/view/paineis/painel_no_intervalo.py
victoriaduarte/POO_UFSC
0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a
[ "MIT" ]
null
null
null
# -------------------------- # UFSC - CTC - INE - INE5603 # Exercício Processa Números # -------------------------- # Classe responsável por encontrar os números no intervalo. from view.paineis.painel_abstrato import PainelAbstrato from model.processa_numeros import no_intervalo class PainelNoIntervalo(PainelAbstrato...
41.296296
126
0.620628
174623c1a484097b54a6a09d96c4b36127fe5044
501
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_assessment_plan.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_assessment_plan.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v10_0/update_assessment_plan.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc('education', 'doctype', 'assessment_plan') frappe.db.sql(""" UPDATE `tabAssessment Plan` as ap INNER JOIN `tabStudent Gr...
29.470588
67
0.742515
1780e4fec4f50fa4fa5190b05a176dacca2c7770
5,990
py
Python
Classes/Screen_codes/Ranking_screen.py
EKaczmarek/BomberMan
a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d
[ "MIT" ]
1
2018-04-30T15:46:47.000Z
2018-04-30T15:46:47.000Z
Classes/Screen_codes/Ranking_screen.py
EKaczmarek/BomberMan
a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d
[ "MIT" ]
1
2018-06-03T13:20:19.000Z
2018-06-03T20:19:25.000Z
Classes/Screen_codes/Ranking_screen.py
EKaczmarek/BomberMan
a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d
[ "MIT" ]
1
2018-06-03T12:59:11.000Z
2018-06-03T12:59:11.000Z
from PyQt5.QtWidgets import QDialog, QTableWidgetItem from PyQt5.QtCore import pyqtSlot from PyQt5.QtCore import Qt from PyQt5 import uic from pymongo import MongoClient from functools import reduce import requests import json from PyQt5 import QtCore qtCreatorFile = "Classes/GUI/ranking.ui" Ui_Dialog, QtBaseClass = ...
41.027397
727
0.583306
bd65cd9d3ee9d9a0dcff207c15c04711cd5c5e27
2,304
py
Python
research/cv/simple_baselines/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/simple_baselines/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/simple_baselines/export.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
43.471698
113
0.722222
bdc80cbdd7b15e536bb8a797dc15229fedd67548
526
py
Python
___Python/Torsten/Python-Kurs/p20_uebungen/m02_Pi-Annaeherung.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Torsten/Python-Kurs/p20_uebungen/m02_Pi-Annaeherung.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Torsten/Python-Kurs/p20_uebungen/m02_Pi-Annaeherung.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
import random from math import sqrt # Ansatz 1: r = random.Random() n = 1000000 innerhalb = 0 for i in range(n): (x, y) = (r.uniform(-1, 1), r.uniform(-1, 1)) radius = sqrt(x**2 + y**2) if radius <= 1: innerhalb += 1 print(4 * innerhalb / n) # Ansatz 2: def p1(x): ...
13.842105
50
0.486692
da8f12f13c55c270600ef76078dbdae97d69d39e
1,346
py
Python
Python/Exercícios_Python/046_pedra,_papel_e_tesoura.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/046_pedra,_papel_e_tesoura.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/046_pedra,_papel_e_tesoura.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """046 - Pedra, Papel e Tesoura Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1KlK3svod1CFOdbWw7tWtXlar-nnhIkmX """ from random import choice, randint, shuffle from time import sleep print('{:=^40}'.format( ' JO KEN PO ')) pr...
26.92
88
0.618871
006945e1aa98b31f36bef8f6a3c52aeb5a784988
4,669
py
Python
frappe-bench/apps/erpnext/erpnext/stock/doctype/warehouse/test_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/stock/doctype/warehouse/test_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/stock/doctype/warehouse/test_warehouse.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals from frappe.model.rename_doc import rename_doc from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry from frappe.utils import ...
43.231481
103
0.745342
c178182a7963dd86a7752ea89a892058fb91d2cc
559
py
Python
BIZa/2014/Tskipu_a_k/task_5_28.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BIZa/2014/Tskipu_a_k/task_5_28.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BIZa/2014/Tskipu_a_k/task_5_28.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 5. Вариант 28. # Напишите программу, которая при запуске случайным образом отображала имя одного из четырех основателей группы The Beatles." # Цкипуришвили Александр # 25.05.2016 print ("Программа, которая при запуске случайным образом отображает имя одного из четырех основателей группы The Beatles.") import...
29.421053
125
0.708408
a9c16f3217422db08cfa21f58ec496f383f9d098
1,078
py
Python
src/onegov/activity/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/activity/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/activity/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import logging log = logging.getLogger('onegov.activity') # noqa log.addHandler(logging.NullHandler()) # noqa from onegov.activity.models import ( Activity, Attendee, Booking, Invoice, InvoiceItem, InvoiceReference, Occasion, OccasionDate, OccasionNeed, Period, Publication...
19.6
50
0.678108
a9cf6be5027be92788256e2b3f28179ee33a26b1
360
py
Python
MoPulseGen/plot_interactivefigures.py
tushar-agarwal2909/MoPulseGen
a0edeaf67f956e7db27e70f07e47d2f992bcb6f3
[ "BSD-2-Clause" ]
null
null
null
MoPulseGen/plot_interactivefigures.py
tushar-agarwal2909/MoPulseGen
a0edeaf67f956e7db27e70f07e47d2f992bcb6f3
[ "BSD-2-Clause" ]
null
null
null
MoPulseGen/plot_interactivefigures.py
tushar-agarwal2909/MoPulseGen
a0edeaf67f956e7db27e70f07e47d2f992bcb6f3
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Jul 6 22:34:42 2020 @author: agarwal.270a """ import pickle #open the file and get the fig object list filepath='./figures/fig_REPv2.pickle' with open(filepath, 'rb') as file: fig_list=pickle.load(file) #show the figures. Maybe automatic in IDE like spyd...
21.176471
54
0.666667
a9f2b36a040bd4e1a348d56eef2d40f08853146f
1,741
py
Python
ML/tutorial.py
chfrank-cgn/FOM
72ada98bb287b00807911a070a390964b681f099
[ "CC-BY-4.0" ]
null
null
null
ML/tutorial.py
chfrank-cgn/FOM
72ada98bb287b00807911a070a390964b681f099
[ "CC-BY-4.0" ]
null
null
null
ML/tutorial.py
chfrank-cgn/FOM
72ada98bb287b00807911a070a390964b681f099
[ "CC-BY-4.0" ]
null
null
null
# # https://elitedatascience.com/python-machine-learning-tutorial-scikit-learn # http://mlr.cs.umass.edu/ml/machine-learning-databases/wine-quality/winequality-red.csv # # Import necessary modules import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn import preproces...
27.634921
138
0.770247
e751c78e94002a8d5c5b646e0c6fd56ee0b8f9ca
3,932
py
Python
tests/onegov/election_day/forms/test_data_source_forms.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/forms/test_data_source_forms.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/election_day/forms/test_data_source_forms.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from onegov.ballot import Election from onegov.ballot import Vote from onegov.election_day.forms import DataSourceForm from onegov.election_day.forms import DataSourceItemForm from onegov.election_day.models import DataSource from onegov.election_day.models import DataSourceItem from tests.one...
31.709677
78
0.670651
41c6c654cdb7ff609664dd4a74daa5511671f2d0
3,623
py
Python
commands/main.py
pgmikhael/MLExperiments
d3613a70e537ea5aaa0453ddaa76938c32637c49
[ "MIT" ]
null
null
null
commands/main.py
pgmikhael/MLExperiments
d3613a70e537ea5aaa0453ddaa76938c32637c49
[ "MIT" ]
null
null
null
commands/main.py
pgmikhael/MLExperiments
d3613a70e537ea5aaa0453ddaa76938c32637c49
[ "MIT" ]
null
null
null
from os.path import dirname, realpath, join import sys sys.path.append((dirname(dirname(realpath(__file__))))) from datasets.dataset_factory import get_dataset from models.model_factory import get_model, load_model, get_rolled_out_size from learning.learn import train_model, eval_model from helpers.command_methods impo...
36.969388
112
0.679271
5ceaf2467094f326e9418117550499b2ec792c75
2,113
py
Python
src/bo4e/com/kostenblock.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/kostenblock.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/kostenblock.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Kostenblock and corresponding marshmallow schema for de-/serialization """ from typing import List, Optional import attr from marshmallow import fields from bo4e.com.betrag import Betrag, BetragSchema from bo4e.com.com import COM, COMSchema from bo4e.com.kostenposition import Kostenposition, Kostenpositi...
34.639344
177
0.725982
cf3a4969e52f6c48b54cb4a5e125fa5d8ecf096e
262
py
Python
021-C130-DataCleaning/main.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
2
2021-09-28T13:55:20.000Z
2021-11-15T10:08:49.000Z
021-C130-DataCleaning/main.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
null
null
null
021-C130-DataCleaning/main.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
1
2022-01-20T03:02:20.000Z
2022-01-20T03:02:20.000Z
import pandas df = pandas.read_csv("merged.csv") df = df.dropna() df = df.drop_duplicates() del df["luminosity"] del df["distance"] del df["mass"] del df["radius"] df.rename(columns={"distance_ly": "distance", }) df.to_csv("merged_cleaned.csv", index=False)
17.466667
48
0.698473
2b2086fccda9f758c80a0d72db3f8785bf9d66a0
3,446
py
Python
sinlov/toc.py
suencc/d3-playground
bebd2fe1bc43e2f0220d7b8db4a48fdc1054d987
[ "BSD-3-Clause" ]
null
null
null
sinlov/toc.py
suencc/d3-playground
bebd2fe1bc43e2f0220d7b8db4a48fdc1054d987
[ "BSD-3-Clause" ]
null
null
null
sinlov/toc.py
suencc/d3-playground
bebd2fe1bc43e2f0220d7b8db4a48fdc1054d987
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- ##################################################### # ghtoc : a markdown toc generator # Author : Kai Yuan <kent.yuan@gmail.com> # Fork : sinlov <sinlovgmppt@gmail.com> # Usage : toc.py <markdown file> # Date : 2015-12-31 # License : see https://github.com/sk14...
33.456311
118
0.602728
cf9042821200d1b0613930f33c0dfc943a0974ca
234
py
Python
quark_core_api/exceptions/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/exceptions/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/exceptions/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
from quark_core_api.exceptions.context_exceptions import * from quark_core_api.exceptions.storage_exceptions import * from quark_core_api.exceptions.context_exceptions import * from quark_core_api.exceptions.common_exceptions import *
58.5
58
0.884615
5cb779a742a63db0d9198fda7ab73859452fc91e
274
py
Python
loesungen/chapter07/kmeans-pp-sklearn.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
2
2021-09-20T06:16:41.000Z
2022-01-17T14:24:43.000Z
loesungen/chapter07/kmeans-pp-sklearn.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
loesungen/chapter07/kmeans-pp-sklearn.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
from sklearn.datasets import load_iris from sklearn.cluster import kmeans_plusplus import numpy as np X, y = load_iris(return_X_y=True) centers, indices = kmeans_plusplus(X, n_clusters = 3) print("Zentroide:") print(centers) print("Anzahl Exemplare pro Cluster:", indices)
27.4
53
0.791971
5cc42c9f31354c4c8ae9b37ee26e7af865576b98
513
py
Python
pacman-arch/test/pacman/tests/sync502.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/sync502.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/sync502.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Install a package from a sync db with fnmatch'ed NoExtract" sp = pmpkg("dummy") sp.files = ["bin/dummy", "usr/share/man/man8", "usr/share/man/man1/dummy.1"] self.addpkg2db("sync", sp) self.option["NoExtract"] = ["usr/share/man/*"] self.args = "-S %s" % sp.name self.addrul...
28.5
79
0.680312
8f927b20629a59d9c8899e9b4b9b9950b8915279
5,957
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/monitoring/test_pagerduty.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/monitoring/test_pagerduty.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/monitoring/test_pagerduty.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
from ansible_collections.community.general.tests.unit.compat import unittest from ansible_collections.community.general.plugins.modules.monitoring import pagerduty import json class PagerDutyTest(unittest.TestCase): def setUp(self): self.pd = pagerduty.PagerDutyRequest(module=pagerduty, name='name', user...
48.040323
157
0.699513
7114bd9f15d76c43e0b97038656c35a720e6cffb
838
py
Python
DesignPatterns/CreationalPattern/Singleton/singleton_p.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
DesignPatterns/CreationalPattern/Singleton/singleton_p.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
DesignPatterns/CreationalPattern/Singleton/singleton_p.py
BALAVIGNESHDOSTRIX/pyexpert
300498f66a3a4f6b3060d51b3d6643d8e63cf746
[ "CC0-1.0" ]
null
null
null
#################################### # Author: "BALAVIGNESH" # # Maintainer: "BALAVIGNESH" # # License: "CC0 1.0 Universal" # # Date: "25/04/2021" # #################################### ''' Creating the one instance for class is called singleton pattern ''' class MetaClass(typ...
22.052632
71
0.5358
a4773cef73a6250bb4e3a3b5882ea839abdc9648
1,159
py
Python
Packs/Accessdata/Scripts/AccessdataCheckProcessExistsInSnapshot/AccessdataCheckProcessExistsInSnapshot.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Accessdata/Scripts/AccessdataCheckProcessExistsInSnapshot/AccessdataCheckProcessExistsInSnapshot.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Accessdata/Scripts/AccessdataCheckProcessExistsInSnapshot/AccessdataCheckProcessExistsInSnapshot.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 * # Constant and mandatory arguments args = demisto.args() process_name = args['process'] file_path = args['filepath'] proc = { 'Name': process_name, 'Exists': "No" } error = None try: res = demisto.execute...
28.268293
90
0.671268
a49b2f27df19545f6ca5e76d564df76d49d7e429
11,150
py
Python
src/onegov/feriennet/collections/billing.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/collections/billing.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/feriennet/collections/billing.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from collections import OrderedDict from decimal import Decimal from itertools import groupby from onegov.activity import Activity, Attendee, Booking, Occasion from onegov.activity import BookingCollection from onegov.activity import Invoice, InvoiceItem, InvoiceReference from onegov.activity import InvoiceCollection f...
31.320225
79
0.593184
74b2642fc1766fde338bf811a6c56a54067fd3d6
34
py
Python
lib/python3.5/shutil.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
1
2020-08-16T04:04:23.000Z
2020-08-16T04:04:23.000Z
lib/python3.5/shutil.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
5
2020-06-05T18:53:24.000Z
2021-12-13T19:49:15.000Z
lib/python3.5/shutil.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
/usr/local/lib/python3.5/shutil.py
34
34
0.794118
7413c3b42071e4770ff7695c6858b42c02c5269a
2,447
py
Python
NahamCon/2021/web/AgentTester/app/app.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
NahamCon/2021/web/AgentTester/app/app.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
NahamCon/2021/web/AgentTester/app/app.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
from flask_uwsgi_websocket import GeventWebSocket import re import subprocess from backend.backend import * ws = GeventWebSocket(app) @app.route("/", methods=["GET"]) @login_required def home(): success = request.args.get("success", None) error = request.args.get("error", None) return re...
26.031915
85
0.539027
77aec5626ffc2391b2f5154bc3a7614a5b2666c9
1,914
py
Python
torch/utils/data/communication/eventloop.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
183
2018-04-06T21:10:36.000Z
2022-03-30T15:05:24.000Z
torch/utils/data/communication/eventloop.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
631
2018-06-05T16:59:11.000Z
2022-03-31T16:26:57.000Z
torch/utils/data/communication/eventloop.py
vuanvin/pytorch
9267fd8d7395074001ad7cf2a8f28082dbff6b0b
[ "Intel" ]
58
2018-06-05T16:40:18.000Z
2022-03-16T15:37:29.000Z
import torch import threading import pickle from torch.utils.data import IterDataPipe, communication, MapDataPipe def DataPipeToQueuesLoop(source_datapipe, req_queue, res_queue): if isinstance(source_datapipe, IterDataPipe): pipe_type = communication.iter protocol_type = communication.protocol.It...
39.875
114
0.738767
70285e77f0184c37080240c4b974e75a9ad8c470
17,250
py
Python
filesystem.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
1
2015-08-02T09:53:18.000Z
2015-08-02T09:53:18.000Z
filesystem.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
null
null
null
filesystem.py
lihuiba/SoftSAN
1b8ab2cae92b7aac34211909b27d4ebe595275d7
[ "Apache-2.0" ]
2
2018-03-21T04:59:50.000Z
2019-12-03T15:54:17.000Z
import os, os.path, shutil, logging import time, datetime, zipfile import catcher def overrides(interface_class): def overrider(method): assert(method.__name__ in dir(interface_class)) return method return overrider #TODO: GC, restore and history view class FileSystem: """an abstract base ...
32.424812
95
0.562087
706563cbd7d071ab5a506cc45cddd2ececafcd1d
7,667
py
Python
yolov5-coreml-tflite-converter/inference-python/test_utils/comparison_test.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/inference-python/test_utils/comparison_test.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/inference-python/test_utils/comparison_test.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
import argparse import logging from pathlib import Path import cv2 import numpy as np import torch from constants import RED, END_COLOR, BLUE, DEFAULT_DETECTED_IMAGE_DIR, PURPLE, BOLD, GREEN from coordinates import pt_yxyx2xyxy from detect import Detector, get_counter_detections from python_utils.plots import plot_bo...
47.32716
176
0.635451
3b1a852a3d056cd90a8611365cc3dcc409b4dda0
654
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex10_max_change_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex10_max_change_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch02_math/ex10_max_change_test.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden import pytest ## PYTEST from ch02_math.solutions.ex10_max_change import calc_max_possible_change @pytest.mark.parametrize("coins, max_change", [([1], 1), ([1, 1], 2), ...
31.142857
72
0.484709
3b736013fb7773823615df0e89d94af946416910
1,045
py
Python
Project Euler Questions 1 - 10/Project Euler Question 6.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
1
2020-02-11T02:03:02.000Z
2020-02-11T02:03:02.000Z
Project Euler Questions 1 - 10/Project Euler Question 6.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
Project Euler Questions 1 - 10/Project Euler Question 6.py
Clayton-Threm/Coding-Practice
6671e8a15f9e797338caa617dae45093f4157bc1
[ "MIT" ]
null
null
null
#Project Euler Question 6 #The sum of the squares of the first ten natural numbers is, #1^2+2^2+...+10^2=385 #The square of the sum of the first ten natural numbers is, #(1+2+...+10)^2=55^2=3025 #Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025−38...
36.034483
129
0.734928
8ee8002f0522725ece88bbc7fb7a1846faa35fde
4,904
py
Python
core/orm.py
littlecharacter/AutoWork
feebb8459f889b7a9165073be8fd44ba544cbb35
[ "Apache-2.0" ]
null
null
null
core/orm.py
littlecharacter/AutoWork
feebb8459f889b7a9165073be8fd44ba544cbb35
[ "Apache-2.0" ]
null
null
null
core/orm.py
littlecharacter/AutoWork
feebb8459f889b7a9165073be8fd44ba544cbb35
[ "Apache-2.0" ]
null
null
null
import os import json from peewee import * import datetime from enum import Enum, unique DB_PATH = '../db/' FLOW_FILENAME = '../db/work_flow.json' MONITOR_FILENAME = '../db/work_monitor.json' def getDatabase(): if not os.path.exists(DB_PATH): os.makedirs(DB_PATH) return SqliteDatabase(f"{DB_PATH}/au...
22.703704
117
0.680261
d978e7411cd1aa9ed0d9d7219699cbb194757a43
298
py
Python
SWH2P/swh2p/run.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
4
2017-06-20T19:56:22.000Z
2021-05-29T10:07:47.000Z
SWH2P/swh2p/run.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
11
2017-05-31T19:14:32.000Z
2018-09-12T23:44:11.000Z
SWH2P/swh2p/run.py
swharden/ROI-Analysis-Pipeline
e83d96c43fdd50cb44be365289e964576492617e
[ "MIT" ]
2
2017-06-20T17:14:38.000Z
2017-06-20T19:51:34.000Z
import os import sys sys.path.append(os.path.abspath('../')) import swh2p if __name__=="__main__": # swh2p.index_tseries_all(R'X:\Data\2P01\2016\2017-01-11 PVN astrocyte') swh2p.index_tseries_single(R"X:\Data\2P01\2016\2017-01-11 PVN astrocyte\TSeries-01272017-1255-1217") print("DONE")
33.111111
104
0.734899
79652a60f633265072c619d3c561df614fde9f8c
5,839
py
Python
tests/test_reader.py
noirbizarre/pelican-myst
c2c7b44803ebc33e70d915c35b692df14597469b
[ "MIT" ]
null
null
null
tests/test_reader.py
noirbizarre/pelican-myst
c2c7b44803ebc33e70d915c35b692df14597469b
[ "MIT" ]
21
2021-12-21T16:47:35.000Z
2022-03-29T04:34:59.000Z
tests/test_reader.py
noirbizarre/pelican-myst
c2c7b44803ebc33e70d915c35b692df14597469b
[ "MIT" ]
null
null
null
from pyquery import PyQuery as pq from pelican.plugins.myst.signals import myst_yaml_register from pelican.utils import SafeDatetime from .helpers import assert_dict_contains, read_content_metadata, read_file def test_read_markdown_and_metadata(): page = read_file("page.md") assert page assert page.titl...
28.482927
93
0.62014
a517c18bdf2a25f9e576ab6c6e15d51bcc76fc97
142
py
Python
Utils/ErrorHandler.py
Drageast/Die_Botin
b574166a37c0f92c34db99931c8c894390fbead9
[ "BSD-3-Clause" ]
null
null
null
Utils/ErrorHandler.py
Drageast/Die_Botin
b574166a37c0f92c34db99931c8c894390fbead9
[ "BSD-3-Clause" ]
null
null
null
Utils/ErrorHandler.py
Drageast/Die_Botin
b574166a37c0f92c34db99931c8c894390fbead9
[ "BSD-3-Clause" ]
null
null
null
class DatabasePreconditioning(Exception): def __init__(self, error): self.error = error class ParsingError(Exception): pass
17.75
41
0.711268
ebbd17d8a2a889366bad11426c042bd880b4b157
32
py
Python
lib/python3.5/copy.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
1
2020-08-16T04:04:23.000Z
2020-08-16T04:04:23.000Z
lib/python3.5/copy.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
5
2020-06-05T18:53:24.000Z
2021-12-13T19:49:15.000Z
lib/python3.5/copy.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
/usr/local/lib/python3.5/copy.py
32
32
0.78125
694645ca918177714fb24a9f64241c4e89e05719
530
py
Python
Packs/CommonScripts/Scripts/IPNetwork/IPNetwork_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/IPNetwork/IPNetwork_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/IPNetwork/IPNetwork_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest import json # About the drop some mean regex right now disable-secrets-detection-start @pytest.mark.parametrize(argnames="cidr, expected_ec", argvalues=[('192.168.0.0/24', 'ipv4_cidr.json'), ('2002::1234:abcd:ffff:c0a8:101/127', 'ipv6_cidr.jso...
40.769231
93
0.664151
03021de13f043b61af25746c38c5d7e60f4549ea
741
py
Python
home-assistant/custom_components/uilogs/__init__.py
Adamvg/SmartHouse
740b010260f6f6b38a19e2a75d431446abd54253
[ "MIT" ]
94
2019-10-13T06:54:00.000Z
2022-02-01T22:30:01.000Z
home-assistant/custom_components/uilogs/__init__.py
Venkysgithu/SmartHouse
d4e42dbbbb1f535f1684d507de411a4421b92e4d
[ "MIT" ]
28
2019-12-22T10:33:13.000Z
2020-08-09T04:46:46.000Z
custom_components/uilogs/__init__.py
elsingaa/Home-Assistant-Config
d20a2dabf5deeef8f087fa6d34a371617da9c4cd
[ "MIT" ]
17
2019-10-14T12:00:10.000Z
2021-07-01T17:57:42.000Z
"""Custom panel for UI Logs""" async def async_setup(hass, config): """Set up this integration using yaml.""" url = "/api/panel_custom/uilogs" location = hass.config.path("custom_components/uilogs/uilogs.js.gz") hass.http.register_static_path(url, location) hass.components.frontend.async_register_...
29.64
72
0.580297
035fd262974c335f69b527d5f91557f4025b128e
4,354
py
Python
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_10_Definition_eigener_Klassen/06_Klassenvererbung_und_Erweiterung.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_10_Definition_eigener_Klassen/06_Klassenvererbung_und_Erweiterung.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_10_Definition_eigener_Klassen/06_Klassenvererbung_und_Erweiterung.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # #### # File: 06_Klassenvererbung_und_Erweiterung.py # Project: Kapitel_10_Definition_eigener_Klassen #----- # Created Date: Wednesday 07.10.2020, 14:04 # Author: Apop85 #----- # Last Modified: Wednesday 07.10.2020, 14:04 #----- # Copyright (c) 2020 Apop85 # This softwar...
31.1
133
0.627699
88c47791870812c1d96fa4149fde81a5de60ffdb
553
py
Python
frappe-bench/apps/erpnext/erpnext/config/erpnext_integrations.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/config/erpnext_integrations.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/config/erpnext_integrations.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Payments"), "icon": "fa fa-star", "items": [ { "type": "doctype", "name": "GoCardless Settings", "description": _("GoCardless payment gateway settings"), }, { "type": "doctype...
17.28125
61
0.535262
00262238e27872823f92708c2acbf54e72d60ef2
144
py
Python
tasks/admin.py
abernten/website
89167c5b1914953ac67def01b9ec0c169c50658f
[ "MIT" ]
3
2020-03-21T22:32:56.000Z
2020-03-28T23:06:38.000Z
tasks/admin.py
abernten/website
89167c5b1914953ac67def01b9ec0c169c50658f
[ "MIT" ]
null
null
null
tasks/admin.py
abernten/website
89167c5b1914953ac67def01b9ec0c169c50658f
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Category, Task, TaskOffer admin.site.register([ Category, Task, TaskOffer ])
14.4
45
0.715278
cc8e39789eac204c6845dec485bf9bc03d417d1b
634
py
Python
Backend/migrations/alembic/versions/00a7bf4dae6c_create_germany_materialized_view.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
15
2020-04-24T20:18:11.000Z
2022-01-31T21:05:05.000Z
Backend/migrations/alembic/versions/00a7bf4dae6c_create_germany_materialized_view.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
2
2021-05-19T07:15:09.000Z
2022-03-07T08:29:34.000Z
Backend/migrations/alembic/versions/00a7bf4dae6c_create_germany_materialized_view.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
4
2020-04-27T16:20:13.000Z
2021-02-23T10:39:42.000Z
"""create germany materialized view Revision ID: 00a7bf4dae6c Revises: 8175af65a5b9 Create Date: 2020-11-26 14:37:50.902921 """ from alembic import op # revision identifiers, used by Alembic. revision = '00a7bf4dae6c' down_revision = '8175af65a5b9' branch_labels = None depends_on = None def upgrade(): op.get_b...
20.451613
44
0.667192
ccb55710b48e4f8f43fa3b8a52a464325e1b1ae6
424
py
Python
Contests/Prime Listing.py
MastaCoder/Projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
5
2018-10-11T01:55:40.000Z
2021-12-25T23:38:22.000Z
Contests/Prime Listing.py
MastaCoder/mini_projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
null
null
null
Contests/Prime Listing.py
MastaCoder/mini_projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
1
2019-02-22T14:42:50.000Z
2019-02-22T14:42:50.000Z
import math def isnumprime(n): if n == 2: return True if n % 2 == 0 or n <= 1: return False sqr = int(math.sqrt(n)) + 1 for divisor in range(3, sqr, 2): if n % divisor == 0: return False return True number = int(input()) print("All primes for", number, "are...
16.96
39
0.497642
ae1c534e9e0719e41ca2c98b5efa2429fef1d69b
569
py
Python
exercises/pt/solution_03_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/pt/solution_03_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/pt/solution_03_10_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
from spacy.lang.en import English from spacy.tokens import Doc nlp = English() # Definir a função para o atributo getter def get_has_number(doc): # Retornar verdadeiro (True) se algum token do doc for número (token.like_num) return any(token.like_num for token in doc) # Definir a propriedade extendida "has_...
31.611111
82
0.771529
c9935341d737e097aad0f3d0421e5360eab6b7bf
3,762
py
Python
sandbox/ffwd_least_squares.py
tliu68/maggot_connectome
ef4bbd2011fa9e03da187fcca8c8c1ca79209a36
[ "MIT" ]
1
2021-01-20T00:37:31.000Z
2021-01-20T00:37:31.000Z
sandbox/ffwd_least_squares.py
tliu68/maggot_connectome
ef4bbd2011fa9e03da187fcca8c8c1ca79209a36
[ "MIT" ]
17
2021-03-03T14:48:54.000Z
2021-09-08T15:52:50.000Z
sandbox/ffwd_least_squares.py
tliu68/maggot_connectome
ef4bbd2011fa9e03da187fcca8c8c1ca79209a36
[ "MIT" ]
2
2021-03-05T12:23:20.000Z
2021-03-29T11:49:53.000Z
#%% [markdown] from pkg.utils import set_warnings import datetime import time import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from tqdm import tqdm from joblib import Parallel, delayed from graspologic.models import DCEREstimator, EREstimator from graspologic.plot import ...
21.872093
88
0.704147
eea53652c87e846b28db350a409626cf835c826d
252
py
Python
Problems/Stack/Easy/MaxNestDepthParentheses/max_nest_depth_parentheses.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Stack/Easy/MaxNestDepthParentheses/max_nest_depth_parentheses.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Stack/Easy/MaxNestDepthParentheses/max_nest_depth_parentheses.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
def maxDepth(s: str) -> int: max_depth, count_depth = 0, 0 for i in s: if i == "(": count_depth += 1 max_depth = max(count_depth, max_depth) if i == ")": count_depth -= 1 return max_depth
25.2
51
0.492063
eea82a978af6bd5d9f46b2909946f197d7bff4d2
6,260
py
Python
hihope_neptune-oh_hid/00_src/v0.1/test/developertest/src/core/build/build_manager.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.1/test/developertest/src/core/build/build_manager.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.1/test/developertest/src/core/build/build_manager.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding=utf-8 # # Copyright (c) 2020 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 # # Unle...
38.170732
78
0.546645
018809a6708a20cde2fcbd91f5de3b35200f57d0
1,046
py
Python
tests/shared/scenario.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/shared/scenario.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/shared/scenario.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from contextlib import contextmanager import transaction class BaseScenario(object): def __init__(self, session, test_password): self.session = session self.test_password = test_password def __getattribute__(self, name): if name.startswith('add_') and not transaction.manager.manager...
22.73913
76
0.616635
099b36c61e0b92374ea409e81a219271e181b9a7
113
py
Python
projects/BBB-Adafruit/adafruit.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
projects/BBB-Adafruit/adafruit.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
projects/BBB-Adafruit/adafruit.py
DockerComposeFiles/ARM
b0faddb525ad134ff8c589c370d8e61ab030c216
[ "MIT" ]
null
null
null
import Adafruit_BBIO.GPIO as GPIO GPIO.setup("P8_10", GPIO.OUT) GPIO.output("P8_10", GPIO.HIGH) GPIO.cleanup()
16.142857
33
0.743363
09a38242a8cd1f23fa6f0a4b72608e84a8ba67a2
570
py
Python
src/bo4e/enum/preisgarantietyp.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/enum/preisgarantietyp.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/enum/preisgarantietyp.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
# pylint: disable=missing-module-docstring from bo4e.enum.strenum import StrEnum class Preisgarantietyp(StrEnum): """ Aufzählung der Möglichkeiten für die Vergabe von Preisgarantien """ ALLE_PREISBESTANDTEILE_BRUTTO = "ALLE_PREISBESTANDTEILE_BRUTTO" #: ALLE_PREISBESTANDTEILE_BRUTTO ALLE_PREISBES...
40.714286
104
0.807018
09d69257fcc15ce6be9b655cc63dfcd899a44388
2,578
py
Python
code/snake/TrainingData.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
1
2020-03-30T09:25:53.000Z
2020-03-30T09:25:53.000Z
code/snake/TrainingData.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
2
2020-02-05T14:00:23.000Z
2020-03-30T19:57:19.000Z
code/snake/TrainingData.py
BogyMitutoyoCTL/AI-Preparation
ef535741816b02e5e63d426a3232a688c9abd726
[ "MIT" ]
null
null
null
import sys from datetime import datetime class TrainingData: def __init__(self, verbose=True): self.best_score: int = 0 self.worst_score: int = sys.maxsize self.epoch: int = 0 self.max_epochs: int = 0 self.max_number_of_steps: int = 0 self.number_of_steps_walked: in...
39.661538
120
0.640807
11042721760240822164004891fbca01dc426099
8,391
py
Python
src/onegov/gazette/views/issues.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gazette/views/issues.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/gazette/views/issues.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import date from datetime import datetime from io import BytesIO from morepath import redirect from morepath.request import Response from onegov.core.security import Private from onegov.gazette import _ from onegov.gazette import GazetteApp from onegov.gazette.collections import IssueCollection from onego...
26.980707
79
0.607556
fed4c7ddf59d35ed6d0803d70dc2db5e7698b7bc
2,969
py
Python
pyScript/custom_src/DrawingObject.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
pyScript/custom_src/DrawingObject.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
pyScript/custom_src/DrawingObject.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
null
null
null
from PySide2.QtWidgets import QGraphicsItem from PySide2.QtGui import QPen, QPainter from PySide2.QtCore import Qt, QRectF, QPointF, QLineF from custom_src.GlobalAccess import GlobalStorage class DrawingObject(QGraphicsItem): def __init__(self, config=None): super(DrawingObject, self).__init__() ...
30.608247
106
0.532503
fed93e337a430ab738eba771420bccc850f2bb58
1,535
py
Python
packages/watchmen-data-kernel/src/watchmen_data_kernel/service/storage_helper.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/service/storage_helper.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-data-kernel/src/watchmen_data_kernel/service/storage_helper.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import Union from watchmen_auth import PrincipalService from watchmen_data_kernel.cache import CacheService from watchmen_data_kernel.common import DataKernelException from watchmen_data_kernel.meta import DataSourceService from watchmen_data_kernel.storage.topic_storage import build_topic_data_storage fro...
39.358974
106
0.835179
3a25b3f0a7a6fe596646cb5fa0a77715080739c6
327
py
Python
frappe-bench/apps/erpnext/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/agriculture/doctype/fertilizer/test_fertilizer.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestFertilizer(unittest.TestCase): def test_fertilizer_creation(self): self.assertEqual(frappe.db.exists('Fertilizer', 'Urea'), ...
29.727273
68
0.767584
3a64ddb692b5fd4b365fe93eb068568b9681a903
329
py
Python
lego/calculus/nodes/variable.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
lego/calculus/nodes/variable.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
lego/calculus/nodes/variable.py
tipptop3d/Horst-oder-Klaus
2afda1a64b5ccace74ebc7b806a5e5501c0f12bb
[ "MIT" ]
null
null
null
"""Variable node""" from . import node, number class Variable(node.Node): """Variable node. Represents x in an Expression""" def copy(self): return Variable() def evaluate(self, value): return value def diff(self): return number.Number(1) def to_infix(self): re...
16.45
54
0.601824
3a9ad75a304cd7a9cf2ada01a82caf021d76e715
1,474
py
Python
tf_idf/utils.py
ryuzakyl/tf_idf
48adffa994516df6b6321641915252e3bc2e2dfe
[ "MIT" ]
null
null
null
tf_idf/utils.py
ryuzakyl/tf_idf
48adffa994516df6b6321641915252e3bc2e2dfe
[ "MIT" ]
null
null
null
tf_idf/utils.py
ryuzakyl/tf_idf
48adffa994516df6b6321641915252e3bc2e2dfe
[ "MIT" ]
null
null
null
import pandas as pd def build_matrix(data, samples_labels, features_labels, extra_cols=None): """Builds a data set from raw data information. Args: data: The samples data (vector of features). samples_labels: The samples names or labels. features_labels: Labels for every feature in th...
34.27907
98
0.68114
3af43b1bb406d77024b4c7e15e21719d4c02d459
3,261
py
Python
research/nlp/senta/src/models/roberta_one_sent_classification_en.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/nlp/senta/src/models/roberta_one_sent_classification_en.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/nlp/senta/src/models/roberta_one_sent_classification_en.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...
37.056818
92
0.686906
aaec9dcfc2b23b6f7fc8517710465c096e9265b1
643
py
Python
geol/feature_extraction/base.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
8
2018-03-09T16:44:38.000Z
2021-04-07T11:33:30.000Z
geol/feature_extraction/base.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
4
2020-03-24T15:34:54.000Z
2021-06-01T21:54:33.000Z
geol/feature_extraction/base.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
1
2020-05-13T14:30:55.000Z
2020-05-13T14:30:55.000Z
""" File description """ # Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com> import six, abc from geol.utils import utils @six.add_metaclass(abc.ABCMeta) class FeatureGenerator: def __init__(self): self._features = None @abc.abstractmethod def generate(self): pass @property ...
20.741935
107
0.667185
c9835f6f41c2919d674046a29b4f64110300b6be
140
pyde
Python
sketches/kreis01/kreis01.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/kreis01/kreis01.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/kreis01/kreis01.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
def setup(): size(500, 500) def draw(): background(0) fill(255, 0, 0) # noStroke() ellipse(width/2, height/2, 450, 450)
17.5
40
0.564286
6e1d089d57ada86ec94ae9be86a61e788b648053
691
py
Python
bolt/utils/timer.py
ph7vc/CL4M-B0T
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
9
2019-02-17T06:33:14.000Z
2021-10-05T02:19:00.000Z
bolt/utils/timer.py
ns-phennessy/Bolt
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
28
2019-02-10T07:48:05.000Z
2021-12-20T00:15:37.000Z
bolt/utils/timer.py
ph7vc/CL4M-B0T
e992cf63b1215ea7c241cab94edc251653dbaed7
[ "MIT" ]
4
2015-03-13T03:58:55.000Z
2015-05-27T08:29:46.000Z
import time from datetime import timedelta class Timer(): def __init__(self, percision=3): self.percision = percision def __enter__(self): self.start = time.monotonic() self._delta = None return self def __exit__(self, *args): self._delta = timedelta...
27.64
81
0.622287
2828787ed220c13d7b27d00fc0120e1a794bf196
564
py
Python
Webpage/web/migrations/0005_auto_20210705_1948.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/web/migrations/0005_auto_20210705_1948.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/web/migrations/0005_auto_20210705_1948.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.4 on 2021-07-05 19:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('web', '0004_auto_20210616_1733'), ] operations = [ migrations.AlterField( model_name='sponsoren', name='logo', ...
23.5
59
0.585106
95ab133509a4da14f74f2348f6cf4a15dcf0947e
4,219
py
Python
src/network/conversations/block_download.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
2
2021-11-08T12:00:02.000Z
2021-11-12T18:37:52.000Z
src/network/conversations/block_download.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
null
null
null
src/network/conversations/block_download.py
TimmMoetz/blockchain-lab
02bb55cc201586dbdc8fdc252a32381f525e83ff
[ "RSA-MD" ]
1
2022-03-28T13:49:37.000Z
2022-03-28T13:49:37.000Z
from ..bo.messages.get_blocks import Get_blocks from ..bo.messages.blocks import Blocks import os import sys sys.path.append("..") from src.db.mapper import Mapper from src.blockchain.block import Block class Block_download(): def __init__(self, node) -> None: self.node = node # node that requests bl...
43.494845
100
0.655369
7c0a0886deef01269e2c7bd06bb0d0fa80cb2ee3
490
py
Python
Utils/py/WhistleDetector/filterWhistleEventsFromGamelog.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/WhistleDetector/filterWhistleEventsFromGamelog.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/WhistleDetector/filterWhistleEventsFromGamelog.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from naoth.LogReader import LogReader from naoth.LogReader import Parser def get_whistle_percept(frame): percept = None try: percept = frame["WhistlePercept"] except: pass if percept: return [frame.number, percept] else: return None if __name__ == "__main__": myParser = Parser() for ms...
21.304348
147
0.702041
c68a1804ec1983549088ca4f3ca65e443a037042
1,811
py
Python
pyScript/custom_src/FlowZoomWidget.py
Shirazbello/Pyscriptining
0f2c80a9bb10477d65966faeccc7783f20385c1b
[ "MIT" ]
18
2021-01-18T09:52:41.000Z
2022-03-22T10:48:44.000Z
Ryven/custom_src/FlowZoomWidget.py
xamofb-xsk/Ryven
8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1
[ "MIT" ]
null
null
null
Ryven/custom_src/FlowZoomWidget.py
xamofb-xsk/Ryven
8c3dcc613098863ae9fb747e62c0bb9d9eb4cef1
[ "MIT" ]
3
2021-01-18T09:49:42.000Z
2022-03-22T10:48:47.000Z
from PySide2.QtWidgets import QWidget, QPushButton, QHBoxLayout class FlowZoomWidget(QWidget): def __init__(self, flow): super(FlowZoomWidget, self).__init__() self.flow = flow self.zoom_in_button = QPushButton('+') self.zoom_in_button.clicked.connect(self.on_zoom_in_button_click...
30.183333
77
0.564329
05d91029c00c225507cc82f95d5978d08516816d
316
py
Python
Contests/ECOO '13 R1 P1 - Take a Number.py
MastaCoder/Projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
5
2018-10-11T01:55:40.000Z
2021-12-25T23:38:22.000Z
Contests/ECOO '13 R1 P1 - Take a Number.py
MastaCoder/mini_projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
null
null
null
Contests/ECOO '13 R1 P1 - Take a Number.py
MastaCoder/mini_projects
ebb0a3134522b12f052fec8d753005f384adf1b1
[ "MIT" ]
1
2019-02-22T14:42:50.000Z
2019-02-22T14:42:50.000Z
c = int(input()) s = 0 w = 0 while True: t = input() if t == "TAKE": if c == 999: c = 0 w += 1 c += 1 elif t == "SERVE": s += 1 w -= 1 elif t == "CLOSE": print(str(s + w), str(w), str(c)) w = 0 s = 0 else: break
15.8
41
0.322785
af0c00afc15a5c652a6a04b9e681108423df3ffb
750
py
Python
python/python_backup/PRAC_PYTHON/w1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/PRAC_PYTHON/w1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/PRAC_PYTHON/w1.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
"""PyAudio Example: Play a wave file.""" import pyaudio import wave import sys CHUNK = 1024 if len(sys.argv) < 2: print("Plays a wave file.\n\nUsage: %s filename.wav" % sys.argv[0]) sys.exit(-1) wf = wave.open(sys.argv[1], 'rb') # instantiate PyAudio (1) p = pyaudio.PyAudio() # open strea...
20.27027
72
0.605333
af7c0c7e773904ae0e33879ca3d3b88c75b65c4a
243
py
Python
exercises/zh/test_02_10_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/zh/test_02_10_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/zh/test_02_10_02.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( "token1.similarity(token2)" or "token2.similarity(token1)" in __solution__ ), "你有计算两个token之间的相似度吗?" assert ( 0 <= float(similarity) <= 1 ), "相似度分数是一个浮点数。你确定你计算正确了吗?" __msg__.good("厉害!")
27
82
0.609053
a570eda81e4815574b6b14c5bb1b054449355dfb
1,184
py
Python
iss-code/generate_sample.py
evandigby/iss-dsp
8cea6885f5752241695cc769f4946634193d09d0
[ "MIT" ]
null
null
null
iss-code/generate_sample.py
evandigby/iss-dsp
8cea6885f5752241695cc769f4946634193d09d0
[ "MIT" ]
null
null
null
iss-code/generate_sample.py
evandigby/iss-dsp
8cea6885f5752241695cc769f4946634193d09d0
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np start = pd.Timestamp.utcnow() end = start + pd.DateOffset(days=30) TOTAL_SAMPLES = 10000 t = pd.to_datetime(np.linspace(start.value, end.value, TOTAL_SAMPLES)) # build the DataFrame df = pd.DataFrame() df['ts_seed'] = t df['ts_seed'] = df.ts_seed.astype('datetime64[ms]') df['ts_...
40.827586
101
0.711149