小行星

热爱平淡,向往未知


  • 首页

  • 分类

  • 归档

  • 关于

  • 阅读排行

  • 搜索

fatal error: pyconfig.h: No such file or directory

发表于 2018-10-Tue | 阅读次数:
1
2
/usr/include/python2.7/
to the PYTHON_INCLUDE list in Makefile.config did the trick.

ord代码lua配置

发表于 2018-10-Mon | 阅读次数:
1
luarocks install luabitop

torch tensor输出

发表于 2018-10-Mon | 阅读次数:
1
2
3
4
torch.set_printoptions()

precision=3
edgeitems=15

ubuntu挂载硬盘

发表于 2018-10-Mon | 阅读次数:

sudo fdisk -l

  1. 先查看根目录有没有media这个文件夹

    再在这个目录下创建自己想要的目录,如:XXXX

    没有的话创建立一个文件夹 sudo mkdir /media/XXXX

    将这个目录的权限改成与自己账户的权限一样,chmod 755 /media/XXXX

  2. 然后把移动硬盘挂载在这个文件夹上 mount -o rw /dev/sdb1 /media/XXXX,这样移动硬盘相当于系统的一个文件夹


本文来自 金康-zhao 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/jinkang_zhao/article/details/71244656?utm_source=copy

your computer or network may be sending automated queries

发表于 2018-10-Fri | 阅读次数:

同样遇到了这个问题,就是在利用Linode VPS的SSH转发数据上Google搜索的时候,总是提示we are sorry之类,或者要求输入验证码。
这个问题的特别之处在于,没法通过Google搜索来得到答案。无奈之下用百度弄了好久,才找到了这篇文章。实测解决了问题。
原理和方法都在里面了,贴出来供大家参考。

Google屏蔽Linode的IPv6导致SSH隧道不可用Google屏蔽Linode的IPv6导致SSH隧道不可用

最近几个月通过linode的SSH隧道访问Google都会报出类似“We‘re sorry”或者“unusual traffic”的错误,有时需要输入验证码,但大多数时候直接不可用。一段时间使用GoAgent比较多,可惜GoAgent有时不太稳定。

Google了一番,才知道是因为Google屏蔽了Linode服务器的IPv6协议导致SSH隧道出问题的。 下面我们就来关闭Ubuntu的IPv6

关闭Ubuntu的IPv6

  • 编辑 /etc/sysctl.conf,添加如下内容

    net.ipv6.conf.all.disable_ipv6=1
    net.ipv6.conf.default.disable_ipv6=1
    net.ipv6.conf.lo.disable_ipv6=1

如上修改虽然是永久性的需要重启网卡才能生效/etc/init.d/networking restart

  • 实时生效

    echo ‘1’ > /proc/sys/net/ipv6/conf/lo/disable_ipv6
    echo ‘1’ > /proc/sys/net/ipv6/conf/lo/disable_ipv6
    echo ‘1’ > /proc/sys/net/ipv6/conf/all/disable_ipv6
    echo ‘1’ > /proc/sys/net/ipv6/conf/default/disable_ipv6

再试试通过SSH隧道搜索Google,是不是已经好了,^_^。

参考阅读

  1. Intermittent “We’re sorry” error accessing Google via IPv6
  2. Ubuntu – Disabling IPv6 support

https://www.zhihu.com/question/21785670

paste使用

发表于 2018-10-Thu | 阅读次数:
1
paste file1 file2 -d "\t"

chrome address bar

发表于 2018-10-Thu | 阅读次数:
1
Mac/OS X: ⌘ + L.

pytorch不执行代码

发表于 2018-10-Thu | 阅读次数:
1
python setup.py install

python2 python3兼容

发表于 2018-10-Thu | 阅读次数:
1
2
3
4
try:
raw_input
except NameError:
raw_input = input

iterm2技巧

发表于 2018-10-Thu | 阅读次数:

cmd+;: 自动补全
cmd+shit+H: 记录
cmd+alt+B: 回放

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
The next time you log in, shell integration will be enabled.

You will also have these commands:
imgcat filename
Displays the image inline.
imgls
Shows a directory listing with image thumbnails
it2attention start|stop|fireworks
Gets your attention
it2check
Checks if the terminal is iTerm2
it2copy [filename]
Copies to the pasteboard
it2dl filename
Downloads the specified file, saving it in your Downloads folder.
it2setcolor ...
Changes individual color settings or loads a color preset
it2setkeylabel ...
Changes Touch Bar function key labels
it2ul
Uploads a file
it2universion
Sets the current unicode version

配置

1
export iterm2_hostname=<hostname>
1…101112…59
fangyh

fangyh

最爱的是那苍穹之外的浩渺宇宙

588 日志
4 分类
66 标签
© 2020 fangyh
由 Hexo 强力驱动
|
主题 — NexT.Mist v5.1.3
|本站总访问量次