- 博客(17)
- 收藏
- 关注

原创 最新homebrew安装方法(四小时踩坑成果)
最新homebrew安装方法(四小时踩坑成果)在查找过程中发现,好多博客里的安装命令都是/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"结果点开https://raw.githubusercontent.com/Homebrew/install/master/install 发现内容为:Warning: The Ruby Homebrew inst
2020-05-16 00:52:58
5638
3
原创 tlsh python包的安装
由于python2.7直接 pip install tlsh失败,于是自己手动安装tlsh包先git clone 项目git clone https://github.com/trendmicro/tlsh.git按步骤来 参考https://github.com/trendmicro/tlsh(1) compile the C++ code $./make.sh(2) build the python version $ cd py_ext/ $ python ./setup.py b
2021-05-20 11:14:55
781
原创 pip upgrade后出现语法错误(python2.7)
python2.7 的 pip 在upgrade后出现语法错误解决方法curl https://bootstrap.pypa.io/2.7/get-pip.py --output get-pip.pypython get-pip.py完美解决
2021-05-20 11:06:45
406
原创 Mac /usr/bin目录出现 operation not permmitted/Read-only file system问题
问题发现:想将python下的scrapy链接到/usr/bin下面,出现operation not permmitted的问题重新启动长按 command+R 进入恢复模式在恢复模式下打开终端,输入:csrutil disable从而关闭Rootless机制,然后继续重新启动ln -s /Library/Frameworks/Python.framework/Versions/3.6/bin/scrapy /usr/binln: /usr/bin/scrapy: Read-only fi
2021-04-21 15:01:53
4751
3
原创 从 zsh: command not found: conda 开始的故事
有一天,我的conda突然无用了,它突然说:zsh: command not found: conda我想了想,可能是前段时间用iterm2装了zsh的原因先编辑 .zshrcveronica@localhost ~ % vim ~/.zshrc在.zshrc加上export PATH="/Users/[user_name]/anaconda3/bin:$PATH"接下来,source一下,测试一下没问题了veronica@localhost ~ % source ~/.zshrcve
2021-03-17 23:23:01
236
原创 Linux-将find到的文件批量软链接到目标目录中
find . -name "*.exe" | xargs -i ln -s {} [目标目录]
2021-03-15 16:54:25
514
原创 一步一步学机器学习——python求逆矩阵
>>> from numpy import *>>> a=mat([[3,4],[2,16]])>>> amatrix([[ 3, 4], [ 2, 16]])>>> b=a.I>>> bmatrix([[ 0.4 , -0.1 ], [-0.05 , 0.075]]) #b就是逆矩阵mat函数:将目标数据的类型转换为矩阵(matrix)...
2021-03-14 11:28:17
307
原创 杀死linux下指定关键词进程
ps aux|grep 关键词|grep -v 关键词|cut -c 10-16|xargs kill -9ps aux:查看所有进程的命令。检索出的进程将作为下一条命令“grep python”的输入。grep python:输出结果所有含有关键字的进程grep -v grep:在列出的进程中去除含有关键字的进程。cut -c 10-16:截取输入行的第10个字符到第16个字符,而这正好是进程号PID。(根据需要进行修改,可能会有出入)xargs kill -9:中的xargs命令是用来把前面
2021-03-03 09:56:57
397
原创 Latex tikz绘制图表
导入包\usepackage{tikz}\usepackage{pgfplots}绘制光滑曲线图遇到的问题(解决方案代码里都有):1、 legend摆放位置问题2、多条曲线怎么画\begin{tikzpicture} \begin{axis} [ legend pos=outer north east, %legend位于右上方而不在图里(防止遮挡) xlabel=Epoch ] \addlegendentry{Pr} %第一条曲线
2021-02-01 15:26:54
1980
原创 python 读取csv文件报错:iterator should return strings, not bytes (did you open the file in text mode?)
今天在读一个csv文件的时候遇到一个以前没碰到过的报错:with open('zhihu.csv','rb') as csvfile: reader = csv.reader(csvfile) column = [row[2] for row in reader]_csv.Error: iterator should return strings, not bytes (did you open the file in text mode?)说这个csv文件是一个txt文件,不是二进
2021-01-31 16:32:20
1763
原创 BERT-NER 环境配置(包含pip下载慢可使用镜像方法)
BERT-NER源码地址进入虚拟环境1 列出所有虚拟环境conda env list2 进入虚拟环境conda activate 虚拟环境名安装依赖包pip install -r requirements.txt这时候install flask遇到错误:ERROR: Could not find a version that satisfies the requirement Werkzeug>=0.15 (from flask) (from versions: none)ERR
2021-01-29 20:53:09
332
原创 pip install glove 报错
pip install glove报错:Got an error and failed: Running setup.py install for glove ... error解决方法:pip3 install https://github.com/JonathanRaiman/glove/archive/master.zip
2021-01-29 16:01:29
820
1
原创 llvm/clang的在Mac OS上的安装与使用
在Mac OS上的安装通过命令:brew install llvmllvm会被安装在/usr/local/opt/llvm的路径下。打开~/.bash_profile文件,添加环境变量:export PATH="/usr/local/opt/llvm/bin:$PATH"使用source ~/.bash_profile使.bash_profile文件文件生效输入llvm-dis --version测试llvm工具链的使用创建一个C语言文件test.c#include <stdio
2020-09-16 08:03:40
5911
原创 github API在python中的使用
#seach API的调用url = 'https://api.github.com/search/repositories?q={search}&page=1&per_page=100'.format(search=search)req = Request(url, headers=headers)response = urlopen(req).read()result ...
2019-11-16 14:32:01
893
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人