2017年6月25日星期日

输电线路平断面图中杆塔上三条线分别代表什么

 三条线



粗红线表示导线
紫线代表跨越线,定位时这条线必须高于被跨越的其他线路。
蓝线代表切地线,定位时这条线必须高于地面。

另外,这3条线都表示的是最大弧垂气象条件下的位置,最大弧垂气象条件有可能是最高气温,也有可能是最大覆冰时,这个在定位之前就要判别。

2017年6月8日星期四

2017年6月6日星期二

Python: add in memory files to a tar file

tarfile can't add in memory files

import io, tarfile

with tarfile.open("foo.tar", mode="w") as tar:
    b = "hello world!".encode("utf-8")

    t = tarfile.TarInfo("helloworld.txt")
    t.size = len(b) # this is crucial
    tar.addfile(t, io.BytesIO(b))

2017年6月4日星期日

pip install 出现 空间不足 的错误

搬瓦工主机上使用pip安装scipy,出现以下错误:
OSError: [Errno 28] No space left on device
找到以下的问题:
https://stackoverflow.com/questions/28590344/ioerror-no-space-left-on-device-which-device
可能是tmp目录的空间不够。
又找到
https://stackoverflow.com/questions/10617198/pip-creates-build-directories
使用 pip install -b 选项,指定目录,解决了问题。

debian 编译安装 Python3

http://drupaland.eu/article/debian-8-python35-and-pip35

上面的链接中,应使用  make altinstall

https://unix.stackexchange.com/questions/332641/how-to-install-python-3-6 

 上面的链接中,make -j8 会出现编译错误,直接使用make能通过。