随笔分类 -  python

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 48 下一页
摘要:import win32con # 定义 import win32gui # 界面 import time # 时间 QQ= win32gui.FindWindow("Notepad","无标题 - 记事本") for num in range(120): time.sleep(1) if num%2 == 0: win32gui.ShowWindow... 阅读全文
posted @ 2019-05-03 13:23 anobscureretreat 阅读(2032) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-05-03 13:14 anobscureretreat 阅读(379) 评论(0) 推荐(0)
摘要:import win32con import win32gui import time while True: time.sleep(1) notepad = win32gui.FindWindow("Notepad","无标题 - 记事本") for size in range(0,1620): time.sleep(0.001) w... 阅读全文
posted @ 2019-05-03 13:12 anobscureretreat 阅读(215) 评论(0) 推荐(0)
摘要:import win32con import win32gui import time import math notepad = win32gui.FindWindow("Notepad","无标题 - 记事本") while True: # time.sleep(0.5) for size in range(0,800): time.sleep(0.005... 阅读全文
posted @ 2019-05-03 13:10 anobscureretreat 阅读(229) 评论(0) 推荐(0)
摘要:使用之前先打开一个记事本, import win32gui import win32con import time notepad = win32gui.FindWindow("Notepad","无标题 - 记事本") while(1): for size in range(0,800): win32gui.SetWindowPos(notepad, # 操作记事本... 阅读全文
posted @ 2019-05-03 12:47 anobscureretreat 阅读(1721) 评论(0) 推荐(0)
摘要:需先打开一个无标题记事本, 阅读全文
posted @ 2019-05-03 12:40 anobscureretreat 阅读(1033) 评论(0) 推荐(0)
摘要:# 系统客户端包 import win32com.client speaker = win32com.client.Dispatch("SAPI.SPVOICE") # 系统接口 while True: speaker.Speak("你要说的话") 阅读全文
posted @ 2019-05-03 12:27 anobscureretreat 阅读(789) 评论(0) 推荐(0)
摘要:点击 文档>>设置文件编码>>Unicode>>Unicode(UTF-8) 阅读全文
posted @ 2019-05-03 02:50 anobscureretreat 阅读(7156) 评论(1) 推荐(0)
摘要:utf-8 阅读全文
posted @ 2019-05-03 02:49 anobscureretreat 阅读(1225) 评论(0) 推荐(0)
摘要:>>> 1 if(1) else 6 1 >>> 1 if(0) else 6 6 >>> 阅读全文
posted @ 2019-05-02 00:38 anobscureretreat 阅读(412) 评论(0) 推荐(0)
摘要:对于任意 m*n 矩阵,将 1~m*n 的数字按照螺旋规则在矩阵中排列。 如 m=3,n=3,期望结果为: 以下代码支持方阵以及非方阵。 code: 输出 阅读全文
posted @ 2019-05-02 00:21 anobscureretreat 阅读(2349) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-05-01 23:34 anobscureretreat 阅读(3346) 评论(0) 推荐(0)
摘要:#!/usr/bin/env python # coding=utf-8 import redis import time, datetime def acquire_lock(conn, lockname, identifier, expire=10): if conn.setnx(lockname, identifier): conn.expire(lock... 阅读全文
posted @ 2019-05-01 04:22 anobscureretreat 阅读(159) 评论(0) 推荐(0)
摘要:class MyDLock(object): def __init__(self, lockID,timeout): self.connection = redis.Redis(host=cfg.REDIS_SERVER_IP, port=cfg.REDIS_SERVER_PORT, password=cfg.REDIS_SERVER_PWD, db=cfg.REDI... 阅读全文
posted @ 2019-05-01 04:09 anobscureretreat 阅读(1184) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-05-01 02:22 anobscureretreat 阅读(578) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*- ''' # An implementation of sequence to sequence learning for performing addition Input: "535+61" Output: "596" Padding is handled by using a repeated sentinel character (spa... 阅读全文
posted @ 2019-05-01 01:45 anobscureretreat 阅读(215) 评论(0) 推荐(0)
摘要:#miss part begin_last = 0.0 k=0.1 timer = threading.Timer(2, flag_true) if(time_last!=0.0): time_now = datetime.datetime.now() k = (time_now - time_last).total_secon... 阅读全文
posted @ 2019-04-29 18:02 anobscureretreat 阅读(141) 评论(0) 推荐(0)
摘要:输出 阅读全文
posted @ 2019-04-28 23:42 anobscureretreat 阅读(3201) 评论(0) 推荐(0)
摘要:sin(x) 返回x的正弦值(以弧度表示)。sinh(x) 返回x的双曲正弦。asin(x) 返回x的反正弦(以弧度表示)。asinh(x) 返回x的反双曲正弦值。 cos(x) 返回x的余弦值(以弧度表示)。cosh(x) 返回x的双曲余弦值。acos(x) 返回x的反余弦(以弧度表示)。acos 阅读全文
posted @ 2019-04-28 21:55 anobscureretreat 阅读(21839) 评论(0) 推荐(1)
摘要:输出 阅读全文
posted @ 2019-04-28 21:41 anobscureretreat 阅读(3310) 评论(0) 推荐(0)

上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 48 下一页