This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l = [] | |
with open('input.txt') as f: | |
for i in f: | |
if i != '': | |
l.append(''.join(i.split('\n'))) | |
# print(file, len(file)) | |
with open('output.txt', 'w') as f: | |
f.write('\n'.join(l[-5:])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtWidgets import QApplication | |
import pyqtgraph as pg | |
import numpy as np | |
app = QApplication(sys.argv) | |
x = np.random.normal(size=300) | |
y = np.random.normal(size=300) | |
plt = pg.plot() | |
draw_place = plt.plot(x, y, pen=None, symbol='star', symbolPen=pg.mkPen('y', width=7), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Table: | |
def __init__(sad, r, c): | |
sad.lis = [[0 for i in range(c)] for j in range(r)] | |
def get_value(sad, r, c): | |
if r < 0 or c < 0: | |
return None | |
elif r >= len(sad.lis) or c >= len(sad.lis[0]): | |
return None | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'audiences':[{ | |
'audience': audience, | |
'schedule': [ | |
'odd':{ | |
{ | |
'teacher': 'name_teacher 1', | |
'class_item': '8m1', | |
'days': {'понедельник': ['8:30 | 9:45': 'Английский']} | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person: | |
def __init__(self, name, middle_name, surname, private_work): | |
self.name = name | |
self.surname = surname | |
self.middle_name = middle_name | |
self.private_work = private_work | |
def get_phone(self): | |
if "private" in self.private_work: | |
return self.private_work["private"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import time | |
import aiohttp | |
import asyncio | |
start = time.time() | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all_d = {} | |
key_week = {'понедельник': 0, 'вторник': 1, 'среда': 2, 'четверг': 3, 'пятница': 4, 'суббота': 5} | |
def add_teacher_key(teacher: str, class_item: str, day: str, time: str) -> None: | |
try: | |
all_d[teacher][class_item][key_week[day]][day].append(time) | |
except (KeyError, IndexError): | |
try: | |
all_d[teacher][class_item][key_week[day]][day] = [time] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtCore import * | |
from PyQt5.QtWidgets import * | |
from PyQt5.QtGui import * | |
class WeekCalendar(QCalendarWidget): | |
def __init__(self, *args): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
m_start, m_end = map(float, input().split()) | |
number_start, number_end, step = map(int, input().split()) | |
size_meteorit = [i for i in range(number_start, number_end + 1, step)] | |
number_meteorit = int(input()) | |
mas_orbit = 'round, hyperbolic, parabolic, elliptical'.split(', ') | |
used = [] | |
for i in range(int(input())): | |
rand_weight = f'{random.uniform(m_start, m_end):.2f}' | |
generator_start = int(f'{number_meteorit}0000') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
n = int(input()) | |
st = sys.stdin.read().split("\n") | |
lis = [[]] | |
tr = False | |
for i in st: | |
i = i.lower() | |
sor = set(i) | |
for j in range(len(lis)): |
NewerOlder