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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fd7457e12c6d35a5c3515dd6b9ba87f10539f942 | 414 | py | Python | INBa/2015/Shirlin_V_V/task_2_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_2_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_2_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задание 2. Вариант 32
#Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Омар Хайям. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
#Ширлин Вячеслав Викторович
#10.03.2016
print(" Будь весел! Не навек твоя пора-Пройдёт сегодн... | 69 | 202 | 0.78744 |
8ba6ad48efa8e65421215c7f776a134b1f05382e | 1,573 | py | Python | Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/09_listen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/09_listen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_1/Kapitel_01_bis_04/09_listen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Unterschiedliche Listenformen sowie Änderungen an Listeneinträgen
var=1
var2=2
var3=3
stringliste=['katze', 'hund', 'maus', 'elephant']
zahlenliste=[1, 1.123]
typenliste=[True, False, None]
mixedliste=[True, 'String', 42, 42.234]
variablenliste=[var, var2, var3]
listoflist=[stringliste, zahlenliste, typenliste, mi... | 28.6 | 124 | 0.6815 |
8bafd5ffb0b54c752b1d4d7b4dd940710fb5f28e | 6,491 | py | Python | ais3-pre-exam-2022-writeup/Web/Gallery/release/app/main.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Web/Gallery/release/app/main.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Web/Gallery/release/app/main.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, url_for, g, session, send_file
import sqlite3
import secrets
import os
import uuid
import mimetypes
import pathlib
from rq import Queue
from redis import Redis
app = Flask(__name__)
app.queue = Queue(connection=Redis('xss-bot'))
app.config.update({
'SEC... | 34.163158 | 143 | 0.603297 |
9a6a4eaef3fc35fef4c22ade55366dbf23ee8fab | 2,210 | py | Python | reports/ReportScore.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | reports/ReportScore.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | reports/ReportScore.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import os
import sys
import pandas as pd
from measure.ModelMeter import ModelMeter
from reports.AbstractReport import AbstractReport
# Add modules to system path, needed when starting the script from the shell
# Furter details see: https://stackoverflow.com/questions/16981921/relative-imports-in-python-3
PACKAGE_PAREN... | 32.028986 | 103 | 0.619457 |
d06709e6751bc814f059040ba39edcde0e505214 | 4,217 | py | Python | web/authenticate/login.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | 1 | 2016-05-31T06:52:53.000Z | 2016-05-31T06:52:53.000Z | web/authenticate/login.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | web/authenticate/login.py | liukai0322/docklet | 9e4d1f4fc2e523423b0e94406242a29b20643788 | [
"BSD-3-Clause"
] | null | null | null | import sys, os
sys.path.append("..")
from view.view import normalView
from authenticate.auth import is_authenticated
from dockletreq.dockletrequest import dockletRequest
from flask import redirect, request, render_template, session, make_response
from jupytercookie import cookie_tool
import hashlib
#from suds.client i... | 39.783019 | 121 | 0.597818 |
d0fb3508cd62dd6b07c54ea55a8548d9fe278de5 | 186 | py | Python | Language Proficiency/Python/Math/Find Angle MBC/find_angle_mbc.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Language Proficiency/Python/Math/Find Angle MBC/find_angle_mbc.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Language Proficiency/Python/Math/Find Angle MBC/find_angle_mbc.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import math
if __name__ == "__main__":
AB = int(input())
BC = int(input())
print(str(round(math.degrees(math.atan2(AB, BC))))+u'\N{DEGREE SIGN}')
| 15.5 | 74 | 0.607527 |
ef1670d9479b796a4a7eb4cc200530eef59567a8 | 5,949 | py | Python | new1.py | Piccar/NRW-Wetter | a69c74fb75ac9751364b3fd55762efb28511685d | [
"MIT"
] | null | null | null | new1.py | Piccar/NRW-Wetter | a69c74fb75ac9751364b3fd55762efb28511685d | [
"MIT"
] | null | null | null | new1.py | Piccar/NRW-Wetter | a69c74fb75ac9751364b3fd55762efb28511685d | [
"MIT"
] | null | null | null | #The MIT License (MIT)
#
#Copyright (c) 2019 Frederic
#
#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,... | 39.138158 | 122 | 0.721802 |
ef1f93a627b134559baae2ded7f321a2bae8aa5c | 552 | py | Python | fuzzsvc/model/FuzzingScript.py | ifoundthetao/FuzzFlow | 86559ac7f85fc89510c0d9647e02880edb95aa2a | [
"MIT"
] | 53 | 2016-08-26T02:51:45.000Z | 2021-05-24T21:05:44.000Z | model/FuzzingScript.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | null | null | null | model/FuzzingScript.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | 31 | 2016-08-26T04:08:31.000Z | 2021-05-24T21:05:54.000Z | from app import app
db = app.config['db']
class FuzzingScript(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(256), unique=True, nullable=False)
script = db.Column(db.String(8192), nullable=False)
visible = db.Column(db.Integer, default=1, nullable=False)
def _... | 30.666667 | 83 | 0.664855 |
08855c8fa8ab2d8c8dcd081f55f761bff649b428 | 405 | py | Python | demo.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | 2 | 2019-06-24T08:34:39.000Z | 2019-06-27T12:23:47.000Z | demo.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | demo.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | # encoding:utf-8
from datetime import datetime, timedelta
def get_day_zero_time(date):
result = datetime.now().replace(year=date.year, month=date.month,
day=date.day, hour=0, minute=0, second=0)
return result
today = datetime.now()
zero_time = get_day_zero_time(today)
st... | 27 | 77 | 0.676543 |
c2123b5051058f45146df63b0207fc0fd20eba8c | 1,014 | py | Python | task_12_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | task_12_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | task_12_7.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 12. Вариант 7.
# Разработайте игру "Крестики-нолики". (см. М.Доусон Программируем на Python гл. 6)
# Videneev P. A.
# 26.05.2016
import random
#крестики-нолики
X = "X"
O = "O"
EMPTY = " "
TIE = "ничья"
NUM_SQUARES = 9
def main():
return 0
def display_instruct():
print ("""
0 | 1 | ... | 19.882353 | 85 | 0.613412 |
dfebae6293c374cb40bba5be061b5abe00958cd4 | 2,058 | py | Python | books/PythonAutomate/gui_automate/form_filler.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/gui_automate/form_filler.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/gui_automate/form_filler.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """form_filler.py
자동으로 form 작성
"""
import pyautogui
import time
name_field = (764,430)
another_link = (744,299)
form_data = [
{"name": "Alice", "fear": "eavesdroppers", "source": "wand", "robocop": 4, "comments": "Tell Bob I said hi."},
{"name": "Bob", "fear": "bees", "source": "amulet", "robocop": 4, "commen... | 30.716418 | 155 | 0.632653 |
cd5d70040374248c1c39d6d3b99bc69e91431cb1 | 136 | py | Python | dewar/exts/_database.py | shonenada-archives/dewar | 392b996771a35bc26e9c301cc2a25bad973e8f61 | [
"MIT"
] | null | null | null | dewar/exts/_database.py | shonenada-archives/dewar | 392b996771a35bc26e9c301cc2a25bad973e8f61 | [
"MIT"
] | null | null | null | dewar/exts/_database.py | shonenada-archives/dewar | 392b996771a35bc26e9c301cc2a25bad973e8f61 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def setup_database(app):
db.init_app(app)
| 13.6 | 43 | 0.683824 |
e49c20041a4b95d0c60a773d3165a90b7d61fb2d | 274 | py | Python | DataStructures/Stacks/ANDxorOR.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/ANDxorOR.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/ANDxorOR.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
N = int(raw_input())
A = map(int, raw_input().split())
stack = []
Max = 0
for a in A:
while stack and a <= stack[-1]:
Max = max(Max, stack.pop() ^ a)
if stack != []:
Max = max(Max, stack[-1] ^ a)
stack.append(a)
print Max
| 15.222222 | 39 | 0.514599 |
9010b5c291ceef1960cce57c9dbb260a2a00e0eb | 727 | py | Python | device_mapper/pydmAPI.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 1 | 2015-08-02T09:53:18.000Z | 2015-08-02T09:53:18.000Z | device_mapper/pydmAPI.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | null | null | null | device_mapper/pydmAPI.py | lihuiba/SoftSAN | 1b8ab2cae92b7aac34211909b27d4ebe595275d7 | [
"Apache-2.0"
] | 2 | 2018-03-21T04:59:50.000Z | 2019-12-03T15:54:17.000Z | import dm
class DeviceMapper:
def __init__(self):
pass
#device_name specifies the name of the device, table_file is the configuration file of this device
def create(self, device_name, table_file):
args = ['create']
args.append(device_name)
args.append(table_file)
dm.Get_Command(args)
#device_name:sp... | 27.961538 | 99 | 0.748281 |
4b3b0765c0cc26bcd687221d2400cbe54cb74134 | 8,517 | py | Python | rengine/workout_plan.py | noahsolomon0518/rengine | a544951c6b7dd707586cd3c4f84ddec554f1c96a | [
"MIT"
] | null | null | null | rengine/workout_plan.py | noahsolomon0518/rengine | a544951c6b7dd707586cd3c4f84ddec554f1c96a | [
"MIT"
] | null | null | null | rengine/workout_plan.py | noahsolomon0518/rengine | a544951c6b7dd707586cd3c4f84ddec554f1c96a | [
"MIT"
] | null | null | null |
from flask import Config
from rengine.workouts import BaseWorkout
from rengine.config import *
from rengine.data_structures import StrengthExerciseQueue
from rengine.workouts import AutoGeneratedWorkout, dictionary_addition
from typing import List, Tuple
def get_strenth_exercise_queue(
muscle_groups: List[MuscleG... | 40.174528 | 155 | 0.694493 |
299bc1e1b26fb85599ed026946297283f5eaf556 | 802 | py | Python | nachmittags/blatt1_fragepasswort.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | 1 | 2019-09-27T13:47:20.000Z | 2019-09-27T13:47:20.000Z | nachmittags/blatt1_fragepasswort.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | nachmittags/blatt1_fragepasswort.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | def frage_passwort():
""" Das Passwort Abfrage programm, verbessert als Funktion"""
SECRET_PASSWORD = "passwort1"
triesLeft = 3
correctPassword = False
while triesLeft > 0 and not correctPassword:
user_input = input("Geben Sie hier ihr Passwort ein:\n")
if(user_input == SECRET_PASS... | 30.846154 | 68 | 0.591022 |
d99da3281fce84c56db5d645ef21279aa9fe4594 | 162 | py | Python | zencad/examples/2.Operations/2.Operations/thicksolid.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/2.Operations/2.Operations/thicksolid.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/2.Operations/2.Operations/thicksolid.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from zencad import *
from zencad.geom.offset import _shapefix_solid
m = box(20)
m = thicksolid(m, refs=[(0, 5, 5)], t=1)
disp(m)
show()
| 14.727273 | 46 | 0.67284 |
6acb0c840f5ffde2adc6880152f812bb327e33b6 | 10,718 | py | Python | Packs/FeedOffice365/Integrations/FeedOffice365/FeedOffice365.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedOffice365/Integrations/FeedOffice365/FeedOffice365.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedOffice365/Integrations/FeedOffice365/FeedOffice365.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from typing import Dict, List, Tuple, Any, Callable, Optional
import uuid
import urllib3
from CommonServerPython import *
# disable insecure warnings
urllib3.disable_warnings()
INTEGRATION_NAME = 'Office 365'
ALL_REGIONS_LIST = ['Worldwide', 'China', 'Germany', 'USGovDoD', 'USGovGCCHigh']
def build_region_list(con... | 36.831615 | 211 | 0.600765 |
7cf6a3900ca831770c6e6a62fce789956f0cc90c | 25,193 | py | Python | test/test_nnapi.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 2 | 2020-03-13T06:57:49.000Z | 2020-05-17T04:18:14.000Z | test/test_nnapi.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | test/test_nnapi.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 2 | 2019-07-23T14:37:31.000Z | 2019-07-23T14:47:13.000Z | #!/usr/bin/env python3
# Owner(s): ["oncall: mobile"]
import os
import ctypes
import torch
from typing import Tuple
from torch.backends._nnapi.prepare import convert_model_to_nnapi
from torch.testing._internal.common_utils import TestCase, run_tests
def qpt(t, scale, zero_point, dtype=torch.quint8):
t = torch.te... | 36.994126 | 116 | 0.473385 |
6b07e4ccc7c5bb24083dd4917e238fd0f669a64b | 8,300 | py | Python | program/environment/__init__.py | SimonSkade/BwKI_autonome_Verkehrslenkung | 41d84ce2103a4338893dc610a46f7b115d584635 | [
"MIT"
] | 4 | 2019-08-22T19:16:28.000Z | 2019-10-27T07:09:09.000Z | program/environment/__init__.py | SimonSkade/BwKI_autonome_Verkehrslenkung | 41d84ce2103a4338893dc610a46f7b115d584635 | [
"MIT"
] | null | null | null | program/environment/__init__.py | SimonSkade/BwKI_autonome_Verkehrslenkung | 41d84ce2103a4338893dc610a46f7b115d584635 | [
"MIT"
] | null | null | null | import numpy as np
MAX_CYCLES = 10000
SHOW_GRAPHICAL_SIMULATION = True
UPDATE_PERIOD = 100
AUTO_GENERATE_RATE = 0.7
cars = {}
number_cars_generated = 0
action_plan = []
def linear_search(sorted_array, element):
for i, value in enumerate(sorted_array):
if element < value:
return i
return len(sorted_array)
de... | 46.111111 | 261 | 0.759157 |
81011ef77962e784e25a12bed16326c31f35105a | 1,990 | py | Python | scripts/sdk/bazel/template_model.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/sdk/bazel/template_model.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/sdk/bazel/template_model.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python2.7
# Copyright 2018 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.
'''A collection of storage classes to use with Mako templates.'''
ARCH_MAP = {
'arm64': 'aarch64',
'x64': 'x86_64',
}
cla... | 21.397849 | 72 | 0.603015 |
d4959742c6bc9312e0c8a05156a41b9789445181 | 520 | py | Python | ___Python/Michael/p12_notifications/m01_emailsK.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p12_notifications/m01_emailsK.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Michael/p12_notifications/m01_emailsK.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | # Import smtplib for the actual sending function
import smtplib
# Import the email modules we'll need
from email.message import EmailMessage
# Create a text/plain message
msg = EmailMessage()
msg['Subject'] = "Mein Betreff"
msg['To'] = "micman1@googlemail.com"
# Send the message via our own SMTP server.... | 22.608696 | 49 | 0.703846 |
d4db1937cb7b0591a33aeae538bfbed3013cb29f | 1,816 | py | Python | WindowsShellExtensions/Utils/httpserver.py | PeerWasp/PeerWasp | 92ec5b3d0eee66599d7c2a350a986205bf9a0be6 | [
"MIT"
] | 34 | 2015-04-20T02:45:26.000Z | 2020-05-25T10:50:50.000Z | WindowsShellExtensions/Utils/httpserver.py | Hive2Hive/PeerBox | 92ec5b3d0eee66599d7c2a350a986205bf9a0be6 | [
"MIT"
] | 85 | 2015-01-04T19:58:54.000Z | 2015-03-24T18:57:38.000Z | WindowsShellExtensions/Utils/httpserver.py | PeerWasp/PeerWasp | 92ec5b3d0eee66599d7c2a350a986205bf9a0be6 | [
"MIT"
] | 15 | 2015-07-01T11:11:53.000Z | 2022-03-03T14:25:28.000Z | import http.server
import socketserver
import sys
import json
# Simple HTTP server that prints json POST requests to the console.
# Note: It does not check messages for validity or check the URLs.
class HTTPHandler(http.server.BaseHTTPRequestHandler):
def print_info(self):
print("Command: %s" % self.comma... | 29.290323 | 107 | 0.579295 |
13aac1d56fa03f0e083f69d9133b6e42ca712d34 | 1,187 | py | Python | plugins/tff_backend/handlers/update_app.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/handlers/update_app.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/handlers/update_app.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 GIG Technology NV
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 37.09375 | 91 | 0.740522 |
13c5f9edc35e75a4c458a8d454b57d6112e14688 | 3,422 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/cliconf/eric_eccli.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/cliconf/eric_eccli.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/cliconf/eric_eccli.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2019 Ericsson AB.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope ... | 34.918367 | 136 | 0.699591 |
b953cabb119383a5b0003bad38fe470ef51d5961 | 6,701 | py | Python | examples/deebert/src/modeling_highway_roberta.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 3 | 2020-09-18T06:00:00.000Z | 2020-09-28T05:15:42.000Z | examples/deebert/src/modeling_highway_roberta.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 9 | 2020-11-13T17:51:46.000Z | 2022-03-12T00:46:15.000Z | examples/deebert/src/modeling_highway_roberta.py | dmlap/transformers | 79588e6fdb5af8add092fc27dd695ea1ebc68b18 | [
"Apache-2.0"
] | 2 | 2021-01-25T02:55:11.000Z | 2021-06-05T23:28:38.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
import torch.nn as nn
from torch.nn import CrossEntropyLoss, MSELoss
from transformers.configuration_roberta import RobertaConfig
from transformers.file_utils import add_start_docstrings, add_start_docstrings_to_callable
from transform... | 44.085526 | 168 | 0.63692 |
b9abd168201535c6c700f6d4c88c504c3fe7e6a6 | 1,089 | py | Python | Info/distribucions.py | jmigual/OiS | b5eb0dc9db8d8c655ea3b941a5ada5c764b7aa0d | [
"MIT"
] | null | null | null | Info/distribucions.py | jmigual/OiS | b5eb0dc9db8d8c655ea3b941a5ada5c764b7aa0d | [
"MIT"
] | null | null | null | Info/distribucions.py | jmigual/OiS | b5eb0dc9db8d8c655ea3b941a5ada5c764b7aa0d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import random
import math
def normal(mu, sigma):
y1 = random.random()
y2 = random.random()
t = math.sqrt(-2*math.log(y1))*math.sin(2*math.pi*y2)
return mu + t*sigma
def densTriang(a, b, c, x):
if x < c:
return 2*(x - a)/((b - a)*(c - a))
return 2*(b - x)/((b - a)*(b - c))
def ... | 16.5 | 55 | 0.562902 |
6a49bccad11c2fc07623876de204e4452997475b | 210 | py | Python | CS303/lab4-6/work/algorithm_ncs/__init__.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS303_Artifical-Intelligence/NCS/algorithm_ncs/__init__.py | Eveneko/SUSTech-Courses | 0420873110e91e8d13e6e85a974f1856e01d28d6 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS303/lab4-6/work/algorithm_ncs/__init__.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z |
class Parameter:
def __init__(self, o, A, M, a, alpha, b, lu):
self.o = o
self.A = A
self.M = M
self.a = a
self.alpha = alpha
self.b = b
self.lu = lu | 21 | 49 | 0.442857 |
dbfd02e81949298b68d3aef8200305d576459cf7 | 1,403 | py | Python | packages/watchmen-rest-doll/src/watchmen_rest_doll/meta_import/space_import_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/meta_import/space_import_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest-doll/src/watchmen_rest_doll/meta_import/space_import_router.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List
from fastapi import APIRouter, Depends
from starlette.responses import Response
from watchmen_auth import PrincipalService
from watchmen_meta.admin import SpaceService
from watchmen_meta.common import ask_meta_storage, ask_snowflake_generator
from watchmen_model.admin import Space, UserRole
fr... | 35.075 | 103 | 0.832502 |
e04c024d8db8215f0799c1ef955bbdcd94d90c19 | 1,177 | py | Python | zencad/examples/Models/nut.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/Models/nut.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/Models/nut.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
from zencad import *
@lazy
def instrument_metric_nut(drad, step, h):
H = step * math.tan(deg(60))
pseg = polysegment(
points(
[
(drad + H / 2, 0, 0),
(drad - H / 4, 0, -(3 / 8 * step)),
(drad - H / 4, ... | 21.017857 | 67 | 0.493628 |
0ee37640a32f5190004dfb22d83afa62e10c1c84 | 409 | py | Python | src/python3_learn_video/exception_try_except_finally.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/exception_try_except_finally.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/exception_try_except_finally.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | """
try:
检测范围
except Exception[as reason]:
出现异常 (Exception) 后的处理代码
finally:
无论如何都会被执行的代码
"""
print('---------------------------------------------')
try:
f = open('我为什么是一个文件.txt', 'w')
print(f.write('我存在了!'))
sum = 1 + '1'
except (OSError, TypeError):
print('出错了!')
finally:
f.close()
pr... | 17.782609 | 54 | 0.466993 |
16977f143a9d7dfa2ce964f675d7ce5112176a51 | 11,333 | py | Python | test/test_npu/test_network_ops/test_combined_copy_contiguous.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_combined_copy_contiguous.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_combined_copy_contiguous.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 47.617647 | 141 | 0.594812 |
bc58f1c521bde41a66760b89fc7e4193c756079e | 2,185 | py | Python | research/nlp/seq2seq/src/seq2seq_model/components.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/seq2seq/src/seq2seq_model/components.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/seq2seq/src/seq2seq_model/components.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.132353 | 78 | 0.639359 |
bc650daabb9922f9827d5a4162c51db2a4838f98 | 2,992 | py | Python | deutschland/bundeswahlleiter/bundeswahlleiter.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/bundeswahlleiter/bundeswahlleiter.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/bundeswahlleiter/bundeswahlleiter.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | import requests
import csv
import io
import zipfile
import pandas
import numpy as np
from itertools import repeat, zip_longest
from more_itertools import take, consume
class Bundeswahlleiter:
HISTORICAL_RESULTS_URL = "https://www.bundeswahlleiter.de/dam/jcr/ce2d2b6a-f211-4355-8eea-355c98cd4e47/btw_kerg.zip"
O... | 39.368421 | 120 | 0.602607 |
4c444e441a47dda458531b3070e32e8c78d53e60 | 468 | py | Python | pacman-arch/test/pacman/tests/remove052.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/remove052.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/remove052.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "-Rs test (dependency chain)"
lp1 = pmpkg("pkg1")
lp1.depends = ["pkg2"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.depends = ["pkg3"]
lp2.reason = 1
self.addpkg2db("local", lp2)
lp3 = pmpkg("pkg3")
lp3.reason = 1
self.addpkg2db("local", lp3)
self.args = "-Rs %s" % " ".join([p.name for ... | 21.272727 | 61 | 0.668803 |
9101b7616e0fe666a95bf173d489e4682e609951 | 3,857 | py | Python | tools/win/md5-gui.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | tools/win/md5-gui.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | tools/win/md5-gui.py | swoiow/dsc | 5860e6bfaa70b700e025533c406a6bc52d4ab74b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import hashlib
import os
import tkinter
from functools import partial
from tkinter import ttk
class AddWidget(ttk.Frame):
def __init__(self, parent, *args, **kwargs):
ttk.Frame.__init__(self, parent, *args, **kwargs)
self.root = parent... | 33.833333 | 101 | 0.597355 |
91098f5326700b40f678302aed271b027e48bfe0 | 1,914 | py | Python | LeetCode_problems/Spiral Matrix/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | LeetCode_problems/Spiral Matrix/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | LeetCode_problems/Spiral Matrix/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | #Logic:
#First, four variables containing the indices for the corner points of the array are initialized.
#The algorithm starts from the top left corner of the array, and traverses the first row from left to right.
#Once it traverses the whole row it does not need to revisit it, thus, it increments the top corner inde... | 41.608696 | 121 | 0.604493 |
53982a6a59e1e5af21e337e245b1eb8060741817 | 1,410 | py | Python | Projeto/aliens.py | joaoantonio17/Space-war | e348164698df56dd89665410734516fc69f4c8ac | [
"MIT"
] | null | null | null | Projeto/aliens.py | joaoantonio17/Space-war | e348164698df56dd89665410734516fc69f4c8ac | [
"MIT"
] | null | null | null | Projeto/aliens.py | joaoantonio17/Space-war | e348164698df56dd89665410734516fc69f4c8ac | [
"MIT"
] | null | null | null | import pygame, random
class Alien():
def __init__(self, janela, Label):
# Define as barras de vida do personagem
self.Label = Label
# Transforma a janela em um rect para usar as coordenadas
self.janela = janela
self.janela_rect = self.janela.get_rect()
# Define a imag... | 34.390244 | 136 | 0.599291 |
53c023dfc0cf03e75bb4b6a1299e94b46022216b | 7,490 | py | Python | analyzer/analyzer.py | ringvorlesung2019mgm/twitter-bingo | f0a1f40024e335977b395049618dafda123e7a8f | [
"Apache-2.0"
] | 2 | 2019-01-15T12:22:43.000Z | 2021-09-08T15:58:49.000Z | analyzer/analyzer.py | ringvorlesung2019mgm/twitter-bingo | f0a1f40024e335977b395049618dafda123e7a8f | [
"Apache-2.0"
] | 47 | 2018-11-08T14:06:13.000Z | 2019-01-05T17:40:26.000Z | analyzer/analyzer.py | ringvorlesung2019mgm/twitter-bingo | f0a1f40024e335977b395049618dafda123e7a8f | [
"Apache-2.0"
] | null | null | null | from kafka import KafkaConsumer, errors
from kafka import KafkaProducer
import ssl
import time
import sys
from sentimentanalysis import get_tweet_sentiment
from convertcerts import pkcs12_to_pem
import argparse
import json
from pymongo import MongoClient
from pymongo.errors import DuplicateKeyError, NotMasterError
from... | 32.284483 | 142 | 0.623364 |
dbb05e6f735882912e4abd7dd576e92d3948da8c | 1,823 | py | Python | play/isbn_test.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | play/isbn_test.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | play/isbn_test.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import unittest
# Tests adapted from `problem-specifications//canonical-data.json` @ v2.4.0
from isbnverify import verify
class IsbnVerifierTest(unittest.TestCase):
def test_valid_isbn_number(self):
self.assertIs(verify('3-598-21508-8'), True)
def test_invalid_check_digit(self):
... | 31.982456 | 76 | 0.696105 |
91663e2df13d40091c0f97c85a38da5edcbf1a49 | 395 | py | Python | Grundlagen/TigerJython/06.2-Baumallee.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 2 | 2020-09-24T12:11:16.000Z | 2022-03-31T04:47:24.000Z | Grundlagen/TigerJython/06.2-Baumallee.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-27T15:06:27.000Z | 2021-03-01T16:32:48.000Z | Grundlagen/TigerJython/06.2-Baumallee.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-24T05:12:35.000Z | 2021-02-24T05:12:35.000Z | from gturtle import *
def zeichneBaum (durchmesser):
forward(durchmesser)
dot(durchmesser/2)
forward(-durchmesser)
makeTurtle()
durchmesser = 30
abstand = 30
repeat 10:
zeichneBaum(durchmesser)
penUp()
right(90)
forward(abstand)
left(90)
forward(abstand)
... | 17.173913 | 31 | 0.607595 |
91c59184f27d3c13a6b466f3a13205cd28d4db8a | 2,438 | py | Python | frappe-bench/env/lib/python2.7/site-packages/stdnum/es/nie.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/es/nie.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/stdnum/es/nie.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # nie.py - functions for handling Spanish foreigner identity codes
# coding: utf-8
#
# Copyright (C) 2012-2017 Arthur de Jong
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# ve... | 31.25641 | 75 | 0.712059 |
5320d079b89f4e4b7556c12139f9a63bd18e53db | 706 | py | Python | 2021/a.py | Akash671/KickStart | 7cf7e572408203c881d56989fb37e6270bd696f0 | [
"CC0-1.0"
] | 1 | 2021-03-12T08:39:01.000Z | 2021-03-12T08:39:01.000Z | 2021/a.py | Akash671/KickStart | 7cf7e572408203c881d56989fb37e6270bd696f0 | [
"CC0-1.0"
] | null | null | null | 2021/a.py | Akash671/KickStart | 7cf7e572408203c881d56989fb37e6270bd696f0 | [
"CC0-1.0"
] | 1 | 2021-03-20T18:55:52.000Z | 2021-03-20T18:55:52.000Z | """
google kick start round D
author : Akash Kumar
username : Akash@1996
"""
T=1
for _ in range(int(input())):
G00,G01,G02=map(int,input().split())
G10,G12=map(int,input().split())
G20,G21,G22=map(int,input().split())
ans=[]
c=0
for i in range(-50,51,1):
if G01-G00==G02-G01:
c+=1
... | 19.611111 | 43 | 0.458924 |
535221d717119657d8920e38238713583eded93c | 4,752 | py | Python | research/cv/vnet/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/vnet/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/vnet/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... | 36.553846 | 111 | 0.635732 |
72cc1d6e65b34446216959c6f756fa41f1f820e7 | 1,052 | py | Python | view/graphicsView_world.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | view/graphicsView_world.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | view/graphicsView_world.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | """
Element of the view.
Contains the GraphicsViewWorld class.
Emits a signal when the view is resized with the old and new size.
"""
from PyQt5 import QtCore
from PyQt5.QtCore import QEvent
from PyQt5.QtWidgets import QGraphicsView
class GraphicsViewWorld(QGraphicsView):
""" A GraphicsViewWorld Widg... | 30.057143 | 102 | 0.628327 |
f453ce7dcc04a8e394225f3e26eb38a41764f77a | 4,566 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/01_filesystem_und_ordner.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/01_filesystem_und_ordner.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_08_Dateien_lesen_und_schreiben/01_filesystem_und_ordner.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Einführung in Ordner- und Dateimanagement
import os
maxl=50
dv=12
import re
def output(string):
delta=len(string)%maxl
if delta != 0:
string+=' '*(maxl-delta)
pattern=re.compile(r'[\S].{'+str(maxl-dv)+r','+str(maxl)+r'}[ ]')
output=pattern.findall(string)
for i in range(len(output)):
... | 31.93007 | 179 | 0.672142 |
be71306d232a326e04c8aa7b013ad26075ba172c | 7,589 | py | Python | tests/google/code_jam/2018/qr/go_gopher.py | Loks-/competitions | 3bb231ba9dd62447048832f45b09141454a51926 | [
"MIT"
] | 4 | 2018-06-05T14:15:52.000Z | 2022-02-08T05:14:23.000Z | tests/google/code_jam/2018/qr/go_gopher.py | Loks-/competitions | 3bb231ba9dd62447048832f45b09141454a51926 | [
"MIT"
] | null | null | null | tests/google/code_jam/2018/qr/go_gopher.py | Loks-/competitions | 3bb231ba9dd62447048832f45b09141454a51926 | [
"MIT"
] | 1 | 2018-10-21T11:01:35.000Z | 2018-10-21T11:01:35.000Z | """ Python script for local testing (compatible with both Python 2 and Python 3)
Disclaimer: this is a way to test your solutions, but it is NOT the real judging
system. The judging system behavior might be different.
"""
from __future__ import print_function
import random
import subprocess
import sys
USAGE_MSG = ""... | 35.629108 | 80 | 0.690605 |
fe4d9d3ae1fe6fd8c46d23ce79d5c73fc15e6925 | 3,801 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_plan_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_plan_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/vultr_plan_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version':... | 26.213793 | 99 | 0.642463 |
fe50f283a3094c23ba8815213ac30e234310a865 | 3,666 | py | Python | workspace/cogrob/service_manager/model/docker_py.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 8 | 2019-05-07T02:30:58.000Z | 2021-12-10T18:44:45.000Z | workspace/cogrob/service_manager/model/docker_py.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 1 | 2021-03-17T07:18:23.000Z | 2021-03-17T07:18:23.000Z | workspace/cogrob/service_manager/model/docker_py.py | CogRob/Rorg | dbf9d849e150404c117f6f0062476d995cec7316 | [
"BSD-3-Clause"
] | 2 | 2019-05-21T14:15:24.000Z | 2022-02-09T12:50:24.000Z | # Copyright (c) 2019, The Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, thi... | 35.592233 | 79 | 0.74659 |
fe713478621ca42d5571a1cb717e9095fe58f809 | 164 | py | Python | IntPrepKit/01-WarmUp/04-Repeated-String.py | sadikkuzu/HackerRank | 2b1ed2cf41f6a5404c5b9293186f301b646b5d33 | [
"Apache-2.0"
] | 5 | 2019-03-09T22:44:01.000Z | 2021-09-14T00:11:38.000Z | IntPrepKit/01-WarmUp/04-Repeated-String.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 4 | 2018-08-16T09:39:47.000Z | 2018-09-14T17:37:07.000Z | IntPrepKit/01-WarmUp/04-Repeated-String.py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 1 | 2020-06-01T23:38:35.000Z | 2020-06-01T23:38:35.000Z | # https://www.hackerrank.com/challenges/repeated-string/problem?h_l=interview&playlist_slugs%5B%5D%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D%5B%5D=warmup | 164 | 164 | 0.835366 |
22fe0133efb5156721f3112d9b668b8e57e310d5 | 5,102 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_igmp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_igmp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/onyx/test_onyx_igmp.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible_collections.community.general.tests.unit.compat.mock import pa... | 39.859375 | 103 | 0.655037 |
a3dcc2f93f0e5a2c2abbaca547f048b033d94d7a | 1,838 | py | Python | research/cv/gan/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/gan/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/gan/export.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.679245 | 100 | 0.710555 |
4339e71378a52136d5d8cb11e9ebf3ca685cc306 | 3,811 | py | Python | Utils/py/ActionSelection/tools/action.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/tools/action.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/ActionSelection/tools/action.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from __future__ import division
import numpy as np
import math
from naoth import math2d as m2d
#num_particles = 30
friction = 0.0275
#good_threshold_percentage = 0.85 # experimental TODO expose this value
#minGoalLikelihood = 0.3
#minGoalParticles = 25 # experimental was 9 before
class Action:
def __init__(s... | 34.963303 | 137 | 0.658882 |
4a6bd2ee9088be65f4f8c7a5976c5c2b12ea6229 | 12,959 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_securitygroup_rule.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_securitygroup_rule.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/cs_securitygroup_rule.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, René Moser <mail@renemoser.net>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 33.228205 | 139 | 0.634077 |
4aaf2d8152630683a37fa4e5bbfa8bce5cd6c66e | 9,220 | py | Python | cs/lambda_cs/07_computer_architecture/ls8/cpu.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/07_computer_architecture/ls8/cpu.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/07_computer_architecture/ls8/cpu.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | """Computer Architecture :: CPU emulator class"""
import os
import sys
class CPU:
"""Main CPU class."""
def __init__(self):
"""Construct a new CPU."""
# 256 bytes (8 bits = 1 byte) of RAM
self.ram = [0b00000000] * 256
# === Internal registers === #
self.reg = [0b0000... | 34.531835 | 75 | 0.539479 |
4ac302f8d7b992b673f612e8d9fb4cb93cbd0069 | 263 | py | Python | run.py | openbikebox/websocket-client | 50b61a70ffcff1acdc13ba69c017e671bd3f983f | [
"MIT"
] | null | null | null | run.py | openbikebox/websocket-client | 50b61a70ffcff1acdc13ba69c017e671bd3f983f | [
"MIT"
] | null | null | null | run.py | openbikebox/websocket-client | 50b61a70ffcff1acdc13ba69c017e671bd3f983f | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
openbikebox websocket-client
Copyright (c) 2021, binary butterfly GmbH
Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.
"""
from app.main import Main
if __name__ == '__main__':
Main()
| 20.230769 | 98 | 0.730038 |
4ac316648621d017b941c583db815ec36b4bace8 | 3,859 | py | Python | tests/test_user.py | PlaidWeb/Publ | 67efc5e32bf25dbac72a83d1167de038b79db5a7 | [
"MIT"
] | 27 | 2018-11-30T21:32:26.000Z | 2022-03-20T19:46:25.000Z | tests/test_user.py | PlaidWeb/Publ | 67efc5e32bf25dbac72a83d1167de038b79db5a7 | [
"MIT"
] | 249 | 2018-09-30T07:04:37.000Z | 2022-03-29T04:31:00.000Z | tests/test_user.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 4 | 2019-03-01T06:46:13.000Z | 2019-06-30T17:45:46.000Z | """ User permissions tests """
# pylint:disable=missing-docstring
import flask
from pony import orm
from publ import user
from . import PublMock
def test_user_permissions(mocker):
test_config = """
[admin]
some:admin
some:other-admin
[group1]
group2
test:user1
[group2]
test:user2
[mutual1]
mutual2
[mutual... | 28.585185 | 86 | 0.641617 |
60388457188510a3f6802416cb9fc1148c27ada8 | 7,386 | py | Python | Packs/CommonScripts/Scripts/UnzipFile/UnzipFile_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/UnzipFile/UnzipFile_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/UnzipFile/UnzipFile_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from tempfile import mkdtemp
from UnzipFile import *
import os
import sys
import pytest
data_test_unzip_no_password = ['testZip.yml', 'ScanSummary.txt', 'item.png']
@pytest.mark.parametrize('file_name', data_test_unzip_no_password)
def test_unzip_no_password(file_name):
"""
Given
- valid zip file - no pa... | 35.854369 | 96 | 0.667208 |
6057127c17f7f6411fcde85eb41af4d7455cb6d5 | 594 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/05_lists.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/05_lists.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/05_lists.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # For the exercise, look up the methods and functions that are available for use
# with Python lists.
# For the following, DO NOT USE AN ASSIGNMENT (=).
x = [1, 2, 3]
y = [8, 9, 10]
# Change x so that it is [1, 2, 3, 4]
x.append(4)
print(x)
# Using y, change x so that it is [1, 2, 3, 4, 8, 9, 10]
x.extend(y)
print(... | 19.16129 | 80 | 0.627946 |
71999f67d142ed138b11444cfddfb9ab22a20fe2 | 2,088 | py | Python | official/cv/dpn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/dpn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/dpn/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.153846 | 108 | 0.683908 |
4616f0b1fea6aeeb541b0c1dd80a9abc628e2297 | 4,818 | py | Python | bin/wikipedia-bodyweight-exercise.py | amrushaban/site | a3f00854b90cc1f14d270e399f91e4b356566513 | [
"MIT"
] | 3 | 2019-04-02T09:10:17.000Z | 2019-10-21T04:46:33.000Z | bin/wikipedia-bodyweight-exercise.py | amrushaban/site | a3f00854b90cc1f14d270e399f91e4b356566513 | [
"MIT"
] | null | null | null | bin/wikipedia-bodyweight-exercise.py | amrushaban/site | a3f00854b90cc1f14d270e399f91e4b356566513 | [
"MIT"
] | 4 | 2017-02-07T17:52:05.000Z | 2020-09-19T07:04:16.000Z | #!/usr/bin/env python
# coding: utf-8
import os
import re
import requests
from datetime import datetime
from bs4 import BeautifulSoup
from logya.core import Logya
from logya.path import slugify, target_file
from logya.writer import encode_content, write
logya = Logya()
logya.init_env()
url = 'https://en.wikipedia.o... | 32.12 | 127 | 0.555625 |
c79882be728de0e3220a126a5e53ee8a69df7da6 | 2,697 | py | Python | subscription_bot.py | git2samus/SubscriptionBot | d90aa4a854308b5dbf229da2699ba27a56adf0fa | [
"MIT"
] | 2 | 2020-01-19T15:18:06.000Z | 2021-02-09T00:56:20.000Z | subscription_bot.py | git2samus/SubscriptionBot | d90aa4a854308b5dbf229da2699ba27a56adf0fa | [
"MIT"
] | null | null | null | subscription_bot.py | git2samus/SubscriptionBot | d90aa4a854308b5dbf229da2699ba27a56adf0fa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Reddit SubscriptionBot
Usage: subscription_bot.py <command> [<args>...]
subscription_bot.py -h | --help
subscription_bot.py --version
Options:
-h, --help Show this screen
--version Show version
Environment Variables:
PRAW_SITE ... | 35.96 | 103 | 0.653319 |
c7dc6358eb8dc5ab56457c184849564cd3d0f5cf | 2,883 | py | Python | module3-adding-data-science-to-a-web-application/routes.py | bs3537/DS-Unit-3-Sprint-3-Productization-and-Cloud | 49579885504059c685b39f19cf59cb19c05ca705 | [
"MIT"
] | 1 | 2020-05-07T20:46:42.000Z | 2020-05-07T20:46:42.000Z | module3-adding-data-science-to-a-web-application/routes.py | bs3537/DS-Unit-3-Sprint-3-Productization-and-Cloud | 49579885504059c685b39f19cf59cb19c05ca705 | [
"MIT"
] | null | null | null | module3-adding-data-science-to-a-web-application/routes.py | bs3537/DS-Unit-3-Sprint-3-Productization-and-Cloud | 49579885504059c685b39f19cf59cb19c05ca705 | [
"MIT"
] | null | null | null |
from flask import Blueprint, jsonify, request, render_template, current_app
from web_app.models import User, Tweet, db
#from web_app.twitter_service import twitter_api_client
my_routes = Blueprint("my_routes", __name__)
#client = twitter_api_client()
#client = current_app.config["TWITTER_API_CLIENT"]
... | 26.694444 | 76 | 0.625737 |
90c29e3dc4292155a6d6c73889a889019adc3df4 | 312 | py | Python | Algorithms/DynamicProgramming/Longest Increasing Subsequence/longest_increasing_subsequence.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 26 | 2019-07-17T11:05:43.000Z | 2022-02-06T08:31:40.000Z | Algorithms/DynamicProgramming/Longest Increasing Subsequence/longest_increasing_subsequence.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 7 | 2019-07-16T19:52:25.000Z | 2022-01-08T08:03:44.000Z | Algorithms/DynamicProgramming/Longest Increasing Subsequence/longest_increasing_subsequence.py | Nidita/Data-Structures-Algorithms | 7b5198c8d37e9a70dd0885c6eef6dddd9d85d74a | [
"MIT"
] | 19 | 2020-01-14T02:44:28.000Z | 2021-12-27T17:31:59.000Z | def longest_increasing_subsequence(arr):
count = 1
memo = arr[0]
for i in range(1, len(arr)):
if arr[i] > memo:
count = count + 1
memo = arr[i]
return count
input_sequence = [10, 22, 9, 33, 21, 50, 41, 60]
print(longest_increasing_subsequence(input_sequence))
| 20.8 | 53 | 0.596154 |
29299e7903bab31f70d2b37ee14cb530d3dabf41 | 13,001 | py | Python | components/amp-utility/tftp/haasdevice.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/amp-utility/tftp/haasdevice.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/amp-utility/tftp/haasdevice.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File : haasdevice.py
@Description: file description
@Date : 2021/06/03 10:03:12
@Author : guoliang.wgl
@version : 1.0
'''
# here put the import lib
import time
import os
import logging
import serial
import logging
from subproce... | 27.8394 | 129 | 0.571879 |
29561f644d72f81f576bebea2bd88af048e0e13d | 15,442 | py | Python | MoPulseGen/lib/model_stitchGAN.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/lib/model_stitchGAN.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | MoPulseGen/lib/model_stitchGAN.py | tushar-agarwal2909/MoPulseGen | a0edeaf67f956e7db27e70f07e47d2f992bcb6f3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Jan 28 16:35:59 2020
@author: agarwal.270a
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow as tf
import tensorflow.keras.layers as layers
#import modules.custom_layers as clayers
from tensorflow.keras import... | 40.424084 | 116 | 0.579329 |
295a9d50378bf62d679261753f699d094af463d8 | 4,451 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/mActionGTObufferselectbycircle.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/mActionGTObufferselectbycircle.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/mActionGTObufferselectbycircle.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from PyQt5.QtCore import Qt,pyqtSignal
from PyQt5.QtGui import QColor,QCursor
from PyQt5.QtWidgets import QAction
from qgis.core import QgsGeometry,QgsWkbTypes,QgsPointXY,QgsCircle,QgsPoint
from qgis.gui import QgsMapTool, QgsRubberBand,... | 36.483607 | 103 | 0.635138 |
31e1bba39f821138e53e9c7b059e1dc54a3feb6d | 252 | py | Python | pattern/neethujojigeorge_numberpattern.py | Gaminee/HACKTOBERFEST2020_pattern | 497152db08d9cd1d6a71e2ccb0e949bc7e605df4 | [
"MIT"
] | null | null | null | pattern/neethujojigeorge_numberpattern.py | Gaminee/HACKTOBERFEST2020_pattern | 497152db08d9cd1d6a71e2ccb0e949bc7e605df4 | [
"MIT"
] | null | null | null | pattern/neethujojigeorge_numberpattern.py | Gaminee/HACKTOBERFEST2020_pattern | 497152db08d9cd1d6a71e2ccb0e949bc7e605df4 | [
"MIT"
] | null | null | null | num = int(input("Enter no of rows: "))
for i in range(1, num + 1):
for j in range(1, num - i + 1):
print(" ", end="")
for j in range(i, 0, -1):
print(j, end="")
for j in range(2, i + 1):
print(j, end="")
print()
| 25.2 | 38 | 0.460317 |
7352a29cb7211bb855f5f5356e3b2aa74c8dd864 | 1,589 | py | Python | python/oneflow/test/modules/test_negative.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_negative.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/test/modules/test_negative.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... | 28.890909 | 72 | 0.706104 |
735eddc6a3043d86b31c1bae3f6817e9edcac336 | 6,224 | py | Python | seite/settings.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-07-24T10:19:36.000Z | 2017-07-24T10:19:36.000Z | seite/settings.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 9 | 2017-07-26T14:16:08.000Z | 2022-03-11T23:14:40.000Z | seite/settings.py | wmles/scholarium.at | d2356b3e475df772382e035ddcb839fc7dae4305 | [
"MIT"
] | 1 | 2017-03-07T12:38:23.000Z | 2017-03-07T12:38:23.000Z | """
Django settings for seite project.
Generated by 'django-admin startproject' using Django 1.9.12.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
fro... | 27.539823 | 147 | 0.722847 |
c36a934470c1f16d610b293661d5fe9e1428209a | 1,431 | py | Python | src/unittest/python/grundlegend/test_division.py | dlangheiter-tgm/test-mirror | 9878da44953c40abc1df0311f275c3eebc2e876b | [
"MIT"
] | null | null | null | src/unittest/python/grundlegend/test_division.py | dlangheiter-tgm/test-mirror | 9878da44953c40abc1df0311f275c3eebc2e876b | [
"MIT"
] | null | null | null | src/unittest/python/grundlegend/test_division.py | dlangheiter-tgm/test-mirror | 9878da44953c40abc1df0311f275c3eebc2e876b | [
"MIT"
] | null | null | null | """
Created on 27.12.2013
@author: Walter Rafeiner-Magor <wrafeiner-magor@tgm.ac.at>
"""
import unittest
from bruch.Bruch import *
class TestDivision(unittest.TestCase):
def setUp(self):
self.b = Bruch(3, 2)
self.b2 = Bruch(self.b)
self.b3 = Bruch(4, 2)
pass
def tearDown(sel... | 24.254237 | 78 | 0.601677 |
c3824a9ad7ae5aa92209864370a3fc90765ae304 | 1,298 | py | Python | multiply.py | BogyMitutoyoCTL/Riesen-Tetris | 8bbbaf0b7aeae7890da724d3d72719a7d068237a | [
"MIT"
] | 1 | 2019-04-27T07:28:52.000Z | 2019-04-27T07:28:52.000Z | multiply.py | BogyMitutoyoCTL/Riesen-Tetris | 8bbbaf0b7aeae7890da724d3d72719a7d068237a | [
"MIT"
] | null | null | null | multiply.py | BogyMitutoyoCTL/Riesen-Tetris | 8bbbaf0b7aeae7890da724d3d72719a7d068237a | [
"MIT"
] | null | null | null | from time import sleep
from features.clock import Clock
from field import Field
import numpy
from painter import RGB_Field_Painter, Led_Matrix_Painter
from rainbow import rainbowcolors
def multiply(background: Field, foreground: Field):
white = Field(10, 20)
for x in range(10):
for y in range(20):
... | 28.217391 | 78 | 0.654854 |
7dd81ba93b9199768c7f935951c5401919a34708 | 3,847 | py | Python | Union/2021/crypto/human_server/human_server.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Union/2021/crypto/human_server/human_server.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Union/2021/crypto/human_server/human_server.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import os, random, hashlib, textwrap, json
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
from Crypto.Util.number import getPrime, long_to_bytes
from fastecdsa.curve import secp256k1
from fastecdsa.point import Point
FLAG = b'union{XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX... | 33.163793 | 499 | 0.690928 |
6ff7253977773de98c5373bf005cf5e78fa5625e | 14,937 | py | Python | research/cv/TNT/src/tnt.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2021-07-08T13:10:42.000Z | 2021-11-08T02:48:57.000Z | research/cv/TNT/src/tnt.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/TNT/src/tnt.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 38.202046 | 120 | 0.59443 |
d22f9de9bb47c990e425c59d5b531b67d5cc3ffd | 596 | pyde | Python | sketches/cuteplanet04/cuteplanet04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/cuteplanet04/cuteplanet04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/cuteplanet04/cuteplanet04.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | #Spaceship
from spaceship import Spaceship
planet = Spaceship("planet.png", 500, 350)
rocket = Spaceship("rocketship.png", 300, 300)
octopussy = Spaceship("octopussy.png", 400, 150)
beetle = Spaceship("beetleship.png", 200, 100)
ships = [planet, rocket, octopussy, beetle]
def setup():
size(640, 480)
planet.... | 21.285714 | 48 | 0.639262 |
d2580e8cef4e3b82b57957c77f20e4367f4e9df8 | 1,885 | py | Python | exr-read.py | gray0018/Normal-integration-benchmark | 3f4fff86e659ae2a3588c0960ebb0af39e4a1e21 | [
"MIT"
] | null | null | null | exr-read.py | gray0018/Normal-integration-benchmark | 3f4fff86e659ae2a3588c0960ebb0af39e4a1e21 | [
"MIT"
] | null | null | null | exr-read.py | gray0018/Normal-integration-benchmark | 3f4fff86e659ae2a3588c0960ebb0af39e4a1e21 | [
"MIT"
] | null | null | null | import OpenEXR
import Imath
import sys
import scipy.io as io
import numpy as np
import cv2
from matplotlib import pyplot as plt
def split_channel(f, channel, float_flag=True):
dw = f.header()['dataWindow']
size = (dw.max.x - dw.min.x + 1, dw.max.y - dw.min.y + 1)
if float_flag:
pt = Imath.PixelTyp... | 30.403226 | 140 | 0.643501 |
838e745eed7501e1cdb6882df34608373717fade | 1,041 | py | Python | listings/chapter06/csv-sniffer.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter06/csv-sniffer.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter06/csv-sniffer.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import csv
# Sniffer-Instanz erzeugen
sniffer = csv.Sniffer()
# Schleife über die zu prüfenden Dateien
files = ["iris.csv", "iris-tabs.csv"]
for csv_filename in files:
print(csv_filename)
csv_file = open(csv_filename, "r")
# Die ersten 1024 Byte der Datei lesen
chunk = csv_file.read(1024)
# Prüfen,... | 32.53125 | 62 | 0.6878 |
58954176d92247a4bbb4a0d48fbf5f56c1541739 | 403 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_7_Datetime_Module/86. return the previous day and the next day of a given date.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_7_Datetime_Module/86. return the previous day and the next day of a given date.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_7_Datetime_Module/86. return the previous day and the next day of a given date.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Write a function that returns the previous day and the next day of a given date.
The output should be in the following format - (prev_day,input_date,next_day).
input_date = date(2020,12,31)
"""
import datetime
def calculate_dates(input_date):
prev_day = input_date - datetime.timedelta(days=1)
next_day = ... | 33.583333 | 81 | 0.751861 |
544a2218ef4312c332953bb3f16679f3c74f0ba6 | 14,191 | py | Python | frappe-bench/env/lib/python2.7/site-packages/dropbox/session.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/dropbox/session.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/dropbox/session.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import os
import pkg_resources
import ssl
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
_TRUSTED_CERT_FILE = pkg_resources.resource_filename(__name__, 'trusted-certs.crt')
# TODO(kelkabany): We probably only want to instantiate this once so ... | 38.667575 | 119 | 0.642097 |
545b2e7712773a0d733bdf84a79d054a90a47bc3 | 440 | py | Python | solution/dynamic_programming_1/17626/main.py | gkgg123/baekjoon | 4ff8a1238a5809e4958258b5f2eeab7b22105ce9 | [
"MIT"
] | 2,236 | 2019-08-05T00:36:59.000Z | 2022-03-31T16:03:53.000Z | solution/dynamic_programming_1/17626/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 225 | 2020-12-17T10:20:45.000Z | 2022-01-05T17:44:16.000Z | solution/dynamic_programming_1/17626/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 602 | 2019-08-05T00:46:25.000Z | 2022-03-31T13:38:23.000Z | # Authored by : osy0056
# Co-authored by : -
# Link : http://boj.kr/49cc21bd78694086b7b2864e8bc6fa69
import math
import sys
def input():
return sys.stdin.readline().rstrip()
n = int(input())
dp = [0] * 50001
INF = float('inf')
dp[0] = 0
dp[1] = 1
for i in range(2, n+1):
min_value = INF
for k in range(1, ... | 20 | 55 | 0.611364 |
3fd8995d9eb9db735a84221adee54574864f8475 | 341 | py | Python | exercises/de/exc_03_16_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/exc_03_16_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/exc_03_16_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.load("de_core_news_sm")
text = (
"Die McDonald’s Corporation ist ein Betreiber und Franchisegeber von "
"weltweit vertretenen Schnellrestaurants."
)
# Deaktiviere den Tagger und den Lemmatizer
with ____.____(____):
# Verarbeite den Text
doc = ____
# Drucke die Entitäten im... | 22.733333 | 74 | 0.718475 |
12a64e9969e46f8d9d8380d13dcef65c1c7c4950 | 1,042 | py | Python | mod/units/curriculum_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 1 | 2015-06-28T15:26:52.000Z | 2015-06-28T15:26:52.000Z | mod/units/curriculum_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | null | null | null | mod/units/curriculum_handler.py | HeraldStudio/wechat | b023b7460a6b4284ea782333e13f24d169ddaff4 | [
"MIT"
] | 6 | 2015-03-20T16:36:22.000Z | 2021-08-28T07:58:18.000Z | # -*- coding: utf-8 -*-
# @Date : 2014-06-29 18:56:08
# @Author : xindervella@gamil.com
import tornado.web
from ..models.course import Course
from weekday import today
from collections import OrderedDict
import re
class CurriculumHandler(tornado.web.RequestHandler):
@property
def db(self):... | 25.414634 | 78 | 0.536468 |
12c4c0bd970bbdd9fed33293657385e047d4c50a | 1,893 | py | Python | staging/odmlReleaseTests/resources/scripts/test_odml_basics.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | staging/odmlReleaseTests/resources/scripts/test_odml_basics.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | staging/odmlReleaseTests/resources/scripts/test_odml_basics.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | import sys
import unittest
try:
# Test possible imports of all parsers without importing the full odML package
from odml.tools import ODMLReader, ODMLWriter, RDFReader, RDFWriter
from odml.tools.converters import FormatConverter, VersionConverter
from odml.tools import XMLReader, XMLWriter, DictReader,... | 30.047619 | 82 | 0.612784 |
12f983989b2effb2ed587a4b1f2af88a44cf7afc | 5,433 | py | Python | research/cv/RCAN/src/args.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/RCAN/src/args.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/RCAN/src/args.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... | 42.445313 | 96 | 0.634088 |
423d524cd2d8c918be63b2faf1409c24c1e953d4 | 32,837 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/patch_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/patch_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/rackmanager/redfish/patch_handler.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
import vie... | 44.982192 | 100 | 0.64202 |
db0c69bec33fb718757236a52966c3937962b64c | 484 | py | Python | Vergleich-Berechnung/compute_mod_upy.py | aboehm/CLT2019 | 51b9b5674b5ed18297c5ee7e825888d632d96a0e | [
"BSD-2-Clause"
] | 1 | 2019-07-01T11:59:06.000Z | 2019-07-01T11:59:06.000Z | Vergleich-Berechnung/compute_mod_upy.py | aboehm/CLT2019 | 51b9b5674b5ed18297c5ee7e825888d632d96a0e | [
"BSD-2-Clause"
] | null | null | null | Vergleich-Berechnung/compute_mod_upy.py | aboehm/CLT2019 | 51b9b5674b5ed18297c5ee7e825888d632d96a0e | [
"BSD-2-Clause"
] | null | null | null | @micropython.viper
def compute(data_len: int) -> int:
data = bytearray(data_len)
idx = 0
while idx < data_len:
data[idx] = idx % 256
idx += 1
loop = 10000
dummy = 0
print('Starting to compute.')
while loop > 0:
s = 0
idx = 0
while idx < data_len:
... | 16.689655 | 43 | 0.495868 |
db10b08852945651bb7217639f0a9ee4b0d7b729 | 436 | py | Python | apps/API/urls.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/API/urls.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | apps/API/urls.py | dongdawang/ssrmgmt | a41e595aec503dcb191a20ea8d58233bbb8f2db0 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import User, UserTransfer, NodeStatus, NodeTransfer, GenerateToken
urlpatterns = [
path('user/', User.as_view(), name='user'),
path('transfer/', UserTransfer.as_view(), name='transfer'),
path('node/status/', NodeStatus.as_view(), name='status'),
path('node/tra... | 33.538462 | 78 | 0.699541 |
e14917591c46e0656175d8d433ed2d45e01ad173 | 445 | py | Python | INBa/2015/Ionova_A_K/task_3_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ionova_A_K/task_3_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Ionova_A_K/task_3_8.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 8.
# Напишите программу, которая выводит имя "Борис Николаевич Бугаев", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире.
# Ionova A.K.
# 30.04.2016
print ("Под каким псевдонимом наиболее известен Борис Нико... | 40.454545 | 209 | 0.757303 |
e1abe83cef223bcdf84acf0644cdfdc50e959337 | 328 | py | Python | mos.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | mos.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | mos.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | {
"clientID": "hsDPiG16PoOUUQD4uhHWoQ==",
"serverToken": "1@pcm+uYFKKI4///C8iWESMjmvgLzG03W8pO5X3SoWwfIoF/ei3K5A/CIGSedMngYR5MQOEoyVZJuaZQ==",
"clientToken": "9QrhzZYvUywTOrVSk3y+IeipuNrqzQkGV/sLH5K/XzY=",
"encKey": "TiqAMsjn1qzIHFRWqwfaTdYD51Mz6RLcDmPithPuBP4=",
"macKey": "rxk1/shtYdeAJzFb4YkzXjqkHRkBoISHZEbg9IAq... | 41 | 101 | 0.79878 |
362894403b14269bb0875fc9c4ef35892454f7f2 | 2,918 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/sumolib/output/convert/fcdfilter.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | sumolib/output/convert/fcdfilter.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | sumolib/output/convert/fcdfilter.py | KhalidHALBA-GR-NIST/UCEFSUMOV2V | 4eb7ac761303a171718a10e4131184746bded9fd | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2017-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.... | 33.930233 | 105 | 0.591501 |
3654cb2a11be93bcf9b2c07e80bd5e6cc430e491 | 918 | py | Python | python/en/archive/practice_python/practice_python-exercise05-List Overlap.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/practice_python/practice_python-exercise05-List Overlap.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/practice_python/practice_python-exercise05-List Overlap.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
2018-10-25 (Thu)
PRACTICE PYTHON, https://www.practicepython.org/
Exercise 5. List Overlap
https://www.practicepython.org/exercise/2014/03/05/05-list-overlap.html
Take two lists, say for example these two:
a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
b = [1, 2, 3, 4, 5, 6, 7, 8... | 30.6 | 87 | 0.653595 |
a1b0957915c2ed31a4363700676480b29b36279b | 717 | py | Python | lang-python/basics/01-hello/hello.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/basics/01-hello/hello.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | lang-python/basics/01-hello/hello.py | xd23fe39/technical-notes | bb6348705a95db24d07b1081b1aa0265dda131ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# Das obligatorische Hallo-Welt-Programm
#
# Kommentare (Zeilenkommentare) werden durch das Raute-Zeichen eingeleitet
# Kommentare dienen der Dokumentation und werden nicht 'interpretiert'.
#
# Offizielles Tutorial (englisch):
# https://docs.python.org/3/tutorial/index... | 37.736842 | 88 | 0.723849 |
62d56d1887864d67723e6eb24f3f985f6e23a83e | 281 | py | Python | src/onegov/ballot/collections/lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/collections/lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/collections/lists.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot.models import List
class ListCollection(object):
def __init__(self, session):
self.session = session
def query(self):
return self.session.query(List)
def by_id(self, id):
return self.query().filter(List.id == id).first()
| 20.071429 | 57 | 0.651246 |
b11b66bd3f4ba03c752e7fd58b872d82af1e8bdc | 249 | py | Python | jumeaux/addons/final/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/addons/final/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/addons/final/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding:utf-8 -*-
from jumeaux.models import FinalAddOnPayload, FinalAddOnReference
class FinalExecutor:
def exec(self, payload: FinalAddOnPayload, reference: FinalAddOnReference) -> FinalAddOnPayload:
raise NotImplementedError()
| 31.125 | 100 | 0.767068 |
4916f86a14c4869b9dc1f7a7c93f540aaa22d9fe | 4,476 | py | Python | tests/onegov/form/test_validators.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/form/test_validators.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/form/test_validators.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm import SessionManager
from onegov.form.validators import InputRequiredIf, \
ValidSwissSocialSecurityNumber
from onegov.form.validators import UniqueColumnValue
from onegov.form.validators import ValidPhoneNumber
from pytest import raises
from sqlalchemy import Column
from sqlalchemy import Text... | 29.84 | 78 | 0.634272 |
622a38729a396c86cc5885ec7eaccfa924461103 | 2,004 | py | Python | solutions/MFA/webserver/src/deep_speaker/viz/triplet_visualization.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 3 | 2021-08-20T16:40:09.000Z | 2022-02-08T23:17:52.000Z | solutions/MFA/webserver/src/deep_speaker/viz/triplet_visualization.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2022-03-22T04:16:15.000Z | 2022-03-22T04:26:03.000Z | solutions/MFA/webserver/src/deep_speaker/viz/triplet_visualization.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2022-03-09T15:40:36.000Z | 2022-03-09T15:40:36.000Z | import logging
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
def remove_values_along_axes():
from matplotlib import pylab
frame = pylab.gca()
frame.axes.get_xaxis().set_ticks([])
frame.axes.get_yaxis().set_ticks([])
def get_coordinates_from_cosine_simi... | 24.740741 | 100 | 0.669661 |
65b8ca7a62f346ff6db056e790c0e014e0bb1b2f | 868 | py | Python | challenges/isInfiniteProcess/python3/isInfiniteProcess.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/isInfiniteProcess/python3/isInfiniteProcess.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/isInfiniteProcess/python3/isInfiniteProcess.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def isInfiniteProcess(a, b):
while a != b:
if (a > b):
return True
a += 1
b -= 1
return False
if __name__ == '__main__':
input0 = [2, 2, 2, 0, 3, 10, 5, 6, 10, 5]
input1 = [6, 3, 10, 1, 1, 10, 10, 10, 0, 5]
expectedOutput = [False, True, False, True, True, False, True, False, True, False]
assert len(inp... | 48.222222 | 132 | 0.652074 |
b881f076bca67f4a56e750f5ab9464a612f3ec07 | 6,816 | py | Python | components/amp-utility/python/iot.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/amp-utility/python/iot.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/amp-utility/python/iot.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # -*- coding: UTF-8 -*-
"""
阿里云物联网平台提供安全可靠的设备连接通信能力,支持设备数据采集上云,规则引擎流转数据和云端数据下发设备端。此外,也提供方便快捷的设备管理能力,支持物模型定义,数据结构化存储,和远程调试、监控、运维。 基于iot模块可以简单快速的使用阿里云物联网平台能力。
iot模块的主要实现是一个Device 类,通过它的构造函数获取device实例,就可以轻松设置相关回调函数和调用相关方法。阿里云物联网平台中涉及三个基本概念如下:
- 属性(prop)
云端/设备端数据互通的通道,云端通过改变prop值,反馈到设备端,设备端修改prop值,保存到云端
- 事件(even... | 22.12987 | 128 | 0.546948 |
b8c14c96e684aadb41f2fe206929cb1b7603ad20 | 10,621 | py | Python | model_zoo/bert/static_ipu/dataset_ipu.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/static_ipu/dataset_ipu.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/static_ipu/dataset_ipu.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 37.006969 | 111 | 0.591752 |
a27796fc8563b458d310f3b7f7828682de0d80a8 | 707 | py | Python | nz_crawl_demo/day2/requests/demo1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day2/requests/demo1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day2/requests/demo1.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | import requests
#GET 请求
response = requests.get('https://www.baidu.com')
print(response) #Response对象
print(response.status_code) #状态码 200
print(response.url) # 请求url地址https://www.baidu.com/
print(response.encoding) #编码类型ISO-8859-1
print(response.cookies) #cookie信息<RequestsCookieJar[<Cookie BDORZ=27315 for .baidu.com/>... | 29.458333 | 101 | 0.736917 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.