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
f3efdfc65a5d3d78086690c14e5128e7a4bb1e42
391
py
Python
1636-sort-array-by-increasing-frequency/1636-sort-array-by-increasing-frequency.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
1636-sort-array-by-increasing-frequency/1636-sort-array-by-increasing-frequency.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
1636-sort-array-by-increasing-frequency/1636-sort-array-by-increasing-frequency.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def frequencySort(self, nums: List[int]) -> List[int]: numfreq=dict() for num in nums: if num not in numfreq: numfreq[num]=0 numfreq[num]+=1 snum = sorted(numfreq.items(), key=lambda x: (x[1], -x[0]), reverse=False) output=[] ...
32.583333
82
0.506394
b665ec64d7d3b7056ca68d464ab3fa8f0eb34700
482
py
Python
algorithms/gr-bfsrh/python3/breadth_first_search.py
NuclearCactus/FOSSALGO
eb66f3bdcd6c42c66e8fc7110a32ac021596ca66
[ "MIT" ]
59
2018-09-11T17:40:25.000Z
2022-03-03T14:40:39.000Z
algorithms/gr-bfsrh/python3/breadth_first_search.py
RitvikDayal/FOSSALGO
ae225a5fffbd78d0dff83fd7b178ba47bfd7a769
[ "MIT" ]
468
2018-08-28T17:04:29.000Z
2021-12-03T15:16:34.000Z
algorithms/gr-bfsrh/python3/breadth_first_search.py
RitvikDayal/FOSSALGO
ae225a5fffbd78d0dff83fd7b178ba47bfd7a769
[ "MIT" ]
253
2018-08-28T17:08:51.000Z
2021-11-01T12:30:39.000Z
def breadth_first_search(graph, node): if node not in graph: return queue = [node] visited = [node] while len(queue) > 0: node = queue.pop(0) print(node, end = " ") for neighbor in graph[node]: if neighbor not in visited: visited.append(neighbor) queue.append(neighbor) #ke...
17.851852
38
0.587137
fcb72a33107e911dae88224948f88d5f33b48cab
3,187
py
Python
0-notes/job-search/Cracking the Coding Interview/C07ObjectOrientedDesign/questions/7.2-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C07ObjectOrientedDesign/questions/7.2-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
0-notes/job-search/Cracking the Coding Interview/C07ObjectOrientedDesign/questions/7.2-question.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# 7.2 Call Center # Imagine you have a call center with 3 levels of employees: # respondent, manager, & director # An incoming telephone call must be first allocated to a respondent who is free. # If the respondent can't handle the call, he or she must escalate the call to a manager. # If the manager is not free o...
25.293651
145
0.629746
1ead344b1e185f59d61225824694a00c530b6e7b
359
py
Python
Kirk Byers - Python for Network Engineers/Lesson 1/Exercise 3.py
Caradawg/HBS
467b73c52bbba7b43f37a62e4302a4ff84ff0684
[ "MIT" ]
null
null
null
Kirk Byers - Python for Network Engineers/Lesson 1/Exercise 3.py
Caradawg/HBS
467b73c52bbba7b43f37a62e4302a4ff84ff0684
[ "MIT" ]
null
null
null
Kirk Byers - Python for Network Engineers/Lesson 1/Exercise 3.py
Caradawg/HBS
467b73c52bbba7b43f37a62e4302a4ff84ff0684
[ "MIT" ]
null
null
null
from __future__ import print_function ipv6_addr1 = "2001:db8:1234::1" IPV6_ADDR2 = "2001:db8:1234::1" ipV6_addR3 = "2001:db8:1234::1" print("-" * 60) print("") print("Is variable equal to variable 2: {}".format(ipv6_addr1 == IPV6_ADDR2)) print("Is variable not equal to variable 3: {}".format(ipv6_addr1 != IP...
29.916667
82
0.671309
1ee19c0f77dc72fa9777cba84acdb5fd2bd254ef
385
py
Python
Algorithms/Strings/making_anagrams.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/making_anagrams.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/making_anagrams.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 a = list(input().strip()) b = list(input().strip()) alpha = [0] * 26 ord_a = ord('a') for c in a: alpha[ord(c) - ord_a] += 1 for c in b: alpha[ord(c) - ord_a] -= 1 print(sum(map(abs, alpha))) ''' # Great answer from collections import Counter counts = Counter(input()) counts.subtr...
14.807692
47
0.602597
94e479d3fd1c5a31cf1f5b0f2ef80bfe715141bf
572
py
Python
challenges/metroCard/python3/metroCard.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
5
2020-05-21T03:02:34.000Z
2021-09-06T04:24:26.000Z
challenges/metroCard/python3/metroCard.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
6
2019-04-24T03:39:26.000Z
2019-05-03T02:10:59.000Z
challenges/metroCard/python3/metroCard.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
1
2021-09-06T04:24:27.000Z
2021-09-06T04:24:27.000Z
def metroCard(lastNumberOfDays): return [31] if lastNumberOfDays < 31 else [28, 30, 31] if __name__ == '__main__': input0 = [30, 31] expectedOutput = [[31], [28, 30, 31]] assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.format(len(input0), len(expectedOutput)) for i, expected in e...
52
123
0.690559
94f43da42684979cc7d43f63a37da09b66de79ce
207
py
Python
day17/quiz-game/question_model.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day17/quiz-game/question_model.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
day17/quiz-game/question_model.py
nurmatthias/100DaysOfCode
22002e4b31d13e6b52e6b9222d2e91c2070c5744
[ "Apache-2.0" ]
null
null
null
class Question: def __init__(self, q_text, q_answer): self.text = q_text self.answer = q_answer def __str__(self): return f"Question: text={self.text}; answer={self.answer}"
25.875
66
0.63285
a213ea3929b21996681c472138d2e3a1310b82ea
419
py
Python
DAFManager.py
VNCompany/PyDafm
9634f5428b9f3739dbf7c159daad34856b372165
[ "Unlicense" ]
null
null
null
DAFManager.py
VNCompany/PyDafm
9634f5428b9f3739dbf7c159daad34856b372165
[ "Unlicense" ]
null
null
null
DAFManager.py
VNCompany/PyDafm
9634f5428b9f3739dbf7c159daad34856b372165
[ "Unlicense" ]
null
null
null
import sys from PyQt5.QtWidgets import QApplication from auth import Authorization from register import Registration import os.path # Главное вхождение программы if __name__ == '__main__': app = QApplication(sys.argv) if not os.path.exists("startup"): main_form = Authorization() main_form.show...
23.277778
40
0.694511
1599386381cd3054cc623442d1d6900332932314
210
py
Python
exercises/python/data-types/basic/tuples.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/data-types/basic/tuples.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
exercises/python/data-types/basic/tuples.py
rogeriosantosf/hacker-rank-profile
d4b9c131524d138c415e5c5de4e38c6b8c35dd77
[ "MIT" ]
null
null
null
# Sample Input 0 # 2 # 1 2 # Sample Output 0 # 3713081631934410656 if __name__ == '__main__': n = int(input()) integer_list = map(int, input().split()) t = tuple(integer_list) print(hash(t))
15
44
0.619048
ecabc25c2772eef8871623eb8f1570e2d4321bf8
4,797
py
Python
bach_code/legacy/transform_rec.py
glasperfan/thesis
aead2dfb8052afbff4d05203a0be5b0b7ef69462
[ "Apache-2.0" ]
5
2015-12-08T21:47:41.000Z
2020-10-28T12:39:08.000Z
bach_code/legacy/transform_rec.py
glasperfan/thesis
aead2dfb8052afbff4d05203a0be5b0b7ef69462
[ "Apache-2.0" ]
null
null
null
bach_code/legacy/transform_rec.py
glasperfan/thesis
aead2dfb8052afbff4d05203a0be5b0b7ef69462
[ "Apache-2.0" ]
1
2020-10-28T12:39:09.000Z
2020-10-28T12:39:09.000Z
######### # ## File: transform_rec.py ## Author: Hugh Zabriskie (c) 2016 ## Description: Transform the chorale data into a format for training a recurrent neural network. ## Each chorale should be a fixed-size vector (the length of the longest chorale, with ## padding added for the others) where each element (ind...
34.021277
114
0.715447
1723a6a5783ee6c010d1cb7eb0d444e03bb44aef
2,093
py
Python
events.py
matthewmercuri/mdbacktestv2
2525113458cdf71e7d99ac208ad35aea92169b99
[ "MIT" ]
null
null
null
events.py
matthewmercuri/mdbacktestv2
2525113458cdf71e7d99ac208ad35aea92169b99
[ "MIT" ]
null
null
null
events.py
matthewmercuri/mdbacktestv2
2525113458cdf71e7d99ac208ad35aea92169b99
[ "MIT" ]
null
null
null
from data import Data import os import pandas as pd class Events(Data): def __init__(self): pass def _check_file_exists(self, ticker): if os.path.exists(f'stockdata/{ticker}.csv') is False: raise NameError(f'{ticker} does not have a file!') def _type_checker(self, tickers): ...
38.054545
80
0.604396
173a354344286d64b8f9daad0bd469472c9377df
544
py
Python
examples/python-lib/tests/conftest.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
17
2020-11-20T15:58:02.000Z
2022-02-06T19:18:20.000Z
examples/python-lib/tests/conftest.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
3
2021-02-17T13:47:44.000Z
2021-10-14T13:53:15.000Z
examples/python-lib/tests/conftest.py
prototypefund/universal-build
809e641d5cf9dc1378cd0e0e3ea6e79f773ae4e7
[ "MIT" ]
6
2020-11-23T09:51:26.000Z
2022-02-11T13:46:57.000Z
import pytest from fastapi import FastAPI from typer import Typer @pytest.fixture(scope="session") def cli_app() -> Typer: from template_package import _cli print("Create cli_app fixture") return _cli.cli @pytest.fixture(scope="session") def api_app() -> FastAPI: from template_package import api ...
18.133333
38
0.709559
bdc68eec18f07cd2d8934d2e08784ddd196aff56
1,274
py
Python
tests/integration/scalar_fields/test_voxlegrid_scalar_fields.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
tests/integration/scalar_fields/test_voxlegrid_scalar_fields.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
tests/integration/scalar_fields/test_voxlegrid_scalar_fields.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
import pytest @pytest.mark.parametrize("scalar_field_name, min_val, max_val", [ ( "voxel_n", 0, 4 * 4 * 4 ), ( "voxel_x", 0, 4 ), ( "voxel_y", 0, 4 ), ( "voxel_z", 0, 4 ), ]) @pytest.mark.us...
28.311111
120
0.696232
e58bccfca7beec11f5cca6e3d3d9a32b2bc27bb0
715
py
Python
codeit/algorithm/max_product.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/algorithm/max_product.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/algorithm/max_product.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
""" 카드 두 뭉치가 있습니다. 왼쪽 뭉치에서 카드를 하나 뽑고 오른쪽 뭉치에서 카드를 하나 뽑아서, 두 수의 곱이 가장 크게 만들고 싶은데요. 어떻게 하면 가장 큰 곱을 구할 수 있을까요? 함수 max_product는 리스트 left_cards와 리스트 right_cards를 파라미터로 받습니다. left_cards는 왼쪽 카드 뭉치의 숫자들, right_cards는 오른쪽 카드 뭉치 숫자들이 담겨 있고, max_product는 left_cards에서 카드 하나와 right_cards에서 카드 하나를 뽑아서 곱했을 때 그 값이 최대가 되는 값을 리턴합니다. ...
27.5
63
0.640559
e5b18a98d4b8837c02f8179c0993856279a98d77
5,983
py
Python
raw_code/pulson440/otheralign.py
stevenruidigao/bwsiuassar2019
25e267d2c9d96c767f7f9ea168a27bcad56690b7
[ "MIT" ]
null
null
null
raw_code/pulson440/otheralign.py
stevenruidigao/bwsiuassar2019
25e267d2c9d96c767f7f9ea168a27bcad56690b7
[ "MIT" ]
null
null
null
raw_code/pulson440/otheralign.py
stevenruidigao/bwsiuassar2019
25e267d2c9d96c767f7f9ea168a27bcad56690b7
[ "MIT" ]
null
null
null
def get_pos(motion, name): start_index = -1 curr = 0 for col in motion.columns: if col == name: start_index = curr break curr += 1 start_index += 4 ret = dict() ret['Time (Seconds)'] = motion.iloc[3:, 1] ret['Time (Seconds)'].index = range(l...
42.735714
125
0.641317
f9166806ce576d499c46632c0d24a744cb91bfa8
12,682
py
Python
ListenUp/core/listen_up_db.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
ListenUp/core/listen_up_db.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
ListenUp/core/listen_up_db.py
kkysen/Soft-Dev
b19881b1fcc9c7daefc817e6b975ff6bce545d81
[ "Apache-2.0" ]
null
null
null
import random from intbitset import intbitset from sqlite3 import IntegrityError from typing import Iterable, List, Set, Tuple, Union from core.questions import Question, get_questions from core.songs import Song from core.users import User from util import io from util.db.db import ApplicationDatabase, ApplicationDa...
41.717105
116
0.602429
9750e84b88bdaf788598cf83f18bb4a9ddd28b20
379
py
Python
Hackerrank_problems/DrawingBook/Solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
Hackerrank_problems/DrawingBook/Solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
Hackerrank_problems/DrawingBook/Solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
#Author : @shashankseth01 #Simple solution for drawing book in python language n = int(input("Enter the number of pages")) p = int(input("Destination Page")) print (min(p/2,n/2-p/2)) # if we open the book from front then destination page will take p/2 turn overs. # if we open the book form...
42.111111
107
0.6781
8af32b7b2f0e61bd49cff92b4d1937e27ccbf813
5,953
py
Python
haas_lib_bundles/python/libraries/gc7219/gc7219.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/gc7219/gc7219.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/gc7219/gc7219.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
from driver import SPI, GPIO # register address map for each GC7219 (opCodes) OP_NOOP = 0 OP_DIGIT0 = 1 # == one row (byte) OP_DIGIT1 = 2 OP_DIGIT2 = 3 OP_DIGIT3 = 4 OP_DIGIT4 = 5 OP_DIGIT5 = 6 OP_DIGIT6 = 7 OP_DIGIT7 = 8 OP_DECODEMODE = 9 # no decode == 0 (useful only for 7-segment display) OP_INTENSITY = 10 # 0 - ...
30.685567
107
0.571309
a9ee6d956be71143fec258cfb11cec1924f2cc89
3,563
py
Python
Packs/Troubleshoot/Scripts/TroubleshootGetCommandandArgs/TroubleshootGetCommandandArgs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/Troubleshoot/Scripts/TroubleshootGetCommandandArgs/TroubleshootGetCommandandArgs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/Troubleshoot/Scripts/TroubleshootGetCommandandArgs/TroubleshootGetCommandandArgs.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
""" Gets a command, validates it and outputting it to context """ from CommonServerPython import * def is_command_available(instance_name: str, command: str) -> dict: available_commands = demisto.getAllSupportedCommands() if commands := available_commands.get(instance_name): try: return li...
37.505263
115
0.645243
00fef62b4c482891effbbb0acbc4712648390113
12,473
py
Python
tests/onegov/form/test_collection.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/form/test_collection.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/form/test_collection.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import pytest from datetime import datetime, timedelta from io import BytesIO from onegov.file import File from onegov.form import CompleteFormSubmission from onegov.form import FormCollection from onegov.form import parse_form from onegov.form import PendingFormSubmission from onegov.form.errors import UnableToComple...
31.418136
79
0.699832
d8622c68b3eddee1389088b50eda52d77d3d7b84
2,851
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/addParkingAreaStops2Routes.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/addParkingAreaStops2Routes.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/addParkingAreaStops2Routes.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
#!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2010-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www.ec...
38.527027
107
0.670993
d8dbb54f65ba87e7dcd59446097268679e55f1c9
310
py
Python
utils/gravatar.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
2
2019-06-24T08:34:39.000Z
2019-06-27T12:23:47.000Z
utils/gravatar.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
null
null
null
utils/gravatar.py
pushyzheng/docker-oj-web
119abae3763cd2e53c686a320af7f4f5af1f16ca
[ "MIT" ]
null
null
null
import hashlib def get_avatar_url(email, size=300): hl = hashlib.md5() hl.update(email.encode(encoding="utf-8")) hash = hl.hexdigest() base_url = 'http://www.gravatar.com/avatar' avatar_url = '{}/{}?rating=g&default=identicon&size={}'.format(base_url, hash, size) return avatar_url
25.833333
88
0.667742
992b158a1634bf7948550a588fd955a704c9ed70
2,830
py
Python
tp2/tests/4-epsilon/test.py
ha2398/ia-tps
3696c92c8e2549aab6ac83da317cef8e15762eea
[ "MIT" ]
null
null
null
tp2/tests/4-epsilon/test.py
ha2398/ia-tps
3696c92c8e2549aab6ac83da317cef8e15762eea
[ "MIT" ]
null
null
null
tp2/tests/4-epsilon/test.py
ha2398/ia-tps
3696c92c8e2549aab6ac83da317cef8e15762eea
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Run convergence experiment. import argparse import matplotlib.pyplot as plt import os import shutil import subprocess as sp parser = argparse.ArgumentParser() parser.add_argument('-s', dest='SEEDS', default=5, type=int, help='Number of seeds.') parser.add_argument('-j', d...
25.267857
73
0.543816
993e431c82e3dead2e51f0d2e19eb958c3988c17
796
py
Python
data/planedb.py
Janrupf/airport-db-seeding
768a9373f02ede5bf613d09270d2fbe84de37a97
[ "MIT" ]
null
null
null
data/planedb.py
Janrupf/airport-db-seeding
768a9373f02ede5bf613d09270d2fbe84de37a97
[ "MIT" ]
null
null
null
data/planedb.py
Janrupf/airport-db-seeding
768a9373f02ede5bf613d09270d2fbe84de37a97
[ "MIT" ]
null
null
null
import csv class PlaneDB: def __init__(self, cache): planes_csv = cache.resolve_entry("planes.csv", PlaneDB.download_planes) with open(planes_csv) as f: reader = csv.reader(f, quotechar='"') next(reader, None) # Skip CSV header self.planes = [plane[0] for plan...
30.615385
118
0.624372
5afe8832e6c42a54f0d1af96d5dd9269ac6e71eb
4,129
py
Python
research/cv/PGAN/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/PGAN/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/PGAN/eval.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.697479
114
0.651974
51826639cf413c9d93042fb9061bab93e54ef10f
25,456
py
Python
Integrations/python/test/testTableTools.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
null
null
null
Integrations/python/test/testTableTools.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
null
null
null
Integrations/python/test/testTableTools.py
devinrsmith/deephaven-core
3a6930046faf1cd556f62a914ce1cfd7860147b9
[ "MIT" ]
null
null
null
# # Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending # ############################################################################## # NOTE: the jvm should have been initialized, or this test will certainly fail ############################################################################## import sys i...
49.142857
126
0.613765
cfd7a5cddb06fb8b92e253d24a51c03fe4eccc71
945
py
Python
haas_lib_bundles/python/docs/examples/lbs_demo/haas506/code/main.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/lbs_demo/haas506/code/main.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/docs/examples/lbs_demo/haas506/code/main.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
import utime as time import network from lbs import LBS g_connect_status = False def on_4g_cb(args): global g_connect_status pdp = args[0] netwk_sta = args[1] if netwk_sta == 1: g_connect_status = True else: g_connect_status = False def connect_network(): global net,on_4g_cb...
23.04878
80
0.643386
5ca421dd547d872a3adbaa4cd855d71e4c564d77
26,020
py
Python
car/car/PX4MavCtrlV4.py
cdxxiaoge/StreetRoller
3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400
[ "Apache-2.0" ]
null
null
null
car/car/PX4MavCtrlV4.py
cdxxiaoge/StreetRoller
3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400
[ "Apache-2.0" ]
null
null
null
car/car/PX4MavCtrlV4.py
cdxxiaoge/StreetRoller
3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400
[ "Apache-2.0" ]
null
null
null
import socket import threading import time from pymavlink import mavutil from pymavlink.dialects.v20 import common as mavlink2 import struct import math # PX4 main mode enumeration class PX4_CUSTOM_MAIN_MODE: PX4_CUSTOM_MAIN_MODE_MANUAL = 1 PX4_CUSTOM_MAIN_MODE_ALTCTL = 2 PX4_CUSTOM_MAIN_MODE_POSCTL = 3 ...
45.33101
175
0.606956
5ccf4e92af982ca19d604a5cf5c7165cb2cb18e1
3,427
py
Python
Python/Buch_ATBS/Teil_2/Kapitel_14_Arbeiten_mit_CSV_und_JSON_Daten/03_json_grundlagen.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_2/Kapitel_14_Arbeiten_mit_CSV_und_JSON_Daten/03_json_grundlagen.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_2/Kapitel_14_Arbeiten_mit_CSV_und_JSON_Daten/03_json_grundlagen.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# 03_json_grundlagen.py import re, json max_text_length=70 max_text_delta=24 def output(title, string): print('╔'+''.center(max_text_length+8, '═')+'╗') print('║ '+title.center(max_text_length+7).upper()+'║') print('╠'+''.center(max_text_length+8, '═')+'╣') string=string+' '*max_text_length searc...
83.585366
404
0.752845
5cd9a3b6460cc7a0c873ef32b72989642892cf0a
9,484
py
Python
Aufgaben/abgabe2/neuronalNetwork.py
JoshuaJoost/GNN_SS20
6b905319f2e51b71569354c347805abce9df3cb1
[ "MIT" ]
null
null
null
Aufgaben/abgabe2/neuronalNetwork.py
JoshuaJoost/GNN_SS20
6b905319f2e51b71569354c347805abce9df3cb1
[ "MIT" ]
null
null
null
Aufgaben/abgabe2/neuronalNetwork.py
JoshuaJoost/GNN_SS20
6b905319f2e51b71569354c347805abce9df3cb1
[ "MIT" ]
null
null
null
__authors__ = "Rosario Allegro (1813064), Sedat Cakici (1713179), Joshua Joost (1626034)" # maintainer = who fixes buggs? __maintainer = __authors__ __date__ = "2020-04-23" __version__ = "1.0" __status__ = "Ready" ##--- TODO # - [optional]: importieren und exportieren des Neuronalen Netzes (um es speichern und laden zu...
47.42
309
0.634437
8f9728f3a69db3cfed2acd75279be76e24a9069e
408
py
Python
book/translation/fra/book/website/scripts/clean.py
AndreaSanchezTapia/the-turing-way
fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f
[ "CC-BY-4.0" ]
1
2021-11-09T20:43:06.000Z
2021-11-09T20:43:06.000Z
book/translation/fra/book/website/scripts/clean.py
AndreaSanchezTapia/the-turing-way
fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f
[ "CC-BY-4.0" ]
null
null
null
book/translation/fra/book/website/scripts/clean.py
AndreaSanchezTapia/the-turing-way
fe3e1a8ad36f9086edb4f36ec8e398f253fd8e0f
[ "CC-BY-4.0" ]
2
2021-12-21T17:35:45.000Z
2021-12-21T20:43:01.000Z
"""Un script d'aide pour "nettoyer" tous vos fichiers HTML et markdown générés.""" importez shutil en tant que sh depuis le chemin d'importation de pathlib path_root = Path(__file__).parent.parent path = [path_root.joinpath('_site'), path_root.joinpath('_build')] pour le chemin dans les chemins : print(f...
29.142857
82
0.718137
8f3a5f6e6381dc69c2bfccd12fa23aaeff5b0714
2,644
py
Python
src/onegov/org/mail.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/mail.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/mail.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.templates import render_template from onegov.org.layout import DefaultMailLayout def send_html_mail(request, template, content, **kwargs): """" Sends an email rendered from the given template. Example:: send_html_mail(request, 'mail_template.pt', {'model': self}, subject...
27.257732
75
0.624054
56c2c6c4f26646139f9f54c9e2fe6764c5dd293d
318
py
Python
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalWhoisScript/RiskIQPassiveTotalWhoisScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalWhoisScript/RiskIQPassiveTotalWhoisScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/PassiveTotal/Scripts/RiskIQPassiveTotalWhoisScript/RiskIQPassiveTotalWhoisScript.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * indicator_value = demisto.args().get('indicator_value') indicator_type = 'domain' if re.match(emailRegex, indicator_value): indicator_type = 'email' result = demisto.executeCommand('pt-whois-search', {'field': indicator_type, 'query': indicator_value}) demisto.results(result)
26.5
103
0.767296
a414127817188542621554c2fbe0f976387054a1
3,976
py
Python
fence/resources/audit/utils.py
scottyellis/fence
012ba76a58853169e9ee8e3f44a0dc510f4b2543
[ "Apache-2.0" ]
31
2018-01-05T22:49:33.000Z
2022-02-02T10:30:23.000Z
fence/resources/audit/utils.py
scottyellis/fence
012ba76a58853169e9ee8e3f44a0dc510f4b2543
[ "Apache-2.0" ]
737
2017-12-11T17:42:11.000Z
2022-03-29T22:42:52.000Z
fence/resources/audit/utils.py
scottyellis/fence
012ba76a58853169e9ee8e3f44a0dc510f4b2543
[ "Apache-2.0" ]
46
2018-02-23T09:04:23.000Z
2022-02-09T18:29:51.000Z
import flask from functools import wraps import traceback from urllib.parse import parse_qsl, urlencode, urlparse, urlunparse from cdislogging import get_logger from fence.config import config logger = get_logger(__name__) def is_audit_enabled(category=None): enable_audit_logs = config["ENABLE_AUDIT_LOGS"] or...
37.866667
85
0.677565
a446dcfd1137c87169cdb09c3f071bcd86bf5b0b
6,477
py
Python
rtc_dist-packages/TurtleBotClassFile_21_11_17.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
rtc_dist-packages/TurtleBotClassFile_21_11_17.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
rtc_dist-packages/TurtleBotClassFile_21_11_17.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python3 # --- TurtleBotClass.py ---------- # Version vom 17.11.2021 by OJ # kein Torkelbot mehr ! # mit der Fehlerkorrektur von MU # -------------------------------- import rospy from geometry_msgs.msg import Twist from turtlesim.msg import Pose from nav_msgs.msg import Odometry from math import pow, ata...
38.325444
148
0.574649
f10314b8ebaeec4a00dab0124f420dffdde5b172
8,907
py
Python
20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/net/protocol_old.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/net/protocol_old.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-hs-redez-sem/groups/02-unionDir/filesystem-redez-client/net/protocol_old.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
from utils import color import ast import os BUFFER_SIZE = 8 * 1024 ''' Sends information about file added to the filesystem in the following format: ADD <source_path> <destination_path> ''' def add_file(src, dst, client): msg = "ADD {} {}".format(src, dst) client.send(msg) send_file(src, client) m...
35.915323
217
0.547322
f14744df228746b1a75bfa4ec71bd09f9cde4cce
2,017
py
Python
yolov5-coreml-tflite-converter/coreml/coreml_converter/torchscript_to_coreml_converter.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/coreml/coreml_converter/torchscript_to_coreml_converter.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
yolov5-coreml-tflite-converter/coreml/coreml_converter/torchscript_to_coreml_converter.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
import logging import coremltools as ct from constants import IMAGE_NAME, NB_OUTPUTS, NORMALIZATION_FACTOR, BATCH_SIZE, END_COLOR, BLUE, GREEN, RED class TorchscriptToRawCoreMLConverter: def __init__(self, model): self.model = model def convert(self): ''' Converts a torchscript to a...
41.163265
111
0.617749
74ae17c3980ecfff8c398cb3f0baa89e62e521b9
965
py
Python
Arrays and Strings/MaximumSumIncreasingSubsequence.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
null
null
null
Arrays and Strings/MaximumSumIncreasingSubsequence.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
null
null
null
Arrays and Strings/MaximumSumIncreasingSubsequence.py
dileeppandey/hello-interview
78f6cf4e2da4106fd07f4bd86247026396075c69
[ "MIT" ]
1
2020-02-12T16:57:46.000Z
2020-02-12T16:57:46.000Z
""" Maximum Sum Increasing Subsequence https://practice.geeksforgeeks.org/problems/maximum-sum-increasing-subsequence/0/?ref=self """ def maximum_sum_increasing_subsequence(numbers, size): """ Given an array of n positive integers. Write a program to find the sum of maximum sum subsequence of the given ar...
29.242424
90
0.639378
2d1ae7e4e3679bf22d27acfed7e7ac6c621a5b51
3,051
py
Python
test/test_npu/test_network_ops/test_upsample_bilinear_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_upsample_bilinear_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_upsample_bilinear_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...
38.1375
103
0.68076
7ac5cc2014b7ba58d9429c1d77d382ede3e5190e
5,619
py
Python
wz/ui/pupils_delta_widget.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui/pupils_delta_widget.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/ui/pupils_delta_widget.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ ui/pupils_delta_widget.py Last updated: 2021-10-22 Gui widget for comparing class data with a newer version from an external source. =+LICENCE============================= Copyright 2021 Michael Towers Licensed under the Apache License, Version 2.0 (the "License"); you may not us...
32.293103
76
0.589073
70259cf9771d54ddaed1bff2b7ccc66889bb286f
284
py
Python
pyntcloud/filters/base.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/filters/base.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/filters/base.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
from abc import ABC, abstractmethod class Filter(ABC): """Base class for filters.""" def __init__(self, *, pyntcloud): self.pyntcloud = pyntcloud @abstractmethod def extract_info(self): pass @abstractmethod def compute(self): pass
16.705882
37
0.626761
703b3b46c656fa9a48fcb3223267b5e2acc54ef6
780
py
Python
DiceCTF/2021/crypto/garbled/evaluate_garbled_circuit_example.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
DiceCTF/2021/crypto/garbled/evaluate_garbled_circuit_example.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
DiceCTF/2021/crypto/garbled/evaluate_garbled_circuit_example.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-12-19T11:06:24.000Z
2021-12-19T11:06:24.000Z
""" This file is provided as an example of how to load the garbled circuit and evaluate it with input key labels. Note: the ACTUAL `g_tables` for this challenge are in `public_data.py`, and are not used in this example. It will error if the provided inputs are not valid label keys, ie do not match either of th...
25.16129
106
0.712821
7051a0c59ebed288c63677dff5933b524899fb1d
281
py
Python
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/04moeda/moeda.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/04moeda/moeda.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/04moeda/moeda.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
class Moeda: def __init__(self, dolar, real): self.dolar = dolar self.real = real self.iof = 0.06 def conversor(self): return f'Valor convertido para real: {(self.dolar * self.real * self.iof) + (self.dolar * self.real):.2f}'
25.545455
114
0.565836
709b29d7aa6663435caf55f58880ee424101149f
858
py
Python
pocketthrone/managers/gameloopmanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
4
2016-06-05T16:48:04.000Z
2020-03-23T20:06:06.000Z
pocketthrone/managers/gameloopmanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
pocketthrone/managers/gameloopmanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
from pocketthrone.entities.event import * import sys from pocketthrone.managers.eventmanager import EventManager from kivy.clock import Clock # GameLoopManager # handles the gameloop instead of the main script before class GameLoopManager: def __init__(self): # init eventmanager and keepGoing EventManager.registe...
26
59
0.755245
70a5ec0757d57d94184459c763511cee7124f82e
1,414
py
Python
sso-db/ssodb/common/models/country_model.py
faical-yannick-congo/sso-backend
e962006b0fecd68e4da94e54b4dc63547a5a2c21
[ "MIT" ]
null
null
null
sso-db/ssodb/common/models/country_model.py
faical-yannick-congo/sso-backend
e962006b0fecd68e4da94e54b4dc63547a5a2c21
[ "MIT" ]
null
null
null
sso-db/ssodb/common/models/country_model.py
faical-yannick-congo/sso-backend
e962006b0fecd68e4da94e54b4dc63547a5a2c21
[ "MIT" ]
null
null
null
import datetime from ..core import db import json from bson import ObjectId class Country(db.Document): created_at = db.StringField(default=str(datetime.datetime.utcnow())) updated_at = db.StringField(default=str(datetime.datetime.utcnow())) name = db.StringField(required=True, unique=True) code = db.S...
33.666667
81
0.588402
3b5113d4deedde8a611148ad95082b5e6cea0fa1
293
py
Python
books/PythonAutomate/file_organize/extracting_zip_files.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/file_organize/extracting_zip_files.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/file_organize/extracting_zip_files.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import os import zipfile from pathlib import Path p = Path('.') example_zip = zipfile.ZipFile(p / 'example.zip') # 전부 압축 풀기 example_zip.extractall('example') # 단일 파일 풀기 example_zip.extract('spam.txt') example_zip.extract('cats/catnames.txt', 'new_folder') example_zip.close()
19.533333
55
0.706485
79a47c959587178d3825f3e5142675eee8382657
4,854
py
Python
src/yaml_parser/yaml_parser.py
kkaruso/niv
67ba82c93279db4dae503d4dceec7ba5e9931c0a
[ "MIT" ]
null
null
null
src/yaml_parser/yaml_parser.py
kkaruso/niv
67ba82c93279db4dae503d4dceec7ba5e9931c0a
[ "MIT" ]
null
null
null
src/yaml_parser/yaml_parser.py
kkaruso/niv
67ba82c93279db4dae503d4dceec7ba5e9931c0a
[ "MIT" ]
null
null
null
""" Parses given .yaml file """ import errno import os from sys import platform import yaml def get_yaml(path): """ Reads in a .yaml file from a given path :param path: path to the .yaml file :return: yaml object or Exception """ with open(path, "r") as stream: try: yaml_p...
38.52381
169
0.651009
30a9631fc7fd79aa30bd02e3a282f4a2ad2efab5
4,700
py
Python
discordLevelingSystem/decorators.py
Flurry58/Catgalatic
b47396dd479c9d16d5bf0ea4b283b461a9d210e5
[ "MIT" ]
null
null
null
discordLevelingSystem/decorators.py
Flurry58/Catgalatic
b47396dd479c9d16d5bf0ea4b283b461a9d210e5
[ "MIT" ]
null
null
null
discordLevelingSystem/decorators.py
Flurry58/Catgalatic
b47396dd479c9d16d5bf0ea4b283b461a9d210e5
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2021 Defxult#8269 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
43.925234
181
0.669362
30cd518d0a92bbf731df8976f8fe52c2581181f6
378
py
Python
Licence 1/I11/TP2/tp2_4.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I11/TP2/tp2_4.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I11/TP2/tp2_4.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
next = True while next: a = input("Valeur de a : ") b = input("Valeur de b : ") operator = input("Choix de l'operateur parmi (+,-,*,/) : ") result = eval(a + operator + b) print("Le resultat est", a, operator, b, "=", result) print("Cette expression est de type", type(result)) next = inp...
25.2
63
0.558201
ba58f8a8e05d445b44bce62ebf4c924eae4c4486
2,500
py
Python
official/recommend/tbnet/src/steam.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/recommend/tbnet/src/steam.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/recommend/tbnet/src/steam.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...
40.322581
99
0.648
301a4dc721fca04349cad75b7354502ac12ffae8
39
py
Python
interface/__init__.py
jorgeparavicini/FourWins
1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83
[ "MIT" ]
1
2021-01-20T18:33:01.000Z
2021-01-20T18:33:01.000Z
interface/__init__.py
jorgeparavicini/FourWins
1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83
[ "MIT" ]
null
null
null
interface/__init__.py
jorgeparavicini/FourWins
1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83
[ "MIT" ]
2
2019-09-04T08:27:14.000Z
2019-09-06T20:32:30.000Z
from .gridrenderer import GridRenderer
19.5
38
0.871795
06212c758210c052cf689600690725f4273ca2eb
16,859
py
Python
primzahlen.py
pittermann/Primzahlengenerator
a4fd631175a6dd13f2151ca3409746f893d07e0a
[ "MIT" ]
null
null
null
primzahlen.py
pittermann/Primzahlengenerator
a4fd631175a6dd13f2151ca3409746f893d07e0a
[ "MIT" ]
null
null
null
primzahlen.py
pittermann/Primzahlengenerator
a4fd631175a6dd13f2151ca3409746f893d07e0a
[ "MIT" ]
1
2021-10-01T08:01:44.000Z
2021-10-01T08:01:44.000Z
import os, sys, math, time import matplotlib.pyplot as plt from itertools import cycle # Farbige Ausgabe auf dem Bildschirm mit print class c: PURPLE = '\033[95m' PURPLEBOLD = '\033[95m\033[1m' CYAN = '\033[96m' CYANBOLD = '\033[96m\033[1m' DARKCYAN = '\033[36m' BLUE = '\033[94m' ...
37.464444
139
0.49914
aebe53c69b3ca6913958acd0de4a7d117b639452
1,656
py
Python
robot/wahson/wahson.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2017-10-23T14:58:47.000Z
2017-10-23T14:58:47.000Z
robot/wahson/wahson.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
null
null
null
robot/wahson/wahson.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2018-04-06T07:49:18.000Z
2018-04-06T07:49:18.000Z
# coding=utf-8 from selenium import webdriver import time import xlwt from xlwt import Workbook, easyxf, Formula browser = webdriver.Firefox() browser.maximize_window() browser.get("http://wahson.cn/product.asp") time.sleep(5) links = browser.find_elements_by_css_selector("#left ul li a") types = [] for link in links...
26.285714
104
0.657609
aedabd23f482c78e948d8151dc3f4b28d341285b
623
py
Python
Packs/CommonScripts/Scripts/Base64EncodeV2/Base64EncodeV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/Base64EncodeV2/Base64EncodeV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/Base64EncodeV2/Base64EncodeV2.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import base64 def encode(input): input_bytes = input.encode('utf-8') res = str(base64.b64encode(input_bytes)) res = res.split('\'')[1] outputs = { 'Base64': { 'encoded': res ...
23.961538
92
0.634029
9dda0102e1c537e00687af560f929da379b36089
426
py
Python
Python/Exercícios_Python/039_comparando_números.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/039_comparando_números.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
Python/Exercícios_Python/039_comparando_números.py
vdonoladev/aprendendo-programacao
83abbcd6701b2105903b28fd549738863418cfb8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """039 - Comparando Números Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/1Z09VRabUkYTMS28_l-G4afprPbawd5z4 """ n1 = int(input('Primeiro valor: ')) n2 = int(input('Segundo valor: ')) if n1 > n2: print('O primeiro valor é m...
25.058824
77
0.685446
0616a604052af628209d179066aa175640bae443
41
py
Python
notebooks/utils/semantical/__init__.py
k4t0mono/ipln
ba71860bc38df52780903f647fb2404c61a6b3f2
[ "BSD-2-Clause" ]
null
null
null
notebooks/utils/semantical/__init__.py
k4t0mono/ipln
ba71860bc38df52780903f647fb2404c61a6b3f2
[ "BSD-2-Clause" ]
2
2020-03-24T17:06:03.000Z
2020-03-31T02:16:40.000Z
notebooks/utils/semantical/__init__.py
k4t0mono/ipln
ba71860bc38df52780903f647fb2404c61a6b3f2
[ "BSD-2-Clause" ]
null
null
null
from .sentiments import SentimentAnalysis
41
41
0.902439
8857a6542f163c7385acfe00ce1e7c99b4395057
142
py
Python
scripts/hello_world_BFadairo.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_BFadairo.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
null
null
null
scripts/hello_world_BFadairo.py
breezage/Hacktoberfest-1
6f6d52248c79c0e72fd13b599500318fce3f9ab0
[ "MIT" ]
1
2019-10-24T06:45:21.000Z
2019-10-24T06:45:21.000Z
# LANGUAGE: Python # AUTHOR: Brandon Fadairo # GITHUB: https://github.com/BFadairo def helloWorld(): print ('Hello World') helloWorld()
15.777778
37
0.704225
ee5d5d81d805607aa23057be0cce1fc10ba19c08
2,059
py
Python
new-docs/examples/python/getting-started/application/expenses-flask/app/user.py
saschajullmann/oso
85d07c6a1825acba5ec043c917bff6e0f5c7128f
[ "Apache-2.0" ]
null
null
null
new-docs/examples/python/getting-started/application/expenses-flask/app/user.py
saschajullmann/oso
85d07c6a1825acba5ec043c917bff6e0f5c7128f
[ "Apache-2.0" ]
2
2021-03-24T19:24:40.000Z
2021-03-24T19:54:46.000Z
new-docs/examples/python/getting-started/application/expenses-flask/app/user.py
saschajullmann/oso
85d07c6a1825acba5ec043c917bff6e0f5c7128f
[ "Apache-2.0" ]
1
2021-03-24T19:51:45.000Z
2021-03-24T19:51:45.000Z
from dataclasses import dataclass from flask import current_app, g, request, Blueprint from werkzeug.exceptions import Unauthorized from .db import query_db bp = Blueprint("user", __name__) class Actor: """base abstract user type""" pass @dataclass class User(Actor): """Logged in user. Has an email a...
24.511905
108
0.576979
4e4cf9a669147350526a2a2f96961f6fec8644c1
1,044
py
Python
20-fs-ias-lec/groups/11-sensUI/sensui/Manager.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-fs-ias-lec/groups/11-sensUI/sensui/Manager.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-fs-ias-lec/groups/11-sensUI/sensui/Manager.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
class Manager: def __init__(self, items): if items is not None: self.__items = items else: self.__items = {} def containsId(self, id): return id is not None and id in self.__items def contains(self, item): return item is not None and item.id in sel...
24.27907
61
0.560345
6df3f546ab17b0dfccecb3403462b3933bfc04dc
2,121
py
Python
blockschaltbilder/tests/boilerplate_test.py
mp4096/blockschaltbilder
9253022b5518e42d784176594d4d6fee7baa1050
[ "MIT" ]
11
2016-08-19T18:11:19.000Z
2020-07-27T07:04:52.000Z
blockschaltbilder/tests/boilerplate_test.py
mp4096/blockschaltbilder
9253022b5518e42d784176594d4d6fee7baa1050
[ "MIT" ]
8
2016-09-17T16:46:01.000Z
2021-04-29T19:59:57.000Z
blockschaltbilder/tests/boilerplate_test.py
mp4096/blockschaltbilder
9253022b5518e42d784176594d4d6fee7baa1050
[ "MIT" ]
4
2016-09-21T18:45:09.000Z
2020-07-27T07:08:17.000Z
"""Test suit for the Blockschaltbild boilerplate generator.""" import unittest from ..boilerplate import _convert_text class TestBoilerplate(unittest.TestCase): def test_no_sketch(self): """Test if an exception is raised if the text contains is no sketch.""" lines = [ "spam", ...
38.563636
79
0.437529
6df4ab7e13a018a1e2026b76e078102a870dcd4c
260
py
Python
project/views/root.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
project/views/root.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
35
2022-01-24T22:15:59.000Z
2022-03-31T15:01:35.000Z
project/views/root.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
import os.path from flask import send_from_directory from project import app media_path = os.path.join(app.root_path, "media") @app.route("/media/<path:path>", methods=["GET"]) def serve_file_in_dir(path): return send_from_directory(media_path, path)
20
49
0.757692
113608a3f22c3300e47d0e91faa9aad38f8610d3
1,867
py
Python
jupyter_book/cli/pluggable.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
2,109
2020-05-02T23:47:18.000Z
2022-03-31T22:16:54.000Z
jupyter_book/cli/pluggable.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
1,158
2020-04-29T18:07:02.000Z
2022-03-31T21:50:57.000Z
jupyter_book/cli/pluggable.py
flat35hd99/jupyter-book
4d5b474e6f2b80c4d1d206e4554740ff82a344dc
[ "BSD-3-Clause" ]
360
2020-04-29T14:44:49.000Z
2022-03-31T09:26:23.000Z
"""Plugin aware click command Group.""" from typing import Any, Iterable, List, Set import click try: from importlib import metadata except ImportError: import importlib_metadata as metadata def get_entry_point_names(group: str) -> List[str]: return [ep.name for ep in metadata.entry_points().get(group, ...
35.226415
82
0.663096
6e6a7ac869437edb996baf20325e496fda162c95
2,271
py
Python
IVTa/2014/ALEKSEEV_I_S/task_9_50.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/ALEKSEEV_I_S/task_9_50.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/ALEKSEEV_I_S/task_9_50.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 9. Вариант 23 # Создайте игру, в которой компьютер выбирает какое-либо слово, # а игрок должен его отгадать. Компьютер сообщает игроку, сколько # букв в слове, и дает пять попыток узнать, есть ли какая-либо буква # в слове, причем программа может отвечать только "Да" и "Нет". # Вслед за тем игрок должен попроб...
32.442857
116
0.612946
42e402e351224d468d0813f09a6cde2b6fe2b681
1,243
py
Python
tests/books/books.py
showhue/adzuki
23dff5b01905ba3622b4846708c6fd9d2fdd7385
[ "BSD-3-Clause" ]
null
null
null
tests/books/books.py
showhue/adzuki
23dff5b01905ba3622b4846708c6fd9d2fdd7385
[ "BSD-3-Clause" ]
5
2019-03-19T22:21:28.000Z
2020-09-16T03:08:56.000Z
tests/books/books.py
showhue/adzuki
23dff5b01905ba3622b4846708c6fd9d2fdd7385
[ "BSD-3-Clause" ]
null
null
null
from adzuki import Model from datetime import datetime import configparser class Book(Model): def __init__(self, *args, **kwargs): self._config = configparser.ConfigParser() self._config.read('config/config.cfg') self._project = self._config.get('books', 'project') self._namespace = self._config.get(...
25.895833
60
0.564763
6e2978a84ee6a6142d29210b25f130068e9ba997
25,745
py
Python
Packs/ServiceDeskPlus/Integrations/ServiceDeskPlus/ServiceDeskPlus_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/ServiceDeskPlus/Integrations/ServiceDeskPlus/ServiceDeskPlus_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/ServiceDeskPlus/Integrations/ServiceDeskPlus/ServiceDeskPlus_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import pytest import demistomock as demisto from ServiceDeskPlus import Client, create_request_command, update_request_command, list_requests_command, \ linked_request_command, get_resolutions_list_command, delete_request_command, assign_request_command, \ pickup_request_command, modify_linked_request_command, ...
59.457275
121
0.665255
954e548fe4f0775229c24ac6b8ea76911996c189
5,843
py
Python
vae2gan/core/loss.py
x6rulin/AiLab
b810590d4da645915b8472554794d0c6908109e3
[ "MIT" ]
null
null
null
vae2gan/core/loss.py
x6rulin/AiLab
b810590d4da645915b8472554794d0c6908109e3
[ "MIT" ]
null
null
null
vae2gan/core/loss.py
x6rulin/AiLab
b810590d4da645915b8472554794d0c6908109e3
[ "MIT" ]
null
null
null
"""Loss functions. """ import torch #---------------------------------------------------------------------------- # WGAN & WGAN-GP loss functions. def G_wgan(D, fakes): fake_scores_out = D(fakes) loss = -fake_scores_out return loss def D_wgan(D, fakes, reals, eps=1e-3): real_scores_out = D(reals) ...
35.412121
99
0.61732
c2c6f595816978ffa32ec57b7fbe709f341d2c50
95
py
Python
Curso_Python/Secao2-Python-Basico-Logica-Programacao/11_tipos_de_dados/Exercicio.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/11_tipos_de_dados/Exercicio.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao2-Python-Basico-Logica-Programacao/11_tipos_de_dados/Exercicio.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
print('Pedro', type('Pedro')) print(23, type(23)) print(1.76, type(1.76)) print('23', 23 > 18)
19
29
0.610526
66af3e04ebfada4d7e8255111443d4e80ebd7002
588
pyde
Python
sketches/mira2/mira2.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/mira2/mira2.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/mira2/mira2.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
a = -.48 b = .93 def setup(): size(640, 480) background(235, 215, 182) colorMode(HSB, 255, 100, 100) stroke(0) strokeWeight(1) # noStroke() this.surface.setTitle("Fantastic Feather Fractal") noLoop() def draw(): x = 4. y = .0 for i in range(120000): x1 = b*y + f(x) ...
18.967742
54
0.435374
dd3618b59e7bbf16c262226c4fe7e644e2fbe7bc
8,360
py
Python
bindings/python/ensmallen/datasets/pheknowlatorkg.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
bindings/python/ensmallen/datasets/pheknowlatorkg.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
bindings/python/ensmallen/datasets/pheknowlatorkg.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
"""Module providing graphs available from PheKnowLatorKG. References ---------- Please cite: ```bib @article{callahan2020framework, title={A Framework for Automated Construction of Heterogeneous Large-Scale Biomedical Knowledge Graphs}, author={Callahan, Tiffany J and Tripodi, Ignacio J and Hunter, Lawrence E and...
49.761905
118
0.73756
dd78e0508c54baa33f82ff232d7890fd5e0dc050
1,176
py
Python
src/onegov/wtfs/layouts/invoice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/layouts/invoice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/layouts/invoice.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from cached_property import cached_property from onegov.core.elements import Link from onegov.wtfs import _ from onegov.wtfs.collections import PaymentTypeCollection from onegov.wtfs.layouts.default import DefaultLayout from onegov.wtfs.security import EditModel class InvoiceLayout(DefaultLayout): @cached_proper...
27.348837
59
0.630952
b0b23bc81f1862ba4507b76cbb719143a11eee56
4,206
py
Python
pytest/devices/test_andino_io.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
pytest/devices/test_andino_io.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
pytest/devices/test_andino_io.py
andino-systems/andinopy
28fc09fbdd67dd690b9b3f80f03a05c342c777e1
[ "Apache-2.0" ]
null
null
null
# _ _ _ # / \ _ __ __| (_)_ __ ___ _ __ _ _ # / _ \ | '_ \ / _` | | '_ \ / _ \| '_ \| | | | # / ___ \| | | | (_| | | | | | (_) | |_) | |_| | # /_/ \_\_| |_|\__,_|_|_| |_|\___/| .__/ \__, | # |_| |___/ # by Jakob Groß # import pytest # i...
37.553571
112
0.585592
b050a0496ee8854131fa63036911d1da53841b8f
249
py
Python
Variablen und Operatoren/Eingabe/u_gehalt.py
DietrichPaul/Einstieg-in-Python
0d28402f962773274d85e6bb169ae631c91f66ce
[ "CC0-1.0" ]
null
null
null
Variablen und Operatoren/Eingabe/u_gehalt.py
DietrichPaul/Einstieg-in-Python
0d28402f962773274d85e6bb169ae631c91f66ce
[ "CC0-1.0" ]
null
null
null
Variablen und Operatoren/Eingabe/u_gehalt.py
DietrichPaul/Einstieg-in-Python
0d28402f962773274d85e6bb169ae631c91f66ce
[ "CC0-1.0" ]
null
null
null
# Werte x = 0.18 # Eingabe print("Geben Sie Ihr Bruttogehalt in Euro ein:") eingabe = input() # Eingabe in eine Zahl umwandeln brutto = float(eingabe) # Berechnung steuer = brutto * x print("Es ergibt sich ein Steuerbetrag von", steuer, "Euro")
16.6
60
0.710843
bbdc01000df98f6e98441f1263ebe3a3e10f6d9d
1,441
py
Python
src/bo4e/com/geraet.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/com/geraet.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/com/geraet.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Geraet class and corresponding marshmallow schema for de-/serialization """ from typing import Optional import attr from marshmallow import fields from bo4e.com.com import COM, COMSchema from bo4e.com.geraeteeigenschaften import Geraeteeigenschaften, GeraeteeigenschaftenSchema # pylint: disable=too-fe...
31.326087
167
0.74601
a5b1ef227e168795e709d9ab1b8fb6667427a5ad
2,907
py
Python
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex12_array_split.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex12_array_split.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/Python_Challenge/solutions/ch06_arrays/solutions/ex12_array_split.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
# Beispielprogramm für das Buch "Python Challenge" # # Copyright 2020 by Michael Inden from ch06_arrays.intro.intro import swap def array_split(values, reference_element): lesser = [] bigger_or_equal = [] for current in values: if current < reference_element: lesser.append(current) ...
27.168224
71
0.602683
3c12d89f995b4bebe612790ec2617ef94abae1a8
11,080
py
Python
research/cv/ssd_inceptionv2/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/ssd_inceptionv2/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/ssd_inceptionv2/train.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
52.511848
119
0.707762
59e14e4eee099c1653ed7a58c69ad470445f9e52
14,157
py
Python
kicker_pong_learner.py
GeorgJohn/kicker_pong_git
2263737cab1f74f324772855028f8a4c3b23c4de
[ "MIT" ]
null
null
null
kicker_pong_learner.py
GeorgJohn/kicker_pong_git
2263737cab1f74f324772855028f8a4c3b23c4de
[ "MIT" ]
null
null
null
kicker_pong_learner.py
GeorgJohn/kicker_pong_git
2263737cab1f74f324772855028f8a4c3b23c4de
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np import random # import tqdm import matplotlib.pyplot as plt from kicker_pong.Rewards_Plotter import RewardPlot import collections import kicker_pong.Environment_Controller as Env slim = tf.contrib.slim def calculate_naive_returns(rewards): """ Calculates a list of naiv...
41.884615
119
0.628029
f9ecec90100d244b19cb31a43c5d03e594ad8a81
885
py
Python
source/pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_mixins_gnu.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_mixins_gnu.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/devel/meson/patches/patch-mesonbuild_compilers_mixins_gnu.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-mesonbuild_compilers_mixins_gnu.py,v 1.2 2021/02/21 12:45:23 adam Exp $ Do not default to -z ignore on SunOS, it breaks for example -fstack-protector. --- mesonbuild/compilers/mixins/gnu.py.orig 2021-02-08 21:39:00.000000000 +0000 +++ mesonbuild/compilers/mixins/gnu.py @@ -153,7 +153,7 @@ class GnuLike...
55.3125
92
0.659887
f93ff41c65e5743f37631b1103c3f8fa7fe7331b
918
py
Python
Packs/FeedBlocklist_de/Integrations/FeedBlocklist_de/FeedBlocklist_de.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/FeedBlocklist_de/Integrations/FeedBlocklist_de/FeedBlocklist_de.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/FeedBlocklist_de/Integrations/FeedBlocklist_de/FeedBlocklist_de.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
from CommonServerPython import * def main(): params = {k: v for k, v in demisto.params().items() if v is not None} services = ['all', 'ssh', 'mail', 'apache', 'imap', 'ftp', 'sip', 'bots', 'strongips', 'bruteforcelogin'] feed_types = dict() for service in services: feed_types[F'https://list...
28.6875
109
0.648148
55027b30604ce532b6dd7fb3f3666a1af5a72c95
3,287
py
Python
scripts/signal_marker_processing/scenario_evidence.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
17
2021-01-18T07:27:01.000Z
2022-03-10T12:26:21.000Z
scripts/signal_marker_processing/scenario_evidence.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
4
2021-04-29T11:20:44.000Z
2021-12-06T10:19:17.000Z
scripts/signal_marker_processing/scenario_evidence.py
CsabaWirnhardt/cbm
1822addd72881057af34ac6a7c2a1f02ea511225
[ "BSD-3-Clause" ]
47
2021-01-21T08:25:22.000Z
2022-03-21T14:28:42.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of CbM (https://github.com/ec-jrc/cbm). # Author : Daniele Borio # Credits : GTCAP Team # Copyright : 2021 European Commission, Joint Research Centre # License : 3-Clause BSD class scenario_evidence : """ Summary: Object respon...
28.582609
79
0.520231
fd1e98431487793823bbcb49a75bdc28e5cbc7e6
481
py
Python
languages/python/exercises/concept/lists/lists.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
3
2020-07-25T06:24:00.000Z
2020-09-14T17:39:11.000Z
languages/python/exercises/concept/lists/lists.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
45
2020-01-24T17:04:52.000Z
2020-11-24T17:50:18.000Z
languages/python/exercises/concept/lists/lists.py
AlexLeSang/v3
3d35961a961b5a2129b1d42f1d118972d9665357
[ "MIT" ]
1
2020-04-20T11:41:55.000Z
2020-04-20T11:41:55.000Z
def to_list(arg1, arg2, arg3, arg4, arg5): pass def list_twice(_list): pass def concatenate_lists(list1, list2): pass def list_contains_object(_list, _object): pass def first_and_last(_list): pass def interior_of_list(_list): pass def even_elements(_list): pass def odd_elements...
10.234043
42
0.679834
1f370852416ecb8abc1df7fa9770f716f16d8316
225
py
Python
pypubsub-demo/demo.py
gregjhansell97/sandbox
d565da5db2c10af404ce62aa747d5e682bc02a86
[ "MIT" ]
null
null
null
pypubsub-demo/demo.py
gregjhansell97/sandbox
d565da5db2c10af404ce62aa747d5e682bc02a86
[ "MIT" ]
null
null
null
pypubsub-demo/demo.py
gregjhansell97/sandbox
d565da5db2c10af404ce62aa747d5e682bc02a86
[ "MIT" ]
null
null
null
import time from pubsub import pub def demo(): print("publishing results") pub.sendMessage("rootTopic", arg1=123, arg2={"a": "abc"}) if __name__ == "__main__": while True: time.sleep(1) demo()
16.071429
61
0.608889
c869e586ab5d8b78639001fb99261cbb8d0ff88f
1,396
py
Python
ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/invert_binary_tree.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/invert_binary_tree.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/invert_binary_tree.py
Jimmy01240397/balsn-2021-writeup
91b71dfbddc1c214552280b12979a82ee1c3cb7e
[ "MIT" ]
null
null
null
from __future__ import annotations from problem import Problem from typing import Any, Tuple, Union from dataclasses import dataclass from dataclasses_json import dataclass_json from random import randint @dataclass_json @dataclass class Node: left: Union[Node, int] right: Union[Node, int] Tree = Union[Node...
22.885246
106
0.640401
c0b09fbde90da4e7afe328115a5598df80aa8d62
190
py
Python
python/gdal_cookbook/cookbook_geometry/create_geometry_from_wkb.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/gdal_cookbook/cookbook_geometry/create_geometry_from_wkb.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/gdal_cookbook/cookbook_geometry/create_geometry_from_wkb.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
from osgeo import ogr from base64 import b64decode wkb = b64decode("AIAAAAFBMkfmVwo9cUEjylouFHrhAAAAAAAAAAA=") point = ogr.CreateGeometryFromWkb(wkb) print(f'{point.GetX()},{point.GetY()}')
31.666667
59
0.789474
8d0e08a8d79a48065a6be278de9f20b9ab48758e
1,716
py
Python
src/nfz_module/controller/LEDController.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
src/nfz_module/controller/LEDController.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
src/nfz_module/controller/LEDController.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
import wiringpi2 as wiringpi from model.GPIOPin import GPIOPin from model.PinMode import PinMode from model.WarningLevel import WarningLevel from controller.ActorController import ActorController __author__ = 'Hans-Werner Roitzsch' class LEDController(ActorController): def __init__(self): pass def start_warni...
29.586207
78
0.787296
23f5755bd1df372970a9082e3f22b9eb6316b48f
506
py
Python
python/advanced_sw/GIT-SCRAPER/download_cd.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/advanced_sw/GIT-SCRAPER/download_cd.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/advanced_sw/GIT-SCRAPER/download_cd.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import os import wget cur_wd = os.getcwd() import json from pprint import pprint with open('raw_git.json') as f: data = json.load(f) #pprint(data) for item in data: #print(item) if data[item] != '': dir_ = item.split('/')[:-1] go_dir = '/'.join(dir_) link_ = data[item] #pr...
14.882353
38
0.55336
9eb8894832448bff8f465ce1425cd6e94ebd8ec4
638
py
Python
pacman-arch/test/pacman/tests/upgrade090.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/upgrade090.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/upgrade090.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "-U syncdeps test" p1 = pmpkg("pkg1", "1.0-2") p1.files = ["bin/pkg1"] p2 = pmpkg("pkg2", "1.0-2") p2.depends = ["dep"] p3 = pmpkg("pkg3", "1.0-2") p3.depends = ["unres"] for p in p1, p2, p3: self.addpkg(p) sp = pmpkg("dep") sp.files = ["bin/dep"] self.addpkg2db("sync", sp) self.args = "-U %s ...
22
77
0.62069
7bc5e06a95db991aecf5db2e3a1a3542f8160d7e
1,035
py
Python
image_segmentation/preprocessing.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
image_segmentation/preprocessing.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
image_segmentation/preprocessing.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
2
2019-05-16T05:48:26.000Z
2021-01-27T01:26:22.000Z
#In this preprocessing we center crop the images to get only one dize of image. We don't loose information because the interesting areas are in the center of the images, not in the corners. import cv2 from PIL import Image clahe_resolution = 2.0 def clahe(path): clahe = cv2.createCLAHE(clipLimit=clahe_resolutio...
30.441176
189
0.69372
cdbdb9eaf4ee42d25b7b621141820a49849a6189
5,912
py
Python
gateway-os/software/brain-module/src/processing.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
1
2018-04-29T22:33:42.000Z
2018-04-29T22:33:42.000Z
gateway-os/software/brain-module/src/processing.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
null
null
null
gateway-os/software/brain-module/src/processing.py
LucasRGoes/ladon-io
ab55219b461e918cc0ba45e6cdc9bcdfbce8c0d6
[ "MIT" ]
null
null
null
## IMPORTS ## import logging # Logging: provides a set of convenience functions for simple logging usage import time # Time: provides various time-related functions import numpy as np # NumPy: the fundamental package for scientific computing with Python import cv2 # OpenCV: usage ran...
31.614973
141
0.705853
a9373e8b69074cee3bb30a85c212e8e9f28d6210
791
py
Python
Rechnernetze/Python/POP3/connection.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
2
2020-09-24T12:11:16.000Z
2022-03-31T04:47:24.000Z
Rechnernetze/Python/POP3/connection.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
1
2021-02-27T15:06:27.000Z
2021-03-01T16:32:48.000Z
Rechnernetze/Python/POP3/connection.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
1
2021-02-24T05:12:35.000Z
2021-02-24T05:12:35.000Z
# -*- coding: utf-8 -*- import socket import os class Connection(object): def __init__(self, pServerIP, pServerPort, encoding='utf8'): self.encoding = encoding self._socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._socket.connect((pServerIP, pServerPort)) def send(self...
28.25
72
0.576485
8d9f1176d54f8fb08f3b6a1df5907c5bf55f97d3
42
py
Python
event_detector/gttm/word_cloud/__init__.py
MahdiFarnaghi/gtm
adbec372786262607291f901a444a0ebe9e98b48
[ "Apache-2.0" ]
null
null
null
event_detector/gttm/word_cloud/__init__.py
MahdiFarnaghi/gtm
adbec372786262607291f901a444a0ebe9e98b48
[ "Apache-2.0" ]
null
null
null
event_detector/gttm/word_cloud/__init__.py
MahdiFarnaghi/gtm
adbec372786262607291f901a444a0ebe9e98b48
[ "Apache-2.0" ]
null
null
null
from .wordcloud import generate_wordcloud
21
41
0.880952
9e128a9fab63754ac18b54705ed8087caeb3f049
1,285
py
Python
Algorithms/Strings/separate_the_numbers.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/separate_the_numbers.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Algorithms/Strings/separate_the_numbers.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys # Success for _ in range(int(input())): n = input() len_n = len(n) for i in range(0, len_n // 2): num = int(n[0:i+1]) temp = str(num) while len(temp) < len_n: num += 1 temp = '%s%d' % (temp, num) if temp == n: ...
24.711538
72
0.385214
278237a9cbf9e2e0c433627172552aee807427f1
13,737
py
Python
test/test_npu/test_stream_event.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-12-02T03:07:35.000Z
2021-12-02T03:07:35.000Z
test/test_npu/test_stream_event.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
1
2021-11-12T07:23:03.000Z
2021-11-12T08:28:13.000Z
test/test_npu/test_stream_event.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020 Huawei Technologies Co., Ltd # Copyright (c) 2019, Facebook CORPORATION. # All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/lice...
36.632
87
0.621242
fdde4e5e3f295bc82bb734a51781f6b5de249501
3,144
py
Python
CodeChef_problems/CHEFWED/Solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
CodeChef_problems/CHEFWED/Solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
CodeChef_problems/CHEFWED/Solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
''' Some basic explanation for the approach: Assume that there’s just one table initially which has all the guests sitting on it. Now, this arrangement might not have the minimum inefficiency. So, we consider all the possible arrangements and choose the one with the minimum inefficiency. Basically, we minimize the i...
30.524272
131
0.48855
fde0b7550504d6a55a561e2c768ade1614976b5b
786
py
Python
server/apps/recommendation/migrations/0003_auto_20190428_2141.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/recommendation/migrations/0003_auto_20190428_2141.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/recommendation/migrations/0003_auto_20190428_2141.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
# Generated by Django 2.1.4 on 2019-04-28 21:41 from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('recommendation', '0002_auto_20190428_2128'), ] o...
27.103448
83
0.613232
e37aa0bc3366a274b15fe121a63397e07413c687
5,398
py
Python
module/TwitterAppApiPackage.py
lonelyion/TweetToBot-Docker
ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278
[ "MIT" ]
null
null
null
module/TwitterAppApiPackage.py
lonelyion/TweetToBot-Docker
ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278
[ "MIT" ]
null
null
null
module/TwitterAppApiPackage.py
lonelyion/TweetToBot-Docker
ea91a9d93bad2b757c2ba0923ae9f1cd0f5ac278
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- from helper import getlogger, TokenBucket, TempMemory import tweepy from load_config import config import threading import time import traceback import random logger = getlogger(__name__) # 应用程序匿名访问 class TwitterAppApiPackage: def __init__(self, consumer_key: str, consumer_secret: str): ...
35.748344
78
0.525009
8bd33bf679e8eddebc4297cf7d8fd332039d0ab2
11,337
py
Python
heker.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
heker.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
heker.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
#hargain author :) jangan diganti ya! #Boleh ubah headers, pw list dan lain" tapi mohon jangan ubah author asli hhe ane buatnya 1 mingguan semoga di mengerti :) #hubungin saya jika itu penting : #WhatsApp : 083870396203 #Facebook : Latip Harkat author = 'Latip176' #author utama #libary / module import import requests ...
50.611607
419
0.652642
9a47d4af7eb991051100fb3bdac4a9b67a839063
1,792
py
Python
src/nfz_module/examples/label_count.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
src/nfz_module/examples/label_count.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
src/nfz_module/examples/label_count.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
__author__ = 'Hans-Werner Roitzsch' import os, sys import numpy as np import cv2 as opencv allowed_formats = ['png', 'jpg', 'jpeg'] class LabelCounting: def __init__(self): self.label_count = 0 def count_labels(self, masked_image): contours = opencv.findContours(masked_image, mode=opencv.RETR_LIST, method=...
22.683544
102
0.741071
9a70f930f0f5148ad56419a40de8c3f2038571d7
3,133
py
Python
machine_learning/pytorch/training_in_custom_dataset.py
shaft49/tools-ref
b819338151d3a57f82fd03d4655da85d08ebfeea
[ "MIT" ]
null
null
null
machine_learning/pytorch/training_in_custom_dataset.py
shaft49/tools-ref
b819338151d3a57f82fd03d4655da85d08ebfeea
[ "MIT" ]
4
2020-09-26T06:23:09.000Z
2020-11-04T15:24:20.000Z
machine_learning/pytorch/training_in_custom_dataset.py
shaft49/tools-ref
b819338151d3a57f82fd03d4655da85d08ebfeea
[ "MIT" ]
null
null
null
import torch import torchvision from torch.utils.data import Dataset, DataLoader import numpy as np import math import torch.nn as nn # --> divide dataset into small batches for faster computation # --> Dataloader can do the batch computation for us # implement custom dataset, implement __init__, __getitem__, __len__...
31.019802
113
0.703479
7bf38e1f1757d004ced8fc3774c7b2b3ec08aded
285
py
Python
backend/seedsQR/seed_to_QR.py
cii-aifb/iota-mobility-platform
906e1f35829ea12e1a8ad5cc160684f784036ecc
[ "0BSD" ]
null
null
null
backend/seedsQR/seed_to_QR.py
cii-aifb/iota-mobility-platform
906e1f35829ea12e1a8ad5cc160684f784036ecc
[ "0BSD" ]
9
2019-04-02T06:38:17.000Z
2019-04-15T11:23:08.000Z
backend/seedsQR/seed_to_QR.py
RaphaelManke/fzi-iota-showcase
dc35afda0982b1b9cbdcd5b52fd90c029a538dc2
[ "0BSD" ]
2
2019-08-06T11:56:27.000Z
2020-03-06T19:23:20.000Z
import pyqrcode seeds = [ "EWRTZJHGSDGTRHNGVDISUGHIFVDJFERHUFBGRZEUFSDHFEGBRVHISDJIFUBUHVFDSHFUERIBUJHDRGBCG", "NFTRKXZHCJUUSMBCRSHMHHHDBKNKQQFOWZZQXXIUXKIDJPUGEEZJPEROMAFKBA9XWZUJUURGT9YFXXYEQ" ] for seed in seeds: qr = pyqrcode.create(seed) qr.svg(seed+".svg", scale=8)
28.5
86
0.817544
d0dc5524f48b9be7489eea8bcc5cff070ac9925b
1,523
py
Python
BlackJack/Jogador.py
jvpersuhn/hb
5487abf4fc5b742cf21086ca5b823b915132445d
[ "MIT" ]
null
null
null
BlackJack/Jogador.py
jvpersuhn/hb
5487abf4fc5b742cf21086ca5b823b915132445d
[ "MIT" ]
null
null
null
BlackJack/Jogador.py
jvpersuhn/hb
5487abf4fc5b742cf21086ca5b823b915132445d
[ "MIT" ]
null
null
null
from Deeler import Deeler class Jogador: def __init__(self, nome): self.__cartas = [] self.__pontuacao = 0 self.__situacao = True self.__deeler = Deeler() self.__nome = nome self.__pedirCarta = True def pedirCarta(self) -> bool: carta = self.__deeler.ret...
25.383333
74
0.537098