自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(102)
  • 收藏
  • 关注

原创 如何更新jupyter notebook kernel

pip3 install ipykernel --upgradepython3 -m ipykernel install --userhttps://stackoverflow.com/questions/65576206/how-to-change-python-version-in-jupyter-notebook

2021-05-19 17:39:49 2745

原创 启动jupyter报错 zsh: /usr/local/bin/jupyter: bad interpreter: /usr/local/opt/python/bin/python3.7:

rm '/usr/local/bin/jupyter'brew install jupyterbrew link --overwrite jupyterbrew link --overwrite --dry-run jupyterbrew unlink jupyter && brew link jupyter

2020-07-16 15:24:45 4288

原创 jupyter notebook改深色主体

from jupyterthemes import get_themes import jupyterthemes as jt from jupyterthemes.stylefx import set_nb_themeset_nb_theme('solarizedd')

2020-05-08 17:50:45 929

原创 plotly 看哪些字体

fc-list :lang=zh family.

2020-05-08 17:49:02 532

原创 mysql 删除数据库 显示大小

清空数据库mysql -Nse 'show tables' DATABASE_NAME | while read table; do mysql -e "truncate table $table" DATABASE_NAME; done显示大小SELECT table_schema "DB Name", ROUND(SUM(data_length + index...

2020-03-20 20:19:03 211

原创 UBUNTU16.04更新Python至3.6方法

1. sudo add-apt-repository ppa:jonathonf/python-3.62.sudo apt-get update sudo apt-get install python3.63.sudo apt install spyder34.sudo rm /usr/bin/python5.sudo ln -s /usr/local/bin/python3...

2020-03-16 10:57:42 17739 8

原创 mac,ubuntu   环境变量

Mac OS XOpen the.bash_profilefile in your home directory (for example,/Users/your-user-name/.bash_profile) in a text editor. Addexport PATH="your-dir:$PATH"to the last line of the file, where...

2020-03-07 15:50:06 122

原创 如何关闭mysql的strict mode

I need do it this, and work correctly:To disable strict SQL mode, SSH in to your server as root Create this file:/etc/mysql/conf.d/disable_strict_mode.cnf Open the file and enter these two line...

2020-03-02 10:30:42 711

原创 redis 重新启动

ps -u wentao -o pid,rss,command | grep redis

2020-02-27 17:45:56 174

原创 mongodb没有正确关机导致损坏的修复

没有正确关机sudo service mongod status出现● mongod.service - MongoDB Database Server Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled) Active: failed (Result: ex...

2020-02-26 15:19:46 777

原创 mysql 和mongodb的配置文件在哪里? iOS mac环境

vi /usr/local/etc/my.cnf

2020-02-20 16:58:33 1050

原创 Docker 删除所有image/container 如何查运行中的container:

To delete all containers including its volumes use,docker rm -vf $(docker ps -a -q)To delete all the images,docker rmi -f $(docker images -a -q)Remember, you should remove all the co...

2020-02-16 10:59:52 823

原创 Mac OS X: ValueError: unknown locale: UTF-8 in Python

If you have faced the error on MacOS X, here's the quick fix - add these lines to your ~/.bash_profile:export LC_ALL=en_US.UTF-8export LANG=en_US.UTF-8

2020-02-14 10:55:55 433

原创 python3 ModuleNotFoundError: No module named 'XXX' 解决方法

1. 暂时:import syssys.path.append('/ufs/guido/lib/python')2. 永久:export PYTHONPATH="${PYTHONPATH}:/ufs/guido/lib/python"

2020-02-14 10:43:17 1512

原创 mac redis安装和开机启动

1. 安装brew install redis2. 其他Launch Redis on computer starts.$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgentsStart Redis server via “launchctl”.$ launchctl load ~/Library/LaunchA...

2020-02-13 19:18:50 144

原创 python3 重装jupyter

1. python3 -m pip uninstall -y jupyter jupyter_core jupyter-client jupyter-console notebook qtconsole nbconvert nbformat2. pip3 install notebook3. export PATH="/usr/local/bin/jupyter:$PATH"4. so...

2020-01-31 20:05:44 414

原创 改变mac终端文字颜色

vi ~/.bash_profileexport PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "export CLICOLOR=1export LSCOLORS=ExFxBxDxCxegedabagacadalias ls='ls -GFh'source ~/.bash_pro...

2020-01-26 19:59:24 273

原创 Ubuntu mac使用虚拟环境virtualven python3, 本地terminal远程登录服务器ubuntu看图方法

Mac1. pip3 install virtualenv2. python3 -m venv MYENV3. source ./MYENV./bin/activateUbuntu1. virtualenv -p /usr/bin/python3 MYENV2. source ./MYENV/bin/activate本地terminal远程登录服务器ub...

2020-01-23 20:39:22 213

原创 mac客户端打开csv表格方法

cat file.csv | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S

2020-01-23 20:38:16 1882

原创 匹配字典 dict python3

from collection import Countercounter = Counter({"book":1,"football":2,"light:"3})list=["book","pen","light"]for keyin list: if key in list(counter.keys()): print("i am the list and th...

2019-12-27 15:17:11 309

原创 mutiprocess python3 多线程模块

from multiprocessing import Pool import numpy if __name__ == '__main__': pool = Pool() roots = pool.map(numpy.sqrt, range(100)) print (roots)1. pool = Pool() launches one slave ...

2019-12-21 19:55:02 248

原创 git发布到远程分支

echo "# 1" >> README.mdgit initgit add README.mdReinitialized existing Git repository in /目录/.git/git commit -m "first commit"git remote add origin [email protected]:lloveyou.gitgit...

2019-12-08 18:05:53 184

原创 Ubuntu各种功能查看系统,cpu,显卡,内存,统计目录,统计字符 top

cat /proc/cpuinfocat /proc/cpuinfo |grep MHz|uniqcat /proc/meminfosudo dmidecode -t memorycat /proc/versioncat /proc/uptimelast /var/log/wtmpecho 2 > /proc/sys/vm/overcommit_memoryh...

2019-12-08 10:36:39 144

原创 本地关机时如何登录在远程Ubuntu运行程序且自动保存log

1. nohup python3 Training_Tool_dic.py 2>&1> log.log -a & 推荐2. nohup python3 file.py 2>&1 | tee log.log -a &

2019-12-07 16:10:10 138

原创 解决GitHub 访问慢解决

在本地host文件中添加映射,步骤如下: 用文本编辑器打开hosts文件,位于C:\Windows\System32\drivers\etc目录下 打开http://tool.chinaz.com/dns,这是一个查询域名映射关系的工具 查询 github.global.ssl.fastly.net 和 assets-cdn.github.com 两个地址 ...

2019-12-02 07:56:46 304

原创 csv, txt, json 写文件 python3环境

遍历子目录获取文件import osfor dir, dirs, files in (os.walk) print(os.path.join(dir, dirs, files))1. Jsonimport jsonmy_details = { 'name': 'John Doe', 'age': 29}with open...

2019-11-25 13:01:05 93

原创 文本分类例子 下载 nltk 包方法

import nltkimport ssltry: _create_unverified_https_context = ssl._create_unverified_contextexcept AttributeError: passelse: ssl._create_default_https_context = _create_unverified...

2019-11-24 11:23:47 340

原创 使用jupyter notebook的时候如果缺少了某些包

重启服务!

2019-11-22 19:11:50 1288

原创 mac环境Mongodb 安装 备份与恢复

brew安装mongodb报错Error: No available formula with the name 'mongodb'原因:MongoDB不再是开源的了,并且已经从Homebrew中移除 #43770设定:$ brewtap mongodb/brew安装:$ brew install [email protected]启动:$brew service...

2019-11-08 13:45:46 961

原创 反盗链基础

import requestsuser_agent = 'Mozilla/4.0(Compatible; MSIE5.5; Windows NT)'headers = {'User-Agnet':user_agent}r = requests.get('http://seputu.com/', headers = headers)print(r.text)报错,网页用了防盗链,加上...

2019-10-28 17:02:53 119

原创 机器学习词汇

1 .permutation-invariant:空间不相关的local permutation-invariant aggregation:局部的无空间相关性的聚集例子:convolution neural network 就是 permutation-related.词汇来自 https://arxiv.org/abs/1902.06673 2. Region of...

2019-07-04 17:24:38 2650

原创 圆圈中间一个乘号:克罗内克积

两个任意大小的矩阵间的运算,表示为。克罗内克积是张量积的特殊形式,以德国数学家利奥波德·克罗内克命名。

2019-07-03 15:44:27 15672

原创 "Ground truth"是什么意思?

"Ground truth" means a set of measurements that is known to be much more accurate than measurements from the system you are testing.For example, suppose you are testing a stereo vision system to see...

2019-07-03 10:23:09 1937

原创 ubuntu18.04使用Anaconda3-2019.03-Linux-x86_64自带python3.7搭建Pycharm2019.1.3工作环境

1. 把默认python改为anaconda自带python3.7注册表更改:vim ~/.bashrcexport PATH=/home/XXX/anaconda3/bin:$PATHsource ~/.bashrcanaconda用pip安装。pip3,pip2是ubuntu原声python使用。2.pycharm新建一个python文件后打开file,set...

2019-06-26 13:21:47 753

原创 jupyter notebook - Error executing Jupyter command 'notebook': [Errno 2] No such file or directory

sudo apt-get install python3-notebook jupyter-core python-ipykernelsudo apt-get install python3-devsudo apt-get install python-devsudo -H python3 -m pip --default-timeout=1000 install --index-url ...

2019-05-30 22:49:39 1505

原创 三种方法定义python3字节序列类型bytes

1. 0<=[ ]<256bytes([100,123,111])2.bytes('Hello','utf-8')第二个编码类型必须制定,没有默认3.'Hello'.encode('utf-8')编码方式可以改变,也可以省略,默认utf-8...

2019-05-30 21:08:07 2872

原创 tensorflow国内阿里云镜像下载

sudo python3 -m pip --default-timeout=1000 install --index-url https://mirrors.aliyun.com/pypi/simple tensorflow-gpu --ignore-installed six

2019-05-19 15:15:17 12922 2

原创 keras中的K.concatenate()不完全理解

import numpy as npimport keras.backend as kimport cv2import tensorflow as tftt1 = K.variable(np.array([[[0, 22], [29, 38]], [[49, 33],[5, 3]],[[8,8],[9,9]]]))tt2 = K.variable(np.array([[[55, 47...

2019-05-07 11:59:57 2437

原创 TabError: inconsistent use of tabs and spaces in indentation--Pycharm报错

TabError: inconsistent use of tabs and spaces in indentationCode -->Reformat Code参考:https://www.cnblogs.com/sgh1023/p/10013071.html

2019-05-05 14:52:58 191

原创 什么是label,keras和tensorflow中的y_label ?

参考:https://towardsdatascience.com/understanding-and-coding-a-resnet-in-keras-446d7ff84d33

2019-04-30 16:16:03 914

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除