小行星

热爱平淡,向往未知


  • 首页

  • 分类

  • 归档

  • 关于

  • 阅读排行

  • 搜索

远程访问jupyter notebook

发表于 2017-10-Wed | 阅读次数:

ipython notebook是一个基于浏览器的python数据分析工具,使用起来非常方便,具有极强的交互方式和富文本的展示效果。jupyter是它的升级版,它的安装也非常方便,一般Anaconda安装包中会自带。安装好以后直接输入jupyter notebook便可以在浏览器中使用。但是它默认只能在本地访问,如果想把它安装在服务器上,然后在本地远程访问,则需要进行如下配置:

阅读全文 »

安装oh-my-zsh和autojump

发表于 2017-10-Wed | 阅读次数:

ubuntu

1
2
3
4
5
6
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"


plugins=(git autojump)

git clone https://github.com/joelthelion/autojump.git
阅读全文 »

vnc配置

发表于 2017-10-Wed | 阅读次数:

仅安装核心组件:

假如不安装例如 office、浏览器、等等的额外组件,可以使用如下命令:

1
apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal -y
阅读全文 »

Lua语言学习

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

类似于shell, 通过关键字确定区分,还好不是像py那样用空格 :)

没有标点符号

dofile调试

dofile(“lib1.lua”) – load your library

n = norm(3.4, 1.0)

print(twice(n)) –> 7.0880180586677

​

阅读全文 »

PyraNet配置常见问题

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

ffi.lua:20: libmatio.so.2: cannot open shared object file: No such file or directory

sudo apt-get install libmatio2

luarocks install matio

阅读全文 »

实用命令

发表于 2017-10-Sun | 阅读次数:

查找关键字

1
find ./ \( -name node_modules -prune \) -o  -exec grep --color -Hn "footer-inner" {} 2>/dev/null \;

Hexo 配置常见错误

发表于 2017-10-Sat | 阅读次数:

npm install hexo-fs

通过npm install hexo-fs –save解决不了的,是因为在hexo-deployer-git中还有一个node_modules/hexo-fs目录,但是hexo-deployer-git官方Github中是没有这个目录的,可能是因为npm源没有更新,所以hexo-deployer-git中有一个旧版本的hexo-fs,注释掉E:\github\blog\node_modules\hexo-deployer-git\node_modules\hexo-fs\lib\fs.js中第718行exports.SyncWriteStream = fs.SyncWriteStream;就行了,或者手动更新hexo-deployer-git。

阅读全文 »

直接下载google drive 文件

发表于 2017-09-Fri | 阅读次数:

way1

wget “https://docs.google.com/uc?export=download&id=?“
? 从share link 获得

way2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
set -x
gURL=$1

# match more than 26 word characters
ggID=$(echo "$gURL" | egrep -o '(\w|-){26,}')

ggURL='https://drive.google.com/uc?export=download'

curl -sc /tmp/gcokie "${ggURL}&id=${ggID}" >/dev/null
getcode="$(awk '/_warning_/ {print $NF}' /tmp/gcokie)"

cmd='curl --insecure -C - -LOJb /tmp/gcokie "${ggURL}&confirm=${getcode}&id=${ggID}"'
echo -e "Downloading from "$gURL"...\n"
eval $cmd

way3 (推荐)

1
https?://drive.google.com/file/d/id

安装

1
2
wget https://raw.githubusercontent.com/circulosmeos/gdown.pl/master/gdown.pl
chmod +x gdown.pl

修改perl地址
而我系统环境使用命令whereis perl显示:

1
perl: /usr/bin/perl /etc/perl /usr/share/perl /usr/share/man/man1/perl.1.gz

则gdown.pl文件的第一行,我修改为:

1
#!/usr/bin/perl

使用

1
./gdown.pl 'Gdrive 文件地址' ['保存的文件名']

源代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71

#!/usr/local/bin/perl
#
# Google Drive direct download of big files
# ./gdown.pl 'gdrive file url' ['desired file name']
#
# v1.0 by circulosmeos 04-2014.
# v1.1 by circulosmeos 01-2017.
# http://circulosmeos.wordpress.com/2014/04/12/google-drive-direct-download-of-big-files
# Distributed under GPL 3 (http://www.gnu.org/licenses/gpl-3.0.html)
#
use strict;

my $TEMP='gdown.cookie.temp';
my $COMMAND;
my $confirm;
my $check;
sub execute_command();

my $URL=shift;
die "\n./gdown.pl 'gdrive file url' [desired file name]\n\n" if $URL eq '';

my $FILENAME=shift;
$FILENAME='gdown' if $FILENAME eq '';

if ($URL=~m#^https?://drive.google.com/file/d/([^/]+)#) {
$URL="https://docs.google.com/uc?id=$1&export=download";
}

execute_command();

while (-s $FILENAME < 100000) { # only if the file isn't the download yet
open fFILENAME, '<', $FILENAME;
$check=0;
foreach (<fFILENAME>) {
if (/href="(\/uc\?export=download[^"]+)/) {
$URL='https://docs.google.com'.$1;
$URL=~s/&amp;/&/g;
$confirm='';
$check=1;
last;
}
if (/confirm=([^;&]+)/) {
$confirm=$1;
$check=1;
last;
}
if (/"downloadUrl":"([^"]+)/) {
$URL=$1;
$URL=~s/\\u003d/=/g;
$URL=~s/\\u0026/&/g;
$confirm='';
$check=1;
last;
}
}
close fFILENAME;
die "Couldn't download the file :-(\n" if ($check==0);
$URL=~s/confirm=([^;&]+)/confirm=$confirm/ if $confirm ne '';

execute_command();
}

unlink $TEMP;

sub execute_command() {
$COMMAND="wget --no-check-certificate --load-cookie $TEMP --save-cookie $TEMP \"$URL\"";
$COMMAND.=" -O \"$FILENAME\"" if $FILENAME ne '';
`$COMMAND`;
return 1;
}

https://onebox.site/archives/250.html

sql执行顺序

发表于 2017-07-Sun | 阅读次数:
1
2
3
4
5
6
7
8
9
10
(7)     SELECT 
(8) DISTINCT <select_list>
(1) FROM <left_table>
(3) <join_type> JOIN <right_table>
(2) ON <join_condition>
(4) WHERE <where_condition>
(5) GROUP BY <group_by_list>
(6) HAVING <having_condition>
(9) ORDER BY <order_by_condition>
(10) LIMIT <limit_number>

参考
http://www.jellythink.com/archives/924

caffe 安装常见问题

发表于 2017-05-Tue | 阅读次数:

protobuf 版本问题

错误信息

.build_release/lib/libcaffe.so: undefined reference to `google::protobuf::Message::InitializationErrorString() const’

解决方案

阅读全文 »
1…575859
fangyh

fangyh

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

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