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
7fbfe698e472ad895e46c23c86e967421ff847b1
993
py
Python
PINp/2014/Cheraneva A.S/task_9_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Cheraneva A.S/task_9_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
PINp/2014/Cheraneva A.S/task_9_24.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача 9. Вариант 24. #Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен его отгадать. #Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток узнать, есть ли какая-либо буква в слове, причем программа может отвечать только "Да" и "Нет". #Вслед за тем игрок должен попробов...
28.371429
165
0.684794
12431a4c2cf3d17a8a7abf83c03fb2545256a55a
1,501
py
Python
src/Enemies.py
t-azubi/text-adventure
6106f1bd070bb884e5f369346f7f97bec89dd919
[ "MIT" ]
null
null
null
src/Enemies.py
t-azubi/text-adventure
6106f1bd070bb884e5f369346f7f97bec89dd919
[ "MIT" ]
9
2019-07-15T08:49:00.000Z
2019-08-28T15:05:08.000Z
src/Enemies.py
t-azubi/text-adventure
6106f1bd070bb884e5f369346f7f97bec89dd919
[ "MIT" ]
null
null
null
class Enemy: """A base class for all enemies""" def __init__(self, name, hp, damage, armor, exp): """Creates a new enemy :param name: the name of the enemy :param hp: the hit points of the enemy :param damage: the damage the enemy does with each attack :param armor: the ...
24.209677
79
0.60493
c39c462be4da4fd437ad0a63459c4b4f7930f940
471
py
Python
ds/practice/daily_practice/20-11/hex_convert_rec.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
ds/practice/daily_practice/20-11/hex_convert_rec.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
8
2020-03-24T17:47:23.000Z
2022-03-12T00:33:21.000Z
ds/practice/daily_practice/20-11/hex_convert_rec.py
tobias-fyi/vela
b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82
[ "MIT" ]
null
null
null
"""Recursive hex code conversion functions""" # %% hex_color_in = "#7D3545" # int(0xF6A) -> 3,946 hex_in = "F6A" def hex2dec(hex: str) -> int: # Clean/strip and validate input # Pop first letter from string and convert to dec # Calculate current value of dec: 16**lenth(string) - 1 # Base Case: no ch...
20.478261
59
0.660297
4ee041423940a651e8a0070ab3c1c3f955a6ee92
403
py
Python
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 44/44.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
50-Python-Exercises/Exercises/Exercise 44/44.py
kuwarkapur/Hacktoberfest-2022
efaafeba5ce51d8d2e2d94c6326cc20bff946f17
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
50-Python-Exercises/Exercises/Exercise 44/44.py
kuwarkapur/Hacktoberfest-2022
efaafeba5ce51d8d2e2d94c6326cc20bff946f17
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
#FromScratch - Create a script that generates a file where all letters of English alphabet are listed three in each line import string letters = string.ascii_lowercase + " " slice1 = letters[0::3] slice2 = letters[1::3] slice3 = letters[2::3] with open("letters.txt", "w") as file: for s1, s2, s3 in zip(slice1, ...
26.866667
120
0.662531
148cde31262bb4a2a1c2bd29827ab0f9d25a7a71
82,178
py
Python
Packs/ForescoutEyeInspect/Integrations/ForescoutEyeInspect/ForescoutEyeInspect.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
2
2021-12-06T21:38:24.000Z
2022-01-13T08:23:36.000Z
Packs/ForescoutEyeInspect/Integrations/ForescoutEyeInspect/ForescoutEyeInspect.py
jrauen/content
81a92be1cbb053a5f26a6f325eff3afc0ca840e0
[ "MIT" ]
61
2021-10-07T08:54:38.000Z
2022-03-31T10:25:35.000Z
Packs/ForescoutEyeInspect/Integrations/ForescoutEyeInspect/ForescoutEyeInspect.py
henry-sue-pa/content
043c6badfb4f9c80673cad9242fdea72efe301f7
[ "MIT" ]
2
2022-01-05T15:27:01.000Z
2022-02-01T19:27:43.000Z
# type: ignore from copy import deepcopy from typing import Any, Dict, Tuple, Type from urllib.parse import urljoin import urllib3 import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * # disable insecure warnings urllib3.disable_warnings() CUSTOM_TABLE_HEADERS = { '...
40.742687
130
0.587213
21188e38a259cd5724da0eae86ac9d0d45f0a8a6
18,011
py
Python
docs/conf.py
guruvamsi-policharla/noisy-krotov
c5397d9dbde68d06f17e88620d6a6b2c74664841
[ "BSD-3-Clause" ]
49
2018-11-07T06:43:33.000Z
2022-03-18T20:53:06.000Z
docs/conf.py
guruvamsi-policharla/noisy-krotov
c5397d9dbde68d06f17e88620d6a6b2c74664841
[ "BSD-3-Clause" ]
94
2018-11-06T20:15:04.000Z
2022-01-06T09:06:15.000Z
docs/conf.py
qucontrol/krotov
9f9a22336c433dc3a37637ce8cc8324df4290b46
[ "BSD-3-Clause" ]
20
2018-11-06T20:03:11.000Z
2022-03-12T05:29:21.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import os import shutil import subprocess import sys from pathlib import Path from unittest import mock import git import pybtex.style.formatting import pybtex.style.formatting.unsrt import pybtex.style.template from pybtex.plugin import ...
33.919021
478
0.606574
25f9d4b465e8e7437c54657a7a8020f2769958a8
5,396
py
Python
prep/preprocess-buildings.py
Empythy/geometry-learning
5300d421ef848c2748a2ba41ced5c6e2fba93200
[ "MIT" ]
21
2018-10-09T08:15:29.000Z
2022-03-16T08:23:08.000Z
prep/preprocess-buildings.py
reinvantveer/Topology-Learning
5300d421ef848c2748a2ba41ced5c6e2fba93200
[ "MIT" ]
31
2017-09-20T13:30:37.000Z
2018-03-01T13:24:58.000Z
prep/preprocess-buildings.py
reinvantveer/Topology-Learning
5300d421ef848c2748a2ba41ced5c6e2fba93200
[ "MIT" ]
7
2018-11-29T11:39:02.000Z
2022-01-12T07:10:26.000Z
# 22007 buildings for gatherings # 23000 industrial buildings # 23000 building for lodging # 23000 buildings for habitation # 23000 shopping buildings # 21014 office buildings # 7832 buildings for health care # 10717 educational buildings # 6916 buildings for sports facilities import os from datetime import timedelta ...
36.459459
119
0.718495
6cf66c68a0b71db2cc83bae3e76ecea52756c9d6
614
py
Python
borza_db.py
rok-lindic/Borza
430f8b177a40bf6494d934e36dd5e85c4367e394
[ "MIT" ]
null
null
null
borza_db.py
rok-lindic/Borza
430f8b177a40bf6494d934e36dd5e85c4367e394
[ "MIT" ]
null
null
null
borza_db.py
rok-lindic/Borza
430f8b177a40bf6494d934e36dd5e85c4367e394
[ "MIT" ]
null
null
null
import json import os.path from borza_model import vlagatelj datoteka = [] db_borza = "borza.json" def shrani123(): file = open(db_borza, 'w') dic = { 'uporabniki': [vlagatelj.__dict__ for vlagatelj in datoteka], ## } json.dump(dic, file,indent=' ') file.close() ...
19.1875
70
0.570033
9f4fdf2cbda3cf073926430a8919dd2f89a74e2f
462
py
Python
src/onegov/town6/views/publications.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/publications.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/town6/views/publications.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.security import Public from onegov.org.views.publications import view_publications from onegov.town6 import TownApp from onegov.org.models import PublicationCollection from onegov.town6.layout import PublicationLayout @TownApp.html(model=PublicationCollection, permission=Public, templat...
38.5
77
0.818182
e296643ea89a59349510324f6b7cd12462f4a66d
3,983
py
Python
year_3/databases_sem1/lab2/rdmslab2/api/dbmodels/employees.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
year_3/databases_sem1/lab2/rdmslab2/api/dbmodels/employees.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
21
2020-03-24T16:26:04.000Z
2022-02-18T15:56:16.000Z
year_3/databases_sem1/lab2/rdmslab2/api/dbmodels/employees.py
honchardev/KPI
f8425681857c02a67127ffb05c0af0563a8473e1
[ "MIT" ]
null
null
null
from api.models import Employee class Employees(object): def __init__(self, cursor): """ :param cursor: MySQLdb.cursor.Cursor """ self.cursor = cursor cursor.execute('SET NAMES utf8;') cursor.execute('SET CHARACTER SET utf8;') cursor.execute('SET character_s...
27.280822
88
0.477278
2c61a221d4ea4a4633ee41c6078046c1a2c29d8a
9,077
py
Python
ceph/ceph-container/tests/conftest.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
63
2018-02-04T03:31:22.000Z
2022-03-07T08:27:39.000Z
ceph/ceph-container/tests/conftest.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
3
2020-06-15T03:41:03.000Z
2020-06-15T03:41:04.000Z
ceph/ceph-container/tests/conftest.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
40
2018-01-22T16:31:16.000Z
2022-03-08T04:40:42.000Z
import json import os import pprint import time import docker from docker.errors import DockerException import pytest def pytest_runtest_logreport(report): if report.failed: try: client = docker.Client('unix://var/run/docker.sock', version="auto") except DockerException as e: ...
34.382576
98
0.66696
64a13b9295bacddf0a4556e7011cc688e50ac156
3,893
py
Python
dataview.py
jibonaronno/RP2040AudioRecord
c31824129d8b603ae2662bbba5bcc63d1213556b
[ "CC0-1.0" ]
null
null
null
dataview.py
jibonaronno/RP2040AudioRecord
c31824129d8b603ae2662bbba5bcc63d1213556b
[ "CC0-1.0" ]
null
null
null
dataview.py
jibonaronno/RP2040AudioRecord
c31824129d8b603ae2662bbba5bcc63d1213556b
[ "CC0-1.0" ]
null
null
null
from os.path import join, dirname, abspath import pandas from qtpy import uic from qtpy.QtCore import Slot, QTimer, QThread, Signal, QObject, Qt from PyQt5.QtGui import * from PyQt5 import QtCore from PyQt5.QtWidgets import * from crud import CRUD import pandas as pd _UI3 = join(dirname(abspath(__file__)), 'dataview...
35.715596
106
0.565887
b60c3710ea03ab231ab84ce1def3fedbc253922a
1,644
py
Python
3_DeepLearning-CNNs/04_CNN_Optimization/2-DataAugmentation/CNN.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
3_DeepLearning-CNNs/04_CNN_Optimization/2-DataAugmentation/CNN.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
3_DeepLearning-CNNs/04_CNN_Optimization/2-DataAugmentation/CNN.py
felixdittrich92/DeepLearning-tensorflow-keras
2880d8ed28ba87f28851affa92b6fa99d2e47be9
[ "Apache-2.0" ]
null
null
null
import os from tensorflow.keras.layers import * from tensorflow.keras.activations import * from tensorflow.keras.models import * from tensorflow.keras.optimizers import * from tensorflow.keras.initializers import * from tensorflow.keras.callbacks import * from Dataset_class import MNIST mnist = MNIST() mnist.data_au...
24.176471
66
0.720803
80b6a67f55372d0197387ea715fcea3cad3f27d3
305
py
Python
config.py
dongdawang/ssrmgr
a9abedf8dc012bf6f421f95a1c215b5788f34322
[ "MIT" ]
null
null
null
config.py
dongdawang/ssrmgr
a9abedf8dc012bf6f421f95a1c215b5788f34322
[ "MIT" ]
1
2021-06-01T22:59:31.000Z
2021-06-01T22:59:31.000Z
config.py
dongjinhai/ssrmgr
a9abedf8dc012bf6f421f95a1c215b5788f34322
[ "MIT" ]
1
2019-09-24T09:37:52.000Z
2019-09-24T09:37:52.000Z
# Webapi token TOKEN_USERNAME = 'username' TOKEN_PASSWORD = 'password' WEBAPI_DOMAIN = 'http://www.djhmgr.top' # WEBAPI_DOMAIN = 'http://127.0.0.1:8000' #Node Information NODE_ID = 3 MUDB_FILE = r'/usr/local/shadowsocksr/mudb.json' MUDB_DATA_FILE = r'mudb_data.json' HOST_DATA_FILE = r'host_data.json'
21.785714
48
0.747541
80cb573fb53cbacbdcb94f4bb8387416d6305bea
22,292
py
Python
app/image.py
MePyDo/pygqa
61cde42ee815968fdd029cc5056ede3badea3d91
[ "MIT" ]
3
2021-02-25T13:19:52.000Z
2021-03-03T03:46:46.000Z
app/image.py
MedPhyDO/pygqa
580b2c6028d2299790a38262b795b8409cbfcc37
[ "MIT" ]
null
null
null
app/image.py
MedPhyDO/pygqa
580b2c6028d2299790a38262b795b8409cbfcc37
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ """ __author__ = "R. Bauer" __copyright__ = "MedPhyDO - Machbarkeitsstudien des Instituts für Medizinische Strahlenphysik und Strahlenschutz am Klinikum Dortmund im Rahmen von Bachelor und Masterarbeiten an der TU-Dortmund / FH-Dortmund" __credits__ = ["R.Bauer", "K.Loot"] __license__ = "M...
33.371257
209
0.498026
03cd93d4dfb98af5e036d35fcf0d2bdd5c1191ee
385
py
Python
Theories/Algorithms/Recursion2/Combinations/combinations.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Theories/Algorithms/Recursion2/Combinations/combinations.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Theories/Algorithms/Recursion2/Combinations/combinations.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import List def combine(self, n: int, k: int) -> List[List[int]]: res = [] self.backtrack(n, k, res, [], 1) return res def backtrack(self, n: int, k: int, res: List[List[int]], path: List[int], index: int): if len(path) == k: res.append(path) return for i in range(in...
24.0625
87
0.553247
206e72b46fd759b8aeb98285168a4a132a3c3dc9
275
py
Python
Problems/Stack/Easy/MakeThingGreat/test_make_thing_great.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Stack/Easy/MakeThingGreat/test_make_thing_great.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Stack/Easy/MakeThingGreat/test_make_thing_great.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from unittest import TestCase from make_thing_great import makeGood class Test(TestCase): def test_make_good(self): self.assertEqual(makeGood("leEeetcode"), "leetcode") self.assertEqual(makeGood("abBAcC"), "") self.assertEqual(makeGood("s"), "s")
34.375
60
0.701818
209eca24b3afd269a8a061cc2bc18a352adfe628
794
py
Python
display/_view.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
display/_view.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
display/_view.py
ihrigb/stagebuzzer
dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680
[ "Apache-2.0" ]
null
null
null
from ._button_lights import ButtonLights from ._display import Display from ._ea_dip203j_3njw_lcd import EaDip203J4Nlw class View: _lcd = EaDip203J4Nlw() def __init__(self, button_lights: ButtonLights): self._button_ligts = button_lights def name(self): pass def up(self, display: D...
20.358974
75
0.641058
20ee61d63daa48c1a1fb408594669e471135a244
2,042
py
Python
pandemie/util/analyse_log.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
null
null
null
pandemie/util/analyse_log.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
null
null
null
pandemie/util/analyse_log.py
marvinsxtr/informaticup-2020-pandemie
0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89
[ "MIT" ]
1
2020-03-28T00:02:41.000Z
2020-03-28T00:02:41.000Z
from collections import defaultdict import yaml from pandemie.util.encoding import filter_unicode def analyse(file): """ This function parses the given logfile and creates a statistic for each pathogen, how many games were lost and how many games were won, when the specific pathogen occurred. This statist...
31.90625
118
0.564153
455ecca411d6d4c19d67657a0996dc8c5a9d389d
581
py
Python
Crashkurs TensorFlow/04_Operatoren Perzeptron.py
slogslog/Kurzgeschichten-in-CSharp
3918c4174220e558cdeeada0edac941811418b93
[ "Unlicense" ]
2
2019-03-15T20:48:34.000Z
2019-04-22T15:24:09.000Z
Crashkurs TensorFlow/04_Operatoren Perzeptron.py
slogslog/Coding-Kurzgeschichten
9b08237038147c6c348d4cf4c69567178e07dd1d
[ "Unlicense" ]
null
null
null
Crashkurs TensorFlow/04_Operatoren Perzeptron.py
slogslog/Coding-Kurzgeschichten
9b08237038147c6c348d4cf4c69567178e07dd1d
[ "Unlicense" ]
null
null
null
# Unterdrückt die AVX2 Warnung import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf def perceptron_with_heaviside(x,w): sum = tf.reduce_sum(tf.multiply(tf.constant(x, tf.dtypes.float32), tf.constant(w, tf.dtypes.float32))) # if return tf.cond(tf.gre...
25.26087
71
0.607573
ff6d2f319d4a79a649cd2ac86f7c9ce659f58025
1,325
py
Python
Contrib-Inspur/openbmc/meta-security/lib/oeqa/runtime/cases/checksec.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
5
2019-11-11T07:57:26.000Z
2022-03-28T08:26:53.000Z
Contrib-Inspur/openbmc/meta-security/lib/oeqa/runtime/cases/checksec.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
3
2019-09-05T21:47:07.000Z
2019-09-17T18:10:45.000Z
Contrib-Inspur/openbmc/meta-security/lib/oeqa/runtime/cases/checksec.py
opencomputeproject/Rack-Manager
e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a
[ "MIT" ]
11
2019-07-20T00:16:32.000Z
2022-01-11T14:17:48.000Z
# Copyright (C) 2019 Armin Kuster <akuster808@gmail.com> # import re from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends from oeqa.runtime.decorator.package import OEHasPackage class CheckSecTest(OERuntimeTestCase): @OEHasPackage(['checksec']) @OETestDepends...
38.970588
76
0.664906
5be42c3676e53efb50db0ab3f25d2a30ba3e88c5
1,055
py
Python
challenges/magicalWell/python3/magicalWell.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
5
2020-05-21T03:02:34.000Z
2021-09-06T04:24:26.000Z
challenges/magicalWell/python3/magicalWell.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
6
2019-04-24T03:39:26.000Z
2019-05-03T02:10:59.000Z
challenges/magicalWell/python3/magicalWell.py
jimmynguyen/codefights
f4924fcffdb4ff14930618bb1a781e4e02e9aa09
[ "MIT" ]
1
2021-09-06T04:24:27.000Z
2021-09-06T04:24:27.000Z
def magicalWell(a, b, n): s = 0 while n > 0: n -= 1 s += a*b a += 1 b += 1 return s if __name__ == '__main__': input0 = [1, 1, 6, 1601, 1891, 1936, 957, 687, 491, 1275] input1 = [2, 1, 5, 337, 352, 1835, 57, 1337, 1552, 362] input2 = [2, 1, 3, 0, 0, 5, 2, 0, 4, 2] expectedOutput = [8, 1, 128, 0, 0, 1780...
50.238095
141
0.635071
1b47ee4560815c17fb3525e70bc1e933e6280349
491
py
Python
python/en/_packages/mecab/src/mecab_basic_usage.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_packages/mecab/src/mecab_basic_usage.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/_packages/mecab/src/mecab_basic_usage.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#! /usr/bin/python3 # -*- coding: utf-8 -*- ''' mecab_basic_usage.py * Draft: 2019-12-10(Tue) src: mecab-python3 0.996.2 https://pypi.org/project/mecab-python3/ $ python mecab_basic_usage.py python python python 名詞-固有名詞-組織 が ガ が 助詞-格助詞-一般 大好き ダイスキ 大好き 名詞-形容動詞語幹 です デス です 助動詞 特殊・デス 基本形 EOS $ ''' import MeCab wa...
16.931034
44
0.680244
1b755da5d25b7cfb3ea0072bb07dd25e472e42d5
20,735
py
Python
rev/brodyrev/solve.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
6
2021-02-18T15:07:55.000Z
2022-02-04T01:38:10.000Z
rev/brodyrev/solve.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
rev/brodyrev/solve.py
vidner/codepwnda-ctf
7e086044b753fe555b44395b79827d2f5b89da1d
[ "Unlicense" ]
null
null
null
from z3 import * def brute(x): pass LEN = 66 s = Solver() a1 = [BitVec(i, 32) for i in range(LEN)] # ======================================== a = [121, 123, 113, 131, 113, 57, 59, 123, 131, 105, 105, 131, 123, 131, 121, 57, 129, 131, 59, 131, 131, 121, 121, 57, 113, 121, 113, 123, 131, 57, 113, 113, 121, 131, 1...
797.5
20,238
0.565662
848e18a66d6f1fd711b564befd5d27c7f9e45ab6
4,707
py
Python
benchmarks/matbench_v0.1_modnet_v0.1.10/run.py
sparks-baird/matbench
4424609454286e32fff2bcc724379b2a316c5a76
[ "MIT" ]
15
2021-11-01T09:02:19.000Z
2022-03-19T10:59:41.000Z
benchmarks/matbench_v0.1_modnet_v0.1.10/run.py
sparks-baird/matbench
4424609454286e32fff2bcc724379b2a316c5a76
[ "MIT" ]
62
2021-09-20T14:09:59.000Z
2022-03-30T19:03:22.000Z
benchmarks/matbench_v0.1_modnet_v0.1.10/run.py
ardunn/matbench
7d11a2d63766339ec00e610e2255be29b81544d3
[ "MIT" ]
4
2021-03-22T10:37:42.000Z
2021-07-20T14:11:28.000Z
# This files serves only for illustrative purposes. # The code used for the published results can be found in the following repo: https://github.com/ml-evs/modnet-matbench from matbench.bench import MatbenchBenchmark from matbench.constants import CLF_KEY from modnet.preprocessing import MODData from modnet.featurizer...
33.147887
141
0.606968
ed8e49d12b57c74df896e565cf9b2cee8de0d75e
8,208
py
Python
Utils/py/ActionSelection/run_simulation_with_particleFilter.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/ActionSelection/run_simulation_with_particleFilter.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/ActionSelection/run_simulation_with_particleFilter.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import math import copy import numpy as np from matplotlib import pyplot as plt from matplotlib.patches import Circle from tools import action as a from tools.action import Category from tools import Simulation as Sim from tools import potential_field as pf from naoth import math2d as m2d from tools import tools from ...
34.343096
127
0.599903
ed9e6263c108f19f4ddc273e63d99ed1a2775bff
567
py
Python
Uebung2/Uebung2_Aufgabe6_3.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
1
2018-04-18T19:10:06.000Z
2018-04-18T19:10:06.000Z
Uebung2/Uebung2_Aufgabe6_3.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
null
null
null
Uebung2/Uebung2_Aufgabe6_3.py
B0mM3L6000/EiP
f68718f95a2d3cde8ead62b6134ac1b5068881a5
[ "MIT" ]
1
2018-04-29T08:48:00.000Z
2018-04-29T08:48:00.000Z
n = int(input("Welcher Wert für n?")) j = 0 i = 1 zeilenbreite = n + (n-1) while j < (n*2-1): if j <= n-1: #dach wird hier gemacht zeile = i+(i-1) zeilenseite = int((zeilenbreite - zeile)/2) print (zeilenseite*" ",end='') print (zeile*"0", end='') print (zeilenseite*" ")...
25.772727
51
0.488536
94b0930fbb1c244a66f3d334ec5b62b40d5de799
12,827
py
Python
pacman-arch/test/pacman/pmtest.py
Maxython/pacman-for-termux
3b208eb9274cbfc7a27fca673ea8a58f09ebad47
[ "MIT" ]
23
2021-05-21T19:11:06.000Z
2022-03-31T18:14:20.000Z
source/pacman-6.0.1/test/pacman/pmtest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
11
2021-05-21T12:08:44.000Z
2021-12-21T08:30:08.000Z
source/pacman-6.0.1/test/pacman/pmtest.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
# Copyright (c) 2006 by Aurelien Foret <orelien@chez.com> # Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org> # # 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; eith...
35.531856
86
0.562018
158f82756b1e79f87bee16adbb15aa9047f82393
3,872
py
Python
src/compgen2/const.py
CorrelAid/compgen-ii-cgv
810a044d6bbe1ce058a359115e3e5fc71a358549
[ "MIT" ]
1
2022-02-02T12:41:06.000Z
2022-02-02T12:41:06.000Z
src/compgen2/const.py
CorrelAid/compgen-ii-cgv
810a044d6bbe1ce058a359115e3e5fc71a358549
[ "MIT" ]
null
null
null
src/compgen2/const.py
CorrelAid/compgen-ii-cgv
810a044d6bbe1ce058a359115e3e5fc71a358549
[ "MIT" ]
null
null
null
# ## Definitions FILENAME_GOV_ITEMS = "gov_a_govitem.csv" FILENAME_GOV_RELATIONS = "gov_a_relation.csv" FILENAME_GOV_TYPENAMES = "gov_a_typenames.csv" FILENAME_GOV_PROPERTY_NAMES = "gov_a_propertynames.csv" FILENAME_GOV_PROPERTY_TYPES = "gov_a_propertytypes.csv" FILENAME_VL = "deutsche-verlustlisten-1wk.parquet" FILEN...
14.666667
109
0.62345
ec79693660642993f32ec8a007c3a614cdac1e99
296
py
Python
pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task2_Solution_with_append.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task2_Solution_with_append.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
pages/themes/beginners/sequenceDataTypes/Tasks_and_HW/task2_Solution_with_append.py
ProgressBG-Python-Course/ProgressBG-Python
6429833696c2c50d9f902f62cc3a65ca62659c69
[ "MIT" ]
null
null
null
first_names = ["ivan", "maria", "petar"] sur_names = ["ivanov", "popova", "petrov"] # names will store the third list. In the beginning it's empty: names = [] # make the third list: for i in range(len(first_names)): names.append(first_names[i]) names.append(sur_names[i]) print(names)
22.769231
63
0.675676
ecbedea4cdbee3a3cc4ff27357b673334115b50b
3,722
py
Python
LFA/class_maestro.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
10
2020-12-08T20:18:15.000Z
2021-06-07T20:00:07.000Z
LFA/class_maestro.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-06-28T03:42:13.000Z
2021-06-28T16:53:13.000Z
LFA/class_maestro.py
joao-frohlich/BCC
9ed74eb6d921d1280f48680677a2140c5383368d
[ "Apache-2.0" ]
2
2021-01-14T19:59:20.000Z
2021-06-15T11:53:21.000Z
from utils import header, nickname class Maestro: nicks = nickname("nickname") time = 0 def __init__(self, factory_list): self.factory_list = factory_list self.list_words = [[] for factory_type in self.factory_list] def set_words(self, words): for word in words: ...
34.462963
115
0.470446
bf2789eb7c2e21f69f04be3f1baad60a5bc9cf99
9,826
py
Python
tests/onegov/fsi/test_views_course_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/fsi/test_views_course_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/fsi/test_views_course_event.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from datetime import timedelta from sedate import utcnow from onegov.fsi.models import CourseEvent def test_course_event_collection(client): view = '/fsi/events' client.get(view, status=403) client.login_member() client.get(view) def test_course_event_details(client_with_db): client = client_...
32.536424
77
0.679931
bf3c7a8b228dc5d989714c7eb024e0c82a73a657
2,620
py
Python
src/visuanalytics/tests/analytics/transform/types/test_transform_sub_lists.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_sub_lists.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_sub_lists.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 TestTransformSubLists(unittest.TestCase): def setUp(self): self.data = { "words": ["Canada", "Argentina", "Cyprus", "Schweden", "Norway", "USA", "Germany", "Unite...
32.75
98
0.383969
da23535224c1d0a1cc60d21581291bec4769b90e
1,630
py
Python
py/utils/util.py
zjZSTU/GoogLeNet
a0801e45006d34b4901a8834397961ce17f24e2e
[ "Apache-2.0" ]
1
2021-04-18T15:36:33.000Z
2021-04-18T15:36:33.000Z
py/utils/util.py
zjZSTU/GoogLeNet
a0801e45006d34b4901a8834397961ce17f24e2e
[ "Apache-2.0" ]
null
null
null
py/utils/util.py
zjZSTU/GoogLeNet
a0801e45006d34b4901a8834397961ce17f24e2e
[ "Apache-2.0" ]
3
2020-07-10T11:45:52.000Z
2022-01-15T08:46:14.000Z
# -*- coding: utf-8 -*- """ @date: 2020/3/25 下午3:06 @file: util.py @author: zj @description: """ import os import torch import random import matplotlib.pyplot as plt from matplotlib.pyplot import MultipleLocator def get_device(): return torch.device('cuda:0' if torch.cuda.is_available() else 'cpu') def check...
20.375
117
0.611656
e5d085ec4027a5447a78e62139472094d9521ce0
922
py
Python
INBa/2015/Shirlin_V_V/task_6_32.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Shirlin_V_V/task_6_32.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/Shirlin_V_V/task_6_32.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
# Задача 6. Вариант 32 # Создайте игру, в которой компьютер загадывает название одного из двадцати восьми стран, входящих в Европейский союз, а игрок должен его угадать. # 24.03.2016 # Ширлин Вячеслав Викторович import random print ("Программа загадывает название одного из двадцати восьми стран, входящих в Европейски...
41.909091
300
0.697397
daab95b7d5967ef3b32387a7e1d4420885204708
1,468
py
Python
Data-Structures/Linked_List/Circular_Linked_List/circular_linked_list.py
hussamEL-Hwary/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
18
2016-11-01T04:00:36.000Z
2021-09-13T14:26:35.000Z
Data-Structures/Linked_List/Circular_Linked_List/circular_linked_list.py
JEERU/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
60
2016-10-11T14:50:47.000Z
2016-10-31T11:05:01.000Z
Data-Structures/Linked_List/Circular_Linked_List/circular_linked_list.py
JEERU/DS-Algo-Handbook
86a97d586a4ca8b17168c0a9f5a9f43f856eba58
[ "MIT" ]
87
2016-09-08T05:04:50.000Z
2016-10-30T19:19:53.000Z
# Python program to demonstrate circular linked list traversal # Structure for a Node class Node: # Constructor to create a new node def __init__(self, data): self.data = data self.next = None class CircularLinkedList: # Constructor to create a empty circular linked list ...
24.065574
63
0.581744
9745df931c17905243befbdd5e093c7594acc1f8
1,914
py
Python
Lab3/Task[13-15].py
ValeriyMartsyshyn/HelloPython
badcf85bc54e889eed0286b420e5cabe68da8572
[ "MIT" ]
null
null
null
Lab3/Task[13-15].py
ValeriyMartsyshyn/HelloPython
badcf85bc54e889eed0286b420e5cabe68da8572
[ "MIT" ]
null
null
null
Lab3/Task[13-15].py
ValeriyMartsyshyn/HelloPython
badcf85bc54e889eed0286b420e5cabe68da8572
[ "MIT" ]
null
null
null
""" Task 1 A simple way of encrypting a message is to rearrange its characters. One way to rearrange the characters is to pick out the characters at even indices, put them first in the encrypted string, and follow them by the odd characters. For example, the string message would be encrypted as msaeesg because the even...
29.446154
132
0.636886
97545f97b368b39409414ebe0dd327ecbf455b1a
11,877
py
Python
Brendan/youtube.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
Brendan/youtube.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
Brendan/youtube.py
austinmh12/DiscordBots
55550b68a7ad6423de55e62dbbff93fd88f08ff2
[ "MIT" ]
null
null
null
import discord import logging import json from datetime import datetime as dt, timedelta as td from discord.ext.commands import Bot from discord.ext import commands import asyncio import requests as r import os import sys from collections import namedtuple from PIL import Image from io import BytesIO from random import...
36.544615
159
0.734782
e725ea4f623cf24aba560e274642a00606b966ab
170
py
Python
python/python_backup/PRAC_PYTHON/ab11.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/PRAC_PYTHON/ab11.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/PRAC_PYTHON/ab11.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
#sum of power upto n s=0 n=input("Enter range:"); j=1 for i in range(1,n,1): print pow(j,j), s=s+pow(j,j) j=j+2 print "Sum is:",s
13.076923
25
0.470588
41676456ecf3a3ac96c6c7de96050031face1f05
6,065
py
Python
ForwardEntnahmerate.py
ThoEngel/rentenplanung
879c9a678ba1ff951a1f92b0c42673a7943a18e6
[ "MIT" ]
3
2022-01-01T18:24:46.000Z
2022-01-08T15:28:46.000Z
ForwardEntnahmerate.py
ThoEngel/Finanzen-Simuliert
879c9a678ba1ff951a1f92b0c42673a7943a18e6
[ "MIT" ]
null
null
null
ForwardEntnahmerate.py
ThoEngel/Finanzen-Simuliert
879c9a678ba1ff951a1f92b0c42673a7943a18e6
[ "MIT" ]
null
null
null
''' Mit der Forward-Entnahmerate steigert Jana ihr Budget um 38% https://www.finanzen-erklaert.de/forward-entnahmerate/ ''' import pandas as pd import time from SEsimulation.mDate import mDate from SEsimulation import SEsimulation import numpy as np import plotly.express as px from tabulate import tabulate import mu...
32.783784
149
0.639571
d8669e54985a9d31f9d962a20f41f68c08d5c483
725
py
Python
lib/python/qmk/tests/test_qmk_keymap.py
fzf/qmk_toolbox
10d6b425bd24b45002555022baf16fb11254118b
[ "MIT" ]
null
null
null
lib/python/qmk/tests/test_qmk_keymap.py
fzf/qmk_toolbox
10d6b425bd24b45002555022baf16fb11254118b
[ "MIT" ]
null
null
null
lib/python/qmk/tests/test_qmk_keymap.py
fzf/qmk_toolbox
10d6b425bd24b45002555022baf16fb11254118b
[ "MIT" ]
null
null
null
import qmk.keymap def test_template_onekey_proton_c(): templ = qmk.keymap.template('handwired/onekey/proton_c') assert templ == qmk.keymap.DEFAULT_KEYMAP_C def test_template_onekey_pytest(): templ = qmk.keymap.template('handwired/onekey/pytest') assert templ == '#include QMK_KEYBOARD_H\nconst uint16...
36.25
133
0.742069
d8f7781c29f13f21b4792c70e97c53ebf46940b3
12,195
py
Python
MoPulseGen/simulator_for_CC.py
tushar-agarwal2909/MoPulseGen
a0edeaf67f956e7db27e70f07e47d2f992bcb6f3
[ "BSD-2-Clause" ]
null
null
null
MoPulseGen/simulator_for_CC.py
tushar-agarwal2909/MoPulseGen
a0edeaf67f956e7db27e70f07e47d2f992bcb6f3
[ "BSD-2-Clause" ]
null
null
null
MoPulseGen/simulator_for_CC.py
tushar-agarwal2909/MoPulseGen
a0edeaf67f956e7db27e70f07e47d2f992bcb6f3
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Feb 10 08:03:15 2020 @author: agarwal.270a """ import numpy as np import matplotlib.pyplot as plt from scipy import io from scipy import signal as sig from pathlib import Path class Simulator(object): def __init__(self,input_list,output_list): ...
39.212219
153
0.553588
2b401edb93dce9200d59bae234d7cf1d61b26f8a
15,898
py
Python
tests/onegov/swissvotes/test_forms.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/swissvotes/test_forms.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
tests/onegov/swissvotes/test_forms.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from cgi import FieldStorage from datetime import date from decimal import Decimal from io import BytesIO from onegov.swissvotes.collections import SwissVoteCollection from onegov.swissvotes.collections import TranslatablePageCollection from onegov.swissvotes.forms import AttachmentsForm from onegov.swissvotes.forms im...
28.800725
79
0.608316
5abe6d1c324111e861d4a1d6a3efa97321895287
425
py
Python
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/06banco/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/06banco/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/06banco/main.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
from banco import Banco numero = input('Numero Conta: ') nome = input('Nome: ') deposito_inicial = input('Deseja fazer deposito inicial [S/N]? ').upper() print(deposito_inicial) if deposito_inicial[0] == 'S': saldo = float(input('Valor deposito inicial: R$ ')) b1 = Banco(numero, nome, saldo) print('Valo...
25
83
0.665882
51a0b7f332cc2e75a7a65631e24c4688a9643e01
92
py
Python
2014/05/shevotes-world-parliaments/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/05/shevotes-world-parliaments/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/05/shevotes-world-parliaments/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 = '1rCyQ1hiT4-8nofJoMmXj07NiIoj4HBkisnhH0Y_ug1k'
23
68
0.836957
89103d0c157548a894dd58ee2640fa2408e53460
335
py
Python
Flask-Redis/app.py
ruanzz/Dockerfiles
00a630ba0a9a5a82500a3ad62b31637e3f2b9a1f
[ "Apache-2.0" ]
null
null
null
Flask-Redis/app.py
ruanzz/Dockerfiles
00a630ba0a9a5a82500a3ad62b31637e3f2b9a1f
[ "Apache-2.0" ]
null
null
null
Flask-Redis/app.py
ruanzz/Dockerfiles
00a630ba0a9a5a82500a3ad62b31637e3f2b9a1f
[ "Apache-2.0" ]
null
null
null
import socket import os app = Flask(__name__) redis = Redis(host=os.environ.get("REDIS_HOST","127.0.0.1"),port= 6379) @app.route("/hello") def hello(): redis.incr("hits") return "hostname[%s] visit %s times.\n" %redis.get("hits"),socket.gethostname if __name__ == "__main__": app.run(host="0.0.0.0",port=5...
25.769231
81
0.671642
85340ad919aeb39592be2bd8c4e3018751f1af6d
133
py
Python
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 92/92.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 92/92.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 92/92.py
jaswinder9051998/Resources
fd468af37bf24ca57555d153ee64693c018e822e
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
#Count files with a .py extension inside the root1 directory] import glob file_list=glob.glob1("files","*.py") print(len(file_list))
26.6
61
0.759398
a44bd1d4747c651a06003e81c24f1bb13c6fd49f
2,139
py
Python
21-fs-ias-lec/03-BACnetCore/samples/communication_udp.py
cn-uofbasel/BCN
2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a
[ "MIT" ]
8
2020-03-17T21:12:18.000Z
2021-12-12T15:55:54.000Z
21-fs-ias-lec/03-BACnetCore/samples/communication_udp.py
cn-uofbasel/BCN
2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a
[ "MIT" ]
2
2021-07-19T06:18:43.000Z
2022-02-10T12:17:58.000Z
21-fs-ias-lec/03-BACnetCore/samples/communication_udp.py
cn-uofbasel/BCN
2d0852e00f2e7f3c4f7cf30f60c6765f2761f80a
[ "MIT" ]
25
2020-03-20T09:32:45.000Z
2021-07-18T18:12:59.000Z
from ..src.core.node import Node from ..src.replication.udp_channel import UDPChannel from ..src.core.com_link import OperationModes from ..src.core.interface.event import Content from ..src.core.storage.database_handler import UnknownFeedError import sys import time """ This sample shows how to import and export fee...
33.421875
120
0.70547
f189e76d04e3e8a23d9b112b4a112a3b1e3aef61
50,526
py
Python
paddlenlp/taskflow/utils.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
paddlenlp/taskflow/utils.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
paddlenlp/taskflow/utils.py
mukaiu/PaddleNLP
0315365dbafa6e3b1c7147121ba85e05884125a5
[ "Apache-2.0" ]
null
null
null
# coding:utf-8 # 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 req...
36.06424
157
0.503721
747a6423acb8bf06d32aa3269442132c13363a2e
1,350
py
Python
src/json_validator.py
ausgangssperre-io/ausgangssperre-io.github.io
5421050b9e8293fd53346595052b2fa23dfed815
[ "MIT" ]
3
2020-03-21T19:54:27.000Z
2020-03-29T16:23:34.000Z
src/json_validator.py
ausgangssperre-io/ausgangssperre-io.github.io
5421050b9e8293fd53346595052b2fa23dfed815
[ "MIT" ]
6
2020-03-21T15:47:44.000Z
2020-03-22T19:33:13.000Z
src/json_validator.py
ausgangssperre-io/ausgangssperre-io.github.io
5421050b9e8293fd53346595052b2fa23dfed815
[ "MIT" ]
2
2020-03-21T11:48:09.000Z
2020-03-21T20:17:44.000Z
# Run this with python3 -m unittest json_validator.py import json import unittest class TestStringMethods(unittest.TestCase): def setUp(self): legal_req = open("../LegalTabelle.json") self.y = json.load(legal_req) def test_all_states_in_file(self): print(self.y["Bundesländer"].keys()) self.assertTrue(len(...
43.548387
302
0.735556
706f7f051369531d1f9a9c2de78f812d17c25548
289
py
Python
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/time_elapsed.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/time_elapsed.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/Python_Progs/PYTHON_LEGACY_PROJECTS/time_elapsed.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import time def sum_of_n_numbers(n): start_time = time.time() s = 0 for i in range(1,n+1): s=s+i end_time=time.time() return (end_time-start_time) n=int(input("Enter the number : ")) print("\nTime to sum of 1 to ",n," and the required time to calculate : ",sum_of_n_numbers(n))
20.642857
94
0.681661
8ee136852e19e1fb3b81756b224f2a112fb4a578
11,478
py
Python
jml.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
2
2020-09-24T12:11:16.000Z
2022-03-31T04:47:24.000Z
jml.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
1
2021-02-27T15:06:27.000Z
2021-03-01T16:32:48.000Z
jml.py
jneug/schule-projekte
4f1d56d6bb74a47ca019cf96d2d6cc89779803c9
[ "MIT" ]
1
2021-02-24T05:12:35.000Z
2021-02-24T05:12:35.000Z
#!/usr/bin/env python3 import os import argparse import shutil import sys import zipfile parser = argparse.ArgumentParser(description='Compile java source files with special tags into a version with new content') parser.add_argument('indir', metavar='IN', help='project directory containting the sou...
41.139785
270
0.533978
796d040686b22d5118edb4cc3cd11555db926a7e
362
py
Python
pacman-arch/test/pacman/tests/remove042.py
Maxython/pacman-for-termux
3b208eb9274cbfc7a27fca673ea8a58f09ebad47
[ "MIT" ]
23
2021-05-21T19:11:06.000Z
2022-03-31T18:14:20.000Z
source/pacman-6.0.1/test/pacman/tests/remove042.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
11
2021-05-21T12:08:44.000Z
2021-12-21T08:30:08.000Z
source/pacman-6.0.1/test/pacman/tests/remove042.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-09-26T08:44:40.000Z
2021-09-26T08:44:40.000Z
self.description = "Cascade remove a package required by another package" lp1 = pmpkg("pkg1") lp1.depends = ["imaginary"] self.addpkg2db("local", lp1) lp2 = pmpkg("pkg2") lp2.provides = ["imaginary"] self.addpkg2db("local", lp2) self.args = "-Rc %s" % lp2.name self.addrule("PACMAN_RETCODE=0") self.addrule("!PKG_EXI...
22.625
73
0.709945
5c3f42f758bc34fba27eaef3f253e010b5f48385
38
py
Python
lib/python3.5/__future__.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
1
2020-08-16T04:04:23.000Z
2020-08-16T04:04:23.000Z
lib/python3.5/__future__.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
5
2020-06-05T18:53:24.000Z
2021-12-13T19:49:15.000Z
lib/python3.5/__future__.py
hwroitzsch/BikersLifeSaver
469c738fdd6352c44a3f20689b17fa8ac04ad8a2
[ "MIT" ]
null
null
null
/usr/local/lib/python3.5/__future__.py
38
38
0.815789
69074c975bb96c510bdeba9e034b72e10cb2b29c
1,764
py
Python
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/13_kapitel_05_repetitionsaufgabe_12_math_trainer.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
null
null
null
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/13_kapitel_05_repetitionsaufgabe_12_math_trainer.py
Apop85/Scripts
e71e1c18539e67543e3509c424c7f2d6528da654
[ "MIT" ]
6
2020-12-24T15:15:09.000Z
2022-01-13T01:58:35.000Z
Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_05_Kontrollstrukturen/13_kapitel_05_repetitionsaufgabe_12_math_trainer.py
Apop85/Scripts
1d8dad316c55e1f1343526eac9e4b3d0909e4873
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding:utf-8 -*- ### # File: 13_kapitel_05_repetitionsaufgabe_12_math_trainer.py # Project: Kapitel_05_Kontrollstrukturen # Created Date: Sunday 24.02.2019, 10:26 # Author: Apop85 # ----- # Last Modified: Sunday 24.02.2019, 10:52 # ----- # Copyright (c) 2019 Apop85 # This software is publis...
35.28
102
0.662132
690f688c1dbf86fadc5c975992ce1d68e571a6f4
2,618
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/build/setup-libsumo.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/build/setup-libsumo.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/build/setup-libsumo.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
#!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2017-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www.ec...
34.447368
104
0.703209
c605ea249898238526f505b38439126e6c033ede
2,600
py
Python
naivebayes.py
sabipu/Naive-Bayes-Classifier-Irish-Dataset
8e22c9838fa3784424e91bffbbf837c44c410cd2
[ "MIT" ]
null
null
null
naivebayes.py
sabipu/Naive-Bayes-Classifier-Irish-Dataset
8e22c9838fa3784424e91bffbbf837c44c410cd2
[ "MIT" ]
null
null
null
naivebayes.py
sabipu/Naive-Bayes-Classifier-Irish-Dataset
8e22c9838fa3784424e91bffbbf837c44c410cd2
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Bipu Bajgai & Sabharish Jayachandran """ # Author: Bipu Bajgai & Sabharish Jayachandran # License: MIT # To report a bug or contribute use following link # https://github.com/sabipu/Naive-Bayes-and-Fuzzy-System-Iris-Dataset #================ # LIBRARIES USED #================ impo...
27.083333
150
0.604231
ba8412fdfb2bb488f54a881a8d1ced0de635243a
436
py
Python
us1/python/spektral.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
2
2019-12-10T10:25:11.000Z
2021-01-26T13:59:40.000Z
us1/python/spektral.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
null
null
null
us1/python/spektral.py
chrbeckm/anfaenger-praktikum
51764ff23901de1bc3d16dc935acfdc66bb2b2b7
[ "MIT" ]
1
2020-12-06T21:24:58.000Z
2020-12-06T21:24:58.000Z
import numpy as np import matplotlib.pyplot as plt from uncertainties import ufloat import uncertainties.unumpy as unp from scipy import optimize import scipy.constants as const from scipy.stats import sem v, amp = np.genfromtxt('python/fftwerte.txt', unpack=True) # print(len(v), len(amp)) plt.plot(v, amp, "b--", labe...
22.947368
58
0.733945
032048a4d3cf4f2c1e58c24f222d16cfbfbfaf43
381
py
Python
Online-Judges/HackerRank/Python/Find_a_string.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/HackerRank/Python/Find_a_string.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/HackerRank/Python/Find_a_string.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def count_substring(string, sub_string): ct, i, j = 0, 0, len(sub_string) ln = len(string) while j <= ln: if string[i:j] == sub_string: ct += 1 i += 1 j += 1 return ct if __name__ == '__main__': string = input().strip() sub_string = input().strip() ...
21.166667
47
0.543307
0031674287d4c6dedd4ff80e7b07165761abbf98
1,693
py
Python
.venv/Lib/site-packages/dexpy/samplers.py
AI-Assistant/FEMAG-Python
ff86e8f41485ae9df6034e6b8e810b59f8094c70
[ "MIT" ]
21
2016-10-19T18:13:03.000Z
2021-11-02T13:58:31.000Z
.venv/Lib/site-packages/dexpy/samplers.py
AI-Assistant/FEMAG-Python
ff86e8f41485ae9df6034e6b8e810b59f8094c70
[ "MIT" ]
43
2016-10-11T20:56:28.000Z
2020-08-20T16:39:38.000Z
.venv/Lib/site-packages/dexpy/samplers.py
AI-Assistant/FEMAG-Python
ff86e8f41485ae9df6034e6b8e810b59f8094c70
[ "MIT" ]
6
2017-12-22T03:47:37.000Z
2021-03-13T03:45:26.000Z
"""Contains several samplers.""" import numpy as np def uniform_simplex_sample(N, q): """Returns an array of points sampled uniformly from a simplex :param N: the number of random sample to be generated :param q: the dimension of the simplex """ sample = np.random.exponential(1.0, (N, q)) row...
31.351852
108
0.625517
cc40b3ae8390de063b5e98553c2ab47e67c9995d
927
py
Python
tests/nlu/emulators/test_no_emulator.py
chaneyjd/rasa
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
[ "Apache-2.0" ]
5
2020-08-28T06:44:31.000Z
2021-03-14T18:46:01.000Z
tests/nlu/emulators/test_no_emulator.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
209
2020-03-18T18:28:12.000Z
2022-03-01T13:42:29.000Z
tests/nlu/emulators/test_no_emulator.py
alfredfrancis/rasa
d8d226408f20cc2563c3aefbccef3e364a447666
[ "Apache-2.0" ]
3
2019-02-27T10:13:16.000Z
2019-07-26T08:33:45.000Z
def test_dummy_request(): from rasa.nlu.emulators.no_emulator import NoEmulator em = NoEmulator() norm = em.normalise_request_json({"text": ["arb text"]}) assert norm == {"text": "arb text", "time": None} norm = em.normalise_request_json({"text": ["arb text"], "time": "1499279161658"}) assert ...
31.965517
85
0.665588
cc8ae0e119fd11ea9e92d6c7ac22917386ed58e3
792
py
Python
RoundRobin Scheduling.py
sanxy/hacktoberfest-1
913582b310688d496602e8b1bc9166cb64866e38
[ "MIT" ]
null
null
null
RoundRobin Scheduling.py
sanxy/hacktoberfest-1
913582b310688d496602e8b1bc9166cb64866e38
[ "MIT" ]
null
null
null
RoundRobin Scheduling.py
sanxy/hacktoberfest-1
913582b310688d496602e8b1bc9166cb64866e38
[ "MIT" ]
1
2020-09-30T18:53:05.000Z
2020-09-30T18:53:05.000Z
from statistics import mean n=int(input("Enter number of processes: ")) Bt=list(map(int, input("Enter burst time of processes: ").split())) At=list(map(int, input("Enter arrival time of processes: ").split())) TQ=int(input("Enter Time Quantum: ")) data=dict(zip(At,Bt)) dics=dict(sorted(data.items())) at=[x for x...
26.4
70
0.52399
3b0186d25280b966eec37af8ea49198430b78b36
8,280
py
Python
research/cv/midas/infer/sdk/eval/eval_by_sdk.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/midas/infer/sdk/eval/eval_by_sdk.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/midas/infer/sdk/eval/eval_by_sdk.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.466063
120
0.61558
d1ec7c697e71d980e9a40a18ab171e5efb1f6bbf
853
py
Python
frappe-bench/apps/erpnext/erpnext/patches/v7_1/move_sales_invoice_from_parent_to_child_timesheet.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/v7_1/move_sales_invoice_from_parent_to_child_timesheet.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
null
null
null
frappe-bench/apps/erpnext/erpnext/patches/v7_1/move_sales_invoice_from_parent_to_child_timesheet.py
Semicheche/foa_frappe_docker
a186b65d5e807dd4caf049e8aeb3620a799c1225
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc('projects', 'doctype', 'timesheet_detail') frappe.reload_doc('accounts', 'doctype', 'sales_invoice_timesheet') frappe.db.sql(""" update `tabTimesheet` as ts, (select sum(billing_amount) as billing_amount, sum(billing_...
42.65
111
0.751465
4e8ec1c36db5e26f6f0d779bf464b326f164e05f
362
py
Python
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/01estoque/estoque.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/01estoque/estoque.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/000Exercicios/01estoque/estoque.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
class Estoque(): def __init__(self, nome, preco, quantidade): self.nome = nome self.preco = preco self.quantidade = quantidade def total(self): return self.preco * self.quantidade def adicionar(self, valor): self.quantidade += valor def remover(self...
25.857143
48
0.593923
14d077f582bb982dac0b93c0f5a948e5eb396f20
343
py
Python
quark_core_api/data/storage/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/data/storage/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
quark_core_api/data/storage/__init__.py
arcticle/Quark
17aa5b5869a9e9c7a04c1a371fef5998f33dc319
[ "MIT" ]
null
null
null
from quark_core_api.data.storage.validation import * from quark_core_api.data.storage.query_operators import * from quark_core_api.data.storage.query import * from quark_core_api.data.storage.storage_object import * from quark_core_api.data.storage.storage_factory import * __all__ = ["FileStorage", "InMemoryStorage", ...
49
68
0.836735
6deab12547da67092086e638ac44f0c5e4bad7a4
597
py
Python
biowardrobe_airflow_advanced/operators/deseq_jobgatherer.py
Barski-lab/biowardrobe-airflow-advanced
e43aa268fd05635e8356788b8e814279b698263f
[ "Apache-2.0" ]
null
null
null
biowardrobe_airflow_advanced/operators/deseq_jobgatherer.py
Barski-lab/biowardrobe-airflow-advanced
e43aa268fd05635e8356788b8e814279b698263f
[ "Apache-2.0" ]
1
2018-09-30T16:57:06.000Z
2018-09-30T16:57:06.000Z
biowardrobe_airflow_advanced/operators/deseq_jobgatherer.py
Barski-lab/biowardrobe-airflow-advanced
e43aa268fd05635e8356788b8e814279b698263f
[ "Apache-2.0" ]
null
null
null
import os from cwl_airflow import CWLJobGatherer from biowardrobe_airflow_advanced.utils.upload import upload_deseq_results, update_genelist_table_for_deseq class DeseqJobGatherer(CWLJobGatherer): def __init__(self, *args, **kwargs): super(DeseqJobGatherer, self).__init__(task_id=self.__class__.__name__,...
35.117647
107
0.755444
fec006721357d9745c3d65e838a4d140ea9bf030
1,297
py
Python
codeit/oop/game_character.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/oop/game_character.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/oop/game_character.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
class GameCharacter: # 게임 캐릭터 클래스 def __init__(self, name, hp, power): self.name = name self.hp = hp self.power = power def is_alive(self): return self.hp > 0 def get_attacked(self, damage): """ 게임 캐릭터가 살아있으면 공격한 캐릭터의 공격력만큼 체력을 깎는 메소드 조건: ...
27.595745
59
0.609869
3aa6183f72a3c847af3cfa85a5299812f7b86d36
1,189
py
Python
website/apps/projects/admin.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
1
2017-03-14T08:08:31.000Z
2017-03-14T08:08:31.000Z
website/apps/projects/admin.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
null
null
null
website/apps/projects/admin.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
null
null
null
from django.contrib import admin from adminsortable2.admin import SortableAdminMixin from projects.models import Project, Category from fileupload.models import File class CategoryAdmin(admin.ModelAdmin): prepopulated_fields = {'slug': ('title',)} admin.site.register(Category, CategoryAdmin) class ProjectAdmin(...
32.135135
94
0.654331
a3a3f52b661c9f7e7160d4b900745100ba023b4b
1,162
py
Python
components/amp-utility/python/I2C.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
components/amp-utility/python/I2C.py
ekmixon/AliOS-Things
00334295af8aa474d818724149726ca93da4645d
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
components/amp-utility/python/I2C.py
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
# * coding: UTF8 * """ ================================================================================================= """ def open(type): """ 打开并根据board.json配置实例 :param type: 对象类型 :returns: 0: 成功,其他: 失败 :raises OSError: EINVAL """ pass def write(dataBuffer): """ 发送数据,该函数为阻塞函数,I2C发送完成后...
16.366197
97
0.57401
6e2b616123e817acb016d35fdf62615398e7edc5
859
py
Python
app/models/flashcard_collections.py
kalbe09/Kicards
ad64cfa808307b10f98f95dbb8cf0350995c3afd
[ "MIT" ]
null
null
null
app/models/flashcard_collections.py
kalbe09/Kicards
ad64cfa808307b10f98f95dbb8cf0350995c3afd
[ "MIT" ]
null
null
null
app/models/flashcard_collections.py
kalbe09/Kicards
ad64cfa808307b10f98f95dbb8cf0350995c3afd
[ "MIT" ]
null
null
null
from datetime import datetime from .. import db from .hascategory import has_category class Collection(db.Model): __tablename__ = 'flashcardcollection' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(64), index=True) duedate = db.Column(db.Text) prio = db.Column(d...
33.038462
83
0.614668
6e3da184bb8c96497e3d0bd2180e89a6cf668056
984
py
Python
src/onegov/fsi/collections/course.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/collections/course.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/fsi/collections/course.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.collection import GenericCollection from onegov.fsi.models.course import Course class CourseCollection(GenericCollection): def __init__( self, session, auth_attendee=None, show_hidden_from_public=False, ): super().__init__(session) ...
28.114286
69
0.646341
2896c93c77eba9a40de25fecb031490d195c7059
88
py
Python
Shivani/sphere.py
63Shivani/Python-BootCamp
2ed0ef95af35d35c0602031670fecfc92d8cea0a
[ "MIT" ]
null
null
null
Shivani/sphere.py
63Shivani/Python-BootCamp
2ed0ef95af35d35c0602031670fecfc92d8cea0a
[ "MIT" ]
null
null
null
Shivani/sphere.py
63Shivani/Python-BootCamp
2ed0ef95af35d35c0602031670fecfc92d8cea0a
[ "MIT" ]
null
null
null
r=int(input("enter radius\n")) volume=(4*3.14*r*r*r)/3 print("volume of sphere",volume)
22
32
0.681818
253fa1c3aec54e5d4e6ab7847d65fd434a00b028
47
py
Python
server/apps/movie/__init__.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/movie/__init__.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/movie/__init__.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
default_app_config = 'movie.apps.MovieConfig'
15.666667
45
0.808511
c25eb82f9d0ab679fa5bcd959b7785f00260a7d5
1,138
py
Python
setup.py
drcraig/concorde
418b04d5bd93f541d3a0371b923700b767a03d29
[ "MIT" ]
2
2018-05-24T08:27:23.000Z
2019-01-06T18:55:15.000Z
setup.py
drcraig/concorde
418b04d5bd93f541d3a0371b923700b767a03d29
[ "MIT" ]
1
2017-05-20T10:05:49.000Z
2017-08-09T05:57:45.000Z
setup.py
drcraig/concorde
418b04d5bd93f541d3a0371b923700b767a03d29
[ "MIT" ]
null
null
null
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup(name='concorde', version='0.1.2', description='Static site generator using Markdown and Jinja', long_description=readme(), classifiers=[ 'Development Status :: 3 - Alpha', ...
29.947368
69
0.582601
c271857c29b16a46721580bfd99b0e0f6861c023
89
py
Python
python/pathlib/origin/cwd_home.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pathlib/origin/cwd_home.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pathlib/origin/cwd_home.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
from pathlib import Path print(f'현재 디렉터리: {Path.cwd()}') print(f'홈 디렉터리: {Path.home()}')
22.25
31
0.662921
6c0a5c2c7aa9c90476cc7cb8131bfeb5cfd477c6
908
py
Python
Packs/SafeBreach/Scripts/ListGroupBy/ListGroupBy_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/SafeBreach/Scripts/ListGroupBy/ListGroupBy_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/SafeBreach/Scripts/ListGroupBy/ListGroupBy_test.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from ListGroupBy import main as ListGroupBy LIST_JOIN_INDICATORS = [{'insightIds': ['1', '2', '3'], 'value': 'value123', 'id': 1, 'name': 'someInsight 1'}, {'insightIds': ['1', '2', '3'], 'value': 'value123', 'id': 3, 'name': 'someInsight 3'}, ...
41.272727
111
0.555066
6c36d0245c2843a75e495fafc9ca73d0e897eaec
192
py
Python
api/main.py
singhprincejeet/in_poster
1b0e18631ebede94e679eb0aba6c8e7630a02aba
[ "MIT" ]
null
null
null
api/main.py
singhprincejeet/in_poster
1b0e18631ebede94e679eb0aba6c8e7630a02aba
[ "MIT" ]
4
2021-04-30T21:09:19.000Z
2022-03-12T00:19:12.000Z
api/main.py
singhprincejeet/in_poster
1b0e18631ebede94e679eb0aba6c8e7630a02aba
[ "MIT" ]
null
null
null
from flask import send_file from main_controller import MainController def generate(request): image_src = MainController().generate_image(request) return send_file(image_src)
24
57
0.776042
dd93facdbcab5a65e88d4968a7548bdad069e131
2,633
py
Python
MANGA.py
mcwimm/pyMANGA
6c7b53087e53b116bb02f91c33974f3dfd9a46de
[ "MIT" ]
1
2021-03-16T08:35:50.000Z
2021-03-16T08:35:50.000Z
MANGA.py
mcwimm/pyMANGA
6c7b53087e53b116bb02f91c33974f3dfd9a46de
[ "MIT" ]
67
2019-11-14T11:29:52.000Z
2022-03-09T14:37:11.000Z
MANGA.py
mcwimm/pyMANGA
6c7b53087e53b116bb02f91c33974f3dfd9a46de
[ "MIT" ]
6
2019-11-12T11:11:41.000Z
2021-08-12T13:57:22.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import getopt import sys from os import path from ProjectLib import XMLtoProject from TimeLoopLib import TreeDynamicTimeStepping import logging class Model(): ## Class to run the model from other programs # @param project_file: path to pymanga project file. ...
35.581081
78
0.638815
b02bb53460da55a36f3ab3b4ef1d1f37eb0f8873
5,778
py
Python
python/oneflow/test/tensor/test_tensor_indexing.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
1
2021-09-13T02:34:53.000Z
2021-09-13T02:34:53.000Z
python/oneflow/test/tensor/test_tensor_indexing.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/tensor/test_tensor_indexing.py
wangyuyue/oneflow
0a71c22fe8355392acc8dc0e301589faee4c4832
[ "Apache-2.0" ]
1
2021-01-17T03:34:39.000Z
2021-01-17T03:34:39.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...
35.231707
88
0.59017
c6ce151631adc6bb79f7d0ae84410236dc9cde33
2,037
py
Python
components/py_engine/engine/genhdr/gen_qstr.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
components/py_engine/engine/genhdr/gen_qstr.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
components/py_engine/engine/genhdr/gen_qstr.py
wstong999/AliOS-Things
6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import re import sys import platform if platform.python_version_tuple()[0] == '2': bytes_cons = lambda val, enc=None: bytearray(val) from htmlentitydefs import codepoint2name elif platform.python_version_tuple()[0] == '3': bytes_cons = bytes from html.entities imp...
34.525424
94
0.638193
af2220a132a1ae064f591aac3ff33e0bfc3ff1ba
294
py
Python
src/onegov/ticket/errors.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ticket/errors.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/ticket/errors.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
class DuplicateHandlerError(Exception): """ Raised when a handler with a duplicate id or shortcode exists. """ class InvalidStateChange(Exception): """ Raised when an invalid state change is executed (e.g. closing an open ticket without the intermediary 'pending' step). """
29.4
77
0.721088
af3195e454c8a266afcc7fc4845e1f6e91fd0323
623
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/52. given a list of words in the singular form, return a set of those words in the plural form.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_3_List/52. given a list of words in the singular form, return a set of those words in the plural form.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_3_List/52. given a list of words in the singular form, return a set of those words in the plural form.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Given a list of words in the singular form, return a set of those words in the plural form if they appear more than once in the list. Example: input_list = ["table", "chair", "chair", "chair","desk","desk"] Expected output = ['table', 'desks', 'chairs'] """ def pluralize(input_list): lst = [] new = [...
19.46875
89
0.516854
af75a2126d92f4c43314a5247af5f633b050d39a
2,086
py
Python
compaction/compact.py
bksureshkumar/spark
2b6e60195c79b76a8c060b98f7f91d0a52db89c1
[ "Apache-2.0" ]
null
null
null
compaction/compact.py
bksureshkumar/spark
2b6e60195c79b76a8c060b98f7f91d0a52db89c1
[ "Apache-2.0" ]
null
null
null
compaction/compact.py
bksureshkumar/spark
2b6e60195c79b76a8c060b98f7f91d0a52db89c1
[ "Apache-2.0" ]
null
null
null
from pyspark.sql import SparkSession import pyspark.sql.functions as func from pyspark.sql.functions import udf from pyspark.sql.types import StringType input_path = '/Users/sbalakrishnan/sothanai/python/compaction/sample_20.json' # used for: compact by the date format def convert_receive_time(receive_time): dat...
39.358491
133
0.806328
afcae9bad6e5989979ef5a7d913dbe80f66e4ea3
375
py
Python
DarkRise/sh_code.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
DarkRise/sh_code.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
DarkRise/sh_code.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
#!/usr/bin/python2 import sys if __name__ == "__main__": if len(sys.argv) < 2: print("usage : %s <file>\n" % (sys.argv[0],)) sys.exit(0) shellcode = "\"" ctr = 1 maxlenght = 15 for b in open(sys.argv[1], "rb").read(): shellcode += "\\x" + b.encode("hex") if ctr == maxlenght: shellcode += "\"\n\"" ...
17.857143
47
0.554667
bbd4c6435578a4af21d7a240e482c5129ab836e1
392
py
Python
backend/apps/iamstudent/forms_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
2
2020-03-28T13:56:39.000Z
2020-03-29T10:16:12.000Z
backend/apps/iamstudent/forms_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
76
2020-03-27T21:53:04.000Z
2020-03-30T20:27:43.000Z
backend/apps/iamstudent/forms_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
null
null
null
from django import forms from django.utils.translation import gettext_lazy as _ from .forms import form_labels from .models_persistent_filter import StudentListFilterModel class StudentListFilterModelForm(forms.ModelForm): class Meta: model = StudentListFilterModel labels = form_labels la...
28
60
0.752551
a587cecef37725081919c639699085a57be7d33c
4,179
py
Python
instruments/Tektronix/channel_marker_skew/sync_bench.py
thepoole/Reports
65b2f2911475b66e699cb9cf398c4b1e672cb46d
[ "MIT" ]
1
2021-04-19T11:39:09.000Z
2021-04-19T11:39:09.000Z
instruments/Tektronix/channel_marker_skew/sync_bench.py
thepoole/Reports
65b2f2911475b66e699cb9cf398c4b1e672cb46d
[ "MIT" ]
4
2018-07-30T15:09:35.000Z
2021-11-16T08:11:58.000Z
instruments/Tektronix/channel_marker_skew/sync_bench.py
thepoole/Reports
65b2f2911475b66e699cb9cf398c4b1e672cb46d
[ "MIT" ]
2
2018-10-17T11:47:29.000Z
2021-11-15T18:15:46.000Z
import sys import os import pickle import glob from statistics import mean import matplotlib.pyplot as plt from qcodes.instrument_drivers.Keysight.Infiniium import Infiniium DATA_FOLDER = 'sync_bench_results' def get_channel_results(scope: Infiniium): scope.trigger_enabled(True) scope.trigger_edge_source(...
26.617834
75
0.620962
3c4deb29f26ff6053b91758b7b032a34b96e6618
1,996
py
Python
Interview Preparation Kits/Interview Preparation Kit/Graphs/Find the Nearest Clone/find_nearest_clone.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Interview Preparation Kits/Interview Preparation Kit/Graphs/Find the Nearest Clone/find_nearest_clone.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Interview Preparation Kits/Interview Preparation Kit/Graphs/Find the Nearest Clone/find_nearest_clone.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # Complete the findShortest function below. from collections import defaultdict # # For the weighted graph, <name>: # # 1. The number of nodes is <name>_nodes. # 2. The number of edges is <name>_edges. # 3. An edge exists between <name>_from[i] t...
24.95
124
0.594689
5910a766f6c5deaf140405dd960344ff5c50d6a2
4,106
py
Python
module/femagfunction.py
AI-Assistant/FEMAG-Python
ff86e8f41485ae9df6034e6b8e810b59f8094c70
[ "MIT" ]
null
null
null
module/femagfunction.py
AI-Assistant/FEMAG-Python
ff86e8f41485ae9df6034e6b8e810b59f8094c70
[ "MIT" ]
null
null
null
module/femagfunction.py
AI-Assistant/FEMAG-Python
ff86e8f41485ae9df6034e6b8e810b59f8094c70
[ "MIT" ]
null
null
null
'femagfunction.py' 'FEMAG-DC wird hier über Python angesteuert' # FEMAG Funktion benötigt folgende Inputvariablen import os, sys import shutil import time import subprocess import time import numpy as np class Femag: def __init__(self,var,Lock): self.var = var[0] self.itter_num =...
35.094017
140
0.57623
a711d132be08ca48f4a4b2cfad7f2ef8fa52aa14
544
py
Python
python/generator_tricks_for_systemprogrammer/genreceive.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/generator_tricks_for_systemprogrammer/genreceive.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/generator_tricks_for_systemprogrammer/genreceive.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# genreceive.py # # A generator that yields connections to a TCP socket import socket def receive_connections(addr): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind(addr) s.listen(5) while True: client = s.a...
21.76
60
0.617647
59865bca2ecf8b0e52da10ef3915ab215678cb72
2,788
py
Python
src/settings/settings.py
RobetSlovev39/AutoGraph
c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95
[ "MIT" ]
null
null
null
src/settings/settings.py
RobetSlovev39/AutoGraph
c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95
[ "MIT" ]
null
null
null
src/settings/settings.py
RobetSlovev39/AutoGraph
c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95
[ "MIT" ]
null
null
null
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = True ALLOWED_HOSTS = ['*'] INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contr...
25.814815
91
0.695481
ab7d86d6599a9e9e34ccab9b57a48e4c8cd6d77b
1,538
py
Python
backend/app/core/security.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-11-04T17:06:07.000Z
2021-11-04T17:06:07.000Z
backend/app/core/security.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
backend/app/core/security.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
from datetime import datetime, timedelta from typing import Any, Union from jose import jwt from passlib.context import CryptContext from app.core.config import settings pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") ALGORITHM = "HS256" def create_access_token( subject: Union[...
28.481481
82
0.682055
557a66f92b0de5fb5cbd5f08b2a7eab9086848ba
15,272
py
Python
energielenker/energielenker/timesheet_manager.py
libracore/energielenker
97169f2f7b21f636ab473c7561cc8e147c4b12ab
[ "MIT" ]
null
null
null
energielenker/energielenker/timesheet_manager.py
libracore/energielenker
97169f2f7b21f636ab473c7561cc8e147c4b12ab
[ "MIT" ]
null
null
null
energielenker/energielenker/timesheet_manager.py
libracore/energielenker
97169f2f7b21f636ab473c7561cc8e147c4b12ab
[ "MIT" ]
1
2021-08-14T22:22:57.000Z
2021-08-14T22:22:57.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021, libracore AG and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils.data import today, now, get_datetime, add_to_date, nowdate, time_diff_in_hours import json @frappe....
36.978208
264
0.513947
f97d6d7ceb14463943a85a086fb06e44099d50a3
4,926
py
Python
dqn/train.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
dqn/train.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
dqn/train.py
laituan245/Reinforcement-Learning-Dojo
3187621c9188d72fe593ef69ecad6d1288889a51
[ "MIT" ]
null
null
null
import gym import torch import argparse import random import numpy as np from PIL import Image from os.path import join from model import Model from utils import create_dir_if_not_exists, preprocess from collections import deque def create_parser(): # Creates a parser for command-line arguments. parser = argp...
42.465517
102
0.638652
34bbc411313a66f3518442fc10d59f7da7a63199
2,475
py
Python
model/unet.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
model/unet.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
model/unet.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
2
2021-02-03T04:34:26.000Z
2021-02-03T06:32:48.000Z
import torch import torch.nn as nn import warnings warnings.filterwarnings("ignore", category=UserWarning) def double_conv(in_channels, out_channels): return nn.Sequential( nn.Conv2d(in_channels, out_channels, 3, padding=1), nn.InstanceNorm2d(out_channels), nn.LeakyReLU(inplace=True), ...
26.902174
88
0.579798
34e1eb823f92a3ad7d30e08f7816495924b0b19c
161
py
Python
data_tests/saved__backend__py3.9/pythran/add_inline.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
data_tests/saved__backend__/pythran/add_inline.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
data_tests/saved__backend__py3.9/python/add_inline.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
def add(a, b): return a + b def use_add(n=10000): tmp = 0 for _ in range(n): tmp = add(tmp, 1) return tmp __transonic__ = ("0.3.2",)
12.384615
26
0.515528
55194ff29b6589fd7b52d68ef9d5cf30abc7af24
1,819
py
Python
tests/miningPatternsTests.py
ameliecordier/IIK
57b40d6b851a1c2369604049d1820e5b572c6227
[ "MIT" ]
null
null
null
tests/miningPatternsTests.py
ameliecordier/IIK
57b40d6b851a1c2369604049d1820e5b572c6227
[ "MIT" ]
null
null
null
tests/miningPatternsTests.py
ameliecordier/IIK
57b40d6b851a1c2369604049d1820e5b572c6227
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- import random from nose.tools import assert_equals from datahandler import miningPatterns class TestMiningPatterns: patterns = [] nbTests = 15 @classmethod def setup_class(cls): print("") print("Test de la classe MiningPatterns") print("Lecture des ré...
27.149254
83
0.614623
fd36634548f961b59bd08aeb72b64f7ef29c0fa7
4,302
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/net/net2kml.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
4
2020-11-13T02:35:56.000Z
2021-03-29T20:15:54.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/net/net2kml.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
9
2020-12-09T02:12:39.000Z
2021-02-18T00:15:28.000Z
Co-Simulation/Sumo/sumo-1.7.0/tools/net/net2kml.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
#!/usr/bin/env python # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2007-2020 German Aerospace Center (DLR) and others. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License 2.0 which is available at # https://www.ec...
44.350515
114
0.621106
1f0b5c6303ad4867471a9089fe1449b81c559a26
9,586
py
Python
svm.py
TakuKitamura/SVM
d5c9d95d767c8f5a6c522264cd3dd4e768c85bf9
[ "MIT" ]
null
null
null
svm.py
TakuKitamura/SVM
d5c9d95d767c8f5a6c522264cd3dd4e768c85bf9
[ "MIT" ]
null
null
null
svm.py
TakuKitamura/SVM
d5c9d95d767c8f5a6c522264cd3dd4e768c85bf9
[ "MIT" ]
null
null
null
import os import math import numpy as np import tensorflow as tf from sklearn import preprocessing as pr from matplotlib import pyplot as plt from imblearn.over_sampling import SMOTE # from flask import Flask, jsonify, abort, make_response, request # import datetime def return_kernel_estimator(data): optimizer ...
30.626198
154
0.677133
238d38786d23df422de96e25bead6ac91ad77d14
556
py
Python
workshop_petstagram/workshop_petstagram/main/admin.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
1
2022-03-03T10:16:14.000Z
2022-03-03T10:16:14.000Z
workshop_petstagram/workshop_petstagram/main/admin.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
workshop_petstagram/workshop_petstagram/main/admin.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
from django.contrib import admin from workshop_petstagram.main.models import Profile, Pet, PetPhoto class PetInlineAdmin(admin.StackedInline): model = Pet @admin.register(Profile) class ProfileAdmin(admin.ModelAdmin): inlines = (PetInlineAdmin,) list_display = ('id', 'first_name', 'last_name', 'date_of...
23.166667
88
0.735612