Форум сайта python.su
from ctypes import * DLL = cdll.LoadLibrary('D103') print(DLL) DLL.dgauss_.argtypes = [POINTER(c_wchar_p),POINTER(c_int),POINTER(c_double), POINTER(c_double), POINTER(c_double)] DLL.dgauss_.restype = c_double DOBType = c_double input1 = DOBType(1.0) input2 = DOBType(2.0) input3= DOBType(0.0) order = c_wchar_p('f') num=c_int(1) rez= DLL.dgauss_(order,num,input1,input2, input3) print(' TEST PROGRAM D103 (DGAUSS)') print(rez)
from tkinter import * from decimal import * root = Tk() fr = Frame(root) fr_but = Frame(root) fr1 = Frame(root) def pr_nt(set): ent.insert(END,set) def stir(): ent.delete(0,END) ent = Entry(fr, text = ‘0’, width=15,justify=CENTER) b = Button(fr_but,width=1,height=1,text='1') b1 = Button(fr_but,width=1,height=1,text='2') b2 = Button(fr_but,width=1,height=1,text='3') b3 = Button(fr_but,width=1,height=1,text='4') b4 = Button(fr_but,width=1,height=1,text='5') b5 = Button(fr_but,width=1,height=1,text='6') b6 = Button(fr_but,width=1,height=1,text='7') b7 = Button(fr_but,width=1,height=1,text='8') b8 = Button(fr_but,width=1,height=1,text='9') b9 = Button(fr_but,width=1,height=1,text='0') b10 = Button(fr_but,width=1,height=1,text='/') b11 = Button(fr_but,width=1,height=1,text='*') b12 = Button(fr_but,width=1,height=1,text='-') b13 = Button(fr_but,width=1,height=1,text='+') b14 = Button(fr_but,width=1,height=1,text='=') b15 = Button(fr_but,width=1,height=1,text='C', command=stir) b.bind('<Button-1>', lambda event: pr_nt(1)) b1.bind('<Button-1>', lambda event: pr_nt(2)) b2.bind('<Button-1>', lambda event: pr_nt(3)) b3.bind('<Button-1>', lambda event: pr_nt(4)) b4.bind('<Button-1>', lambda event: pr_nt(5)) b5.bind('<Button-1>', lambda event: pr_nt(6)) b6.bind('<Button-1>', lambda event: pr_nt(7)) b7.bind('<Button-1>', lambda event: pr_nt(8)) b8.bind('<Button-1>', lambda event: pr_nt(9)) b9.bind('<Button-1>', lambda event: pr_nt(0)) b10.bind('<Button-1>') b11.bind('<Button-1>') b12.bind('<Button-1>') b13.bind('<Button-1>') b14.bind('<Button-1>') b15.bind('<Button-1>') fr.pack() ent.pack() fr_but.pack() b6.grid(row=0,column=0) b7.grid(row=0,column=1) b8.grid(row=0,column=2) b3.grid(row=1,column=0) b4.grid(row=1,column=1) b5.grid(row=1,column=2) b.grid(row=2,column=0) b1.grid(row=2,column=1) b2.grid(row=2,column=2) b9.grid(row=3,column=1) b10.grid(row=0,column=3) b11.grid(row=1,column=3) b12.grid(row=2,column=3) b13.grid(row=3,column=3) b14.grid(row=3,column=2) b15.grid(row=3,column=0) fr1.pack() root.mainloop()
from random import choice import requests as r import time s = r.Session() s.headers['authorization'] = input('Token: ') fname = 'msg.txt' with open(fname, encoding='utf-8') as fin: text = fin.read() chat_id = input('Input chat id: ') delay = int(input('Delay between messages in seconds: ')) total_sent = 0 while True: try: msg = text print(f'Sending message {msg}') _data = {'content': msg, 'tts': False} resp = s.post( f'https://discord.com/api/v9/channels/{chat_id}/messages', json=_data).json() msg_id = resp['id'] total_sent += 1 print(f'Message sent (Already {total_sent} in total).') print(f'Sleeping {delay} seconds') time.sleep(delay) except Exception as e: print(f'Some error: {e}') time.sleep(20)]
from tkinter import * from tkVideoPlayer import TkinterVideo num = 1 home = Tk() home.geometry("500x500+500+200") home.title("1 LVL") videoplayer = TkinterVideo(master=home, scaled=True) def print_key(event): global num args = event.keysym, event.keycode, event.char print("Знак: {}, Код: {}, Символ: {}".format(*args)) if event.keycode == 87: # KEY W if num != 10: num += 1 home.title(f"{num} LVL") play_video(num) elif event.keycode == 83: # KEY S if num != 1: num -= 1 home.title(f"{num} LVL") play_video(num) def play_video(num): videoplayer.load(f"UpGrow/{num}.mp4") videoplayer.pack(expand=True, fill="both") videoplayer.play() home.bind("<Key>", print_key) play_video(1) home.mainloop()
cap = cv2.VideoCapture('video.mp4') while(cap.isOpened()): ret, frame = cap.read() if ret == True:
IN: Довстречистобой
OUT: До встречи с тобой
IN: Разбежавшисьпрыгнусоскалы
OUT: Разбежавшись прыгну со скалы