上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 68 下一页
摘要: python在编写排列组合是会用到 itertools 模块 排列 组合 可以重复的排序(类似密码) 利用生成器可以跌代的生产密码,节约内存 阅读全文
posted @ 2019-05-03 14:32 anobscureretreat 阅读(1924) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-05-03 14:28 anobscureretreat 阅读(1387) 评论(0) 推荐(0)
摘要: os.system("系统命令") 调用系统命令 os.listdir(地址) 扫描目录里面的文件。默认的是当前文件夹 返回一个列表 os.mkdir(路径) 创建一个文件夹 os.popen (系统命令) 方法用于从一个命令打开一个管道 os常用 的几个方法 阅读全文
posted @ 2019-05-03 14:24 anobscureretreat 阅读(196) 评论(0) 推荐(0)
摘要: import win32con import win32api import time win32api.SetCursorPos([30,30]) # 设置鼠标位置 time.sleep(0.1) #win32con.MOUSEEVENTF_RIGHTDOWN 右边鼠标按下 #win32con.MOUSEEVENTF_RIGHTDUP 右边鼠标抬起 #win32con.MOUSEEVE... 阅读全文
posted @ 2019-05-03 14:12 anobscureretreat 阅读(459) 评论(0) 推荐(0)
摘要: pattern = input("请输入你要选择的模式:") while True: if pattern == "A": row = eval(input("请输入行数:")) for i in range(1, row + 1): for j in range(1, i+1): print(j... 阅读全文
posted @ 2019-05-03 13:56 anobscureretreat 阅读(2874) 评论(0) 推荐(0)
摘要: code 阅读全文
posted @ 2019-05-03 13:52 anobscureretreat 阅读(492) 评论(0) 推荐(0)
摘要: 显示 阅读全文
posted @ 2019-05-03 13:48 anobscureretreat 阅读(1996) 评论(0) 推荐(0)
摘要: code 阅读全文
posted @ 2019-05-03 13:39 anobscureretreat 阅读(1721) 评论(0) 推荐(0)
摘要: code 阅读全文
posted @ 2019-05-03 13:36 anobscureretreat 阅读(2217) 评论(0) 推荐(1)
摘要: code 阅读全文
posted @ 2019-05-03 13:34 anobscureretreat 阅读(4923) 评论(0) 推荐(0)
摘要: 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 阅读(212) 评论(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 阅读(1220) 评论(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 阅读(2348) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-05-01 23:34 anobscureretreat 阅读(3346) 评论(0) 推荐(0)
摘要: (在网络上搜索找到关于传输层和网络层的解释,记录下来) 在协议栈中,传输层位于网络层之上,传输层协议为不同主机上运行的进程提供逻辑通信,而网络层协议为不同主机提供逻辑通信。这个区别很微妙,但是却非常重要。让我们用一家人作为类比来说明一下这个区别。 设想一下有两所房子,一个位于东海岸而另一个位于西海岸 阅读全文
posted @ 2019-05-01 05:04 anobscureretreat 阅读(8541) 评论(0) 推荐(4)
摘要: Internet 组管理协议称为IGMP协议(Internet Group Management Protocol),是因特网协议家族中的一个组播协议。该协议运行在主机和组播路由器之间。 IGMP协议共有三个版本,即IGMPv1、v2 和v3。 主机IP软件需要进行组播扩展,才能使主机能够在本地收发 阅读全文
posted @ 2019-05-01 04:59 anobscureretreat 阅读(2075) 评论(0) 推荐(0)
摘要: TCP是主机对主机层的传输控制协议,提供可靠的连接服务,采用三次握手确认建立一个连接: 位码即tcp标志位,有6种标示: Sequence number(顺序号码) Acknowledge number(确认号码) 在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接。 第一 阅读全文
posted @ 2019-05-01 04:33 anobscureretreat 阅读(1731) 评论(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 阅读(1182) 评论(0) 推荐(0)
摘要: Redis的pipeline(管道)功能在命令行中没有,但redis是支持pipeline的,而且在各个语言版的client中都有相应的实现。 由于网络开销延迟,就算redis server端有很强的处理能力,也会由于收到的client消息少,而造成吞吐量小。当client 使用pipelining 阅读全文
posted @ 2019-05-01 03:28 anobscureretreat 阅读(349) 评论(0) 推荐(0)
摘要: 1. 基本原理 1.1 为什么会出现Pipeline Redis本身是基于Request/Response协议的,正常情况下,客户端发送一个命令,等待Redis应答,Redis在接收到命令,处理后应答。在这种情况下,如果同时需要执行大量的命令,那就是等待上一条命令应答后再执行,这中间不仅仅多了RTT 阅读全文
posted @ 2019-05-01 03:02 anobscureretreat 阅读(395) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-05-01 02:22 anobscureretreat 阅读(577) 评论(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 阅读(214) 评论(0) 推荐(0)
摘要: 概述在实际开发过程中经常会遇到一些有时效性数据,比如限时优惠活动,缓存或者验证码之类的。过了一段时间就需要删除这些数据。在关系型数据库中一般都要增加一个字段记录数据的到期时间,然后周期性地检查过期数据然后删除。Redis本身就对键过期提供了很好的支持。Redis过期机制在Redis中可以使用EXPI 阅读全文
posted @ 2019-04-30 00:47 anobscureretreat 阅读(2353) 评论(1) 推荐(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)
摘要: https://docs.julialang.org/en/v1/manual/getting-started/ 阅读全文
posted @ 2019-04-29 00:32 anobscureretreat 阅读(134) 评论(0) 推荐(0)
摘要: 下载安装程序,拖拽完成安装 阅读全文
posted @ 2019-04-29 00:01 anobscureretreat 阅读(172) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-04-28 23:42 anobscureretreat 阅读(3198) 评论(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 阅读(21838) 评论(0) 推荐(1)
摘要: 坐标系建立: 载体坐标系与载体坐标系的关系是三个Euler角:yaw,pitch,roll,反应了载体相对基准面的姿态。 pitch是围绕X轴旋转,也叫做俯仰角。当X轴的正半轴位于过坐标原点的水平面之上(抬头)时,俯仰角为正,否则为负,如下图所示。 yaw是围绕Y轴旋转,也叫偏航角。即机头右偏航为正 阅读全文
posted @ 2019-04-28 21:53 anobscureretreat 阅读(6409) 评论(0) 推荐(0)
摘要: Vim里常见的几个不可见字符:^@ = 0x00 Null值^I = 0x09 水平制表^J = 0x0A 换行^M = 0x0D 回车 阅读全文
posted @ 2019-04-28 21:50 anobscureretreat 阅读(979) 评论(0) 推荐(0)
摘要: 输出 阅读全文
posted @ 2019-04-28 21:41 anobscureretreat 阅读(3310) 评论(0) 推荐(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 68 下一页