FC = gfortran -ffixed-line-length-none
分类: 学习
matplotlib中的draw
可用于绘制多操作步骤的中间要素,比如
#coding=utf-8
import numpy as np
import matplotlib.pyplot as plt
aa = np.loadtxt('hypoDD_sort.reloc')
fig, ax = plt.subplots()
ax.scatter(aa[:,2],aa[:,1],marker='o',s=1,color='r')
pts=plt.ginput(n=-1,timeout=-1)
# plot the first profile
x = [pts[0][0], pts[1][0]]
y = [pts[0][1], pts[1][1]]
ax.plot(x,y,color = 'k')
plt.draw()
pts=plt.ginput(n=-1,timeout=-1)
# plot the second profile
x = [pts[0][0], pts[1][0]]
y = [pts[0][1], pts[1][1]]
ax.plot(x,y,color = 'k')
plt.draw()
plt.show()
MacOS的rtcreportingd和Fileproviderd进程占用高
首先发现的是QQ和微信需要发送文件时,点击打开文件按钮时系统无响应,打开“活动监视器”发现这两个进程占用在100%左右,上网搜索发现说是云盘的原因。考虑到内置的icloud应该不存在这个原因,所以把另一个网络硬盘删了,等几分钟进程自动结束就好了。
wget下载目录
wget -r –level=0 -E –ignore-length -x -k -p -erobots=off -np -N http://www.remote.com/remote/prese
np.isnan & pd.isnull
np.isnan不支持string,此时最好用pandas的isnull
makecpt小技巧
操作环境为GMT4.5,需求和对应的解决方式为:
- 绘图颜色限定在某个范围,而不是使用默认的背景(color_background)和前景(color_foreground)来表示超出的值——解决方法:加-D参数,用制定色标范围的最大最小值替换;也可以用gmtset来更换;
- NaN不用缺省的灰色——解决方法:使用gmtset更改COLOR_NAN的值,0为黑色,128为灰色,255为白色。
sympy求偏导
In [1]: from sympy import symbols, log, diff
In [2]: a,b,c,v,t = symbols("a b c v t",real=True)
In [3]: u=a*log((b/a)*t+1)+c+v*t
In [4]: print(diff(u,t))
b/(1 + b*t/a) + v
centos7 支持exfat
https://linuxize.com/post/how-to-mount-an-exfat-drive-on-centos-7/
sudo yum install epel-release
sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
sudo yum install exfat-utils fuse-exfat
sudo mount -t exfat /dev/xxxx /mnt/xxxx
ImportError: cannot import name ‘BatchNormalization‘ from ‘keras.layers.normalization‘
from keras.layers.normalization.batch_normalization_v1 import BatchNormalization
grep匹配到二进制文件
使用grep -a