上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 51 下一页
摘要: 1、场景 平时使用pycharm,有时出现导包问题,将那个目录Mark Directory as sources root,然后就可以正常运行代码了 2、原理 其实主要就是将那个目录加到PYTHONPATH中 先看未标记为sources root的PYTHONPATH环境变量输出 import os 阅读全文
posted @ 2023-03-21 21:02 代码诠释的世界 阅读(1891) 评论(0) 推荐(0)
摘要: 1、官方文档 https://docs.python.org/3/library/concurrent.futures.html 2、安装 python 3.x中自带了concurrent.futures模块 python 2.7需要安装futures模块,使用命令pip install futur 阅读全文
posted @ 2023-03-21 15:35 代码诠释的世界 阅读(154) 评论(0) 推荐(0)
摘要: 1、报错 无法运行R错误加载共享库:libblas.so.3 2、处理方法 sudo apt-get install libblas3 3、如果报错Unable to locate package xxxx 解决办法 # 1.首先尝试update命令 sudo apt-get update # 2. 阅读全文
posted @ 2023-03-21 10:33 代码诠释的世界 阅读(553) 评论(0) 推荐(0)
摘要: 1、编写自己的proto接口文件 syntax = "proto3"; package helloworld; // 对应包名 // 定义服务 service Greeter { // Sends a greeting rpc SayHello (HelloRequest) returns (Hel 阅读全文
posted @ 2023-03-21 10:20 代码诠释的世界 阅读(1961) 评论(0) 推荐(1)
摘要: 1、目的 由于工作需要,需要查询包含某个接口的文件 2、方法 基于grep查询包含某个文件的内容 -> % grep --help Usage: grep [OPTION]... PATTERNS [FILE]... Search for PATTERNS in each FILE. Example 阅读全文
posted @ 2023-03-21 10:00 代码诠释的世界 阅读(1833) 评论(0) 推荐(0)
摘要: 1、场景 从接口读取数据写入文件时,在文件中显示的是Unicode字符 2、处理方法 import json def read_json_file(file_path): try: with open(file_path, mode='r', encoding='utf-8') as fp: res 阅读全文
posted @ 2022-10-26 10:06 代码诠释的世界 阅读(1017) 评论(0) 推荐(0)
摘要: 1、官网 官网http://www.squid-cache.org/linux 2、代理服务器 正向代理:客户端(内网) >squid >服务器centos 反向代理:服务器 >squid >客户端(内网) 3、dockerhub https://hub.docker.com/r/ubuntu/sq 阅读全文
posted @ 2022-10-25 22:51 代码诠释的世界 阅读(4904) 评论(0) 推荐(2)
摘要: 1、场景 自动化测试中,需要将一些接口自动的写入到yaml中, 但是发现文件中显示的是Unicode字符 2、处理方法 import yaml def load_yaml_data(file_path): try: with open(file_path, 'r', encoding='utf-8' 阅读全文
posted @ 2022-10-25 21:02 代码诠释的世界 阅读(370) 评论(0) 推荐(0)
摘要: 1、国内各大yum源 阿里源 https://developer.aliyun.com/mirror/centos?spm=a2c6h.13651102.0.0.3e221b11G5ZGvj 2、备份本机yum源 mv /etc/yum.repos.d/CentOS-Base.repo /etc/y 阅读全文
posted @ 2022-10-23 13:27 代码诠释的世界 阅读(990) 评论(0) 推荐(0)
摘要: 1、问题 python调用grpc接口报错 2、原因 由于更新了代码,proto文件没有重新build生成 3、重新build方法 python -m grpc_tools.protoc --python_out=./tools/ --grpc_python_out=./tools/ -I. ./p 阅读全文
posted @ 2022-10-08 16:21 代码诠释的世界 阅读(39) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 51 下一页