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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ae7de9f464727f2304d2c86e14020d6169c04930 | 637 | py | Python | euler3.py | akashsharma99/2ndSemPractise | ba854e8ef5089ad627cee6f7c8828b711437affa | [
"MIT"
] | null | null | null | euler3.py | akashsharma99/2ndSemPractise | ba854e8ef5089ad627cee6f7c8828b711437affa | [
"MIT"
] | null | null | null | euler3.py | akashsharma99/2ndSemPractise | ba854e8ef5089ad627cee6f7c8828b711437affa | [
"MIT"
] | null | null | null | from bisect import bisect_left
from math import sqrt
prime=[True] * 1000001
arr=[1] #list of all prime numbers till 10pow12
prime[0],prime[1]=False,False
#ensures that multiples of one are not
#traversed unlike previously where i had prime[1] as true
for p,pri in enumerate(prime):
if (pri):
arr.append(p)
... | 23.592593 | 57 | 0.577708 |
884d66ee84dacd8cc8c22e19de2dce438773574b | 397 | py | Python | Python/Exercícios_Python/003_somando_dois_números.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/003_somando_dois_números.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/003_somando_dois_números.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""003 - Somando dois números
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1iIsLPFmwr2nPBsLnXwrOosRvz0wfK4nX
"""
n1 = int(input('Digite um valor: '))
n2 = int(input('Digite outro: '))
s = n1 + n2
# print('A soma entre', n1,'e... | 28.357143 | 77 | 0.662469 |
09e85cfcd418ad562df605f9092e76c82100918f | 506 | py | Python | SWH2P/doc/ideas.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 4 | 2017-06-20T19:56:22.000Z | 2021-05-29T10:07:47.000Z | SWH2P/doc/ideas.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 11 | 2017-05-31T19:14:32.000Z | 2018-09-12T23:44:11.000Z | SWH2P/doc/ideas.py | swharden/ROI-Analysis-Pipeline | e83d96c43fdd50cb44be365289e964576492617e | [
"MIT"
] | 2 | 2017-06-20T17:14:38.000Z | 2017-06-20T19:51:34.000Z | """
how do I want to use this?
"""
import sys
sys.path.append('../../')
import roi2p
TS=roi2p.TSeries('X:/path/to/TSeries/folder')
# converts TIF data to 3D .npy arrays and saves or loads them - TS.R, TS.G
# calculates TG.GR (G/R)
# predicts TG.DGR (dG/R) based on average intensity from baseline
... | 28.111111 | 78 | 0.616601 |
28e2df182f01d72769cf0c2560659fb43de96d6e | 1,465 | py | Python | pdf2txt.py | yykk3322/Name-to-Kana-converter | 428895e4b4a73da910a031c3ae7a541919e8dbb9 | [
"MIT"
] | null | null | null | pdf2txt.py | yykk3322/Name-to-Kana-converter | 428895e4b4a73da910a031c3ae7a541919e8dbb9 | [
"MIT"
] | null | null | null | pdf2txt.py | yykk3322/Name-to-Kana-converter | 428895e4b4a73da910a031c3ae7a541919e8dbb9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import codecs
import io
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
def pdf_to_txt():
print('解析するpdfのファイル名を入力してください')
filename = in... | 31.170213 | 125 | 0.648464 |
e90ee4d426793922729eb250eeefd3db3597d79f | 487 | py | Python | ebenezer/root/settings/local.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | ebenezer/root/settings/local.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | 3 | 2020-02-11T23:15:00.000Z | 2021-06-10T20:52:17.000Z | ebenezer/root/settings/local.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null |
from .base import *
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
ALLOWED_HOSTS = ['localhost']
INTERNAL_IPS = ['127.0.0.1', '127.0.0.1:3000']
... | 16.793103 | 63 | 0.661191 |
3abec5356097d1b1cd861deb72e82a72ffae599a | 12,855 | py | Python | tests/connector/test_directory_oneroster_not_pytest.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | null | null | null | tests/connector/test_directory_oneroster_not_pytest.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | null | null | null | tests/connector/test_directory_oneroster_not_pytest.py | sabanawaf/user-sync.py | 51a7f9165d1740120b172edf507f1b3b3d5e57f8 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-2017 Adobe Systems Incorporated. All rights reserved.
#
# 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... | 48.878327 | 152 | 0.522287 |
a34871fac2cc8e2f442d238d259e67e09ebec802 | 1,037 | py | Python | blinkingfinal.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | blinkingfinal.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | blinkingfinal.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | N, B = map(int, input().split())
lighting = []
for i in range(N):
lighting.append("1" == (input()))
#print(len(lighting))
def toInt(arr):
out = 0
for x in arr:
if x:
add = 1
else:
add = 0
out = 2 * out + add
return out
precalc = []
seen = set()
loop = 0
la... | 23.568182 | 66 | 0.46866 |
6ea2f9f805dfeb23761b7bcd7f169058400c749b | 4,133 | py | Python | year_3/numanalysis_2/lab23/djapp/integrals/integrals.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/numanalysis_2/lab23/djapp/integrals/integrals.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/numanalysis_2/lab23/djapp/integrals/integrals.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | import math
import numpy
def main_func(x):
return (math.sinh(math.sqrt(1 - x))) / (math.sqrt(1 - x))
class Trapezoidal(object):
def __init__(self, integral_func):
self.func = integral_func
def integral(self, a_start, b_end, n_sub_intervals):
# Check for some incorrect input.
if ... | 39.361905 | 99 | 0.572224 |
6ed13ce81e4e50651b3b6dda08eae01d44d49699 | 1,187 | py | Python | tintz/api/views.py | dcfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | null | null | null | tintz/api/views.py | dcfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | 2 | 2021-03-19T21:51:51.000Z | 2021-06-10T18:22:50.000Z | tintz/api/views.py | danielfranca/tintz-backend | 9f29e17cafc31ab7dc568d1e2c984e6f1b1fc3fc | [
"MIT"
] | null | null | null | from rest_framework_drilldown import DrillDownAPIView
from rest_framework import mixins
from rest_framework import serializers
from django.shortcuts import get_object_or_404
def SerializerFactory(the_model):
class Serializer(serializers.ModelSerializer):
class Meta:
model = the_model
retu... | 31.236842 | 139 | 0.696714 |
280d69ffcf1b43b8ba9ffc1b23f0040bed434ddd | 442 | py | Python | Chapter2_Basics/FunctionsArguments.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | 2 | 2021-02-13T19:18:00.000Z | 2021-11-10T09:54:49.000Z | Chapter2_Basics/FunctionsArguments.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | null | null | null | Chapter2_Basics/FunctionsArguments.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | null | null | null | def test(param1, param2="hello", param3="byebye"):
print("Test function: ", param1, " - ", param2, " - ", param3)
test("hello", param2="byebye", param3="end")
def list_max(input_list):
max_value = input_list[0]
for i in range(1, len(input_list)):
if input_list[i] > max_value:
max_va... | 21.047619 | 66 | 0.61991 |
6c6b213519947a5ff82e3f5d8815e681a08bfcf4 | 3,430 | py | Python | genesis/mutator.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | 1 | 2021-03-05T07:44:05.000Z | 2021-03-05T07:44:05.000Z | genesis/mutator.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | 3 | 2017-06-04T03:01:31.000Z | 2017-08-04T04:04:37.000Z | genesis/mutator.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | null | null | null | from __future__ import print_function, division
import sys
import os
sys.path.append(os.path.abspath("."))
sys.dont_write_bytecode = True
__author__ = "bigfatnoob"
import random
import networkx as nx
from utils.lib import O
from genesis.gen_utils import GraphPoint, Statement, choice
def default():
"""
Default ... | 31.759259 | 85 | 0.657434 |
667632088b8fe3288b9bbd7595c62d571bc74193 | 553 | py | Python | backend/alembic/versions/88baa0b43fe1_taskstatistic.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/alembic/versions/88baa0b43fe1_taskstatistic.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/alembic/versions/88baa0b43fe1_taskstatistic.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | """TaskStatistic
Revision ID: 88baa0b43fe1
Revises: 7b852dfcc007
Create Date: 2021-11-10 19:19:35.500407
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "88baa0b43fe1"
down_revision = "7b852dfcc007"
branch_labels = None
depends_on = None
def upgrade():
# ... | 19.068966 | 65 | 0.688969 |
669360fa3b3ffed2bbd33574056cd0ffe35600f8 | 927 | py | Python | scripts/templates/mails.py | ESchae/IMWIEvaluation | 2fa661711b7b65cba25c1fa9ba69e09e75c7655f | [
"MIT"
] | null | null | null | scripts/templates/mails.py | ESchae/IMWIEvaluation | 2fa661711b7b65cba25c1fa9ba69e09e75c7655f | [
"MIT"
] | null | null | null | scripts/templates/mails.py | ESchae/IMWIEvaluation | 2fa661711b7b65cba25c1fa9ba69e09e75c7655f | [
"MIT"
] | 1 | 2019-10-19T10:11:17.000Z | 2019-10-19T10:11:17.000Z | from string import Template
send_results_mail = Template('''
$opening
anbei erhalten Sie die bisherigen Ergebnisse der Evaluation Ihrer Lehrveranstaltungen.
Folgende Veranstaltungen wurden evaluiert:
$evaluated_lectures
Die Ergebnisse von Evaluationen, an denen weniger als drei Personen teilgenommen haben,
werden... | 35.653846 | 111 | 0.839266 |
b0ba82379850cbadc05e41a676e0795e1ae92d1e | 12,684 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/detector/flowFromRoutes.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/detector/flowFromRoutes.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/detector/flowFromRoutes.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... | 42 | 116 | 0.593898 |
c6eaba9e73d675dabba8cb8d63dbb48bd7b9a006 | 3,828 | py | Python | official/cv/maskrcnn/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/maskrcnn/ascend310_quant_infer/acc.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/maskrcnn/ascend310_quant_infer/acc.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... | 47.259259 | 115 | 0.706635 |
bb6d4d308fff74bb6ac79514e665286ba15a9cfa | 3,721 | py | Python | python/tutlibs/normal_estimation.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | 1 | 2021-11-22T10:32:49.000Z | 2021-11-22T10:32:49.000Z | python/tutlibs/normal_estimation.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | 1 | 2021-12-09T14:39:51.000Z | 2021-12-09T14:39:51.000Z | python/tutlibs/normal_estimation.py | Obarads/Point_Cloud_Tutorial | faf7ae8abf962ecea414cc7557dc35f4fca0e406 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.sparse.csgraph import minimum_spanning_tree
from .nns import k_nearest_neighbors
from .operator import gather, square_distance
# Note:
# (1) code is same code below:
# normals = np.zeros((len(v), 3), dtype=np.float32) # (N, 3)
# for i, idx in enumerate(w_min_idxs):
# normals[i] = v[i,... | 32.929204 | 109 | 0.6423 |
a530edbbbb34827d55ef1fdfafcee44c368f5dcb | 2,178 | py | Python | webinterface/management/commands/process_dutyswitch_proposals.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 2 | 2021-11-28T23:04:00.000Z | 2022-01-13T19:47:45.000Z | webinterface/management/commands/process_dutyswitch_proposals.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 25 | 2020-03-29T14:40:46.000Z | 2021-09-22T17:37:15.000Z | webinterface/management/commands/process_dutyswitch_proposals.py | monoclecat/cleaning-schedule-management-system | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 1 | 2020-07-04T11:42:17.000Z | 2020-07-04T11:42:17.000Z | from django.core.management.base import BaseCommand
from webinterface.models import *
from cleansys.settings import WARN_WEEKS_IN_ADVANCE__ASSIGNMENTS_RUNNING_OUT
class Command(BaseCommand):
help = 'Processes proposals for DutySwitch acceptors. When DutySwitch objects have gone several days without ' \
... | 50.651163 | 118 | 0.668503 |
a57160479abba823412930516fc1355b098158d2 | 407 | py | Python | PINp/2015/KAKURKIN_I_V/task_1_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2015/KAKURKIN_I_V/task_1_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2015/KAKURKIN_I_V/task_1_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1. Вариант 3.
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Вильгельм Аполлинарий Костровицкий.
# После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
print("Вильгельм Аполлинарий Костровицкий - Французский писатель из... | 50.875 | 132 | 0.810811 |
3c6a138ad2e2338a0b40c4b56300707d90ef3244 | 7,022 | py | Python | kollektiv5gui/views/MainWindow.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 3 | 2019-03-21T17:02:55.000Z | 2019-04-04T18:16:10.000Z | kollektiv5gui/views/MainWindow.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 11 | 2019-10-30T12:05:39.000Z | 2022-03-11T23:43:54.000Z | kollektiv5gui/views/MainWindow.py | MateRyze/InformatiCup-2019 | eeca3ff7f8a102f4093697c6badee21ce25e2e87 | [
"MIT"
] | 1 | 2019-10-30T12:04:00.000Z | 2019-10-30T12:04:00.000Z | import os
import time
import webbrowser
from PyQt5.QtCore import QUrl, Qt, QSize, pyqtSignal
from PyQt5.QtGui import QCursor
from PyQt5.QtWidgets import QMainWindow, QWidget, QAction, QDialog, QMessageBox
from PyQt5.QtWidgets import QVBoxLayout, QTextEdit, QMenu, QSplitter
from PyQt5.QtWidgets import QHBoxLayout, QPush... | 34.421569 | 79 | 0.64953 |
aba4489c6ab522ed01e52906ad24fd7744001c3f | 1,398 | py | Python | tests/onegov/feriennet/test_sponsors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/feriennet/test_sponsors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/feriennet/test_sponsors.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from freezegun import freeze_time
from onegov.core.utils import Bunch
from onegov.feriennet.sponsors import Sponsor
def test_translate_sponsor():
sponsor = Sponsor(
name="Evilcorp",
logo={
'de': 'das-logo.png',
'fr': 'le-logo.png'
},
banners={
'... | 22.918033 | 52 | 0.498569 |
abb8f31e81a9b6b8ee505ad7357ac322138a8ae7 | 3,396 | py | Python | sms_twilio.py | Maxim01/Programmes | dbe5b83b3c65776ccc00049793fa85313fb76065 | [
"Apache-2.0"
] | null | null | null | sms_twilio.py | Maxim01/Programmes | dbe5b83b3c65776ccc00049793fa85313fb76065 | [
"Apache-2.0"
] | null | null | null | sms_twilio.py | Maxim01/Programmes | dbe5b83b3c65776ccc00049793fa85313fb76065 | [
"Apache-2.0"
] | null | null | null | import json
import sys
from twilio.rest import Client
SID = "VIDE"
token = "VIDE"
numero_envoi = "VIDE"
numero_reception = "VIDE"
ACTION_ARG = "VIDE"
Message_envoi = "VIDE"
def arguments():
global ACTION_ARG
global SID
global token
global numero_envoi
global numero_reception
global Messag... | 20.214286 | 103 | 0.64311 |
e650da0b360d1174f6776740d12dacf0ead32918 | 2,144 | py | Python | sorting/merge_sort.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | null | null | null | sorting/merge_sort.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | null | null | null | sorting/merge_sort.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | 1 | 2020-04-16T01:17:04.000Z | 2020-04-16T01:17:04.000Z | #!/usr/bin/python3
enable_debug = True
count_debug = 0
def debug(msg):
global enable_debug
global count_debug
if enable_debug:
print("%s, count: %s" % (msg, count_debug))
count_debug += 1
def merge_lists(left_list, right_list, descending=False):
i = 0
j = 0
merged_list = []
... | 29.369863 | 80 | 0.565765 |
0550bf5af25c5f11935bdaa606de4a8a5664c880 | 2,508 | py | Python | docs/Timetable/tt0.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | docs/Timetable/tt0.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | docs/Timetable/tt0.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
TT/tt0.py
Last updated: 2021-07-04
Timetable ... initial "chip" placement ...
=+LICENCE=============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance... | 38 | 75 | 0.678628 |
3498da768fa5855ba20386f889355595e6f1418e | 15,802 | py | Python | tests/onegov/election_day/models/test_principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/models/test_principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/models/test_principal.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from freezegun import freeze_time
from onegov.election_day.models import Canton
from onegov.election_day.models import Municipality
from onegov.election_day.models import Principal
from textwrap import dedent
SUPPORTED_YEARS = list(range(2002, 2021 + 1))
SUPPORTED_YEARS_MAP = list(range(2013, 2021 + 1))
SUPPORTED_YE... | 35.751131 | 78 | 0.619162 |
349be54ef4973c08f78b5cd7ab2cc3298daa8fac | 488 | py | Python | source/pkgsrc/inputmethod/fcitx5-mozc/patches/patch-build__tools_util.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/inputmethod/fcitx5-mozc/patches/patch-build__tools_util.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/inputmethod/fcitx5-mozc/patches/patch-build__tools_util.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-build__tools_util.py,v 1.1 2021/02/17 15:29:51 ryoon Exp $
* NetBSD support
--- build_tools/util.py.orig 2016-05-15 08:11:10.000000000 +0000
+++ build_tools/util.py
@@ -59,6 +59,11 @@ def IsLinux():
return os.name == 'posix' and os.uname()[0] == 'Linux'
+def IsNetBSD():
+ """Returns true if the... | 25.684211 | 73 | 0.653689 |
9b3e759bd3586d70f39581f57a142c5d5eab2fb1 | 2,092 | py | Python | tspdb/src/tslb/src/regModel.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 43 | 2019-12-10T00:05:51.000Z | 2022-03-31T21:21:20.000Z | tspdb/src/tslb/src/regModel.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 5 | 2021-05-09T01:12:31.000Z | 2022-03-29T17:34:15.000Z | tspdb/src/tslb/src/regModel.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 14 | 2020-01-13T21:20:07.000Z | 2022-03-31T02:11:26.000Z | ######################################################
#
# Regression Model
#
######################################################
import numpy as np
from sklearn.linear_model import LinearRegression
from tspdb.src.tslb.src.lzw import *
from tspdb.src.tslb.src.utils import *
class regModel():
# n = alphabet si... | 30.764706 | 130 | 0.572658 |
fd0c0585239b61001936ef92f39bd345f2430f51 | 569 | py | Python | Nucleo/smain_Matematica.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Nucleo/smain_Matematica.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Nucleo/smain_Matematica.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | math_version = 'MODULO MATEMATICA v0.0.1'
import sys
sys.path.append('Nucleo/')
sys.path.append('Modulos/Matematica/')
from Nucleo.smain_Handler import *
def soda_MATEMATICA():
sMain_Avisos().Welcome('MATEMATICA')
while True:
q = sMain_Saidas().Prompt('MATEMATICA')
handler = sMain_Handlers().m... | 21.884615 | 57 | 0.579965 |
b5e8648a149f488d568c98f5a05c876d12141363 | 1,565 | py | Python | src/niv_logger/niv_logger.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/niv_logger/niv_logger.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | src/niv_logger/niv_logger.py | kkaruso/niv | 67ba82c93279db4dae503d4dceec7ba5e9931c0a | [
"MIT"
] | null | null | null | """
class to handle log file inputs
"""
import logging
import logging.config
import os
log_file_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + '/logs/niv.log'
class NivLogger:
"""
class for generating log entries
"""
logging.basicConfig(filename=log_file_path,
... | 24.076923 | 110 | 0.559744 |
bd14f97925cf5d7d5c4b047e0b0c8020fdec6148 | 738 | py | Python | leetcode/300-Longest-Increasing-Subsequence/LngstIncrsSubseq_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/300-Longest-Increasing-Subsequence/LngstIncrsSubseq_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/300-Longest-Increasing-Subsequence/LngstIncrsSubseq_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution(object):
def lengthOfLIS(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
n = len(nums)
if n == 0:
return 0
maxlen = [1 for i in range(n)]
dq = [nums[0]]
for i in range(1, n):
if dq[-1] < nums[i]:
... | 24.6 | 40 | 0.310298 |
1fe240295591bf651a4a8905a44ebba0908309b5 | 1,873 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/05_files_zippen/26_files_zippen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/05_files_zippen/26_files_zippen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_09_Dateien_verwalten/05_files_zippen/26_files_zippen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 26_files_zippen.py
# In diesem Script geht es darum files zu mittels Zip zu komprimieren und zu entkomprimieren.
import os, zipfile, re, shutil
maxl, dv= 50, 15
os.chdir(os.path.dirname(__file__))
def output(string):
print(''.center(maxl, '█'))
string+=' '*(maxl)
suchmuster=re.compile(r'.{'+str(maxl-dv) + r',' ... | 31.216667 | 254 | 0.725574 |
1ff27d73980fa9d562b4778f5348c8c04e65ec2f | 2,137 | py | Python | listings/chapter05/empty_sudoku.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter05/empty_sudoku.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter05/empty_sudoku.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | from csp import CSP
# Hilfsfunktion: alle Werte einer Zeile oder Spalte ermitteln
def filter_dict_by_key(dict_to_filter, condition):
filtered_list = []
for key in dict_to_filter:
if condition(key):
filtered_list.append(dict_to_filter[key])
return filtered_list
# Bedingungen: keine Dubl... | 34.467742 | 84 | 0.600374 |
2f5abb2d452a6586a51156afc733a941984494e4 | 6,191 | py | Python | PeAnalyser/panalyse.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | PeAnalyser/panalyse.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | PeAnalyser/panalyse.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #-*- coding:utf-8 -*-
import sys
import os
import string
try:
import pefile
except ImportError:
print("\033[38;5;196m[!] ImportError : Pefile Not Found !\033[00m")
try:
from tabulate import tabulate
except ImportError:
print("\033[38;5;196m[!] ImportError : Tabulate Not Found !\033[00m")
try:
im... | 35.176136 | 131 | 0.574705 |
c80e0e925720385b9884598af2e32aa5b25eee35 | 563 | py | Python | test/test_shmem_config.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 6 | 2020-08-12T08:16:15.000Z | 2022-03-05T02:25:53.000Z | test/test_shmem_config.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-03-30T10:34:51.000Z | 2021-06-09T11:24:00.000Z | test/test_shmem_config.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-11-21T09:30:58.000Z | 2021-11-21T09:30:58.000Z | import os.path
import yaml
from autojail.model import ShmemConfig
test_data_folder = os.path.join(os.path.dirname(__file__), "test_data")
def test_shmem_config_yaml():
shmem_yaml = os.path.join(test_data_folder, "test_shmem_config.yml")
with open(shmem_yaml) as shmem_yaml_file:
shmem_dict = yaml.sa... | 29.631579 | 72 | 0.746004 |
23d4f438db90463e9ef89aed1e6d6b21dff278b2 | 2,193 | py | Python | tests/cli/test_user.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/cli/test_user.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/cli/test_user.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | def test_add_admin_roles(client, seeder, app):
user_id, admin_unit_id = seeder.setup_base()
with app.app_context():
from project.services.user import get_user
user = get_user(user_id)
assert not user.has_role("admin")
runner = app.test_cli_runner()
result = runner.invoke(args=... | 31.782609 | 83 | 0.675331 |
8d4ae1aef78ceecb4df0805bf68112a0a3c335a0 | 11,408 | py | Python | pynanz/MeanVariance.py | salemileandro/pynanz | 5e22f4c4a0914714d1df668d3d0be54c90a8ff6d | [
"MIT"
] | null | null | null | pynanz/MeanVariance.py | salemileandro/pynanz | 5e22f4c4a0914714d1df668d3d0be54c90a8ff6d | [
"MIT"
] | null | null | null | pynanz/MeanVariance.py | salemileandro/pynanz | 5e22f4c4a0914714d1df668d3d0be54c90a8ff6d | [
"MIT"
] | null | null | null | import cvxpy as cp
import numpy as np
import datetime
import pandas as pd
from .Market import Market
from . import indicators
class MeanVariance:
"""
The MeanVariance class performs a Mean-Variance Portfolio Optimization. The optimization follows
.. math::
\\max_{\\mathbf{w}} \\Bigg( \\sum_{i=1}^... | 38.281879 | 123 | 0.589937 |
8d73910fc904d6f3476e2da0452daaa1ac29cfb4 | 4,687 | py | Python | Modell/TFLiteModellPruefen2.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Modell/TFLiteModellPruefen2.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Modell/TFLiteModellPruefen2.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow.keras.preprocessing.image import load_img,img_to_array
from numpy import array,expand_dims,mean,median
from os import listdir
def ladeBild(pfad):
bild = load_img(path = pfad,color_mode = 'grayscale')
array = img_to_array(bild)
array = expand_dims(a... | 28.065868 | 101 | 0.636868 |
19633c68b1fd7fb6f692811169c6ae1990dd6116 | 120 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.19-multiplication-table.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.19-multiplication-table.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/ph-6.19-multiplication-table.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | n = input("Please Enter a positive number: ")
n = int(n)
m = 1
while m <= 10:
print(n, "x", m, "=", n*m)
m += 1
| 17.142857 | 45 | 0.491667 |
198a4138077d3000e47fa14e57dc9fbfb380b620 | 2,296 | py | Python | Prototype/main prototype/test/TestScript_021.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 4 | 2019-12-03T16:13:09.000Z | 2019-12-11T23:22:58.000Z | Prototype/main prototype/test/TestScript_021.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 65 | 2019-12-08T17:43:59.000Z | 2020-08-14T15:26:21.000Z | Prototype/main prototype/test/TestScript_021.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | null | null | null | import unittest
import Calculation
from TabData import TabData
from LayerData import LayerData
class TestScript_021(unittest.TestCase):
"""
U-Berechnung 4 Schichten
analog manuellem TestScript_009
"""
def setUp(self):
#erstelle erste Schicht
self.layer_1 = LayerData()
self.... | 26.090909 | 59 | 0.58493 |
27ff1f3e429788476016fb3e68bf436ef8f14e15 | 766 | py | Python | ParsingAndScraping/kinopoisk/kinopoisk_parser.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | ParsingAndScraping/kinopoisk/kinopoisk_parser.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | ParsingAndScraping/kinopoisk/kinopoisk_parser.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | from ParsingAndScraping.kinopoisk import parce_this
from kinopoiskAPI import KinopoiskAPI
class KinopoiskParser(KinopoiskAPI):
def __init__(self):
super().__init__()
self.headers = {
'Accept-Language': 'ru',
'Origin': 'https://yastatic.net',
'Referer': 'https:/... | 34.818182 | 87 | 0.638381 |
e32f7d97c557dcc7d213bfb42b6ba6ae9287a7d8 | 4,553 | py | Python | research/cv/IRN/src/network/net_with_loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/IRN/src/network/net_with_loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/IRN/src/network/net_with_loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 32.06338 | 106 | 0.616077 |
8b4ea7d88e80ba754425fbd6006d19a5ae87eb1a | 48 | py | Python | python/python_backup/PRAC_PYTHON/sq.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/sq.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/sq.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a=input("enter a no")
b=(a*a)
print "square",b | 16 | 22 | 0.604167 |
47dd1d9275977f00b6a26b516246b39be2163818 | 592 | py | Python | src/bo4e/enum/messwertstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/messwertstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/messwertstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Messwertstatus(StrEnum):
"""
Der Status eines Zählerstandes
"""
ABGELESEN = "ABGELESEN" #: ABGELESEN
ERSATZWERT = "ERSATZWERT" #: ERSATZWERT
VORSCHLAGSWERT = "VORSCHLAGSWERT" #: VORSCHLAGSWERT
NICHT_... | 32.888889 | 74 | 0.719595 |
9a56630f9e73bbdb07c7bcc487446c016128a555 | 417 | py | Python | python_first_step/partialsum/needpackages.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | python_first_step/partialsum/needpackages.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | python_first_step/partialsum/needpackages.py | cartellefo/projet | 23c67e847b415fb47f71e830b89a227fffed109b | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import matplotlib.mlab as mlab
import matplotlib as mpl
import random # Pour tirer des notes au hasard
import scipy.optimize
from scipy.optimize import curve_fit
#from __future__ import division
import numpy
from scipy.optimize import curve_fit
import matplotlib.pyplot... | 24.529412 | 46 | 0.829736 |
9a6392d3c18f82219112a2325c5098d5d7de1fcc | 17,050 | py | Python | Packs/TrustwaveSEG/Integrations/TrustwaveSEG/TrustwaveSEG_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/TrustwaveSEG/Integrations/TrustwaveSEG/TrustwaveSEG_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/TrustwaveSEG/Integrations/TrustwaveSEG/TrustwaveSEG_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import json
import dateparser
from datetime import datetime
def util_load_json(path: str) -> dict:
"""Load json file to dict object
Args:
path (str): The path of the file
Returns:
dict: The JSON data from the file
"""
with io.open(path, mode='r', encoding='utf-8') as fi... | 47.493036 | 97 | 0.734428 |
328b82262ea53a783143cb491790bd3f21205c68 | 182,701 | py | Python | old/baxter_utils.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | old/baxter_utils.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | old/baxter_utils.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | """baxterロボットの色々関数とクラス
・順運動学写像,ヤコビ行列など
"""
import numpy as np
from math import cos, sin, tan, pi, sqrt
class BaxterKinematics:
"""ローカル座標系の原点,ヤコビ行列等を計算"""
def __init__(self, L, h, H, L0, L1, L2, L3, L4, L5, L6):
self.L = L
self.h = h
self.H = H
self.L0 = L0
self.L1... | 606.980066 | 8,956 | 0.477447 |
086822add38f6854109e85fc6ab0af61b51f92f2 | 1,910 | py | Python | rating/social_media_links.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | rating/social_media_links.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | rating/social_media_links.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
Checks whether the pages have a link to social media profiles.
"""
from rating.abstract_rater import AbstractRater
from urllib.parse import urlparse
import logging
class Rater(AbstractRater):
rating_type = 'boolean'
default_value = False
depends_on_checks = ['hyperlinks']
max_score = 1
def _... | 29.384615 | 95 | 0.518325 |
089e7359ade5430c44d15b5866ca9b6c25fc686f | 327 | py | Python | BITs/2014/Baybulatova_K_V/task1_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_K_V/task1_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_K_V/task1_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 1. Вариант 3.
#Программа, которая сообщает род деятельности и псевдоним под которым скрывается Вильгельм Аполлинарий Костровский.
#Байбулатова К.В.
#13.03.2016
print("Гийом Аполлинер,французский поэт, один из наиболее влиятельных деятелей европейского авангарда начала XX века\n")
input(" Нажмите Enter для вы... | 32.7 | 120 | 0.804281 |
08a8a93ea9f02c3a859cebabcf73cf73d87f7f22 | 25,920 | py | Python | RockVis.py | sus304/RockVis | 171298006057af63f5ef01b149324c9f0623e0dc | [
"MIT"
] | 2 | 2020-05-30T18:11:15.000Z | 2020-12-02T04:05:27.000Z | RockVis.py | sus304/RockVis | 171298006057af63f5ef01b149324c9f0623e0dc | [
"MIT"
] | null | null | null | RockVis.py | sus304/RockVis | 171298006057af63f5ef01b149324c9f0623e0dc | [
"MIT"
] | 1 | 2020-12-02T04:05:31.000Z | 2020-12-02T04:05:31.000Z | '''
MIT License
Copyright (c) 2017 Susumu Tanaka
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, pu... | 52.576065 | 239 | 0.629321 |
f5c29c3a97ca42149c39a0ac34c1686ccccc0867 | 2,780 | py | Python | tests/onegov/search/test_utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/search/test_utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/search/test_utils.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.search import ORMSearchable, Searchable
from onegov.search import utils
from sqlalchemy import Column, Integer, Text
from sqlalchemy.ext.declarative import declarative_base
def test_get_searchable_sqlalchemy_models(postgres_dsn):
Foo = declarative_base()
Bar = declarative_base()
class A(Foo):... | 26.730769 | 71 | 0.644604 |
de7ae7ee0282df876c01629f3af0f7e6b03f97ab | 137 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.1-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.1-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.1-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | def add(number1, number2):
return number1 + number2
n = 20
m = 12
result = add(n, m)
print("Sum is", result)
print(add(2.5, 3.5))
| 12.454545 | 28 | 0.620438 |
dea94e1382467ea23589f5872e0aa8b90f01131c | 459 | py | Python | dtdocker/managers/NetworkManager.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | dtdocker/managers/NetworkManager.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | dtdocker/managers/NetworkManager.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | from ..metaclasses import Singleton
class NetworkManager(metaclass=Singleton):
def __init__(self, client):
self.client = client
def create_bitso(self):
self._create_network('bitso')
def create_mssql(self):
self._create_network('mssql')
def create_poloniex(self):
sel... | 21.857143 | 66 | 0.686275 |
debdb089378efbba294d65d4e0b8e799ad546f1a | 5,663 | py | Python | scripts/create_sequences.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | scripts/create_sequences.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | scripts/create_sequences.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | """
Script to create grid(s), given input args.
"""
# Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com>
import argparse
import sys
import logging
import os
from geol.feature_extraction.pois_sequences import POISequences
from geol.geometry.squaregrid import SquareGrid
from geol.geol_logger.geol_logger import logg... | 36.772727 | 169 | 0.540879 |
decca15ecd28c06efc81fe29d03eeecd461dad4a | 3,947 | py | Python | bar_main.py | tainanpopo/ProgressBar-test | 46100ea1ada5722425eb8a8ba4fb97362e8cb1b1 | [
"MIT"
] | null | null | null | bar_main.py | tainanpopo/ProgressBar-test | 46100ea1ada5722425eb8a8ba4fb97362e8cb1b1 | [
"MIT"
] | null | null | null | bar_main.py | tainanpopo/ProgressBar-test | 46100ea1ada5722425eb8a8ba4fb97362e8cb1b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.6.3
# -*- coding: UTF-8 -*-
import sys
import time
import requests
import re
import random
from bs4 import BeautifulSoup
from urllib.request import urlretrieve
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import QThread, pyqtSignal
from PyQt5.QtWidgets import QMessageBox
from bar... | 31.325397 | 92 | 0.606283 |
c21b843d012ee9642037db0dd6e82cab272860ff | 2,564 | py | Python | pratica2_1/pratica2_1.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | pratica2_1/pratica2_1.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | pratica2_1/pratica2_1.py | samcost/POO | 5c280407abb7aa9db1c82e52c34fd372465e8fe2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class InfoArquivo:
_formatos_suportados = ["txt", "pdf", "mp4", "zip", "jpg"]
def __init__(self, nome, tamanho):
self.nome = nome
self.tamanho = tamanho
def __str__(self):
return(f'Arquivo: {self.nome} ({self.tamanho} MB)')
def excede_tamanho(self):
... | 30.52381 | 110 | 0.604914 |
c24851ca8e0a8c5fd60fcc153689f3b14411260c | 715 | py | Python | stphohapp/models.py | itechtian/stphoh | 5a778deece3a690e0ec92c799b0b87ba26f1892c | [
"MIT"
] | null | null | null | stphohapp/models.py | itechtian/stphoh | 5a778deece3a690e0ec92c799b0b87ba26f1892c | [
"MIT"
] | null | null | null | stphohapp/models.py | itechtian/stphoh | 5a778deece3a690e0ec92c799b0b87ba26f1892c | [
"MIT"
] | null | null | null | from django.db import models
class Patient(models.Model):
first = models.CharField(max_length=55, default="")
last = models.CharField(max_length=55, default="")
state = models.CharField(max_length=255, default="")
age = models.CharField(max_length=15, default="")
sex = models.CharField(max_length=1... | 39.722222 | 89 | 0.697902 |
dfd5f46fc23f78cc2a8f60e8a88676a3864d4635 | 932 | py | Python | Python/whatsapp-desktop-bot/Bot.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-03-25T14:23:58.000Z | 2021-03-25T14:23:58.000Z | Python/whatsapp-desktop-bot/Bot.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | 1 | 2021-01-15T17:03:06.000Z | 2021-02-15T10:02:07.000Z | Python/whatsapp-desktop-bot/Bot.py | DMeurer/small-projects | 3d9e714db9cd8dd8a626d9b8f0faa44325ef10e1 | [
"MIT"
] | null | null | null | import pyautogui
import time
import keyboard
import win32api, win32con
# counting variable
x=0
# click on a specific position
def click(x,y):
win32api.SetCursorPos((x,y))
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
time.sleep (0.01)
win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)
# ... | 21.674419 | 59 | 0.624464 |
5f2fe6d2ee708cad7d5e71876833b4fd70dea491 | 370 | py | Python | python/coursera_python/RICE/PPE/date_time_Ass.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/RICE/PPE/date_time_Ass.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/RICE/PPE/date_time_Ass.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from datetime import date
import datetime
#datetime.datetime(year=year,month=month,day=day,hour=hour)
def days_in_month(year, month):
return month.days
def is_valid_date(year, month, day):
tot_days = year.days+month.days+day
if tot_days == 365 or tot_days == 366:
return True
else:
return False
def days_betwe... | 21.764706 | 59 | 0.745946 |
cd225c86ee11681cbd781ede5cc3e37dec970c07 | 1,093 | py | Python | ch01_text_encoding/euc-kr.py | aisolab/17Techs | 91351921c9ac85672d29dab895d4d7df8b310a6b | [
"MIT"
] | 1 | 2021-01-10T14:32:41.000Z | 2021-01-10T14:32:41.000Z | ch01_text_encoding/euc-kr.py | aisolab/17Techs | 91351921c9ac85672d29dab895d4d7df8b310a6b | [
"MIT"
] | null | null | null | ch01_text_encoding/euc-kr.py | aisolab/17Techs | 91351921c9ac85672d29dab895d4d7df8b310a6b | [
"MIT"
] | 1 | 2021-08-14T11:23:55.000Z | 2021-08-14T11:23:55.000Z | """
1.3 EUC-KR (CP949)
EUC-KR
- 한국 산업 표준으로 지정된 한국어 문자 집합, 모든 글자가 완성된 형태로만 존재하는 완성형 코드
- 한글처럼 초성, 중성, 종성을 조합해 문자를 만들 수 없기 때문에 EUC-KR로 표현할 수 없는 한글이 일부 존재함.
- 문자하나를 표현하기 위해 2바이트를 사용
- EUC-KR에 표현하는 문자 집합의 문자 중, 아스키 코드에도 포함되는 문자를 표현할 때는 1바이트를 사용 (아스키 코드와 호환)
- 하나의 문자 집합, 하나의 문자열 인코딩
CP949
... | 37.689655 | 85 | 0.601098 |
cd7c05ab63ce2724e9a4daf66fe791437f1bc6d3 | 636 | py | Python | SoSe-21/Code-Vorlesungen/VL-8/Staedte-Multidimensionale-Listen.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Code-Vorlesungen/VL-8/Staedte-Multidimensionale-Listen.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Code-Vorlesungen/VL-8/Staedte-Multidimensionale-Listen.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # In diesem Städte-Beispiel sollen mehrdimensionale Listen gezeigt werden
# Eindimensionale Liste
# eindimensionale_liste = ["Berlin", 4_000_000]
# print(eindimensionale_liste)
mehrdimensionale_liste = [["Berlin", "DE", 4_000_000],
["Rom", "IT", 2_800_000],
["Madrid... | 31.8 | 76 | 0.621069 |
e4d409bdb653b4d09e6b2c92a6767789666bc423 | 247 | py | Python | try.py | fdienesch/Solar-System | 617096bcb525a19ee94ff86948b53bd8a65e4386 | [
"MIT"
] | null | null | null | try.py | fdienesch/Solar-System | 617096bcb525a19ee94ff86948b53bd8a65e4386 | [
"MIT"
] | null | null | null | try.py | fdienesch/Solar-System | 617096bcb525a19ee94ff86948b53bd8a65e4386 | [
"MIT"
] | null | null | null | import unittest
import xmlrunner
def runner(output='python_test_xml'):
return xmlrunner.XMLTestRunner(
output=output
)
def find_test():
return unittest.TestLoader().discover('pystache')
if __name__=='__main__':
runner().run(find_tests()) | 19 | 50 | 0.761134 |
9032b4b5231ab678989ba156f1e63a9bddc3738e | 2,121 | py | Python | projects_class.py | OrangeB0lt/interview_project_intelX | 66833f8d4c1049d33fb7a4bdeba62ec27e5b16f8 | [
"MIT"
] | null | null | null | projects_class.py | OrangeB0lt/interview_project_intelX | 66833f8d4c1049d33fb7a4bdeba62ec27e5b16f8 | [
"MIT"
] | null | null | null | projects_class.py | OrangeB0lt/interview_project_intelX | 66833f8d4c1049d33fb7a4bdeba62ec27e5b16f8 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""
Project sqlalchemy object
"""
from datetime import datetime
import uuid
import sys
from sqlalchemy import Column, String, Table, MetaData, ForeignKey
from sqlalchemy.ext.declarative import declarative_base
import storage
time = "%Y-%m-%d|%H:%M:%S"
Base = declarative_base()
class Project(Base):... | 27.907895 | 126 | 0.623762 |
5f79b675a65e84a30920517ae987417da317e606 | 4,340 | py | Python | Image Processing/Versuch D/preprocessing.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch D/preprocessing.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | Image Processing/Versuch D/preprocessing.py | vincentscode/Praktikum-Hochschule-Trier | c2802364644c889e021726a7e6babaacd8978f47 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time
from matplotlib import pyplot as plt
from operator import itemgetter
import statistics
# TIME MEASUREMENT
time0 = time.time()
# PARAMETERS
img_path = '../in.jpg'
edges_lower_thresh = 130
edges_upper_thresh = 290
lines_1 = 1
lines_2 = 3.141/300
lines_3 = 80
lines_4 = 120
lin... | 22.25641 | 75 | 0.673733 |
f2e0d50c2c598aa42b9eb787ac4bb60082569db9 | 4,710 | py | Python | wb_test/test/wbs_test/run.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | wb_test/test/wbs_test/run.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | wb_test/test/wbs_test/run.py | nussbrot/code-exchange | 3427798c4391e5f9c17cd19399ac56997c091ee2 | [
"MIT"
] | null | null | null | ###############################################################################
## VUnit specific stuff that you generally don't need to touch
# Make vunit python module importable
from os.path import join, dirname
import os
import sys
import random
path_to_vunit = join(dirname(__file__), '..', '..', '..','..', 'vunit... | 44.433962 | 127 | 0.455626 |
8a4fbb3edc8068bc4f2091a81a8db4efa12552d7 | 7,628 | py | Python | python_gui_tkinter/KALU/GARBAGE1/SAFE24JUL/ScreenGUI.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE24JUL/ScreenGUI.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE1/SAFE24JUL/ScreenGUI.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import tkinter as tk
from tkinter import *
from tkinter import font
from tkinter.filedialog import askopenfilename
from tkinter import ttk
from AppOperations import AppOperations as ao # the class build for this purpose
data_valid = 0 # to check if the data was sucessfully inserted or not!
info = [
("Name (T... | 34.990826 | 136 | 0.681175 |
0a9299f48e3df526e11425789fc8a4809e32ea61 | 1,295 | py | Python | rbac/common/task/__init__.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/common/task/__init__.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/common/task/__init__.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"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 ... | 33.205128 | 79 | 0.711969 |
7c2f4638ae26ebc542d5d28d7e92465fdbf68a0c | 1,803 | py | Python | build/dart/gen_dart_test_invocation.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/dart/gen_dart_test_invocation.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | build/dart/gen_dart_test_invocation.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import stat
import string
import sys
def main():
parser = argparse.ArgumentParser(
descriptio... | 27.738462 | 79 | 0.650028 |
7c34eb84c160537e7b9debf94a6bdfa56d723906 | 2,900 | py | Python | SBTK_League_Helper/test3.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/test3.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/test3.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | # shading = {
# 0: " ",
# 1: "░",
# 2: "▒",
# 3: "▓",
# 4: "█"}
# intro_string = ''' __ __ _ _ _
# \ \ / /__| |__ ___ _ __ ___ | |_ ___(_)
# \ \/\/ / -_) / _/ _ \ ' \/ -_) | _/ _ \_
# \_/\_/\___|_\__\___/_|_|_\___... | 38.666667 | 82 | 0.15 |
7cba9aa6f1e73d23541d75e154f6ee48f475dd57 | 65 | py | Python | src/aijack/attack/evasion/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 1 | 2022-03-17T21:17:44.000Z | 2022-03-17T21:17:44.000Z | src/aijack/attack/evasion/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | null | null | null | src/aijack/attack/evasion/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 1 | 2022-03-17T21:17:46.000Z | 2022-03-17T21:17:46.000Z | from .evasion_attack import Evasion_attack_sklearn # noqa: F401
| 32.5 | 64 | 0.830769 |
6b1a36a953bacf4e9c189ae14c3a31e846308ec2 | 120 | py | Python | python/python_new/Python 3/random.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/random.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/random.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #program to generate a random number between 0 and 9
#import the random module
import random
print(random.randint(0,9))
| 24 | 52 | 0.791667 |
866f5ba1756c87e750e4d9c6720e05b54c22029a | 305 | py | Python | PicoCTF-2017/cryptography/aes-decode.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 21 | 2016-02-06T14:30:01.000Z | 2020-09-11T05:39:17.000Z | PicoCTF-2017/cryptography/aes-decode.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | null | null | null | PicoCTF-2017/cryptography/aes-decode.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 7 | 2017-02-02T16:27:02.000Z | 2021-04-30T17:14:53.000Z | import base64
from Crypto.Cipher import AES
key = base64.b64decode("azdvtH4bvfdS/mryKLTNqQ==")
ciphertext = base64.b64decode("R9TacKHy6cf1AZho/nwWWYaNzP5GfltKE5yW+kwRYe0LY+PdGk1hfoanS/iVZ7z1")
crypter = AES.new(key, AES.MODE_ECB)
plaintext = crypter.decrypt(ciphertext).decode("utf-8")
print(plaintext)
| 30.5 | 97 | 0.803279 |
811d1a24bd11ace24d78c449794d748740fdaf7f | 209 | py | Python | 1281-subtract-the-product-and-sum-of-digits-of-an-integer/1281-subtract-the-product-and-sum-of-digits-of-an-integer.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 1281-subtract-the-product-and-sum-of-digits-of-an-integer/1281-subtract-the-product-and-sum-of-digits-of-an-integer.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 1281-subtract-the-product-and-sum-of-digits-of-an-integer/1281-subtract-the-product-and-sum-of-digits-of-an-integer.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def subtractProductAndSum(self, n: int) -> int:
_product=1
_sum=0
for c in str(n):
_product*=int(c)
_sum+=int(c)
return _product-_sum | 26.125 | 51 | 0.526316 |
d4e54d82c75acfc020ac1ea2aae621379330ccab | 11,140 | py | Python | research/cv/EDSR/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/EDSR/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/EDSR/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.489164 | 117 | 0.614811 |
078e2df7ac4cd37c1743c8eb41b4b0f4dcaa999d | 911 | py | Python | day22/paddle.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day22/paddle.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day22/paddle.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | from turtle import Turtle
POS_LEFT = "LEFT"
POS_RIGHT = "RIGHT"
class Paddle(Turtle):
def __init__(self, position) -> None:
super().__init__()
self.position = position
self.shape("square")
self.color("white")
self.shapesize(stretch_wid=5, stretch_len=1)
self.penu... | 23.973684 | 52 | 0.56202 |
0795b8294c3e777412ee20faa65492af0c6d3f14 | 32,631 | py | Python | src/Sephrasto/DatenbankEditor.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/DatenbankEditor.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/DatenbankEditor.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 18 11:29:39 2017
@author: Aeolitus
"""
import sys
from PyQt5 import QtCore, QtWidgets, QtGui
import Fertigkeiten
import Datenbank
import UI.DatenbankMain
import DatenbankEditFertigkeitWrapper
import DatenbankEditFreieFertigkeitWrapper
import DatenbankEditTalentWrapper
imp... | 46.023977 | 198 | 0.641752 |
9c620950e218383f4204312b2da172892d7e2de9 | 1,074 | py | Python | tests/unit/scalar_fields/test_normals_scalar_fields.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | tests/unit/scalar_fields/test_normals_scalar_fields.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | tests/unit/scalar_fields/test_normals_scalar_fields.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import pytest
import numpy as np
from pyntcloud.scalar_fields.normals import (
InclinationDegrees,
InclinationRadians,
OrientationDegrees,
OrientationRadians
)
@pytest.mark.parametrize("scalar_field_class, min_val, max_val", [
(
InclinationDegrees,
0,
180
),
(
... | 22.851064 | 106 | 0.666667 |
9c644930e5bd5ae8605cfce0da80a2ecddd00170 | 3,383 | py | Python | tests/nlu/conftest.py | techBeck03/rasa | 72fef6e7742f5ccb8614c75b6410dff68f137554 | [
"Apache-2.0"
] | 2 | 2020-02-27T16:41:52.000Z | 2020-02-27T16:41:57.000Z | tests/nlu/conftest.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 2 | 2020-11-13T17:15:57.000Z | 2022-02-09T23:27:36.000Z | tests/nlu/conftest.py | alfredfrancis/rasa | d8d226408f20cc2563c3aefbccef3e364a447666 | [
"Apache-2.0"
] | 3 | 2019-02-27T10:13:16.000Z | 2019-07-26T08:33:45.000Z | from typing import Text
import pytest
from rasa.nlu.config import RasaNLUModelConfig
from rasa.nlu.components import ComponentBuilder
from rasa.utils.tensorflow.constants import EPOCHS, RANDOM_SEED
from tests.nlu.utilities import write_file_config
DEFAULT_DATA_PATH = "data/examples/rasa/demo-rasa.json"
@pytest.fix... | 31.036697 | 87 | 0.593852 |
92cac9ddd3a98c63d6fc736bf53c21c86e069c54 | 2,564 | py | Python | nz_crawl_demo/day4/doutula.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day4/doutula.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day4/doutula.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | import os
import requests #请求库
from urllib import request # 下载图片用
from lxml import etree #网络解析库
from queue import Queue #队列
import threading
import re
#生产者 页面队列取出 然后下载页面中的 图片url 放入图片队列
class Producer(threading.Thread):
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537... | 31.268293 | 145 | 0.581903 |
b9a22cbee2c7ba672795e0b926ff4282725335d7 | 1,289 | py | Python | packages/watchmen-rest-dqc/src/watchmen_rest_dqc/topic_profile/topic_profile_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-dqc/src/watchmen_rest_dqc/topic_profile/topic_profile_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-dqc/src/watchmen_rest_dqc/topic_profile/topic_profile_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Optional
from fastapi import APIRouter, Depends
from watchmen_auth import PrincipalService
from watchmen_data_kernel.common import ask_all_date_formats
from watchmen_dqc.topic_profile import TopicProfileService
from watchmen_model.admin import UserRole
from watchmen_model.common import TopicId
from... | 41.580645 | 95 | 0.823119 |
b9acb6498462302cd9c7a0c9f6aa77d6ea019959 | 3,064 | py | Python | python/oneflow/framework/docstr/pooling.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/framework/docstr/pooling.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/framework/docstr/pooling.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 31.587629 | 181 | 0.663838 |
bc7d785cce52e9323264089fa020fffe3a3ae110 | 1,487 | py | Python | src/models/selfsupervised/make_surrogate_classes.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/models/selfsupervised/make_surrogate_classes.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/models/selfsupervised/make_surrogate_classes.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | from experiment.data import Environment
import datasets.divahisdb as diva
import datasets.tiles as tile
import logging
import random
from PIL import Image
import numpy as np
import math
import models.selfsupervised.discriminative as disc
from data.metrics import mean_gradient
SOURCE_NAME = 'codices_all'
size = 32
orig... | 28.056604 | 74 | 0.67922 |
bc83c602c367d2316a1f12ad63647683673ab632 | 1,620 | pyde | Python | sketches/breakout1/breakout1.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/breakout1/breakout1.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/breakout1/breakout1.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from gameworld import Paddle, Ball, Brick
bricks = []
playingGame = False
def setup():
global paddle, ball
size(605, 400)
paddle = Paddle()
ball = Ball()
for x in range(5, width - 80, 75):
addBrick(x + 37.5, 50, 3)
addBrick(x + 37.5, 70, 2)
addBrick(x + 37.5, 90, 1)
... | 23.823529 | 44 | 0.540741 |
bcdef3a1a740b275a8ee541455c8ff7697477082 | 4,159 | py | Python | Tests/Marketplace/Tests/marketplace_statistics_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Tests/Marketplace/Tests/marketplace_statistics_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Tests/Marketplace/Tests/marketplace_statistics_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import os
from Tests.Marketplace.marketplace_statistics import PackStatisticsHandler
from Tests.Marketplace.marketplace_services import Pack, load_json
from Tests.Marketplace.marketplace_constants import Metadata, PackTags
@pytest.fixture(scope="module")
def dummy_pack_metadata():
""" Fixture for du... | 35.853448 | 107 | 0.522 |
910297881a6bc9ae8a0e2803ed85de2440279e57 | 453 | py | Python | elements/python/6/24/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/6/24/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/6/24/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | def pascal(n):
"""
Computes the first n rows of Pascal's Triangle.
"""
rows = [[1]]
for i in range(1, n):
row = [1] + [rows[i-1][j] + rows[i-1][j+1] for j in xrange(i-1)] + [1]
rows.append(row)
return rows
def print_pascal(n=10):
rows = pascal(n)
assert len(rows) == n
... | 18.12 | 78 | 0.527594 |
e691b122f2e5e9760e080389d39751e910ba700d | 18,095 | py | Python | 20-fs-ias-lec/groups/13-sneakernet/code/logStore/database/sql_alchemy_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/13-sneakernet/code/logStore/database/sql_alchemy_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/13-sneakernet/code/logStore/database/sql_alchemy_connector.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from sqlalchemy import create_engine
from ..funcs.constants import CBORTABLE, EVENTTABLE, KOTLINTABLE, MASTERTABLE
from ..funcs.log import create_logger
from sqlalchemy import Table, Column, Integer, String, MetaData, Binary, func, Boolean
from sqlalchemy.orm import sessionmaker, mapper
from contextlib import contextma... | 41.789838 | 121 | 0.554628 |
fc33c96b4f0d402a364247e573268b8ad2467569 | 92 | py | Python | 2015/02/propublica-data-privacy-20150226/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/02/propublica-data-privacy-20150226/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/02/propublica-data-privacy-20150226/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 = '1ZkOCpHFNxZVFmqta7waRyNERxuXGejYwcp-mzLKjvsE'
| 23 | 68 | 0.836957 |
fc9315be19cc01573cbbde54f4afa7ab08862fc9 | 7,478 | py | Python | HeuristicSummary2.py | sdimitro/zfas | 4116072225f71415105b70e12aa461fc7466617a | [
"MIT"
] | 1 | 2019-12-21T02:32:07.000Z | 2019-12-21T02:32:07.000Z | HeuristicSummary2.py | sdimitro/zfas | 4116072225f71415105b70e12aa461fc7466617a | [
"MIT"
] | null | null | null | HeuristicSummary2.py | sdimitro/zfas | 4116072225f71415105b70e12aa461fc7466617a | [
"MIT"
] | null | null | null | from Model import Pool, MetaslabGroup, LogSpaceMapGroup
import math
class SummaryEntry(object):
def __init__(self, b, mss, blks):
assert b >= 0
assert mss > 0
assert blks > 0
self.beginTXG = b
self.endTXG = b
self.mss = mss
self.blks = blks
def addTXG(se... | 30.773663 | 105 | 0.553624 |
5df8d9caa4742679b6db5d2fbaad47cee1cb70be | 8,628 | py | Python | src/main/python/bruch/Bruch.py | dlangheiter-tgm/test-mirror | 9878da44953c40abc1df0311f275c3eebc2e876b | [
"MIT"
] | null | null | null | src/main/python/bruch/Bruch.py | dlangheiter-tgm/test-mirror | 9878da44953c40abc1df0311f275c3eebc2e876b | [
"MIT"
] | null | null | null | src/main/python/bruch/Bruch.py | dlangheiter-tgm/test-mirror | 9878da44953c40abc1df0311f275c3eebc2e876b | [
"MIT"
] | null | null | null | import math
class Bruch(object):
def __init__(self, zaehler=None, nenner=None):
""" Konstruktor
:param zaehler: Zaehler des Bruchs
:param nenner: Nenner des Bruchs
:raises ZeroDivisionError: Wenn Nenner 0 ist, kann kein Bruch berechnet werden!
"""
if isinstance(zae... | 28.95302 | 111 | 0.579972 |
5d454b404c96cafd3e1b15fc37e14450668e7f18 | 165 | py | Python | book/_build/jupyter_execute/docs/000_intro.py | tom-tubeless/Chemie | bcd10e84b341121c260526c306f86b1556a6c034 | [
"MIT"
] | null | null | null | book/_build/jupyter_execute/docs/000_intro.py | tom-tubeless/Chemie | bcd10e84b341121c260526c306f86b1556a6c034 | [
"MIT"
] | null | null | null | book/_build/jupyter_execute/docs/000_intro.py | tom-tubeless/Chemie | bcd10e84b341121c260526c306f86b1556a6c034 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Chemie am WWG
#
# Unterrichtsplanung, -inhalte und -materialien für das Fach Chemie am Wim-Wenders-Gymnasium Düsseldorf.
| 23.571429 | 104 | 0.739394 |
990662f00554cdf9a34e78aa8c5b5b1a657c5071 | 29 | py | Python | Proxverter-main/proxverter/plugins/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Proxverter-main/proxverter/plugins/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Proxverter-main/proxverter/plugins/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from .base import PluginBase
| 14.5 | 28 | 0.827586 |
54d7ee118edbb446814dc236cd347cd8034179d0 | 394 | py | Python | jiuzhang/Nine Chapters/4 Dynamic Programming I/py/UniquePaths.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | jiuzhang/Nine Chapters/4 Dynamic Programming I/py/UniquePaths.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | jiuzhang/Nine Chapters/4 Dynamic Programming I/py/UniquePaths.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
"""
@param n and m: positive integer(1 <= n , m <= 100)
@return an integer
"""
def uniquePaths(self, m, n):
# write your code here
grid = [[1 for j in range(n)] for i in range(m)]
for i in range(1, m):
for j in range(1, n):
grid[i... | 24.625 | 60 | 0.469543 |
54fd0bfeb0d886b68d18ea87a516dbff74c15c70 | 6,149 | py | Python | scrapers/add_db_entry.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | null | null | null | scrapers/add_db_entry.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | null | null | null | scrapers/add_db_entry.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | 1 | 2020-08-25T06:45:56.000Z | 2020-08-25T06:45:56.000Z | #!/usr/bin/env python3
import re
import sys
import sqlite3
import traceback
import os
__location__ = os.path.realpath(
os.path.join(
os.getcwd(),
os.path.dirname(__file__)
)
)
input_failures = 0
try:
DATABASE_NAME = os.path.join(__location__, 'data.sqlite')
conn = sqlite3.connect(DAT... | 35.33908 | 143 | 0.435193 |
07028e9fee744dcc4c1ee1a2a1c79ca889a38b8c | 1,066 | py | Python | A26 Email_senden/email.py | frankyhub/Arduin---Beispiele-I | 78c86561b4401266414acdb91a911e55c9037755 | [
"MIT"
] | null | null | null | A26 Email_senden/email.py | frankyhub/Arduin---Beispiele-I | 78c86561b4401266414acdb91a911e55c9037755 | [
"MIT"
] | null | null | null | A26 Email_senden/email.py | frankyhub/Arduin---Beispiele-I | 78c86561b4401266414acdb91a911e55c9037755 | [
"MIT"
] | null | null | null | import time
import serial
import smtplib
TO
= ‘TheReceiverEmailAddress‘
USER
= ‘YourEmailAddress‘
PASS
= ‘YourEmailPassword‘
SUBJECT = ‘PIR-Motion-Information‘
BODY
= ‘Motion was detected!‘
COMPORT = ‘COM5‘
BAUDRATE = 9600
ser = serial.Serial(COMPORT, BAUDRATE)
motionCounter = 0
def se... | 21.755102 | 53 | 0.667917 |
4ad5b52cb3f0f0a628c0aeb4390ce35b313ac800 | 577 | py | Python | Python/Sonstige_Uebungen/UTF_vonvert_to_bits.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Sonstige_Uebungen/UTF_vonvert_to_bits.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Sonstige_Uebungen/UTF_vonvert_to_bits.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
import sys
while True:
msg = input("Nachricht eingeben: ")
bits = bin(int.from_bytes(msg.encode('UTF16'), byteorder=sys.byteorder))
bits_neu = ""
for i in range (0, len(bits)):
bits_neu += bits[len(bits)-1-i]
bits_neu = str(bits)
bits_neu =... | 23.08 | 76 | 0.549393 |
919628af70e4fe3501f7f07e72be506c1890abb8 | 223 | py | Python | USACOClassLiveTest/src/measuretest.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassLiveTest/src/measuretest.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassLiveTest/src/measuretest.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | N = int(input().split(" ")[0])
cows = {}
for x in range(N):
inp = list(map(int, input().split(" ")))
if not inp[1] in cows.keys():
cows[inp[1]] = 500
cows[inp[1]] += inp[2]
print(max(cows.values()))
| 24.777778 | 44 | 0.511211 |
72bdb68daf9dbc10afa4594e0d87ee72b9b64f3d | 1,707 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v11_0/rename_production_order_to_work_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v11_0/rename_production_order_to_work_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v11_0/rename_production_order_to_work_order.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2018, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from frappe.model.rename_doc import rename_doc
from frappe.model.utils.rename_field import rename_field
import frappe
def execute():
rename_doc('DocType', 'Production Order'... | 47.416667 | 116 | 0.755126 |
22b15e75c859e4402553569cd2b499fc35ff65cb | 4,418 | py | Python | venv/lib/python3.7/site-packages/twilio/rest/studio/v2/flow_validate.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 4 | 2020-11-13T02:31:25.000Z | 2020-12-24T22:04:30.000Z | venv/lib/python3.7/site-packages/twilio/rest/studio/v2/flow_validate.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 7 | 2020-06-03T19:08:42.000Z | 2021-09-22T19:08:32.000Z | bot/lib/python3.7/site-packages/twilio/rest/studio/v2/flow_validate.py | carlosrh18/DavinciBot | d73a6b7f68d7bab25d134d3f85c6b63a86c206c5 | [
"MIT"
] | 1 | 2020-08-27T01:33:19.000Z | 2020-08-27T01:33:19.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import serialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.page im... | 29.651007 | 81 | 0.646446 |
4a2a0770ba9ab7c0d48f20ae39375ec83df64349 | 87 | py | Python | dmx/__init__.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | dmx/__init__.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | dmx/__init__.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | from ._dmx_output import DmxOutput
from ._dmx_buzzer_callback import DmxBuzzerCallback
| 29 | 51 | 0.885057 |
4a4c03ef607b22ebc2afa32424f0d9bb78a16561 | 28,840 | py | Python | __init__.py | dev-dot/calendar_manager_skill | 012802adc6dad5daf19766abefc930c895b39c45 | [
"MIT"
] | null | null | null | __init__.py | dev-dot/calendar_manager_skill | 012802adc6dad5daf19766abefc930c895b39c45 | [
"MIT"
] | 3 | 2021-07-22T17:22:05.000Z | 2021-07-22T17:22:26.000Z | __init__.py | dev-dot/calendar_manager_skill | 012802adc6dad5daf19766abefc930c895b39c45 | [
"MIT"
] | null | null | null | # pylint: disable=missing-docstring
from datetime import date, datetime, timedelta
import caldav
from caldav.lib.error import AuthorizationError
from caldav.objects import Calendar
from lingua_franca.parse import extract_datetime, extract_number
from lingua_franca.format import nice_date
from mycroft import MycroftSkil... | 40.907801 | 260 | 0.612517 |
43a7bdcf9ec8783cadc1bb5dea2c6eb2b7cf2b61 | 1,082 | py | Python | WebHostLib/api/user.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | WebHostLib/api/user.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | WebHostLib/api/user.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | from flask import session, jsonify
from WebHostLib.models import *
from . import api_endpoints
@api_endpoints.route('/get_rooms')
def get_rooms():
response = []
for room in select(room for room in Room if room.owner == session["_id"]):
response.append({
"room_id": room.id,
"se... | 32.787879 | 99 | 0.609057 |
43ab4426bf59417f8a9e21cc7b18bf356b311b8c | 1,237 | py | Python | IVTp/2014/Shcherbakov_R_A/task_08_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_08_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_08_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 8. Вариант 22.
# Доработайте игру "Анаграммы" (см. М.Доусон Программируем на Python. Гл.4)
# так, чтобы к каждому слову полагалась подсказка. Игрок должен получать право на
# подсказку в том случае, если у него нет никаких предположений. Разработайте
# систему начисления очков, по которой бы игроки, отгадавшие... | 36.382353 | 89 | 0.708973 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.