学习技巧3则
读Blog有如读作者的思想,尤其是读好的Blog。就像【学而时嘻之】这个Blog,就是一个代表。作者的博闻和睿智在其字里行间可见一斑。下面的几个有助于提高工作或学习效率的技巧即出自此博客。虽然原作者已经通过广泛的阅读和实践总结出一些精华文章,但是我在此还是偷懒了,仅列出要点中的要点,主要用于自勉。
1. 关于学习的最佳状态
Molecular modeling in Materials Sciences Web development Programming IT
读Blog有如读作者的思想,尤其是读好的Blog。就像【学而时嘻之】这个Blog,就是一个代表。作者的博闻和睿智在其字里行间可见一斑。下面的几个有助于提高工作或学习效率的技巧即出自此博客。虽然原作者已经通过广泛的阅读和实践总结出一些精华文章,但是我在此还是偷懒了,仅列出要点中的要点,主要用于自勉。
1. 关于学习的最佳状态
History Expansion
History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly.
History expansion takes place in two parts. The first is to determine which line from the history list should be used during substitution. The second is to select portions of that line for inclusion into the current one.
Continue reading ‘History expansion in depth’ »
A demo program showing the way to make animation with matplotlib.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # A demo for animation with matplotlib # Written by Ting Li (Dr.Ting.Li at gmail.com) # 2010-09-10 # Ref: http://www.scipy.org/Cookbook/Matplotlib/Animations import numpy as np import time import matplotlib matplotlib.use('WXAgg') #before import pylab, choose the GUI backend #It can also be done while calling this script from command line: #>>> python animation.py -dWXAgg #Other backends are: valid strings are ['ps', 'Qt4Agg', 'GTK', 'GTKAgg', 'svg', # 'agg', 'cairo', 'MacOSX', 'GTKCairo', 'WXAgg', 'TkAgg', 'QtAgg', 'FltkAgg', # 'pdf', 'CocoaAgg', 'emf', 'gdk', 'template', 'WX'] from pylab import * ion() #a must, into interactive mode <a href="http://9rivers.linkka.com/2010/09/11/animation-with-matplotlib/#more-561" class="more-link">Continue reading ‘Animation with matplotlib’ »</a> |
Zotero, the must-have reference manager for scientists, supports various bibliography styles. This is benefited from the CSL (citation style language), which is an open XML standard for citations and bibliographies. Since Zotero is implemented as a Firefox addon, it naturally supports search and grab references from the internet, which is very convenient and better than some other stand-alone reference managers.
Zotero has a CSL editor. It can be invoked by entering “chrome://zotero/content/tools/csledit.xul” as the url in Firefox. Here has a step-by-step tutorial on how to create a new csl style. There is also a GUI program which can edit and create a CSL file, it is CSLedit.
Continue reading ‘A Zotero style for ACS references with titles’ »
Preimes Plus是一个创业团队,虽然看不出他们到底有什么与众不同,但是看起来这些创业者应该是对创业有一些独到的理解的。正如他们这篇关于执行和想法关系的文章,应该是历经一些成功和失败之后得到的感悟。文章的中心思想是:用78%的精力去实现对成功只有22%贡献的想法,强调持之以恒的实践对一个项目成功的重要性。虽然这不是什么新的发现,但是的确值得时常引以为鉴。
Origin是科学绘图和数值分析领域的一个十分强悍的商业软件。即使在开源流行的今天,Origin凭其优势仍可傲视群雄。当今的GUI软件,一个符合趋势的做法是支持脚本或者这样那样的编程扩展。这是由应用的多样化以及GUI程序天然的特点造成的:用户不再满足单一的使用流程,但是GUI程序的界面元素往往是开发时就订死的。Origin也不例外,它从6.0以后也在不断地朝支持编程的方向努力。否则,你看看它的对手们,Scilab, Octave, Qtiplot等好多好多,哪个不是天生就支持一门编程(脚本)语言的呢?
Origin发展到版本8以后,编程扩展的支持已经初具规模。早期的版本支持Labtalk,说实话当年尝试使用labtalk自动化一些操作的时候,一个突出的感觉就是十分混乱、摸不着头绪。这是因为Labtalk并不是一个系统的编程语言,充其量也就是其它软件中Macro的概念,它主要是用于操作一些Origin内置的对象,实现简单的计算。其后,大概是版本7以来,Origin引入了C语言支持,并提供了一个内置的IDE方便撰写C语言的扩展程序,这也被延续到最新的版本。Origin的C应该说绝对是标准C的超集在超集,因为在Origin内部,你可以自由地使用内置对象(如工作表),数值计算库NAG,各种图形元素,甚至还支持matrix和vector之类的数据类型和操作,同时也引入部分C++概念(例如类)以及一些动态语言才有的迭代方法(foreach)。到了最新的8世代,Origin引入了x-function机制。那么这些x-functions到底是什么?其实很简单,我们可以想象Origin所有的界面操作其实都是调用了底层的x-functions,换句话说就是Origin底层的所有操作(例如表格元素复制,积分计算等)都是由x-function实现的,而x-function是用xml记录的。至于x-function是不是最终会执行更底层的C代码,我没有深究(猜想应该是这样),不过如果关心效率则需要考察。x-function机制的好处不仅在于实现了所有的操作,也在于它可以被处处调用。无论是命令窗口,GUI的脚本窗口还是Origin C或labtalk中都可以直接调用,同时Origin提供了一个x-function编辑器以便用户随时扩展。
Jacobus Henricus Van’t Hoff, 1901 Nobel Prize in Chemistry
Pieter Zeeman, 1902 Nobel Prize in Physics
Hendrik Antoon Lorentz, 1902 Nobel Prize in Physics
Johannes Diderik Van Der Waals, 1910 Nobel Prize in Physics
Heike Kamerlingh-Onnes, 1913 Nobel Prize in Physics
Petrus Josephus Wilhelmus Debye, 1936 Nobel Prize in Chemistry
Frits Zernike, 1953 Nobel Prize in Physics
Nicolaas Bloembergen, 1981 Nobel Prize in Physics
Simon Van Der Meer, 1984 Nobel Prize in Physics
I didn’t know this before I saw this post. The shortcut is ‘Alt+=’. That’s simple!
There is a ‘-C’ option allow you to do this. However, it can fail in some situation. There are also some posts online that report this option does not work. If you have that problem, maybe you could try the solution here.
Here is my experience, on Cygwin (I didn’t test this on other systems)
Continue reading ‘Uncompress tar to specific directory + Other tar/untar tricks’ »
Tesseract-OCR是一个开源的文字识别引擎。它默认支持一些主要的西方语言,包括荷兰语等,并有Linux和Windows二进制版本。直接作为命令行工具使用十分方便:”tesseract(.exe) *.tiff|bmp *.txt -l en|nld” , 也就是制定一个tiff或bmp(在Windows上)图像文件作为输入,然后给出一个文字识别后的txt文件,“-l”参数指定语言(例如,nld就是荷兰语的缩写)。默认的字典在./tessdata/中并按语言分子目录。