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
66afb356dd60c1059a941009f66a430e7e451855
1,511
py
Python
orchestrator/command_executor.py
suvambasak/fog-service-orchestration
8404484c32b2f6c0bfb2ed820dc46d56f055141d
[ "Apache-2.0" ]
null
null
null
orchestrator/command_executor.py
suvambasak/fog-service-orchestration
8404484c32b2f6c0bfb2ed820dc46d56f055141d
[ "Apache-2.0" ]
null
null
null
orchestrator/command_executor.py
suvambasak/fog-service-orchestration
8404484c32b2f6c0bfb2ed820dc46d56f055141d
[ "Apache-2.0" ]
1
2022-02-02T14:49:40.000Z
2022-02-02T14:49:40.000Z
from pprint import pprint import subprocess import shlex class CommandExecutor: """ Shell command executor """ def __init__(self) -> None: self._exception_flag = False def set_command(self, command: str) -> None: "Add command to execute" self._command = command a...
23.984127
61
0.523494
af74b3f5f3d2b853f18b02acf210be56ca5e05be
794
py
Python
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/models/sys_base.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/models/sys_base.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/models/sys_base.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# Copyright (C) Microsoft Corporation. All rights reserved. # This program is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. class sys_...
28.357143
71
0.612091
5950efcd0e3232d4e6ff6e3fc3aef0e4bf2018ea
359
py
Python
python/requests/advanced_usage/request_hooks.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/requests/advanced_usage/request_hooks.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/requests/advanced_usage/request_hooks.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import requests http = requests.Session() assert_status_hook = lambda response, *args, **kwargs: response.raise_for_status() http.hooks['response'] = [assert_status_hook] # requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.github.com/user/repos?page=1 resp = http.get('https://api.git...
35.9
113
0.766017
3cbe90d4eb2a5ccee341a078933de7df7c108ad7
2,367
py
Python
tests/onegov/org/test_migration.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/org/test_migration.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/org/test_migration.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import transaction from onegov.core.utils import Bunch from onegov.directory import DirectoryCollection, DirectoryConfiguration from onegov.org.management import PageNameChange from onegov.page import PageCollection def test_page_name_change(org_app): session = org_app.session() def link(model): uri...
30.74026
74
0.637938
3cef58aa0713c4a4ff2d4455646a5616187d2ad2
1,541
py
Python
crypto/diffie_hellman/server.py
yujungcheng/algorithm_and_data_structure
3742238227067217b82bf35ca3a968db4375f3c9
[ "Apache-2.0" ]
null
null
null
crypto/diffie_hellman/server.py
yujungcheng/algorithm_and_data_structure
3742238227067217b82bf35ca3a968db4375f3c9
[ "Apache-2.0" ]
null
null
null
crypto/diffie_hellman/server.py
yujungcheng/algorithm_and_data_structure
3742238227067217b82bf35ca3a968db4375f3c9
[ "Apache-2.0" ]
1
2020-04-16T01:17:04.000Z
2020-04-16T01:17:04.000Z
#!/usr/bin/python3 import sys, os, json, random, socket SHARED_MODULUS = 23 SHARED_BASE = 5 def main(): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) server_address = ('0.0.0.0', 8899) sock.bind(server_address) sock.listen(1) while True: try: print("[Server]") ...
27.035088
82
0.553537
f9fa96ca79ad9ac958b18a85b284f1dfe7f435b6
2,561
py
Python
WeChatRecorder/chatter.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
WeChatRecorder/chatter.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
WeChatRecorder/chatter.py
TitusWongCN/WeChatRelativeTools
9307bae8c15e47b5bbf169a95a50be0d107a5bb1
[ "MIT" ]
null
null
null
# -*- coding=utf-8 -*- # python35 from flask import Flask, url_for, request import itchat app = Flask('WeChatRecorder') global private_groups, private_users new_itchat = itchat.new_instance() def login_warning(): itchat.send_msg('WeChat is logging in now!', 'filehelper') @app.route('/') @app.route('/index') d...
30.488095
101
0.655603
e65bcdeacfb3574ad60030849e56e85b6801db99
509
py
Python
IVTa/2014/BURMISTROV_V_D/task3_45.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/BURMISTROV_V_D/task3_45.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
IVTa/2014/BURMISTROV_V_D/task3_45.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 3. Вариант 45. # Напишите программу, которая выводит имя "Мартин Андерсен", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире. # Burmistrov V.D. # 17.03.2016 name = "Мартин Андерсен" print("Герой нашей сегоднящне...
36.357143
202
0.711198
e987e0f164744930e826c6e0c411fdec2e3d003d
548
py
Python
python/coding_dojang/generator_practice.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/coding_dojang/generator_practice.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/coding_dojang/generator_practice.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
def file_read(): with open('words.txt') as file: while True: line = file.readline() if line == '': break yield line.rstrip('\n') def is_prime(num): for i in range(2, num): if (num % i == 0): return False return True def prime...
20.296296
40
0.527372
32f14c159adf9d684c35e34216c1c03271836d40
1,065
py
Python
controls/_controls.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
controls/_controls.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
controls/_controls.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
from ._button import Button from display import Display, ButtonLights _up_button_pin = 5 _left_button_pin = 27 _down_button_pin = 9 _right_button_pin = 17 _up_led_pin = 11 _left_led_pin = 22 _down_led_pin = 10 _right_led_pin = 6 class Controls: def __init__(self, display: Display, button_lights: ButtonLights): ...
42.6
102
0.756808
bd1d5d892d417f26c760e6c988ed4e0c529262b5
832
py
Python
src/xrt/targets/steamvr_drv/copy_assets.py
leviathanch/monado
36a540a764fd5529018dfceb28e10804db9596bf
[ "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "BSL-1.0", "BSD-3-Clause" ]
null
null
null
src/xrt/targets/steamvr_drv/copy_assets.py
leviathanch/monado
36a540a764fd5529018dfceb28e10804db9596bf
[ "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "BSL-1.0", "BSD-3-Clause" ]
null
null
null
src/xrt/targets/steamvr_drv/copy_assets.py
leviathanch/monado
36a540a764fd5529018dfceb28e10804db9596bf
[ "Unlicense", "Apache-2.0", "BSD-2-Clause", "MIT", "BSL-1.0", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2020, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 import os import sys import shutil print(sys.argv[1], sys.argv[2], sys.argv[3]) is_file = sys.argv[1] == "FILE" is_dir = sys.argv[1] == "DIRECTORY" # get absolute input and output paths input_path = sys.argv[2] output_pat...
21.894737
69
0.701923
1fb31ffa5526c2c0c782047e38bf114a42820ce6
915
py
Python
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_NumberChecked/IntegrationsCheck_Widget_NumberChecked_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_NumberChecked/IntegrationsCheck_Widget_NumberChecked_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IntegrationsCheck_Widget_NumberChecked/IntegrationsCheck_Widget_NumberChecked_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 IntegrationsCheck_Widget_NumberChecked import main @pytest.mark.parametrize('list_, expected', [ ([{ 'Contents': 'Cortex XDR - IR_instance_1,Demisto REST API_instance_1,Image ' 'OCR_default_instance,Rasterize_default_instance,Where is th...
36.6
109
0.686339
1feef96445025495d5855bf838f52bdf868066b7
59
py
Python
Curso_Python/Secao5-modulos-uteis/141_Pillow_redimensionando_varias_imagens_automaticamente/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao5-modulos-uteis/141_Pillow_redimensionando_varias_imagens_automaticamente/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao5-modulos-uteis/141_Pillow_redimensionando_varias_imagens_automaticamente/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
porcentagem = 301 / 151 print(f'{100 / porcentagem:.2f}')
14.75
33
0.661017
2f17d3d4a9ab8e0e5ecdd99bcd5d6af89f833ca6
2,238
py
Python
official/cv/lenet/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/lenet/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/lenet/preprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
38.586207
88
0.676944
8d03acfd7958141bb391b1202aa4a4f4fa7ac140
2,924
py
Python
Utils/Auth.py
Tarek1337/Dashboard-api
4feb4c0c55b8a1cd60eab5acd0a4f52d93fb7961
[ "MIT" ]
null
null
null
Utils/Auth.py
Tarek1337/Dashboard-api
4feb4c0c55b8a1cd60eab5acd0a4f52d93fb7961
[ "MIT" ]
null
null
null
Utils/Auth.py
Tarek1337/Dashboard-api
4feb4c0c55b8a1cd60eab5acd0a4f52d93fb7961
[ "MIT" ]
null
null
null
import time from starlette.requests import Request from starlette.responses import JSONResponse from Utils import Redis, Configuration from Utils.Configuration import CLIENT_ID, CLIENT_SECRET, REDIRECT_URI, API_LOCATION bad_auth_resp = JSONResponse({"status": "Unauthorized"}, status_code=401) async def query_endpo...
34.809524
159
0.684679
7b60a1c18075a8f84a744620f93496d6ba22e5c7
6,208
py
Python
research/cv/vnet/src/vnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/vnet/src/vnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/vnet/src/vnet.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.681564
106
0.615496
8d9cc86ef0410874d72dd2608bda8c0f2af161fa
345
py
Python
Style Guide/resources/naming.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
Style Guide/resources/naming.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
Style Guide/resources/naming.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
def generate_fibonacci_number(target_elem): previous_elem = 0 current_elem = 1 for i in range(target_elem): next_elem = current_elem + previous_elem previous_elem = current_elem current_elem = next_elem return current_elem T_cold_bucket = 230 # K phi_mirror = 1.764 # rad dista...
26.538462
48
0.701449
939e21306af59fd69ecb9fed434cd1fc97dc391a
4,262
py
Python
Packs/GoogleMaps/Integrations/GoogleMaps/GoogleMaps_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/GoogleMaps/Integrations/GoogleMaps/GoogleMaps_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/GoogleMaps/Integrations/GoogleMaps/GoogleMaps_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
"""GoogleMaps Integration for Cortex XSOAR - Unit Tests file""" import io import json import pytest from CommonServerPython import DemistoException from GoogleMaps import Client, google_maps_geocode_command, MESSAGE_ZERO_RESULTS, STATUS_ZERO_RESULTS search_address = 'Paloalto Networks TLV office' def util_load_js...
39.462963
103
0.662365
f56279aabd2020c67df5e8fbf04517b06daaa884
2,563
py
Python
repo/script.module.urlresolver/lib/urlresolver/plugins/jetload.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
1
2017-11-26T18:18:46.000Z
2017-11-26T18:18:46.000Z
repo/script.module.urlresolver/lib/urlresolver/plugins/jetload.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
null
null
null
repo/script.module.urlresolver/lib/urlresolver/plugins/jetload.py
dbiesecke/dbiesecke.github.io
5894473591f078fd22d1cb33794c5e656ae9b8dd
[ "MIT" ]
3
2019-09-30T19:52:05.000Z
2020-04-12T21:20:56.000Z
""" Kodi urlresolver plugin Copyright (C) 2016 script.module.urlresolver This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) ...
38.253731
125
0.620367
479cef1376525129028f6018de290adbf6b1b3f1
11,653
py
Python
skripte/python/edit_tools/abgleich_endungen.py
hyphenation/languages-german
4330a0b1254e88615cb4c83e4b3dc2f0810c76d9
[ "MIT" ]
null
null
null
skripte/python/edit_tools/abgleich_endungen.py
hyphenation/languages-german
4330a0b1254e88615cb4c83e4b3dc2f0810c76d9
[ "MIT" ]
null
null
null
skripte/python/edit_tools/abgleich_endungen.py
hyphenation/languages-german
4330a0b1254e88615cb4c83e4b3dc2f0810c76d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf8 -*- # :Copyright: © 2014 Günter Milde. # Released without warranty under the terms of the # GNU General Public License (v. 2 or later) # :Id: $Id: $ # Abgleich der Trennstellen zwischen Woertern mit gleichem Stamm # ==============================...
29.803069
78
0.380417
d00c0990a7d574826255154e8430bea0867cdfb8
3,311
py
Python
nz_tornado01/demo4.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_tornado01/demo4.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_tornado01/demo4.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from datetime import datetime,timedelta import os import tornado.ioloop import tornado.web from tornado.options import define,parse_command_line,options define('port',default=8081,type=int) #定义默认的启动端口号为8081 class MainHandler(tornado.web.RequestHandler): #请求处理的类视图 #继承于RequestHandler类 def get(self): # nam...
38.5
163
0.654183
efd23bccb015c03c0b8ae3c167fb7d5530983007
7,252
py
Python
egd_site/__init__.py
Ayuda-Efectiva/egd_site
70b9aa6093b3dffab0f49bbb71e5672bd4e72893
[ "MIT" ]
2
2020-10-15T18:39:00.000Z
2020-10-25T10:33:51.000Z
egd_site/__init__.py
Ayuda-Efectiva/egd_site
70b9aa6093b3dffab0f49bbb71e5672bd4e72893
[ "MIT" ]
1
2020-10-31T08:27:01.000Z
2020-10-31T08:27:01.000Z
egd_site/__init__.py
Ayuda-Efectiva/egd_site
70b9aa6093b3dffab0f49bbb71e5672bd4e72893
[ "MIT" ]
2
2020-10-30T20:55:38.000Z
2020-11-04T14:27:45.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import frappe __version__ = '2.0.0' def is_app_for_actual_site() -> bool: """ When overriding Frappe or other apps methods, it allow us to set that specific override to the actual `site app`. Used when multi tenancy (multisites) is on. :rtype: bo...
35.37561
100
0.736762
3eba52a4c9a8f19234a5226feb839952da65bb44
2,149
py
Python
2-resources/__DATA-Structures/Code-Challenges/cc76makeChange/solution.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
2-resources/__DATA-Structures/Code-Challenges/cc76makeChange/solution.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
2-resources/__DATA-Structures/Code-Challenges/cc76makeChange/solution.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# https://repl.it/student/assignments/515954/model_solution?fromSubmissionId=1910097 # https://piazza.com/class/j63w1pdyopf7kj?cid=91 # https://youtu.be/ZmN9F07PjB0 # Recursive solution that duplicates work # def make_change(amount, denominations, index=0): # # base cases # if amount == 0: # return 1 # if am...
33.061538
99
0.68497
3ec0a06ac808a85bc7717f62de8c66ab3e27324a
279
py
Python
Backend/cache.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
15
2020-04-24T20:18:11.000Z
2022-01-31T21:05:05.000Z
Backend/cache.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
2
2021-05-19T07:15:09.000Z
2022-03-07T08:29:34.000Z
Backend/cache.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
4
2020-04-27T16:20:13.000Z
2021-02-23T10:39:42.000Z
from flask_caching import Cache from flask import request cache = Cache(config={'CACHE_TYPE': 'simple', 'CACHE_DEFAULT_TIMEOUT': 5 * 60}) def make_cache_key(*args, **kwargs): path = request.path args = str(hash(frozenset(request.args.items()))) return path + args
25.363636
79
0.709677
de6c1b8c433f4acab577bfbf02f6c045fec13e24
3,477
py
Python
python/advanced_sw/GIT-SCRAPER/jgd_main.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/advanced_sw/GIT-SCRAPER/jgd_main.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/advanced_sw/GIT-SCRAPER/jgd_main.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import sqlite3 import json from pprint import pprint from selenium import webdriver from bs4 import BeautifulSoup from pathlib import Path from tqdm import tqdm import json import time import urllib.request, urllib.parse, urllib.error from bs4 import BeautifulSoup import ssl import wget import os conn = sqlite3.conne...
26.340909
130
0.580673
72031f5361029ef5c5e5258dbc8a9d8a6832efac
5,310
py
Python
verto/processors/HeadingBlockProcessor.py
uccser/verto
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
4
2017-04-10T06:09:54.000Z
2019-05-04T02:07:40.000Z
verto/processors/HeadingBlockProcessor.py
uccser/verto
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
268
2017-04-03T20:40:46.000Z
2022-02-04T20:10:08.000Z
verto/processors/HeadingBlockProcessor.py
uccser/kordac
d36aa88b208f1700fafc033679bd1e9775496d25
[ "MIT" ]
1
2019-01-07T15:46:31.000Z
2019-01-07T15:46:31.000Z
from markdown.blockprocessors import BlockProcessor from verto.utils.HeadingNode import DynamicHeadingNode from verto.utils.HtmlParser import HtmlParser import re class HeadingBlockProcessor(BlockProcessor): ''' Searches a Document for markdown headings (e.g. # HeadingTitle) these are then processed into html...
34.705882
118
0.618079
a05e033a9552714d0fba290ad53e13b941fd50da
2,891
py
Python
utils.py
ramesh152/SegmentationExperiment
b52dbc57759c086155e79c6621e6d25a4db0e974
[ "Apache-2.0" ]
2
2019-06-12T13:53:00.000Z
2020-04-29T13:11:12.000Z
utils.py
ramesh152/SegmentationExperiment
b52dbc57759c086155e79c6621e6d25a4db0e974
[ "Apache-2.0" ]
1
2019-12-10T12:23:06.000Z
2019-12-10T12:23:06.000Z
utils.py
ramesh152/SegmentationExperiment
b52dbc57759c086155e79c6621e6d25a4db0e974
[ "Apache-2.0" ]
1
2020-08-05T18:12:24.000Z
2020-08-05T18:12:24.000Z
import os import torch import torch.nn.functional as F import torch.nn as nn import numpy as np import cv2 import os.path as osp import pickle import random from scipy import ndarray import skimage as sk from skimage import transform from skimage import util def tensor_to_numpy(tensor): t_numpy = tensor.cpu(...
27.798077
97
0.619855
f2ff051f6c8dc988c46c0fec0d921fe4342d3172
860
py
Python
posts-process.py
ipussy/ipussy.github.io
95d19a74e38bb54303cf18057a99a57c783e76bf
[ "Apache-2.0" ]
null
null
null
posts-process.py
ipussy/ipussy.github.io
95d19a74e38bb54303cf18057a99a57c783e76bf
[ "Apache-2.0" ]
null
null
null
posts-process.py
ipussy/ipussy.github.io
95d19a74e38bb54303cf18057a99a57c783e76bf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import os.path import time from datetime import datetime from datetime import date import shutil def fileDates(fileName): names = fileName.split('-') if len(names) > 0: dateStrings = names[-1].split('.') if len(dateStrings) > 0: dateString = dateSt...
22.051282
72
0.577907
4bb28622d9e2df9b37a147cb58e4582baef72331
1,177
py
Python
haas_lib_bundles/python/libraries/l298/l298.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/l298/l298.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
haas_lib_bundles/python/libraries/l298/l298.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
class L298DC(): def __init__(self, Int1x, Int2x, en=None, freq=50, name="DCMotorX"): self.name = name self.int1x = Int1x self.int2x = Int2x self.en = en self.freq = freq def run(self, rate=50): if(self.en != None): self.en.setOption({self.freq, rate ...
32.694444
72
0.549703
29a9117224979bd85b9882ef589d710d8dba2215
1,834
py
Python
solutions/pedestrian_search/webserver/src/service/models/mobilenet.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-01-11T18:40:22.000Z
2021-01-11T18:40:22.000Z
solutions/pedestrian_search/webserver/src/service/models/mobilenet.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/pedestrian_search/webserver/src/service/models/mobilenet.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import torch.nn as nn import math """ Imported by https://github.com/marvis/pytorch-mobilenet/blob/master/main.py """ class MobileNetV1(nn.Module): def __init__(self, dropout_keep_prob=0.999): super(MobileNetV1, self).__init__() self.dropout_keep_prob = dropout_keep_prob self.dropout = nn...
30.065574
75
0.51145
29b862d5f54335f8d520dc3580872a5d95d7dab0
83,459
py
Python
src/onegov/org/layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/org/layout.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import babel.dates import re from babel import Locale from chameleon.utils import Markup from cached_property import cached_property from datetime import date, datetime, time, timedelta from dateutil import rrule from dateutil.rrule import rrulestr from decimal import Decimal from onegov.core.crypto import RANDOM_TOKE...
32.074942
79
0.486718
8a006cd6abe989089de90972888f0fa642bc8b0c
8,347
py
Python
Packs/Box/Integrations/BoxEventsCollector/BoxEventsCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Packs/Box/Integrations/BoxEventsCollector/BoxEventsCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
40
2022-03-03T07:34:00.000Z
2022-03-31T07:38:35.000Z
Packs/Box/Integrations/BoxEventsCollector/BoxEventsCollector.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
# pylint: disable=no-name-in-module # pylint: disable=no-self-argument import dateparser import secrets import jwt import urllib3 from cryptography import exceptions from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.serialization import load_pem_private_key from pydantic impo...
32.352713
88
0.667545
0a0a3aa0c094e714b73dcb1511666928d6411719
1,124
py
Python
oldp/apps/cases/views.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
3
2020-06-27T08:19:35.000Z
2020-12-27T17:46:02.000Z
oldp/apps/cases/views.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
oldp/apps/cases/views.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.shortcuts import render, get_object_or_404 from django.utils.translation import ugettext_lazy as _ from oldp.apps.cases.apps import is_read_more from oldp.apps.cases.models import Case from oldp.apps.lib.apps import Counter def inde...
28.1
72
0.672598
0ad069f1052b70408ecad1fa5a7acddceaab2af0
1,146
py
Python
___Python/Thomas/pycurs_180625/p04_oop/m02_oop_kalender.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Thomas/pycurs_180625/p04_oop/m02_oop_kalender.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Thomas/pycurs_180625/p04_oop/m02_oop_kalender.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
class Kalender(object): tagepromonat = (None, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) # None = Platzhalter def __init__(self, tag, monat, jahr): self.tag = tag self.monat = monat self.jahr = jahr def schaltjahr(self): return self.jahr % 400 == 0 or (self.ja...
31.833333
115
0.526178
7c9c7ffd625c0fa18a1453f1e44475dd6d9e6a84
592
py
Python
src/data/calc.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/data/calc.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
src/data/calc.py
dreaming-coder/RadarSet
c912298d0d6058c6647986524e5d95a205b51c1d
[ "MIT" ]
null
null
null
import numpy as np from numpy import ndarray from data.grid import grid_2d __all__ = ["quick_cr"] def quick_cr(r_list, resolution: float = 0.005) -> ndarray: r"""Calculate composite reflectivity """ r_data = list() for i in r_list: r, x, y = grid_2d( i["REF"].values, i["l...
24.666667
59
0.579392
7cbcfbe9587718499e3ae49b7fea01c2362c6f8a
3,757
py
Python
python/oneflow/experimental/load_mnist.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/experimental/load_mnist.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/experimental/load_mnist.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
36.833333
135
0.667022
7cc599ae83f6de95354f794bd6b3ecfa02578459
6,214
py
Python
retro/examples/determinism.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
2,706
2018-04-05T18:28:50.000Z
2022-03-29T16:56:59.000Z
retro/examples/determinism.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
242
2018-04-05T22:30:42.000Z
2022-03-19T01:55:11.000Z
retro/examples/determinism.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
464
2018-04-05T19:10:34.000Z
2022-03-28T13:33:32.000Z
""" Example wrapper to improve determinism of Retro environments """ import retro import numpy as np import argparse import gym import multiprocessing as mp CHUNK_LENGTH = 128 class MoreDeterministicRetroState(gym.Wrapper): """ Save/restore state on each step to avoid de-sync It's likely that reward and...
31.226131
118
0.608304
8699b02060c581b55997f0d63d6dff87e1bf1a02
3,291
py
Python
Openharmony v1.0/third_party/ltp/testcases/network/nfsv4/acl/test_acl.py
clkbit123/TheOpenHarmony
0e6bcd9dee9f1a2481d762966b8bbd24baad6159
[ "MIT" ]
1
2022-02-15T08:51:55.000Z
2022-02-15T08:51:55.000Z
hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/network/nfsv4/acl/test_acl.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
hihope_neptune-oh_hid/00_src/v0.3/third_party/ltp/testcases/network/nfsv4/acl/test_acl.py
dawmlight/vendor_oh_fun
bc9fb50920f06cd4c27399f60076f5793043c77d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 ''' Access Control Lists testing based on newpynfs framework Aurelien Charbon - Bull SA ''' from random_gen import * import subprocess import os import threading import time import random alphabet='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789_-() ~' t_alphabet=len(alphabet) d...
26.756098
95
0.643877
86fb52fdae4582e291a4a00660b755e02002dbab
2,829
py
Python
test/test_npu/test_network_ops/test_cross.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_cross.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_cross.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.753425
87
0.657476
d4cb11ec731795221a610959dd204a21e9fb24c4
22,866
py
Python
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/oneandone_server.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/oneandone_server.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/oneandone_server.py
tr3ck3r/linklight
5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7
[ "MIT" ]
null
null
null
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
32.806313
109
0.623677
6afa37814765f00d7f321af4e0d0b7bc4bc27113
2,498
py
Python
storage/emulated/0/qpython/projects3/reader/main.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
storage/emulated/0/qpython/projects3/reader/main.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
storage/emulated/0/qpython/projects3/reader/main.py
wangkaibiao/SettlersFinancialData3
498249e14f24bfa3186f07e8f66ee624d08c6ff1
[ "MIT" ]
null
null
null
#-*-coding:utf8-*- #qpy:console """This script shows how to use SL4A APIs in android""" import androidhelper,os,time droid = androidhelper.Android() #def speak(choice): # result = droid.ttsSpeak(choice) # return result.error is None def alert_dialog_with_buttons(): title = "閱讀模式" message = ("繼...
28.386364
74
0.643715
ed17cce72eb3194b63516cff6ed8b657ee15f829
316
py
Python
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.15-5-fibonacci-number.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.15-5-fibonacci-number.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-010/ph-10.15-5-fibonacci-number.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
fib_x = 1 fib_next = 1 n = int(input()) if n <= 2: fib_n = 1 else: i = 3 while i <= n: i += 1 fib_next, fib_x = fib_next + fib_x, fib_next """ fib_temp = fib_x + fib_next fib_x = fib_next fib_next = fib_temp """ fib_n = fib_next print(fib_n)
15.8
52
0.493671
9c596d9c9525a44ceeeedd0e68e225cdabda4cb4
9,884
py
Python
python/GenExpressionsFile.py
Greakz/mdh-cmake-cubevis
6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173
[ "MIT" ]
null
null
null
python/GenExpressionsFile.py
Greakz/mdh-cmake-cubevis
6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173
[ "MIT" ]
5
2021-08-24T11:09:54.000Z
2021-08-24T21:14:15.000Z
python/GenExpressionsFile.py
Greakz/mdh-cmake-cubevis
6c64ec0e14dcdd07e69fa1f018aa7954eeeaf173
[ "MIT" ]
null
null
null
from Expression import Expression from Whitespace import ws class ExpressionFileGenerator: @staticmethod def generate(data): mdh_cube_nest_template_file = open("./src/mdhconfig/include/gen_templates/gen_mdh_expressions.template.h", "r") raw_template = mdh_cube_nest_template_file.read() ...
47.519231
119
0.612707
1320e3109594ccff1c83638f9ecad9e0e075457e
2,048
py
Python
model_zoo/ernie-doc/model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
model_zoo/ernie-doc/model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
model_zoo/ernie-doc/model.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.641509
74
0.679199
136ea12cb6b6f76e31eff5a7edfad7ffa8c56b35
557
py
Python
Algorithms/DynamicProgramming/Fibonacci Numbers/fibonacci_dynamic.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
26
2019-07-17T11:05:43.000Z
2022-02-06T08:31:40.000Z
Algorithms/DynamicProgramming/Fibonacci Numbers/fibonacci_dynamic.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
7
2019-07-16T19:52:25.000Z
2022-01-08T08:03:44.000Z
Algorithms/DynamicProgramming/Fibonacci Numbers/fibonacci_dynamic.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
19
2020-01-14T02:44:28.000Z
2021-12-27T17:31:59.000Z
import time def print_next_fib(index): if fib_storage[index] != -1: return fib_storage[index] if index == 0: fib_storage[index] = 0 return 0 if index == 1: fib_storage[index] = 1 return 1 fib_storage[index] = print_next_fib(index-1) + print_next_fib(index-2) ...
21.423077
74
0.601436
137df4235d4782efaa0fc54f8cc92720d93b65a6
10,154
py
Python
sdks/python/apache_beam/io/gcp/datastore/v1new/types.py
diegomez17/beam
29dea08c873abc75871674762e68fd5b29b8052b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
2
2021-12-29T09:01:21.000Z
2022-02-26T14:32:16.000Z
sdks/python/apache_beam/io/gcp/datastore/v1new/types.py
diegomez17/beam
29dea08c873abc75871674762e68fd5b29b8052b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
4
2021-12-21T21:15:41.000Z
2022-02-15T19:21:28.000Z
sdks/python/apache_beam/io/gcp/datastore/v1new/types.py
diegomez17/beam
29dea08c873abc75871674762e68fd5b29b8052b
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause" ]
17
2021-12-15T19:31:54.000Z
2022-01-31T18:54:23.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
32.440895
80
0.662005
b9290a86f9ed5e5d44e1c063e55b2261fb9d8e07
218
py
Python
exercises/fr/test_03_16_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/fr/test_03_16_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/fr/test_03_16_01.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( "doc = nlp.make_doc(text)" in __solution__ or "doc = nlp.tokenizer(text)" in __solution__ ), "Est-ce que tu tokenises seulement le texte ?" __msg__.good("Bien joué !")
27.25
54
0.614679
b95ce1b7ed70fbfed9e21a96b022c449829e5a34
335
py
Python
leetcode/fixed.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
4
2018-11-14T12:03:05.000Z
2019-09-03T14:33:28.000Z
leetcode/fixed.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
null
null
null
leetcode/fixed.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
1
2018-11-17T14:39:22.000Z
2018-11-17T14:39:22.000Z
import os file_list =os.listdir("./cpp-version") def fixed( f): context=[]; with open (f,"r") as nf: context=nf.readlines(); context[2]=context[2].replace("emial","email") with open(f,"w") as nf: for v in context: nf.write(v); for f in file_list: if (f.endswith(".cpp")): fixed("./cp...
18.611111
50
0.58806
b98a994334f75df3b5ee9856536c7ff37b231082
2,710
py
Python
utilities/directory_setup.py
venkateshwara-gopisetti/basic-computer-games
d1625a1bdfd2e66b95223a37d7ae4346e6f99252
[ "MIT" ]
null
null
null
utilities/directory_setup.py
venkateshwara-gopisetti/basic-computer-games
d1625a1bdfd2e66b95223a37d7ae4346e6f99252
[ "MIT" ]
null
null
null
utilities/directory_setup.py
venkateshwara-gopisetti/basic-computer-games
d1625a1bdfd2e66b95223a37d7ae4346e6f99252
[ "MIT" ]
null
null
null
""" Use this code to setup the directory structure if you are starting from scratch. """ import os import re import unicodedata import urllib def slugify(value, allow_unicode=False): """ Taken from https://github.com/django/django/blob/master/django/utils/text.py Convert to ASCII if 'allow_unicode' is Fals...
48.392857
1,006
0.64797
e02e7e6e234b0b125c960f5e929eee3dbc273afb
9,559
py
Python
moviemon/views.py
42bbichero/MovieMon
4fee28e0449429ffcd3e0a284365a7f3e7c64e3d
[ "MIT" ]
null
null
null
moviemon/views.py
42bbichero/MovieMon
4fee28e0449429ffcd3e0a284365a7f3e7c64e3d
[ "MIT" ]
null
null
null
moviemon/views.py
42bbichero/MovieMon
4fee28e0449429ffcd3e0a284365a7f3e7c64e3d
[ "MIT" ]
1
2019-01-12T10:42:25.000Z
2019-01-12T10:42:25.000Z
import os import pickle from django.shortcuts import render from django.conf import settings from django.http import HttpResponse from django.http import Http404 from .classes.games import Games def position(width, position): pos = int(position / width) if position % width == 0: pos1 = width els...
25.558824
148
0.575269
4c3a4d3a7e45c07af426097fd4513a270eae5e8c
3,367
py
Python
TestBot/test_cogs/rpgFunctions/area.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/rpgFunctions/area.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
TestBot/test_cogs/rpgFunctions/area.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
from .. import sql, log, BASE_PATH, chunk, Page from random import randint, random, choice import json from .monster import get_monster from .equipment import (Equipment, generate_random_equipment, simple_weapons, advanced_weapons, complex_weapons, all_weapons, basic_armour, off_hands, all_armour, jewelry) from .consu...
34.010101
117
0.687853
e6e30f483541af6d8ebddbf75131629675241be0
5,703
py
Python
chapter6/trainningmodel.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
1
2020-02-16T13:31:42.000Z
2020-02-16T13:31:42.000Z
chapter6/trainningmodel.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
null
null
null
chapter6/trainningmodel.py
yangzhijiang/GeektimeTensorflow
80479426a216d1d27fc78e53c581008ccec46cbe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 2019/3/13 14:17 # @Author : LunaFire # @Email : gilgemesh2012@gmail.com # @File : trainningmodel.py import glob import pickle import numpy as np from PIL import Image from tensorflow import gfile from keras import backend as K from keras.models import Model from keras.layers...
29.246154
102
0.605821
5395b46132ed15cb2cbc3a4c7ace3395d3899a56
1,049
py
Python
pyntcloud/io/__init__.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
1,142
2016-10-10T08:55:30.000Z
2022-03-30T04:46:16.000Z
pyntcloud/io/__init__.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
195
2016-10-10T08:30:37.000Z
2022-02-17T12:51:17.000Z
pyntcloud/io/__init__.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
from pyntcloud.io.open3d import from_open3d, to_open3d from pyntcloud.io.pyvista import from_pyvista, to_pyvista from .ascii import read_ascii, write_ascii from .bin import read_bin, write_bin from .las import read_las from .npz import read_npz, write_npz from .obj import read_obj, write_obj from .ply import read_ply, ...
22.319149
57
0.662536
53f8d98d710567580daaf508031a03cdaae69f8d
286
py
Python
Python/032-Introduction-to-Sets.py
sadikkuzu/HackerRank
2b1ed2cf41f6a5404c5b9293186f301b646b5d33
[ "Apache-2.0" ]
5
2019-03-09T22:44:01.000Z
2021-09-14T00:11:38.000Z
Python/032-Introduction-to-Sets.py
jguerra7/HackerRank-4
7e1663d0050ffbb0fd885b8affdada9ea13b0e80
[ "Apache-2.0" ]
4
2018-08-16T09:39:47.000Z
2018-09-14T17:37:07.000Z
Python/032-Introduction-to-Sets.py
jguerra7/HackerRank-4
7e1663d0050ffbb0fd885b8affdada9ea13b0e80
[ "Apache-2.0" ]
1
2020-06-01T23:38:35.000Z
2020-06-01T23:38:35.000Z
from __future__ import division def average(array): # your code goes here numbers = set(array) return sum(numbers) / max(len(numbers), 1) if __name__ == '__main__': n = int(raw_input()) arr = map(int, raw_input().split()) result = average(arr) print result
23.833333
46
0.646853
91803d9b94bc05a66365c135a9f86115b6764666
3,245
py
Python
src/server/handlers/base.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
156
2021-11-19T18:50:14.000Z
2022-03-31T19:48:59.000Z
src/server/handlers/base.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
30
2021-12-27T19:30:56.000Z
2022-03-30T17:49:00.000Z
src/server/handlers/base.py
monosidev/monosi
a88b689fc74010b10dbabb32f4b2bdeae865f4d5
[ "Apache-2.0" ]
14
2022-01-17T23:24:34.000Z
2022-03-29T09:27:47.000Z
import abc import logging from flask import request from flask_restful import Resource, abort from sqlalchemy.exc import IntegrityError from server.middleware.db import db class BaseResource(Resource): @abc.abstractproperty def key(self): raise NotImplementedError @abc.abstractproperty de...
24.037037
93
0.566102
9187c557511ab5aacace10791f13238c2d1e41d7
901
py
Python
Calculation/sample_01.py
Tocha4/-Displacement--Chromatography
0baf4f9e2d23b39f610217b048d799c6403a259e
[ "MIT" ]
2
2020-11-25T07:53:48.000Z
2021-09-19T14:19:51.000Z
Calculation/sample_01.py
Tocha4/-Displacement--Chromatography
0baf4f9e2d23b39f610217b048d799c6403a259e
[ "MIT" ]
null
null
null
Calculation/sample_01.py
Tocha4/-Displacement--Chromatography
0baf4f9e2d23b39f610217b048d799c6403a259e
[ "MIT" ]
null
null
null
import numpy as np class Displacer(object): def __init__(self, disp_concentration=0): self.disp_concentration = disp_concentration class Sample(Displacer): ''' volume: cm**3 or ml composition: composition of the sample [part_1, part_2,...] g/ml or g/cm**3 concentration: concentration of the...
30.033333
87
0.675916
7277665b1fb6ecdd1945f7e7a43aa98df949c9a0
331
py
Python
Algorithms/DynamicProgramming/Catalan Number/catalan_number_recursive.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
26
2019-07-17T11:05:43.000Z
2022-02-06T08:31:40.000Z
Algorithms/DynamicProgramming/Catalan Number/catalan_number_recursive.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
7
2019-07-16T19:52:25.000Z
2022-01-08T08:03:44.000Z
Algorithms/DynamicProgramming/Catalan Number/catalan_number_recursive.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
19
2020-01-14T02:44:28.000Z
2021-12-27T17:31:59.000Z
import time def catalan(n): if n == 0 or n == 1: return 1 sum = 0 for i in range(n): sum += catalan(i) * catalan(n-i-1) return sum n = int(input()) init = time.time() for i in range(n): print(str(catalan(i)) + ' ', end = "") fin = time.time() print("\ntime: " + str(1000 * (fin-in...
17.421053
47
0.516616
72acdaba798685db875ad03b512170279b7644e1
1,744
py
Python
src/visuanalytics/tests/analytics/transform/types/test_transform_delete.py
mxsph/Data-Analytics
c82ff54b78f50b6660d7640bfee96ea68bef598f
[ "MIT" ]
3
2020-08-24T19:02:09.000Z
2021-05-27T20:22:41.000Z
src/visuanalytics/tests/analytics/transform/types/test_transform_delete.py
mxsph/Data-Analytics
c82ff54b78f50b6660d7640bfee96ea68bef598f
[ "MIT" ]
342
2020-08-13T10:24:23.000Z
2021-08-12T14:01:52.000Z
src/visuanalytics/tests/analytics/transform/types/test_transform_delete.py
visuanalytics/visuanalytics
f9cce7bc9e3227568939648ddd1dd6df02eac752
[ "MIT" ]
8
2020-09-01T07:11:18.000Z
2021-04-09T09:02:11.000Z
import unittest from visuanalytics.tests.analytics.transform.transform_test_helper import prepare_test class TestTransformDelete(unittest.TestCase): def setUp(self): self.data = { "hallo": 1, "test": 8, "test2": { "hallo": [ 1 ...
21.012048
86
0.391055
72d1cbec20bf0de43a726c67354cf634c9b491bf
812
py
Python
kts/models/multiclass.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
18
2019-02-14T13:10:07.000Z
2021-11-26T07:10:13.000Z
kts/models/multiclass.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-02-17T14:06:42.000Z
2019-09-15T18:05:54.000Z
kts/models/multiclass.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-09-15T13:12:42.000Z
2020-04-15T14:05:54.000Z
from kts.modelling.mixins import MulticlassMixin, NormalizeFillNAMixin from kts.models.common import XGBMixin, LGBMMixin, CatBoostMixin, all_estimators, BLACKLISTED_PARAMS __all__ = [] class XGBClassifier(MulticlassMixin, XGBMixin): pass class LGBMClassifier(MulticlassMixin, LGBMMixin): pass class CatBoostClassifier...
33.833333
100
0.745074
a3a8cd632f7f1c392fa495f6d4cfee78388e2924
3,184
py
Python
HeuristicMTable.py
sdimitro/zfas
4116072225f71415105b70e12aa461fc7466617a
[ "MIT" ]
1
2019-12-21T02:32:07.000Z
2019-12-21T02:32:07.000Z
HeuristicMTable.py
sdimitro/zfas
4116072225f71415105b70e12aa461fc7466617a
[ "MIT" ]
null
null
null
HeuristicMTable.py
sdimitro/zfas
4116072225f71415105b70e12aa461fc7466617a
[ "MIT" ]
null
null
null
from Model import Pool, MetaslabGroup, LogSpaceMapGroup import math class MTable(object): def generateRunningSums(self): msrsum, blkrsum = 0, 0 for sm in self.pool.logs.sms: blkrsum += sm.blocks msrsum += len(sm.metaslabs_flushed) self.blk_rsum.append(blkrsum) ...
32.824742
91
0.60804
430d767d0421609fd86bd2e7a4f743643e66c5df
3,215
py
Python
official_examples/Using_Hetero_Cluster_Framework_to_train_a_Pong_Player_with_Rllib/learner_algorithm_dir/hetero_learner.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
official_examples/Using_Hetero_Cluster_Framework_to_train_a_Pong_Player_with_Rllib/learner_algorithm_dir/hetero_learner.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
official_examples/Using_Hetero_Cluster_Framework_to_train_a_Pong_Player_with_Rllib/learner_algorithm_dir/hetero_learner.py
RuichunWang/ModelArts-Lab
cfa9a853e3a76a21eac2818f055b36978ac2bb69
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
from multiprocessing import Process import argparse import ray import os import time import sys from ray.rllib.agents.dqn import DQNTrainer from ray.rllib.agents.ppo import PPOTrainer from ray.rllib.env.policy_server_input import PolicyServerInput from ray.rllib.env import ExternalEnv from ray.tune.logger i...
32.15
115
0.636392
43bfa56d116c8e3b46d698589bca8bfcefe890cd
1,495
py
Python
tests/test_flashcardcollection_model.py
kalbe09/Kicards
ad64cfa808307b10f98f95dbb8cf0350995c3afd
[ "MIT" ]
null
null
null
tests/test_flashcardcollection_model.py
kalbe09/Kicards
ad64cfa808307b10f98f95dbb8cf0350995c3afd
[ "MIT" ]
null
null
null
tests/test_flashcardcollection_model.py
kalbe09/Kicards
ad64cfa808307b10f98f95dbb8cf0350995c3afd
[ "MIT" ]
null
null
null
import unittest from app import create_app, db from app.models.flashcard_collections import Collection from app.models.flashcard import Flashcard from app.models.category import Category class CollectionTestCase(unittest.TestCase): def setUp(self): self.app = create_app('testing') self.app_context...
33.977273
89
0.621405
78f1188c396bd2e93b5f07d7186c5b22fb3e7fb3
2,855
py
Python
tests/integration/scalar_fields/test_k_neighbors_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_k_neighbors_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_k_neighbors_scalar_fields.py
bernssolg/pyntcloud-master
84cf000b7a7f69a2c1b36f9624f05f65160bf992
[ "MIT" ]
215
2017-02-28T00:50:29.000Z
2022-03-22T17:01:31.000Z
import pytest import numpy as np @pytest.mark.usefixtures("plane_pyntcloud", "plane_k_neighbors") def test_eigen_values_coplanar_points_e3_is_0(plane_pyntcloud, plane_k_neighbors): plane_pyntcloud.add_scalar_field( "eigen_values", k_neighbors=plane_k_neighbors) assert plane_pyntcloud.points["...
39.109589
112
0.758319
71486da20709e42ca4428b7d75d47ca54611cd4a
8,204
py
Python
module/utils.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
module/utils.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
module/utils.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
2
2021-02-03T04:34:26.000Z
2021-02-03T06:32:48.000Z
import json import math from module.config import config import numpy import os from PIL import Image from pydicom import dcmread, FileDataset from pydicom.dicomdir import DicomDir from PyQt5.QtCore import QPointF, QRectF from PyQt5.QtGui import QPixmap from typing import Optional, Union def is_file_exists(path: str)...
31.675676
112
0.593003
715754284cdec07bd40c04b2cc7ec0fb4fb2e16c
14,333
py
Python
myems-normalization/virtualpoint.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
82
2021-02-19T10:24:31.000Z
2022-03-28T06:30:18.000Z
myems-normalization/virtualpoint.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
188
2021-02-22T07:08:30.000Z
2022-03-02T04:11:03.000Z
myems-normalization/virtualpoint.py
guangyuzhang/myems
c88f0620d3e36154a500c755c805333b771d09c0
[ "MIT" ]
54
2021-02-19T08:48:46.000Z
2022-03-30T06:21:34.000Z
import time from datetime import datetime, timedelta import mysql.connector from sympy import sympify from multiprocessing import Pool import random import json import config ######################################################################################################################## # PROCEDURES: # Step 1...
47.460265
120
0.486011
e0abda455793e4c5c6893889724ac6759a56ed06
315
py
Python
Music.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
1
2019-10-22T14:02:34.000Z
2019-10-22T14:02:34.000Z
Music.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
Music.py
BogyMitutoyoCTL/Riesen-Tetris-3
349d7b6f12c2ddf0b66683c904406a5e8596228d
[ "MIT" ]
null
null
null
import pygame class Music: def __init__(self, volume): self.volume = volume def start(self): pygame.mixer.music.load('./sounds/Tetris_theme.ogg') pygame.mixer.music.set_volume(self.volume) pygame.mixer.music.play(-1) def stop(self): pygame.mixer.music.stop()
21
60
0.634921
1cae2c8df210e5b1357bf290be4ed72081d148a6
1,065
py
Python
Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/08_selektives_verschieben/30_selektives_verschieben.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/08_selektives_verschieben/30_selektives_verschieben.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/08_selektives_verschieben/30_selektives_verschieben.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# 30_selektives_verschieben.py # Projekt aus dem Kapitel 9 (s. 243) für das selektive verschieben bzw. kopieren von Dateien # In diesem Script werden alle Dateien anhand ihrer Endungen in einen entsprechend der Endung # benannten Unterordner kopiert. # Um zu Verschieben .\\sorted mit in .\\sort_me umschreiben. # Auch...
39.444444
107
0.671362
c7981ca77e81f0fc7f61fd940b79e25a4a578c39
7,810
py
Python
kts/ui/components.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
18
2019-02-14T13:10:07.000Z
2021-11-26T07:10:13.000Z
kts/ui/components.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-02-17T14:06:42.000Z
2019-09-15T18:05:54.000Z
kts/ui/components.py
konodyuk/kts
3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7
[ "MIT" ]
2
2019-09-15T13:12:42.000Z
2020-04-15T14:05:54.000Z
import html from kts.settings import cfg from kts.ui.highlighting import highlighter class HTMLRepr: def _repr_html_(self): return f'<div class="kts">{self.html}</div>' class Column(HTMLRepr): def __init__(self, elements, border=False, style=""): self.elements = elements self.style ...
29.923372
213
0.574904
1bf4dc884455029632ad774c236fee97e996b017
1,099
py
Python
python/oneflow/compatible/single_client/experimental/typing_check.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
3,285
2020-07-31T05:51:22.000Z
2022-03-31T15:20:16.000Z
python/oneflow/compatible/single_client/experimental/typing_check.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
2,417
2020-07-31T06:28:58.000Z
2022-03-31T23:04:14.000Z
python/oneflow/compatible/single_client/experimental/typing_check.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
520
2020-07-31T05:52:42.000Z
2022-03-29T02:38:11.000Z
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
34.34375
75
0.791629
dc021b130c9c824b52a5e8efcf4034ec81b53776
8,792
py
Python
Vargi_Bots/ros_packages/pkg_ros_iot_bridge/scripts/node_action_server_ros_iot_bridge.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
1
2021-07-13T07:05:29.000Z
2021-07-13T07:05:29.000Z
Vargi_Bots/ros_packages/pkg_ros_iot_bridge/scripts/node_action_server_ros_iot_bridge.py
TejasPhutane/Eyantra-2021-Vargi-Bots
ab84a1304101850be8c0f69cfe6de70d53c33189
[ "MIT" ]
1
2021-06-05T07:58:03.000Z
2021-06-05T07:58:03.000Z
Vargi_Bots/ros_packages/pkg_ros_iot_bridge/scripts/node_action_server_ros_iot_bridge.py
ROBODITYA/Eyantra-2021-Vargi-Bots
f1c6a82c46e6e84486a4832b3fbcd02625849447
[ "MIT" ]
null
null
null
#!/usr/bin/env python '''ROS Node - Action Server - ROS IOT Bridge''' import threading import rospy import actionlib from pkg_ros_iot_bridge.msg import msgRosIotAction # Message Class that is used by ROS Actions internally from pkg_ros_iot_bridge.msg import msgRosIotResult # Message Class that is used for Action Re...
39.603604
105
0.580755
290a62bf6bf56ca6bf077f312925c66f1b2d90a9
466
py
Python
INBa/2015/Shemenev_A_V/task_5_30.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Shemenev_A_V/task_5_30.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Shemenev_A_V/task_5_30.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 4. Вариант 30. #Напишите программу, которая бы при запуске случайным образом отображала имя одного из трех племянников Скруджа МакДака. # Shemenev A.V # 28.03.16 import random print("Программа случайным образом отображает имя одного из трех племянников Скруджа МакДака.") x = int (random.randint(1,3)) print("И...
22.190476
120
0.714592
291d8385e697b83221223206c6ead45ff203e310
1,032
py
Python
face_sdk/utils/BuzException.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
1,329
2021-01-13T07:06:30.000Z
2022-03-31T07:23:39.000Z
face_sdk/utils/BuzException.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
115
2021-01-13T10:42:57.000Z
2022-03-28T03:57:52.000Z
face_sdk/utils/BuzException.py
weihaoxie/FaceX-Zoo
db0b087e4f4d28152e172d6c8d3767a8870733b4
[ "Apache-2.0" ]
351
2021-01-13T07:21:00.000Z
2022-03-29T14:11:39.000Z
""" @author: JiXuan Xu, Jun Wang @date: 20201015 @contact: jun21wangustc@gmail.com """ # all self defined exception is derived from BuzException class BuzException(Exception): pass class InputError(BuzException): def __init__(self): pass def __str__(self): return ("Input type error!") ...
26.461538
108
0.612403
468ec022ae6a32ffc092b051dc1b0fd0a8109de7
467
py
Python
CS208/exercise1/main.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
22
2018-08-07T06:55:10.000Z
2021-06-12T02:12:19.000Z
CS208/exercise1/main.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
28
2020-03-04T23:47:22.000Z
2022-02-26T18:50:00.000Z
CS208/exercise1/main.py
Wycers/Codelib
86d83787aa577b8f2d66b5410e73102411c45e46
[ "MIT" ]
4
2019-11-09T15:41:26.000Z
2021-10-10T08:56:57.000Z
import n, n2, n3, nf, nlogn, pown import time, dis def cal(i, f): start = time.process_time() f(i) end = time.process_time() return end - start cases = [3 ** i for i in range(0, 8)] f = open('res.csv', 'w') f.write('complexity') for i in cases: f.write(', n = %d' % i) f.write('\n') for now in [n...
20.304348
42
0.546039
d3f235108dae7fbe01e0e1d08957761628bf0ae4
149
py
Python
synchroload/plugins/dailymotion.py
rakennus/duraphilms.github.io
bdbecdfb55f4870b5ebf572cd2a7eb4e6770ea22
[ "MIT" ]
3
2020-07-08T08:58:46.000Z
2020-12-01T20:23:30.000Z
synchroload/plugins/dailymotion.py
rakennus/duraphilms.github.io
bdbecdfb55f4870b5ebf572cd2a7eb4e6770ea22
[ "MIT" ]
1
2020-12-30T12:49:43.000Z
2021-01-04T11:05:48.000Z
synchroload/plugins/dailymotion.py
rakennus/duraphilms.github.io
bdbecdfb55f4870b5ebf572cd2a7eb4e6770ea22
[ "MIT" ]
2
2018-06-21T17:45:11.000Z
2020-12-30T00:30:45.000Z
HOSTER_NAME = "dailymotion" HOSTER_KEEP_UNAVAILABLE_UPLOADS = False def linkFromId(id): return "https://www.dailymotion.com/embed/video/" + id
21.285714
58
0.758389
314e9946065064a43a8f57fee72660f662550bef
904
py
Python
ISTp/2014/ZINOVIEVA_Z_M/task5_40.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
ISTp/2014/ZINOVIEVA_Z_M/task5_40.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
ISTp/2014/ZINOVIEVA_Z_M/task5_40.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача5.Вариант40. #Напишите программу, которая бы при запуске случайным образом отображала название одного из четырнадцати гражданских чинов, занесенных в Петровскую «Табель о рангах» . #Zinovieva Z.M. #31.03.2016 impot random n=random.randint(1,14) elif n==1: print("Канцлер") elif n==2: print("Вице-Канцл...
23.789474
167
0.686947
48dce38984d7058fcf7911233fdac95fd3f06031
437
py
Python
Theories/Algorithms/Recursion1/SearchInBST/search_in_bst.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Theories/Algorithms/Recursion1/SearchInBST/search_in_bst.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Theories/Algorithms/Recursion1/SearchInBST/search_in_bst.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
# Definition for a binary tree node. from typing import Optional class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right def searchBST(root: Optional[TreeNode], val: int) -> Optional[TreeNode]: if not root: return ...
21.85
72
0.643021
d2f1e645294f9643ee6e2ae13dc3e7c70b9d3252
471
py
Python
reports/migrations/0012_auto_20161204_0013.py
Daniel-Hoerauf/cs3240-f16-team11
0377bcb8ede9599c04daf7683b065abb2a47f893
[ "MIT" ]
null
null
null
reports/migrations/0012_auto_20161204_0013.py
Daniel-Hoerauf/cs3240-f16-team11
0377bcb8ede9599c04daf7683b065abb2a47f893
[ "MIT" ]
null
null
null
reports/migrations/0012_auto_20161204_0013.py
Daniel-Hoerauf/cs3240-f16-team11
0377bcb8ede9599c04daf7683b065abb2a47f893
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import reports.models class Migration(migrations.Migration): dependencies = [ ('reports', '0011_auto_20161201_1807'), ] operations = [ migrations.AlterField( model_name='...
22.428571
98
0.639066
825e125fd56fc68dd166829207e8f1828e265bbd
267
py
Python
exercises/zh/test_02_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
2,085
2019-04-17T13:10:40.000Z
2022-03-30T21:51:46.000Z
exercises/zh/test_02_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
79
2019-04-18T14:42:55.000Z
2022-03-07T08:15:43.000Z
exercises/zh/test_02_09.py
Jette16/spacy-course
32df0c8f6192de6c9daba89740a28c0537e4d6a0
[ "MIT" ]
361
2019-04-17T13:34:32.000Z
2022-03-28T04:42:45.000Z
def test(): assert ( 'spacy.load("zh_core_web_md")' in __solution__ ), "你有正确读入中等规模的模型了吗?" assert "doc[2].vector" in __solution__, "你有得到正确的向量吗?" __msg__.good( "干得漂亮!下一个练习,我们会用spaCy来通过这些词向量计算document、span、和token" "之间的相似度。" )
26.7
60
0.629213
81470605703a47f983f2c45fe936a081d8dc2217
1,000
py
Python
test/test_tag12.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
test/test_tag12.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
test/test_tag12.py
kopp/pyventskalender
6f6455f3c1db07f65a772b2716e4be95fbcd1804
[ "MIT" ]
null
null
null
from unittest import TestCase try: from pyventskalender import tag12_loesung as heute except ImportError: from pyventskalender import tag12 as heute class Tag12Tests(TestCase): def test_10_volumen_wuerfel_mit_kantenlaenge(self): self.assertAlmostEqual(heute.volumen_wuerfel_mit_kantenlaenge(1), 1...
43.478261
78
0.717
81d234d946484d879d83753279d454a53703aa81
493
py
Python
task_3/io_handler.py
christopher-besch/bwinf39
e5394b37894a56608312057d179029d8a5df98fd
[ "MIT" ]
1
2021-01-04T15:16:44.000Z
2021-01-04T15:16:44.000Z
task_3/io_handler.py
christopher-besch/bwinf39
e5394b37894a56608312057d179029d8a5df98fd
[ "MIT" ]
null
null
null
task_3/io_handler.py
christopher-besch/bwinf39
e5394b37894a56608312057d179029d8a5df98fd
[ "MIT" ]
null
null
null
from typing import List def read_skill_levels(filepath) -> List[int]: """ read the skill levels and return a list of every skill level """ with open(filepath, "r", encoding="utf-8") as data: skill_levels = [] for skill_level in data: # every line in our open data ...
30.8125
70
0.622718
82fdf06617fd854af8a2ebb640c123d3c52fdb42
1,722
pyw
Python
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/07_multiclipboard/20_multiclipboard.pyw
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/07_multiclipboard/20_multiclipboard.pyw
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/07_multiclipboard/20_multiclipboard.pyw
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
# Dies ist die 2. Übungsaufgabe in welcher es darum geht ein Script zu erstellen welches mehrere vorgegebene Strings nacheinander in die Zwischenablage kopiert. # Die Endung pyw heisst dass Python beim ausführen kein Shellfenster anzeigt. # Dieses File solle mit der entsprechenden Bat-Datei gestartet werden mit dem S...
31.888889
160
0.70151
7385713469178caa8e25d3780616718bd330cd55
1,885
py
Python
python/oneflow/nn/modules/unsqueeze.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
python/oneflow/nn/modules/unsqueeze.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
python/oneflow/nn/modules/unsqueeze.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
31.949153
92
0.672149
73c585b748ac7a1a26f4bffe5acd3c3b58cd34db
2,198
py
Python
Create a Financial Hack/financialcalci.py
Akshu-on-github/MLH-INIT-2022
cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e
[ "MIT" ]
1
2021-07-05T14:30:34.000Z
2021-07-05T14:30:34.000Z
Create a Financial Hack/financialcalci.py
Akshu-on-github/MLH-INIT-2022
cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e
[ "MIT" ]
1
2021-07-02T15:36:02.000Z
2021-07-02T15:37:25.000Z
Create a Financial Hack/financialcalci.py
Akshu-on-github/MLH-INIT-2022
cf3fbbc8abd3eae3b958d3d482ed1fa1467f559e
[ "MIT" ]
1
2021-07-02T15:15:17.000Z
2021-07-02T15:15:17.000Z
# Program functions as an investment calculator and a home loan calculator import math ####### TOP MENU ####### print("Choose either 'investment' or 'bond' from the menu below to proceed: ") print("") print("investment - to calculate the amount of interest you'll earn on investment") print("bond - ...
32.323529
97
0.601911
839acb97958578d0d7629767cd59501bdd030e07
616
py
Python
src/test/test_transforms.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
2
2018-04-27T09:02:15.000Z
2019-04-19T19:12:13.000Z
src/test/test_transforms.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
1
2019-04-19T19:13:08.000Z
2021-02-22T21:29:55.000Z
src/test/test_transforms.py
kaphka/imi-master-thesis
2331a3534dc32e30a1333bb21c68c1e1b07ec9e4
[ "MIT" ]
null
null
null
from models.chen2017.transforms import * import numpy as np def test_tiles(): seg = np.concatenate((np.zeros((20,20)), np.ones((20,20)))) img = np.ones(seg.shape +(3,))*3 assert img.shape == (40, 20, 3) tiler = SegmentTiling(patch_width=20) patches, patch_meta = tiler(img, seg) assert len(pat...
26.782609
65
0.62013
83c2696eb14d854c068c59d90da5d9f27042481a
1,771
py
Python
Model/solarSysModel.py
fdienesch/Solar-System
617096bcb525a19ee94ff86948b53bd8a65e4386
[ "MIT" ]
null
null
null
Model/solarSysModel.py
fdienesch/Solar-System
617096bcb525a19ee94ff86948b53bd8a65e4386
[ "MIT" ]
null
null
null
Model/solarSysModel.py
fdienesch/Solar-System
617096bcb525a19ee94ff86948b53bd8a65e4386
[ "MIT" ]
null
null
null
# pylint: disable=wildcard-import, invalid-name, import-error, too-many-instance-attributes, too-few-public-methods, undefined-variable, missing-docstring __author__ = 'floriandienesch' """ This class saves various values of variables """ from Objekte.texturen import * class SolarSunModel(object): """ Class S...
28.111111
154
0.534726
f7aacc5f8e0a45da22dc547ae24c164483ef8a06
12,480
py
Python
fence/resources/openid/ras_oauth2.py
scottyellis/fence
012ba76a58853169e9ee8e3f44a0dc510f4b2543
[ "Apache-2.0" ]
null
null
null
fence/resources/openid/ras_oauth2.py
scottyellis/fence
012ba76a58853169e9ee8e3f44a0dc510f4b2543
[ "Apache-2.0" ]
null
null
null
fence/resources/openid/ras_oauth2.py
scottyellis/fence
012ba76a58853169e9ee8e3f44a0dc510f4b2543
[ "Apache-2.0" ]
null
null
null
import base64 import flask import httpx import requests import backoff from flask_sqlalchemy_session import current_session from jose import jwt as jose_jwt from authutils.errors import JWTError from authutils.token.core import get_iss, get_keys_url, get_kid, validate_jwt from cryptography.hazmat.backends import defau...
42.886598
115
0.523958
548789391813e5c2947ead38b83c97ad8025b81c
2,574
py
Python
image_segmentation/loss.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
image_segmentation/loss.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
image_segmentation/loss.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
2
2019-05-16T05:48:26.000Z
2021-01-27T01:26:22.000Z
import tensorflow as tf import keras as keras from tensorflow.python.keras.models import Model, load_model from tensorflow.python.keras import backend as K from sklearn.model_selection import train_test_split from tensorflow.python.keras.layers import Input, concatenate, Conv2D, MaxPooling2D, Conv2DTranspose from tenso...
40.21875
141
0.747475
b744bd4c1aa53485cb9946916d574dfe059a01f1
1,515
py
Python
Webpage/member/urls.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
Webpage/member/urls.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
46
2022-01-08T12:03:24.000Z
2022-03-30T08:51:05.000Z
Webpage/member/urls.py
ASV-Aachen/Website
bbfc02d71dde67fdf89a4b819b795a73435da7cf
[ "Apache-2.0" ]
null
null
null
"""Django URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
42.083333
88
0.69901
3f8550bfa7bce756c1ee9e86a39acd2bcec40a0a
441
py
Python
algorithm/insertion_sort.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
algorithm/insertion_sort.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
algorithm/insertion_sort.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
def insertion_sort(arr: list) -> None: """삽입 정렬 알고리즘 각 값이 어떤 위치에 가야할 지 찾음 :param arr: 정렬할 리스트 """ for i in range(1, len(arr)): element = arr[i] j = i - 1 while j >= 0 and element < arr[j]: arr[j+1] = arr[j] j -= 1 arr[j+1] = element if __name...
24.5
46
0.503401
4d7749b52e7520b92ecb71407ef5d2ecd9221b77
369
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/18. sum of digits in an integer.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/18. sum of digits in an integer.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Programming Languages/Python/Theory/100_Python_Challenges/Section _1_Basic_Coding_Exercises/18. sum of digits in an integer.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Write a Python function that randomly chooses any number 'n' from 100 to 300 (inclusive) and then calculates the sum of the digits in the number. Example : n = 156 total = 12 """ import random def sum_digits(): n = random.randint(100, 300) total = 0 for i in str(n): total += int(i) ...
15.375
89
0.582656
4d87060263661ed252ab1c87e352ff6618b09d5b
1,118
py
Python
zencad/examples/1.GeomPrim/1.prim3d/box.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
5
2018-04-11T14:11:40.000Z
2018-09-12T19:03:36.000Z
zencad/examples/1.GeomPrim/1.prim3d/box.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
zencad/examples/1.GeomPrim/1.prim3d/box.py
Spiritdude/zencad
4e63b1a6306dd235f4daa2791b10249f7546c95b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ ZenCad API example: box """ from zencad import * box_a = 10 box_b = 15 box_c = 20 # About center option: b0 = box(box_a, box_b, box_c) b0c = box(box_a, box_b, box_c, center=True) disp(b0, color=color.magenta) disp(b0c, color=color.cian) # API variants: m1 = box(box_a) m2 = box(box_a, box_...
24.844444
64
0.665474
4d8f2306e67293722d46111ebe376601c0e6cb3c
113
py
Python
src/python3_learn_video/if_condition5.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/if_condition5.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/python3_learn_video/if_condition5.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
# 三元操作符 x, y = 4, 3 if x < y: small = x else: small = y # 等价于 small = x if x < y else y print(small)
8.071429
25
0.504425
129a8ad934a5f47795a8f0f3853c82f912e030cb
4,530
py
Python
test/ternary.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
null
null
null
test/ternary.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
3
2020-03-24T18:18:21.000Z
2021-08-23T20:37:09.000Z
test/ternary.py
saeyoung/tslb
5f52646260e14f44c61a670cfc75509951e5e794
[ "MIT" ]
null
null
null
###################################################### # # Utility functions # ###################################################### import numpy as np import pandas as pd import random import copy import pickle from matplotlib import pyplot as plt from sklearn.linear_model import LinearRegression from numpy.linalg im...
31.241379
117
0.607947
4298e22bb3e92139e7cf8e7a85888edecd1761ba
1,588
py
Python
GZP_GTO_ArcMap/scripts/SCR_Projektion.py
msgis/swwat-gzp-template
080afbe9d49fb34ed60ba45654383d9cfca01e24
[ "MIT" ]
3
2019-06-18T15:28:09.000Z
2019-07-11T07:31:45.000Z
GZP_GTO_ArcMap/scripts/SCR_Projektion.py
msgis/swwat-gzp-template
080afbe9d49fb34ed60ba45654383d9cfca01e24
[ "MIT" ]
2
2019-07-11T14:03:25.000Z
2021-02-08T16:14:04.000Z
GZP_GTO_ArcMap/scripts/SCR_Projektion.py
msgis/swwat-gzp-template
080afbe9d49fb34ed60ba45654383d9cfca01e24
[ "MIT" ]
1
2019-06-12T11:07:37.000Z
2019-06-12T11:07:37.000Z
# -*- coding: utf-8 -*- """ @author: ms.gis, June 2020 Script for ArcGIS GTO for Modul GZP """ import arcpy import pythonaddins # Set counter and message content ErrorCount = 0 MessageInhalt = "" # Get data frame crs mxd = arcpy.mapping.MapDocument("CURRENT") for df in arcpy.mapping.ListDataFrames(mxd): if df....
32.408163
160
0.668766
c441bf89f4b4ba5b4235b3dbe194c2e7c1938254
6,140
py
Python
7-assets/past-student-repos/Graphs-Notes-master/lecture4/lecture4.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Graphs-Notes-master/lecture4/lecture4.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/Graphs-Notes-master/lecture4/lecture4.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
class Queue(): def __init__(self): self.queue = [] def enqueue(self, value): self.queue.append(value) def dequeue(self): if self.size() > 0: return self.queue.pop(0) else: return None def size(self): return len(self.queue) class Graph: ...
28.826291
146
0.584202
67a26b2663f922da675a66b9ed1389522456d040
5,626
py
Python
superstructure/geist.py
fossabot/superstructure
f4ab5cac269fb3dedfbd3a54c441af23edf3840b
[ "MIT" ]
null
null
null
superstructure/geist.py
fossabot/superstructure
f4ab5cac269fb3dedfbd3a54c441af23edf3840b
[ "MIT" ]
null
null
null
superstructure/geist.py
fossabot/superstructure
f4ab5cac269fb3dedfbd3a54c441af23edf3840b
[ "MIT" ]
null
null
null
from superstructure.grundbegriffe import ( Allgemeinheit, AnsichSein, Einzelheit, FürUnsSein, Identität, ) from superstructure.logik import Relation, Unknown from superstructure.utils import is_compatible class Bewusstsein: def __init__(self, name, begriffe={}): self._name = name ...
33.289941
151
0.584252
db0ccedfb0dc93e32170eb15c1e9b96753080586
40,768
py
Python
Packs/AccentureCTI/Integrations/ACTIIndicatorQuery/ACTIIndicatorQuery.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Packs/AccentureCTI/Integrations/ACTIIndicatorQuery/ACTIIndicatorQuery.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
Packs/AccentureCTI/Integrations/ACTIIndicatorQuery/ACTIIndicatorQuery.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
null
null
null
from typing import Union from CommonServerPython import * # Disable insecure warnings requests.packages.urllib3.disable_warnings() '''CONSTANTS''' DATE_FORMAT = '%Y-%m-%d %H:%M:%S' IDEFENSE_URL_TEMPLATE = "https://intelgraph.idefense.com/#/node/{0}/view/{1}" ATTACHMENT_LINK = 'https://intelgraph.idefense.com/rest/file...
46.69874
261
0.637142
3f0bc7016e25ee7f5b5b3e2930d7e6323cad07c7
9,688
py
Python
taxiMeter.py
Wrg1t/taxiMeter
c8a9d212954ae2ffb035d99442c97b461eaba7f1
[ "MIT" ]
null
null
null
taxiMeter.py
Wrg1t/taxiMeter
c8a9d212954ae2ffb035d99442c97b461eaba7f1
[ "MIT" ]
null
null
null
taxiMeter.py
Wrg1t/taxiMeter
c8a9d212954ae2ffb035d99442c97b461eaba7f1
[ "MIT" ]
null
null
null
#!usr/bin/python # Author:DBUCK # -*- coding: utf-8 -*- from PyQt5 import QtCore from PyQt5 import QtGui from PyQt5.QtWinExtras import QtWin from PyQt5.QtGui import QFont, QRegExpValidator from PyQt5.QtWidgets import QCheckBox, QLineEdit, QMessageBox, QWidget, QPushButton, QApplication, QGridLayout, QLabel fr...
40.366667
136
0.604872
18e5d2bc79b49e34cb8a0869da32392bf453cd46
282
py
Python
finbyz_dashboard/finbyz_dashboard/dashboard_overrides/after_install.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
1
2021-11-19T05:27:11.000Z
2021-11-19T05:27:11.000Z
finbyz_dashboard/finbyz_dashboard/dashboard_overrides/after_install.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
null
null
null
finbyz_dashboard/finbyz_dashboard/dashboard_overrides/after_install.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
2
2021-08-21T10:41:38.000Z
2021-11-19T05:27:13.000Z
import frappe @frappe.whitelist() def after_install(): from finbyz_dashboard.patches.property_setter.property_setter import execute execute() from finbyz_dashboard.finbyz_dashboard.dashboard_overrides.dashboard_utils import sync_dashboards sync_dashboards('finbyz_dashboard')
28.2
98
0.858156
e16e92551da0ebc94855a19afcee2351ccf00f9b
709
py
Python
source/pkgsrc/lang/mozjs78/patches/patch-js_src_tests_jstests.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/lang/mozjs78/patches/patch-js_src_tests_jstests.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/lang/mozjs78/patches/patch-js_src_tests_jstests.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-js_src_tests_jstests.py,v 1.1 2020/12/14 22:45:10 gutteridge Exp $ Get Unix test scaffolding to run on platforms other than Linux and macOS. --- js/src/tests/jstests.py.orig 2020-11-04 10:51:58.000000000 +0000 +++ js/src/tests/jstests.py @@ -32,10 +32,10 @@ from lib.tests import RefTestCase, get_j fro...
33.761905
81
0.753173
833da25794821430ccc8815a4ec12d96fcd98b85
222
py
Python
setup_ghost.py
nebulousdog/catcobralizard
0be598b9e76addbe25684ca60aa5ae324cc42183
[ "MIT" ]
null
null
null
setup_ghost.py
nebulousdog/catcobralizard
0be598b9e76addbe25684ca60aa5ae324cc42183
[ "MIT" ]
null
null
null
setup_ghost.py
nebulousdog/catcobralizard
0be598b9e76addbe25684ca60aa5ae324cc42183
[ "MIT" ]
null
null
null
"""setup Ghost""" from refresh_info import get_droplet_ip def setup_ghost(): """set up admin ghost stuff""" droplet_ip = get_droplet_ip() print('!', droplet_ip) if __name__ == '__main__': setup_ghost()
17.076923
39
0.666667