https://www.gravatar.com/avatar/ecd1e184bdf4016f24c818bde9e65b3d?s=240&d=mp
记录点滴、留住时光

社交6法

社交6法

  1. 无效社交

    心理学上有个“跷跷板定律”,指的是:人和人之间的关系,就像两人踩跷跷板一样。

    一旦彼此的交换不对等,那么就会像跷跷板一样失衡

    社交的本质其实就是价值的展现和交换,所以与其花时间在无效社交上,不如多花点时间提升自己。

Python程序打包技术学习笔记

相关备忘点

编译

1
python setup.py build

安装

1
python setup.py install

开发模式安装

1
python setup.py develop

在修改代码后可以立即使用,不用重新安装

打一个源码包

1
python setup.py sdist

生成funniest-0.1.tar.gz的源码包

从源码包安装

1
2
tar -zxvf funniest-0.1.tar.gz
python setup.py install

若报错error: can't create or remove files in install directory·,是因为没有权限改安装命令为sudo python3 setup.py install即可

Git常用

修改全局名称及邮箱

当发现提交时的用户名不对时,用下面的指令修改

1
2
git config --global user.name "prehisle"
git config --global user.email prehisle@gmail.com

git commit message编写

1
2
3
4
5
<type>(<scope>): <subject>
// 空一行
<body>
// 空一行
<footer>
1
2
3
4
5
6
7
feat:新功能(feature)
fix:修补bug
docs:文档(documentation)
style: 格式(不影响代码运行的变动)
refactor:重构(即不是新增功能,也不是修改bug的代码变动)
test:增加测试
chore:构建过程或辅助工具的变动

参考:Commit message 和 Change log 编写指南

Python备忘

报error: invalid command ‘bdist_wheel’

1
pip install wheel

时间转换

Python获取秒级时间戳与毫秒级时间戳

ubuntu18.04使用pip安装某包时报错

https://note.youdao.com/yws/public/resource/41112cc5871c7abf8ae2c90c3f174804/xmlnote/image-20200401153406748_4d9d6a45b0f34a249060fa6f5ce92a44/23489

1
2
3
4
prehisle@ubuntu:~/tmp/tyoudaoimg$ pip install -i https://pypi.org/simple youdaopic==0.0.9
Collecting youdaopic==0.0.9
  Could not find a version that satisfies the requirement youdaopic==0.0.9 (from versions: 0.0.1)
No matching distribution found for youdaopic==0.0.9

改用pip3安装成功

Ipsec基础知识

名词解释

AH

IPsec Authentication Header IPsec 认证头协议(IPsec AH)是 IPsec 体系结构中的一种主要协议,它为 IP 数据报提供无连接完整性与数据源认证,并提供保护以避免重播情况。

ESP

IPsec Encapsulating Security Payload 封装安全负载,且ESP加密采用的是对称密钥加密算法,能够提供无连接的数据完整性验证、数据来源验证和抗重放攻击服务