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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8741f0c38af58093d66036fe7c539110a5bcc82d | 660 | py | Python | Pythonjunior2020/Woche3/Aufgabe_3_1_4.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche3/Aufgabe_3_1_4.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche3/Aufgabe_3_1_4.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # Aufgabe 3.1.4, Woche 3, Block 1, Aufgabe 4
# Imports
from turtle import *
# Dekleration
winkel = 90
# Funktionen
def dreieck():
winkel = 120
forward(100)
left(winkel)
forward(100)
winkel = 120
left(winkel)
forward(100)
ausgabe = 'Dreieck'
len = 3
print(ausgabe)
return '... | 16.923077 | 119 | 0.657576 |
218c24f8d8fdc216e0dfe49536367198084875db | 33 | py | Python | bot.py | shinhacker/slow-motion-mein | 70739b161be011a3c0c47bf615c96906dccb5777 | [
"MIT"
] | null | null | null | bot.py | shinhacker/slow-motion-mein | 70739b161be011a3c0c47bf615c96906dccb5777 | [
"MIT"
] | null | null | null | bot.py | shinhacker/slow-motion-mein | 70739b161be011a3c0c47bf615c96906dccb5777 | [
"MIT"
] | null | null | null | print("Hello world new program")
| 16.5 | 32 | 0.757576 |
1d82752ec06425044453119e50691f64dffb7797 | 944 | py | Python | src/onegov/gazette/fields.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/fields.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/fields.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.form.fields import MultiCheckboxField as MultiCheckboxFieldBase
from onegov.form.widgets import MultiCheckboxWidget as MultiCheckboxWidgetBase
from onegov.gazette import _
class MultiCheckboxWidget(MultiCheckboxWidgetBase):
def __call__(self, field, **kwargs):
kwargs['data-expand-title'] = fi... | 32.551724 | 78 | 0.705508 |
d5814cfa0088f32a5114872b2757ba346b80ae48 | 1,507 | py | Python | other/factory_class.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | other/factory_class.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | other/factory_class.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # Beispiel zu class methods
import math
class Pizza:
def __init__(self, radius=36.0, ingredients=None):
self.radius = radius
if self.radius < 28.0:
self.radius = 28.0
elif self.radius > 64.0:
self.radius = 64.0
if ingredients:
self.ingredients = ... | 28.433962 | 91 | 0.652953 |
89317a2627fb6137b4978f666ac9e65d2dfeaf41 | 283 | py | Python | examples/miniportal/portal/macros/include_doc.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | 1 | 2015-10-26T10:38:32.000Z | 2015-10-26T10:38:32.000Z | examples/miniportal/portal/macros/include_doc.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | examples/miniportal/portal/macros/include_doc.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | import os
from flask import current_app, abort
from portal import Page
def include_doc(actors, path):
try:
page = Page(os.path.join(current_app.config['PAGES_DIR'], path + '.md'))
page.load()
return page.html_content
except IOError:
return '' | 25.727273 | 80 | 0.65371 |
895fb6ade6708bffea8b3ed5729a195f61402f2d | 767 | py | Python | nz_django/day8/djang_drf_demo/front/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_django/day8/djang_drf_demo/front/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_django/day8/djang_drf_demo/front/urls.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from django.urls import path,re_path
from rest_framework import routers
from . import views
router = routers.DefaultRouter()
router.register(r'books',views.BookViewSet)
urlpatterns = [
re_path(r'games/(?P<pk>\d+)/',views.GameCreatAPIView.as_view(),name='create_game'),
#get post
#http://127.0.0.1:8088/api... | 38.35 | 95 | 0.674055 |
988b8e93480f850376d5bb8cf7e2cccc9a08ddd8 | 1,040 | py | Python | python/coursera_python/RICE/PPE/a.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/RICE/PPE/a.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/RICE/PPE/a.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def project_to_distance(point_x,point_y,distance):
dist_to_origin = (point_x ** 2 + point_y ** 2) ** 0.5
scale = distance / dist_to_origin
print (point_x * scale, point_y * scale)
project_to_distance(2, 7, 4)
def do_stuff():
"""
Example of print vs. return
"""
print("Hello world")
ret... | 16.507937 | 91 | 0.657692 |
7f7aa2da97e3dca33fb809673185c0e69f91defe | 1,380 | py | Python | year_3/numanalysis_2/lab23/djapp/integrals/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/numanalysis_2/lab23/djapp/integrals/views.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/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from .integrals import Trapezoidal, Romberg, main_func
def index(req):
return render(req, 'index.html')
@method_decorator(csrf_exempt, name='dispatch')
def trapezoid(req... | 33.658537 | 68 | 0.676812 |
f67e244538b5a8c788c63ddc45b47677bddfb399 | 225 | py | Python | Licence 1/I11/TP6/ex1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 1/I11/TP6/ex1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 1/I11/TP6/ex1.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | from pocketgl import *
init_window ("premiers pas", 500, 500)
for index, y in enumerate(range(50)):
color = int(index / 50 * 255)
current_color(color, color, color)
box (0, y * 10, 500, y * 10 + 10)
main_loop ()
| 25 | 38 | 0.635556 |
9cf2dc71a73cbe48e6a1569a6a49508f82b2760a | 445 | py | Python | Python/itertools.combinations().py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | 1 | 2021-05-19T06:44:03.000Z | 2021-05-19T06:44:03.000Z | Python/itertools.combinations().py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | Python/itertools.combinations().py | paurav11/HackerRank | 80c91c5cc55dd56671a5906be7a106ad4f1db95e | [
"MIT"
] | null | null | null | from itertools import combinations
if __name__ == '__main__':
input_string = input().strip().split()
if input_string[0].isupper() and (int(input_string[1]) > 0 and int(input_string[1]) <= len(input_string[0])):
for i in range(1,int(input_string[1])+1):
combinations_list = sorted(list(combin... | 44.5 | 113 | 0.642697 |
149746b50ad4eba88e3f8a696c7cb20531103052 | 1,571 | py | Python | 7-assets/past-student-repos/Whiteboard-Pairing-master/LargestStack/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Whiteboard-Pairing-master/LargestStack/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Whiteboard-Pairing-master/LargestStack/model_solution.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | class Stack:
def __init__(self):
self.items = []
def push(self, item):
self.items.append(item)
def pop(self):
if len(self.items) > 0:
return self.items.pop()
else:
return None
def peek(self):
if len(self.items) > 0:
return se... | 24.546875 | 52 | 0.583068 |
0d0dee11379ddcb258ea371b9fda45f5ae55c0aa | 4,880 | py | Python | Scholien/views.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | Scholien/views.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | Scholien/views.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from Grundgeruest.views import DetailMitMenue, ListeMitMenue, TemplateMitMenue
from . import models
from django.db import transaction
import sqlite3 as lite
from django.conf impor... | 37.251908 | 88 | 0.65082 |
0d4856aac3793ec416b7951e6ed1c02c3ececd27 | 1,003 | py | Python | scoutlab-2018/stimmungsboard/appendix/Python-Code/Programm.py | joek/vcp-scoutlab.github.io | 343c9116b49c5dbeb399a1c421b97ab7852c8ec3 | [
"MIT"
] | 1 | 2018-08-20T10:13:11.000Z | 2018-08-20T10:13:11.000Z | scoutlab-2018/stimmungsboard/appendix/Python-Code/Programm.py | joek/vcp-scoutlab.github.io | 343c9116b49c5dbeb399a1c421b97ab7852c8ec3 | [
"MIT"
] | 3 | 2017-08-17T17:47:55.000Z | 2018-02-22T09:09:55.000Z | scoutlab-2018/stimmungsboard/appendix/Python-Code/Programm.py | joek/vcp-scoutlab.github.io | 343c9116b49c5dbeb399a1c421b97ab7852c8ec3 | [
"MIT"
] | 2 | 2020-10-03T09:03:25.000Z | 2020-10-03T09:11:07.000Z | from serial import Serial, SerialException
from requests import Session, get
from hashlib import md5
pwd = "1234"
try:
with Serial("COM7", 9600) as ser:
while True:
(plus, mitte, minus, avr) = str(ser.readline(), "utf-8").replace("\n","").replace("\r","").split("|")
tim... | 37.148148 | 141 | 0.56331 |
b4d2cdf1cf82d1af42a00b766e1a603527b9062d | 542 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/setup.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/setup.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/setup.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | from setuptools import find_packages, setup
setup(
name="patterns",
packages=find_packages(),
description="A collection of design patterns and idioms in Python.",
classifiers=[
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language ... | 31.882353 | 72 | 0.607011 |
2c0377b3504f5cec376976d7d623efae7372ae47 | 363 | py | Python | cpp_project/basic-skills/zmq-demo/hello_world_server.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | 1 | 2018-12-30T14:07:42.000Z | 2018-12-30T14:07:42.000Z | cpp_project/basic-skills/zmq-demo/hello_world_server.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | cpp_project/basic-skills/zmq-demo/hello_world_server.py | sinomiko/project | 00fadb0033645f103692f5b06c861939a9d4aa0e | [
"BSD-3-Clause"
] | null | null | null | import zmq
import time
context = zmq.Context()
#socket = context.socket(zmq.REP)
#socket = context.socket(zmq.DEALER)
socket = context.socket(zmq.PUB)
socket.bind("tcp://*:5555")
i=0
while True:
# message = socket.recv()
# print "Received request: ", message
time.sleep(3)
print socket.send("%s %d"%("World",i))
i=i... | 20.166667 | 39 | 0.674931 |
257421703cea593af1f5bfd8ae86267d35b9807e | 529 | py | Python | main.py | leonardoarthur/TypeRun | 4afd4af6ae72c5c31c3cdd2e7dac81bd88834419 | [
"MIT"
] | 1 | 2021-05-02T09:03:12.000Z | 2021-05-02T09:03:12.000Z | main.py | leonardoarthur/TypeRun | 4afd4af6ae72c5c31c3cdd2e7dac81bd88834419 | [
"MIT"
] | null | null | null | main.py | leonardoarthur/TypeRun | 4afd4af6ae72c5c31c3cdd2e7dac81bd88834419 | [
"MIT"
] | null | null | null | import requests
import random
import time
url = 'https://www.mit.edu/~ecprice/wordlist.10000'
resposta = requests.get(url)
palavras = resposta.content.splitlines()
palavras = [palavra.decode('utf-8') for palavra in palavras]
random_palavras = random.sample(palavras, 10)
pontos = 0
tic = time.perf_counter()
for pal... | 22.041667 | 60 | 0.729679 |
2582440f4934aecfc2290d695496645f23bca001 | 2,662 | py | Python | Imagenes/FC72/Diameter/Hutter_Re.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/FC72/Diameter/Hutter_Re.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | Imagenes/FC72/Diameter/Hutter_Re.py | efogliatto/Tesis | 058fa0c2e23cd538621d17d41bb216a4db4d211a | [
"CC0-1.0"
] | null | null | null | import numpy as np
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import collections
import argparse
import locale
if __name__ == "__main__":
# Argumentos de consola
parser = argparse.ArgumentParser(description='Comparacion con datos de Hutter')
parser.add_argument('... | 17.174194 | 96 | 0.556724 |
2592da6b3690c876d521cbe1171979f8297ef6fa | 1,825 | py | Python | Kapitel_1/_4_Klassenattribute_3.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | 1 | 2020-12-24T15:42:54.000Z | 2020-12-24T15:42:54.000Z | Kapitel_1/_4_Klassenattribute_3.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | Kapitel_1/_4_Klassenattribute_3.py | Geralonx/Classes_Tutorial | 9499db8159efce1e3c38975b66a9c649631c6727 | [
"MIT"
] | null | null | null | # --- Vererbung von Klassenattributen ---#
# --- Klassendeklaration mit einem Klassenattribut --- #
class PC:
klassen_attribut = "Ich bin ein Klassenattribut"
# --- Klassendeklaration ohne Inhalt, aber mit Elternklasse --- #
class PC2(PC):
pass
# --- Instanziierung der beiden Klassen --- #
pc1_instanz = PC(... | 40.555556 | 223 | 0.621918 |
d32f1fd1d4039ef130b19d52b21afa29d7e4d406 | 5,846 | py | Python | research/cv/rcnn/src/utils/util.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/rcnn/src/utils/util.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/rcnn/src/utils/util.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... | 27.971292 | 120 | 0.576976 |
d3486ec1aa8b38b2c451ebc8fee4db05ca6b84a5 | 2,719 | py | Python | src/onegov/wtfs/views/notfication.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/views/notfication.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/views/notfication.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath import redirect
from onegov.wtfs import _
from onegov.wtfs import WtfsApp
from onegov.wtfs.collections import NotificationCollection
from onegov.wtfs.forms import NotificationForm
from onegov.wtfs.layouts import AddNotificationLayout
from onegov.wtfs.layouts import EditNotificationLayout
from onegov.wtfs.... | 26.144231 | 63 | 0.70982 |
6ce749da8f2f728e4ae10eb10e2d47b5fa3dcac4 | 3,974 | py | Python | yolov5-coreml-tflite-converter/tflite/tf_utils/io_order.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_utils/io_order.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_utils/io_order.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | from constants import IMAGE_NAME, IOU_NAME, CONF_NAME, BOUNDINGBOX_NAME, CLASSES_NAME, SCORES_NAME, NUMBER_NAME, \
PREDICTIONS_NAME
class IOOrder:
def __init__(self, model_parameters):
self.model_parameters = model_parameters
def get_output_order(self, interpreter):
if self.model_paramete... | 60.212121 | 114 | 0.631857 |
6cfa295e6527a90287b7c93e916c5695ffcaec07 | 2,586 | py | Python | py-td3-cinema/t.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td3-cinema/t.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | py-td3-cinema/t.py | HuguesGuilleus/istyPOO | f460665799be2b2f34a1ebaa9878e06bb028a410 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GLib
class EntryWindow(Gtk.Window):
def __init__(self):
Gtk.Window.__init__(self, title="Entry Demo")
self.set_size_request(200, 100)
# self.timeout_id = None
... | 31.536585 | 73 | 0.645785 |
9fca67ca61a50620121d6bc5aea4ab490327a739 | 141 | py | Python | Pythonjunior2020/Woche1/Aufgabe_1_4_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_4_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_4_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # 1.4.3, Woche 1, Block 3, Aufgabe 2
# Dekleration
reihe = 18
platz = "A"
# Ausgabe
print("Ich sitze in Reihe",reihe,"auf Platz",platz+".") | 17.625 | 55 | 0.652482 |
4ce97a7e4bd2a5c915a1951c51afadcdd9ca1fb3 | 472 | py | Python | Veranstaltungen/migrations/0003_veranstaltung_preis.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | Veranstaltungen/migrations/0003_veranstaltung_preis.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | Veranstaltungen/migrations/0003_veranstaltung_preis.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-05-08 14:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Veranstaltungen', '0002_medium_link'),
]
operations = [
migrations.AddField... | 22.47619 | 66 | 0.627119 |
e257503a140cea0562fa0d00ac84da560ba5daff | 3,861 | py | Python | project/flaskr/app.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 5 | 2020-03-21T12:58:10.000Z | 2020-03-23T13:02:18.000Z | project/flaskr/app.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 26 | 2020-03-20T21:04:20.000Z | 2020-04-30T19:38:02.000Z | project/flaskr/app.py | Hackathon2020/CoronaHackathon2020 | 1f27ad7406c9da50a3acfb48f970a0b0b51c47da | [
"MIT"
] | 1 | 2020-05-08T20:45:20.000Z | 2020-05-08T20:45:20.000Z | # TODO: Import muss noch angepasst werden, wenn von Konsole gestartet wird
import pathlib
from flask import Flask, render_template, redirect, request
from project.flaskr import static_folder, template_folder
from project.flaskr.routes.questionaire import get_questionaire_blueprint
from project.questions_from_json impo... | 36.771429 | 180 | 0.592593 |
393ba52db9da03ab902af5a2f1a7069af51b3c60 | 12,406 | py | Python | Scripts/diffBrAPIVersions.py | HuttonICS/API | 22d61759a77f2ab3c4e610bb251684c78f71d2e6 | [
"MIT"
] | 40 | 2016-09-13T12:54:11.000Z | 2021-09-05T18:45:38.000Z | Scripts/diffBrAPIVersions.py | HuttonICS/API | 22d61759a77f2ab3c4e610bb251684c78f71d2e6 | [
"MIT"
] | 351 | 2016-08-10T17:58:38.000Z | 2021-09-15T12:19:48.000Z | Scripts/diffBrAPIVersions.py | HuttonICS/API | 22d61759a77f2ab3c4e610bb251684c78f71d2e6 | [
"MIT"
] | 32 | 2016-09-09T16:04:01.000Z | 2021-01-21T13:27:40.000Z | #! /usr/bin/env python
## Usage
## diffBrAPIVersions.py [-d][-m][-a][-v] lowerVersionFilePath higherVersionFilePath > outputFilePath
import sys
import re
import yaml
from dereferenceAll import dereferenceBrAPI
sep = '|'
def go():
optionStr = ''
lowerVersionFilePath = ''
higherVersionFilePath = ''
... | 48.272374 | 177 | 0.62502 |
64b9d7fcdc9d43d3de0e9d68406a181493e889b1 | 4,641 | py | Python | src/bo4e/enum/voraussetzungen.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/voraussetzungen.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/voraussetzungen.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring, line-too-long
from bo4e.enum.strenum import StrEnum
class Voraussetzungen(StrEnum):
"""
Voraussetzungen, die erfüllt sein müssen, damit dieser Tarif zur Anwendung kommen kann.
"""
EINZUGSERMAECHTIGUNG = "EINZUGSERMAECHTIGUNG" #: Einzugsermaechtigung
ZE... | 60.272727 | 174 | 0.757164 |
37bd31c9a83e94b0d67496b13930297f14c05ac2 | 173 | py | Python | src/onegov/event/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/event/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/event/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.event.models.event import Event, EventFile
from onegov.event.models.occurrence import Occurrence
__all__ = (
'Event',
'EventFile',
'Occurrence',
)
| 17.3 | 54 | 0.716763 |
80bcabbaafb1719be627b5427c973283d89aa275 | 189 | py | Python | Utils/__init__.py | Drageast/Die_Botin | b574166a37c0f92c34db99931c8c894390fbead9 | [
"BSD-3-Clause"
] | null | null | null | Utils/__init__.py | Drageast/Die_Botin | b574166a37c0f92c34db99931c8c894390fbead9 | [
"BSD-3-Clause"
] | null | null | null | Utils/__init__.py | Drageast/Die_Botin | b574166a37c0f92c34db99931c8c894390fbead9 | [
"BSD-3-Clause"
] | null | null | null | from .ErrorHandler import *
from .Database_Preconditioning import DBPreconditioning
from .Util import TimeSend, ChannelSending, Pagination, WrapperDecorator, Farbe, YamlContainerManagement
| 47.25 | 104 | 0.862434 |
ff6c33dbb4ffbe7dc10d797f366c010ccfd93ae3 | 1,704 | py | Python | docker/django/restaurant/restapi/views/restaurant_views.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 3 | 2019-08-29T10:14:40.000Z | 2021-03-05T09:50:15.000Z | docker/django/restaurant/restapi/views/restaurant_views.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | null | null | null | docker/django/restaurant/restapi/views/restaurant_views.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 1 | 2021-03-05T09:50:29.000Z | 2021-03-05T09:50:29.000Z | from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from rest_framework.views import APIView
from restapi.models.restaurant import Restaurant
from restapi.serializers import RestaurantSerializer
class RestaurantView(APIView):
permission_classes = (IsAuthenticated,)
... | 34.77551 | 79 | 0.63439 |
2b963580fdc083b7ca378594c06abb1b69f44c43 | 200 | py | Python | USACOClassGold/src/genhayforsale.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassGold/src/genhayforsale.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | USACOClassGold/src/genhayforsale.py | javaarchive/USACOClass2020 | 4ae563014b9b2da3e1361e175d38e72308a8da89 | [
"MIT"
] | null | null | null | import random
import sys
# print(sys.argv)
count = int(sys.argv[1])
capacity = int(sys.argv[2])
print(str(capacity) + " " + str(count))
for i in range(count):
print(random.randint(1,capacity - 1)) | 25 | 41 | 0.68 |
a673b71ca97f1a46ddd08933fd1e20bf9e918226 | 5,353 | py | Python | migrations/versions/6cc0f21ecf76_.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | migrations/versions/6cc0f21ecf76_.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | 35 | 2022-01-24T22:15:59.000Z | 2022-03-31T15:01:35.000Z | migrations/versions/6cc0f21ecf76_.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 6cc0f21ecf76
Revises: af5ea35acbbb
Create Date: 2022-01-25 14:05:25.311433
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "6cc0f21ecf76"
down_revision = "af5ea35acbbb"
branch_labels = None
depends_on = None
def upgrade():
# #... | 41.176923 | 88 | 0.628246 |
34624c8a15ff91a45d66be8add44d7a179499029 | 831 | py | Python | generate_project_pages.py | marcus-voss/hugo-website | 048b4cae32312a1df990b038dc9a93c3eb6f4832 | [
"MIT"
] | null | null | null | generate_project_pages.py | marcus-voss/hugo-website | 048b4cae32312a1df990b038dc9a93c3eb6f4832 | [
"MIT"
] | null | null | null | generate_project_pages.py | marcus-voss/hugo-website | 048b4cae32312a1df990b038dc9a93c3eb6f4832 | [
"MIT"
] | null | null | null | import json
from pprint import pprint
from urllib.request import urlopen
from datetime import date, datetime
import os
URL = "https://correlaid.github.io/projects/projects.json"
MD_TEMPLATE = """---
title: "{0}"
date: {1}
project_id_path: "{2}"
---
# {0}
"""
# get list of projects from github pages
j = urlopen(URL)
... | 24.441176 | 71 | 0.600481 |
3474a70fd81e07edce4afeac50c3b5f9980db4e9 | 18,116 | py | Python | tests/onegov/election_day/common.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/common.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/common.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import os
import tarfile
from datetime import date
from io import BytesIO
from onegov.core.utils import module_path
from onegov.core.utils import append_query_param
from onegov.election_day.formats import import_election_wabstic_proporz
from onegov.election_day.models import Canton
from onegov.election_day.models impo... | 31.950617 | 79 | 0.598752 |
943a90f66346b8e2c92096cf8bcbe323d759a4ed | 1,614 | py | Python | CareerTinderServer/CareerTinder/resume_upload.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | 1 | 2016-09-18T16:40:27.000Z | 2016-09-18T16:40:27.000Z | CareerTinderServer/CareerTinder/resume_upload.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | CareerTinderServer/CareerTinder/resume_upload.py | sarojaerabelli/HVGS | 86ec3d2de496540ca439c40f4a0c58c47aa181cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from CareerTinder.models import Hiree
from CareerTinder.forms import InputHireeForm
from django.shortcuts import r... | 33.625 | 76 | 0.601611 |
84fb0ea88eaeb996a6d01b8537bbe99448979080 | 648 | py | Python | Shivani/month.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/month.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/month.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | month = int(input("enter number between 1 to 12\n"))
if(month == 1):
print("January, 31 Days")
elif(month == 2):
print("February, 28 Days")
elif(month == 3):
print("March, 31 Days")
elif(month == 4):
print("April, 30 Days")
elif(month == 5):
print("May, 31 days")
elif(month == 6):
print("June, 3... | 23.142857 | 52 | 0.58642 |
ca7d864bbb6d339759a0615750e388dd3485d0f1 | 25 | py | Python | Hack.lu/2020/right-spot/flag.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Hack.lu/2020/right-spot/flag.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Hack.lu/2020/right-spot/flag.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | flag = "flag{fake_flag}"
| 12.5 | 24 | 0.68 |
0481eec4bc56e91ba629bafa6a1127488335e96e | 198 | py | Python | DataStructures/LinkedList/Reverse.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/LinkedList/Reverse.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/LinkedList/Reverse.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
def Reverse(head):
cur = head
prev = None
while cur:
temp = cur.next
cur.next = prev
prev = cur
cur = temp
head = prev
return head
| 15.230769 | 23 | 0.510101 |
04bfa905b41c26762a661d5151be9685f9f60124 | 92 | py | Python | 2015/03/table-women-parliaments-20150310/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2015/03/table-women-parliaments-20150310/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2015/03/table-women-parliaments-20150310/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 = '1BudVbK-fu02Gxl9O5P3fKfu7DVBmQ25IDzdvqCjnb0o'
| 23 | 68 | 0.836957 |
04d8c641c4ab2317e527208c366c1a0153945b99 | 1,243 | py | Python | nz_tornado02/app/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_tornado02/app/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_tornado02/app/views.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | import tornado.web
from .models import create_db,drop_db,Students
from utils.db import session
class IndexHandler(tornado.web.RequestHandler):
def get(self):
self.write('hello tornado')
class TindexHandler(tornado.web.RequestHandler):
def get(self):
item = ['苍老师','波老师','龙老师','吉老师']
item... | 31.871795 | 81 | 0.624296 |
6d2918e2ad2e590a9ba447d90c210d800f64f741 | 52 | py | Python | python/python_backup/PRAC_PYTHON/3_Fibonacci_t.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/3_Fibonacci_t.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/3_Fibonacci_t.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | a,b=0,1
while b<20:
print(b,end =",")
a,b=b,a+b | 13 | 19 | 0.5 |
edf82de5be62f13f7e2b507c69b8b6442babed30 | 1,208 | py | Python | utils/ebutils.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | utils/ebutils.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | utils/ebutils.py | jenniferxkuo/ultramisc | 65bff53c97715eb9a24acc62b77460f22e0dabc6 | [
"MIT"
] | null | null | null | import os
def read_echob_metadata(rawfile):
'''
Gather information about a .raw file from its .img.txt file.
For legacy .raw data without a header; if a header exists,
use ultratils utilities.
Inputs: a .raw file, which is assumed to have an .img.txt file
with the same base name.
Outputs... | 33.555556 | 88 | 0.624172 |
61275bfe605235dcc2f658b915df5d6869057e6d | 840 | py | Python | Licence 1/I22/TP 6/tp.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 1/I22/TP 6/tp.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 1/I22/TP 6/tp.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | import struct
# with open("prog_1.pyc", "rb") as file:
# file.read(2)
# content = file.read()
# version = struct.pack('H', 3379)
#
# n_file = open("prog_1_n.pyc", "xb")
# n_file.write(version + content)
# n_file.close()
def affiche_structure(fichier):
with open(fichier, "rb+") as file:
... | 27.096774 | 84 | 0.597619 |
1e3e1e8e8fea9aba36fb31aa49cf7751fdc533c4 | 263 | py | Python | src/logging/console/console_logger.py | MBogert/ReminderCory | a687c70a12f49a807d9fb023d45f799292a37f26 | [
"MIT"
] | null | null | null | src/logging/console/console_logger.py | MBogert/ReminderCory | a687c70a12f49a807d9fb023d45f799292a37f26 | [
"MIT"
] | null | null | null | src/logging/console/console_logger.py | MBogert/ReminderCory | a687c70a12f49a807d9fb023d45f799292a37f26 | [
"MIT"
] | null | null | null |
class ConsoleLogger:
def __init__(self):
def log_console(message):
print(message + "\n")
def log_console_newline(num_lines=1):
for x in range(num_lines):
print("\n")
def log_console_tab(num_tabs=1):
for x in range(num_tabs):
print("\t")
| 14.611111 | 38 | 0.673004 |
1eaa588d84350ab3ec86c03c33bed841a578f921 | 1,269 | py | Python | highscorelist.py | BogyMitutoyoCTL/Riesen-Tetris | 8bbbaf0b7aeae7890da724d3d72719a7d068237a | [
"MIT"
] | 1 | 2019-04-27T07:28:52.000Z | 2019-04-27T07:28:52.000Z | highscorelist.py | BogyMitutoyoCTL/Riesen-Tetris | 8bbbaf0b7aeae7890da724d3d72719a7d068237a | [
"MIT"
] | null | null | null | highscorelist.py | BogyMitutoyoCTL/Riesen-Tetris | 8bbbaf0b7aeae7890da724d3d72719a7d068237a | [
"MIT"
] | null | null | null | import pickle
from datetime import datetime
class Highscoreentry:
def __init__(self, date: datetime.date, name: str, point: int):
self.date = date # type: datetime.date
self.name = name
self.points = point
def __repr__(self):
return str(self.points) + " " + self.name + " " + ... | 26.4375 | 88 | 0.599685 |
949978f50644bbde4a666356ec7405c33bdb3207 | 338 | py | Python | tests/onegov/org/test_views_qr_code.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_qr_code.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/org/test_views_qr_code.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null |
def test_qr_code_view(client):
assert client.get('/qrcode?payload=hello').content_type == 'image/png'
assert client.get('/qrcode?img_format=jpeg').content_type == 'image/jpeg'
assert client.get('/qrcode?img_format=gif').content_type == 'image/gif'
assert client.get('/qrcode?encoding=base64').content_ty... | 48.285714 | 77 | 0.721893 |
eca164b709bf5878180100b5abc5c4982c57ed64 | 6,867 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_info.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_info.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_info.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | # -*- coding: utf-8 -*-
from builtins import str
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtCore import QObject, QStandardPaths
from qgis.core import Qgis, QgsMessageLog
import os
import sys
class gtoInfo(QObject):
def __init__(self, logobject):
super(gtoInfo, self).__init__()
self.log... | 35.580311 | 121 | 0.544051 |
ecbc9842666d0e57fa98175fa382661376923ac2 | 300 | py | Python | Competitions-Challenges/Google CodeJam/Foregone Solution/solution.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Competitions-Challenges/Google CodeJam/Foregone Solution/solution.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Competitions-Challenges/Google CodeJam/Foregone Solution/solution.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | t = int(input())
def find_four(a):
res = ''
for i in a:
if i == '4':
res = res + '1'
else:
res = res + '0'
return res
for case in range(t):
a = input()
k = find_four(a)
print('Case #{0}: {1} {2}'.format(case+1, int(a)-int(k), int(k))) | 20 | 69 | 0.433333 |
ecbf78219297fd4b93aed322029bd281e7f64c93 | 15,511 | py | Python | research/audio/wavenet/src/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/audio/wavenet/src/loss.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/audio/wavenet/src/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... | 34.392461 | 117 | 0.653923 |
e58c7509aa319e07d61c453f30aa0812157ccc26 | 353 | py | Python | python/python_backup/PRAC_PYTHON/srt.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/srt.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/srt.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | l=[]
l1=[]
for i in range(0,5,1):
k=input("enter no")
k1=input("enter name")
l.insert(i,k)
l1.insert(i,k1)
for i in range(0,5,1):
print l[i]
print l1[i]
for i in range(0,4,1):
for j in range(i+1,5,1):
if l[i]>l[j]:
t=l[i]
l[i]=l[j]
l[j]=t
for i in range(0,5,1):
... | 16.809524 | 26 | 0.478754 |
006039c8bb5531b893421da9960537311b59fcfb | 1,711 | py | Python | sh/module/history/script/_history_analysis.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 5 | 2017-04-18T20:21:06.000Z | 2020-12-28T05:44:39.000Z | sh/module/history/script/_history_analysis.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 35 | 2016-09-21T18:04:51.000Z | 2020-03-11T02:39:20.000Z | sh/module/history/script/_history_analysis.py | username4gh/dotfiles | 6ab3e6a7eecb82f01fadfa40a961164df34af091 | [
"Unlicense"
] | 2 | 2018-12-17T03:16:35.000Z | 2020-10-18T10:09:01.000Z | #! /usr/bin/env python3
# coding=UTF-8
import os
import sys
BASH_HISTORY = os.path.join(os.environ.get('HOME'), '.bash_history')
BASH_HISTORY_ARCHIVE = os.path.join(os.environ.get('HOME'), '.bash_history.archive')
TMP = dict()
def _is_legit_command(line):
if '#' in line:
return False
if '[' in li... | 21.658228 | 84 | 0.583869 |
68c050b63c1ea814cf652375317c60a66a4c6ea6 | 1,366 | py | Python | loesungsvorschlaege/python_wiederholung/praxis/wdh_2.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | loesungsvorschlaege/python_wiederholung/praxis/wdh_2.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | loesungsvorschlaege/python_wiederholung/praxis/wdh_2.py | severinhaller/einf-machinelearning | 4dfc8f1da0d81c5aa800d1459f81b72d1bf6dd9b | [
"MIT"
] | null | null | null | # Lösungen zu den Kurzaufgaben (Abschnitt 5)
# Aufgabe 1
ducktales = ["Tick", "Trick", "Track"]
print(ducktales)
print()
# Aufgabe 2
chaos = ["42", 42.0, 42]
print(f"Typ der Liste: {type(chaos)}")
print(f"Typ für das 1. Element in der Liste (Index 0): {type(chaos[0])}")
print(f"Typ für das 2. Element in der Liste (In... | 27.32 | 112 | 0.677892 |
d43b20bdf48b508955370ca86e1f1e0a5fb55f9b | 3,463 | py | Python | Python/tree/quad_tree.py | li195111/Algorithm | 35df3c885b4ebec010c41eec4560bcd46d59588e | [
"MIT"
] | null | null | null | Python/tree/quad_tree.py | li195111/Algorithm | 35df3c885b4ebec010c41eec4560bcd46d59588e | [
"MIT"
] | null | null | null | Python/tree/quad_tree.py | li195111/Algorithm | 35df3c885b4ebec010c41eec4560bcd46d59588e | [
"MIT"
] | null | null | null | from typing import List
class QuadTreeNode:
def __init__(self, val, isLeaf, topLeft=None, topRight=None, bottomLeft=None, bottomRight=None):
self.val = val
self.isLeaf = isLeaf
self.topLeft = topLeft
self.topRight = topRight
self.bottomLeft = bottomLeft
self.bottomRi... | 40.741176 | 100 | 0.583598 |
2e40fb8d8c09ad5ebd1b5079e761a4ca6cae9d00 | 3,097 | py | Python | top/clearlight/reptile/bilibili/bj_tech_mooc/re_bs4_example_03_stock.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | 1 | 2020-01-16T09:23:43.000Z | 2020-01-16T09:23:43.000Z | top/clearlight/reptile/bilibili/bj_tech_mooc/re_bs4_example_03_stock.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | top/clearlight/reptile/bilibili/bj_tech_mooc/re_bs4_example_03_stock.py | ClearlightY/Python_learn | 93b9b7efae5a1cf05faf8ee7c5e36dcc99c7a232 | [
"Apache-2.0"
] | null | null | null | # 股票数据定向爬虫
import re
import requests
from bs4 import BeautifulSoup
import traceback
# 函数功能:原始数据爬取
def getHtmlText(url):
try:
r = requests.get(url)
# r.encoding = r.apparent_encoding
r.encoding = 'utf-8'
r.raise_for_status()
# print(r.text[-500:])
return r.text
e... | 31.927835 | 106 | 0.529222 |
5ceacdc71b2f56306d2396ce314105577b7550b2 | 2,050 | py | Python | hisim/components/genericsurpluscontroller.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 12 | 2021-10-05T11:38:24.000Z | 2022-03-25T09:56:08.000Z | hisim/components/genericsurpluscontroller.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 6 | 2021-10-06T13:27:55.000Z | 2022-03-10T12:55:15.000Z | hisim/components/genericsurpluscontroller.py | sdickler/HiSim | 09a11d99f220f7cadb3cb7b09a6fce8f147243c8 | [
"MIT"
] | 4 | 2022-02-21T19:00:50.000Z | 2022-03-22T11:01:38.000Z | from hisim import component as cp
from hisim import loadtypes as lt
from hisim.simulationparameters import SimulationParameters
class GenericSurplusController(cp.Component):
ElectricityInput = "ElectricityInput"
State = "State"
def __init__(self,my_simulation_parameters: SimulationParameters , mode=1):
... | 38.679245 | 97 | 0.528293 |
5cec8642aa69ac45a6fc64049e34617afeb58987 | 1,791 | py | Python | addpdfs.py | carlosmalt/ucsc-homepage | 6eda1ebc597effcc90f8acf7ccdedc7bf1ef7a35 | [
"MIT"
] | null | null | null | addpdfs.py | carlosmalt/ucsc-homepage | 6eda1ebc597effcc90f8acf7ccdedc7bf1ef7a35 | [
"MIT"
] | null | null | null | addpdfs.py | carlosmalt/ucsc-homepage | 6eda1ebc597effcc90f8acf7ccdedc7bf1ef7a35 | [
"MIT"
] | null | null | null | import os, sys
import shutil, stat
#import base64
#from Foundation import *
# Don't need this function (yet)
#def decode_bdisk(key):
# """Return the relative path of file referenced by key """
# decodedBytes = base64.b64decode(key)
# nsData = NSData.dataWithBytes_length_(decodedBytes, len(decodedBytes))
# ... | 36.55102 | 80 | 0.622557 |
cf7fe3f72a7c41f4b1b3ae11c5c712b2aec50d6e | 1,712 | py | Python | scripts/upload_report.py | srespondek/aws-pgbadger-analyzer | a716c4596e0d08f83cfd550159bf963ee8517b4c | [
"MIT"
] | null | null | null | scripts/upload_report.py | srespondek/aws-pgbadger-analyzer | a716c4596e0d08f83cfd550159bf963ee8517b4c | [
"MIT"
] | null | null | null | scripts/upload_report.py | srespondek/aws-pgbadger-analyzer | a716c4596e0d08f83cfd550159bf963ee8517b4c | [
"MIT"
] | null | null | null | import os
import boto3
import datetime
import logging
import sys
ENVIRONMENT = os.environ['ENVIRONMENT']
TENANT = os.environ['TENANT']
BUCKET_NAME = os.environ['BUCKET_NAME']
class InitClientException(Exception):
pass
def get_logger(name=__name__):
stdout_handler = logging.StreamHandler(sys.stdout)
... | 21.4 | 106 | 0.647196 |
d8ed8734344ffe1a06a15bdf47b61459af6c8e05 | 383 | py | Python | pacman-arch/test/pacman/tests/upgrade011.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade011.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/upgrade011.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Upgrade a package with a filesystem conflict"
p = pmpkg("dummy", "2.0-1")
p.files = ["bin/dummy", "usr/share/file"]
self.addpkg(p)
lp = pmpkg("dummy", "1.0-1")
lp.files = ["bin/dummy"]
self.addpkg2db("local", lp)
self.filesystem = ["usr/share/file"]
self.args = "-U %s" % p.filename()
self.addru... | 22.529412 | 65 | 0.665796 |
2b2bd91c1b8dc2d5b6f720b33106fe41491be2df | 423 | py | Python | DDPG/te_DDPG_model.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | 2 | 2021-01-06T09:45:23.000Z | 2021-04-21T09:39:14.000Z | DDPG/te_DDPG_model.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | null | null | null | DDPG/te_DDPG_model.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
@File : te_DDPG_model.py
@Time : 2020/12/14
@Author : Yuan Yifu
"""
# from puckworld_continuous import PuckWorldEnv
from puckworld_con_enemy import PuckWorldEnv
from DDPG_agent import DDPGAgent
from utils import learning_curve
env = PuckWorldEnv()
agent = DDPGAgent(env)
agent.loa... | 22.263158 | 66 | 0.756501 |
41d14ca01f04e900865475a76f4f03d461b20620 | 3,584 | py | Python | PopulationLib/GroupPlanting.py | realasberg/pyMANGA | c253ebc52a9d71e35b778735a7375ffc9d37aa69 | [
"MIT"
] | null | null | null | PopulationLib/GroupPlanting.py | realasberg/pyMANGA | c253ebc52a9d71e35b778735a7375ffc9d37aa69 | [
"MIT"
] | null | null | null | PopulationLib/GroupPlanting.py | realasberg/pyMANGA | c253ebc52a9d71e35b778735a7375ffc9d37aa69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@date: 2018-Today
@author: jasper.bathmann@ufz.de
"""
import numpy as np
if __name__ == '__main__' and __package__ is None:
from os import sys, path
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
import PopulationLib as PLib
from Population... | 36.948454 | 79 | 0.56529 |
8fa4cab60e41fea974c5fb493dc241434574bb7b | 117 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 15/15.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | 50-Python-Exercises/Exercises/Exercise 15/15.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | 50-Python-Exercises/Exercises/Exercise 15/15.py | kuwarkapur/Hacktoberfest-2022 | efaafeba5ce51d8d2e2d94c6326cc20bff946f17 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #Create a dictionary of two keys, a and b and two values 1 and 2 for keys a and b respectively.
d = {"a": 1, "b": 2}
| 39 | 95 | 0.65812 |
89160814ed644462b36ae0319f872d6cada31615 | 533 | py | Python | stanford1/py/shortest_path.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | stanford1/py/shortest_path.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | stanford1/py/shortest_path.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# C++
# http://www.e-olimp.com/articles/21
# http://hardfire.ru/Dij_sparse
# Weak 5
# TODO: hear lession + lession about heap
"""
NAIVE:
Initialize:
- X = [S] [vert. processed so far]
- A[S] = 0 [computed shortest path distances]
[- B[S] = []] [path - help only]
- while X != V:
- among all ed... | 20.5 | 64 | 0.545966 |
56b8deaa0215cdcc99213e0a93648e39fbfe5b89 | 1,575 | py | Python | src/test/tests/simulation/materialvar.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/simulation/materialvar.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/simulation/materialvar.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: materialvar.py
#
# Tests: libsim - connecting to simulation and retrieving data from it.
# mesh - 2D structured mesh.
# scalars defined on material sub regions.
#
# Prog... | 27.155172 | 78 | 0.550476 |
a4a0d2e2ea3848f2525e2422a708e98814a27a5f | 962 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/intro_insertion_sort.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/intro_insertion_sort.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/intro_insertion_sort.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def find_insert_pos_from_current(values, current_pos):
insert_pos = current_pos
while insert_pos > 0 and values[insert_pos - 1] > values[current_pos]:
insert_pos -= 1
return insert_pos
def find_insert_pos_fro... | 26 | 80 | 0.711019 |
74c371eb71f44983917a073017ccdc068bd116a1 | 190 | py | Python | python/python_backup/PRAC_PYTHON/20_test2_factorial.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/20_test2_factorial.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/20_test2_factorial.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def fact(n):
f=1
a=0
for i in range(n):
a=i+1
f=f*a
print("The factorial of ",a)
print(f)
l=int(input("Enter a number which you want to find the factorial of :"))
fact(l) | 17.272727 | 73 | 0.6 |
7423c83384a5535f08801bddd8ff38df0f454891 | 55 | py | Python | WifiEnigma/WifiUnhacking/wifiUnhackingSolved.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | WifiEnigma/WifiUnhacking/wifiUnhackingSolved.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | WifiEnigma/WifiUnhacking/wifiUnhackingSolved.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | import paho.mqtt.client as mqtt
def result():
| 6.875 | 31 | 0.636364 |
742baf91831f22a3d01c093651f25ec765c4f53f | 1,309 | py | Python | aoc2020/day_14/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_14/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_14/part_2.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from .part_1 import Solution as Part1
from itertools import product
class Solution(Part1):
expected = 208
def get_resource_name(self, name: str) -> str:
if self.testing and name == "input":
return "test-input-2"
else:
return f"test-{name}" if self.testing else name
... | 29.75 | 83 | 0.503438 |
776e8a219ddcfb49376d5fc6a3037f44f01f7232 | 892 | py | Python | weibo/test/test1.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/test/test1.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/test/test1.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | #encoding:utf-8
'''
Created on 2016年4月11日
@author: wb-zhaohaibo
'''
from bs4 import BeautifulSoup
import urllib2
import re
import string
import sys
import codecs
url = r"http://www.weather.com.cn/weather/101070105.shtml"
lookutf_8 = codecs.lookup('utf8')
resContent = urlli... | 20.744186 | 62 | 0.66704 |
77f2149cac3afcf00e75b9a9ba42248df16394bf | 239 | py | Python | Algorithms/Strings/TwoStrings.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Strings/TwoStrings.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Strings/TwoStrings.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null |
p = int(raw_input())
for _ in xrange(p):
a = set(list(raw_input()))
b = set(list(raw_input()))
for char in a:
if char in b:
print 'YES'
break
else:
print 'NO'
| 14.9375 | 31 | 0.430962 |
bb06ec3a79cb642ab39b71ad052751486aed474d | 658 | py | Python | data-pipeline/src/data_pipeline/data_types/locus.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/data_types/locus.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/data_types/locus.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import hail as hl
def normalized_contig(contig: hl.expr.StringExpression) -> hl.expr.StringExpression:
return hl.rbind(hl.str(contig).replace("^chr", ""), lambda c: hl.if_else(c == "MT", "M", c))
def contig_number(contig: hl.expr.StringExpression) -> hl.expr.Int32Expression:
return hl.bind(
lambda c... | 34.631579 | 117 | 0.664134 |
3b31730a6a65864fe3c493fdbe68dfdae5bc4735 | 357 | py | Python | leetcode/202-Happy-Number/solution.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/202-Happy-Number/solution.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/202-Happy-Number/solution.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
def isHappy(self, n: int) -> bool:
visited = set([n])
while n != 1:
new_n = 0
while n > 0:
new_n += (n % 10) ** 2
n = int(n / 10)
if new_n in visited:
return False
visited.add(new_n)
... | 25.5 | 38 | 0.392157 |
d93ff36d997423a1f4f6adfcd6ae9bae9537f134 | 3,551 | py | Python | spider/test1/test1/BloomFilter.py | shyorange/MovieWebsite | aaf3be332b9f944ea93fbd841e1758b4a11d4581 | [
"Apache-2.0"
] | null | null | null | spider/test1/test1/BloomFilter.py | shyorange/MovieWebsite | aaf3be332b9f944ea93fbd841e1758b4a11d4581 | [
"Apache-2.0"
] | null | null | null | spider/test1/test1/BloomFilter.py | shyorange/MovieWebsite | aaf3be332b9f944ea93fbd841e1758b4a11d4581 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# __author__ : "shyorange"
# __date__ : 2018/12/14
"""改进Scrapy_Redis的去重机制,使其更节省内存"""
## Scrapy_Redis的去重机制
# 1:对每个Request都产生一个指纹,该指纹由40个16进制的字符组成
# 2:将该指纹存入Redis集合(在内存中),利用集合的特性实现去重
## 问题:
# 一个子节占8b,为1B(两个16进制数为一个字节)
# 一个16进制数占用4b存,则一个指纹占用20B空间
# 一万个指纹占用200KB
# 一亿个指纹占用2GB
# 当数... | 28.869919 | 91 | 0.588285 |
8ddf0a063ed12a9a29c321c407816412826fbe89 | 586 | py | Python | mycroft_config.py | Domeee/mycroft | 6575bc68a2a602c7110cbbb81af25ecae3072285 | [
"MIT"
] | null | null | null | mycroft_config.py | Domeee/mycroft | 6575bc68a2a602c7110cbbb81af25ecae3072285 | [
"MIT"
] | null | null | null | mycroft_config.py | Domeee/mycroft | 6575bc68a2a602c7110cbbb81af25ecae3072285 | [
"MIT"
] | null | null | null | # Directory, where the markdown files are located
summaries_dir = './markdown_files'
# Subject for the e-mail
email_subject = 'Mycroft dropping some knowledge :-)'
# User name of the e-mail account we use to sign in to
email_user_name = 'mycroft@holmes.uk'
# Password of the e-mail account we use to sign in to
email_... | 24.416667 | 54 | 0.749147 |
5c1cd57311720b56342489b1a97817fe67e2789b | 6,034 | py | Python | code/io_lib.py | zauberwild/paamestia | 88ba643d6d9dc14d8abc686d464f723ea840e4f6 | [
"MIT"
] | 1 | 2020-12-24T12:20:26.000Z | 2020-12-24T12:20:26.000Z | code/io_lib.py | zauberwild/paamestia | 88ba643d6d9dc14d8abc686d464f723ea840e4f6 | [
"MIT"
] | null | null | null | code/io_lib.py | zauberwild/paamestia | 88ba643d6d9dc14d8abc686d464f723ea840e4f6 | [
"MIT"
] | null | null | null | """
handles input / output
"""
import globals as gl
import pygame
pygame_events = None
""" ### ### general input via keyboard ### ### """
def keyboard_input():
global pygame_events
pygame_events = pygame.event.get() # save all current events
for event in pygame_events: # check for keyboard input
# closi... | 41.047619 | 172 | 0.703513 |
30fcaba5890069fb66655c4a9679aa0eb505115f | 4,656 | py | Python | src/visitpy/visit_flow/flow/src/filters/imagick.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_flow/flow/src/filters/imagick.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_flow/flow/src/filters/imagick.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: imagick.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 10/14/2010
description:
... | 34.235294 | 84 | 0.526418 |
a50531a5e1c26ed725e425affbf4c1f719e7a9d4 | 442 | py | Python | leetcode/003-Longest-Substring-Without-Repeating-Characters/LongSubWRC_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/003-Longest-Substring-Without-Repeating-Characters/LongSubWRC_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/003-Longest-Substring-Without-Repeating-Characters/LongSubWRC_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # @author: cchen
class Solution:
# @return an integer
def lengthOfLongestSubstring(self, s):
start, maxlen = 0, 0
dict = {c: -1 for c in s}
for i in xrange(len(s)):
if dict[s[i]] != -1:
while start <= dict[s[i]]:
dict[s[start]] = -1
... | 27.625 | 47 | 0.443439 |
a5130b1cae15963494d10f4590979bd71732892e | 1,481 | py | Python | pelicanconf.py | ML-KA/ML-KA.github.io | d6e8c6f67298a90a20d9f2df634c754c093016a0 | [
"MIT"
] | 3 | 2016-06-01T05:33:53.000Z | 2017-03-22T15:50:30.000Z | pelicanconf.py | ML-KA/ML-KA.github.io | d6e8c6f67298a90a20d9f2df634c754c093016a0 | [
"MIT"
] | 4 | 2015-10-27T21:09:43.000Z | 2016-01-30T13:25:38.000Z | pelicanconf.py | ML-KA/ML-KA.github.io | d6e8c6f67298a90a20d9f2df634c754c093016a0 | [
"MIT"
] | 4 | 2016-01-29T13:09:27.000Z | 2019-12-09T06:15:30.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u'Members of the ML-KA group'
SITENAME = u'Machine Learning - Karlsruhe'
SITEURL = '//ml-ka.de'
PATH = 'content'
TIMEZONE = 'Europe/Berlin'
DEFAULT_LANG = u'en'
# Feed generation is usually not desired when developing
... | 25.982456 | 77 | 0.669142 |
c6470f21d7ced075129a88dbe527cb6567561e11 | 1,708 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/set_auto_created_serial_no_in_stock_entry.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v10_0/set_auto_created_serial_no_in_stock_entry.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/set_auto_created_serial_no_in_stock_entry.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
serialised_items = [d.name for d in frappe.get_all("Item", filters={"has_serial_no": 1})]
if not serialised_items:
return
for dt in ["Stoc... | 30.5 | 95 | 0.651639 |
d6e6aa387765f91d5533cbba02804c853b3d2bb7 | 561 | py | Python | source/pkgsrc/lang/python37/patches/patch-Lib_test_test__bytes.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python37/patches/patch-Lib_test_test__bytes.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python37/patches/patch-Lib_test_test__bytes.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Lib_test_test__bytes.py,v 1.1 2020/11/17 19:33:26 sjmulder Exp $
Support for macOS 11 and Apple Silicon (ARM). Mostly backported from:
https://github.com/python/cpython/pull/22855
--- Lib/test/test_bytes.py.orig 2020-08-15 05:20:16.000000000 +0000
+++ Lib/test/test_bytes.py
@@ -903,6 +903,7 @@ class By... | 35.0625 | 79 | 0.7041 |
063005743c8a9a818b9b16955000089a2c6e446b | 364 | py | Python | 868-binary-gap/868-binary-gap.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 868-binary-gap/868-binary-gap.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 868-binary-gap/868-binary-gap.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def binaryGap(self, n: int) -> int:
# convert integer to binary
binary_n = str("{0:b}".format(n))
start = 0
diff = 0
for i, each in enumerate(binary_n[1:]):
if each=="1":
if i+1-start > diff:
diff = i+1-start
... | 30.333333 | 47 | 0.453297 |
063bc5783b8447a8b3f27aabfef3873e36e0f4f5 | 2,207 | py | Python | migrations/versions/92f37474ad62_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/92f37474ad62_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/92f37474ad62_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: 92f37474ad62
Revises: 0a282a331e35
Create Date: 2020-10-18 13:06:47.639083
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "92f37474ad62"
down_revision = "0a282a331e35"
branch_labels = None
depends_on = None
def upgrade():
# #... | 31.084507 | 88 | 0.641595 |
2306faf00274303f534be1c552c42902cfe7110a | 1,961 | py | Python | source/pkgsrc/lang/py-cxfreeze/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/py-cxfreeze/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/py-cxfreeze/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2018/02/09 08:04:41 adam Exp $
Link with proper run-time library path,
link with -lpthread on NetBSD.
--- setup.py.orig 2017-05-20 21:59:18.000000000 +0000
+++ setup.py
@@ -71,6 +71,7 @@ class build_ext(distutils.command.build_
fileName = os.path.splitext(self.get_ext_filename(e... | 39.22 | 82 | 0.619072 |
236dc9430a2dcd4ee1f4f8bbfc3589e1c3f0761d | 2,102 | py | Python | python-master/checkershell.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | python-master/checkershell.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | python-master/checkershell.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/python
import sys,urllib2
from multiprocessing import Pool
from multiprocessing.dummy import Pool as ThreadPool
def prRed(prt): print("\033[91m {}\033[00m" .format(prt))
def prGreen(prt): print("\033[92m {}\033[00m" .format(prt))
def prYellow(prt): print("\033[93m {}\033[00m" .format(prt))
def prLightPurple... | 30.911765 | 103 | 0.531874 |
d18a62d08e6bd62049f5d9334719d9aa857f21b4 | 501 | py | Python | app/utils.py | obitastico/QuizPowerPointCreator | c421d0ec84308b4ac20f71b9d7729a0cd2d40da5 | [
"MIT"
] | null | null | null | app/utils.py | obitastico/QuizPowerPointCreator | c421d0ec84308b4ac20f71b9d7729a0cd2d40da5 | [
"MIT"
] | null | null | null | app/utils.py | obitastico/QuizPowerPointCreator | c421d0ec84308b4ac20f71b9d7729a0cd2d40da5 | [
"MIT"
] | null | null | null | from typing import Any, Iterator, Dict, List, Union
def check_iterable(obj: Dict[str, Union[str, List[str]]]) -> bool:
"""check iterable if values are defined"""
return all(get_values(obj))
def get_values(obj: Any) -> Iterator[str]:
"""get all values of nested dict"""
values = obj.values() if isinst... | 29.470588 | 66 | 0.640719 |
4e5ac7de54986db375cc2d8b81d3682c69c73b7f | 1,972 | py | Python | Python_GUI/DriveControlWidget.py | michaelloose/DualStepperController | a18e280ac4612b8b787a3f5217ff0b33215ad7db | [
"MIT"
] | 1 | 2020-12-08T12:15:44.000Z | 2020-12-08T12:15:44.000Z | Python_GUI/DriveControlWidget.py | michaelloose/DualStepperController | a18e280ac4612b8b787a3f5217ff0b33215ad7db | [
"MIT"
] | null | null | null | Python_GUI/DriveControlWidget.py | michaelloose/DualStepperController | a18e280ac4612b8b787a3f5217ff0b33215ad7db | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets, uic
from Controller import singletonController
class DriveControlWidget(QtWidgets.QWidget):
def __init__(self, parent = None):
QtWidgets.QWidget.__init__(self, parent)
uic.loadUi("DriveControlWidget.ui", self)
#Antriebssteuerung
#self.doubleSpinBoxLine... | 63.612903 | 217 | 0.78144 |
4e65f5228966fe6d84d987f4bb11ea28e459bf30 | 759 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_n_primeiros.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_n_primeiros.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_n_primeiros.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por obter uma cópia dos N primeiros números.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import n_primeiros
class PainelNPrimeiros(PainelAbst... | 34.5 | 98 | 0.607378 |
14e6910cbe9e74f425d3e2d68c3d54fe35d1651b | 1,144 | py | Python | elements/python/10/15/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/10/15/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/10/15/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | class Node(object):
def __init__(self, v, l=None, r=None):
self.value = v
self.left = l
self.right = r
self.next = None
def __str__(self):
return '({} {} {})'.format(
self.left, self.value, self.right,
).replace('None', '')
def perfect(l... | 20.070175 | 50 | 0.484266 |
eea4619b5e4c87b9c981403c94509500b5db2245 | 3,813 | py | Python | v602/python/absorption.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v602/python/absorption.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v602/python/absorption.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import matplotlib.pyplot as plt
import scipy.constants as const
from scipy import optimize
from uncertainties import ufloat
ordnung = [30,35,38,40,80,80]
ordnung2 = [900, 1225, 1444, 1600, 6400, 6400]
anzahl = len(ordnung)
phik = [37, 26.2, 22, 19.5, 25.2, 29.6]
thetak = np.ones(anzahl)
ek = np.ones... | 27.042553 | 159 | 0.666404 |
09c177ca946303a23cd581d7cf2379894c327a8e | 452 | py | Python | gestionTomaDatos/migrations/0006_auto_20210120_1850.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T01:20:45.000Z | 2021-01-09T01:20:45.000Z | gestionTomaDatos/migrations/0006_auto_20210120_1850.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T00:53:55.000Z | 2021-01-09T00:53:55.000Z | gestionTomaDatos/migrations/0006_auto_20210120_1850.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-07T23:57:28.000Z | 2021-01-07T23:57:28.000Z | # Generated by Django 2.2.17 on 2021-01-20 18:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gestionTomaDatos', '0005_protocoloclinico'),
]
operations = [
migrations.AlterField(
model_name='protocoloclinico',
... | 23.789474 | 88 | 0.641593 |
61cbb2e58fc473c346dddb3df122a68777f04b59 | 1,704 | py | Python | large_vocab_adt_dafx2018/utils.py | mcartwright/dafx2018_adt | 057ac6b1e39cd0c80554d52535cc9d88b6316c74 | [
"BSD-2-Clause"
] | 6 | 2019-02-28T05:43:58.000Z | 2021-03-02T17:05:13.000Z | large_vocab_adt_dafx2018/utils.py | mcartwright/dafx2018_adt | 057ac6b1e39cd0c80554d52535cc9d88b6316c74 | [
"BSD-2-Clause"
] | null | null | null | large_vocab_adt_dafx2018/utils.py | mcartwright/dafx2018_adt | 057ac6b1e39cd0c80554d52535cc9d88b6316c74 | [
"BSD-2-Clause"
] | 1 | 2020-02-07T17:10:40.000Z | 2020-02-07T17:10:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import librosa
import resampy
import soundfile as psf
def reduce_voices(onsets, mixing_matrix):
"""
Reduce the voices given a mixing matrix
Parameters
----------
onsets
mixing_matrix
Returns
-------
np.array
""... | 20.047059 | 117 | 0.562793 |
11065d3280b405431eb1b71ed6b23d990a494535 | 684 | py | Python | Hackergame_2019/night/main.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | Hackergame_2019/night/main.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | Hackergame_2019/night/main.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | # 导入必要的软件包
import cv2
import numpy as np
# 视频文件输入初始化
filename = "output.mp4"
camera = cv2.VideoCapture(filename)
# 初始化当前帧的前帧
last_frame = None
# 遍历视频的每一帧
cnta, cntb = 0, 0
while camera.isOpened():
# 读取下一帧
(ret, frame) = camera.read()
if ret == False:
break
if last_frame is None:
la... | 15.906977 | 51 | 0.609649 |
28f838235c613407093e83dbab8b21749a7d289a | 1,848 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/util/MathUtils.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/util/MathUtils.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch02_math/util/MathUtils.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def is_even(n):
return n % 2 == 0
def is_odd(n):
return n % 2 != 0
def is_prime(potentially_prime):
for number in range(2, int(potentially_prime / 2) + 1):
if potentially_prime % number == 0:
ret... | 22.814815 | 68 | 0.592532 |
a3428a25af44ac825b75b460ec716bcdee841638 | 2,219 | py | Python | frappe-bench/apps/erpnext/erpnext/support/doctype/warranty_claim/warranty_claim.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/support/doctype/warranty_claim/warranty_claim.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/support/doctype/warranty_claim/warranty_claim.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import session, _
from frappe.utils import today, now_datetime
from erpnext.utilities.transaction_base import TransactionB... | 31.7 | 98 | 0.735016 |
42fea69c705190c0324cb3b17b0389469704f815 | 48 | py | Python | PythonPro/demo/mysql.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | null | null | null | PythonPro/demo/mysql.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | 68 | 2020-09-05T04:22:49.000Z | 2022-03-25T18:47:08.000Z | PythonPro/demo/mysql.py | JianmingXia/StudyTest | 66d688ad41bbce619f44359ea126ff07a923f97b | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
# Mysql
import MySQLdb
| 9.6 | 23 | 0.583333 |
6e02d0a684c774fdd182b0fee70d80348fa9b592 | 3,831 | py | Python | mangen/main.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | mangen/main.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | mangen/main.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
import dominate
import markdown2
import writer
import os
import sys
languages_predicates = (":ru", ":en")
list_of_changes = {
"Сигнатура:": {"ru": "Сигнатура:", "en": "Signature:"},
"Signature:": {"ru": "Сигнатура:", "en": "Signature:"},
"Пример:": {"ru": "Пример:",... | 28.589552 | 77 | 0.574785 |
6e2532e3dca597f4ec1b14927bd1955da76aa58e | 566 | py | Python | ___Python/KarPoo/po1_kennenlernen/p13_parameter/m01_parameter.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p13_parameter/m01_parameter.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p13_parameter/m01_parameter.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | def ausgabe(liste, seperator="\n", erstezeile=""):
print(erstezeile)
for element in liste:
print(element, end=seperator)
def ausgabe2(liste, **kwargs):
seperator = "\n" if "ende" not in kwargs else kwargs["ende"]
erstezeile = " " if "erstezeile" not in kwargs else kwargs["erstezeile"]
... | 33.294118 | 77 | 0.659011 |
282291837ed68ba4491c2e5cfc5200920074601b | 898 | py | Python | angstrom/2021/web/Ekans/db.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2021/web/Ekans/db.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2021/web/Ekans/db.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import pickle
import base64
import io
import os
POKEMON = {id: (os.environ.get('FLAG', 'flag{TEST}') if id == 1337 else 'EKANS') for id in range(2000)}
USERS = {'guest': 'guest', 'PokeMaster3000': os.environ.get('ADMIN_PASSWORD', '<secret>')}
ADMINS = ['PokeMaster3000']
class User:
admin = False
def __init__(self,... | 32.071429 | 119 | 0.723831 |
9548ba6cf6503f51073181485167466baf8fc2ea | 216 | py | Python | Python1/aula6_ex2.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python1/aula6_ex2.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python1/aula6_ex2.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | '''
1-Crie uma lista de móveis de uma casa;
2-Adicione um elemento no final da lista;
3-Remova um elemento pelo seu índice.
'''
moveis = ["Cadeira", "Sofá", "Mesa"]
moveis.append("Fogão")
moveis.pop(0)
print(moveis) | 21.6 | 41 | 0.703704 |
c2d674ff9fb05a94b2c74786cf36aefcbe39813d | 2,209 | py | Python | rexample.py | tjczec01/RadauD | e064b183cc3c34f592a4f471c4069876963d2f41 | [
"MIT"
] | null | null | null | rexample.py | tjczec01/RadauD | e064b183cc3c34f592a4f471c4069876963d2f41 | [
"MIT"
] | null | null | null | rexample.py | tjczec01/RadauD | e064b183cc3c34f592a4f471c4069876963d2f41 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 24 12:10:55 2020
Github: https://github.com/tjczec01
@author: Travis J Czechorski
E-mail: tjczec01@gmail.com
"""
from __future__ import division, print_function, absolute_import
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
exec(open(r... | 33.469697 | 144 | 0.564509 |
dd75c451a7a355af8bc2bd046bcde4e6c9c92a66 | 4,049 | py | Python | tests/test_tipc/benchmark/modules/rnnlm.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/test_tipc/benchmark/modules/rnnlm.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/test_tipc/benchmark/modules/rnnlm.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import paddle
import paddle.nn as nn
from paddlenlp.utils import profiler
from paddlenlp.utils.log import logger
from paddlenlp.metrics import Perplexity
from .model_base import BenchmarkBase
sys.path.append(
os.path.abspath(
os.path.join(os.path.dirname(__file__), os.pardir, os.par... | 33.46281 | 86 | 0.544826 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.