摘要: 所有的命令都可以直接在bash中运行测试 命令手册 变量 注意与赋值语句之间没有空格 声明时,不用$,引用时需要 ${},花括号是分界限符号 数组 a=(1 2 3),即空格隔开 数组引用方式:${array_name[index]},当index为@或者*时,引用的是所有元素 数组长度: ${#m 阅读全文
posted @ 2023-02-28 19:55 R=(1-sinθ) 阅读(53) 评论(0) 推荐(0) 编辑
摘要: fork执行 #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <unistd.h> int main() { pid_t pid; //创建一个进程 pid = fork(); //这里执行过后,内存中就创建了两个 阅读全文
posted @ 2021-11-12 11:21 R=(1-sinθ) 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 以node为例 ^: 只会执行不更改最左边非零数字的更新。 如果写入的是 ^0.13.0,则当运行 npm update 时,可以更新到 0.13.1、0.13.2 等,但不能更新到 0.14.0 或更高版本。 如果写入的是 ^1.13.0,则当运行 npm update 时,可以更新到 1.13. 阅读全文
posted @ 2021-11-09 22:56 R=(1-sinθ) 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Locust压测 注意本地启动locus命令的时候: locust -f abtest.py --web-host=locus_service_ip --host=target_http_address locus_service_ip是启动locust服务的ip地址,而host配置locust压测 阅读全文
posted @ 2021-11-08 19:14 R=(1-sinθ) 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 通过miniforge安装tensorflow 安装miniforge: 如果已有anaconda可以先卸载 # 删除conda环境 rm -rf ~/miniforge3 rm -rf .conda rm -rf .condarc 安装miniforge github链接,直接下载【OS X, a 阅读全文
posted @ 2021-11-05 21:32 R=(1-sinθ) 阅读(348) 评论(0) 推荐(0) 编辑
摘要: python性能分析装饰器,官方文档 line profile分析 # line profile import time from functools import wraps from line_profiler import LineProfiler # 查询接口中每行代码执行的时间 def f 阅读全文
posted @ 2021-10-27 12:06 R=(1-sinθ) 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 官方文档 插入数据 # 方式一:插入tag和field insert measurement,tag1=val1,tag2=val2 f1=va1,f2=val2[timestamp] # 注意空格来分割tag 和 field , 千万别乱加空格 # 方式二:插入field insert measu 阅读全文
posted @ 2021-09-23 11:27 R=(1-sinθ) 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 在单独的文件中调用django的环境 在文件开头加入这两行命令 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'task_conf.settings') django.setup() django 模型中调用group by 和 Max https: 阅读全文
posted @ 2021-09-17 10:38 R=(1-sinθ) 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 使用python httpfileserver 阅读全文
posted @ 2021-09-06 18:32 R=(1-sinθ) 阅读(84) 评论(0) 推荐(0) 编辑
摘要: git合并多个提交, 即同时合并多个commit,一次push https://www.cnblogs.com/tocy/p/git-rebase-merge-commit.html git reflog 查看历史所有提交 git rebase 默认master,即变基 git log --pret 阅读全文
posted @ 2021-08-20 15:52 R=(1-sinθ) 阅读(33) 评论(0) 推荐(0) 编辑