摘要: 包package 每个Go程序都是由包构成的, 程序从main包开始运行, 按照约定, 报名与导入路径的最后一个元素一致, 例如"match/rand"包中的源码均以package rand语句开始 导入 单行导入 import "fmt" import "match" 括号分组导入(注意没有逗号) 阅读全文
posted @ 2021-04-17 10:08 Alex-GCX 阅读(214) 评论(0) 推荐(0) 编辑
摘要: # 创建.pip目录 mkdir ~/.pip cd ~/.pip # 创建pip.conf文件 touch pip.conf # 编辑该文件 vim pip.conf # 设置阿里源 [global] trusted-host = mirrors.aliyun.com index-url = ht 阅读全文
posted @ 2021-04-17 09:40 Alex-GCX 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 问题描述 这里有三张表ProjectAlgorithmVersion(简称PAV)和Project和UserInfo, 关联关系为: PAV.project_id = Project.project_id PAV.create_by = UserInfo.user_id 现在想查询一条PAV的数据( 阅读全文
posted @ 2021-04-17 09:39 Alex-GCX 阅读(1191) 评论(0) 推荐(0) 编辑
摘要: Ubuntu18.04安装NVIDIA显卡驱动 查看显卡硬件型号 sudo ubuntu-drivers devices # 结果 == /sys/devices/pci0000:3a/0000:3a:00.0/0000:3b:00.0 == modalias : pci:v000010DEd000 阅读全文
posted @ 2021-04-17 09:37 Alex-GCX 阅读(5709) 评论(0) 推荐(1) 编辑
摘要: conda版本 conda --version 升级conda版本 conda update conda 创建新环境 conda create -n env_name python=3.9 复制一个已有环境 # 通过克隆snowfllakes来创建一个称为flowers的副本 conda creat 阅读全文
posted @ 2021-04-17 09:33 Alex-GCX 阅读(66) 评论(0) 推荐(0) 编辑
摘要: Ubuntu安装mysql 进入mysql下载官网: https://dev.mysql.com/downloads/, 目前最新版本为mysql 8.0.23 这里选择点击MySQL APT Repository即deb源的安装方式安装 进入下载页面后复制deb的下载链接, 在Ubuntu中使用w 阅读全文
posted @ 2021-04-17 09:32 Alex-GCX 阅读(478) 评论(0) 推荐(0) 编辑
摘要: 默认情况下在wsl2中使用systemctl命令会报错 $ sudo systemctl status cron.service System has not been booted with systemd as init system (PID 1). Can't operate. Failed 阅读全文
posted @ 2021-04-17 09:30 Alex-GCX 阅读(7232) 评论(0) 推荐(0) 编辑
摘要: Ubuntu的时间分类 1.Ubuntu时钟分为系统时钟(System Clock)和硬件(Real Time Clock,简称RTC)时钟。 2.查看系统时间:date -R 3.查看硬件时间: sudo hwclock --show 修改Ubuntu系统时间 修改时间 1. tzselect 2 阅读全文
posted @ 2021-04-17 09:28 Alex-GCX 阅读(1048) 评论(0) 推荐(0) 编辑
摘要: 阿里云Ubuntu20使用adduser alex命令创建alex用户后, su alex切换到alex用户后, 界面只显示一个$, 不显示用户名@主机名的格式 原因是创建的用户使用的shell是sh, 可以通过sudo vim /etc/passwd中查看并修改 查看的结果是 alex:x:100 阅读全文
posted @ 2021-04-17 09:26 Alex-GCX 阅读(2127) 评论(0) 推荐(1) 编辑
摘要: 启动celery时, 发现报错: KeyError: 'scheduler' KeyError: 'entries' [2020-12-15 14:53:11,669: ERROR/Beat] Process Beat Traceback (most recent call last): File 阅读全文
posted @ 2021-04-17 09:25 Alex-GCX 阅读(806) 评论(2) 推荐(0) 编辑
摘要: 目前项目需要启动的文件比较多, 有主进程main.py, 小进程PedestrianTrailGenerator.py, 定时celery任务, java spring-boot启动, 每个单独启动比较麻烦, 就使用supervisor管理这些需要启动的进程. 具体的supervisor详细配置内容 阅读全文
posted @ 2021-04-17 09:22 Alex-GCX 阅读(1793) 评论(0) 推荐(0) 编辑
摘要: 查看redis版本: redis-server -v $ redis-server -v Redis server v=4.0.9 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=9435c3c2879311f3 或者运行redis-cli之后输 阅读全文
posted @ 2021-04-17 09:18 Alex-GCX 阅读(3870) 评论(0) 推荐(1) 编辑
摘要: linux内核的防火墙是iptables, 但是由于其规则和操作比较繁琐, Ubuntu和centOS都在其上层引入了对应的防火墙工具ufw和firewall ubuntu的ufw命令 # 查看防火墙状态(inactive状态是防火墙关闭状态 active是开启状态) sudo ufw status 阅读全文
posted @ 2021-04-17 09:17 Alex-GCX 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 问题描述 在url中如果带有加号+, 解析时会把它当做空格来处理, 如url参数beginTime要求格式为IOS8601格式:beginTime=2020-11-27T10:00:00.000+08:00, 该格式中带有加号, 结果接口解析到的参数为"beginTime":"20201127T09 阅读全文
posted @ 2021-04-17 09:16 Alex-GCX 阅读(367) 评论(0) 推荐(0) 编辑
摘要: 简介 FastAPI 是一个用于构建 API 的现代、快速(高性能)的 web 框架,使用 Python 3.6+ 并基于标准的 Python 类型提示。 关键特性: 快速:可与 NodeJS 和 Go 比肩的极高性能(归功于 Starlette 和 Pydantic)。最快的 Python web 阅读全文
posted @ 2021-04-17 09:08 Alex-GCX 阅读(772) 评论(0) 推荐(0) 编辑