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
0134094227f2caeed1ede6d6ea96245294f645b1
13,843
py
Python
contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/train_yolov3_moxing.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/train_yolov3_moxing.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
contrib/0.挖宝行动/youzidata-机坪跑道航空器识别/src/train_yolov3_moxing.py
huaweicloud/ModelArts-Lab
75d06fb70d81469cc23cd422200877ce443866be
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
# Copyright 2018 Deep Learning Service of Huawei Cloud. 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...
41.821752
105
0.600448
0997e0b3ad9fd1026fc9cfc10dc24d86f85cabfe
1,194
py
Python
books/PythonAutomate/excel_spreadsheets/read_census_excel.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/excel_spreadsheets/read_census_excel.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/excel_spreadsheets/read_census_excel.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""read_census_excel.py 스프레드시트에서 데이터 읽기 """ import openpyxl import pprint print("Opening workbook...") wb = openpyxl.load_workbook("censuspopdata.xlsx") sheet = wb["Population by Census Tract"] country_data = {} # Fill in country_data with each country's population and tracts print("Reading rows...") for row in range...
33.166667
68
0.70603
28f5759df8720ec4a9248b6a89caefd95394286b
2,509
py
Python
Packs/McAfee_ESM-v10/Integrations/McAfee_ESM-v10/McAfee_ESM-v10_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/McAfee_ESM-v10/Integrations/McAfee_ESM-v10/McAfee_ESM-v10_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/McAfee_ESM-v10/Integrations/McAfee_ESM-v10/McAfee_ESM-v10_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 import importlib integration_params = { 'insecure': 'False', 'version': '10.2', 'credentials': { 'identifier': 'Test', 'password': 'my_password' }, 'time_format': 'auto-discovery', 'timezone': 0, 'ip': '0.0.0.0', 'port': '0000'...
34.369863
115
0.545636
c90e1331a706819f3bdc3ad28d450f6b7d93afac
948
py
Python
Zh3r0/2021/pwn/javascript_for_dummies_part_2/build/release/connect.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
Zh3r0/2021/pwn/javascript_for_dummies_part_2/build/release/connect.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
Zh3r0/2021/pwn/javascript_for_dummies_part_2/build/release/connect.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys import os import binascii import re import subprocess import signal def handler(x, y): sys.exit(-1) signal.signal(signal.SIGALRM, handler) signal.alarm(30) def gen_filename(): return '/tmp/' + binascii.hexlify(os.urandom(16)).decode('utf-8') EOF = 'zh3r0-CTF' MAX_SIZE = 10000 ...
20.170213
78
0.554852
c90f5ceb0c4e1e538a14e7ff025cd4882c6d783a
4,916
py
Python
plugins/tff_backend/dal/investment_agreements.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
null
null
null
plugins/tff_backend/dal/investment_agreements.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
178
2017-08-02T12:58:06.000Z
2017-12-20T15:01:12.000Z
plugins/tff_backend/dal/investment_agreements.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
2
2018-01-10T10:43:12.000Z
2018-03-18T10:42:23.000Z
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
45.100917
118
0.748373
c92d0ded8504ea1101fcf580bb7628513590124d
3,395
py
Python
src/bo4e/bo/zaehler.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
src/bo4e/bo/zaehler.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
src/bo4e/bo/zaehler.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
""" Contains Zaehler class and corresponding marshmallow schema for de-/serialization """ from datetime import datetime from decimal import Decimal from typing import List, Optional import attr from marshmallow import fields from marshmallow_enum import EnumField # type:ignore[import] from bo4e.bo.geschaeftsobjekt i...
39.476744
168
0.761414
6e7ff51a265d3af8113ad2447b152eb07b8f270b
3,114
py
Python
src/test/tests/databases/GDAL.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/databases/GDAL.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/databases/GDAL.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: GDAL.py # # Tests: mesh - 2D structured, 3D unstructured # plots - Contour, Pseudocolor # # Programmer: Brad Whitlock # Date: Thu Sep 8 16:35:17 PST 2005 # # Modificat...
29.102804
78
0.625883
6e01426a91242e8143e90445ddbb0add09b1b3ce
1,031
pyde
Python
sketches/sidescroller1/sidescroller1.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/sidescroller1/sidescroller1.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/sidescroller1/sidescroller1.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
# Side Scroller 1 from backgrounds import Hill, Cloud from sprites import Alien FPS = 60 clouds = [] bighills = [] smallhills = [] sprites = [] def setup(): size(800, 450) this.surface.setTitle("Side Scroller 1") clouds.append(Cloud(400, -1)) for i in range(3): bighills.append(Hill(i*400, 200...
22.911111
58
0.590689
256d329cc93625c20a4d63565c5551199d2b01fa
2,523
py
Python
research/cv/SRGAN/src/dataset/testdataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/SRGAN/src/dataset/testdataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/SRGAN/src/dataset/testdataset.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
37.656716
113
0.620293
6c52365b5c50ddc800191e752776e3e63c18e871
522
py
Python
libs/common.py
tschitschable/surelock
a93c7e9eae73d9534edc23d86ccca888f8435c46
[ "MIT" ]
null
null
null
libs/common.py
tschitschable/surelock
a93c7e9eae73d9534edc23d86ccca888f8435c46
[ "MIT" ]
2
2019-10-15T19:07:33.000Z
2019-10-30T14:05:10.000Z
libs/common.py
tschitschable/surelock
a93c7e9eae73d9534edc23d86ccca888f8435c46
[ "MIT" ]
1
2019-10-14T16:28:07.000Z
2019-10-14T16:28:07.000Z
#!/usr/bin/env python import getpass def get_master_pass(text="Type your passphrase: "): # text: The default text to show the user while asking for password secret = getpass.getpass("{}".format(text)) secret_validate = getpass.getpass("Retype your passphrase: ") if secret != secret_validate: p...
30.705882
71
0.687739
c6f266ec02f306c808a682980a37fc72ef57828b
1,619
py
Python
test/test_npu/test_network_ops/test_copy_repoint.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_copy_repoint.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_copy_repoint.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...
36.795455
82
0.675726
3cad7f89805cdf113a553e3ecb2d53dd50350255
4,731
py
Python
aas_chronik_scraper.py
WZBSocialScienceCenter/aas-chronik-scraper
ed18ca22149616185825c7f38b4317ce20323be7
[ "Apache-2.0" ]
null
null
null
aas_chronik_scraper.py
WZBSocialScienceCenter/aas-chronik-scraper
ed18ca22149616185825c7f38b4317ce20323be7
[ "Apache-2.0" ]
null
null
null
aas_chronik_scraper.py
WZBSocialScienceCenter/aas-chronik-scraper
ed18ca22149616185825c7f38b4317ce20323be7
[ "Apache-2.0" ]
null
null
null
""" Web-Scraper für Chronik von antisemitischen Vorfällen erstellt von der Amadeu Antonio Stiftung und publiziert unter https://www.amadeu-antonio-stiftung.de/chronik/. Autor: Markus Konrad <markus.konrad@wzb.eu> Datum: 2. Sept. 2020 """ from time import sleep import os import json import requests from bs4 import Be...
29.385093
115
0.632213
a702261dd0b4a0b72733e26dc71bfc6dd9cd4f80
765
py
Python
writeRfid.py
machigattan/Wortschatz
171ba76bebdfd5feaa41e3aa0d07d73988c72c9a
[ "MIT" ]
null
null
null
writeRfid.py
machigattan/Wortschatz
171ba76bebdfd5feaa41e3aa0d07d73988c72c9a
[ "MIT" ]
null
null
null
writeRfid.py
machigattan/Wortschatz
171ba76bebdfd5feaa41e3aa0d07d73988c72c9a
[ "MIT" ]
null
null
null
import sys import RPi.GPIO as GPIO #https://github.com/pimylifeup/MFRC522-python A python library to read/write RFID tags via the budget MFRC522 RFID module. from mfrc522 import SimpleMFRC522 # sys.argv[0] is reserved for the filepath!!! 1 is an array of the things u pass on!! remeeeeember new_word = sys.argv[1] r...
21.25
122
0.696732
596bc93a85f028286775f20f0cec02086c4c2614
648
py
Python
sysopt.py
WhiteMoscou/Adm3
24cbccafd31b2cec1d355b6e8714da88a0a4cc6e
[ "Unlicense" ]
null
null
null
sysopt.py
WhiteMoscou/Adm3
24cbccafd31b2cec1d355b6e8714da88a0a4cc6e
[ "Unlicense" ]
null
null
null
sysopt.py
WhiteMoscou/Adm3
24cbccafd31b2cec1d355b6e8714da88a0a4cc6e
[ "Unlicense" ]
null
null
null
from tkinter import * from tkinter import messagebox win_sysopt = Tk() win_sysopt.title("Adm3 V.1.0.0 - Opções do sistema") largura_screen = win_sysopt.winfo_screenwidth() altura_screen = win_sysopt.winfo_screenheight() largura = 1500 altura = 800 posx = largura_screen/2 - largura/2 posy = altura_screen/2 - altura/...
21.6
72
0.712963
05584c3df95d5dc0efa96f7e7b8d58805a853550
92
py
Python
Algorithms/Implementation/utopian_tree.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Algorithms/Implementation/utopian_tree.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
Algorithms/Implementation/utopian_tree.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
for i in range(int(input())): n = int(input()) print( ~ ( ~ 1 << (n >> 1)) << n % 2)
30.666667
41
0.413043
55326dd22d886bc08885ea74c658148ed713cb79
81
py
Python
dataset/utils/config.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
dataset/utils/config.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
dataset/utils/config.py
baowj-678/TC
4c9bf6bf2202c9930616259d3f3e1a2b0529a6e6
[ "MIT" ]
null
null
null
""" 训练时数据加载的配置文件 @Author: Bao Wenjie @Email: bwj_678@qq.com @Date: 2020/10/30 """
16.2
22
0.691358
348ce86305c4fe4ca4a718f8e82098bfa2ce8bd8
924
py
Python
tests/re_slow_testcase.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
2
2020-12-25T19:37:42.000Z
2021-03-26T04:59:12.000Z
tests/re_slow_testcase.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
6
2018-08-07T22:48:52.000Z
2021-10-07T18:38:20.000Z
tests/re_slow_testcase.py
jecki/DHParser
c6c1bd7db2de85b5997a3640242f4f444532304e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 """This testcase exposes a performance bug in the `re`-module of the python standard-library: >>> import re, timeit >>> rx = re.compile('(\\s*(#.*)?\\s*)*X') >>> print(timeit.timeit("rx.match(' # ')", number=1, globals=globals())) 24.814577618999465 >>> print(timeit.timeit("rx.match...
25.666667
86
0.561688
1fd411b39a0165a5fe1edc84f51c6f36e0f8d48a
73
py
Python
Online-Judges/CodingBat/Python/Warmup-01/07-near_hundred.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/Warmup-01/07-near_hundred.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/Warmup-01/07-near_hundred.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def near_hundred(n): return (abs(100-n) <= 10) or (abs(200-n) <= 10)
24.333333
51
0.575342
c07c59ff5151b1aa862deaacf6191745b931f6d9
10,903
py
Python
rtm.py
Alpacow/Reverse-TM
43f4a226454471093abcedf638f0d27457810c3c
[ "MIT" ]
null
null
null
rtm.py
Alpacow/Reverse-TM
43f4a226454471093abcedf638f0d27457810c3c
[ "MIT" ]
null
null
null
rtm.py
Alpacow/Reverse-TM
43f4a226454471093abcedf638f0d27457810c3c
[ "MIT" ]
null
null
null
class Rtm: nStates = 0 nInput = 0 nTape = 0 nTransitions = 0 states = [] alphaInput = [] alphaTape = [] transitions = [] moveT = [] # guarda apenas transições de escrita writeT = [] input = [] inputTape = [] historyTape = [] outputTape = [] head = 0 # posica...
44.502041
142
0.578006
23fadf139c492021a68eccf36e4f212991f3fe9d
806
py
Python
PMIa/2014/danilov_d_a/task_4_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2014/danilov_d_a/task_4_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PMIa/2014/danilov_d_a/task_4_6.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 4. Вариант 6. #Напишите программу, которая выводит имя, под которым скрывается София Шиколоне. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). Для хранения всех необходимы...
50.375
435
0.775434
f1986b440277a791b19e72e1ad22104ab8123543
1,008
py
Python
___Python/RomanS/untitled/p02_listen/m02_woerterbuecher.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/RomanS/untitled/p02_listen/m02_woerterbuecher.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/RomanS/untitled/p02_listen/m02_woerterbuecher.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
# Wörterbuch, Dictionary d= {"Tisch": "table", "Stuhl": "chair", "Schreibtisch": "desk"} # Aus einem Wörterbuch einen Wert anhand eines Schlüssels ermitteln: #print(d["Stuhl"]) deutsch = input("Deutsches Wort?") print("Du hast eingegeben:" + deutsch) # Ansatz 1: LBYL (Look Before You Leap) if...
22.909091
81
0.666667
c8cf8b5f27d9b259f8366b9afc05788edd11a130
1,951
py
Python
solutions/im2recipe/src/recipe2embed.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
1
2021-01-11T18:40:22.000Z
2021-01-11T18:40:22.000Z
solutions/im2recipe/src/recipe2embed.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
solutions/im2recipe/src/recipe2embed.py
naetimus/bootcamp
0182992df7c54012944b51fe9b70532ab6a0059b
[ "Apache-2.0" ]
null
null
null
import time import torch import torch.nn as nn import torch.nn.parallel import torchvision.transforms as transforms import torchvision.datasets as datasets import torchvision.models as models import torch.backends.cudnn as cudnn from src.data_loader import RecipeLoader import numpy as np from src.trijoint...
25.337662
92
0.661199
b5a557c954f7ffcfac3e95e53e6b6c6056754ee5
486
py
Python
my_lda2.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
my_lda2.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
my_lda2.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # 中文注释 import lda import matplotlib.pyplot as plt X = lda.datasets.load_reuters() titles = lda.datasets.load_reuters_titles() X_train = X[10:] X_test = X[:10] titles_test = titles[:10] model = lda.LDA(n_topics=20, n_iter=1500, random_state=1) model.fit(X_train) doc_topic_test = model.transform...
24.3
62
0.718107
8d767f25e57b01481ab11e35426ede8a33888eed
5,891
py
Python
LibMS/libapp/migrations/0002_auto_20210418_2156.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
2
2021-05-31T13:11:50.000Z
2021-06-05T04:37:51.000Z
LibMS/libapp/migrations/0002_auto_20210418_2156.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
LibMS/libapp/migrations/0002_auto_20210418_2156.py
StephenWayen/LibMS
df6078a8171f77b75f2ad3ac91e9747ef753d2a6
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2021-04-18 21:56 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('libapp', '0001_initial'), ] operations = [ migrations.AddField( mo...
36.590062
152
0.558649
5706dad740564e57ae8f4db236542fa4a5a33aec
467
py
Python
011-C107-DataAnalysis/__main__.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
2
2021-09-28T13:55:20.000Z
2021-11-15T10:08:49.000Z
011-C107-DataAnalysis/__main__.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
null
null
null
011-C107-DataAnalysis/__main__.py
somePythonProgrammer/PythonCode
fb2b2245db631cefd916a960768f411969b0e78f
[ "MIT" ]
1
2022-01-20T03:02:20.000Z
2022-01-20T03:02:20.000Z
# 011-C107-DataAnalysis # This is a python script made by @somePythonProgrammer # for a WhiteHat Junior project. import pandas as pd import plotly.express as px df = pd.read_csv('011-C107-DataAnalysis/csv/data.csv') mean_attempts = df.groupby(["student_id", "level"], as_index=False)["attempt"].mean() plot = px.scatte...
38.916667
94
0.751606
572585c43dc9a765903d8438ca9123331e76d20e
12,670
py
Python
AP_SS16/US1/PythonSkript.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
3
2016-04-27T17:07:00.000Z
2022-02-02T15:43:15.000Z
AP_SS16/US1/PythonSkript.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
5
2016-04-27T17:10:03.000Z
2017-06-20T14:54:20.000Z
AP_SS16/US1/PythonSkript.py
DimensionalScoop/kautschuk
90403f97cd60b9716cb6a06668196891d5d96578
[ "MIT" ]
null
null
null
##################################################### Import system libraries ###################################################### import matplotlib as mpl mpl.rcdefaults() mpl.rcParams.update(mpl.rc_params_from_file('meine-matplotlibrc')) import matplotlib.pyplot as plt import numpy as np import scipy.constants as c...
41.677632
154
0.603788
9e022327700f0a3932f033c3f587f907a5068b3b
356
py
Python
MazeSolving/Solver/Maze.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
5
2018-02-06T22:48:34.000Z
2020-01-07T20:19:05.000Z
MazeSolving/Solver/Maze.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
11
2018-01-31T21:47:49.000Z
2018-04-21T16:42:52.000Z
MazeSolving/Solver/Maze.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
2
2020-06-18T05:40:03.000Z
2022-02-02T03:46:30.000Z
import networkx as nx class Maze: def __init__(self): self.graph = nx.DiGraph() def add_cell(self, cell): coordinate = (cell.row, cell.column) self.graph.add_node(coordinate) def add_edge(self, cell1, cell2): coordinate1 = (cell1.row, cell1.column) coordinate2 = (cell2.row, cell2.column) self.grap...
20.941176
47
0.72191
7e1194462fcc9124799e9a70278b768c8bbfbcae
618
py
Python
dash/forms.py
bdioui/DashboardFeder
455737c828f1c04651af495f60d6637131b911f5
[ "MIT" ]
null
null
null
dash/forms.py
bdioui/DashboardFeder
455737c828f1c04651af495f60d6637131b911f5
[ "MIT" ]
null
null
null
dash/forms.py
bdioui/DashboardFeder
455737c828f1c04651af495f60d6637131b911f5
[ "MIT" ]
null
null
null
from django.forms import ModelForm from django.contrib.auth.forms import UserCreationForm from django import forms from django.contrib.auth.models import User from .models import Profile, Enveloppe class CreateUserForm(UserCreationForm): class Meta: model = User fields = ['username', 'email', 'password1', 'pass...
22.888889
58
0.754045
8b6f75dd30e7c0074f4ebef6fccc693db3cb6126
1,381
py
Python
AutosClasificados/core/migrations/0001_initial.py
joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU
2997359150236a7d897a3f9201f8e9404f3d7f02
[ "MIT" ]
null
null
null
AutosClasificados/core/migrations/0001_initial.py
joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU
2997359150236a7d897a3f9201f8e9404f3d7f02
[ "MIT" ]
null
null
null
AutosClasificados/core/migrations/0001_initial.py
joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU
2997359150236a7d897a3f9201f8e9404f3d7f02
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-10 20:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Articu...
41.848485
182
0.604634
8baffaf0abc0c3d806c174dc7eb3e048d1766185
457
py
Python
49-group-anagrams/49-group-anagrams.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
49-group-anagrams/49-group-anagrams.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
49-group-anagrams/49-group-anagrams.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def groupAnagrams(self, strs: List[str]) -> List[List[str]]: anagram=dict() for word in strs: wordkey="" for c in sorted(set(word)): wordkey+=c+str(word.count(c)) if wordkey in anagram: anagram[wordkey].append(word) ...
35.153846
64
0.485777
47e5a49005a32476fb2698659579416a708fe42f
5,126
py
Python
official/cv/MCNN/src/mcnn.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/MCNN/src/mcnn.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/MCNN/src/mcnn.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...
42.716667
114
0.542918
d0dff5230d92a827ef3bc901188436c343bb503f
1,151
py
Python
opencv_tutorial/opencv3_youtube/prog09.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
opencv_tutorial/opencv3_youtube/prog09.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
opencv_tutorial/opencv3_youtube/prog09.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Mar 25 16:02:19 2019 @author: jone """ import cv2 import numpy as np def main(): # 0 : 검은색 이미지(512 x 512) img1 = np.zeros((512, 512, 3), np.uint8) # 원그리기 # params : 원본, 점1, 점2, 선색, 두께 cv2.line(img1, (0, 99), (99, 0), (255, 0, 0), 2) # 사각형 ...
25.577778
87
0.509123
4bec821202132fac67b4716a7c014731e7dea8a3
942
py
Python
oldp/apps/laws/management/commands/set_law_book_order.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
3
2020-06-27T08:19:35.000Z
2020-12-27T17:46:02.000Z
oldp/apps/laws/management/commands/set_law_book_order.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
oldp/apps/laws/management/commands/set_law_book_order.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
import logging from django.core.management import BaseCommand from oldp.apps.laws.models import LawBook LAW_BOOK_ORDER = { 'bgb': 10, 'agg': 9, 'bafog': 9, } # Get an instance of a logger logger = logging.getLogger(__name__) class Command(BaseCommand): help = 'Assign predefined order values to la...
22.428571
70
0.600849
327dda3c373a16b16b5485ed2a765b634fce92fb
273
py
Python
Algorithms/Sorting/InsertionSort1.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Sorting/InsertionSort1.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
Algorithms/Sorting/InsertionSort1.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 size = int(raw_input()) arr = raw_input().split() e = arr[-1] for i in xrange(size-1, -1, -1): if i == 0 or arr[i-1] <= e: arr[i] = e print ' '.join(arr) break else: arr[i] = arr[i-1] print ' '.join(arr)
17.0625
32
0.461538
de19625236a537e6e1a6be78188953ecf5529b60
2,178
py
Python
gemtown/gems/migrations/0001_initial.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
gemtown/gems/migrations/0001_initial.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
5
2020-09-04T20:13:39.000Z
2022-02-17T22:03:33.000Z
gemtown/gems/migrations/0001_initial.py
doramong0926/gemtown
2c39284e3c68f0cc11994bed0ee2abaad0ea06b6
[ "MIT" ]
null
null
null
# Generated by Django 2.0.13 on 2019-04-20 06:10 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='BonusGem', fields=[ ('id', models.AutoFiel...
35.129032
114
0.522957
deb0dbe1b5b65728de2063ce38c6a60bfe61b1b0
711
py
Python
seperate_abstracts_clean2/seperate_file.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
seperate_abstracts_clean2/seperate_file.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
seperate_abstracts_clean2/seperate_file.py
pku601/LDA
a4bcd3e40ed2920dc29bf0270eab05b245ea003e
[ "Apache-2.0" ]
null
null
null
fout_name = open('file_name.txt', 'wb') fout_abstracts = open('abstracts.txt', 'wb') with open('../abstracts_clean2.txt', 'r') as f: count = 0 file_name_record = f.readline() abstract_record = f.readline() while file_name_record.strip() != '': count += 1 print count if abstract...
29.625
53
0.651195
e4569c79cabf8988134014d9f2ddcba283e4808d
203
py
Python
DataStructures/LinkedList/ReverseDoubly.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
DataStructures/LinkedList/ReverseDoubly.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
DataStructures/LinkedList/ReverseDoubly.py
baby5/HackerRank
1e68a85f40499adb9b52a4da16936f85ac231233
[ "MIT" ]
null
null
null
#coding:utf-8 import copy def Reverse(head): cur = head prev = None while cur: cur.next, cur.prev = cur.prev, cur.next prev = cur cur = cur.prev return prev
15.615385
47
0.551724
4b8ba0f1c5fa8f4f0cb58e5c0a032409511c2338
135
py
Python
src/onegov/translator_directory/models/voucher.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/translator_directory/models/voucher.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/translator_directory/models/voucher.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.file import File class TranslatorVoucherFile(File): __mapper_args__ = {'polymorphic_identity': 'translator_voucher'}
22.5
68
0.792593
4b951573d0ccf72a738505682b6876615cc48961
1,016
py
Python
src/onegov/pay/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/pay/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/pay/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import logging log = logging.getLogger('onegov.pay') # noqa log.addHandler(logging.NullHandler()) # noqa from onegov.pay.errors import CARD_ERRORS from onegov.pay.models import ManualPayment from onegov.pay.models import Payable from onegov.pay.models import PayableManyTimes from onegov.pay.models import Payment fro...
29.028571
71
0.775591
4bbc7067b140942d933892ba88879236913e0632
1,416
py
Python
extender/darkstar.proxy/impl/conanfile.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
2
2020-03-18T18:23:27.000Z
2020-08-02T15:59:16.000Z
extender/darkstar.proxy/impl/conanfile.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
5
2019-07-07T16:47:47.000Z
2020-08-10T16:20:00.000Z
extender/darkstar.proxy/impl/conanfile.py
gifted-nguvu/darkstar-dts-converter
aa17a751a9f3361ca9bbb400ee4c9516908d1297
[ "MIT" ]
1
2020-03-18T18:23:30.000Z
2020-03-18T18:23:30.000Z
import os from conans import ConanFile, CMake, MSBuild, tools # conan install . --profile ./local-profile.ini gcc = "https://github.com/brechtsanders/winlibs_mingw/releases/download/10.3.0-12.0.0-9.0.0-r2/winlibs-i686-posix-dwarf-gcc-10.3.0-llvm-12.0.0-mingw-w64-9.0.0-r2.7z" filename = "mingw.7z" class DarkstarHookC...
41.647059
165
0.638418
29ee0680db7f17730237f656bfdb3d0d9c8de3e3
1,741
py
Python
jumeaux/addons/log2reqs/csv.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
11
2017-10-02T01:29:12.000Z
2022-03-31T08:37:22.000Z
jumeaux/addons/log2reqs/csv.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
79
2017-07-16T14:47:17.000Z
2022-03-31T08:49:14.000Z
jumeaux/addons/log2reqs/csv.py
ihatov08/jumeaux
7d983474df4b6dcfa57ea1a66901fbc99ebababa
[ "MIT" ]
2
2019-01-28T06:11:58.000Z
2021-01-25T07:21:21.000Z
# -*- coding:utf-8 -*- import csv import urllib.parse as urlparser from typing import Iterable from owlmixin import OwlMixin from owlmixin.owlcollections import TList from jumeaux.addons.log2reqs import Log2ReqsExecutor from jumeaux.models import Request, Log2ReqsAddOnPayload class Config(OwlMixin): encoding: ...
31.654545
95
0.571511
8aa1b47f2a8a9e6abb062a5ec66facfc3353ba88
1,144
py
Python
kicker/model_human_forward.py
GeorgJohn/2D_Kicker_git
8a451f2d573d703ceac1c2011f26e6ff953d2090
[ "MIT" ]
null
null
null
kicker/model_human_forward.py
GeorgJohn/2D_Kicker_git
8a451f2d573d703ceac1c2011f26e6ff953d2090
[ "MIT" ]
null
null
null
kicker/model_human_forward.py
GeorgJohn/2D_Kicker_git
8a451f2d573d703ceac1c2011f26e6ff953d2090
[ "MIT" ]
1
2018-08-24T17:53:41.000Z
2018-08-24T17:53:41.000Z
import math from kicker.model_game_bar import GameBar from kicker.CONST_GAME_FIGURES import * from kicker.CONST_BALL import Coordinate from kicker.CONST_SIMULATION import SIMULATION_TIME_STEP from kicker.CONST_SIMULATION import SHOOT_SPEED from kicker.CONST_SIMULATION import BAR_SPEED from kicker.CONST_KICKER import C...
39.448276
93
0.802448
8ac808a1b26ec197c773cea036bcf514f7cb71e3
6,216
py
Python
crawler.py
ipussy/ipussy.github.io
95d19a74e38bb54303cf18057a99a57c783e76bf
[ "Apache-2.0" ]
null
null
null
crawler.py
ipussy/ipussy.github.io
95d19a74e38bb54303cf18057a99a57c783e76bf
[ "Apache-2.0" ]
null
null
null
crawler.py
ipussy/ipussy.github.io
95d19a74e38bb54303cf18057a99a57c783e76bf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import ssl import json import time import schedule import shutil from datetime import datetime from datetime import date import os import os.path from os import path from pages import report from pages.reddit import SubReddit from pages.reddit import Post ssl._create_default_https_context = s...
23.280899
109
0.592664
6a5a3f082e0e4c77df535b42d7850f419fb3ff64
897
py
Python
api/test/test_prometheus_client.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
6
2018-06-27T00:09:55.000Z
2019-03-07T14:06:53.000Z
api/test/test_prometheus_client.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2021-03-31T18:37:46.000Z
2021-06-01T21:49:41.000Z
api/test/test_prometheus_client.py
cloud-cds/cds-stack
d68a1654d4f604369a071f784cdb5c42fc855d6e
[ "Apache-2.0" ]
3
2020-01-24T16:40:49.000Z
2021-09-30T02:28:55.000Z
from prometheus_client import start_http_server, Summary from prometheus_client import CollectorRegistry, Gauge, push_to_gateway import random import time # Create a metric to track time spent and requests made. REQUEST_TIME = Summary('request_processing_seconds', 'Time spent processing request') # Decorate function ...
32.035714
104
0.761427
0aff5315950f8b3ddc99b52778538b6dd8405527
14,209
py
Python
robolib/networks/erianet.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
2
2017-11-30T21:12:11.000Z
2017-12-01T07:52:43.000Z
robolib/networks/erianet.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
14
2017-11-14T18:12:53.000Z
2018-06-03T16:07:57.000Z
robolib/networks/erianet.py
Obyoxar/RobolabStatistics
08343ca3ac49df7efdac33692d7cc4b783e851f5
[ "MIT" ]
3
2018-02-05T10:40:03.000Z
2018-02-09T09:29:19.000Z
# coding=utf-8 import os import time from enum import Enum from os import path from typing import Tuple, List import numpy as np from keras.layers import Input, Lambda from keras.models import Model from robolib.images.pgmtools import read_pgm, RAW_IMAGE_EXTENSION from robolib.networks.common import contrastive_loss,...
40.138418
118
0.613203
e405444e5893c0c7171aaa0787a1a51106b30ff4
4,278
py
Python
source-code/ESP8266/m_Webserver.py
ZakkyMas/Audio_Mixer_Wireless
7f7a002fdf8eebe6891c06b803f1a3bd0c2da7ca
[ "MIT" ]
3
2020-12-30T18:37:13.000Z
2021-10-02T07:43:10.000Z
source-code/ESP8266/m_Webserver.py
ZakkyMas/Audio_Mixer_Wireless
7f7a002fdf8eebe6891c06b803f1a3bd0c2da7ca
[ "MIT" ]
null
null
null
source-code/ESP8266/m_Webserver.py
ZakkyMas/Audio_Mixer_Wireless
7f7a002fdf8eebe6891c06b803f1a3bd0c2da7ca
[ "MIT" ]
1
2021-10-02T07:47:53.000Z
2021-10-02T07:47:53.000Z
import gc import usocket as socket, ujson as json, ure as re class WebServer: def __init__(self, system): self._call = system self.s = socket.socket() self.s.bind(('', 80)) self.s.listen(3) def readFile(self, name): data = "" with open(name, 'r') as f: ...
32.165414
117
0.508649
6b0c692447ec3858c4590b97ac47d9a4af832728
2,282
py
Python
Theories/DataStructures/QueueAndStack/StackDFS/NumberofIslands/number_islands.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Theories/DataStructures/QueueAndStack/StackDFS/NumberofIslands/number_islands.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Theories/DataStructures/QueueAndStack/StackDFS/NumberofIslands/number_islands.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import List # DFS # def numIslands(self, grid: List[List[str]]) -> int: # if not grid: # return 0 # # num_islands = 0 # # for row in range(len(grid)): # for col in range(len(grid[row])): # if grid[row][col] == '1': # self.find_land_island(grid, row,...
30.026316
109
0.554777
6b24c163dbc65170179bd467e6b1fc8c2598217b
1,229
py
Python
slcyCamera.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
slcyCamera.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
slcyCamera.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
import picamera import time import cv2 import numpy import matplotlib.pyplot as plt class Camera(picamera.PiCamera): def __init__(self) -> None: pass print('starting camera...') cam = picamera.PiCamera() ipath = '/home/pi/apple/imgn.jpg' cam.resolution = (256,256) # (64,64) to (2592,1944) cam.b...
24.58
54
0.719284
86b650a50d5ce34fe4b4348158b6ffd4d79630f9
854
py
Python
2015/09/college-scorecard-carnevale-20150916/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2015/09/college-scorecard-carnevale-20150916/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2015/09/college-scorecard-carnevale-20150916/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python import base_filters from math import trunc COPY_GOOGLE_DOC_KEY = '1PPybEiEiSRdwKzF5rPMXJNnf4erdw1DT4ow8bhUjStc' USE_ASSETS = False # Use these variables to override the default cache timeouts for this graphic # DEFAULT_MAX_AGE = 20 # ASSETS_MAX_AGE = 300 def breaks(n): n = float(n) i...
20.829268
98
0.666276
d48ea18b3ea2abd8abd48b8a6bd5556d616b011d
10,500
py
Python
vorabpauschale.py
MStrecke/vorabpauschale
20ca6a9eba6b224477478257b900b20361ad5134
[ "MIT" ]
null
null
null
vorabpauschale.py
MStrecke/vorabpauschale
20ca6a9eba6b224477478257b900b20361ad5134
[ "MIT" ]
null
null
null
vorabpauschale.py
MStrecke/vorabpauschale
20ca6a9eba6b224477478257b900b20361ad5134
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import configparser import sys import re import datetime import argparse from vorabutil import * # Dateiname des auszuwertenden Datei BASISINFO = "basis.ini" # Datei mit Testdaten TESTDATEN = "test.ini" # Abschnitts- und Schlüsselnamen BASISZINS_SECTION = "basiszins"...
30.08596
199
0.590381
d4acaa39c0afd2eb271ae1f7d2be19dba050da6d
649
py
Python
pocketthrone/managers/inputmanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
4
2016-06-05T16:48:04.000Z
2020-03-23T20:06:06.000Z
pocketthrone/managers/inputmanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
pocketthrone/managers/inputmanager.py
herrschr/pocket-throne
819ebae250f45b0a4b15a8320e2836c0b5113528
[ "BSD-2-Clause" ]
null
null
null
from kivy.core.window import Window from pocketthrone.entities.event import * from pocketthrone.managers.eventmanager import EventManager class InputManager: _last_mousepos = None def __init__(self): EventManager.register(self) def on_event(self, event): if isinstance(event, TickEvent): kivy_mousepos = Win...
29.5
59
0.770416
d4d1b462c0130c89650030a2dfcc5439c480063a
16,986
py
Python
20-hs-redez-sem/groups/03-doubleRatchet/src/chat_over_rsync.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
20-hs-redez-sem/groups/03-doubleRatchet/src/chat_over_rsync.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
20-hs-redez-sem/groups/03-doubleRatchet/src/chat_over_rsync.py
Kyrus1999/BACnet
5be8e1377252166041bcd0b066cce5b92b077d06
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
from helper_functions.helpers import encapsulate_message_tcp, expose_message_tcp from helper_functions.helpers import FOLDERNAME_KEYS from helper_functions.helpers_rsync import setup from helper_functions.helpers_rsync import send_rsync, recv_rsync from helper_functions.alice import Alice from helper_functions.bob im...
44.005181
228
0.537384
58025879f9782714990bef9d244d26449cd7fbcb
167
py
Python
WiSe-2122/Wiederholung/Gruppe-C/funktionen-global-lokal.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
1
2022-03-23T09:40:39.000Z
2022-03-23T09:40:39.000Z
WiSe-2122/Wiederholung/Gruppe-C/funktionen-global-lokal.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
WiSe-2122/Wiederholung/Gruppe-C/funktionen-global-lokal.py
jonasrdt/Wirtschaftsinformatik2
30d5d896808b98664c55cb6fbb3b30a7f1904d9f
[ "MIT" ]
null
null
null
# Funktionsdefinition def addition(a,b): result = a+b result_pot = result**2 return result, result_pot # Funktionsaufruf print(addition(3,4)) result = 530
18.555556
29
0.706587
b9211b74ef9c5da5320686da758c9c029b8ab43c
486
py
Python
INBa/2015/Primov_G_S/task_6_19.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Primov_G_S/task_6_19.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Primov_G_S/task_6_19.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 6. Вариант 19 #Создайте игру, в которой компьютер загадывает название одной из шести шахматных фигур, а игрок должен его угадать. #Primov G. S. #30.03.2016 print('Угадайте шахматную фигуру, которую загадал компьютер') import random a = random.choice(['пешка', 'слон', 'конь', 'ферзь', 'ладья', 'король']) b = in...
28.588235
115
0.67284
b94cd50b901993485737eaf47d36e83b240477fa
5,129
py
Python
research/cv/renas/src/nasnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/renas/src/nasnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/renas/src/nasnet.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...
32.05625
101
0.629557
e02aedcaac03262e13938599b96090fb2bd02c69
389
py
Python
Cracking_the_Coding_Interview/trees_is_this_a_binary_search_tree.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Cracking_the_Coding_Interview/trees_is_this_a_binary_search_tree.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
Cracking_the_Coding_Interview/trees_is_this_a_binary_search_tree.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def check_in_BST(root, min_val, max_val): if root is None: return True if root.data < min_val or root.data > max_val: return False return (check_in_BST(root.left, min_val, root.data -1) and check_in_BST(root.right, root.data + 1, max_val)) def checkBST(...
25.933333
62
0.647815
e03d6351fc5cb69bb0b17c4e67d96d8da03914df
3,328
py
Python
classifier.py
Shubh0501/RH
3093ef1fe9f3285cc274af522e69b80d48fd94cd
[ "MIT" ]
1
2018-03-20T05:24:58.000Z
2018-03-20T05:24:58.000Z
classifier.py
Shubh0501/RH
3093ef1fe9f3285cc274af522e69b80d48fd94cd
[ "MIT" ]
null
null
null
classifier.py
Shubh0501/RH
3093ef1fe9f3285cc274af522e69b80d48fd94cd
[ "MIT" ]
2
2018-03-18T13:19:49.000Z
2018-03-20T04:56:09.000Z
def classifier(diseases, symptoms): if len(symptoms) == 0: print("Empty symptoms list. Try again.") return [] if(len(diseases) == 0): print("No matching disease found") return [] max_match_count = 0 min_match_count = 500 for disease in diseases: symp = dise...
35.784946
128
0.605769
16a55ff7ca0de7cf128428897dda17d5f5451326
962
py
Python
Python_source/led_matrix.py
yunuishung/MIT
e423808c162a43b15e7d0b212aa1c4b370b9c12f
[ "MIT" ]
null
null
null
Python_source/led_matrix.py
yunuishung/MIT
e423808c162a43b15e7d0b212aa1c4b370b9c12f
[ "MIT" ]
null
null
null
Python_source/led_matrix.py
yunuishung/MIT
e423808c162a43b15e7d0b212aa1c4b370b9c12f
[ "MIT" ]
null
null
null
import RPi.GPIO as GPIO from time import sleep, strftime from datetime import datetime from luma.core.interface.serial import spi, noop from luma.core.render import canvas from luma.core.virtual import viewport from luma.led_matrix.device import max7219 from luma.core.legacy import text, show_message from luma.core.le...
35.62963
110
0.739085
4c4a9605e00f4f210c4004a7983f00c973352f2a
1,477
py
Python
python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-numpy_array_basics.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-numpy_array_basics.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-numpy_array_basics.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ CS231n Convolutional Neural Networks for Visual Recognition http://cs231n.github.io/ Python Numpy Tutorial http://cs231n.github.io/python-numpy-tutorial/  ̄ python_numpy_tutorial-numpy_array_basics.py 2019-07-02 (Tue) """ # Python Numpy Tutorial > Numpy > Arrays # Nu...
20.513889
107
0.661476
e6aff8b04241f143409b92704c069175599caf85
4,622
py
Python
tensorflow/tensorflow-tutorial-3/lab3_RNN/data_generator.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:16:23.000Z
2019-05-10T09:16:23.000Z
tensorflow/tensorflow-tutorial-3/lab3_RNN/data_generator.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
null
null
null
tensorflow/tensorflow-tutorial-3/lab3_RNN/data_generator.py
gopala-kr/ds-notebooks
bc35430ecdd851f2ceab8f2437eec4d77cb59423
[ "MIT" ]
1
2019-05-10T09:17:28.000Z
2019-05-10T09:17:28.000Z
from __future__ import print_function import numpy as np target_to_text = { '0':'zero', '1':'one', '2':'two', '3':'three', '4':'four', '5':'five', '6':'six', '7':'seven', '8':'eight', '9':'nine', } stop_character = start_character = '#' input_characters = " ".join(target_to_te...
37.885246
119
0.647988
dbc6acd6b8c9c62eab892e050993e933194227b2
3,164
py
Python
files/methodAndKnottiness/reliabilityPyV2.py
scrasmussen/ProsaicOeuvre
e7a5fa61f60acf9a02171235b0855d10341cdefc
[ "MIT" ]
null
null
null
files/methodAndKnottiness/reliabilityPyV2.py
scrasmussen/ProsaicOeuvre
e7a5fa61f60acf9a02171235b0855d10341cdefc
[ "MIT" ]
1
2021-07-02T23:08:16.000Z
2021-07-02T23:10:42.000Z
files/methodAndKnottiness/reliabilityPyV2.py
scrasmussen/ProsaicOeuvre
e7a5fa61f60acf9a02171235b0855d10341cdefc
[ "MIT" ]
null
null
null
import sys, math, time import numpy as np np.set_printoptions(precision=4) count = 0 cost=np.array([666]) reliability=np.array([666]) # Read input. Budget, number of machines, cost and reliability for line in sys.stdin: if count == 0: B = int(line) elif count == 1: N = int(line) else: ...
22.76259
66
0.520228
7264e1c288dce770b5db13273c97f06eab2a0745
262
py
Python
src/using_tips/self.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/using_tips/self.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
src/using_tips/self.py
HuangHuaBingZiGe/GitHub-Demo
f3710f73b0828ef500343932d46c61d3b1e04ba9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- ''' self 相当于类的实例,用于返回实例的一些属性,用于类的方法的参数当中,在属性前加self也可以理解为全局变量,变量不会在类的方法结束后销毁。 self 名称可以自定义,但最好按习惯来。 self 需要在定义时指定,但在实例化调用传参时不必显式传递。 ps:顺便说一下,python2 和 python3在定义类时有所区别, 在用一些高级特性时,python2最好指定参数 object,而python3则不用。 '''
20.153846
80
0.778626
72c79ab51d13d545517a1ef09c4485b8671a45be
4,083
py
Python
phypidaq/TCS34725Config.py
RMGrau/PhyPiDAQ
e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54
[ "BSD-2-Clause" ]
7
2018-11-30T13:38:27.000Z
2021-03-10T15:37:56.000Z
phypidaq/TCS34725Config.py
RMGrau/PhyPiDAQ
e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54
[ "BSD-2-Clause" ]
5
2020-11-11T09:19:00.000Z
2022-02-06T09:04:55.000Z
phypidaq/TCS34725Config.py
RMGrau/PhyPiDAQ
e7ea08a0d5de9772a1a5e32ccd0ab1bfddf9ff54
[ "BSD-2-Clause" ]
16
2019-04-16T10:15:45.000Z
2021-12-15T14:59:31.000Z
# -*- coding: utf-8 -*- from __future__ import print_function, division, unicode_literals from __future__ import absolute_import import numpy as np, time, sys # import relevant pieces for TCS34725 RGB (color) sensor import Adafruit_TCS34725 as TCS34725 class TCS34725Config(object): ''' TC34725 configuration and i...
35.198276
102
0.642175
f4561ddea73483396ce4349bbb3f8c41d720c5cd
6,936
py
Python
src/lcdoc/lprunner.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
24
2021-10-04T22:11:59.000Z
2022-02-02T21:51:43.000Z
src/lcdoc/lprunner.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
2
2021-10-04T21:51:30.000Z
2021-10-05T14:15:31.000Z
src/lcdoc/lprunner.py
axiros/docutools
f99874a64afba8f5bc740049d843151ccd9ceaf7
[ "BSD-2-Clause" ]
null
null
null
""" Runs the literate programming blocks within a markdown document. We open tmux (requirement) and show in one pane the markdown plus the commands to run. If the commands open a session themselves, we attach in split panes, so that you can follow the output. """ import os import sys import time import traceback imp...
24.251748
86
0.570069
f48abbd948dfbecb8508578d0b00fa7d394de1d0
7,524
py
Python
iotsamstag/esp32/libraries/thirdparty/arduino-esp32/tools/platformio-build.py
philippAuinger/ha_visualisierung
46838de7edd421b3341a0a9a9b389e152758ffd5
[ "MIT" ]
3
2019-02-07T15:13:23.000Z
2020-02-08T08:13:27.000Z
esp32/libraries/thirdparty/arduino-esp32/tools/platformio-build.py
DigitalDoorSignage/DigitalDoorSignageClient
f397b4a3c8ca264bec1d22dd9acc7be2b11d1083
[ "MIT" ]
1
2020-07-07T19:43:11.000Z
2020-07-07T19:43:11.000Z
esp32/libraries/thirdparty/arduino-esp32/tools/platformio-build.py
DigitalDoorSignage/DigitalDoorSignageClient
f397b4a3c8ca264bec1d22dd9acc7be2b11d1083
[ "MIT" ]
1
2019-01-15T13:42:37.000Z
2019-01-15T13:42:37.000Z
# Copyright 2014-present PlatformIO <contact@platformio.org> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
42.03352
629
0.625199
be4e7615f2d9696bb164ca619f33c8803a569121
279
py
Python
Chapter2_Basics/Exercise1.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
2
2021-02-13T19:18:00.000Z
2021-11-10T09:54:49.000Z
Chapter2_Basics/Exercise1.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
null
null
null
Chapter2_Basics/Exercise1.py
franneck94/UdemyPythonIntro
4895a91a04eedce7d59b61bf12e5aa209fe60f85
[ "MIT" ]
null
null
null
"""Exercise 1: 1.) Write code that takes an integer number and prints True if: - The number is greater than 10 or less than 0 Else: print False 2.) Write code that takes two floats (x, y) and computes: - x^2 + x*y + y^2 """ # exercise1 number = 8 # exercise2 x = 3.0 y = 2.0
14.684211
59
0.663082
fe574ed5dec5f112034824cd9206e16b26135a85
92
py
Python
2014/09/table-playground-stats/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/09/table-playground-stats/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/09/table-playground-stats/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python COPY_GOOGLE_DOC_KEY = '1QmTPrMFrSMnsVtSvALioYgtt2H3bsqfgGjqduIxCz2o'
23
68
0.847826
433157d5e9d06510904155e6f900d2054cfd92c6
184
py
Python
crack/hashing/passwdformats.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
crack/hashing/passwdformats.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
crack/hashing/passwdformats.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
FILE_FORMAT = {} FILE_FORMAT['smbpasswd'] = ['name', 'uid', 'LM_hash', 'NTLM_hash', 'Account Flags', 'Last Change Time'] FILE_FORMAT['custom'] = ['name', 'uid', 'hash', 'salt', 'pwd']
46
103
0.625
43953b5e61bc984dd452ced5c7c874565041cd67
1,679
py
Python
test/test_npu/test_network_ops/test_dropoutv2.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_dropoutv2.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_dropoutv2.py
Ascend/pytorch
39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
39.046512
111
0.703395
78efecb3872ec0e24d80e8dd80936df88ceb4f9e
567
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v8_3/update_company_total_sales.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
frappe-bench/apps/erpnext/erpnext/patches/v8_3/update_company_total_sales.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v8_3/update_company_total_sales.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
# Copyright (c) 2017, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.setup.doctype.company.company import update_company_current_month_sales, update_company_monthly_sales def execute(): '''Update company monthly sal...
35.4375
114
0.811287
78f892b9900b3042e00543919bb8f0143ed7023b
13,230
py
Python
frappe-bench/apps/erpnext/erpnext/selling/doctype/customer/customer.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/selling/doctype/customer/customer.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/selling/doctype/customer/customer.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.naming import set_name_by_naming_series from frappe import _, msgprint, throw import frappe.defaults from frappe.utils i...
39.142012
161
0.732653
78f8abb4e90ea1a523804b7b3bc697cff765f1d3
1,130
py
Python
dcapy/dca/timeconverter.py
scuervo91/dcapy
46c9277e607baff437e5707167476d5f7e2cf80c
[ "MIT" ]
4
2021-05-21T13:26:10.000Z
2021-11-15T17:17:01.000Z
dcapy/dca/timeconverter.py
scuervo91/dcapy
46c9277e607baff437e5707167476d5f7e2cf80c
[ "MIT" ]
null
null
null
dcapy/dca/timeconverter.py
scuervo91/dcapy
46c9277e607baff437e5707167476d5f7e2cf80c
[ "MIT" ]
null
null
null
import pandas as pd from scipy import stats import numpy as np from enum import Enum list_freq = ['A','M','D'] class FreqEnum(str, Enum): A = 'A' M = 'M' D = 'D' di = { 'to':['A','A','A','M','M','M','D','D','D'], 'from':['A','M','D','A','M','D','A','M','D'], 'value':[1,12,365,1/12,1,30,1/365...
24.042553
97
0.615929
604934c7b5024c41a7cf99a68b172c7040b049e7
4,664
py
Python
listings/chapter05/salesman.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
2
2021-09-20T06:16:41.000Z
2022-01-17T14:24:43.000Z
listings/chapter05/salesman.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
listings/chapter05/salesman.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
from random import randint, shuffle from copy import deepcopy from genetic import Chromosome, Genetic # Entfernungen auch in Gegenrichtung erzeugen def generate_distances(): source_distances = { ("Berlin", "Kopenhagen"): 355, ("Berlin", "Warschau"): 517, ("Berlin", "Prag"): 280, ("Berlin", "Wien"):...
41.274336
120
0.59777
1cce968e81665090ee47c11cca5577d5ca7a0c85
784
py
Python
7-assets/past-student-repos/data_struct_and_algo-master/linked_list.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
4
2021-08-31T00:56:40.000Z
2021-11-29T03:08:55.000Z
7-assets/past-student-repos/data_struct_and_algo-master/linked_list.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
3
2022-02-14T18:48:11.000Z
2022-03-30T05:26:26.000Z
7-assets/past-student-repos/data_struct_and_algo-master/linked_list.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
1
2021-08-31T00:54:51.000Z
2021-08-31T00:54:51.000Z
#linked list creation #singly linked list class Node: def __init__(self,data): self.data=data self.next=None class LinkedList: def __init__(self): self.head=None def PrintList(self): if self.head is not None: itr=self.head while itr: ...
14.254545
53
0.600765
98ceaef7d5723e85f5882834950aae5400260403
2,735
py
Python
cs/lambda_cs/06_graphs/notes/islands/island_dave.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
cs/lambda_cs/06_graphs/notes/islands/island_dave.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
cs/lambda_cs/06_graphs/notes/islands/island_dave.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
# Write a function that takes a 2D binary array and returns the number of 1 islands. An island consists of 1s that are connected to the north, south, east or west. For example: # islands = [[0, 1, 0, 1, 0], # [1, 1, 0, 1, 1], # [0, 0, 1, 0, 0], # [1, 0, 1, 0, 0], # [1, 1, 0,...
31.436782
176
0.551005
c72ca5bc49aced12301476c1f4d09852a882d699
3,796
py
Python
Packs/ApiModules/Scripts/ServiceNowApiModule/ServiceNowApiModule_test.py
cstone112/content
7f039931b8cfc20e89df52d895440b7321149a0d
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/ApiModules/Scripts/ServiceNowApiModule/ServiceNowApiModule_test.py
cstone112/content
7f039931b8cfc20e89df52d895440b7321149a0d
[ "MIT" ]
87
2022-02-23T12:10:53.000Z
2022-03-31T11:29:05.000Z
Packs/ApiModules/Scripts/ServiceNowApiModule/ServiceNowApiModule_test.py
cstone112/content
7f039931b8cfc20e89df52d895440b7321149a0d
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
from ServiceNowApiModule import * import demistomock as demisto PARAMS = { 'insecure': False, 'credentials': { 'identifier': 'user1', 'password:': '12345' }, 'proxy': False, 'client_id': 'client_id', 'client_secret': 'client_secret', 'use_oauth': True } # Unit tests for OA...
43.632184
120
0.675975
1be051b6f897669c56231148f64a21daa13fc5ec
5,528
py
Python
pynanz/indicators.py
salemileandro/pynanz
5e22f4c4a0914714d1df668d3d0be54c90a8ff6d
[ "MIT" ]
null
null
null
pynanz/indicators.py
salemileandro/pynanz
5e22f4c4a0914714d1df668d3d0be54c90a8ff6d
[ "MIT" ]
null
null
null
pynanz/indicators.py
salemileandro/pynanz
5e22f4c4a0914714d1df668d3d0be54c90a8ff6d
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def ema(x: pd.Series, span: int = 10): """ Compute the exponential moving average (ema) of a pd.Series data. :param x: Target data to compute the ema. :type x: pd.Series. :param span: Span to compute the data. The decay alpha=2/(span+1). :typ...
33.707317
123
0.637844
40bf3f3f0e7efb43f4d081806d772efc8505f34f
150
py
Python
Online-Judges/CodingBat/Python/Logic-01/Logic_1-01-cigar_party.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/Logic-01/Logic_1-01-cigar_party.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/Logic-01/Logic_1-01-cigar_party.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def cigar_party(cigars, is_weekend): if cigars >= 40 and cigars <= 60 or is_weekend == True and cigars > 60: return True return False
30
75
0.66
291fafb21d729797f4f9c47d5575e2f1dd590ba2
1,362
py
Python
HW3/SiameseNetworkContrastive.py
kvswim/kv_jhu_cv
2ddf7a9d497aef116a7c043157b8631cea45000d
[ "MIT" ]
null
null
null
HW3/SiameseNetworkContrastive.py
kvswim/kv_jhu_cv
2ddf7a9d497aef116a7c043157b8631cea45000d
[ "MIT" ]
null
null
null
HW3/SiameseNetworkContrastive.py
kvswim/kv_jhu_cv
2ddf7a9d497aef116a7c043157b8631cea45000d
[ "MIT" ]
null
null
null
#Kyle Verdeyen #Computer Vision EN.600.461 HW3 #SiameseNetworkContrastive.py #siamese network class abstraction, without concat for BCE (used for p1b/contrastive) import torch import torch.nn as nn class SiameseNetworkContrastive(nn.Module): def __init__(self): super(SiameseNetworkContrastive, self).__init__() #st...
30.266667
85
0.688693
4645aaf07cfbf4878fbb57df420e178af7998be5
558
py
Python
INBa/2014/Mamedov_R_A/Mamedov 2_12.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/Mamedov_R_A/Mamedov 2_12.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2014/Mamedov_R_A/Mamedov 2_12.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 2, Вариант 12 # Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Анвари. Не забудьте о том, что автор должен быть упомянут на отдельной строке. # Мамедов Р.А. # 02.03.2016 print (''' Для человека мысль - венец всего живого. А чистота душ...
39.857143
199
0.758065
4667a2a86c97dca087ddc1e31d49b0fc79f62768
1,214
py
Python
Packs/CrowdStrikeFalconStreamingV2/Scripts/CrowdStrikeStreamingPreProcessing/CrowdStrikeStreamingPreProcessing.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CrowdStrikeFalconStreamingV2/Scripts/CrowdStrikeStreamingPreProcessing/CrowdStrikeStreamingPreProcessing.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CrowdStrikeFalconStreamingV2/Scripts/CrowdStrikeStreamingPreProcessing/CrowdStrikeStreamingPreProcessing.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 res = True for inc in demisto.incidents(): host = '' if inc['labels']: for t in inc['labels']: if t['type'] == 'System': host = t['value'] if len(host) > 0: sameIncidents =...
44.962963
114
0.557661
46ac40706186b1344a04a7afd57f19a7916e7db0
3,625
py
Python
Implementierung/ResearchEnvironment/AuthorizationManagement/models.py
Sashks/PSE
ae2d8133a85563c33583f15b9ba76a3a2bf0c762
[ "MIT" ]
null
null
null
Implementierung/ResearchEnvironment/AuthorizationManagement/models.py
Sashks/PSE
ae2d8133a85563c33583f15b9ba76a3a2bf0c762
[ "MIT" ]
null
null
null
Implementierung/ResearchEnvironment/AuthorizationManagement/models.py
Sashks/PSE
ae2d8133a85563c33583f15b9ba76a3a2bf0c762
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from datetime import datetime from django.core.exceptions import ObjectDoesNotExist from django.core.mail.message import EmailMessage import logging from django.template.loader import render_to_string from django.core.mail import send_mail # Cre...
32.657658
130
0.688
311242c021e0c87fde1e1f185dc7a04677e8e5ad
1,909
py
Python
src/onegov/election_day/forms/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/forms/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/election_day/forms/__init__.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.election_day.forms.archive import ArchiveSearchForm from onegov.election_day.forms.common import EmptyForm from onegov.election_day.forms.data_source import DataSourceForm from onegov.election_day.forms.data_source import DataSourceItemForm from onegov.election_day.forms.election import ElectionForm from on...
41.5
76
0.833944
7353e359a058fc6a048217f1def82aa861e8752f
3,667
py
Python
examples/tensorflow-mnist-mlp/train_minimal.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
23
2018-09-19T13:34:27.000Z
2022-02-14T09:49:35.000Z
examples/tensorflow-mnist-mlp/train_minimal.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
33
2018-10-18T07:58:05.000Z
2019-05-16T08:24:12.000Z
examples/tensorflow-mnist-mlp/train_minimal.py
pcrete/skil-python
672a1aa9e8af020c960ab9ee280cbb6b194afc3f
[ "Apache-2.0" ]
11
2018-10-21T18:58:57.000Z
2022-02-14T09:49:36.000Z
import tensorflow as tf import numpy as np import os from tensorflow.python.tools import freeze_graph from tensorflow.python.training import saver as saver_lib from tensorflow.python.framework import graph_io epochs = 100 batch_size = 32 work_directory = os.path.abspath('') saver_write_version = 2 mnist = tf.kera...
30.057377
82
0.676029
5b09e4088aa2147e65b59737381248e593bc7f2b
13,918
py
Python
app/util.py
brunomileto/gamebet_website
b315569ff5c18538cbc374d19011591edb5f8b26
[ "MIT" ]
null
null
null
app/util.py
brunomileto/gamebet_website
b315569ff5c18538cbc374d19011591edb5f8b26
[ "MIT" ]
null
null
null
app/util.py
brunomileto/gamebet_website
b315569ff5c18538cbc374d19011591edb5f8b26
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- """ License: MIT Copyright (c) 2019 - present AppSeed.us """ from __future__ import print_function import base64 import mimetypes import smtplib from datetime import date from email.mime.audio import MIMEAudio from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipa...
35.414758
122
0.668343
5b1da071f31604857cda582e9f9b7b34cadb4087
761
py
Python
python_project/python/PythonProj/test_1.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
1
2018-12-30T14:07:42.000Z
2018-12-30T14:07:42.000Z
python_project/python/PythonProj/test_1.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
python_project/python/PythonProj/test_1.py
sinomiko/project
00fadb0033645f103692f5b06c861939a9d4aa0e
[ "BSD-3-Clause" ]
null
null
null
import random num = random.randint(1,100) while num != 0: inNum = int(raw_input("please input number:")) print type(inNum) print type(num) if num > inNum: print "{} is bigger than {}".format(num, inNum) elif num == inNum: print "{} is equal {}".format(num, inNum) brea...
27.178571
57
0.53088
d28a558917aab54dc49a5978e6bd3f87562496be
1,001
py
Python
analyze/municipalities.py
no-ora/solitadds
18c5868af00441a8e67311679a0b848c836975d2
[ "MIT" ]
null
null
null
analyze/municipalities.py
no-ora/solitadds
18c5868af00441a8e67311679a0b848c836975d2
[ "MIT" ]
null
null
null
analyze/municipalities.py
no-ora/solitadds
18c5868af00441a8e67311679a0b848c836975d2
[ "MIT" ]
null
null
null
import sys, math, pdb from datetime import timedelta import pandas as pd import logging import numpy as np def combine_municipalities_data(municipality_id_df, municipality_data): municipality_ids = municipality_id_df['municipalityId'].unique() summary = None for municipality_id in municipality_ids: ...
34.517241
186
0.648352
81e586b6dce8e6d0aaeec3344024e8fdf268402b
257
py
Python
Project Euler/Problem_6/solution.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
26
2019-07-17T11:05:43.000Z
2022-02-06T08:31:40.000Z
Project Euler/Problem_6/solution.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
7
2019-07-16T19:52:25.000Z
2022-01-08T08:03:44.000Z
Project Euler/Problem_6/solution.py
Nidita/Data-Structures-Algorithms
7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a
[ "MIT" ]
19
2020-01-14T02:44:28.000Z
2021-12-27T17:31:59.000Z
def main(): sum_of_squares = 0 square_of_sum = 0 for i in range(1, 101): sum_of_squares = sum_of_squares + i**2 square_of_sum = square_of_sum + i print(square_of_sum**2 - sum_of_squares) if __name__ == '__main__': main()
25.7
46
0.634241
486d68e2d8e581c2ba6a69c0740f83f2ed34ea36
2,294
py
Python
experimental/mimo/layers.py
krasserm/edward2
311d3ad6946b543e70af1495eab9a0a9b4f69854
[ "Apache-2.0" ]
null
null
null
experimental/mimo/layers.py
krasserm/edward2
311d3ad6946b543e70af1495eab9a0a9b4f69854
[ "Apache-2.0" ]
null
null
null
experimental/mimo/layers.py
krasserm/edward2
311d3ad6946b543e70af1495eab9a0a9b4f69854
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The Edward2 Authors. # # 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 o...
33.735294
79
0.650392
738d20d7291590508ff590e85aa578dff8480c89
3,033
py
Python
StateTracing/read_split_data.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
null
null
null
StateTracing/read_split_data.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
null
null
null
StateTracing/read_split_data.py
junchenfeng/diagnosis_tracing
4e26e2ad0c7abc547f22774b6c9c299999a152c3
[ "MIT" ]
1
2020-09-08T13:42:16.000Z
2020-09-08T13:42:16.000Z
# -*- coding: utf-8 -*- import os from sklearn.model_selection import KFold #def get_init(file_name): # # result = {} # for line in open(file_name,'r',encoding='utf8'): # itm,init_state = line.strip().split() ## init_state = list(map(int,init_state)) # result[itm] = init_...
27.572727
75
0.496208
fb900b6bbba24f2a2f1a02d74fe3e96d118027c6
4,920
py
Python
runServerWithSwagger.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
runServerWithSwagger.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
runServerWithSwagger.py
wchming1987/Tumbler
e309771779c8eb44e685adbb691a428d29009e05
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding=utf-8 -*- import ConfigParser import os import signal import time import tornado.httpserver import tornado.ioloop from tornado_swagger import swagger from lib import log from handler.Book import BooksHandler from handler.Reminder import RemindersHandler import pymongo MAX_WAIT_SECO...
29.461078
108
0.593496
839dfdeacc0013991e9a021e2748a7b88f563eab
1,794
py
Python
src/heatmaps/heatmaps.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/heatmaps/heatmaps.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
src/heatmaps/heatmaps.py
Ellon-M/visualizations
5a42c213ea8fd0597e2035778d9ae6460eb9e821
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import matplotlib.cm as cmp import matplotlib.colors as cl import matplotlib.pyplot as plt import warnings import squarify # matplotlib cmap_ages = cmp.get_cmap('YlOrBr') fig, ax = plt.subplots(figsize=(10,60)) im = ax.imshow(age_values, cmap = cmap_ages) ax.set_xticks(np.arange...
36.612245
120
0.72854
7921469af624db52d2096ae72ca743b49d950e8b
390
py
Python
schemas.py
bjoernh/immunsicht_backend
dae264a01da775bc99edf89afabf0b9759682d1b
[ "MIT" ]
1
2020-04-06T23:17:55.000Z
2020-04-06T23:17:55.000Z
schemas.py
bjoernh/immunsicht_backend
dae264a01da775bc99edf89afabf0b9759682d1b
[ "MIT" ]
null
null
null
schemas.py
bjoernh/immunsicht_backend
dae264a01da775bc99edf89afabf0b9759682d1b
[ "MIT" ]
null
null
null
from typing import List from pydantic import BaseModel class Test(BaseModel): case_code : str citizen_id : int insurance_company : InsuranceCompany first_name : str last_name : str street : str postcode : str city : str birthday : date date_of_test : date result_positve : ...
18.571429
40
0.694872
f7758ff0807ab6ee28017ce80a30a4d130ad7f03
768
py
Python
hystreet/hystreet_to_s3/compute_station_means.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
29
2020-03-21T00:47:51.000Z
2021-07-17T15:50:33.000Z
hystreet/hystreet_to_s3/compute_station_means.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
7
2020-03-21T14:04:26.000Z
2022-03-02T08:05:40.000Z
hystreet/hystreet_to_s3/compute_station_means.py
cfleschhut/virushack
2fe7ded0be8672b066edef7fed52573794db2ba5
[ "Apache-2.0" ]
13
2020-03-21T01:08:08.000Z
2020-04-08T17:21:11.000Z
import pandas as pd from datetime import datetime, date def compute_weekday(timestamp): date_str = timestamp.split('+')[0] date = datetime.strptime(date_str, '%Y-%m-%dT%H:%M:%S.%f') return date.weekday() data = pd.read_csv('data.temp.csv') data['weekday'] = float("NaN") for index, row in data.iterrows(...
36.571429
209
0.72526
4d08ee85283b5d4bb990b68287b0335a357aecec
491
py
Python
python/generator_tricks_for_systemprogrammer/msgtest.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/generator_tricks_for_systemprogrammer/msgtest.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/generator_tricks_for_systemprogrammer/msgtest.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# msgtest.py # # A program that sends a message to the sample server in genmessages.py import socket def send_msg_udp(msg): s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.sendto(msg, ("127.0.0.1", 10000)) def send_msg_tcp(msg): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ...
21.347826
72
0.643585
4dea4afaa317804e693ea74a150b5585205896fe
5,119
py
Python
chord_rec/utils.py
TianxueHu/ChordSymbolRec
d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac
[ "Unlicense", "MIT" ]
null
null
null
chord_rec/utils.py
TianxueHu/ChordSymbolRec
d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac
[ "Unlicense", "MIT" ]
null
null
null
chord_rec/utils.py
TianxueHu/ChordSymbolRec
d64a5be4f4914e6f682cb6d4079d7ba8a6fc2eac
[ "Unlicense", "MIT" ]
null
null
null
from fractions import Fraction import re def define_beat_from_meter(meter): ''' Return lists of strong and weak beat given meter Output: strong - list[int] weak - list[int] ''' strong, weak = [], [] if meter == '2/4': strong, weak = [1...
27.521505
102
0.496191
4216e7187797fbad6ed75f277c14bcea914f1275
774
py
Python
Algorithms/2_Implementation/59.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
1
2021-11-25T13:39:30.000Z
2021-11-25T13:39:30.000Z
Algorithms/2_Implementation/59.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
Algorithms/2_Implementation/59.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/manasa-and-stones/problem #!/bin/python3 import math import os import random import re import sys # # Complete the 'stones' function below. # # The function is expected to return an INTEGER_ARRAY. # The function accepts following parameters: # 1. INTEGER n # 2. INTEGER a # ...
18.878049
65
0.608527
427f969b5f5f3a60e154d07399bbc529f650a163
12,602
py
Python
echelon/echelon.py
sking8484/echelon
9f2ef06507e712f1daa6fd47c7eb894e0cb47e06
[ "MIT" ]
null
null
null
echelon/echelon.py
sking8484/echelon
9f2ef06507e712f1daa6fd47c7eb894e0cb47e06
[ "MIT" ]
null
null
null
echelon/echelon.py
sking8484/echelon
9f2ef06507e712f1daa6fd47c7eb894e0cb47e06
[ "MIT" ]
null
null
null
import plotly.graph_objs as go import dash_html_components as html import dash_core_components as dcc import dash import pandas as pd import matplotlib.pyplot as plt import numpy as np import statsmodels.api as sm import datetime import seaborn as sns sns.set_style("darkgrid") class EchelonBT(): def __init__(sel...
35.59887
205
0.51587
67224476cd99f8ff0e3feb41b7d015f4faec8b05
2,335
py
Python
sort_algorithm/03_binary_tree.py
Jeson1g/Dawson
b65f2347110cf56d13e9fcf8f08a3b38af53af77
[ "MIT" ]
2
2018-06-19T08:46:10.000Z
2018-11-05T02:15:34.000Z
sort_algorithm/03_binary_tree.py
Jeson1g/Dawson
b65f2347110cf56d13e9fcf8f08a3b38af53af77
[ "MIT" ]
null
null
null
sort_algorithm/03_binary_tree.py
Jeson1g/Dawson
b65f2347110cf56d13e9fcf8f08a3b38af53af77
[ "MIT" ]
null
null
null
class Node(object): """结点类""" def __init__(self, item): self.item = item self.lchild = None self.rchild = None class BinaryTree(object): """二叉树""" def __init__(self, node=None): self.root = node def add(self, item): """ 广度优先遍历方式添加结点 :param...
24.072165
46
0.48651
c02a13c98a11489bd73c71c364c64a3bfd394f69
15,109
py
Python
postprocessing/evaluate_line_by_line.py
dainst/chronoi-corpus-processing
7f508a7572e1022c4c88d1477db029e6619a1f0c
[ "MIT" ]
null
null
null
postprocessing/evaluate_line_by_line.py
dainst/chronoi-corpus-processing
7f508a7572e1022c4c88d1477db029e6619a1f0c
[ "MIT" ]
null
null
null
postprocessing/evaluate_line_by_line.py
dainst/chronoi-corpus-processing
7f508a7572e1022c4c88d1477db029e6619a1f0c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import annotations import argparse import csv import enum import glob import os.path from corpus_reading import TagInContext, Document, DocumentLine class TaskType(enum.Enum): TAG_STRICT = 0 TAG_RELAXED = 1 ATTRIBUTE = 2 class ResultType(...
39.449086
130
0.643259