0%

批量注册apple id的脚本
这里只作python技术研究.无法实践利用.更多期待后续更新.
待改进:

1、支持多种邮箱注册,或者尝试自己搭建一个邮件服务器。

2、注册一批后自动切换vpn。

3、日志细化,注册结果分到2个csv文件。

待实现:自动激活apple id功能。
QQ群:397745473

阅读全文 »

使用aws亚马逊的boto3报错解决办法
QQ群:397745473

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
C:\Python27\python.exe D:/python/test_boto3.py
Traceback (most recent call last):
  File "D:/python/test_boto3.py", line 5, in <module>
    client = boto3.client('ses')
  File "C:\Python27\lib\site-packages\boto3\__init__.py", line 83, in client
    return _get_default_session().client(*args, **kwargs)
  File "C:\Python27\lib\site-packages\boto3\session.py", line 263, in client
    aws_session_token=aws_session_token, config=config)
  File "C:\Python27\lib\site-packages\botocore\session.py", line 836, in create_client
    client_config=config, api_version=api_version)
  File "C:\Python27\lib\site-packages\botocore\client.py", line 70, in create_client
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "C:\Python27\lib\site-packages\botocore\client.py", line 224, in _get_client_args
    verify, credentials, scoped_config, client_config, endpoint_bridge)
  File "C:\Python27\lib\site-packages\botocore\args.py", line 45, in get_client_args
    endpoint_url, is_secure, scoped_config)
  File "C:\Python27\lib\site-packages\botocore\args.py", line 103, in compute_client_args
    service_name, region_name, endpoint_url, is_secure)
  File "C:\Python27\lib\site-packages\botocore\client.py", line 297, in resolve
    service_name, region_name)
  File "C:\Python27\lib\site-packages\botocore\regions.py", line 122, in construct_endpoint
    partition, service_name, region_name)
  File "C:\Python27\lib\site-packages\botocore\regions.py", line 135, in _endpoint_for_partition
    raise NoRegionError()
botocore.exceptions.NoRegionError: You must specify a region.
阅读全文 »

pyqt环境搭建
QQ群:397745473

python 版本选择

.选择python 2.x

python 开发的easy 模式

原生的idle并不好用.
可以选用ipython,支持自动补全.自动缩进,支持bash shell
内部很多有用的功能和函数.

pythonxy

集成python 科技计算包.如numpy,matplotlib,spyder
缺点:现在更新比较慢了.

python EPD

商业版本,不建议用

Anaconda

建议使用
内部很多新版本的科学计算包,由python之父维护.
安装前卸载其他python解释器
下载地址:https://www.continuum.io/downloads/
装完后再去pyqt官网下载一个重新安装pyqt.这样才能编译成功.
安装ERIC4 F2运行
安装

Eric4

首次运行需配置环境

eclipse + pydev

安装jdk,java运行环境
在eclipse中安装pydev
1.去官网下载eclipse
2.安装Pydev
输入网址,选第一个勾上就行了.
配置python解释器路径

阅读全文 »

openresty mvc框架
常用Lua开发库3-模板渲染
动态web网页开发是Web开发中一个常见的场景,比如像京东商品详情页,其页面逻辑是非常复杂的,需要使用模板技术来实现。而Lua中也有许多模板引擎,如目前我在使用的lua-resty-template,可以渲染很复杂的页面,借助LuaJIT其性能也是可以接受的。

如果学习过JavaEE中的servlet和JSP的话,应该知道JSP模板最终会被翻译成Servlet来执行;而lua-resty-template模板引擎可以认为是JSP,其最终会被翻译成Lua代码,然后通过ngx.print输出。

而lua-resty-template和大多数模板引擎是类似的,大体内容有:
模板位置:从哪里查找模板;
变量输出/转义:变量值输出;
代码片段:执行代码片段,完成如if/else、for等复杂逻辑,调用对象函数/方法;
注释:解释代码片段含义;
include:包含另一个模板片段;
其他:lua-resty-template还提供了不需要解析片段、简单布局、可复用的代码块、宏指令等支持。

阅读全文 »

今天用到lua生成随机数的方法,生简单.

1
2
math.randomseed(os.time())
local ranNumber=math.random(1,99999999)

第二句必须有哦.

阅读全文 »

location正则写法

一个示例:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
location  = / {
# 精确匹配 / ,主机名后面不能带任何字符串
[ configuration A ]
}

location / {
# 因为所有的地址都以 / 开头,所以这条规则将匹配到所有请求
# 但是正则和最长字符串会优先匹配
[ configuration B ]
}

location /documents/ {
# 匹配任何以 /documents/ 开头的地址,匹配符合以后,还要继续往下搜索
# 只有后面的正则表达式没有匹配到时,这一条才会采用这一条
[ configuration C ]
}

location ~ /documents/Abc {
# 匹配任何以 /documents/ 开头的地址,匹配符合以后,还要继续往下搜索
# 只有后面的正则表达式没有匹配到时,这一条才会采用这一条
[ configuration CC ]
}

location ^~ /images/ {
# 匹配任何以 /images/ 开头的地址,匹配符合以后,停止往下搜索正则,采用这一条。
[ configuration D ]
}

location ~* \.(gif|jpg|jpeg)$ {
# 匹配所有以 gif,jpg或jpeg 结尾的请求
# 然而,所有请求 /images/ 下的图片会被 config D 处理,因为 ^~ 到达不了这一条正则
[ configuration E ]
}

location /images/ {
# 字符匹配到 /images/,继续往下,会发现 ^~ 存在
[ configuration F ]
}

location /images/abc {
# 最长字符匹配到 /images/abc,继续往下,会发现 ^~ 存在
# F与G的放置顺序是没有关系的
[ configuration G ]
}

location ~ /images/abc/ {
# 只有去掉 config D 才有效:先最长匹配 config G 开头的地址,继续往下搜索,匹配到这一条正则,采用
[ configuration H ]
}

location ~* /js/.*/\.js
阅读全文 »