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
46e95a4fab42ebc395965efaf8279f40ea157d0b
321
py
Python
CheckMate/log.py
eaydin/checkmate
6a9cad7599c8c3e2087cb83b544368fdf69f6147
[ "MIT" ]
null
null
null
CheckMate/log.py
eaydin/checkmate
6a9cad7599c8c3e2087cb83b544368fdf69f6147
[ "MIT" ]
null
null
null
CheckMate/log.py
eaydin/checkmate
6a9cad7599c8c3e2087cb83b544368fdf69f6147
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger() logger.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') # Print to stdout ch = logging.StreamHandler() # ch.setLevel(logging.INFO) ch.setLevel(logging.DEBUG) ch.setFormatter(formatter) logger.addHandler(ch) ...
16.05
85
0.735202
375c076aafa4dff0e3bf0b9547a83cbeac3c320e
389
py
Python
talks/2021-01-19_auto_docs/black_example.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
null
null
null
talks/2021-01-19_auto_docs/black_example.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-02-11T23:44:52.000Z
2021-02-11T23:44:52.000Z
talks/2021-01-19_auto_docs/black_example.py
stanton119/data-analysis
b6fda815c6cc1798ba13a5d2680369b7e5dfcdf9
[ "Apache-2.0" ]
1
2021-12-16T01:02:23.000Z
2021-12-16T01:02:23.000Z
import pandas as pd def process(x : pd.DataFrame ) -> pd.DataFrame: y = pd.concat([x, x]) return y def process2(x : pd.DataFrame, y : int , z: bool = False) -> pd.DataFrame : print('line_1') x_grouped = x.groupby(["col1"]). loc[["col2", "col3"]].apply({'agg1':'mean','agg2':'median'}) ...
16.913043
98
0.55527
379d1ac0363734661c9e74ec972f171aea591495
342
py
Python
telegrambot/src/corona_assistent_bot/web/api.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
1
2020-03-20T22:05:14.000Z
2020-03-20T22:05:14.000Z
telegrambot/src/corona_assistent_bot/web/api.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
6
2020-03-21T12:22:36.000Z
2022-02-27T01:33:33.000Z
telegrambot/src/corona_assistent_bot/web/api.py
LittleKita/CoronaAssistent
1e0862d94bdc509aa468921ee7b056ec59e6f472
[ "MIT" ]
null
null
null
from http import HTTPStatus from flask import Blueprint, request from ..model import ReceivedMessage from . import db bp = Blueprint('api', __name__) @bp.route('/message', methods=['POST']) def receive_message(): db.session.add(ReceivedMessage(text=request.json['text'])) db.session.commit() return '', ...
21.375
62
0.72807
2096175db5649ef55725a09e610ae9847c465a36
2,071
py
Python
MLP.py
tmdt-buw/Vorhersage-Projektilbewegung
181b6bc22deedfcdc7dba66358de61ef95d986b4
[ "BSD-3-Clause" ]
null
null
null
MLP.py
tmdt-buw/Vorhersage-Projektilbewegung
181b6bc22deedfcdc7dba66358de61ef95d986b4
[ "BSD-3-Clause" ]
null
null
null
MLP.py
tmdt-buw/Vorhersage-Projektilbewegung
181b6bc22deedfcdc7dba66358de61ef95d986b4
[ "BSD-3-Clause" ]
null
null
null
import joblib import numpy as np from sklearn.neural_network import MLPRegressor if __name__ == "__main__": flag_train = False X = np.load("input.npy") Y = np.load("target.npy") # normalize data norm_params = np.zeros((6, 2)) for i_feature in range(X.shape[1]): feature_mean = np.mea...
30.455882
68
0.507484
2fd7f3ad140d54a69205a63818deaff5c7dadcc9
260
py
Python
website/apps/projects/urls.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
1
2017-03-14T08:08:31.000Z
2017-03-14T08:08:31.000Z
website/apps/projects/urls.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
null
null
null
website/apps/projects/urls.py
stahlnow/stahlnow
265dd46c54f68173071d1c86218201d6e618ceeb
[ "MIT" ]
null
null
null
from django.conf.urls import url from projects.views import ProjectListView, ProjectDetailView urlpatterns = [ url(r'^$', ProjectListView.as_view(), name='projects'), url(r'^(?P<slug>[-_\w]+)/$', ProjectDetailView.as_view(), name='project_detail'), ]
32.5
85
0.707692
ffb3e76edb94e369a94f449ab882e77f3be03756
729
py
Python
BITs/2014/KOSTAREV_A_I/task_4_13.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/KOSTAREV_A_I/task_4_13.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
BITs/2014/KOSTAREV_A_I/task_4_13.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Задача №4 , Вариант 13 #Напишите программу, которая выводит имя, под которым скрывается Жан Батист Поклен. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). #Костарев А. И. #14....
42.882353
271
0.743484
44881d96418ab53306493f1b1c5c0167d1a072dc
1,775
py
Python
rdlcompiler/systemrdl/test/parse.py
MegabytePhreak/rdl
b97912751738da9fddb42a9155f5823716809fc0
[ "MIT" ]
4
2016-05-10T20:40:34.000Z
2020-04-09T13:23:33.000Z
rdlcompiler/systemrdl/test/parse.py
MegabytePhreak/rdl
b97912751738da9fddb42a9155f5823716809fc0
[ "MIT" ]
null
null
null
rdlcompiler/systemrdl/test/parse.py
MegabytePhreak/rdl
b97912751738da9fddb42a9155f5823716809fc0
[ "MIT" ]
null
null
null
__author__ = 'megabytephreak' import rdlcompiler.systemrdl.grammar as grammar from codetalker import testing import os def readall(path): path = os.path.join(os.path.dirname(__file__), path) with open(path, 'rb') as f: return f.read() parse_rule = testing.parse_rule(__name__,grammar.grammar) parse...
29.583333
134
0.564507
9227b116f796fcab6a484791e89f9a1afcac9bc6
751
py
Python
src/unittest/python/erweitert/test_zusatz.py
dlangheiter-tgm/test-mirror
9878da44953c40abc1df0311f275c3eebc2e876b
[ "MIT" ]
null
null
null
src/unittest/python/erweitert/test_zusatz.py
dlangheiter-tgm/test-mirror
9878da44953c40abc1df0311f275c3eebc2e876b
[ "MIT" ]
null
null
null
src/unittest/python/erweitert/test_zusatz.py
dlangheiter-tgm/test-mirror
9878da44953c40abc1df0311f275c3eebc2e876b
[ "MIT" ]
null
null
null
""" Created on 27.12.2013 @author: Walter Rafeiner-Magor <wrafeiner-magor@tgm.ac.at> """ import unittest from bruch.Bruch import * class TestAllgemein(unittest.TestCase): def setUp(self): self.b = Bruch(3, 2) self.b2 = Bruch(self.b) self.b3 = Bruch(4, 2) pass def tearDown(sel...
20.861111
59
0.581891
2b8f84ac545f1f82d5cf062d18506a6169888fb1
407
py
Python
python/en/archive/dropbox/udacity-ds_and_algos/udacity-ds_and_algos-lesson2-python_refresher-classes-examples.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/udacity-ds_and_algos/udacity-ds_and_algos-lesson2-python_refresher-classes-examples.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/udacity-ds_and_algos/udacity-ds_and_algos-lesson2-python_refresher-classes-examples.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
# udacity-ds_and_algos-lesson2-python_refresher-classes-examples.py class Person: def __init__(self, name, age): self.person_name = name self.person_age = age def birthday(self): self.person_age += 1 def getName(self): return self.person_name ...
22.611111
68
0.616708
a6e6ba2c2dfc1140d7b285ae0526c49ae9455340
322
py
Python
exercises/zh/test_01_03_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
2
2020-07-07T01:46:37.000Z
2021-04-20T03:19:43.000Z
exercises/zh/test_01_03_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/zh/test_01_03_02.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
def test(): assert ( doc.text == "我喜欢老虎和狮子。" ), "你确定你正确处理文本了吗?" assert ( laohu == doc[2:3] ), "你确定你选择了老虎的正确跨度吗?" assert ( laohu_he_shizi == doc[2:5] ), "你确定你选择了老虎和狮子的正确跨度吗?" assert 'spacy.blank("zh")' in __solution__, '你将spacy.blank设置为正确的语言了吗?' __msg__.good("好样的!"...
24.769231
74
0.565217
5b52aec2392f00ae362eb9cfcccc1a5e466472cb
4,203
py
Python
Licence 1/I21/TP2/matplot.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
8
2020-11-26T20:45:12.000Z
2021-11-29T15:46:22.000Z
Licence 1/I21/TP2/matplot.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
null
null
null
Licence 1/I21/TP2/matplot.py
axelcoezard/licence
1ed409c4572dea080169171beb7e8571159ba071
[ "MIT" ]
6
2020-10-23T15:29:24.000Z
2021-05-05T19:10:45.000Z
import matplotlib.pyplot as plt import math as math from time import time from random import randrange, randint def intervalle(a, b, inc): values = [] values += [a] while values[len(values)-1] + inc <= b: last = values[len(values)-1] values += [last + inc] return values """ PREMIÈ...
17.155102
70
0.569117
343bce59b7b1ccd86c8fc999b73b86c22fbed8bc
1,016
py
Python
backend/app/crud/crud_task_hint.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2022-02-20T12:45:04.000Z
2022-02-20T12:45:04.000Z
backend/app/crud/crud_task_hint.py
JamesNeumann/learning-by-annotations
c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad
[ "MIT" ]
21
2021-11-01T10:13:56.000Z
2021-12-02T10:02:13.000Z
backend/app/crud/crud_task_hint.py
jinnn-dev/patholearn
b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15
[ "MIT" ]
1
2021-12-16T18:20:55.000Z
2021-12-16T18:20:55.000Z
from typing import List from sqlalchemy import asc from sqlalchemy.orm import Session from app.crud.base import CRUDBase from app.models.task_hint import TaskHint from app.schemas.task_hint import TaskHintCreate, TaskHintUpdate class CRUDTaskHint(CRUDBase[TaskHint, TaskHintCreate, TaskHintUpdate]): p...
27.459459
76
0.63189
1b3ade220bd14241965565c24f60d9332f240f48
957
py
Python
weibo/testMySQL/test_iud.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
weibo/testMySQL/test_iud.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
weibo/testMySQL/test_iud.py
haiboz/weiboSpider
517cae2ef3e7bccd9e1d328a40965406707f5362
[ "Apache-2.0" ]
null
null
null
#coding:utf8 ''' Created on 2016年4月20日 @author: wb-zhaohaibo ''' import MySQLdb print MySQLdb conn = MySQLdb.Connect( host="127.0.0.1", port=3306, user="root", passwd="admin", db="testsql...
21.266667
69
0.546499
1b610041b8b000eac8cce26634c5eb0bb651765f
1,067
py
Python
Reverse a tree.py
aertoria/MiscCode
a2e94d0fe0890e6620972f84adcb7976ca9f1408
[ "Apache-2.0" ]
null
null
null
Reverse a tree.py
aertoria/MiscCode
a2e94d0fe0890e6620972f84adcb7976ca9f1408
[ "Apache-2.0" ]
null
null
null
Reverse a tree.py
aertoria/MiscCode
a2e94d0fe0890e6620972f84adcb7976ca9f1408
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # @param {TreeNode} root # @return {TreeNode} def invertTree(self, root): self.DFS(root) if root <>None: self...
14.226667
36
0.663543
84c0c111a8ff8d25b780c3f6c574d3158f0e4800
1,763
py
Python
src/Pepper/Pepper.py
Cibah/Pepper_RL
a105aead34c74ac8c49fa058ee1613f578bcde41
[ "MIT" ]
null
null
null
src/Pepper/Pepper.py
Cibah/Pepper_RL
a105aead34c74ac8c49fa058ee1613f578bcde41
[ "MIT" ]
null
null
null
src/Pepper/Pepper.py
Cibah/Pepper_RL
a105aead34c74ac8c49fa058ee1613f578bcde41
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Choregraphe bezier export in Python. import qi import sys from src.Settings import * session = qi.Session() def init(ip, port): session.connect("tcp://" + ip + ":" + port) service = session.service("ALMotion") life_service = session.service("ALAutonomousLife") life_service.s...
27.123077
102
0.611458
84c3d4ead06d6e750ea4287e60a2c9261a8d9020
4,619
py
Python
research/cv/dem/src/demnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/dem/src/demnet.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/dem/src/demnet.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...
35.530769
108
0.645161
8e49e2ebeb7888bef274a808c1c2919c494b415b
431
pyde
Python
sketches/paletten3/paletten3.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/paletten3/paletten3.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/paletten3/paletten3.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
""" Männerpaletten """ w = 64 h = 16 def setup(): size(480, 530) noLoop() def draw(): background("#2b3e50") fill(255, 0, 0) rect(10, 10, w, h) fill(255) text("Schraubendrehergriffrot", w + 20, 22) fill(250, 128, 114) rect(10, 10 + h, w, h) fill(255) text("Pflaster...
15.962963
47
0.5058
1e402dd69045f47d4f52755677ab05e1aba0e3f1
2,786
py
Python
packages/watchmen-model/src/watchmen_model/dqc/dqc_topics.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/dqc/dqc_topics.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-model/src/watchmen_model/dqc/dqc_topics.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from datetime import date from typing import List, Optional from watchmen_model.admin import Factor, FactorIndexGroup, FactorType, Topic, TopicKind, TopicType from watchmen_model.common import DataModel, FactorId, TopicId from .monitor_rule import MonitorRuleCode, MonitorRuleSeverity class MonitorRuleDetected(DataMo...
39.8
107
0.727566
1e52ee076ba8abc6aa3f7b4454e29849a0be2f8a
347
py
Python
Online-Judges/DimikOJ/Python/25-lcm.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/DimikOJ/Python/25-lcm.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/DimikOJ/Python/25-lcm.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
t = int(input()) for i in range(t): a, b = input().split() a, b = int(a), int(b) mul = a * b if b > a: a, b = b, a while a != b: if b == 0: break if a > b: a = a - b else: b = b - a gcd = a lcm = mul / gcd lcm = int(l...
16.52381
26
0.342939
1e7e13c6a8d56df26d93db2c77988b4a010ccec1
188
py
Python
Online-Judges/CodingBat/Python/Logic-02/Logic_2-01-make_bricks.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/Logic-02/Logic_2-01-make_bricks.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/Logic-02/Logic_2-01-make_bricks.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def make_bricks(small, big, goal): bricks = goal // 5 if bricks > big: bricks = big goal = goal - (bricks*5) if goal <= small: return True return False
20.888889
34
0.553191
44e9a575b3cfd7e3ad849ca41cf481ca58c5a77e
92
py
Python
2014/06/mooc-students/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2014/06/mooc-enrollment/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2014/06/mooc-enrollment/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 = '1VOuxAMUp_8I0jCQb1Q0CN7NCoBj2LRq2Kn5_5Xs5UfY'
23
68
0.847826
78621a8e86299831efb7f131bdc74604edf548df
1,297
py
Python
source/pkgsrc/graphics/py-pycha/patches/patch-chavier_gui.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
1
2021-11-20T22:46:39.000Z
2021-11-20T22:46:39.000Z
source/pkgsrc/graphics/py-pycha/patches/patch-chavier_gui.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
source/pkgsrc/graphics/py-pycha/patches/patch-chavier_gui.py
Scottx86-64/dotfiles-1
51004b1e2b032664cce6b553d2052757c286087d
[ "Unlicense" ]
null
null
null
$NetBSD: patch-chavier_gui.py,v 1.1 2020/03/11 20:17:12 wiz Exp $ Convert to python3 syntax. --- chavier/gui.py.orig 2011-08-08 19:23:18.000000000 +0000 +++ chavier/gui.py @@ -523,18 +523,18 @@ class GUI(object): alloc = self.drawing_area.get_allocation() - print 'CHART STATE' - print '-' *...
34.131579
65
0.573631
15b94a827b70457cbc2b870d0e90cfff8b93ec76
663
py
Python
Curso-Em-Video-Python/2Exercicios/070_estatisticas_em_um_produto.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/070_estatisticas_em_um_produto.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/070_estatisticas_em_um_produto.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
produto = barato = n = 'e' preco = total = maior = 0 menor = 9999 titulo = 'SUPERMERCADOS BH' print('-' * 45) print(titulo.center(45)) print('-' * 45) while True: produto = str(input('Nome do produto: ')) preco = float(input('Preco do produto: R$ ')) total += preco if preco > 1000: maior += 1 ...
27.625
121
0.591252
1744b463cc0e2d6bd25310c89fb0c44ee829689a
2,832
py
Python
magenta_docker/task_test.py
googleinterns/step258-2020
49e7af1a381e076ee884f55857a7af2f72add74d
[ "Apache-2.0" ]
2
2020-08-28T15:17:40.000Z
2022-01-21T14:03:21.000Z
magenta_docker/task_test.py
googleinterns/step258-2020
49e7af1a381e076ee884f55857a7af2f72add74d
[ "Apache-2.0" ]
1
2021-01-27T18:22:46.000Z
2021-01-27T20:58:55.000Z
magenta_docker/task_test.py
googleinterns/step258-2020
49e7af1a381e076ee884f55857a7af2f72add74d
[ "Apache-2.0" ]
4
2020-07-28T12:13:11.000Z
2021-01-27T16:29:29.000Z
"""Tests for task.py.""" import os from unittest import mock import task import tensorflow.compat.v2 as tf class GetWorkerBehaviorInfoTest(tf.test.TestCase): def test_no_tf_config(self): """Tests behavior when there is no TF_CONFIG set.""" cluster_config, save_dir = task.get_worker_behavior_info('some/dir...
39.333333
80
0.622175
bd70214191dc3b401728019a2ff8c040050e19db
1,207
py
Python
3kCTF/2021/crypto/crypto_warmup/challenge.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
3kCTF/2021/crypto/crypto_warmup/challenge.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
3kCTF/2021/crypto/crypto_warmup/challenge.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
import random import math n = 24 def make_stuff(): A = []; b = [1, 10] for i in range(n): A.append(random.randint(*b)) b[False] = sum(A) + 1 b[True] = int(b[False] << 1) c = random.randint(sum(A), sum(A) << 1) while True: d = random.randint(sum(A), sum(A) <...
25.145833
289
0.608119
e5dbdc572c802e2755aab531a68bc9754fcac340
1,167
py
Python
loesung/blatt1b_4c.py
dotKuro/vorsemesterWISE19-20
436c6d1846b6c1bfb087652e8ca179bd1b12c28e
[ "CC0-1.0" ]
1
2019-09-27T13:47:20.000Z
2019-09-27T13:47:20.000Z
loesung/blatt1b_4c.py
dotKuro/vorsemesterWISE19-20
436c6d1846b6c1bfb087652e8ca179bd1b12c28e
[ "CC0-1.0" ]
null
null
null
loesung/blatt1b_4c.py
dotKuro/vorsemesterWISE19-20
436c6d1846b6c1bfb087652e8ca179bd1b12c28e
[ "CC0-1.0" ]
null
null
null
# Hier soll der User belibig viele Zahlen eingeben können und dann soll der # Mittelwert ermittelt werden. correct_input = False while not correct_input: # Hier soll der User seine Zahlen Komma seperiert eingeben. # Die split Funktion wird den String automatisch an den Kommas teilen # und diese in eine Li...
40.241379
80
0.742074
dad171365e9cbbb84888e976babf4f0f2e4b6152
1,794
py
Python
plugins/tff_backend/plugin_consts.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
null
null
null
plugins/tff_backend/plugin_consts.py
threefoldfoundation/app_backend
b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a
[ "Apache-2.0" ]
178
2017-08-02T12:58:06.000Z
2017-12-20T15:01:12.000Z
plugins/tff_backend/plugin_consts.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...
33.849057
74
0.804348
c11ae03d87db3fae39d48b90d02f9d1638be204f
173
py
Python
data-structures/week3_hash_tables/6_matching_with_mismatches/matching_with_mismatches.py
yiping-wang/data-structures-and-algorithms-coursera
fc0ba34399c27b358ce52a323a52ab2eb095f156
[ "MIT" ]
101
2021-12-20T11:57:11.000Z
2022-03-23T09:49:13.000Z
Data Structures & Algorithms/Algorithm Toolbox/week3_hash_tables/6_matching_with_mismatches/matching_with_mismatches.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
4
2022-01-12T11:55:56.000Z
2022-02-12T04:53:33.000Z
Data Structures & Algorithms/Algorithm Toolbox/week3_hash_tables/6_matching_with_mismatches/matching_with_mismatches.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
# python3 import sys def solve(k, text, pattern): return [] for line in sys.stdin.readlines(): k, t, p = line.split() ans = solve(int(k), t, p) print(len(ans), *ans)
14.416667
34
0.624277
ec2c582421cc20cbedb8fe858a8deeb54fee7a2c
642
py
Python
ArtificialIntelligence/BotBuilding/botclean.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
ArtificialIntelligence/BotBuilding/botclean.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
ArtificialIntelligence/BotBuilding/botclean.py
rho2/HackerRank
4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266
[ "MIT" ]
null
null
null
#!/usr/bin/python # Head ends here def next_move(posr, posc, board): dr, dc = get_next_dirt(board) if(posc != dc): move = (posc < dc) and 'RIGHT' or 'LEFT' elif(posr != dr): move = (posr < dr) and 'DOWN' or 'UP' else: move = 'CLEAN' print(move) def get_next_dirt(bo...
24.692308
60
0.521807
ec33ab17eb68963cc6fcecdfcb676337da10a1bc
15,499
py
Python
bindings/python/ensmallen/datasets/linqs.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
bindings/python/ensmallen/datasets/linqs.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
bindings/python/ensmallen/datasets/linqs.py
LucaCappelletti94/EnsmallenGraph
572532b6d3f4352bf58f9ccca955376acd95fd89
[ "MIT" ]
null
null
null
"""Module providing graphs available from LINQS.""" from ensmallen import Graph # pylint: disable=import-error from .automatic_graph_retrieval import AutomaticallyRetrievedGraph def PubMedDiabetes( directed = False, preprocess = "auto", load_nodes = True, load_node_types = True, load_edge_weights = True, auto...
33.914661
133
0.642816
6be520f636da37a65f4aeaa8f7cbce6cb1fda2ba
3,799
py
Python
_Dist/NeuralNetworks/h_RNN/Cell.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
1,107
2016-09-21T02:18:36.000Z
2022-03-29T02:52:12.000Z
_Dist/NeuralNetworks/h_RNN/Cell.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
18
2016-12-22T10:24:47.000Z
2022-03-11T23:18:43.000Z
_Dist/NeuralNetworks/h_RNN/Cell.py
leoatchina/MachineLearning
071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3
[ "MIT" ]
776
2016-12-21T12:08:08.000Z
2022-03-21T06:12:08.000Z
import os import sys root_path = os.path.abspath("../../../") if root_path not in sys.path: sys.path.append(root_path) import tensorflow as tf from tensorflow.contrib.rnn import LSTMStateTuple from _Dist.NeuralNetworks.NNUtil import DNDF class LSTMCell(tf.contrib.rnn.LSTMCell): def __str__(self): re...
33.034783
91
0.576731
6bef2bc9e616bcd290d504fa4148901305ce33fe
771
py
Python
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/__init__.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
2,177
2017-08-28T15:07:01.000Z
2022-03-30T11:06:01.000Z
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/__init__.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
1,079
2017-08-30T07:25:06.000Z
2022-03-31T17:49:07.000Z
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/__init__.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
489
2017-08-28T16:17:03.000Z
2022-03-31T15:52:18.000Z
# Flatten the imports so that packages above just need: # from CCParameter import {SomeConcreteParameterClass} from cruisecontrolclient.client.CCParameter.BooleanParameter import * # noqa from cruisecontrolclient.client.CCParameter.CommaSeparatedParameter import * # noqa from cruisecontrolclient.client.CCParameter.No...
70.090909
88
0.849546
2e732dda3ef622bef7fa74a1553e88a0534dd8cf
10,035
py
Python
Adjuster.py
Berserker66/ALttPEntranceRandomizer
9c681cc65d7281ccded03484b050e8f80ea65dc6
[ "MIT" ]
null
null
null
Adjuster.py
Berserker66/ALttPEntranceRandomizer
9c681cc65d7281ccded03484b050e8f80ea65dc6
[ "MIT" ]
5
2020-01-18T21:10:46.000Z
2020-01-25T20:58:19.000Z
Adjuster.py
Berserker66/ALttPEntranceRandomizer
9c681cc65d7281ccded03484b050e8f80ea65dc6
[ "MIT" ]
2
2020-01-18T17:36:50.000Z
2020-01-22T16:52:08.000Z
#!/usr/bin/env python3 import argparse import os import logging import textwrap import sys import time from Rom import Sprite, LocalRom, apply_rom_settings from Utils import output_path class AdjusterWorld(object): def __init__(self, sprite_pool): import random self.sprite_pool = {1: sprite_pool}...
49.678218
180
0.648132
2e8be30dc0a6c69888d004a19c55e19a687d75e1
656
py
Python
Chapter2_ExecutePython/IDE/test_example_for_vscode2.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
null
null
null
Chapter2_ExecutePython/IDE/test_example_for_vscode2.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
null
null
null
Chapter2_ExecutePython/IDE/test_example_for_vscode2.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
null
null
null
def f(a): return a**2 # Lists # 0 1 2 3 4 5 noten = [1, 1, 3, 4, 2, 9] noten.append(6) noten.append(1) print(noten) noten.pop() noten.pop() print(noten) noten.insert(0, 12) print(noten) noten.pop(2) print(noten) # List Comprehensions my_list2 = [] for i in range(10): my_list2.append(i) p...
12.377358
56
0.623476
cf3645017c7b455b85a31e038998d58121a7a917
349
py
Python
basics/sleep.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
1
2019-04-07T23:14:29.000Z
2019-04-07T23:14:29.000Z
basics/sleep.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
null
null
null
basics/sleep.py
karinakozarova/Learning-Python
217dfc8ca6931a238445daf0b84e188c02916c52
[ "MIT" ]
null
null
null
def commit_to_github(): print("COMMITED!!! PUSHED to master branch..") def eat(): print("Ate Slatinska pizza...") def sleep(): graduated = False if not graduated: print("Ugh, Kiko Mitov is waiting :( ") else: print("Sleep like a baby") if __name__ == '__main__': commit_to_g...
20.529412
50
0.593123
d8d169e8b5e58f332eaf230b7ca0085d9e703e51
2,179
py
Python
model/test.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
model/test.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
model/test.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
2
2021-02-03T04:34:26.000Z
2021-02-03T06:32:48.000Z
import cv2 import numpy as np from model.inference import gaussian_blur, get_max_preds, taylor from model.unet import get_pose_net import torch def convert_img(img): """ pytorch 的训练方式是通道优先 将 HWC 转为 CWH """ # H W C ---> C H W ----> C W H img = torch.from_numpy(img).float() if len(img.s...
24.483146
86
0.621386
991b426064d653970c28a1e439ed4d60fd7a4a8f
4,862
py
Python
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/monitor_log/monitor_log_data_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/monitor_log/monitor_log_data_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/monitor_log/monitor_log_data_service.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import Optional from watchmen_auth import PrincipalService from watchmen_data_kernel.common import ask_datetime_formats from watchmen_data_kernel.meta import TopicService from watchmen_data_kernel.service import ask_topic_data_service from watchmen_data_kernel.topic_schema import TopicSchema from watchmen_...
43.801802
117
0.814685
999c0d3697b7ffe19b1dfe6330c07d5229d27352
763
py
Python
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/NonNegativeIntegerParameter.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
2,177
2017-08-28T15:07:01.000Z
2022-03-30T11:06:01.000Z
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/NonNegativeIntegerParameter.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
1,079
2017-08-30T07:25:06.000Z
2022-03-31T17:49:07.000Z
kafka/cruise-control/cruise-control-client/cruisecontrolclient/client/CCParameter/NonNegativeIntegerParameter.py
smthkissinger/docker-images
35e868295d04fa780325ada4168381f1e80e8fe4
[ "BSD-3-Clause" ]
489
2017-08-28T16:17:03.000Z
2022-03-31T15:52:18.000Z
from cruisecontrolclient.client.CCParameter.Parameter import AbstractParameter class AbstractNonNegativeIntegerParameter(AbstractParameter): def __init__(self, value: int): AbstractParameter.__init__(self, value) def validate_value(self): if type(self.value) != int: raise ValueErr...
34.681818
78
0.68152
5ae095d3c79cf50f9df36ceed3475f163e6d7131
1,151
py
Python
other/calculae_mean_value_in_csv.py
yujungcheng/algorithm_and_data_structure
3742238227067217b82bf35ca3a968db4375f3c9
[ "Apache-2.0" ]
null
null
null
other/calculae_mean_value_in_csv.py
yujungcheng/algorithm_and_data_structure
3742238227067217b82bf35ca3a968db4375f3c9
[ "Apache-2.0" ]
null
null
null
other/calculae_mean_value_in_csv.py
yujungcheng/algorithm_and_data_structure
3742238227067217b82bf35ca3a968db4375f3c9
[ "Apache-2.0" ]
1
2020-04-16T01:17:04.000Z
2020-04-16T01:17:04.000Z
#!/usr/bin/env python """ get arithemtic mean of field X in csv file """ import sys # write csv data file csv_data = """1,2,3,4,5 10,"a,b",10,20,30,40,50 6,7,8,9,10 """ csv_file = "./data.csv" with open(csv_file, "w") as f: f.write(csv_data) def main(argv): count = mean = sum = 0 target_field = int(ar...
25.021739
67
0.527368
5c79043eb5e834cbcf47a54bd5b3f3c4bc2d6f68
168
py
Python
algorithms/dynamic_programming/fibonacci_modified.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/dynamic_programming/fibonacci_modified.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
algorithms/dynamic_programming/fibonacci_modified.py
PlamenHristov/HackerRank
2c875995f0d51d7026c5cf92348d9fb94fa509d6
[ "MIT" ]
null
null
null
import sys if __name__ == '__main__': A, B, N = list(map(int, sys.stdin.readline().split())) for _ in range(N - 2): A, B = B, A + B * B print(B)
16.8
58
0.511905
5cdc72357aa4c15c039f94945353eba7b78202c8
3,317
py
Python
tests/test_vertragsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
1
2022-03-02T12:49:44.000Z
2022-03-02T12:49:44.000Z
tests/test_vertragsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
21
2022-02-04T07:38:46.000Z
2022-03-28T14:01:53.000Z
tests/test_vertragsteil.py
bo4e/BO4E-python
28b12f853c8a496d14b133759b7aa2d6661f79a0
[ "MIT" ]
null
null
null
from datetime import datetime, timezone from decimal import Decimal import pytest # type:ignore[import] from bo4e.com.menge import Menge from bo4e.com.vertragsteil import Vertragsteil, VertragsteilSchema from bo4e.enum.mengeneinheit import Mengeneinheit class TestVertragsteil: def test_vertragsteil_only_requir...
46.069444
118
0.723545
a41eb63b2aaf2bfff2156860f8d27b86390d1e90
3,191
py
Python
reverse-ip-master/rev.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
reverse-ip-master/rev.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
reverse-ip-master/rev.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # -- import Modules -- import os import sys import json import random import requests import platform import threading py_version = platform.python_version() if int(py_version[0]) == 2: from Queue import Queue if int(py_version[0]) == 3: from queue import Queue # -- Co...
26.591667
90
0.498276
776c6738db6dde5dcb377c2b0db156cce05b9a65
419
py
Python
scripts/OOP/oop01a.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
scripts/OOP/oop01a.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
scripts/OOP/oop01a.py
ProfJust/Ruhr-TurtleBot-Competition-RTC-
5c2425bee331b4d5033757a9425676932d111775
[ "Unlicense", "MIT" ]
null
null
null
#!/usr/bin/env python3 # oop01.py Version vpm 20.11.20 # ------------------------- class Person: _name = " leer " _alter = 17 def reden(self): print("RTC ist super!") def reden2(self, text): print(str(text)) class nochKeineLust: pass if __name__ == '__main__': # Instanzzie...
16.76
32
0.551313
249a3fbab472633b967200dd7ee060eb66d3b642
96
py
Python
apps/password/apps.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
2
2017-12-17T21:28:22.000Z
2018-02-02T14:44:58.000Z
apps/password/apps.py
IT-PM-OpenAdaptronik/Webapp
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
118
2017-10-31T13:45:09.000Z
2018-02-24T20:51:42.000Z
apps/password/apps.py
OpenAdaptronik/Rattler
c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PasswordConfig(AppConfig): name = 'apps.password'
16
33
0.760417
24e07a9030fd2273db1ffd76c92bd326c9cdfe1d
262
pyde
Python
sketches/svgshapes/svgshapes.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/svgshapes/svgshapes.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/svgshapes/svgshapes.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
def setup(): global penguin size(400, 400) penguin = loadShape("1f427.svg") shapeMode(CENTER) def draw(): background(155) shape(penguin, width/2, height/2, map(mouseX, 0, width, 0, 800), map(mouseX, 0, width, 0, 800))
23.818182
40
0.583969
24f1ce869490b56c3affdcd202a3c52e7c31cbb7
3,241
py
Python
src/onegov/file/sign/generic.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/sign/generic.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/file/sign/generic.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
import os.path from contextlib import contextmanager, suppress from tempfile import mkstemp from io import UnsupportedOperation class SigningService(object): """ A generic interface for various file signing services. """ registry = {} def __init_subclass__(cls, service_name, **kwargs): SigningS...
28.9375
79
0.61154
700ee1da90478356a9d6616f4c7b1215d2d29d41
173
py
Python
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/25.01-Socket-Programming-Client.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/25.01-Socket-Programming-Client.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/25.01-Socket-Programming-Client.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
import socket client = socket.socket() client.connect(("127.0.0.1", 9999)) name = input("Enter your name: ") client.send(bytes(name, "utf-8")) print(client.recv(1024))
14.416667
35
0.676301
562dd8b0ea0bdb36a965557f50f7ab6709d59f02
1,623
py
Python
BCACTF/2021/crypto/Rainbow_Passage/rp.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-11-02T20:53:58.000Z
2021-11-02T20:53:58.000Z
BCACTF/2021/crypto/Rainbow_Passage/rp.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
BCACTF/2021/crypto/Rainbow_Passage/rp.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math import binascii from Crypto.Util.Padding import pad, unpad print(""" Welcome to the official communication encryption system for rainbow bridges. Input the encryption password given to you by your sponsor diety to encode messages, and use the decryption password given to you to deco...
28.473684
84
0.547135
d968c358955767596680fecedb0d8e2fd7a88445
1,730
py
Python
docs/labs/lab9/solutions/sol2_bagging.py
tteenathankachan/2021-CS109A
9349749539f439deff280ceb25621fc61a337253
[ "MIT" ]
19
2021-08-29T21:23:48.000Z
2022-03-16T14:38:25.000Z
docs/labs/lab9/solutions/sol2_bagging.py
SBalas/2021-CS109A
0f57c3d80b7cef99d660f6a77c0166cffc1253e8
[ "MIT" ]
null
null
null
docs/labs/lab9/solutions/sol2_bagging.py
SBalas/2021-CS109A
0f57c3d80b7cef99d660f6a77c0166cffc1253e8
[ "MIT" ]
22
2021-09-01T13:03:05.000Z
2022-03-31T14:34:36.000Z
#1 def get_bagging_df(x_train, y_train, model, bootstrap_range, cv_samples = 5): """ This function will take a model and a range of values and return a dataframe with columns: ["depth", "cross_val_acc"] Arguments: model: the model to be run. Specifically this should be a class instance such as ...
39.318182
121
0.652601
5c133e48e480de457e739be7d2367633d28699bf
12,746
py
Python
webinterface/tests/unit_tests/test_model_Affiliation.py
monoclecat/Cleaning-Schedule-generator
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
2
2021-11-28T23:04:00.000Z
2022-01-13T19:47:45.000Z
webinterface/tests/unit_tests/test_model_Affiliation.py
monoclecat/Cleaning-Schedule-generator
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
25
2020-03-29T14:40:46.000Z
2021-09-22T17:37:15.000Z
webinterface/tests/unit_tests/test_model_Affiliation.py
monoclecat/cleaning-schedule-management-system
b12fa8a6f834a89b805bf062a0df45279a7a8796
[ "MIT" ]
1
2020-07-04T11:42:17.000Z
2020-07-04T11:42:17.000Z
from django.test import TestCase from webinterface.models import * from django.core.exceptions import ValidationError import logging from unittest.mock import * class AffiliationTest(TestCase): @classmethod def setUpTestData(cls): # Config cls.start_week = 2500 cls.end_week = 2510 ...
53.108333
109
0.678723
a518fc9c2dba5dea61246b0d567c7de2a1f2bae2
533
py
Python
ZbjDjChannels/utils/const.py
zbjlala/ZbjDjChannels
c4da2339574e2e398bd452eef4d026eab309752c
[ "MIT" ]
null
null
null
ZbjDjChannels/utils/const.py
zbjlala/ZbjDjChannels
c4da2339574e2e398bd452eef4d026eab309752c
[ "MIT" ]
null
null
null
ZbjDjChannels/utils/const.py
zbjlala/ZbjDjChannels
c4da2339574e2e398bd452eef4d026eab309752c
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- # Filename: const.py # 定义一个常量类实现常量的功能 # # 该类定义了一个方法__setattr()__,和一个异常ConstError, ConstError类继承 # 自类TypeError. 通过调用类自带的字典__dict__, 判断定义的常量是否包含在字典 # 中。如果字典中包含此变量,将抛出异常,否则,给新创建的常量赋值 # 最后两行代码的作用是把const类注册到sys.modules这个全局字典中 import sys class _const: class ConstError(TypeError): ...
20.5
56
0.682927
ebcc43192102fc60c3aeb2a4100216de8c4784bb
189
py
Python
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/22.00-Linear Search.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/22.00-Linear Search.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
Python/Courses/Python-Tutorials.Telusko/02.Miscellaneous/22.00-Linear Search.py
shihab4t/Books-Code
b637b6b2ad42e11faf87d29047311160fe3b2490
[ "Unlicense" ]
null
null
null
lst = [1, 2, 5, 6, 7, 8, 0] def linear_search(nums, target): for i in range(len(nums)): if lst[i] == target: return i return -1 print(linear_search(lst, 8))
15.75
32
0.539683
d6a6e8414c2eb829a8a52e06912aa5e56be65a00
1,921
py
Python
x2paddle/project_convertor/pytorch/torch2paddle/layer.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
559
2019-01-14T06:01:55.000Z
2022-03-31T02:52:43.000Z
x2paddle/project_convertor/pytorch/torch2paddle/layer.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
353
2019-05-07T13:20:03.000Z
2022-03-31T05:30:12.000Z
x2paddle/project_convertor/pytorch/torch2paddle/layer.py
usertianqin/X2Paddle
b554a8094ca3e255ef4bd2e80337222a35625133
[ "Apache-2.0" ]
241
2018-12-25T02:13:51.000Z
2022-03-27T23:21:43.000Z
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
22.08046
74
0.706403
d6d4314a7be351e3b1f4bc786717db8572d21aae
643
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/28. longest common prefix.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_2_String/28. longest common prefix.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_2_String/28. longest common prefix.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Write a function to find the longest common prefix string between a given set of strings. If there is no common prefix, return an empty string. Example: Input Data: s1 = 'floor' s2 = 'float' s3 = 'floral' s4 = 'flow' Expected output = 'flo' """ def longest_prefix(s1,s2,s3,s4): arr = [s1...
17.861111
90
0.506998
305735c0f84991315b015ba8b1f656b08c1b5b90
1,051
py
Python
task_manager/task_manager/tasks/views.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
1
2022-03-03T10:16:14.000Z
2022-03-03T10:16:14.000Z
task_manager/task_manager/tasks/views.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
task_manager/task_manager/tasks/views.py
trenev/softuni-python-web-basics
0fcf6b7f3389d06685d40615c376dc4027e772f2
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from task_manager.tasks.forms import TaskForm from task_manager.tasks.models import Task def show_home(request): if request.method == 'POST': form = TaskForm(request.POST) if form.is_valid(): form.save() return redirect('index'...
23.886364
72
0.641294
23297f8ab566deee67ad6925c503ceab08cdcf2f
1,603
py
Python
wechat_xiaowei/api/wechatapi.py
jiangyx3915/wechat-xiaowei
cc81264431f5f771e3eb3506260ea68ee882d1fe
[ "MIT" ]
1
2020-07-13T16:08:48.000Z
2020-07-13T16:08:48.000Z
wechat_xiaowei/api/wechatapi.py
jiangyx3915/wechat-xiaowei
cc81264431f5f771e3eb3506260ea68ee882d1fe
[ "MIT" ]
null
null
null
wechat_xiaowei/api/wechatapi.py
jiangyx3915/wechat-xiaowei
cc81264431f5f771e3eb3506260ea68ee882d1fe
[ "MIT" ]
null
null
null
class WeChatApiMixin: def apply_enter(self, params: dict): """ 申请入驻小微商户 :param params: :return: """ raise NotImplementedError() def retrieve_apply_status(self, params: dict): """ 入驻申请状态查询 :param params: :return: """ ...
21.958904
53
0.530256
2363d209b4a4a8b5a9eccd02e68c7b04a4f282a6
932
py
Python
coco2yolov5-converter/tests/converter/test_txt_util.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
coco2yolov5-converter/tests/converter/test_txt_util.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
coco2yolov5-converter/tests/converter/test_txt_util.py
SchweizerischeBundesbahnen/sbb-ml-models
485356aeb0a277907c160d435f7f654154046a70
[ "MIT" ]
null
null
null
# disabling PyLint docstring, no self using # pylint: disable=C0114,C0115,C0116,R0201 import tempfile from pathlib import Path from src.converter.txt_util import TxtUtil class TestTxtUtil: def write_labels_to_temp_dir_and_return_content(self, labels): with tempfile.TemporaryDirectory() as tmp_dir: ...
34.518519
106
0.657725
ccbd1e9583536ae99d6eb650c096c8a1792d82f1
5,474
py
Python
rbac/common/user/user_address.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
75
2018-04-06T09:13:34.000Z
2020-05-18T18:59:47.000Z
rbac/common/user/user_address.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
989
2018-04-18T21:01:56.000Z
2019-10-23T15:37:09.000Z
rbac/common/user/user_address.py
akgunkel/sawtooth-next-directory
a88833033ab30e9091479a38947f04c5e396ca46
[ "Apache-2.0" ]
72
2018-04-13T18:29:12.000Z
2020-05-29T06:00:33.000Z
# Copyright 2019 Contributors to Hyperledger Sawtooth # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
31.825581
79
0.695287
9dbd14c8b7773c1daaccd5ffc59f9191c328ab76
5,954
py
Python
benwaonline/gallery/views.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
benwaonline/gallery/views.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
16
2017-09-13T10:21:40.000Z
2020-06-01T04:32:22.000Z
benwaonline/gallery/views.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
import os import uuid from pathlib import PurePath import requests from flask import (current_app, flash, jsonify, redirect, render_template, request, session, url_for) from flask_login import current_user, login_required from werkzeug.utils import secure_filename from benwaonline.gateways import (...
32.010753
126
0.69701
8864c3929e835d0290a3af4cf9feed045d9567d3
2,460
py
Python
research/cv/ssd_resnet50/src/resnet_extra.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/ssd_resnet50/src/resnet_extra.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/ssd_resnet50/src/resnet_extra.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...
35.652174
100
0.639431
c9d9df885c13bbe298c72499f9d4dadcfe46f8f7
2,740
py
Python
src/pfun/subprocess.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
126
2019-09-16T15:28:20.000Z
2022-03-20T10:57:53.000Z
src/pfun/subprocess.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
54
2019-09-30T08:44:01.000Z
2022-03-20T11:10:00.000Z
src/pfun/subprocess.py
suned/pfun
46c460646487abfef897bd9627891f6cf7870774
[ "MIT" ]
11
2020-01-02T08:32:46.000Z
2022-03-20T11:10:24.000Z
from __future__ import annotations import asyncio from subprocess import PIPE, CalledProcessError from typing import IO, Tuple, Union from typing_extensions import Protocol from .effect import Effect, Try, add_repr, depend, from_callable from .either import Left, Right from .functions import curry from .immutable im...
28.247423
75
0.590146
a01a348ee1d78fb783217d18c13ff94410e197ad
1,828
py
Python
logya/util.py
yaph/logya
9647f58a0b8653b56ad64332e235a76cab3acda9
[ "MIT" ]
12
2015-03-04T03:23:56.000Z
2020-11-17T08:09:17.000Z
logya/util.py
elaOnMars/logya
a9f256ac8840e21b348ac842b35683224e25b613
[ "MIT" ]
78
2015-01-05T11:40:41.000Z
2022-01-23T21:05:39.000Z
logya/util.py
elaOnMars/logya
a9f256ac8840e21b348ac842b35683224e25b613
[ "MIT" ]
6
2015-04-20T06:58:42.000Z
2022-01-31T00:36:29.000Z
# -*- coding: utf-8 -*- import re from collections import namedtuple from pathlib import Path from string import punctuation, whitespace from yaml import dump, load try: from yaml import CDumper as Dumper, CLoader as Loader except ImportError: # pragma: no cover from yaml import Dumper, Loader # type: ignor...
27.69697
81
0.658096
4e44247cf72b6ecfa9ff4298f3415b1179f283bb
1,144
py
Python
data/episode5/levenshtein.py
AkademieOlympia/nlp-mit-python
39b36c65bf7e0fc9e3bc0388e0250732b909c689
[ "CC-BY-4.0" ]
2
2020-03-03T09:40:24.000Z
2020-04-09T07:23:59.000Z
data/episode5/levenshtein.py
AkademieOlympia/nlp-mit-python
39b36c65bf7e0fc9e3bc0388e0250732b909c689
[ "CC-BY-4.0" ]
null
null
null
data/episode5/levenshtein.py
AkademieOlympia/nlp-mit-python
39b36c65bf7e0fc9e3bc0388e0250732b909c689
[ "CC-BY-4.0" ]
1
2022-01-31T13:07:09.000Z
2022-01-31T13:07:09.000Z
def levenshtein_distance_add(a, b): # Basisfall: leere Zeichenketten bei einem der beiden Strings # --> man muss die Zeichen des anderen Strings hinzufügen if len(a) == 0: return len(b) if len(b) == 0: return len(a) # Basisfall ist nicht eingetreten return None def levenshtein_...
30.105263
66
0.657343
4e712a5391dbdf453375d60bb0f1e5404aed4831
3,890
py
Python
blog/routes.py
Lanseuo/lucas-blog
fd6932952aac3a3055026551700bc86adef279f4
[ "MIT" ]
1
2019-01-29T15:57:20.000Z
2019-01-29T15:57:20.000Z
blog/routes.py
Lanseuo/lucas-blog
fd6932952aac3a3055026551700bc86adef279f4
[ "MIT" ]
1
2018-05-05T19:43:28.000Z
2018-05-05T19:43:28.000Z
blog/routes.py
Lanseuo/lucas-blog
fd6932952aac3a3055026551700bc86adef279f4
[ "MIT" ]
1
2018-04-24T09:36:57.000Z
2018-04-24T09:36:57.000Z
from flask import render_template, url_for, redirect, jsonify from werkzeug.contrib.atom import AtomFeed from . import app, meta from .errors import PostNotFound from .posts import Posts from .post import Post @app.route("/") def index(): return render_template( "index.html", site_title=meta.site...
28.188406
93
0.617995
01328434e37edfec8e0b7144da3f6a83c8d70bb9
1,798
py
Python
Challenge_1/members/nico.py
joeherold/weekly_coding_challenge_fwkwkw_python
5c2795fdf38970a387540141ad95408c527a7779
[ "MIT" ]
1
2020-05-15T13:43:16.000Z
2020-05-15T13:43:16.000Z
Challenge_1/members/nico.py
joeherold/weekly_coding_challenge_fwkwkw_python
5c2795fdf38970a387540141ad95408c527a7779
[ "MIT" ]
4
2020-05-15T17:46:52.000Z
2020-07-06T11:48:37.000Z
Challenge_1/members/nico.py
joeherold/weekly_coding_challenge_fwkwkw_python
5c2795fdf38970a387540141ad95408c527a7779
[ "MIT" ]
null
null
null
#Schreibe eine Schleife (z.B. while, oder for...) mit der du die unten angegebene Liste aufsteigende sortierst. #Es ist keine eingebaute Sortierfunktion erlaubt, sondern muss mit einfachen Rechenoperatoren wie <, > if, elif, ... gelöst werden. # gegebene Liste myNumberList = [25, 45, 25, 78, 21, 14, 87, 32, 57, 54] emp...
43.853659
262
0.588988
6d75456a0e0cc3362e8244b5596ea21a37af67af
701
py
Python
tools/lib/lastvaluestorage.py
FloEdelmann/vaterstetten-in-zahlen
4c76170d5123eaa091a8d01a51d746659bed7203
[ "MIT" ]
10
2021-01-28T21:43:22.000Z
2022-01-15T16:50:34.000Z
tools/lib/lastvaluestorage.py
FloEdelmann/vaterstetten-in-zahlen
4c76170d5123eaa091a8d01a51d746659bed7203
[ "MIT" ]
7
2021-06-10T07:19:21.000Z
2022-03-22T15:11:17.000Z
tools/lib/lastvaluestorage.py
FloEdelmann/vaterstetten-in-zahlen
4c76170d5123eaa091a8d01a51d746659bed7203
[ "MIT" ]
5
2021-01-29T14:14:45.000Z
2022-01-09T15:37:36.000Z
import json import os from typing import TypeVar, Generic dirname = os.path.dirname(__file__) storage_dir = os.path.join(dirname, '..', 'lastvaluestorage') os.makedirs(storage_dir, exist_ok = True) T = TypeVar('T') class LastValueStorage(Generic[T]): def __init__(self, name): self.storage_file = os.path.join(s...
26.961538
65
0.687589
11036bd56e69034f37ed3189ebcd0ad2801a590e
1,522
py
Python
scripts/count_features.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
8
2018-03-09T16:44:38.000Z
2021-04-07T11:33:30.000Z
scripts/poi_number.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
4
2020-03-24T15:34:54.000Z
2021-06-01T21:54:33.000Z
scripts/poi_number.py
PyGeoL/GeoL
67a5bd2f63091e19041094c14d419055fa5ce6f0
[ "MIT" ]
1
2020-05-13T14:30:55.000Z
2020-05-13T14:30:55.000Z
# coding: utf-8 # Load FourSquare MAPPED dataset and assign to each square in the grid the # number of POI of each FS category. import pandas as pd from geol.feature_extraction.various import BOC import sys import argparse import os def category(df, level): tmp = df['categories'].split(":") if len(tmp) >...
25.366667
74
0.494744
42d39826dd6dafb3dd8dfc4a90b7bc9afc307a9b
865
py
Python
30 Days of Code/30DoC-day-18/30DoC_day_18.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
30 Days of Code/30DoC-day-18/30DoC_day_18.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
30 Days of Code/30DoC-day-18/30DoC_day_18.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
import sys from collections import deque class Solution(deque): enqueueCharacter = deque.append dequeueCharacter = deque.popleft pushCharacter = deque.append popCharacter = deque.pop # read the string s s = input() # Create the Solution class object obj = Solution() l = len(s) # push/enqueue all th...
22.763158
54
0.690173
42f28c86e0eb5bd9af5f826229f9378bb1625b98
472
py
Python
SQL_python/DataBasePython/connection2.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
SQL_python/DataBasePython/connection2.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
SQL_python/DataBasePython/connection2.py
cartellefo/projet
23c67e847b415fb47f71e830b89a227fffed109b
[ "MIT" ]
null
null
null
import psycopg2 import time start = time.time() try: conn = psycopg2.connect("dbname='postgres' user='postgres' host='localhost' password='dbpass'") except: print("I am unable to connect to the database") #cur.execute("""SELECT datname from pg_database""") cur = conn.cursor() print('PostgreSQL database vers...
19.666667
99
0.71822
28a2953ef856819d8b11cf6c35be93d87e35e11f
3,135
py
Python
src/building_cost_analysis/parser.py
mike199011/building_cost_analysis
897fe3fddf882099c279a4fe855da0f5f3dff56a
[ "MIT" ]
null
null
null
src/building_cost_analysis/parser.py
mike199011/building_cost_analysis
897fe3fddf882099c279a4fe855da0f5f3dff56a
[ "MIT" ]
null
null
null
src/building_cost_analysis/parser.py
mike199011/building_cost_analysis
897fe3fddf882099c279a4fe855da0f5f3dff56a
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import os import glob # TODO plausibility checks ID == np.nan # TODO plausibility check ascending ids! # TODO check if all ids < level remain constant inside the group ( for example 10.10, 10.20 10.30 ok, 10.10, 20.10, 10.20 wrong!) # maybe this makes no sense!.. def get_df_with...
42.364865
137
0.683573
dd89b1ca7be5f28b422a78590adc5898bd2e27af
307
py
Python
MazeSolving/Solver/PathFinder.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
5
2018-02-06T22:48:34.000Z
2020-01-07T20:19:05.000Z
MazeSolving/Solver/PathFinder.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
11
2018-01-31T21:47:49.000Z
2018-04-21T16:42:52.000Z
MazeSolving/Solver/PathFinder.py
Thukor/MazeSolver
c953e193ce27a7348e8ec9c5592144426dfce193
[ "MIT" ]
2
2020-06-18T05:40:03.000Z
2022-02-02T03:46:30.000Z
class PathFinder: #Instantiate for Strategy Pattern: Context -> Path Finding def __init__(self, strategy): self.strategy = strategy def find_shortest_path(self, G,start, end, heuristic = None): if heuristic: return self.strategy(G, start, end, heuristic) return self.strategy(G, start, end)
27.909091
62
0.736156
9ff2a4bc2f029e132306eb92a180a315430349f6
2,769
py
Python
Packs/CommonScripts/Scripts/AddKeyToList/AddKeyToList.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/CommonScripts/Scripts/AddKeyToList/AddKeyToList.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/CommonScripts/Scripts/AddKeyToList/AddKeyToList.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
"""AddKeyToList Adds/Updates a Key to a JSON-backed List """ import demistomock as demisto from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import from CommonServerUserPython import * # noqa from typing import Dict, Any import traceback ''' STANDALONE FUNCTION ''' def add_key_to_list(li...
28.255102
118
0.653666
05b527fcbd371bc5f199439a6ac9addb8d5e1ed7
754
py
Python
pi/pi.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
4
2018-11-14T12:03:05.000Z
2019-09-03T14:33:28.000Z
pi/pi.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
null
null
null
pi/pi.py
tlming16/Projec_Euler
797824c5159fae67493de9eba24c22cc7512d95d
[ "MIT" ]
1
2018-11-17T14:39:22.000Z
2018-11-17T14:39:22.000Z
import sys from ctypes import cdll from ctypes import c_char_p, c_int, c_char pilib = None pi = None def load_pi(): global pilib, pi if pilib is None: pilib = cdll.LoadLibrary("pi_lib") if pi is None: pi = pilib.pi pi.argtypes = [c_int, c_char_p] pi.restype = c_char_p ...
20.944444
44
0.587533
af203f6fc3bb8489b4a068628d5078f6e64d033e
1,833
py
Python
app.py
javeed3157/Flask
d1c633bbe15046f7a9b2c35e3de8b01b8dc0f539
[ "MIT" ]
2
2021-07-01T16:43:48.000Z
2021-07-01T16:43:50.000Z
app.py
javeed3157/Flask
d1c633bbe15046f7a9b2c35e3de8b01b8dc0f539
[ "MIT" ]
null
null
null
app.py
javeed3157/Flask
d1c633bbe15046f7a9b2c35e3de8b01b8dc0f539
[ "MIT" ]
null
null
null
from flask import Flask,render_template,request,redirect from flask.wrappers import Request from flask_sqlalchemy import SQLAlchemy from datetime import datetime app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI']="sqlite:///todo.db" app.config['SQLALCHEMY_TRACK_MODIFICATIONS']=False db=SQLAlchemy(app) class ...
29.095238
63
0.66994
a58997e7607abdd94ad2c112a742fa5d0df93f39
890
py
Python
tools/pythonpkg/tests/fast/api/test_dbapi09.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/tests/fast/api/test_dbapi09.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/tests/fast/api/test_dbapi09.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
# date type import numpy import datetime import pandas class TestNumpyDate(object): def test_fetchall_date(self, duckdb_cursor): res = duckdb_cursor.execute("SELECT DATE '2020-01-10' as test_date").fetchall() assert res == [(datetime.date(2020, 1, 10),)] def test_fetchnumpy_date(self, duckdb_...
40.454545
98
0.685393
e99f89c87eb8d8c27f754d7e91db2bd9089ca767
3,401
py
Python
menucard/tests/test_kundenansicht.py
baniasbaabe/happy-qr
bf44ac19306ea6405cc7c9a100e6f83afca125b4
[ "MIT" ]
1
2021-01-23T21:42:10.000Z
2021-01-23T21:42:10.000Z
menucard/tests/test_kundenansicht.py
baniasbaabe/happy-qr
bf44ac19306ea6405cc7c9a100e6f83afca125b4
[ "MIT" ]
null
null
null
menucard/tests/test_kundenansicht.py
baniasbaabe/happy-qr
bf44ac19306ea6405cc7c9a100e6f83afca125b4
[ "MIT" ]
null
null
null
from django.contrib.staticfiles.testing import StaticLiveServerTestCase, LiveServerTestCase from selenium.webdriver.chrome.webdriver import WebDriver from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager import time from crm.models import * from django.test import Client from django.co...
55.754098
122
0.708615
75b0a5d8a828e386d7a355bf04a839c142bed273
6,801
py
Python
src/onegov/wtfs/models/scan_job.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/models/scan_job.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
src/onegov/wtfs/models/scan_job.py
politbuero-kampagnen/onegov-cloud
20148bf321b71f617b64376fe7249b2b9b9c4aa9
[ "MIT" ]
null
null
null
from onegov.core.orm import Base from onegov.core.orm.mixins import ContentMixin from onegov.core.orm.mixins import TimestampMixin from onegov.core.orm.types import UUID from onegov.wtfs import _ from onegov.wtfs.models.municipality import Municipality from sqlalchemy import Column from sqlalchemy import Date from sqla...
33.502463
79
0.68931
f9cb3c4aaf87f25df77119ed0c2b62b233dc10b9
4,789
py
Python
notebooks/utils/plots.py
data-science-workshops/machine-learning-workflow
b7880ccc6c573ee2e8d5d4353e22a2f3a1f45d13
[ "MIT" ]
null
null
null
notebooks/utils/plots.py
data-science-workshops/machine-learning-workflow
b7880ccc6c573ee2e8d5d4353e22a2f3a1f45d13
[ "MIT" ]
null
null
null
notebooks/utils/plots.py
data-science-workshops/machine-learning-workflow
b7880ccc6c573ee2e8d5d4353e22a2f3a1f45d13
[ "MIT" ]
null
null
null
import numpy as np import seaborn as sns import matplotlib.pyplot as plt import itertools from sklearn.model_selection import learning_curve def plot_confusion_matrix(cm, classes, normalize=False, title='Confusion matrix', cmap=plt.cm.Blues...
37.708661
103
0.636876
9bba2104200ce8ef8fa10ca5a338d9b8ed263ce8
2,856
py
Python
Game.AI/driver.py
Golfyrs/ML.Experiments
362d94357c2ca84a6a4cb127aec6d00c8b1756d4
[ "Apache-2.0" ]
null
null
null
Game.AI/driver.py
Golfyrs/ML.Experiments
362d94357c2ca84a6a4cb127aec6d00c8b1756d4
[ "Apache-2.0" ]
null
null
null
Game.AI/driver.py
Golfyrs/ML.Experiments
362d94357c2ca84a6a4cb127aec6d00c8b1756d4
[ "Apache-2.0" ]
null
null
null
import ctypes LONG = ctypes.c_long DWORD = ctypes.c_ulong ULONG_PTR = ctypes.POINTER(DWORD) WORD = ctypes.c_ushort INPUT_MOUSE = 0 INPUT_KEYBOARD = 1 INPUT_HARDWARE = 2 class MOUSEINPUT(ctypes.Structure): _fields_ = (('dx', LONG), ('dy', LONG), ('mouseData', DWORD), ...
21.636364
92
0.646008
b5d40ad66636bf86f3132cd25113603dfd080de2
358
py
Python
staircase.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
staircase.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
staircase.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
#!/bin/python3 import math import os import random import re import sys # https://www.hackerrank.com/challenges/staircase/ space = " " stair = "#" def staircase(n): j = 1 l = 1 for i in range(n): print(((n - j) * space) + (l * stair)) j += 1 l += 1 if __name__ == '__main__': ...
12.785714
50
0.544693
f1c75921c39888eb53f362372a8fa7e6e8e9cc9c
526
py
Python
row_column_list_sort.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
row_column_list_sort.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
row_column_list_sort.py
nirobio/puzzles
fda8c84d8eefd93b40594636fb9b7f0fde02b014
[ "MIT" ]
null
null
null
#!/bin/python3 # https://www.hackerrank.com/challenges/python-sort-sort/ import math import os import random import re import sys # n = no. of rows # m = no. of columns (attributes) # k = sort by K'th attribute. k is zero-indexed if __name__ == '__main__': nm = input().split() n = int(nm[0]) m = int(nm[1]...
20.230769
60
0.593156
b53cf55c5ccbd8591d5e1352f352c019c0b8e8ef
368
py
Python
nz_crawl_demo/day1/python3/demo3.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
null
null
null
nz_crawl_demo/day1/python3/demo3.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
nz_crawl_demo/day1/python3/demo3.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
2
2020-02-18T01:54:55.000Z
2020-02-21T11:36:28.000Z
from urllib import request headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36", } # req = request.Request(url="https://www.baidu.com",headers=headers) # request.urlretrieve("http://www.renren.com","1.html") url = 'https://...
36.8
136
0.703804
a97ec373e15a4d4ee2559e64ee3ada83f9936678
2,169
py
Python
python_lessons/MtMk_Test_Files/portfolio_allocation.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/MtMk_Test_Files/portfolio_allocation.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
python_lessons/MtMk_Test_Files/portfolio_allocation.py
1986MMartin/coding-sections-markus
e13be32e5d83e69250ecfb3c76a04ee48a320607
[ "Apache-2.0" ]
null
null
null
import pandas_datareader as pdr import pandas as pd import datetime as dt import matplotlib.pyplot as plt from matplotlib import style style.use('ggplot') start = dt.datetime(2020,1,1) end = dt.datetime.today() share_aapl = pdr.get_data_yahoo('AAPL', start = start, end = end) share_atvi = pdr.get_data_ya...
41.711538
187
0.52651
9e058916cc2376da3e8473ec53bf0a27a5139e42
18,563
py
Python
rfvision/datasets/arti.py
mvig-robotflow/rfvision
cc662f213dfe5a3e8864a6b5685a668a4436e397
[ "Apache-2.0" ]
6
2021-09-25T03:53:06.000Z
2022-02-19T03:25:11.000Z
rfvision/datasets/arti.py
mvig-robotflow/rfvision
cc662f213dfe5a3e8864a6b5685a668a4436e397
[ "Apache-2.0" ]
1
2021-07-21T13:14:54.000Z
2021-07-21T13:14:54.000Z
rfvision/datasets/arti.py
mvig-robotflow/rfvision
cc662f213dfe5a3e8864a6b5685a668a4436e397
[ "Apache-2.0" ]
2
2021-07-16T03:25:04.000Z
2021-11-22T06:04:01.000Z
''' ARTI is a dataset created by Liu Liu (@liuliu66) ''' import os import numpy as np import open3d as o3d import rflib import json from torch.utils.data import Dataset import copy from .pipelines import Compose from .builder import DATASETS INSTANCE_CLASSES = ('BG', 'box', 'stapler', 'cutter', 'drawer', 'scissor') PA...
39.92043
120
0.562463
9e07cf733d06837c5a79c65f1037a6160c37e2bd
1,710
py
Python
Scheduling/Python Implementation/roundrobin.py
G-M-C/S5-SSLAB
d56a968ffdf56c845cde7aa0cf047c88870ed011
[ "MIT" ]
null
null
null
Scheduling/Python Implementation/roundrobin.py
G-M-C/S5-SSLAB
d56a968ffdf56c845cde7aa0cf047c88870ed011
[ "MIT" ]
null
null
null
Scheduling/Python Implementation/roundrobin.py
G-M-C/S5-SSLAB
d56a968ffdf56c845cde7aa0cf047c88870ed011
[ "MIT" ]
null
null
null
import pandas as pd import operator class Process: def __init__(self): self.pid=input("Enter Process ID : ") self.bt=int(input("Enter Burst time : ")) def get_wt(self,x): self.wt=x def get_tat(self,x): self.tat=x def wait_time(p,qtm,n): rbt=[] t=0 for i...
21.375
76
0.495322
9e0c60e3c97952949cfeacd99eec760ab50b5c89
1,310
py
Python
02.Sort/NY/B2578.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
1
2021-11-21T06:03:06.000Z
2021-11-21T06:03:06.000Z
02.Sort/NY/B2578.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
2
2021-10-13T07:21:09.000Z
2021-11-14T13:53:08.000Z
02.Sort/NY/B2578.py
SP2021-2/Algorithm
2e629eb5234212fad8bbc11491aad068e5783780
[ "MIT" ]
null
null
null
# 백준 2578 - 빙고 import sys line = 0 chulsuArr = [] for i in range (5) : N = list(map(int, sys.stdin.readline().split())) chulsuArr.append(N) mcArr = "" for i in range (5) : M = input() mcArr += (M + " ") mcArr = mcArr.split() def drawLine (arr, line) : for i in range (len(arr)) : if arr...
18.985507
52
0.414504
1916674c6784afeada8100620ac7a477e66a1263
459
py
Python
books/PythonAutomate/gui_automate/gui_screen.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/gui_automate/gui_screen.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/gui_automate/gui_screen.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
"""gui_screen.py 화면 관련 작업 진행하기 """ import pyautogui # 스크린샷 찍기 (이미지 객체 불러오기) im = pyautogui.screenshot() # 픽셀 RGB 값 가져오기 print(pyautogui.pixel(0, 0)) try: # 이미지 인식 loc = pyautogui.locateOnScreen("help_icon.png") # 좌표 얻기, 없으면 Error print(f"loc: {loc}, left: {loc.left}") # 이미지 인식 - 리스트 반환 (2개 이상 매칭이 필...
19.956522
71
0.651416
193409473f6fe5280bf60849a6a940ed2203f14d
5,968
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/net/net2geojson.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/net2geojson.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/net2geojson.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...
41.158621
119
0.623157
27f4b287bcdaf90ff79c675f3dbfe98fc86ce17a
5,732
py
Python
python/data_sutram/pypath/PyPath/json_sqlite/7_get_vehicles_by_rec_boundary.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/data_sutram/pypath/PyPath/json_sqlite/7_get_vehicles_by_rec_boundary.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/data_sutram/pypath/PyPath/json_sqlite/7_get_vehicles_by_rec_boundary.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
""" Values obtained : Minimum latitude of a stoppage : -6.786582 Maximum latitude of a stoppage : 25.40523 Minimum longitude of a stoppage : 22.382959 Maximum longitude of a stoppage : 88.963 Expected output : { "angle": 5, "crowd": "null", "dataSource": "Chemito-VTU", ...
27.960976
210
0.553733
fd6e17d2e4aa49bac22ab97c94861d9891c44ca2
2,504
py
Python
noc/e_6_2_arriving_behavior/viehicle.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
noc/e_6_2_arriving_behavior/viehicle.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
noc/e_6_2_arriving_behavior/viehicle.py
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
class Viehicle(): def __init__(self, x, y): self.acceleration = PVector(0, 0) self.velocity = PVector(0, 0) self.location = PVector(x, y) self.r = 8.0 self.maxspeed = 5 self.maxforce = 0.1 self.d = 25 def update(self): self.velocity.add(s...
34.30137
62
0.5627
474c85adc4f1039fdc14769c2a3ca91c46d1069f
1,593
py
Python
hello/hello_turtle.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2017-10-23T14:58:47.000Z
2017-10-23T14:58:47.000Z
hello/hello_turtle.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
null
null
null
hello/hello_turtle.py
East196/hello-py
a77c7a0c8e5e2b5e8cefaf0fda335ab0c3b1da21
[ "Apache-2.0" ]
1
2018-04-06T07:49:18.000Z
2018-04-06T07:49:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import turtle turtle.hideturtle() turtle.shape("turtle") turtle.color("red") turtle.begin_fill() turtle.pencolor("red") turtle.circle(100) turtle.end_fill() turtle.color("orange") turtle.begin_fill() turtle.pencolor("orange") turtle.left(90) turtle.forward(10) turtle.ri...
15.93
25
0.753923
d0413f5631e54ddf878bdbe86fd1896e496c39b3
2,143
py
Python
imwievaluation/student.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/student.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
null
null
null
imwievaluation/student.py
ESchae/IMWIEvaluation
2fa661711b7b65cba25c1fa9ba69e09e75c7655f
[ "MIT" ]
1
2019-10-19T10:11:17.000Z
2019-10-19T10:11:17.000Z
import sqlalchemy as db from base import Base, UniqueMixin from sqlalchemy.orm import relationship class Student(Base): """ WARNING: To be sure to have no duplicates in the database, class should be not instantiated via __init__, call Student.get_unique(...) instead. TODO: Maybe just catch duplic...
36.948276
96
0.678955
d0fbae31a42f8c15f4d8c800b3f965567de6afac
4,989
py
Python
deprecated/examples/word2vec/network.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
170
2020-08-12T12:07:01.000Z
2022-03-07T02:38:26.000Z
deprecated/examples/word2vec/network.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
195
2020-08-13T03:22:15.000Z
2022-03-30T07:40:25.000Z
deprecated/examples/word2vec/network.py
hutuxian/FleetX
843c7aa33f5a14680becf058a3aaf0327eefafd4
[ "Apache-2.0" ]
67
2020-08-14T02:07:46.000Z
2022-03-28T10:05:33.000Z
import paddle import paddle.fluid as fluid def word2vec_net(dict_size, embedding_size, neg_num): with fluid.unique_name.guard(): input_word = fluid.layers.data(name="input_word", shape=[ 1], dtype='int64', lod_level=1) true_word = fluid.layers.data(name='true_label', shape=[ ...
43.008621
82
0.607336
32a5c69c8bbcee9d4509ff9210e0847463559695
3,127
py
Python
shinrl/solvers/discrete_vi/solver.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
34
2021-12-09T07:12:57.000Z
2022-03-11T08:17:20.000Z
shinrl/solvers/discrete_vi/solver.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
null
null
null
shinrl/solvers/discrete_vi/solver.py
omron-sinicx/ShinRL
09f4ae274a33d1fc1d9d542f816aef40014af6b5
[ "MIT" ]
4
2021-12-11T07:48:01.000Z
2022-03-01T23:50:33.000Z
""" Author: Toshinori Kitamura Affiliation: NAIST & OSX """ from typing import List, Type import gym import shinrl as srl from ._build_calc_params_mixin import BuildCalcParamsDpMixIn, BuildCalcParamsRlMixIn from ._build_net_act_mixin import BuildNetActMixIn from ._build_net_mixin import BuildNetMixIn from ._build_ta...
36.360465
93
0.679245
3efc631f53d312ad29b5c6b16ba9934612f1a14e
550
py
Python
Hackerrank_problems/Jumping on the Clouds/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
Hackerrank_problems/Jumping on the Clouds/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
Hackerrank_problems/Jumping on the Clouds/solution.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
def jumpingOnClouds(c): count = -1 # initialize i = 0 while i < len(c): # iterate till the end of cloud count += 1 if i < len(c) - 2 and c[i + 2] == 0: # will check next jump on cloud i += 1 i += 1 # increment return count # returns output if __name__ == '__main...
30.555556
102
0.587273
722271c187e10a593290b6ef8f713dc156a299c4
1,671
py
Python
python/en/archive/dropbox/miscellaneous_python_files/input_dataframe.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/miscellaneous_python_files/input_dataframe.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
python/en/archive/dropbox/miscellaneous_python_files/input_dataframe.py
aimldl/coding
70ddbfaa454ab92fd072ee8dc614ecc330b34a70
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ input_dataframe.py # Sentiment Indentification for Roman Urdu """ import pandas as pd #%% def dummy_input( verbose=False ): ''' returns a dummy dataframe 'df_preproc' used as a dummy input for debugging. dummy vocabulary: aa is only in 0. ...
31.528302
79
0.535607
26350d2603426b467fb7409c55d17bb793c4f8ad
5,809
py
Python
zyannken.py
TOSKT/myripo89L
70656cdf3694485e510b5bb5d6368fe061052e3e
[ "MIT" ]
null
null
null
zyannken.py
TOSKT/myripo89L
70656cdf3694485e510b5bb5d6368fe061052e3e
[ "MIT" ]
null
null
null
zyannken.py
TOSKT/myripo89L
70656cdf3694485e510b5bb5d6368fe061052e3e
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2018 TOSKT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distrib...
36.080745
94
0.53813
268274c068c5e28bbe3ea95dad31b0475db64e0e
8,668
py
Python
classification/train2.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
classification/train2.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
null
null
null
classification/train2.py
gitskim/DnntalPrivate
20f84782e9ab20c68b43f32efb16cd22262b8ceb
[ "MIT" ]
2
2019-05-16T05:48:26.000Z
2021-01-27T01:26:22.000Z
#Model using a focal loss function import os import cv2 import glob import imgaug as aug import numpy as np import pandas as pd import imgaug.augmenters as iaa from skimage.io import imread from skimage.transform import resize from sklearn.model_selection import train_test_split from tensorflow.python.keras.models ...
34.396825
123
0.701892
cd94429622d8f93baadf55096510a31ca24e003a
893
py
Python
10-HTTP Request Methods/10-a-GET/app.py
dikyindrah/Flask
96f3f2b0db12b362d439d0c064dfa392ee14ad12
[ "MIT" ]
null
null
null
10-HTTP Request Methods/10-a-GET/app.py
dikyindrah/Flask
96f3f2b0db12b362d439d0c064dfa392ee14ad12
[ "MIT" ]
null
null
null
10-HTTP Request Methods/10-a-GET/app.py
dikyindrah/Flask
96f3f2b0db12b362d439d0c064dfa392ee14ad12
[ "MIT" ]
null
null
null
from flask import Flask, request, redirect, url_for app = Flask(__name__) @app.route('/index') def index(): return 'Ini adalah halaman index' @app.route('/search', methods=['GET','POST']) def search(): if request.method == 'GET': # Pernyataan untuk satu query buah = request.args.get('buah') ...
30.793103
82
0.610302
26c079947030e60e646b24beed554b1a093ec2b6
903
py
Python
SBTK_League_Helper/src/tools/msg_logging.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/msg_logging.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/src/tools/msg_logging.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
from src.tools.strings import make_printable from time import perf_counter, sleep """ This module should be accomodated to use the logging built-in module. Calls to log_entry should be replaced by logging calls on later versions """ log_entries = 0 def log_entry(*args): # For now, just printing (and dumbed do...
25.083333
80
0.631229