V2ray是一个可靠的扶墙软件,原生版本对普通用户不太友好,Mac上可以装一个客户端方便使用。 V2RayU是一个集成V2Ray内核的图形化界
下面我们介绍下V2Ray Windows客户端V2rayN的下载、安装及使用。 V2RayN下载 V2RayN 是一个基于 V2Ray 内核的 Windows 客户端。V2Ray内核 + V
狭义的VPN虛拟私人网络(Virtual Private Network,缩写:VPN)是一种常用于连接中、大型企业或团体与团体间的私人网络的通讯方法。 广义
狭义的VPN虛拟私人网络(Virtual Private Network,缩写:VPN)是一种常用于连接中、大型企业或团体与团体间的私人网络的通讯方法。 广义
Python pip配置默认镜像源
description: “Python Pip pypi
在连接pip官网的时候状况不是很稳定。很多国内镜像站可以使用,加速下载。
使用镜像源很简单,用-i指定就行了:
easy_install -i http://pypi.douban.com/simple/ gevent
pip install -i http://pypi.douban.com/simple/ gevent
如果觉得太麻烦,可以配制成默认:
linux下,修改~/.pip/pip.conf
,如果没这文件则创建。
windows下,修改%HOMEPATH%\pip\pip.ini
,内容为:
[global]
index-url = http://pypi.douban.com/simple
新的版本中会在非https传输的镜像站上报错。
解决办法就是pip.conf的内容改为:
[global]
trusted-host=mirrors.aliyun.com
index-url=http://mirrors.aliyun.com/pypi/simple/
Python生成随机密码
HTTP是建立在TCP上面的,一次HTTP请求要经历TCP三次握手阶段,然后发送请求,得到相应数据,最后TCP断开连接。 如果我们要发出多个H
2019年4月,从小米办完离职手续第二天,就踏上了来坡县的航班;花三天时间解决了租房为问题。然后四月下旬,正式加入Shopee,转眼已是半年
在上传文件到Django Server时,如果前端页面依赖Django form模板,耦合会较多,不便于异常处理和前后端分离。 我们可以通过新建F
How to fetch millions of rows from DataBase by Django Queryset in a memory efficient way? Below is a solution that chunks the QuerySets so they’re only keeping a small subset in memory. While this is somewhat heavier on the database (multiple queries) it seriously reduces the memory usage. Example import gc def lazy_fetch_iterator(table, start_pk=0, chunk_size=1000, *args, **kwargs): """ Get the entire rows of a table by iterating over Django
Lazy QuerySet A queryset in Django represents a number of rows in the database, optionally filtered by a query. For example, the following code represents all people in the database whose first name is ‘Dave’: person_set = Person.objects.filter(first_name="Dave") The above code doesn’t run any database queries. You can can take the person_set and apply additional filters, or pass
数据库长连接 长连接是指程序之间的连接在建立之后,就一直打开,被后续程序重用。使用长连接的初衷是减少连接的开销。 先看看官方文档是怎么讲Djan
为了解决单个数据库的性能问题,除了使用性能更好的硬件之外, 另外一个思路就是将一个数据库切分成多个部分放到不同的数据库上,从而缓解单一数据库的
Django ORM没有提供默认的分表功能,给访问分表的数据库带来的不变。那么Django分表怎么实现呢? 分析Django ORM 在实现具体的方案之前,我们先
索引失效的情况 create payment table: create table payment_tab { `id` bigint unsigned auto_increment, `payment_id` bigint unsigned not null, `user_id` bigint unsigned not null, `create_time` int unsigned not null, `update_time` int unsigned not null default 0, `amount` bigint not null default 0, `payment_status` tinyint not null default 0, `ref` varchar(64) default NULL, `payment_type` tinyint not null default 0, primary key (`id`), -- 主键 `idx_user_id` (`user_id`),
现在互联网用到的很多技术都相当成熟了。不必高估技术,技术是为业务服务的,认清自己作为研发人员在公司的位置。 比如小米号称黑科技、为发烧而生,实
Gitalk
is a comment plug based on Github issue api.
Hugo
can compile the Markdown files with themes and templates into static web files, such as CSS, HTML and JavaScript.
To use Gitalk
in the Hugo
blog, we need to add Gitalk related code as <div>
into the HTML template.
Then update the config.toml for Gitalk
.
Hugo
has many template params for the blog web page. There are two which are related to word count of articles.
There is an interesting api on https://ghchart.rshah.org/
It can display your Github chart information as an image.
2019-01 小时候,吃奶奶做的咸鸭蛋,我只喜欢金黄泛着油香的蛋黄,不喜欢咸咸的蛋白。我把蛋黄挖出来吃掉,总是奶奶就剩下的蛋白下饭。 奶奶爱我,所以把蛋黄
01-01 哇哦,不经意间,又是一年过去。这个元旦没有出去溜达,只是在屋里刷一刷算法题。然后,有点感触,为啥在学校的时候没有好好学,现在工作了该补的还