python (питон)

Description: Программирование на супер модном мега крутом языке Питон.

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 37
Reputation: 1
Loyalty: 1
Posts: 3369
Joined: Wed, 10 Oct 2012
With us: 8 years
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#31by dyvniy » Thu, 12 Sep 2019, 13:47:59

Дробные числа из целых
https://docs.python.org/3/library/fractions.html

Code: Select all

import fractions as frc
frc.Fraction(57)  
Image

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 37
Reputation: 1
Loyalty: 1
Posts: 3369
Joined: Wed, 10 Oct 2012
With us: 8 years
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#32by dyvniy » Sun, 8 Dec 2019, 22:52:50

Если эксплорер не предлагает открыть питоном - можно исправить реестром

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File]
@="Python File"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\DefaultIcon]
@="\"C:\\Windows\\py.exe\",1"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\editwithidle]
"MUIVerb"="&Edit with IDLE"
"Subcommands"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\editwithidle\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\editwithidle\shell\edit37]
"MUIVerb"="Edit with IDLE 3.7 (64-bit)"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\editwithidle\shell\edit37\command]
@="\"C:\\Prog\\Python37\\pythonw.exe\" -m idlelib \"%L\" %*"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\open]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\Shell\open\command]
@="\"C:\\Windows\\py.exe\" \"%L\" %*"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shellex]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Python.File\shellex\DropHandler]
@="{BEA218D2-6950-497B-9434-61683EC065FE}"

Attachments
explorer.py.reg.zip
(596 Bytes) Downloaded 33 times
Image

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 37
Reputation: 1
Loyalty: 1
Posts: 3369
Joined: Wed, 10 Oct 2012
With us: 8 years
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

управление мышью

#33by dyvniy » Tue, 21 Jan 2020, 18:42:18

Code: Select all

 #mouse
from pyautogui import moveTo, click
from time import sleep
while True:
    moveTo(1000, 100)
    click()
    sleep(12)
    moveTo(1500, 500)
    sleep(13)

или скачать такую прогу
https://leomoon.com/downloads/desktop-apps/leomoon-sessionguard/

else code

Code: Select all

#mouse
import pyautogui as pg
import time
from random import random as rnd
tm = 5*60
rn = tm
pg.FAILSAFE = False
while True:
    pg.moveTo(500, 500)
    pg.click()
    time.sleep(tm + rn * rnd() )
    pg.moveTo(600, 300)
    pg.click()
    time.sleep(tm + rn * rnd() )
Attachments
leomoon-dot-com_leomoon-sessionguard_win.zip
(1.23 MiB) Downloaded 33 times
Image

dyvniy M
Topic author, Администратор
Администратор
Avatar
dyvniy M
Topic author, Администратор
Администратор
Age: 37
Reputation: 1
Loyalty: 1
Posts: 3369
Joined: Wed, 10 Oct 2012
With us: 8 years
Профессия: Программист
Location: Россия, Москва
ICQ Website Skype VK

#34by dyvniy » Mon, 31 Aug 2020, 13:04:35

:)
Attachments
Repos_py.zip
(1.69 KiB) Downloaded 9 times
Image


Forum name: Python
Description: Программирование на супер модном мега крутом языке Питон.

Quick reply


Enter the code exactly as it appears. All letters are case insensitive.
Confirmation code
:) ;) :hihi: :P :hah: :haha: :angel: :( :st: :_( :cool: 8-| :beee: :ham: :rrr: :grr: :* :secret: :stupid: :music: View more smilies
   

Return to “Python”

Who is online (over the past 15 minutes)

Users browsing this forum: 1 guest