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
6181c9cbfd9cf9f4d3f767e23ef2931a83c6560a
1,089
py
Python
Algorithms/5_Searching/8.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
1
2021-11-25T13:39:30.000Z
2021-11-25T13:39:30.000Z
Algorithms/5_Searching/8.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
Algorithms/5_Searching/8.py
abphilip-codes/Hackerrank_DSA
bb9e233d9d45c5b14c138830602695ad4113fba4
[ "MIT" ]
null
null
null
# https://www.hackerrank.com/challenges/gridland-metro/problem #!/bin/python3 import math import os import random import re import sys # # Complete the 'gridlandMetro' function below. # # The function is expected to return an INTEGER. # The function accepts following parameters: # 1. INTEGER n # 2. INTEGER m # 3....
21.78
62
0.56933
dccae90a6f716e3cb12f9ab58f0392b5a828ff7a
4,771
py
Python
tests/form.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
tests/form.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
tests/form.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
import urllib.parse from werkzeug.datastructures import MultiDict # see https://www.w3.org/TR/html52/sec-forms.html class Form: def __init__(self, form): assert form.name == "form" # feed me BeautifulSoup <form> tags self.form = form self._action = form.get("action", "") self._m...
35.340741
83
0.536994
9faf365952bdcd430b0f8cc80c71768b3a91871c
2,865
py
Python
b01lers/2021/crypto/Unlucky_Strike/server.py
mystickev/ctf-archives
89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e
[ "MIT" ]
6
2021-04-10T10:46:01.000Z
2022-03-15T08:04:53.000Z
b01lers/2021/crypto/Unlucky_Strike/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
1
2021-05-20T03:38:52.000Z
2021-05-20T03:44:55.000Z
b01lers/2021/crypto/Unlucky_Strike/server.py
ruhan-islam/ctf-archives
8c2bf6a608c821314d1a1cfaa05a6cccef8e3103
[ "MIT" ]
3
2021-04-10T12:10:01.000Z
2021-11-05T18:05:44.000Z
from Crypto.Random import get_random_bytes from Crypto.Cipher import AES import sys, base64, time from proprietary_data import * def pkcs7(msg): padlen = 16 - (len(msg) & 0xf) return msg + bytes([padlen]*padlen) def unpkcs7(padded): while True: if (len(padded) & 0xf) != 0 or len(padded) == 0: break ...
32.931034
106
0.5637
4cc5861d97e032211db2db704324e557ae4b354b
356
py
Python
Curso-Em-Video-Python/2Exercicios/055_maior_e_menor_peso.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/055_maior_e_menor_peso.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
Curso-Em-Video-Python/2Exercicios/055_maior_e_menor_peso.py
pedrohd21/Cursos-Feitos
b223aad83867bfa45ad161d133e33c2c200d42bd
[ "MIT" ]
null
null
null
maior = 0 menor =0 for c in range(1, 6): peso = float(input('Peso da {}° pessoa: '.format(c))) if c == 1: maior = peso menor = peso else: if peso > maior: maior = peso if peso < menor: menor = peso print('O maior peso é {:.2f}'.format(maior)) print('O ...
23.733333
57
0.511236
e2c6f859b3bdcb7ebdb31584e67072917a228ef9
2,988
py
Python
listGenerator.py
phil1425/gs2quiz
3d6b40744217be5b4fb634cd65a403042b0132ee
[ "MIT" ]
null
null
null
listGenerator.py
phil1425/gs2quiz
3d6b40744217be5b4fb634cd65a403042b0132ee
[ "MIT" ]
null
null
null
listGenerator.py
phil1425/gs2quiz
3d6b40744217be5b4fb634cd65a403042b0132ee
[ "MIT" ]
null
null
null
#program to create a javascript object containing all question of the quiz import re questions = open('questions.txt','r') result = open('myQuestions.txt','w') question = '' answerA = '' answerB = '' answerC = '' answerD = '' ans = '' result.write('var myQuestions = [\n') l = questions.readline() while True: if...
29.009709
127
0.489625
1aafa1683a4ef0050bd321a40127a2e58fa69477
192
py
Python
blog/users/urls.py
XksA-me/brief_blog
6473175f2d91e3f103de4dcb743a00576d0493c0
[ "MIT" ]
1
2021-09-06T04:21:40.000Z
2021-09-06T04:21:40.000Z
blog/users/urls.py
XksA-me/brief_blog
6473175f2d91e3f103de4dcb743a00576d0493c0
[ "MIT" ]
null
null
null
blog/users/urls.py
XksA-me/brief_blog
6473175f2d91e3f103de4dcb743a00576d0493c0
[ "MIT" ]
null
null
null
# 进行users 子应用的视图路由 from django.urls import path from . import views urlpatterns = [ # 第一个参数:路由 # 第二个参数:视图函数名 path('register/', views.RegisterView.as_view(), name='register'), ]
16
69
0.677083
46f0abf30367974edb939971c051dbd1916920fb
1,811
py
Python
plannung.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
1
2022-02-23T20:18:35.000Z
2022-02-23T20:18:35.000Z
plannung.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
null
null
null
plannung.py
caxenie/oom-oop-intro
e70cd2ab8067b4d81001b7491deab9e029eefd3d
[ "MIT" ]
null
null
null
import random MIN_EBENE = 1.4 MAX_EBENE = 2.5 class StahlProzessPlannung(object): def __init__(self, a, n, g): self.prozessGliederAnzahl = a self.prozessGliederName = n self.prozessGlieder = g def getProzessGliederAnzahl(self): return self.prozessGliederAnzahl ...
34.169811
120
0.630591
3739ed723351c5b1e4d8bed43757acd3e8c45335
8,423
py
Python
wz/datatable-editor.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/datatable-editor.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
wz/datatable-editor.py
gradgrind/WZ
672d93a3c9d7806194d16d6d5b9175e4046bd068
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ datatable-editor.py Last updated: 2021-10-21 Gui editor for "DataTables". =+LICENCE================================= Copyright 2021 Michael Towers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. Yo...
35.242678
76
0.630179
373ec7b165b32a3b992ee182cdbf9edf74ec5bd3
2,207
py
Python
biofid-Toolkit/BIOfid-Toolkit.py
texttechnologylab/AbbyyViewer
83256858202f4c82d11b6d44cc9aac609038bca9
[ "Apache-2.0" ]
null
null
null
biofid-Toolkit/BIOfid-Toolkit.py
texttechnologylab/AbbyyViewer
83256858202f4c82d11b6d44cc9aac609038bca9
[ "Apache-2.0" ]
6
2021-03-10T01:02:38.000Z
2022-02-26T20:55:19.000Z
biofid-Toolkit/BIOfid-Toolkit.py
texttechnologylab/AbbyyViewer
83256858202f4c82d11b6d44cc9aac609038bca9
[ "Apache-2.0" ]
null
null
null
import BlockRemover import HypernymPredictor import HypernymTrainingSetCreator # Print some hints print("\nBIOfid Toolkit\n") print("WARNING: This toolkit works only for Abbyy FineReader, Version 8.0\n") print("This toolkit provides two tools for the work with the Abbyy FineReader") print("output file format:\n") pri...
36.180328
183
0.666516
375b5aa8252cbca339cf0dcea65788228a918bc7
1,673
py
Python
twitter_bot/bot.py
Jonathannsegal/map_tab
950ee207686fd417484f7fac5b688ee02e6fe7a6
[ "MIT" ]
3
2020-09-21T17:57:06.000Z
2021-06-09T01:21:06.000Z
twitter_bot/bot.py
Jonathannsegal/map_tab
950ee207686fd417484f7fac5b688ee02e6fe7a6
[ "MIT" ]
22
2020-07-21T11:02:13.000Z
2022-03-27T02:05:39.000Z
twitter_bot/bot.py
Jonathannsegal/map_tab
950ee207686fd417484f7fac5b688ee02e6fe7a6
[ "MIT" ]
null
null
null
import tweepy import wikipedia import time from keys import * auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_KEY, ACCESS_SECRET) api = tweepy.API(auth) FILE_NAME = 'last_seen_id.txt' def retrieve_last_seen_id(file_name): f_read = open(file_name, 'r') last_seen_id = int...
33.46
120
0.642558
3774279a613d71531be302fd682950cbf6c8e0e7
391
py
Python
1_BasicFeatures/Logic/operators.py
felixdittrich92/Python3
16b767465e4bdf0adc652c195d15384bb9faa4cf
[ "MIT" ]
1
2022-03-02T07:16:30.000Z
2022-03-02T07:16:30.000Z
1_BasicFeatures/Logic/operators.py
felixdittrich92/Python3
16b767465e4bdf0adc652c195d15384bb9faa4cf
[ "MIT" ]
null
null
null
1_BasicFeatures/Logic/operators.py
felixdittrich92/Python3
16b767465e4bdf0adc652c195d15384bb9faa4cf
[ "MIT" ]
null
null
null
# boolesche Operatoren: and, or, not # Vergleichsoperatoren: <, >, <=, =>, ==, != # Reihenfolge der Operationen: # 1.) () # 2.) Vergleichsoperationen # 3.) boolesche Operationen (Reihenfolge beim auswerten: 1. not 2. and 3. or) a = True b = False c = True statement = a > b and c == a or not a and c print(statement) ...
23
77
0.631714
2fb73f435f891ecb007309e6ff4e6cb246db76ee
11,871
py
Python
scripts/fig1_and_fig2.py
gavstrik/BC
2085872f1ff4241dcf4a5ef64eaa0601fb8ac454
[ "MIT" ]
null
null
null
scripts/fig1_and_fig2.py
gavstrik/BC
2085872f1ff4241dcf4a5ef64eaa0601fb8ac454
[ "MIT" ]
null
null
null
scripts/fig1_and_fig2.py
gavstrik/BC
2085872f1ff4241dcf4a5ef64eaa0601fb8ac454
[ "MIT" ]
null
null
null
import os import numpy as np import pandas as pd from scipy.stats import mode, ks_2samp, mannwhitneyu, shapiro, pearsonr, kstest import matplotlib.pyplot as plt from matplotlib import style import matplotlib.mlab as mlab from statsmodels.graphics.gofplots import qqplot from tabulate import tabulate import random from c...
41.506993
161
0.621852
4435c69a4fa62da9fa875661ed216248e13e23b5
3,037
py
Python
docs/moxing_api_doc/scripts/mox_flowers.py
hellfire0831/ModelArts-Lab
3e826a5b388244c0588b7bb916184750997ab272
[ "Apache-2.0" ]
1,045
2019-05-09T02:50:43.000Z
2022-03-31T06:22:11.000Z
docs/moxing_api_doc/scripts/mox_flowers.py
hellfire0831/ModelArts-Lab
3e826a5b388244c0588b7bb916184750997ab272
[ "Apache-2.0" ]
1,468
2019-05-16T00:48:18.000Z
2022-03-08T04:12:44.000Z
docs/moxing_api_doc/scripts/mox_flowers.py
hellfire0831/ModelArts-Lab
3e826a5b388244c0588b7bb916184750997ab272
[ "Apache-2.0" ]
1,077
2019-05-09T02:50:53.000Z
2022-03-27T11:05:32.000Z
# encoding: utf-8 import sys import tensorflow as tf from tensorflow.contrib import slim import moxing.tensorflow as mox from moxing.tensorflow.optimizer import learning_rate_scheduler tf.flags.DEFINE_string('data_url', None, 'Necessary. dataset dir') tf.flags.DEFINE_string('train_url', None, 'Optional. train_dir') ...
38.443038
106
0.636813
2b9deb31be915a9d01ea03c60c1f9ab6696e07fd
6,645
py
Python
Keith/Geodatenhandling 2 L.py
FabianV1984/TheMostDangerousSwissRoad
e5ffdb6fae39c60d8b5d6247e9d2839f8103df98
[ "MIT" ]
null
null
null
Keith/Geodatenhandling 2 L.py
FabianV1984/TheMostDangerousSwissRoad
e5ffdb6fae39c60d8b5d6247e9d2839f8103df98
[ "MIT" ]
null
null
null
Keith/Geodatenhandling 2 L.py
FabianV1984/TheMostDangerousSwissRoad
e5ffdb6fae39c60d8b5d6247e9d2839f8103df98
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Geodatenhandling 2 # # **Inhalt:** Geopandas für Fortgeschrittene # # **Nötige Skills** # - Basic pandas skills # - Funktionen und pandas # - Erste Schritte mit Geopandas # - Geodatenhandling 1 # # **Lernziele** # - Punkte, Linien, Polygone revisited # - Eigenschaften von g...
16.44802
225
0.694658
a650296be56e6c33610250a03a63316983bc9251
281
py
Python
922-sort-array-by-parity-ii/922-sort-array-by-parity-ii.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
2
2021-12-05T14:29:06.000Z
2022-01-01T05:46:13.000Z
922-sort-array-by-parity-ii/922-sort-array-by-parity-ii.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
922-sort-array-by-parity-ii/922-sort-array-by-parity-ii.py
hyeseonko/LeetCode
48dfc93f1638e13041d8ce1420517a886abbdc77
[ "MIT" ]
null
null
null
class Solution: def sortArrayByParityII(self, nums: List[int]) -> List[int]: even = [num for num in nums if num%2==0] odd = [num for num in nums if num%2==1] output=[None]*len(nums) output[::2]=even output[1::2]=odd return output
35.125
64
0.565836
4722895265b3bfa1962e959de9dfdbe3ced6d1fc
5,425
py
Python
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/weight_init.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
5
2022-01-30T07:35:58.000Z
2022-02-08T05:45:20.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/weight_init.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-01-14T02:33:28.000Z
2022-01-14T02:33:28.000Z
Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/weight_init.py
linuxonly801/awesome-DeepLearning
b063757fa130c4d56aea5cce2e592610f1e169f9
[ "Apache-2.0" ]
1
2022-03-07T10:51:21.000Z
2022-03-07T10:51:21.000Z
# Copyright (c) 2020 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 applic...
34.335443
92
0.611982
5b5dfb7eae3e70637e3a76e8dbcfdb622ccc1b59
279
py
Python
Tutorials/10 Days of Statistics/Day 6/central_limit_theorem1.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
1
2021-02-22T17:37:45.000Z
2021-02-22T17:37:45.000Z
Tutorials/10 Days of Statistics/Day 6/central_limit_theorem1.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
Tutorials/10 Days of Statistics/Day 6/central_limit_theorem1.py
xuedong/hacker-rank
ce8a60f80c2c6935b427f9409d7e826ee0d26a89
[ "MIT" ]
null
null
null
#!/bin/python3 import sys from math import erf, sqrt def phi(x, mu, std): return (1.0 + erf((x-mu) / (std*sqrt(2.0)))) / 2.0 total = float(input()) number = float(input()) mu = float(input()) std = float(input()) print(round(phi(total, number*mu, sqrt(number)*std), 4))
17.4375
56
0.620072
5ba682d120ac34578c0eb94e49469e4b523b5685
348
py
Python
project/cli/user.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
project/cli/user.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
35
2022-01-24T22:15:59.000Z
2022-03-31T15:01:35.000Z
project/cli/user.py
DanielGrams/cityservice
c487c34b5ba6541dcb441fe903ab2012c2256893
[ "MIT" ]
null
null
null
import click from flask.cli import AppGroup from project import app from project.services.user import delete_old_anonymous_users user_cli = AppGroup("user") @user_cli.command("delete-old-anonymous") def delete_old_anonymous(): delete_old_anonymous_users() click.echo("Old anonymous users were deleted.") ap...
20.470588
60
0.793103
5bb1d6ab7f961b0d5f1dfed5ea16738799301145
1,018
py
Python
kNearestNeighbour.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-03-28T11:50:45.000Z
2020-12-08T13:36:26.000Z
kNearestNeighbour.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-04-20T11:12:59.000Z
2020-05-11T05:37:36.000Z
kNearestNeighbour.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
null
null
null
from IProcess import IProcess, EDataType class kNearestNeighbour(IProcess): def __init__(self): IProcess.__init__(self) def getType(self): return EDataType.KNN # Assuming imageData.data are the (n - 1) images. # The image to check against is the imageData itself. def do(self, imageData): IProcess.do(self...
24.829268
75
0.710216
751d13e2914c22c087608816c477e3e4fa97dc5c
315
py
Python
Problems/Two Pointers/easy/ShortestDistanceToACharacter/test_shortest_distance_to_character.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Two Pointers/easy/ShortestDistanceToACharacter/test_shortest_distance_to_character.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Two Pointers/easy/ShortestDistanceToACharacter/test_shortest_distance_to_character.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from unittest import TestCase from shortest_distance_to_character import shortestToChar class Test(TestCase): def test_shortest_to_char(self): self.assertEqual(shortestToChar("loveleetcode", "e"), [3, 2, 1, 0, 1, 0, 0, 1, 2, 2, 1, 0]) self.assertEqual(shortestToChar("aaab", "b"), [3, 2, 1, 0])
45
99
0.688889
f37d8d835f04d7fc8a731f98c0c7a1ecaa247537
1,184
py
Python
tools/pythonpkg/tests/fast/pandas/test_timestamp.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/tests/fast/pandas/test_timestamp.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/tests/fast/pandas/test_timestamp.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import duckdb import os import datetime import pytest import pandas as pd class TestPandasTimestamps(object): def test_timestamp_types_roundtrip(self, duckdb_cursor): d = {'a': [pd.Timestamp(datetime.datetime.now(), unit='s')], 'b': [pd.Timestamp(datetime.datetime.now(), unit='ms')], 'c': [pd.Timestamp(dat...
51.478261
239
0.636824
f380524e210c627d2daceac12b5ae0a1930ab8af
6,545
py
Python
labeldcm/module/static.py
hyh520/label-dcm
07f8257dcc52b827fcb6d1dec311b532c3ae8925
[ "MIT" ]
1
2021-12-20T11:06:42.000Z
2021-12-20T11:06:42.000Z
labeldcm/module/static.py
hyh520/label-dcm
07f8257dcc52b827fcb6d1dec311b532c3ae8925
[ "MIT" ]
null
null
null
labeldcm/module/static.py
hyh520/label-dcm
07f8257dcc52b827fcb6d1dec311b532c3ae8925
[ "MIT" ]
null
null
null
from labeldcm.module.config import config import math import numpy import os from PIL import Image from pydicom import dcmread from PyQt5.QtCore import QPointF, QRectF # 判断文件是否可读 def isImgAccess(imgDir: str): return os.access(imgDir, os.R_OK) def toDate(date: str): return date[0:4] + '年' + date[4:6] + '月' + d...
36.977401
108
0.571734
342b19d8b6463a0fc03495eebc5a01710b657e52
235
py
Python
Lab5/quadratic.py
ishaanx/Labs
9080e052a1655af28f14fcf3e777bf2a994f6543
[ "MIT" ]
null
null
null
Lab5/quadratic.py
ishaanx/Labs
9080e052a1655af28f14fcf3e777bf2a994f6543
[ "MIT" ]
null
null
null
Lab5/quadratic.py
ishaanx/Labs
9080e052a1655af28f14fcf3e777bf2a994f6543
[ "MIT" ]
null
null
null
import cmath a = 1 b = 2 c = 3 #Discriminant calculation d = (b**2) - (4*a*c) #calculate square root using cmath sol1 = -b-cmath.sqrt(d)/(2*a) sol2 = -b+cmath.sqrt(d)/(2*a) print("The solutions are {0} and {1}".format(sol1,sol2))
14.6875
56
0.629787
1b70ad9ba1ee003c1ca3da488d2a4165557dfefe
155
py
Python
PYTHON/Basic_Data_Types/find_the_second_largest_number.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Basic_Data_Types/find_the_second_largest_number.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
PYTHON/Basic_Data_Types/find_the_second_largest_number.py
byung-u/HackerRank
4c02fefff7002b3af774b99ebf8d40f149f9d163
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys if __name__ == '__main__': n = int(input()) L = sorted(list(set(map(int, input().split())))) print(L[-2])
15.5
52
0.574194
8468beb3ea8e8414fd47805bb79f91cffd785c05
8,583
py
Python
plotting/scripts/plot_threshold.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
plotting/scripts/plot_threshold.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
plotting/scripts/plot_threshold.py
metxchris/MMM-Explorer
251b4d7af56241882611bc47e94ec2923e4be8da
[ "MIT" ]
null
null
null
#!/usr/bin/python3 """Plot growth rate thresholds from threshold scans This script is a mess. """ # Standard Packages import sys; sys.path.insert(0, '../'); sys.path.insert(0, '../../') import logging # 3rd Party Packages import numpy as np from PyQt5.QtGui import QImage from PyQt5.QtWidgets import QApplication # ...
39.736111
123
0.649307
04cf343ea69e6e67dfccac54f40db8b03819718b
2,255
py
Python
qmk_firmware/keyboards/dekunukem/duckypad/keymaps/m4cs/sysinfo.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
qmk_firmware/keyboards/dekunukem/duckypad/keymaps/m4cs/sysinfo.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
qmk_firmware/keyboards/dekunukem/duckypad/keymaps/m4cs/sysinfo.py
DanTupi/personal_setup
911b4951e4d8b78d6ea8ca335229e2e970fda871
[ "MIT" ]
null
null
null
### # M4cs Keymap for dekuNukem/duckyPad QMK firmware # Copyright (C) 2020 Max Bridgland # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
28.544304
108
0.695787
8e1eca52d87ef1e762b6baa0f2645702a695c9a0
804
py
Python
doc/examples/bench_row_sum/row_sum_jit.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/examples/bench_row_sum/row_sum_jit.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/examples/bench_row_sum/row_sum_jit.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
import numpy as np from transonic import jit @jit(native=True, xsimd=True) def row_sum(arr, columns): return arr.T[columns].sum(0) @jit(native=True, xsimd=True) def row_sum_loops(arr, columns): res = np.empty(arr.shape[0], dtype=arr.dtype) for i in range(arr.shape[0]): sum_ = 0 for j in...
22.333333
52
0.656716
ed8d4761933f8c4c51759897474f62ddea2c7f48
868
py
Python
Code/mvn.py
knirschl/Proseminar-Anthropomatik
0408e54cf220c40a6f3deae6ae8d38c5f1f4f387
[ "MIT" ]
null
null
null
Code/mvn.py
knirschl/Proseminar-Anthropomatik
0408e54cf220c40a6f3deae6ae8d38c5f1f4f387
[ "MIT" ]
null
null
null
Code/mvn.py
knirschl/Proseminar-Anthropomatik
0408e54cf220c40a6f3deae6ae8d38c5f1f4f387
[ "MIT" ]
null
null
null
import numpy as np ONE_HALF = 0.5 PI2 = 2 * np.pi ''' Stack two arrays together as x, y value ''' def stack(L, L_): return np.stack((L, L_), axis=0) def exp(x, mu, cov) -> np.double: x_min_mu = x - mu x_min_mu_T = np.transpose(x_min_mu) cov_inv = np.linalg.inv(cov) return np.exp(-ONE_HALF * np....
24.8
73
0.565668
edb5844e982efdd4691c44c60836089d8e2407fb
381
py
Python
server/bumf/api/views/__init__.py
bumfiness/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
6
2017-01-07T17:59:46.000Z
2017-02-10T13:19:46.000Z
server/bumf/api/views/__init__.py
rixx/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
null
null
null
server/bumf/api/views/__init__.py
rixx/bumf
71c404c0a8f804b8f0e127df3de6d8916db4c660
[ "Apache-2.0" ]
null
null
null
from .account import BudgetAccountView, RealAccountView from .auth import UserView from .project import ProjectView from .transaction import ( DossierView, RealTransactionView, VirtualTransactionView, ) __all__ = [ 'BudgetAccountView', 'DossierView', 'ProjectView', 'RealAccountView', 'RealTrans...
22.411765
61
0.740157
1e7093df4a8ae10c75eb5d2bf8daf64a848318bc
200
py
Python
exercises/pt/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_01_02_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
# Importar a biblioteca spaCy import spacy # Crie um objeto nlp do Inglês nlp = spacy.blank("en") # Processe o texto doc = nlp("This is a sentence.") # Imprima o texto do documento print(doc.text)
16.666667
32
0.72
44a15e9ad03fb6d23baf5931fd69d2e7cd960c30
893
py
Python
Problems/Depth-First Search/medium/FindElementsinContaminatedBT/find_elements_contaminated_bt.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
1
2021-08-16T14:52:05.000Z
2021-08-16T14:52:05.000Z
Problems/Depth-First Search/medium/FindElementsinContaminatedBT/find_elements_contaminated_bt.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
Problems/Depth-First Search/medium/FindElementsinContaminatedBT/find_elements_contaminated_bt.py
dolong2110/Algorithm-By-Problems-Python
31ecc7367aaabdd2b0ac0af7f63ca5796d70c730
[ "MIT" ]
null
null
null
from typing import Optional # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class FindElements: def __init__(self, root: Optional[TreeNode]): self.root = root sel...
27.90625
82
0.641657
01d6234ff354def222506dde13301e02af486971
487
py
Python
doku/forms.py
xJasonxy/einsatzdoku
8af84446f99475519adaf803619f2c57174c517b
[ "MIT" ]
1
2020-07-09T16:53:45.000Z
2020-07-09T16:53:45.000Z
doku/forms.py
xJasonxy/Einsatzdoku
8af84446f99475519adaf803619f2c57174c517b
[ "MIT" ]
null
null
null
doku/forms.py
xJasonxy/Einsatzdoku
8af84446f99475519adaf803619f2c57174c517b
[ "MIT" ]
null
null
null
from django import forms from django.forms import ModelForm from django.forms.widgets import TextInput from .models import Zug, Ort class ZugForm(ModelForm): class Meta: model = Zug fields = '__all__' widgets = { 'Farbe': TextInput(attrs={'type': 'color'}), } class Or...
22.136364
56
0.579055
177dd34268fbf5dd956f25a2ac1f4633d114773f
12,358
py
Python
ui/form.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
ui/form.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
null
null
null
ui/form.py
MakiseVon/LabelDcm
f220ec182cae4cd64167399e28ebe7d9442f28b2
[ "MIT" ]
2
2021-02-03T04:34:26.000Z
2021-02-03T06:32:48.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'form.ui' # # Created by: PyQt5 UI code generator 5.15.2 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui, ...
55.169643
108
0.722285
bd8cb8414bd2f834faf832990326f64cc5bfb01f
1,298
py
Python
codeit/oop/single_response_principle/student.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/oop/single_response_principle/student.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
codeit/oop/single_response_principle/student.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
class Student: def __init__(self, name, id, major): self.name = name self.id = id self.major = major self.grades = GradeManager() def change_student_info(self, new_name, new_id, new_major): """학생 기본 정보 수정 메소드""" self.name = new_name self.id = new_id ...
24.490566
63
0.583975
bdf930b246ccbfb3e0ca60d11b633bd173155870
11,705
py
Python
SBTK_League_Helper/user_interfaces/__DEPRECATED/console_ui/mock_widgets/drawing.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/user_interfaces/__DEPRECATED/console_ui/mock_widgets/drawing.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
SBTK_League_Helper/user_interfaces/__DEPRECATED/console_ui/mock_widgets/drawing.py
juanchodepisa/sbtk
7cba7748e75a02b491e551d6c1be9bd7987c5051
[ "MIT" ]
null
null
null
from math import floor from src import class_initializer from src.tools.markers import AdHocMarker # ┌─┬┐ # │ ││ # ├─┼┤ # └─┴┘ # ("simple border", "CP850") # ╔═╦╗ # ║ ║║ # ╠═╬╣ # ╚═╩╝ # ("double border", "CP850") # +-++ # | || NOT YET SUPPORTED # +-++ # +-++ # . ,. # \ / \ / \ / # \ / X )( o...
31.893733
124
0.548056
0063a67174f864493c429a8cfce91e15dcfa3371
56,664
py
Python
SIMBF-main/SIMBF.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-17T03:35:03.000Z
2021-12-08T06:00:31.000Z
SIMBF-main/SIMBF.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
null
null
null
SIMBF-main/SIMBF.py
Zusyaku/Termux-And-Lali-Linux-V2
b1a1b0841d22d4bf2cc7932b72716d55f070871e
[ "Apache-2.0" ]
2
2021-11-05T18:07:48.000Z
2022-02-24T21:25:07.000Z
#Compiled By xNot_Found #Github : https://github.com/hatakecnk import marshal exec(marshal.loads('c\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00@\x00\x00\x00s\x15\x03\x00\x00d\x00\x00d\x01\x00l\x00\x00Z\x00\x00d\x00\x00d\x01\x00l\x01\x00Z\x01\x00d\x00\x00d\x01\x00l\x02\x00Z\x02\x00d\x00\x00d\x01\x00l\x03\x00Z\x03\x0...
14,166
56,586
0.748553
c14b62892a592b9567c8af9aaccc68aa099ee998
5,670
py
Python
run.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-03-28T11:50:45.000Z
2020-12-08T13:36:26.000Z
run.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
2
2020-04-20T11:12:59.000Z
2020-05-11T05:37:36.000Z
run.py
FrieAT/MD_CompressedWavelet
82bd10edd611485cd5f0b81da744e07a3b7c98eb
[ "MIT" ]
null
null
null
#!/usr/local/bin/python3.8 from ImageData import OrigPic, WaveletPic, ScanAssets, StationaryWaveletPic, CropImageByClass, DTCWaveletPic from FVExtraction import FVExtraction from AssetPreperation import AssetPreperation from ImageData import LOOCV, EuclideanDistance, kNearestNeighbour, PipelineManager, CachedFile, Tar...
33.75
131
0.661199
c1769224252730c84c90f3967671b3e1cc1bc33f
1,190
py
Python
Versuch2/task3.2.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch2/task3.2.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
null
null
null
Versuch2/task3.2.py
Tobias-Schoch/SSS
f8b078ca7f6482fc7c89d5f9e784a549459eefb7
[ "MIT" ]
1
2022-01-06T12:47:53.000Z
2022-01-06T12:47:53.000Z
import numpy as np import cv2 # -------- Aufgabe3.2 -------- # # Vektor um die Werte der Subtraktion zu speichern white_minus_black = np.zeros((480, 640)) # Weiß und Schwarz einlesen whiteavg = cv2.imread('data/whiteaverage.png') blackavg = cv2.imread('data/blackaverage.png') image = cv2.imread("data/whiteminusblack...
29.02439
62
0.698319
c1bae1c46abc433950e8ebc0edf3d7cad70b1538
209
py
Python
presenter/errors.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
presenter/errors.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
presenter/errors.py
Limatationz/pandemiesimulator
91d21fda2f9c77d616a9e9401271fc044b421007
[ "MIT" ]
null
null
null
""" Element of the presenter. Contains the error classes. """ class InfectionError(LookupError): """InfectionError is raised when the number of infected people is higher then the total number"""
23.222222
101
0.722488
41cf04b651e73ac515bb844d0ac89d001c758a23
107
py
Python
matbench/__init__.py
sparks-baird/matbench
4424609454286e32fff2bcc724379b2a316c5a76
[ "MIT" ]
15
2021-11-01T09:02:19.000Z
2022-03-19T10:59:41.000Z
matbench/__init__.py
sparks-baird/matbench
4424609454286e32fff2bcc724379b2a316c5a76
[ "MIT" ]
62
2021-09-20T14:09:59.000Z
2022-03-30T19:03:22.000Z
matbench/__init__.py
ardunn/matbench
7d11a2d63766339ec00e610e2255be29b81544d3
[ "MIT" ]
4
2021-03-22T10:37:42.000Z
2021-07-20T14:11:28.000Z
from matbench.bench import MatbenchBenchmark from matbench.constants import VERSION __version__ = VERSION
21.4
44
0.859813
6b76fd54c561a22d5a6cb68a20d9ae44704f33d3
3,354
py
Python
tests/test_query.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
tests/test_query.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
16
2017-09-13T10:21:40.000Z
2020-06-01T04:32:22.000Z
tests/test_query.py
goosechooser/benwaonline
e2879412aa6c3c230d25cd60072445165517b6b6
[ "MIT" ]
null
null
null
import pytest from marshmallow import pprint from benwaonline.entities import User, Tag, Post from benwaonline.query import Query, EntityQuery, Criteria, Or, And, EntityCriteria def test_or(): c = Criteria('eq', 'username', 'Benwa Benwa Benwa') c2 = Criteria('eq', 'username', 'Another Benwa Benwa') q = Que...
23.131034
83
0.491652
d42cab9a89ea284512eeef6779a26bb9b3aa41d4
290
py
Python
Programming Languages/Python/Theory/100_Python_Challenges/Section_3_List/63. return the missing number in a list containing elements from 1-100.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/63. return the missing number in a list containing elements from 1-100.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/63. return the missing number in a list containing elements from 1-100.py
Sid-1164/Resources
3987dcaeddc8825f9bc79609ff26094282b8ece1
[ "MIT" ]
38
2022-01-12T11:56:16.000Z
2022-03-23T10:07:52.000Z
""" Write a function that finds the missing element in a list containing elements from 1 - 100. """ def missing_num(input_list): lst = 0 for i in range(1, 100): if i not in input_list: i = float(i) lst = lst + i return lst
20.714286
91
0.541379
d87e07107842835b5a37c3940b26b598641222bf
3,564
py
Python
packages/watchmen-rest-doll/src/watchmen_rest_doll/meta_import/connected_space_import_router.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest-doll/src/watchmen_rest_doll/meta_import/connected_space_import_router.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-rest-doll/src/watchmen_rest_doll/meta_import/connected_space_import_router.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from typing import Callable, List, Optional from fastapi import APIRouter, Depends from starlette.responses import Response from watchmen_auth import PrincipalService from watchmen_meta.admin import SpaceService from watchmen_meta.common import ask_meta_storage, ask_snowflake_generator from watchmen_meta.console impo...
40.5
109
0.834175
d8c9143534cd069b3f06fa3a5d3553b497a2595f
3,599
py
Python
src/ztc/pgsql/pgcluster.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
src/ztc/pgsql/pgcluster.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
src/ztc/pgsql/pgcluster.py
magistersart/ZTC_fork
ce72734ea575d9846b5b81f3efbfd14fa1f7e532
[ "PostgreSQL" ]
null
null
null
#!/usr/bin/env python #pylint: disable-msg=W0232 """PgCluster ZTCCheck Used to perform database-wide checks (like querying each database of the cluster) Copyright (c) pg_check.pl authors Copyright (c) 2010-2011 Vladimir Rusinov <vladimir@greenmice.info> Copyright (c) 2011 Wrike, Inc. [http://www.wrike.com] """ import...
34.605769
79
0.534871
d8f4c87d4a80b6523ffe7e37231404bcc0d60c45
1,294
py
Python
methods/transformers/tests/test_pipelines_text_generation.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
3
2021-07-06T20:02:31.000Z
2022-03-27T13:13:01.000Z
methods/transformers/tests/test_pipelines_text_generation.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
methods/transformers/tests/test_pipelines_text_generation.py
INK-USC/RiddleSense
a3d57eaf084da9cf6b77692c608e2cd2870fbd97
[ "MIT" ]
null
null
null
import unittest from transformers import pipeline from .test_pipelines_common import MonoInputPipelineCommonMixin class TextGenerationPipelineTests(MonoInputPipelineCommonMixin, unittest.TestCase): pipeline_task = "text-generation" pipeline_running_kwargs = {"prefix": "This is "} small_models ...
43.133333
89
0.676971
997046a07864cd271542fcd523023b2f7d0ea011
1,193
py
Python
books/PythonAutomate/file_organize/backup_to_zip.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/file_organize/backup_to_zip.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
books/PythonAutomate/file_organize/backup_to_zip.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
# backup_to_zip.py - Copies an entire folder and its contents into # a ZIP file whose filename increments import os import zipfile def backup_to_zip(folder): # Back up the entire contents of "folder" into a ZIP file # Figure out the filename this code should use based on what files already exist ...
30.589744
85
0.637049
5aaec088bfba9727f462ab439d079b26b8e6e133
155
py
Python
template/python-application/PythonApplication.py
gbesancon/projects
7a9da629dddcf21fbe5c043d86b00036f80cbe14
[ "MIT" ]
null
null
null
template/python-application/PythonApplication.py
gbesancon/projects
7a9da629dddcf21fbe5c043d86b00036f80cbe14
[ "MIT" ]
1
2022-03-02T10:43:58.000Z
2022-03-02T10:43:58.000Z
template/python-application/PythonApplication.py
gbesancon/projects
7a9da629dddcf21fbe5c043d86b00036f80cbe14
[ "MIT" ]
null
null
null
""" Python Application """ import sys import pa def main(args): pa.PythonApplication().main(args) if __name__ == "__main__": main(sys.argv[1:])
11.923077
37
0.658065
5c5c36792528094675aa4830f295caadc6c17342
1,925
py
Python
src/fibonacci/fibonacci.py
jwvg0425/DSAndAlgo3
173ccf717b84610def861854736c3b16a57ac727
[ "MIT" ]
null
null
null
src/fibonacci/fibonacci.py
jwvg0425/DSAndAlgo3
173ccf717b84610def861854736c3b16a57ac727
[ "MIT" ]
null
null
null
src/fibonacci/fibonacci.py
jwvg0425/DSAndAlgo3
173ccf717b84610def861854736c3b16a57ac727
[ "MIT" ]
null
null
null
def fibonacci(n): if n < 2: return n else: return fibonacci(n-1) + fibonacci(n-2) def fibonacci_memo(n, memo): if memo[n] != -1: return memo[n] if n < 2: memo[n] = n else: memo[n] = fibonacci_memo(n-1,memo) + fibonacci_memo(n-2,memo) return memo[n] ...
24.367089
69
0.492468
5cde617f0f2863535e47a7ba748ae7ceff702ac0
101
py
Python
agspiel/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2021-03-09T21:37:41.000Z
2021-03-09T21:37:41.000Z
agspiel/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
4
2020-11-13T19:34:58.000Z
2021-07-24T16:25:27.000Z
agspiel/__init__.py
KingKevin23/agspiel-python-api
33e74ff6bee2f9ce353da757bdb99e929acc1a13
[ "MIT" ]
1
2020-08-24T14:38:18.000Z
2020-08-24T14:38:18.000Z
# Copyright (c) 2020 | KingKevin23 (@kingkevin023) from . import api, utils __all__ = [api, utils]
20.2
51
0.693069
7a2fc3701ebfb3e0cccd43f0e95c33f0f81b9b38
478
py
Python
exercises/pt/solution_03_09_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_03_09_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
exercises/pt/solution_03_09_01.py
tuanducdesign/spacy-course
f8d092c5fa2997fccb3f367d174dce8667932b3d
[ "MIT" ]
null
null
null
import spacy from spacy.tokens import Token nlp = spacy.blank("pt") # Definir o atributo "is_country" com o valor padrão como falso (False) Token.set_extension("is_country", default=False) # Processar o texto e atribuir o atributo is_country com valor verdadeiro (True) para o token "Spain" doc = nlp("Eu moro na Espa...
31.866667
101
0.75523
8f7a9bb6f72fa75777367a8b8df426e9896d8f36
5,115
py
Python
research/cv/DBPN/src/util/config.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/DBPN/src/util/config.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/DBPN/src/util/config.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...
68.2
120
0.692473
56f65aeeed396becec6e44dc3beac20c6ff5a4e9
269
pyde
Python
sketches/randomCircles/randomCircles.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/randomCircles/randomCircles.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/randomCircles/randomCircles.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
def setup(): size(400, 400) frame.setTitle("Konfetti!") background(0) def draw(): x = random(width) y = random(height) dia = random(5, 25) r = random(255) g = random(255) b = random(255) fill(r, g, b) ellipse(x, y, dia, dia)
19.214286
31
0.542751
85c084193393a3d8af6a1ace0a897e0365cc3ad0
20,920
py
Python
GitMiner/GitMiner.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
4
2021-04-23T15:39:17.000Z
2021-12-27T22:53:24.000Z
GitMiner/GitMiner.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
null
null
null
GitMiner/GitMiner.py
Unam3dd/Train-2018-2020
afb6ae70fe338cbe55a21b74648d91996b818fa2
[ "MIT" ]
2
2021-04-19T08:28:54.000Z
2022-01-19T13:23:29.000Z
#!/usr/bin/python2 #-*- coding:utf-8 -*- import json import time import threading import platform import logging import os import sys import subprocess import shlex try: import requests except ImportError: print('[*] Error Requests Module Not Found !') try: from datetime import datetime except ImportErro...
45.37961
162
0.511998
a42169f3432615290e3ec9f4c23c3842a2ec081b
406
py
Python
doc/for_dev/cython_bugs/purepy_nogil/pure_wo_pxd_ccall.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
88
2019-01-08T16:39:08.000Z
2022-02-06T14:19:23.000Z
doc/for_dev/cython_bugs/purepy_nogil/pure_wo_pxd_ccall.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
13
2019-06-20T15:53:10.000Z
2021-02-09T11:03:29.000Z
doc/for_dev/cython_bugs/purepy_nogil/pure_wo_pxd_ccall.py
fluiddyn/transonic
a460e9f6d1139f79b668cb3306d1e8a7e190b72d
[ "BSD-3-Clause" ]
1
2019-11-05T03:03:14.000Z
2019-11-05T03:03:14.000Z
# cython: language_level=3 import cython @cython.ccall @cython.inline @cython.returns(cython.int) @cython.locals(a=cython.int, b=cython.int) @cython.nogil def add(a, b): return a + b @cython.ccall @cython.locals(n=cython.int, i=Py_ssize_t, result=cython.int) def use_add(n): result = 1 with cython.nogil: ...
19.333333
61
0.674877
a451f2f63c99dfc8697b1ac6ece4dcf01aa43a01
1,193
py
Python
migrations/versions/67216b6cf293_.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
1
2021-06-01T14:49:18.000Z
2021-06-01T14:49:18.000Z
migrations/versions/67216b6cf293_.py
DanielGrams/gsevp
e94034f7b64de76f38754b56455e83092378261f
[ "MIT" ]
286
2020-12-04T14:13:00.000Z
2022-03-09T19:05:16.000Z
migrations/versions/67216b6cf293_.py
DanielGrams/gsevpt
a92f71694388e227e65ed1b24446246ee688d00e
[ "MIT" ]
null
null
null
"""empty message Revision ID: 67216b6cf293 Revises: a336ac384c64 Create Date: 2020-08-01 15:43:11.377833 """ import sqlalchemy as sa from alembic import op from project import dbtypes from project.models import EventRejectionReason, EventReviewStatus # revision identifiers, used by Alembic. revision = "67216b6cf293...
25.382979
88
0.666387
2d3f7789d5836dbc02f50efe78ee8c92933fede3
1,000
pyde
Python
sketches/hilbertkurve/hilbertkurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
4
2018-06-03T02:11:46.000Z
2021-08-18T19:55:15.000Z
sketches/hilbertkurve/hilbertkurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
null
null
null
sketches/hilbertkurve/hilbertkurve.pyde
kantel/processingpy
74aae222e46f68d1c8f06307aaede3cdae65c8ec
[ "MIT" ]
3
2019-12-23T19:12:51.000Z
2021-04-30T14:00:31.000Z
iterations = 7 stroke_len = 600 delta = 90 axiom = 'X' sentence = axiom rules = { 'X': '+YF-XFX-FY+', 'Y': '-XF+YFY+FX-', } i = 0 def setup(): global x0, y0 size(700, 700) this.surface.setTitle("Hilbert-Kurve") colorMode(HSB, 360, 100, 100) x0, y0 = 50, height - 50 strokeWeight(2) n...
19.230769
44
0.511
744ca6ecf819e056c437ced8aa22940c42da3ad0
1,201
py
Python
resources/mechanics_lib/Header.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
7
2016-01-20T02:33:00.000Z
2021-02-04T04:06:57.000Z
resources/mechanics_lib/Header.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
null
null
null
resources/mechanics_lib/Header.py
PRECISE/ROSLab
2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d
[ "Apache-2.0" ]
3
2016-10-05T07:20:30.000Z
2017-11-20T10:36:50.000Z
from api.component import Component from api.edge import * from math import sqrt from api.shapes import Rectangle class Header(Component): def defParameters(self): self.newParameter("nrows", 0) self.newParameter("ncols", 0) self.newParameter("rowsep", 2.54) self.newParameter("colsep", 2.54) ...
32.459459
80
0.609492
8eed5e66ede391b7e56082cd91efd3994089608f
8,876
py
Python
slcyMovement.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
slcyMovement.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
slcyMovement.py
mirrorcoloured/slcypi
c47975b3523f770d12a521c82e2dfca181e3f35b
[ "MIT" ]
null
null
null
# Python 3.5.1 import RPi.GPIO as GPIO import time import numpy as np import slcypi.slcyPins as Pins import slcypi.slcyGeneral as General class Servo(): """Initialize with control pin pins <dict>, <list>, <int>, {'serv':1} [name] <str>, identify this sensor [verbose] <bool>, print every action""" ...
36.377049
95
0.536503
d9912db79fc7ff77fe1a9dd18a7f2d59daee14c2
376
py
Python
apps/home/admin.py
AlcindoSchleder/dashboard
aacb847bee05368bff72853a7d1887de211bccd2
[ "MIT" ]
null
null
null
apps/home/admin.py
AlcindoSchleder/dashboard
aacb847bee05368bff72853a7d1887de211bccd2
[ "MIT" ]
4
2020-09-21T01:32:14.000Z
2020-09-21T01:32:47.000Z
apps/home/admin.py
AlcindoSchleder/dashboard
aacb847bee05368bff72853a7d1887de211bccd2
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import MarketProduct class MarketProductAdmin(admin.ModelAdmin): list_display = ('pk_product', 'product_description', 'product_stock') list_filter = ('pk_product', 'product_description', 'product_stock') search_fields = ('pk_product', 'product_description') ...
28.923077
73
0.776596
79630b8839e196ad7f6a72e593d07acd38b792fc
482
py
Python
python/asyncio/coding_dojang/urlopen.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/asyncio/coding_dojang/urlopen.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/asyncio/coding_dojang/urlopen.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
from time import time from urllib.request import Request, urlopen urls = [ "https://www.google.com/search?q=" + i for i in ["apple", "pear", "grape", "pineapple", "orange", "strawberry", "pie", "helloworld"] ] begin = time() result = [] for url in urls: request = Request(url, headers={"User-Agent": "Mozil...
24.1
97
0.636929
30d3f3ec135667a0f71a3ad788571ebec7babbe6
1,166
py
Python
BigData_exp/exp3/exp3/my_wordcloud.py
DolorHunter/hfut-exp-archived
c67e26c1f4fba550c8974eaba10dfa302b928868
[ "BSD-2-Clause" ]
12
2020-12-07T05:49:05.000Z
2022-03-25T09:09:36.000Z
BigData_exp/exp3/exp3/my_wordcloud.py
DolorHunter/hfut-exp
c67e26c1f4fba550c8974eaba10dfa302b928868
[ "BSD-2-Clause" ]
null
null
null
BigData_exp/exp3/exp3/my_wordcloud.py
DolorHunter/hfut-exp
c67e26c1f4fba550c8974eaba10dfa302b928868
[ "BSD-2-Clause" ]
1
2021-01-08T08:53:53.000Z
2021-01-08T08:53:53.000Z
from wordcloud import WordCloud as wordcloud import matplotlib.pyplot as plt import my_count # Generate WordCloud def gen_wordcloud(): my_count.count(my_count.schooltimes, my_count.schooltypestimes, my_count.schooltimes_list, my_count.schooltypestimes_list) school_dict = {} other_count...
26.5
97
0.673242
a519993592540320312d42566cf43f020f6213a5
504
py
Python
pws/filter.py
zamys/pws
b26ddb12cbbb00ef3a337d8b5a8ef7dc051d4b13
[ "MIT" ]
null
null
null
pws/filter.py
zamys/pws
b26ddb12cbbb00ef3a337d8b5a8ef7dc051d4b13
[ "MIT" ]
null
null
null
pws/filter.py
zamys/pws
b26ddb12cbbb00ef3a337d8b5a8ef7dc051d4b13
[ "MIT" ]
null
null
null
import pandas import re from tkinter import filedialog path = filedialog.askopenfilename() f = pandas.read_csv(path, encoding='unicode_escape') f.head(5) for i in range(len(f)): txt = f.loc[i]["tekst"] txt=re.sub(r'@[A-Z0-9a-z_:]+','',txt)#verwijdert gebruikersnaam tag txt=re.sub(r'^[RT]+','',txt)#verwij...
28
71
0.638889
eb4ead82bd1fa376e2323f4c55eac6d2ee487773
377
py
Python
python/coursera_python/MICHIGAN/WEB/week6/t3.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/coursera_python/MICHIGAN/WEB/week6/t3.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/coursera_python/MICHIGAN/WEB/week6/t3.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
import json import urllib location = raw_input("Enter locaiton: ") url = "http://python-data.dr-chuck.net/geojson" print "Retrieving", url params = {"sensor": False, "address": location} data = urllib.urlopen(url + "?" + urllib.urlencode(params)).read() print "Retrieved", len(data), "characters" results = json.loads(d...
31.416667
66
0.708223
eb9dfb99dbbd9000c4988cad9df9887a9967be72
2,530
py
Python
AutoFirst.py
PRJJOHN/Automation
cf78ec94300ed65429c1ec1035bef046282d18da
[ "BSD-3-Clause" ]
null
null
null
AutoFirst.py
PRJJOHN/Automation
cf78ec94300ed65429c1ec1035bef046282d18da
[ "BSD-3-Clause" ]
null
null
null
AutoFirst.py
PRJJOHN/Automation
cf78ec94300ed65429c1ec1035bef046282d18da
[ "BSD-3-Clause" ]
null
null
null
from pywinauto.application import Application ## 1: upper back ## 3: middle back 1 ## 7: middle back 2 ## 11: middle back double ## 24: lower back ## 6,14: back side tarPressure = [0.0,10.0,0.0,10.0,0.0,10.0, 0.0,10.0,0.0,0.0,0.0,10.0, 0.0,10.0,0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0...
52.708333
135
0.590119
6907c6c75910b95a895d4f34f1a51707792cccc0
390
py
Python
INBa/2015/KODZOKOV_M_M/task_6_9.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/KODZOKOV_M_M/task_6_9.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
INBa/2015/KODZOKOV_M_M/task_6_9.py
YukkaSarasti/pythonintask
eadf4245abb65f4400a3bae30a4256b4658e009c
[ "Apache-2.0" ]
null
null
null
#Создайте игру, в которой компьютер загадывает имя одного из трех поросят, а игрок должен его угадать. # Кодзоков М.М., 26.05.2016 import random pigs=("Ниф-ниф","Наф-Наф","Нуф-нуф") choice=random.choice(pigs) pg=input("Угадайте одного из трех поросят: ") while pg != choice: pg=input("Не угадали. Попробуйте еще: ") pr...
30
102
0.735897
79e8c210053f778dcc4f24520e3e793e43e1cbd2
710
py
Python
jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/BinaryTreePreorderTraversal.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2015-12-16T04:01:03.000Z
2015-12-16T04:01:03.000Z
jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/BinaryTreePreorderTraversal.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
1
2016-02-09T06:00:07.000Z
2016-02-09T07:20:13.000Z
jiuzhang/Nine Chapters/3 Binary Tree & Divide Conquer/py/BinaryTreePreorderTraversal.py
cc13ny/all-in
bc0b01e44e121ea68724da16f25f7e24386c53de
[ "MIT" ]
2
2019-06-27T09:07:26.000Z
2019-07-01T04:40:13.000Z
""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of binary tree. @return: Preorder in ArrayList which contains node values. """ def preorderTraversal(self, root)...
23.666667
62
0.543662
300003e742a3015dafc90e4c08cf8807c9805c10
3,885
py
Python
Utils/py/exportImages/ExportImages.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/exportImages/ExportImages.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
Utils/py/exportImages/ExportImages.py
tarsoly/NaoTH
dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/python import os import sys import getopt import math from naoth.LogReader import LogReader from naoth.LogReader import Parser import numpy from PIL import Image from PIL import PngImagePlugin def parse_arguments(argv): input_file = '' output_dir = None try: opts, args = getopt....
27.553191
105
0.574517
302a6c0bb7124f5b765eb66fa261ee4a3e3af450
8,758
py
Python
checklisten/views.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
8
2019-11-26T13:34:46.000Z
2021-06-21T13:41:57.000Z
checklisten/views.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
93
2019-12-16T09:29:10.000Z
2021-04-24T12:03:33.000Z
checklisten/views.py
mribrgr/StuRa-Mitgliederdatenbank
87a261d66c279ff86056e315b05e6966b79df9fa
[ "MIT" ]
2
2020-12-03T12:43:19.000Z
2020-12-22T21:48:47.000Z
from django.shortcuts import render, redirect from django.contrib import messages from django.http import HttpResponse from .models import Checkliste, ChecklisteAufgabe, ChecklisteRecht, Aufgabe from aemter.models import FunktionRecht from mitglieder.models import Mitglied, MitgliedAmt def main_screen(request): "...
47.597826
199
0.725965
30346b0a23f5afdc88a23ac95c20e75a5e803926
3,780
py
Python
v_generalize.py
sambabypapapa/CralwerSet
a76e0660c42ce7aac20b8d07ccc454b6636a8a2a
[ "Apache-2.0" ]
5
2020-08-17T08:37:16.000Z
2021-06-07T05:02:05.000Z
v_generalize.py
sambabypapapa/CralwerSet
a76e0660c42ce7aac20b8d07ccc454b6636a8a2a
[ "Apache-2.0" ]
null
null
null
v_generalize.py
sambabypapapa/CralwerSet
a76e0660c42ce7aac20b8d07ccc454b6636a8a2a
[ "Apache-2.0" ]
1
2021-06-07T05:02:10.000Z
2021-06-07T05:02:10.000Z
import CralwerSet.connect_mysql as connect_mysql import json import requests import datetime import time import random import easygui as g headers = { "Connection": "keep-alive", "User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3724.8 Safari/537.36", "Re...
52.5
1,465
0.70291
0624ebb07ac60215515302c912bd18593e43c9a8
854
py
Python
packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/connectors/handler.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/connectors/handler.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
packages/watchmen-pipeline-surface/src/watchmen_pipeline_surface/connectors/handler.py
Indexical-Metrics-Measure-Advisory/watchmen
c54ec54d9f91034a38e51fd339ba66453d2c7a6d
[ "MIT" ]
null
null
null
from watchmen_meta.common import ask_snowflake_generator from watchmen_model.admin import UserRole from watchmen_model.pipeline_kernel import PipelineTriggerDataWithPAT, PipelineTriggerTraceId from watchmen_pipeline_kernel.pipeline import try_to_invoke_pipelines from watchmen_rest import get_principal_by_pat, retrieve_...
44.947368
93
0.855972
88f331b472aef8c85f644e3b4aa69664bb05364a
11,428
py
Python
Co-Simulation/Sumo/sumo-1.7.0/tools/traci/domain.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/traci/domain.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/traci/domain.py
uruzahe/carla
940c2ab23cce1eda1ef66de35f66b42d40865fb1
[ "MIT" ]
1
2020-11-20T19:31:26.000Z
2020-11-20T19:31:26.000Z
# -*- coding: utf-8 -*- # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo # Copyright (C) 2008-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....
39.818815
113
0.656108
aea04e7414afbc1ecb5d0c27578b7652b0bc3dca
5,100
py
Python
backend/blog-app-backend/blog_app_create_index.py
hdwinkel/winkels-blog-app
7f8cce5c5ae51a6618116d2ee4da474c790ecb2e
[ "MIT" ]
null
null
null
backend/blog-app-backend/blog_app_create_index.py
hdwinkel/winkels-blog-app
7f8cce5c5ae51a6618116d2ee4da474c790ecb2e
[ "MIT" ]
13
2020-04-12T18:56:27.000Z
2022-02-26T10:50:49.000Z
backend/blog-app-backend/blog_app_create_index.py
hdwinkel/winkels-blog-app
7f8cce5c5ae51a6618116d2ee4da474c790ecb2e
[ "MIT" ]
null
null
null
import os, io import base64 import json from datetime import datetime import uuid templatename="template.html" # a Blog structure: # blogs = ["<blog>","<blog>"] # tags = [] # images = [] # blog = {"Name": "<blogname>", "Creator": "<blog-creator>", "Date": "<creation-date>", "Update": "<update-date>", "Content": "<blo...
30.538922
175
0.499804
d1a8f24a98b1e977d6e08fdc0aa75c10a6d24e6a
2,640
py
Python
m.py
ba7lnn/bravo
0856690ab6f7c292335fbd2c867293d5086b8bd6
[ "CC-BY-3.0" ]
null
null
null
m.py
ba7lnn/bravo
0856690ab6f7c292335fbd2c867293d5086b8bd6
[ "CC-BY-3.0" ]
null
null
null
m.py
ba7lnn/bravo
0856690ab6f7c292335fbd2c867293d5086b8bd6
[ "CC-BY-3.0" ]
null
null
null
#!/usr/bin/env python ''' m.py Copyright 2017 BA7LNN Contact: BA7LNN@FOXMAIL.COM This script creates tags for your Jekyll blog hosted by Github page. No plugins required. ''' ''' import glob import os post_dir = '_posts/' tag_dir = 'series/' filenames = glob.glob(post_dir + '*markdown') total_tags = [] for filen...
22.184874
112
0.642045
ae3b4397e0250242c456503f90c375b3d23bc216
23,933
py
Python
Archiv/1Main.py
inventivejon/ExSyNL
daf5b5923ed0e65107ce2904933afeba8bfa99ea
[ "Apache-2.0" ]
null
null
null
Archiv/1Main.py
inventivejon/ExSyNL
daf5b5923ed0e65107ce2904933afeba8bfa99ea
[ "Apache-2.0" ]
5
2021-05-11T02:08:51.000Z
2022-02-26T23:08:18.000Z
Archiv/1Main.py
inventivejon/ExSyL
daf5b5923ed0e65107ce2904933afeba8bfa99ea
[ "Apache-2.0" ]
null
null
null
# Prädikate # Mann # Frau # Ehepaar # Formel # Mann(X) # Frau(Y) # Ehepaar(X, Y) continueAsking = True predicates = {} predicate_equals = {} functions = [] def AddEqualsPredicate(eqPrName, predicate): global predicates global predicate_equals if predicate in predicates: for singleEqPrName in eqPr...
47.675299
183
0.581415
ee15fd984389e0517859066f61162bd44c3efd45
6,085
py
Python
src/graph_creator/graph_funcs.py
marina8888/flame-dilution-method
823c004f7f7ea85ca3e010610b61972a112cf988
[ "MIT" ]
2
2020-03-23T15:05:19.000Z
2020-03-24T02:43:07.000Z
src/graph_creator/graph_funcs.py
marina8888/flame-dilution-method
823c004f7f7ea85ca3e010610b61972a112cf988
[ "MIT" ]
1
2020-05-07T13:06:09.000Z
2020-05-07T13:06:09.000Z
src/graph_creator/graph_funcs.py
marina8888/flame-dilution-method
823c004f7f7ea85ca3e010610b61972a112cf988
[ "MIT" ]
2
2020-05-07T13:05:09.000Z
2020-05-15T16:42:02.000Z
import pandas as pd import matplotlib.pyplot as plt from excel_file.classes import Workbook import numpy as np # all functions in this file are a custom set of methods/options to use when creating a new graph plot plt.style.use('seaborn-notebook') # the dictionary can be used to access the graph's data (x, y etc. va...
48.68
148
0.678389
c99a06f827d66c427603d156f6ce0e784d2c6c0b
5,752
py
Python
python/main.py
postcode-x/spotify-study
c8ae557f7f635818f414f259471d9ba154ef2610
[ "Unlicense" ]
null
null
null
python/main.py
postcode-x/spotify-study
c8ae557f7f635818f414f259471d9ba154ef2610
[ "Unlicense" ]
null
null
null
python/main.py
postcode-x/spotify-study
c8ae557f7f635818f414f259471d9ba154ef2610
[ "Unlicense" ]
null
null
null
import spotipy from spotipy.oauth2 import SpotifyClientCredentials import copy import json # Billboard's Top 100 for each year between 1960 and 2020 all_playlists = [ 'https://open.spotify.com/playlist/0nfHJsAnubkIUXrazaqHL9', 'https://open.spotify.com/playlist/2exnqHJRp35x21SkJnl9gT', 'https://open.spo...
49.586207
109
0.717316
11dcb96619ce4f51512be08a0271536a27b98b92
692
py
Python
python/pyqt/threading_basics_tutorial/reddit_part.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pyqt/threading_basics_tutorial/reddit_part.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
python/pyqt/threading_basics_tutorial/reddit_part.py
zeroam/TIL
43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1
[ "MIT" ]
null
null
null
import requests import json import time def get_top_post(subreddit): url = f'https://www.reddit.com/r/{subreddit}.json?limit=1' headers = {'User-agent': 'imdff0803@gmail.com try tutorial'} response = requests.get(url, headers=headers) data = json.loads(response.text) top_post = data['data']['child...
28.833333
76
0.679191
e10011ca45c1df2ea9ad355b518853ce738927b5
4,362
py
Python
src/python/BI/ReadCsv.py
coulsonzero/webProject
46ba2456620496f376ed954a6469381b8142e0f6
[ "MIT" ]
null
null
null
src/python/BI/ReadCsv.py
coulsonzero/webProject
46ba2456620496f376ed954a6469381b8142e0f6
[ "MIT" ]
null
null
null
src/python/BI/ReadCsv.py
coulsonzero/webProject
46ba2456620496f376ed954a6469381b8142e0f6
[ "MIT" ]
null
null
null
import pandas as pd # df = pd.read_csv("src/python/BI/Csv/titanic.csv") # df = pd.read_csv("https://sololearn.com/uploads/files/titanic.csv") # print(df.head()) """ Survived Pclass Sex Age Siblings/Spouses Parents/Children Fare 0 0 3 male 22.0 1 ...
37.603448
97
0.455983
fecfc92d5b44c05e940178b53737cca65c42a295
2,437
py
Python
FeatureEngineering/trainer.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
6
2017-04-12T14:05:19.000Z
2021-01-29T11:23:50.000Z
FeatureEngineering/trainer.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
null
null
null
FeatureEngineering/trainer.py
alex-ta/Fontinator
7ca9effe3b61ded032176557520127e1d4b7a5ef
[ "Apache-2.0" ]
null
null
null
import os from PIL import Image, ImageFont, ImageDraw import numpy as np import cv2 import pickle import extractFeatures import classifier # Static Config FONT_SIZE = 24 PADDING_TOP_BOTTOM = 8 TRAIN_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ÄÖÜäöü!"()[]?ß.,+-' # Get list of all fonts for...
31.24359
96
0.723841
3a1b70c2d263940e517ba07fdda825bee0ff790b
119
py
Python
Python/zzz_training_challenge/UdemyPythonPro/Chapter9_Packages/2_Packaging/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/UdemyPythonPro/Chapter9_Packages/2_Packaging/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
Python/zzz_training_challenge/UdemyPythonPro/Chapter9_Packages/2_Packaging/fastvector/__init__.py
Kreijeck/learning
eaffee08e61f2a34e01eb8f9f04519aac633f48c
[ "MIT" ]
null
null
null
from .vector import Vector2D # __all__ = List was bei * importiert wird, Name als String __all__ = [ 'Vector2D' ]
17
59
0.697479
28aeeb2b7b08df49400d68d7b646c9b32e21a85c
348
py
Python
7-assets/past-student-repos/data_struct_and_algo-master/n_rotations_index.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/data_struct_and_algo-master/n_rotations_index.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
7-assets/past-student-repos/data_struct_and_algo-master/n_rotations_index.py
eengineergz/Lambda
1fe511f7ef550aed998b75c18a432abf6ab41c5f
[ "MIT" ]
null
null
null
# Input : arr[] : {1, 2, 3, 4, 5} # ranges[] = { {0, 2}, {0, 3} } # index : 1 # Output : 3 # Explanation : After first given rotation {0, 2} # arr[] = {3, 1, 2, 4, 5} # After second rotation {0, 3} # arr[] = {4, 3, 1, 2, 5} # After all rotations we have ele...
31.636364
49
0.439655
c956314c945c4544c80bf6e4ffc938426d1c1b1d
815
py
Python
sakf/sakf.py
spdir/sakf
9a07c5f90765201a42d524dc6d4554f4ccd3c750
[ "Apache-2.0" ]
null
null
null
sakf/sakf.py
spdir/sakf
9a07c5f90765201a42d524dc6d4554f4ccd3c750
[ "Apache-2.0" ]
null
null
null
sakf/sakf.py
spdir/sakf
9a07c5f90765201a42d524dc6d4554f4ccd3c750
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import logging import tornado.ioloop from tornado.httpserver import HTTPServer from tornado.options import options, parse_command_line from sakf.conf import serverConfig ioloop = tornado.ioloop.IOLoop.current() def main(): parse_command_line() app_obj = serverConfig.ServerApp() app = ap...
25.46875
83
0.703067
6ee6fea8e8093b04619994bc5ce62852a16fb48e
1,082
py
Python
py_projects/gui_calender/calender.py
Anwesha-dash811/hacktober-1
188c859864f06f94a94cb91e63979366db62b9ac
[ "MIT" ]
1
2020-10-04T12:36:45.000Z
2020-10-04T12:36:45.000Z
py_projects/gui_calender/calender.py
Anwesha-dash811/hacktober-1
188c859864f06f94a94cb91e63979366db62b9ac
[ "MIT" ]
1
2021-09-30T16:20:57.000Z
2021-09-30T16:20:57.000Z
py_projects/gui_calender/calender.py
Anwesha-dash811/hacktober-1
188c859864f06f94a94cb91e63979366db62b9ac
[ "MIT" ]
3
2020-10-04T10:07:10.000Z
2020-10-25T15:21:15.000Z
import tkinter as tk import calendar def showCal(): root =tk.Tk() root.config(background = "white") root.title("CALENDER") root.geometry("550x600") fetch_year = int(year_field.get()) cal_content = calendar.calendar(fetch_year) cal_year =tk. Label(root, text = cal_content,...
33.8125
105
0.582255
6c32fa5b881552b5ac937030bad7e96bd8f14cc6
842
py
Python
docs/content/code/sort.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:15:38.000Z
2021-11-10T12:29:19.000Z
docs/content/code/sort.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
null
null
null
docs/content/code/sort.py
PaulCCCCCCH/m5-101
81201b00cd81c1747ea0cd5f042a09eda02d6d1c
[ "MIT" ]
4
2021-03-25T13:18:10.000Z
2021-04-08T13:44:48.000Z
import time import random def sort_numbers(numbers): result = [] # 这里记录排列好的序列 while numbers: # 一直循环,直到 numbers 为空 curr_max = -float('inf') # 记录当前最大的数,因为还没开始,所以是负无穷大 curr_max_idx = 0 # 记录当前最大的数在第几个 for idx in range(len(numbers)): if numbers[idx] > curr_ma...
26.3125
61
0.60095
b0a86cab354e91b6d2ccff5467e454989e4f9fd9
729
py
Python
finbyz_dashboard/finbyz_dashboard/custom_number_card/qty_to_deliver.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
1
2021-11-19T05:27:11.000Z
2021-11-19T05:27:11.000Z
finbyz_dashboard/finbyz_dashboard/custom_number_card/qty_to_deliver.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
null
null
null
finbyz_dashboard/finbyz_dashboard/custom_number_card/qty_to_deliver.py
finbyz/finbyz_dashboard
9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0
[ "MIT" ]
2
2021-08-21T10:41:38.000Z
2021-11-19T05:27:13.000Z
from __future__ import unicode_literals import frappe, json from frappe import _ @frappe.whitelist() def number_card_custom(filters=None): filters = frappe.parse_json(filters) where_condition = '' if filters.get('company'): where_condition += " and so.company = '{}'".format(filters.get('company')) sales_query =...
28.038462
76
0.718793
9fdea4373845c48deb9ecaf64645913a31cce7ce
2,214
py
Python
tests/fixtures/trees.py
KeepSafe/html-structure-diff
83ea2b8ad4b78b140bb5f69e3f2966c9fda01a89
[ "Apache-2.0" ]
3
2016-05-10T13:57:14.000Z
2016-09-29T21:01:53.000Z
tests/fixtures/trees.py
KeepSafe/html-structure-diff
83ea2b8ad4b78b140bb5f69e3f2966c9fda01a89
[ "Apache-2.0" ]
3
2015-10-20T22:29:37.000Z
2022-01-18T18:20:06.000Z
tests/fixtures/trees.py
KeepSafe/html-structure-diff
83ea2b8ad4b78b140bb5f69e3f2966c9fda01a89
[ "Apache-2.0" ]
1
2016-11-05T04:23:05.000Z
2016-11-05T04:23:05.000Z
from sdiff.model import * def empty_tree(): return Root() def pt(): return Root([ Paragraph([ Text('dummy text') ]) ]) def r2t(): return Root([ Header(2, [ Text('dummy text') ]) ]) def r4t(): return Root([ Header(4, [ ...
16.160584
39
0.351852
c6afeb907569548ff6afaf94f77b2b0d632b6725
2,779
py
Python
research/cv/advanced_east/prepare_data.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/advanced_east/prepare_data.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/advanced_east/prepare_data.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
40.867647
111
0.734077
bbb850619e85a5cbeead9dcdad890a8b0bec3fd8
2,322
py
Python
user/views.py
StevenMedina/MovieAPI
805e79d396e197383bce6095febf0252231a1018
[ "MIT" ]
null
null
null
user/views.py
StevenMedina/MovieAPI
805e79d396e197383bce6095febf0252231a1018
[ "MIT" ]
null
null
null
user/views.py
StevenMedina/MovieAPI
805e79d396e197383bce6095febf0252231a1018
[ "MIT" ]
null
null
null
from django.contrib.auth import login, authenticate from django.contrib.auth.views import LoginView from django.shortcuts import redirect from django.urls import reverse from django.views.generic import FormView from django.views.generic import TemplateView from .forms import UserAuthenticationForm from .forms import ...
29.392405
69
0.655469
aba582d26439c4ddd0a2939bb1c8edd2ca0feeed
581
py
Python
Chapter12_Multiprocessing/multi_thread.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
null
null
null
Chapter12_Multiprocessing/multi_thread.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
null
null
null
Chapter12_Multiprocessing/multi_thread.py
kernbeisser/UdemyPythonPro
000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9
[ "MIT" ]
null
null
null
import math import time from threading import Thread NUM_THREADS = 4 def calc(num_elements): res = 0 for i in range(num_elements): res += math.sqrt(i) print(res) def main(): threads = [] for _ in range(NUM_THREADS): threads.append(Thread(target=calc, args=[8_000_000])) sta...
16.6
61
0.626506
f976f4f4077b91d93d99070fadaf29f27a5cae3a
1,550
py
Python
listings/chapter06/hvv.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
2
2021-09-20T06:16:41.000Z
2022-01-17T14:24:43.000Z
listings/chapter06/hvv.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
listings/chapter06/hvv.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
import numpy as np from sklearn.feature_extraction.text import HashingVectorizer texts = ["Künstliche Intelligenz ist eine Sammelbezeichnung für Algorithmen, die Probleme lösen, für die Menschen Intelligenz benötigen. Ob man die Programme selbst als intelligent ansehen kann, ist umstritten. Typische Lösungen gehören z...
119.230769
385
0.829032
ddaa7e48deb8d30b560122e312f03c0bf76631bb
215
py
Python
python_gui_tkinter/Tkinter/TkinterCourse/25_canvas_oval.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python_gui_tkinter/Tkinter/TkinterCourse/25_canvas_oval.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python_gui_tkinter/Tkinter/TkinterCourse/25_canvas_oval.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
from tkinter import * canvas_width = 200 canvas_height =200 master = Tk() w = Canvas(master, width=canvas_width, height=canvas_height) w.pack() w.create_oval(50,50,200,100) mainloop()
11.944444
32
0.651163
fb35828aeb453d308662e3f2c05fe9f0da3b13d0
254
py
Python
Python/M01_ProgrammingBasics/L04_ForLoop/Lab/Solutions/P09LeftAndRightSum.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L04_ForLoop/Lab/Solutions/P09LeftAndRightSum.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
null
null
null
Python/M01_ProgrammingBasics/L04_ForLoop/Lab/Solutions/P09LeftAndRightSum.py
todorkrastev/softuni-software-engineering
cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84
[ "MIT" ]
1
2022-02-23T13:03:14.000Z
2022-02-23T13:03:14.000Z
num = int(input()) left = 0 right = 0 for each in range(num): left += int(input()) for each in range(num): right += int(input()) diff = abs(left - right) if left == right: print(f"Yes, sum = {right}") else: print(f"No, diff = {diff}")
15.875
32
0.570866
9b2f4b9b459f96bdd81c1fa92a72bba6bb717a0a
375
py
Python
server/apps/user_operation/migrations/0005_auto_20190423_1434.py
Mayandev/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
129
2019-04-20T08:23:25.000Z
2022-03-14T10:02:23.000Z
server/apps/user_operation/migrations/0005_auto_20190423_1434.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
9
2019-05-19T15:06:17.000Z
2021-12-14T06:47:14.000Z
server/apps/user_operation/migrations/0005_auto_20190423_1434.py
heartplus/django_morec
8d115f76ad69d7aa78b07dc06aa7047979ad134b
[ "MIT" ]
34
2019-05-06T06:37:17.000Z
2021-12-09T02:27:58.000Z
# Generated by Django 2.1.4 on 2019-04-23 14:34 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('user_operation', '0004_auto_20190422_2006'), ] operations = [ migrations.RenameField( model_name='userfavoractor', old_name=...
19.736842
54
0.597333
fd1e7ee03e6d74ca770ddb06b82a81d43829e163
424
py
Python
RetrieveImagesFromDimuMediaServers.py
vlpolyansky/spotArt
b1a6df25b62cd61d9056d710f4a2cb9185f45f3c
[ "MIT" ]
null
null
null
RetrieveImagesFromDimuMediaServers.py
vlpolyansky/spotArt
b1a6df25b62cd61d9056d710f4a2cb9185f45f3c
[ "MIT" ]
null
null
null
RetrieveImagesFromDimuMediaServers.py
vlpolyansky/spotArt
b1a6df25b62cd61d9056d710f4a2cb9185f45f3c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Apr 15 08:25:50 2018 """ # import libraries import urllib import pandas as pd # Read in csv file with unique image identifiers (exported from Knime workflow) df = pd.read_csv('Filename') #loop through the data to download all images from the dimu media servers for i in df.i...
28.266667
91
0.695755
b5d2b7f50059b1f5b31569f37e092c93d73886ec
2,040
py
Python
oldp/apps/courts/views.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
3
2020-06-27T08:19:35.000Z
2020-12-27T17:46:02.000Z
oldp/apps/courts/views.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
oldp/apps/courts/views.py
ImgBotApp/oldp
575dc6f711dde3470d910e21c9440ee9b79a69ed
[ "MIT" ]
null
null
null
from django.conf import settings from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext_lazy as _ from django.views.generic import ListView from oldp.apps.cases.models import Case from oldp.apps.courts.models import * class CourtCasesListView(ListView): template_name = 'cour...
29.142857
98
0.640196
1f0e2ccf3fefd369e5d63247f5a8aa3fbea4d5a6
955
py
Python
10.3389/fimmu.2018.00251/bin/make_cdr3_capturerecapture_data.py
jqsunac/doi
c5912a40c7bfda8270e5d51fbdd82a9f0650bd23
[ "MIT" ]
null
null
null
10.3389/fimmu.2018.00251/bin/make_cdr3_capturerecapture_data.py
jqsunac/doi
c5912a40c7bfda8270e5d51fbdd82a9f0650bd23
[ "MIT" ]
null
null
null
10.3389/fimmu.2018.00251/bin/make_cdr3_capturerecapture_data.py
jqsunac/doi
c5912a40c7bfda8270e5d51fbdd82a9f0650bd23
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys import argparse import re def create_dataset(i, o): mptn = re.compile(r'>(.+)\.\.\.') cluster_id = None outfh = open(o, 'w') with open(i, 'r') as infh: for buf in infh: if buf[0:1] == '>': cluster_id = buf[1:] ...
25.131579
92
0.536126
1f5674fa0f9e300989df888de0b6815479a305a6
2,736
py
Python
docker-shadowsocks/adm.py
swoiow/dsc
5860e6bfaa70b700e025533c406a6bc52d4ab74b
[ "MIT" ]
null
null
null
docker-shadowsocks/adm.py
swoiow/dsc
5860e6bfaa70b700e025533c406a6bc52d4ab74b
[ "MIT" ]
null
null
null
docker-shadowsocks/adm.py
swoiow/dsc
5860e6bfaa70b700e025533c406a6bc52d4ab74b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import random import string DOCKER_IMAGINE_NAME = "ss/build:db9" SERVE_IP = "" def generate_pwd(length=12): _seed_ = string.digits + string.ascii_letters seed = [] times = random.choice(string.digits[1:]) for _ in times: lt = list(_see...
23.791304
116
0.586257
c0e2be378707ce2d4586640723e58f8358925ec6
3,067
py
Python
app/websocket.py
openbikebox/websocket-client
50b61a70ffcff1acdc13ba69c017e671bd3f983f
[ "MIT" ]
null
null
null
app/websocket.py
openbikebox/websocket-client
50b61a70ffcff1acdc13ba69c017e671bd3f983f
[ "MIT" ]
null
null
null
app/websocket.py
openbikebox/websocket-client
50b61a70ffcff1acdc13ba69c017e671bd3f983f
[ "MIT" ]
null
null
null
# encoding: utf-8 """ openbikebox websocket-client Copyright (c) 2021, binary butterfly GmbH Use of this source code is governed by an MIT-style license that can be found in the LICENSE file. """ import json import logging import asyncio import websockets from base64 import b64encode from .config import Config as con...
32.284211
102
0.609064
8d042386de3e2f226fa9f28bb0fac2b26a40351b
1,671
py
Python
skripte_datensammlung/emoji_statistics.py
TimSchmittmann/ML2-Project
7ad01366f2322018065efcae542ae75786b3c0ec
[ "MIT" ]
null
null
null
skripte_datensammlung/emoji_statistics.py
TimSchmittmann/ML2-Project
7ad01366f2322018065efcae542ae75786b3c0ec
[ "MIT" ]
null
null
null
skripte_datensammlung/emoji_statistics.py
TimSchmittmann/ML2-Project
7ad01366f2322018065efcae542ae75786b3c0ec
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' @author: Tim Schmittmann ''' import emoji import regex import csv import emoji_helper def sort_emoji_count_by_value(emoji_cnt): sorted_by_value = sorted(emoji_cnt.items(), key=lambda kv: kv[1]) sorted_by_value.reverse() return sorted_by_value def display_emoji_count(emoji_cnt)...
31.528302
85
0.613405
23bc490f388d4143d50b6ffd55bdc958c7d536c4
2,700
py
Python
tools/pythonpkg/duckdb_query_graph/__init__.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
2,816
2018-06-26T18:52:52.000Z
2021-04-06T10:39:15.000Z
tools/pythonpkg/duckdb_query_graph/__init__.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
1,310
2021-04-06T16:04:52.000Z
2022-03-31T13:52:53.000Z
tools/pythonpkg/duckdb_query_graph/__init__.py
AldoMyrtaj/duckdb
3aa4978a2ceab8df25e4b20c388bcd7629de73ed
[ "MIT" ]
270
2021-04-09T06:18:28.000Z
2022-03-31T11:55:37.000Z
import json import os qgraph_css = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'query_graph.css') raphael_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'raphael.js') treant_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'treant.js') profile_output_path = os.path.join(os....
30
161
0.677407