This file contains hidden or 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
#!/usr/bin/python | |
import threading, time, subprocess, logging, minimalmodbus | |
from apscheduler.schedulers.background import BackgroundScheduler | |
from time import sleep | |
def save_log(path, data): | |
data = "[ERROR {}] {}\n".format(time.strftime('%Y%m%d %X '),data) | |
with open(path, "a") as f: |
This file contains hidden or 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
answer,f = int([x for x in str(id('ajshduyuu'))[:-3] if x != "0"][-1]), lambda x: (False, print('Many')) if (x > answer) else ((False, print('Little')) if x < answer else (True, print('Good Job'))) | |
while not f(int(input("Please enter number 1-10: ")))[0]:pass | |
# print(int([x for x in str(id('ajshduyuu'))[:-3] if x != "0"][-1])) |
This file contains hidden or 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
line = [] | |
desc = [] | |
flag = 1 | |
for r in range(1,9): | |
temp = [] | |
if flag % 2 == 0: | |
for x in range(1,9): | |
if x % 2 == 0: | |
temp.append(chr(9632)) | |
line.append(0) |
This file contains hidden or 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
length = 7 | |
text = "Ну привет" | |
for x in range(1, length + 1 ): | |
if x == 1 or x == length: | |
for i in range(length): | |
print(" ━", end="") | |
print() | |
else: | |
if (length - 1) / 2 + 1 == x: |
This file contains hidden or 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
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.0 Safari/532.5 | |
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.9 (KHTML, like Gecko) Chrome/5.0.310.0 Safari/532.9 | |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.514.0 Safari/534.7 | |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.14 (KHTML, like Gecko) Chrome/9.0.601.0 Safari/534.14 | |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.14 (KHTML, like Gecko) Chrome/10.0.601.0 Safari/534.14 | |
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.20 (KHTML, like Gecko) Chrome/11.0.672.2 Safari/534.20 | |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.27 (KHTML, like Gecko) Chrome/12.0.712.0 Safari/534.27 | |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.24 Safari/535.1 | |
Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2 | |
Mozilla |
This file contains hidden or 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
arr = [1,2,1,5,2,1,3,2,4] | |
# arr = [1,2,3,4] | |
class MyException(ValueError): | |
pass | |
def dublicate(arr, repeat = []): | |
if not arr: | |
raise MyException("Exception None dublicate") | |
elif arr[0] in repeat: |
NewerOlder