-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.xml
More file actions
532 lines (455 loc) · 32.6 KB
/
Copy pathindex.xml
File metadata and controls
532 lines (455 loc) · 32.6 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Bio M</title>
<link>/</link>
<description>Recent content on Bio M</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Mon, 24 Apr 2017 18:36:24 +0200</lastBuildDate>
<atom:link href="/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>VirtualBox network</title>
<link>/linux/virtualbox_network/</link>
<pubDate>Fri, 29 Dec 2017 11:36:24 +0200</pubDate>
<guid>/linux/virtualbox_network/</guid>
<description>[转] virtualbox-net Source: https://www.jianshu.com/p/0537b056790b
作者:lvvl 链接:https://www.jianshu.com/p/0537b056790b 來源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
参考资料:http://blog.csdn.net/yxc135/article/details/8458939
http://www.centoscn.com/CentOS/config/2015/0311/4857.html
http://favoorr.github.io/mac-use-virtualbox-config-network/
如果出现主机无法ping通虚拟机的情况,请首先确认虚拟机防火墙已关闭。
1. VirtualBox网络连接方式概要 VirtualBox图形界面下有四种网络接入方式,它们分别是: 1. NAT 网络地址转换模式(NAT,Network Address Translation) 2. Bridged Adapter 桥接模式 3. Internal 内部网络模式 4. Host-only Adapter 主机模式 而在CommandLine下则有八种方式,除上面列出的四种外还有下列四种: 1. UDP Tunnel networking 2. VDE networking 3. Limiting bandwidth for network I/O 4. Improving network performance VirturalBox为每个虚拟机提供八种虚拟的PCI 网卡,对于每一种虚拟网卡,你可以从下列六种网络硬件中任选一种: AMD PCNet PCI II (Am79C970A) AMD PCNet FAST III (Am79C973, the default) Intel PRO/1000 MT Desktop (82540EM)(Windows Vista and later versions) Intel PRO/1000 T Server (82543GC)(Windows XP) Intel PRO/1000 MT Server (82545EM)(OVF imports from other platforms) Paravirtualized network adapter (virtio-net) 2.</description>
</item>
<item>
<title>Git examples</title>
<link>/linux/git_learning/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/linux/git_learning/</guid>
<description><h2 id="instructions">Instructions</h2>
<p><strong>Requirement</strong>:</p>
<p>You will receive the <code>url_of_repo</code> after you submit <code>&lt;name_of_repo&gt;</code> and <code>id_rsa.pub</code> to <code>wangm08@hotmail.com</code>.</p>
<p></p></description>
</item>
<item>
<title>Git usage</title>
<link>/linux/git_usage/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/linux/git_usage/</guid>
<description><blockquote>
<p>source <a href="https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375234012342f90be1fc4d81446c967bbdc19e7c03d3000">https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/001375234012342f90be1fc4d81446c967bbdc19e7c03d3000</a></p>
</blockquote>
<p><code>多人协作</code>的工作模式通常是这样:</p>
<ul>
<li>首先,可以试图用<code>git push origin branch-name</code>推送自己的修改;</li>
<li>如果推送失败,则因为远程分支比你的本地更新,需要先用<code>git pull</code>试图合并;</li>
<li>如果合并有冲突,则解决冲突,并在本地提交;</li>
<li>没有冲突或者解决掉冲突后,再用<code>git push origin branch-name</code>推送就能成功!</li>
</ul>
<p></p></description>
</item>
<item>
<title>SSH connect to VirtualBox</title>
<link>/linux/ssh_connect_to_virtualbox/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/linux/ssh_connect_to_virtualbox/</guid>
<description><blockquote>
<p>Q1: SSH access to VirutalBox<br />
A: use <code>NAT</code></p>
</blockquote>
<p></p></description>
</item>
<item>
<title>SSH connection closed</title>
<link>/linux/ssh_connection_closed_by_remote/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/linux/ssh_connection_closed_by_remote/</guid>
<description>Source: https://linux.cn/article-4226-1.html
Status: SSH: Connection closed by
Q1: When I tried to connect to a remote server through SSH. It failed and pop the following message on my console &ldquo;Connection close by 127.0.0.1&rdquo;? A: Something goes wrong with your SSH key on the remote server reinstall SSH Host keys by: sudo dpkg-reconfigure openssh-server
Step 1. Checkout the log on server /var/log/auth.log $ tail -n 20 /var/log/auth.</description>
</item>
<item>
<title>Git submodule</title>
<link>/linux/git_submodule/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/linux/git_submodule/</guid>
<description><blockquote>
<p>Source: <a href="https://www.jianshu.com/p/ca2862e449fa">https://www.jianshu.com/p/ca2862e449fa</a></p>
</blockquote>
<p></p></description>
</item>
<item>
<title>Using Ensembl Genomes Perl API</title>
<link>/webpage_001/2015-01-30-using-ensembl-genomes-perl-api/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/webpage_001/2015-01-30-using-ensembl-genomes-perl-api/</guid>
<description>Using EnsEMBL Genomes Perl API
URL: [http://ensemblgenomes.org/info/access/eg_api]()
Up to date: 2015-01-30, using Ensembl version v78.
Notes Before you read the following instructions, you are supposed to know about the Ensembl Perl API. The follow 2 links are very helpful.
Ensembl Perl API tutorials: here Ensembl, Filmed API Workshop: here
Begin Things to know about Ensembl Genomes: (different from Ensembl Core)
1. Load more than 250 genomes in a single database for bacteria.</description>
</item>
<item>
<title>安装Ubuntu 14.04 之后需要做的几件事</title>
<link>/webpage_001/2014-10-14-things-to-do-after-install-ubuntu-1404/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-14-things-to-do-after-install-ubuntu-1404/</guid>
<description>使用中文界面的Ubuntu,需要做一些调整,更方便使用。主要包括系统优化、软件安装。
1. 更改软件更新源: 在系统设置 -&gt; Ubuntu 软件 -&gt; 下载自,调整镜像为 http:// mirrors.163.com
2. 安装软件: 1) 新立得件管理包:在Ubuntu软件中心搜索 新立得 即可。
2) Chromium: 在Ubuntu软件中心搜索并安装 chromium
3) 搜狗拼音for Linux:前往pinyin.sogou.com/linux/ 下载搜狗输入法for Linux, Ubuntu 14.04可直接双击deb包安装。
4) WPS office for Linux: 前往community.wps.cn/download下载最新版 deb 包,双击安装即可
5) VLC媒体播放器 3. 系统美化 1. 更改中文字体
安装文泉驿黑字体
sudo apt-get install ttf-wqy-microhei 2. 删除原默认字体 ukai, uming
sudo apt-get remove fonts-arphic-ukai fonts-arphic-uming 3.</description>
</item>
<item>
<title>EOB-001: Synthetic RNA silencing in bacteria</title>
<link>/webpage_001/2015-03-26-small-rnas-in-bacteria/</link>
<pubDate>Sun, 26 Mar 2017 18:36:24 +0200</pubDate>
<guid>/webpage_001/2015-03-26-small-rnas-in-bacteria/</guid>
<description>Synthetic RNA silencing in bacteria – antimicrobial discovery and resistance breaking Liam Good1 and James E. M. Stach2*
1 Department of Pathology and Infectious Diseases, Royal Veterinary College, University of London, London, UK 2 School of Biology, Newcastle University, Newcastle upon Tyne, UK The increasing incidence and prevalence of antibiotic resistance in bacteria threatens the “antibiotic miracle.” Conventional antimicrobial drug development has failed to replace the armamentarium needed to combat this problem, and novel solutions are urgently required.</description>
</item>
<item>
<title>ggplot2 and parallel</title>
<link>/webpage_001/2015-03-20-ggplot2parallel/</link>
<pubDate>Mon, 20 Mar 2017 18:36:24 +0200</pubDate>
<guid>/webpage_001/2015-03-20-ggplot2parallel/</guid>
<description>Store the ggplot2 figs to a list object Q: How to create lists of ggplot?
A: Find solutions in stackOverflow
1. Condition-1 I&rsquo;m trying to create functions that return a list of ggplot.
the default class of ggplot are: gg and ggplot
library(ggplot2) p1 &lt;- c(qplot(1:10, rnorm(10))) p2 &lt;- qplot(1:10, rnorm(10)) attributes(p1) ## $names ## [1] &quot;data&quot; &quot;layers&quot; &quot;scales&quot; &quot;mapping&quot; &quot;theme&quot; ## [6] &quot;coordinates&quot; &quot;facet&quot; &quot;plot_env&quot; &quot;labels&quot; attributes(p2) ## $names ## [1] &quot;data&quot; &quot;layers&quot; &quot;scales&quot; &quot;mapping&quot; &quot;theme&quot; ## [6] &quot;coordinates&quot; &quot;facet&quot; &quot;plot_env&quot; &quot;labels&quot; ## ## $class ## [1] &quot;gg&quot; &quot;ggplot&quot; p[[1]] (same as p[['data']])) is supposed to be a dataframe.</description>
</item>
<item>
<title>Manage this blog</title>
<link>/webpage_001/2015-04-13-manage-this-blog/</link>
<pubDate>Mon, 13 Apr 2015 18:36:24 +0200</pubDate>
<guid>/webpage_001/2015-04-13-manage-this-blog/</guid>
<description>This post will describe the steps to manage the blog on Gihub.
Start a new blog See the previous post: [URL]()
Manage this blog ##1 . Add/Del posts.
Using the rake command to create new posts, and git rm to delete old posts.
# Add post rake post title=&quot;name&quot; # Del post git rm _post/2015-04-**_123 ##2 . Add/Del pages.
Using the rake command to create new pages.
rake page name=&quot;newPage&quot; It will create a new folder of your input name, that contain a index.</description>
</item>
<item>
<title>SSh login without password [2 steps]</title>
<link>/webpage_001/2015-04-11-ssh-login-without-password/</link>
<pubDate>Sat, 11 Apr 2015 18:36:24 +0200</pubDate>
<guid>/webpage_001/2015-04-11-ssh-login-without-password/</guid>
<description>For instance, I want access to my CentOS server from my PC (Ubuntu) without input the password.
[What] SSH from Ubuntu to CentOS without passwd.
[How] Let the CentOS know the public rsa key of my Ubuntu.
Step 1. On Ubuntu: Create public/private RSA key pair.
ssh-keygen -t rsa Default, it will create two files: ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.
Step 2. Copy id_rsa.pub of Ubuntu to ~/.ssh/authorized_keys on CentOS
scp ~/.</description>
</item>
<item>
<title>EOB-002: Toehold switches De-Novo-Designed Regulators of Gene Expression</title>
<link>/webpage_001/2015-03-29-toehold-switches/</link>
<pubDate>Sun, 29 Mar 2015 18:36:24 +0200</pubDate>
<guid>/webpage_001/2015-03-29-toehold-switches/</guid>
<description>Toehold Switches: De-Novo-Designed Regulators of Gene Expression Alexander A. Green,1 Pamela A. Silver,1,2 James J. Collins,1,3 and Peng Yin1,2,
1Wyss Institute for Biologically Inspired Engineering, Harvard University, Boston, MA 02115, USA
2Department of Systems Biology, Harvard Medical School, Boston, MA 02115, USA
3Howard Hughes Medical Institute, Department of Biomedical Engineering and Center of Synthetic Biology, Boston University, Boston, MA 02215, USA
*Correspondence: py@hms.harvard.edu http://dx.doi.org/10.1016/j.cell.2014.10.002
Highlights Toehold switches detect RNAs with arbitrary sequences, including endogenous RNAs</description>
</item>
<item>
<title>超几何分析和GO富集分析</title>
<link>/webpage_001/2015-01-23-hypergeometric-analysis--enrichment-analysis/</link>
<pubDate>Fri, 23 Jan 2015 18:36:24 +0200</pubDate>
<guid>/webpage_001/2015-01-23-hypergeometric-analysis--enrichment-analysis/</guid>
<description>关于超几何分布(Hypergeometric distribution)
超几何分布是统计学上一种离散概率分布,它描述了由有限个物件 (N) 中抽取 (n) 个物件,成功抽出制定种类物件的个数 (k) (不归还)。
例如在有N个样品,其中m个是不及格的。超几何分布描述了在该N个样本中抽出n个,其中k个是不及格的几率。
f(k;n,m,N) = C(m,k)*C(N-m, n-k)/C(N,n)
若n=1,超几何分布还原为伯努利分布。 若n接近∞,超几何分布可视为二项式分布。
From: Wikipedia
转换到生物学分析(GO)中,某样品具有GO注释的基因数 (N), 其中属于TermA的基因数目为 (M), (举例)差异表达分析后得到的基因数量为 (n),其中有 (k) 个基因属于TermA,现在需要使用超几何分析判断该TermA是否富集?!
f(k,N,M,n) = C(k,M)*C(n-k,N-M)/C(n,N)
N = size of population
M = # of items in population with property &ldquo;E&rdquo;
N-M = # of items in population without property &ldquo;E&rdquo;
n = number of items sampled
k = number of items in sample with property &ldquo;E&rdquo;</description>
</item>
<item>
<title>RNA-Seq分析工具的配置</title>
<link>/webpage_001/2014-11-14-install-rna-seq-analysis-tools/</link>
<pubDate>Fri, 14 Nov 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-11-14-install-rna-seq-analysis-tools/</guid>
<description>当前有很多RNA-Seq分析工具,本文主要记录在Linux + Windows下常用的软件安装注意事项。
update: 2014-11-14 OS: Linux系统下一般使用 &ndash;prefix将程序安装到自定义的路径。再通过修改 ~/.bash_profile 将该路径添加到 $PATH方便使用。
python 2.7.8
从www.python.org这里下载系统对应的python版本。
Linux X86_64 版本: Python 2.7.8 source release Gzipped source tarball
MD5sum: d4bca0159acb0b44a781292b5231936f
size: 14846119
安装在个人目录:$HOME/localpython/
tar zxvf Python-2.7.8.tgz cd Python-2.7.8 ./configure --prefix=$HOME/localpython/ make make install 安装Python modules 查看当前Python的安装目录:
$ python Python 2.7.8 (default, Nov 14 2014, 13:47:10) [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2 Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.</description>
</item>
<item>
<title>编辑Linux的$PATH</title>
<link>/webpage_001/2014-10-31-edit-linux-path/</link>
<pubDate>Fri, 31 Oct 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-31-edit-linux-path/</guid>
<description>linux环境变量设置错误后,如何恢复解决方案:在命令行中输入:
export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin 后回车
/etc/profile: 此文件为系统的每个用户设置环境信息,当用户第一次登录时,该文件被执行.并从/etc/profile.d目录的配置文件中搜集shell的设置.
/etc/bashrc:为每一个运行bash shell的用户执行此文件.当bash shell被打开时,该文件被读取.~
/.bash_profile:每个用户都可使用该文件输入专用于自己使用的shell信息,当用户登录时,该文件 仅仅执行一次!默认情况下,他设置一些环境变量,执行用户的.bashrc文件.
~/.bashrc:该文件包含专用于你的bash shell的bash信息,当登录时以及每次打开新的shell时,该该文件被读取.
~/.bash_logout:当每次退出系统(退出bash shell)时,执行该文件.
/etc/profile中设定的变量(全局)的可以作用于任何用户,而~/.bashrc等中设定的变量(局部)只能继承 /etc/profile中的变量,他们是&rdquo;父子&rdquo;关系.~/.bash_profile 是交互式、login 方式进入 bash 运行的~/.bashrc 是交互式 non-login 方式进入 bash 运行的通常二者设置大致相同,所以通常前者会调用后者。 www.linux010.cn (来源:linux010)</description>
</item>
<item>
<title>使用R和Bioconductor进行RNASeq差异表达分析</title>
<link>/webpage_001/2014-10-29-rnaseq-analysis-using-r-and-bioconductor/</link>
<pubDate>Wed, 29 Oct 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-29-rnaseq-analysis-using-r-and-bioconductor/</guid>
<description>RNA-Seq analysis using R and Bioconductor
Count-based differential expression analysis of RNA sequencing data using R and Bioconductor Published online 22 August 2013; doi:10.1038/nprot.2013.099 nature protocols | VOL.8 NO.9 | 2013
See the original material: URL
1 Summary The samples cited here can be found @ URL
Brooks, A.N. et al. Conservation of an RNA regulatory map between Drosophila and mammals. Genome Res. 21, 193–202 (2011).
Library Library Layout shortname Fastaq</description>
</item>
<item>
<title>Github Markdown常用语法</title>
<link>/webpage_001/2014-10-19-github-markdown-syntax/</link>
<pubDate>Sun, 19 Oct 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-19-github-markdown-syntax/</guid>
<description>日常使用Markdown文档时所需的语法:
1. 链接 文字-&gt;URL链接
使用 [Baidu](http://www.baidu.com) 的方式添加超级链接。 Baidu
图片
使用: 格式
2. 格式 常规文字格式
Headings
在文字开头加入一个或多个 #,可控制文字大小 # Heading 1 ## Heading 2 ### Heading 3 #### Heading 4 显示效果如下:
Heading 1 Heading 2 Heading 3 Heading 4 Styling text
对文字格式化,语法如下: * italic * ** bold ** __bold__ ~~delete~~ 显示效果如下:
italic
bold
bold
delete
Nested lists</description>
</item>
<item>
<title>在Jekyll blog中添加搜索框</title>
<link>/webpage_001/2014-10-19-add-search-box-to-blog/</link>
<pubDate>Sun, 19 Oct 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-19-add-search-box-to-blog/</guid>
<description> 使用Jekyll + Github管理blog后,希望添加本地搜索功能,折腾太久依旧没有搞定。这里先记录下当前做过的尝试:
Google custom search
Jekyll + lunr 查阅这份repo中的相关描述。
Tipue 官方文档中有详细说明。
Crawler
查阅相关blog的说明5 Steps to Creating a Search Box for Static Blogs
苦于仅仅菜鸟一枚,上述方法依旧没有搞定。
我对Search box的设想是: 搜索窗口固定于页面顶部
输入关键词的同时即以下拉方式显示搜索结果
搜索范围包括:标签,分类,标题,全文
</description>
</item>
<item>
<title>国内可选择的开源软件镜像源</title>
<link>/webpage_001/2014-10-08-open-source-mirrors-in-china/</link>
<pubDate>Wed, 08 Oct 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-08-open-source-mirrors-in-china/</guid>
<description>国内的开源镜像,网易、搜狐和阿里的速度就很不错。
阿里云开源镜像站:http://mirrors.aliyun.com/
网易开源镜像站:http://mirrors.163.com/
搜狐开源镜像站:http://mirrors.sohu.com/
教育网提供的源也值得重点参考,只是最近在ubuntu使用bjtu的源更新软件,偶尔出现不稳定的现象(2015-03)。
北京交通大学开源镜像站:http://mirror.bjtu.edu.cn/
兰州大学开源软件镜像站:http://mirror.lzu.edu.cn/
厦门大学开源软件镜像站:http://mirrors.xmu.edu.cn/
上海交通大学开源软件镜像站:http://ftp.sjtu.edu.cn/
清华大学开源软件镜像站:http://mirrors.tuna.tsinghua.edu.cn/
天津大学开源软件镜像站:http://mirror.tju.edu.cn/
中国科学技术大学开源软件镜像站:http://mirrors.ustc.edu.cn/
东北大学开源软件镜像站:http://mirror.neu.edu.cn/
东软信息学院开源软件镜像站:http://mirrors.neusoft.edu.cn/
浙江大学开源软件镜像站:http://mirrors.zju.edu.cn 北京理工大学开源软件镜像站:http://mirror.bit.edu.cn 华中科技大学开源软件镜像站:http://mirrors.hust.edu.cn/
中山大学开源软件镜像站:http://mirror.sysu.edu.cn/
大连理工大学开源软件镜像站:http://mirror.dlut.edu.cn/
参考文章:
中国大陆开源镜像站汇总
国内开源镜像站点汇总
</description>
</item>
<item>
<title>通过Python批量下载文件</title>
<link>/webpage_001/2014-10-04-download-files-with-python/</link>
<pubDate>Sat, 04 Oct 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-04-download-files-with-python/</guid>
<description>使用Python时,通常会遇到下载文件的需要,直接下载是最快捷的方式。以下分别介绍两种工具下载文档的方法。
Python Python最常用的是使用urllib或者urllib2模块通过HTTP下载文档。
以下介绍下载R文档的方法:
import urllib import urllib2 import requests # Test URL url = &quot;http://rfunction.com/code/1202/120202.R&quot; # 1. Using urllib module print &quot;Begin download with urllib&quot; urllib.urlretrieve(url, &quot;code1.R&quot;) # 2. Using urllib2 module print &quot;Begin download with urllib2&quot; f = urlllib2.urlopen(url) with open(&quot;code2.R&quot;, &quot;wb&quot;) as code : code.write(f.read()) # 3. Using requests print &quot;Begin download with requests&quot; r = requests.get(url) with open(&quot;code3.R&quot;, &quot;wb&quot;) as code : code.write(r.content) The requests library method is get, which corresponds to the HTTP GET.</description>
</item>
<item>
<title>通过R语言下载文档</title>
<link>/webpage_001/2014-10-04-download-files-with-r/</link>
<pubDate>Sat, 04 Oct 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-10-04-download-files-with-r/</guid>
<description>使用R批量下载文件
说明
主要是在懒得挨个链接区另存为,所以折腾了一段R代码来完成
#1 思路
* 1 提取一个URL下所有链接地址
* 2 批量下载符合规则的文件
#2 工具 * 1 download.file()
另一个相同功能的下载函数 download()来自downloader包
install.packages(&quot;downloader&quot;) library(downloader) #3 实践 下载二进制文件时,需要使用 mode=&ldquo;wb&rdquo; 参数。
###1 下载单个PDF文件
url &lt;- &quot;http://rfunction.com/code/1202/par-120208.pdf&quot; download.file(url, basename(url), mode=&quot;wb&quot;) ###2 下载单个MP3文件 这里以GRE词汇的录音文件为例:Links
url &lt;- &quot;http://download.dogwood.com.cn/online/grechjx/WordList01.mp3&quot; download.file(url, basename(url), mode=&quot;wb&quot; ) **此处若缺少 mode=&ldquo;wb&rdquo; 参数,则下载的文档无法正常播放 **
###3 批量下载文本文件 &ldquo;R code&rdquo; 文件列表详见[链接](&ldquo;http://rfunction.com/code/1202/&quot;)
此处批量获取下载链接的方法引用 COS论坛 上 谢益辉 的帖子:链接
# 批量获取链接 library(XML) listLinks = function (URL, pattern = &quot;&quot;, relative = FALSE) { doc = htmlParse(URL) if (is.</description>
</item>
<item>
<title>使用BioPython将GenBank转换为Fasta格式</title>
<link>/webpage_001/2014-09-28-transform-genbank-to-fasta-using-biopython/</link>
<pubDate>Sun, 28 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-28-transform-genbank-to-fasta-using-biopython/</guid>
<description>Converting GenBank files to FASTA format with Biopython
1 Description This post will show how to extrat info from GenBank file using Biopython, and convert to FASTA file (nucleotide sequences and amino acid sequence).
2 Purpose 1. Extract entire DNA sequence as on record.
2. Extract DNA sequences for each gene.
3. Extract amino acid sequences for each gene.
3 Materials Here I choose a small bacteria complete genome to show the method: Buchnera_aphidicola (NCBI NC_011833, GI:219681389).</description>
</item>
<item>
<title>MobaXterm: Permissions 0660 for 'id_rsa' are too open</title>
<link>/webpage_001/2014-09-23-mobaxterm-permissions-0660-for-id_rsa-are-too-open/</link>
<pubDate>Tue, 23 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-23-mobaxterm-permissions-0660-for-id_rsa-are-too-open/</guid>
<description>Environment: MS Windows 8.1
Cygwin 64bit
ssh keys copied from somewhere and placed to ~/.ssh/ Problem: ssh -T git@github.com @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0660 for &lsquo;~/.ssh/id_rsa&rsquo; are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: ~/.ssh/id_rsa
Did not work: chmod 600 id_rsa</description>
</item>
<item>
<title>使用SSH管理Git</title>
<link>/webpage_001/2014-09-22-configuration-git-ssh/</link>
<pubDate>Mon, 22 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-22-configuration-git-ssh/</guid>
<description>Start Github and using Git SSH
Create a Github account Go to Github and create your account.
Download Git bash tool
Download Git bash for windows on Git-scm.
Install the Git-1.9.4-preview20140611.exe using default settings.
Configure the SSH connection with remote github
Start the Git Bash and create SSH keys
ssh-keygen -t rsa -C &quot;wangmcas@gmail.com&quot; Create privite and public keys for the Email account</description>
</item>
<item>
<title>管理多个Github账号</title>
<link>/webpage_001/2014-09-21-manage-multiple-account-on-github/</link>
<pubDate>Sun, 21 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-21-manage-multiple-account-on-github/</guid>
<description>Q: How can we manage multiple Github IDs on one PC?
A: As far as I can see, add a file config to the dir ~/.ssh/ can solve it.
1 . Change your settings 1 . First of all, you have two Github IDs (ie: A &amp; B).
2 . Create the SSH rsa keys for both of the IDs.
## For A ssh-keygen -t rsa -C &quot;A_mail@gmail.</description>
</item>
<item>
<title>jekyll+Github</title>
<link>/webpage_001/2014-09-20-jekyll+github/</link>
<pubDate>Sat, 20 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-20-jekyll+github/</guid>
<description>1.Using Jekyll + Github We need Ruby and Jekyll. You can find more details here @ http://jekyllrb.com/docs/windows/
Install Ruby Get Ruby for windows, download (X86/X64) for your system. Install the Ruby at the default PATH, and choose the option: Add Ruby executables to your PATH.
Install Ruby DevKit Get Ruby DevKit. Install it at default PATH, like: &ldquo;C:\RubyDevKit\&rdquo;
Open your windows console to finish the following steps.</description>
</item>
<item>
<title>创建Github blogs</title>
<link>/webpage_001/2014-09-20-manage-github-pages/</link>
<pubDate>Sat, 20 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-20-manage-github-pages/</guid>
<description>Q: Can we publish blogs using Github?
A: Yes.
1. Why Github pages? Jekyll + Github can manage a Static webpage.
Easy to manage your pages using git command.
Also support your own domain.
2. What tools you need? git tools: http://windows.github.com
jekyll followning @Julian Thilo&rsquo;s instructions. 3. Start using pages Create pages for your project
using gh-pages branch</description>
</item>
<item>
<title>在Github上管理个人blog</title>
<link>/webpage_001/2014-09-19-manage-blog-on-github/</link>
<pubDate>Fri, 19 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-19-manage-blog-on-github/</guid>
<description>This tutorial will teach you to create a blog on github step-by-step.
Mainly, 3 parts will included.
1 Create your blog using Jekyll-bootstrap. (see Site)
2 Change the theme. (see [Site]())
3 Write your post. (see [Site]())
Most of the following content come from Jekyll-bootstrap quick-start
Here will show you step-by-step:
1. Create your blog using Jekyll-bootstrap
*Create a new repo on github: bakerwm.github.com (your username)
*Install Jekyll-Bootstrap
Enter these commands into your git terminal</description>
</item>
<item>
<title>R语言读取压缩文档</title>
<link>/webpage_001/2014-09-10-r-read-compressed-files/</link>
<pubDate>Wed, 10 Sep 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-09-10-r-read-compressed-files/</guid>
<description>使用R语言进行数据分析时,经常需要读取文档,经常会遇到压缩文档(.bz2, .gz)。
Goal: Special cases in reading files Reading a *.bz2 file
read.table(bzfile(&quot;file.text.bz2&quot;)) Reading a .gz file
read.table(gzfile(&quot;file.text.gz&quot;)) Reading from a pipe
mydata &lt;- read.table(pipe(&quot;awk -f filter.awk input.txt&quot;)) # under Linux system Reading from a URL
read.table(url(&quot;http://www.mayin.org/ajayshah/A/demo.text&quot;)) Reading from a URL directly
read.table(&quot;http://www.mayin.org/ajayshah/A/demo.text&quot;) Reading a bz2 file from URL
read.table(pipe(&quot;links -source http://www.mayin.org/ajayshah/A/demo.text.bz2 | bunzip2&quot;)) Reading binary files from a URL
load(url(&quot;http://www.mayin.org/ajayshah/A/nifty_weekly_returns.rda&quot;)) source: http://www.</description>
</item>
<item>
<title>RCurl的问题</title>
<link>/webpage_001/2014-08-27-questions-about-using-rcurl/</link>
<pubDate>Wed, 27 Aug 2014 18:36:24 +0200</pubDate>
<guid>/webpage_001/2014-08-27-questions-about-using-rcurl/</guid>
<description>最近学习 炼数成金 的网络课程 《R七种武器之网络爬虫RCurl》,对HTML完全不懂,从头学起。
首先举个例子,利用RCurl取得网页信息。
library(RCurl) library(XML) url &lt;- &quot;http://tuan.baidu.com/movie&quot; doc &lt;- htmlTreeParse(url, useInternal=TRUE) tgComp &lt;- getNodeSet(doc, &quot;//a[@class='n-sitename']&quot;) tgTitle &lt;- getNodeSet(doc, &quot;//div[@class='good-n-meta clearfix']&quot;) tgPrice &lt;- getNodeSet(doc, &quot;//div[@class='good-n-price']&quot;) ##提取相应数值 Comp &lt;- iconv(xmlSApply(tgComp, xmlValue), from=&quot;utf-8&quot;, to=&quot;&quot;) Title &lt;- iconv(xmlSApply(tgTitle, xmlValue), from=&quot;utf-8&quot;, to=&quot;&quot;) Price &lt;- iconv(xmlSApply(tgPrice, xmlValue), from=&quot;utf-8&quot;, to=&quot;&quot;) #Delete ¥, 折等 Price &lt;- gsub(&quot;[^0-9. ]&quot;, &quot;&quot;, Price) #分别提取价格等 temp &lt;- sapply(Price, function(x) strsplit(x, split=&quot;\\s+&quot;, perl=TRUE)) Table &lt;- do.call(rbind.data.frame, temp) #制作data.frame colnames(Table) &lt;- c(&quot;Blank&quot;, &quot;Price&quot;, &quot;Pre-Price&quot;, &quot;Discount&quot;) rownames(Table) &lt;- 1:nrow(Table) Table$Title &lt;- Title Table$Company &lt;- Comp Table$Blank &lt;- NULL Table &lt;- Table[c(5, 4, 1, 2, 3)] Table &lt;- sapply(Table, function(x) gsub(&quot;^\\s+|\\s+$&quot;, &quot;&quot;, x)) colnames(Table) &lt;- c(&quot;团购网&quot;, &quot;团购名称&quot;, &quot;团购价&quot;, &quot;原价&quot;, &quot;折扣&quot;) head(Table) 团购信息前几条如下:</description>
</item>
<item>
<title>footer</title>
<link>/_footer/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/_footer/</guid>
<description></description>
</item>
<item>
<title>header</title>
<link>/_header/</link>
<pubDate>Mon, 24 Apr 2017 18:36:24 +0200</pubDate>
<guid>/_header/</guid>
<description>Bio M</description>
</item>
</channel>
</rss>