上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 问题 服务器端开启jupter-notebook,并且只允许localhost方式启动,本机如何访问远程服务器的jupter? 方法 Using SSH Tunneling Using Reverse Proxy 详情参考 访问远程jupter-notebook 阅读全文
posted @ 2021-09-30 14:58 春树&暮云 阅读(45) 评论(0) 推荐(0)
摘要: 问题 from .duckling import Duckling >>> ImportError: numpy.core.multiarray failed to import 解决方法 numpy版本和duckling不兼容,需要版本匹配,卸载numpy,重新安装numpy 解决 以下版本验证兼 阅读全文
posted @ 2021-09-30 13:56 春树&暮云 阅读(96) 评论(0) 推荐(0)
摘要: 问题 针对一个字符串按特定模式,比如数字、字母、表情符等分割 方法 使用python的re库 import re re_han = re.compile("([\u4E00-\u9FD5a-zA-Z0-9+#&\._%\-]+)", re.U) re_eng = re.compile('[a-zA- 阅读全文
posted @ 2021-09-30 10:34 春树&暮云 阅读(411) 评论(0) 推荐(0)
摘要: import路径 python aa.py # 默认将aa.py文件所在路径(非当前执行路径)添加到系统路径sys.path,并且aa中引用的其他模(从当前执行路径为root_path引用的包和模块) 可以正常导入 python xxx/aa.py # aa.py从当前执行路径为root_path引 阅读全文
posted @ 2021-09-26 17:57 春树&暮云 阅读(41) 评论(0) 推荐(0)
摘要: duckling example from duckling import DucklingWrapper,Language d = DucklingWrapper(jvm_started=False, language=Language.CHINESE) text="看了一下去年销售量有一百万件" 阅读全文
posted @ 2021-09-24 10:39 春树&暮云 阅读(227) 评论(0) 推荐(0)
摘要: batch kill programs with keyword "xxx" way1. ps aux| grep xxx | grep -v grep | awk '{print $2}' | xargs kill -9 way2. pgrep xxx | xargs kill -9 way3. 阅读全文
posted @ 2021-09-23 17:35 春树&暮云 阅读(64) 评论(0) 推荐(0)
摘要: 魔法函数 __str__ vs __repr__ __str__是类实例化后。print(cls)触发调用,本质是print=>str=>str 调用 __repr__ 开发模式下,直接输出cls,会触发__repr__调用 __getitem__、__setitem__、__delitem__ 分 阅读全文
posted @ 2021-09-17 17:11 春树&暮云 阅读(55) 评论(0) 推荐(0)
摘要: 多git账号配置 针对多个git分别生成公私秘钥 ssh-keygen -t rsa -C aa@git.com ssh-keygen -t rsa -C bb@git.com 将上述生成的公钥拷贝到对应git地址内的ssh key vim ~/.ssh/config Host github.com 阅读全文
posted @ 2021-09-17 15:04 春树&暮云 阅读(146) 评论(0) 推荐(0)
摘要: 配置 vim ~/.tmux.conf 添加配置 set -g prefix C-a unbind C-b setw -g mode-keys vi set -g automatic-rename off set -g allow-rename off set-option -g history-l 阅读全文
posted @ 2021-09-17 14:53 春树&暮云 阅读(53) 评论(1) 推荐(0)
摘要: 1. 在本机生成RSA公钥私钥 ssh-keygen -t rsa -f cc123 -C "cc123 key" #cc123指定产生的文件名, 默认id_rsa, -C 指定*.pub文件说明 一直回车,会在~/.ssh/目录下生成cc123、cc123.pub两个文件 2. 拷贝id_rsa. 阅读全文
posted @ 2021-09-17 14:43 春树&暮云 阅读(648) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 下一页