Blog Archive

Tuesday, September 29, 2015

Recurrent Neural Network

Code for Neural Networks and Reinforcement Learning:



http://www.wildml.com/2015/09/recurrent-neural-networks-tutorial-part-1-introduction-to-rnns/

http://www.wildml.com/2015/09/recurrent-neural-networks-tutorial-part-2-implementing-a-language-model-rnn-with-python-numpy-and-theano/


http://nikhilbuduma.com/2015/01/11/a-deep-dive-into-recurrent-neural-networks/


https://sourceforge.net/p/rnnl/wiki/Home/

RNNLIB is a recurrent neural network library for sequence learning problems. Applicable to most types of spatiotemporal data, it has proven particularly effective for speech and handwriting recognition.

'via Blog this'

Linux Bash Wildcards cheatsheet

source:      

http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm

Reference:

http://www.johnstowers.co.nz/blog/pages/bash-cheat-sheet.html


GNU/Linux Command-Line Tools Summary



Wildcards

Wildcards are useful in many ways for a GNU/Linux system and for various other uses. Commands can use wildcards to perform actions on morethan one file at a time, or to find part of a phrase in a text file. There are many uses for wildcards, there are two different major ways that wildcards are used, they are globbing patterns/standard wildcards that are often used by the shell. The alternative is regular expressions, popularwith many other commands and popular for use with text searching and manipulation.
Tip: If you have a file with wildcard expressions in it then you can use single quotes to stop bash expanding them or use backslashes (escape characters), or both.

For example if you wanted to create a file called 'fo*' (fo and asterisk) you would have to do it like this (note that you shouldn't create files with names like this, this is just an example):

touch 'fo*' 
  
Note that parts of both subsections on wildcards are based (at least in part) off the grep manual and info pages. Please see the Bibliography for further information.

Standard Wildcards (globbing patterns)

Standard wildcards (also known as globbing patterns) are used by various command-line utilities to work with multiple files. For more information on standard wildcards (globbing patterns) refer to the manual page by typing:

man 7 glob
Can be used by: Standard wildcards are used by nearly any command (including mv, cp, rm and many others).



? (question mark)
this can represent any single character. If you specified something at the command line like "hd?" GNU/Linux would look for hda, hdb, hdcand every other letter/number between a-z, 0-9.
* (asterisk)
this can represent any number of characters (including zero, in other words, zero or more characters). If you specified a "cd*" it would use "cda", "cdrom", "cdrecord" and anything that starts with “cd” also including “cd” itself. "m*l" could by mill, mull, ml, and anything that starts with an m and ends with an l.
[ ] (square brackets)
specifies a range. If you did m[a,o,u]m it can become: mam, mum, mom if you did: m[a-d]m it can become anything that starts and endswith m and has any character a to d inbetween. For example, these would work: mam, mbm, mcm, mdm. This kind of wildcard specifies an “or” relationship (you only need one to match).
{ } (curly brackets)
terms are separated by commas and each term must be the name of something or a wildcard. This wildcard will copy anything that matches either wildcard(s), or exact name(s) (an “or” relationship, one or the other).
For example, this would be valid:
cp {*.doc,*.pdf} ~
This will copy anything ending with .doc or .pdf to the users home directory. Note that spaces are not allowed after the commas (or anywhere else).
[!]
This construct is similar to the [ ] construct, except rather than matching any characters inside the brackets, it'll match any character, as longas it is not listed between the [ and ]. This is a logical NOT. For example rm myfile[!9] will remove all myfiles* (ie. myfiles1, myfiles2 etc) but won't remove a file with the number 9 anywhere within it's name.
\ (backslash)
is used as an "escape" character, i.e. to protect a subsequent special character. Thus, "\\” searches for a backslash. Note you may need to use quotation marks and backslash(es).

Regular Expressions

Regular expressions are a type of globbing pattern used when working with text. They are used for any form of manipulation of multiple parts of text and by various programming languages that work with text. For more information on regular expressions refer to the manual page or try an online tutorial, for example IBM Developerworks using regular expressions. For the manual page type:

Type:

man 7 regex
Regular expressions can be used by: Regular Expressions are used by grep (and can be used) by find and many other programs.
Tip: If your regular expressions don't seem to be working then you probably need to use single quotation marks over the sentence and then use backslashes on every single special character.



. (dot)
will match any single character, equivalent to ? (question mark) in standard wildcard expressions. Thus, "m.a" matches "mpa" and "mea" but not "ma" or "mppa".
\ (backslash)
is used as an "escape" character, i.e. to protect a subsequent special character. Thus, "\\" searches for a backslash. Note you may need to use quotation marks and backslash(es).
.* (dot and asterisk)
is used to match any string, equivalent to * in standard wildcards.
* (asterisk)
the proceeding item is to be matched zero or more times. ie. n* will match n, nn, nnnn, nnnnnnn but not na or any other character.
^ (caret)
means "the beginning of the line". So "^a" means find a line starting with an "a".
$ (dollar sign)
means "the end of the line". So "a$" means find a line ending with an "a".
For example, this command searches the file myfile for lines starting with an "s" and ending with an "n", and prints them to the standard output (screen):
cat myfile | grep '^s.*n$'
[ ] (square brackets)
specifies a range. If you did m[a,o,u]m it can become: mam, mum, mom if you did: m[a-d]m it can become anything that starts and endswith m and has any character a to d inbetween. For example, these would work: mam, mbm, mcm, mdm. This kind of wildcard specifies an “or” relationship (you only need one to match).
|
This wildcard makes a logical OR relationship between wildcards. This way you can search for something or something else (possibly using two different regular expressions). You may need to add a '\' (backslash) before this command to work, because the shell may attempt to interpret this as a pipe.
[^]
This is the equivalent of [!] in standard wildcards. This performs a logical “not”. This will match anything that is not listed within those square brackets. For example, rm myfile[^9] will remove all myfiles* (ie. myfiles1, myfiles2 etc) but won't remove a file with the number 9 anywhere within it's name.

Useful categories of characters (as defined by the POSIX standard)

This information has been taken from the grep info page with a tiny amount of editing, see [10] in the Bibliography for further information.



  • [:upper:] uppercase letters
  • [:lower:] lowercase letters
  • [:alpha:] alphabetic (letters) meaning upper+lower (both uppercase and lowercase letters)
  • [:digit:] numbers in decimal, 0 to 9
  • [:alnum:] alphanumeric meaning alpha+digits (any uppercase or lowercase letters or any decimal digits)
  • [:space:] whitespace meaning spaces, tabs, newlines and similar
  • [:graph:] graphically printable characters excluding space
  • [:print:] printable characters including space
  • [:punct:] punctuation characters meaning graphical characters minus alpha and digits
  • [:cntrl:] control characters meaning non-printable characters
  • [:xdigit:] characters that are hexadecimal digits.
These are used with: The above commands will work with most tools which work with text (for example: tr).
For example (advanced example), this command scans the output of the dir command, and prints lines containing a capital letter followed by a digit:

ls -l | grep '[[:upper:]][[:digit:]]'
The command greps for [upper_case_letter][any_digit], meaning any uppercase letter followed by any digit. If you remove the [ ] (square brackets) in the middle it would look for an uppercase letter or a digit, because it would become [upper_case_letter any_digit]

Monday, September 28, 2015

Music and Sound- Reading note

1) how to derive float from division of two integer in python?

int(var1)/int(var2) will give integer number

var1/float(var2)     will give float number


2) Necessary module:
python and sound:

reading and writing audio file:
scipy.io.wavfile read, write

ploting:
matplotlib: plot, show

array manipulating:
numpy:   arange, max, abs, sum

3)  How to read audio files:

def readAudio(inputFile):
    """
    Input:
        inputFile: the path to the wav file    
    Output:
        The function should return a numpy array that contains all samples of the audio.
    """    
    from scipy.io import wavfile
    import numpy as np
    INT16_FAC = (2**15)-1
    INT32_FAC = (2**31)-1
    INT64_FAC = (2**63)-1
    norm_fact = {'int16':INT16_FAC, 'int32':INT32_FAC, 'int64':INT64_FAC,'float32':1.0,'float64':1.0}
    fs, x = wavfile.read(inputFile)
    x = np.float32(x)/norm_fact[x.dtype.name]


NOTE:
SciPy (pronounced “Sigh Pie”) is an open source Python library used by scientists, analysts, and engineers doing scientific computing and technical computing.


Monday, September 21, 2015

[Studying Notes] RNN: Recurrent Neural Networks

The Unreasonable Effectiveness of Recurrent Neural Networks

http://karpathy.github.io/2015/05/21/rnn-effectiveness/

https://news.ycombinator.com/item?id=9584325




Regression and Classification with Neural Networks
http://www.autonlab.org/tutorials/neural13.pdf


The Unreasonable Effectiveness of Recurrent Neural Networks (karpathy.github.io)
913 points by benfrederickson 123 days ago | 207 comments




Karpathy is one of my favourite authors - not only is he deeply involved in technical work (audit the CS231n course for more[1]!), he spends much of his time demystifying the field itself, which is a brilliant way to encourage others to explore it :)
If you enjoyed his blog posts, I highly recommend watching his talk on "Automated Image Captioning with ConvNets and Recurrent Nets"[2]. In it he raises many interesting points that he hasn't had a chance to get around to fully in his articles.
He humbly says that his captioning work is just stacking image recognition (CNN) on to sentence generation (RNN), with the gradients effectively influencing the two to work together. Given that we've powerful enough machines now, I think we'll be seeing a lot of stacking of previously separate models, either to improve performance or to perform multi-task learning[3]. A very simple concept but one that can still be applied to many other fields of interest.
[3]: One of the earliest - "Parsing Natural Scenes and Natural Language with Recursive Neural Networks"http://nlp.stanford.edu/pubs/SocherLinNgManning_ICML2011.pdf

Wednesday, September 16, 2015

NCIO Homepage: Special Reports: OOOPS! Looks Like I Have a "Co-Inventor"!

NCIO Homepage: Special Reports: OOOPS! Looks Like I Have a "Co-Inventor"!:



'via Blog this'

爱是有缘:麻省理工实验揭秘男女配对的真相



http://bbs.wenxuecity.com/romance/781222.html



麻省理工实验揭秘男女配对的真相


该实验出自麻省理工学院著名经济学家Dan Ariely的《The Upside of Irrationality》。其结果很有趣,也在我们的生活中尤为常见。
Part 1.
实验人员找来100位正值青春年华的大学生。男女各半。然后制作了100张卡片,卡片上写了从1到100总共一百个数字。
单数的50张卡片给男生,双数的50张卡片给女生。但他们并不知道卡片上写的是什么数字。
工作人员将卡片拆封,然后贴在该大学生的背后。
实验规则:
1.男女共100人,男的单数编号,女的双数。
2.编号为1~100,但他们不知道数字最大的是100,最小的是1。
3.编号贴在背后,自己只能看见别人的编号。
4.大家可以说任何话,但不能把对方的编号告诉对方。
5.实验要求:大家去找一个异性配对,只要两人加起来的数字越大,得到的奖品越高,奖金归他们所有。
6.配对时间有限。
大家猜猜会怎么着?
这个实验设置很简单,就是要男女都能找到适合自己的异性,争取能凑到最大的总和。
实验是有奖金的,奖金金额为编号总和翻10倍。比如,83号男生找到了74号女生配对,那么两人可以获得(83+74)*10=1570美元的奖金。但如果2号女生找到了3号男生配对,那么两人只能拿到50美元了。
Part 2.
实验开始:
由于大家都不知道自己背后的数字,因此首先就是观察别人,很快分数高的男生和女生很快被大家找出来了。
例如,99号男生和100号女生。
这两人身边围了一大群人,大家都想说服他们和自己配成一对。
“来跟我一起嘛!我会给你幸福的!”
“我们简直天作之合啊!”
是的,有些人天生就自带“女神”/“男神”光环……谁都想和最好的“女神”/“男神”配对。
但人类的一夫一妻制决定了,人不可能同时和N个人配对,因此他们(高分者)变得非常挑剔,他们虽然不知道自己的分数具体是多少,但他们知道一定是比普通人的要高。
为什么?看看围在自己身边的狂蜂浪蝶就知道了,从这些追求者们殷切的眼神中就能够看出来。
自小是女神的人为什么被外界看起来更加“高贵冷艳傲慢”,是因为从小到大她们都有太多乱七八糟的浪蜂浪蝶扑过来了。追求者太多,哪有时间去一一好口相向?只能高冷艳一点把不合格的拒之门外才是最佳策略。
那些碰壁的追求者迫于无奈只能退而求其次,原本给自己的目标是一定要找90+的人配对,慢慢的发现80+也可以了,甚至70+或者60+也凑合着过了。
但那些数字太小的人就很悲催了,他们到处碰壁,到处被拒,被嫌弃。
据一位学生事后表示,在参加了这场游戏之后,他对人生的理解都有了不同……因为他在短短几小时里就感受到了人间的冷暖——他们背后的数字太小了(基本都是个位数),要找一个愿意配对的人简直是难上加难。
最后他们想出来的办法无外乎两条路:
一个是大家自己找个差不多的凑合凑合算了,比如5号和6号俩人配成一对,虽然奖金只有110美元,那也好过没有。
二是和对方商量,如果你愿意和我配对,那么拿到奖金的时候就不是对半分,我愿意给你更多,比如三七分或四六分等等,或者事后再请你吃饭,虽然请客吃饭花的钱肯定多过奖金数额,但是找不到人配对实在是太没面子了。
(这个在现实中就有交易婚姻:交易条件包括房子、财产、其他物质不等、代际婚姻、假婚姻等)
经过了漫长的配对过程,眼看时间就要到了,还有少数人没有成功配对,这些人没办法了,只能赶紧的草草找人完成任务。因为单身一人的话是拿不到奖金的……
最后的倒数阶段,没有配对的都胡乱找了个人。当然也有坚持不配对,单身结束游戏的大学生。
实验结束。
Part 3.
心理学家发现,绝大多数人的配对对象其背后的数字都非常接近自己的数字,换言之中国古人说的“门当户对”还是很有道理的。
比如55号男生,他的对象有80%的可能性是50-60之间的女生,俩人数字相差20以上的情况非常罕见。
你们猜100号的女生的配对对象是谁?
好玩的是,100号女生的配对对象竟然不是99号男,也不是97或95,竟然是73号男生,两人相差了27!为什么会相差这么多?
原来100号女生被众多的追求者冲昏了头,她采取的策略是“捂盘惜售”(因为她并不知道100是最大值,也不知道自己就是100号),她还在等待更大数字的男人,等到大家都配对完毕,她终于开始慌了。于是她在剩下的男生里找了一个数字最大的,就是那位73号幸运儿。她最后也尝试过去找90+的男生,但是人家都已经有女伴了,让他们抛弃现有的女伴跟她配对并不现实,何况已经配对了他们不会为了这点钱而损自己名声。
从中我们还可以总结出很多经验:
1、因为人太多地方太小,你并不可能跑去看每个人背后的数字。(空间,圈子,地域限制)
2、你只要看谁边上围着的人多,谁就是数字较大的人,而那些身边孤苦伶仃门可罗雀的人,肯定是数字小的,通过这个方法你可以立刻筛选出目标对象。(多数决择,光环效应)
3、小数字的人追求大数字的人一般都很辛苦,因为要大数字的人接受小数字的人总不是那么甘心,因此追求方要付出更大的努力才行,但更大的可能是你再怎么努力,对方也不理你。(女神与屌丝)
这场心理学实验完全就是人类恋爱行为的实验简化版。
Part 4.
我们每个人在遇到一个异性的时候,出于本能的就会开始评价对方的价值,这完全是下意识的。但人类的价值非常难评估,没有谁会把数字贴在自己的背后,人们还往往会故意夸大自己的价值。至于夸大的手段、浮夸的工具各种各样。
我们在生活中所遇到的人也远远超过了100个,我们面临的是一个更加复杂的环境,这让我们做出决定的难度成倍增加。正因为选择的难度很大,因此人类进化出了一些很简单的指标。比如,我们更倾向于基于别人的判断来决定自己的判断。
实验让我们知道,如果爱情是一场精确的匹配游戏,最最重要的是你自身的价值有多高(即背后的数字大小),而你采取什么办法去恋爱可能都是次要的。但和这个实验有个很重要的不同就是:人类社会实在太复杂了,一个人的价值并不是那么容易就能体现出来的。而且我们很难去判别一个人的价值。
还有一点就是,我们每个人眼中的价值标准都不一样,所以我们可以看到这么多元的爱情。张生与崔莺莺,白瑞德与郝思嘉,罗密欧与朱丽叶……这些故事代代传颂,足以证实每个年代都有在世人看来“不可能”的爱情正在发生。
这里的世人是谁?就是那些“大多数人”。是你的邻居三姑八姨婆九舅舅隔壁学校的同学,甚至是你的父母。
这个社会的风潮是由这些“大多数人”去决定的,所以当你看到社会的价值倾向时,你看到的就是大多数人的标准。但大多数人的就一定是正确的吗?他们也许都不自知该用什么样的标准来对待爱情。
人云亦云是他们大多数人“发表意见”的最佳策略。对某些邻居三姑八姨婆来说,婚姻就是一桩买卖,女人是有折旧率的,所以越早嫁出去越好;男人的选择是对女人选择租赁而非购买……
其实,作为理性的经济人,这可能没错。婚姻本质就是一种利益交换,就像经济学里所有东西都可以量化,用等额的货币来取代。但是我们都是有感情有弱点的动物。婚姻的神奇在于,这种利益交换有时候是不对等的,而让它不对等的原因,是我们所说的变量。
这个变量叫“感情”。
一个教经济学的老头,曾经给学生说过爱情的经济学:“姑娘,有一天一个百万富翁向你求婚,他愿意给你一切,这本来是一件非常美好的事情。算一下,你以为自己赚了一百万。但同时又有一个千万富翁看上你了,那么你与百万富翁结婚的机会成本就是一千万。也就是说,如果你嫁给了百万富翁,那么你会亏损九百万。”
这是经济学。
“我非常庆幸,我的太太经济学没有学好,那时候她非常漂亮我却没有钱,但她还是嫁给我了。”
这是爱情。
至于你,是被这些思潮所裹挟,还是有自己的爱情观,完全取决于你。
'via Blog this'

Saturday, September 12, 2015

Yong Xu

Yong Xu:



'via Blog this'

Secretary of Defense Ash Carter Remarks at 9/11 Memorial

Secretary of Defense Ash Carter Remarks at 9/11 Memorial, Friday, September 11, 2015 > U.S. DEPARTMENT OF DEFENSE > Transcript View:





" As Americans, we have the will to see that justice is done (正义被伸张).  As a military, we have the capability to see that justice is done."





General Selva, distinguished guests, ladies and gentlemen:
To the families of those who lost their lives here at the Pentagon, let me begin by offering on behalf of the Department of Defense my deepest condolences for the loss you suffered and the burden you continue to carry.  We cannot fully appreciate how much your lives changed, or how much you lost on this morning 14 years ago.   We cannot understand how it has felt on every day since, to long for their laugh, or to see their smile, or to feel their embrace.  We simply cannot comprehend the weight of their absence.  But for me, and for so many others at the Pentagon, the weight of their memory, and our duty to honor it, is something we do carry with us every day.
For all of us, their memory serves as an ever-present reminder: to cherish each day with those who love us, to stay vigilant against those who would harm us, to remain guided by the values that have always made us great. 
At times we depend upon something other than what we hold in our heads and hearts to remember: maybe it’s a poem taped to your mirror; maybe it’s coming to this ceremony every year.  For me, it’s a piece of the Pentagon that sits on my desk – collected from the rubble and passed down by each of my predecessors who have served since that horrific day.  Beneath this piece of Indiana Limestone reads a simple inscription:  “To honor the 184 people whose lives were lost, their families, and all those who sacrificed, that we may live in freedom, we will never forget.”
We will never forget – though try as we may, we can never fully know how you feel on this solemn day.
But we do know, we fully know, what the lives of your loved ones mean to this community and to our country.  And I hope you know that by returning here to the Pentagon each year, you set an example of strength and resilience for all of us.
Terrorists who hope to intimidate us will find no satisfaction and no success in threatening the United States.  Because not only do we come back, but by living in honor of those we have lost, we come back stronger than ever before. 
And after 14 years, and forever more, terrorists who threaten us will learn this simple, yet unbending, truth: no matter how long it takes, no matter where they may hide, they will not escape the long arm of justice.  The threat from terrorism may evolve but our determination to hold these killers accountable remains constant.  As Americans, we have the will to see that justice is done.  As a military, we have the capability to see that justice is done.  And because of our men and women in uniform, because we can rely on the finest fighting force the world has ever known, we know that justice will be done. 
When terrorists attacked the Pentagon, they tore a hole in this building.  They tore at places in your hearts that may never heal completely.  But as you know better than anyone, they did not and could not take from us what defines us.
As Americans, we are defined by our resilience, by our readiness to stand up for our values, by our willingness to honor the past, even as we always begin anew.  With your example, you have embodied those ideals. You have shown us how to persevere, how to move forward, how to memorialize those we have lost in what we make of our lives.
So today and all days, we honor and remember your loved ones. Because of the example you have set for each of us, for our American family, you have our deepest admiration and appreciation. 
Within this community, we will never forget.  We will always remember.  We will continue to honor the memory of those you have lost with the work we accomplish together. 
'via Blog this'

Friday, September 11, 2015

VenueDB — EarMachine

VenueDB — EarMachine:



'via Blog this'

wolf totem


http://www.dallasobserver.com/film/gorgeous-wolf-totem-holds-to-nature-adventure-formula-7570823



GORGEOUS WOLF TOTEM HOLDS TO NATURE-ADVENTURE FORMULA





Feng Shaofeng and friend.
The success of Jean-Jacques Annaud's handsome lupine adventure Wolf Totem relies in large part on the ratio between wolf and totem. There are wolves — those howling, majestic hunters of the Mongolian grasslands — and then there are the many things they stand for: freedom, teamwork, the delicate harmony of nature and the devastating encroachment of civilization on centuries-old tradition. (And that's just for starters.) Whenever Annaud and his cinematographer, Jean-Marie Dreujou, chase the pack across lush green hills and arid plains,Wolf Totem has the elemental beauty of a Carroll Ballard (The Black Stallion) production or the better sequences from The Bear, Annaud's simple, affecting 1988 film. Whenever it pauses to consider, say, how the declining wolf population reflects the thoughtless dictates of the Cultural Revolution, the film bites off more gazelle meat than it can chew.
Though based on Jiang Rong's popular semi-autobiographical novel, which drew on his own experience as a herder for 11 years in Inner Mongolia, this French-Chinese production plays something like a repurposed Dances With Wolves, right down to the Easternized score by the late James Horner. In the Kevin Costner role, there's Chen Zhen (Feng Shaofeng), a feckless student from Beijing who's sent to help civilize the Mongolian nomads and carve out a place for migrating Han Chinese. Eventually, he runs with the tribe. He has a Mary McDonnell in Gasma (Ankhnyam Ragchaa), the widowed daughter of the wise chief Bilig (Basen Zhabu), and he takes in a wolf cub, too, that rivals Costner's "Two Socks" for fluffy, yelping adorability.
Wolf Totem addresses the particular ways Chinese social engineering upsets an ecosystem that Bilig and his forefathers have maintained for generations, but the filmmakers have taken a one-size-fits-all approach to environmentalist adventure. A universal theme like man-versus-nature still needs support from specifics, but beyond the horrifying spectacle of hurling sacks of wolf cubs to the heavens, Annaud and his co-screenwriters, Alain Godard, Lu Wei and John Collee, don't offer many. They've flattened the story into natives and naïfs against polluters and functionaries, and simplified the torments of a hero caught in between.
When the wolves run free, however, Annaud supplies all the breathtaking panoramas promised by a big international production set loose in the wilds of Inner Mongolia. In IMAX 3-D, you can practically feel the wetness of a wolf's snout as it scans the grasslands, looking for strays in a passing herd or a poorly monitored sheep pen. There are striking images: a previously untouched lake blackened by careless settlers from the east; frozen gazelle carcasses preserved by being wedged into the ground, which serve as a makeshift wolf refrigerator. Wolf Totem itself becomes a pitched battle for supremacy between the breathtaking glories of nature and the grinding banality of man. Here, as ever, nature loses.





http://www.pressreader.com/usa/san-jose-mercury-news-weekend/20150911/282492887477214/TextView

http://www.sanluisobispo.com/2015/09/11/3801495/movie-review-gorgeous-wolf-totem.html

Somewhere between "Planet Earth" and a historical drama lies "Wolf Totem," a sweeping Chinese epic from French director Jean-Jacques Annaud. Taking place in the throes of Communist fervor in 1967 China, the film traces the journey of a young man from Beijing discovering the natural, spiritual mysteries of Inner Mongolia. The lessons that he learns about conservation and wildlife are ones that ring true even today.
Based on the smash hit 2004 novel by Jiang Rong, the story follows Chen Zhen (Feng Shaofeng) and Yang Ke (Shawn Dou), two eager young men from the big city who find themselves in Mongolia, living with a nomadic tribe of sheep herders, a long way from home. But they're surprised to find that this place feels more like home for them, melding quickly into the lifestyle of a shepherd, living in a yurt, galloping their horses along the Technicolor green plains.
After a dangerous experience wandering off the path, Chen Zhen quickly becomes enamored of the packs of wolves with whom the nomads share their land. They have a symbiotic relationship, sharing food, and resources, and the nomads have a deep spiritual respect for the power of the wolves - as they should.
As industrial forces rumble into the land, looking to exploit resources for the greater good of the republic, the delicate balance is upset and all-out war breaks out between the wolves and humans. Complicating matters is Chen Zhen's puppy, Little Wolf, a cub that he secreted away from a den in hopes of raising on his own.
As cultures clash, the mighty wolves have to contend with forces far greater than they are - guns, jeeps and mass destruction. But can the city folk learn to live with the wolves in common understanding and respect?
The greatest aspect of "Wolf Totem" is the gorgeous, sweeping cinematography that captures the landscape in breathtaking aerial shots and crystal clear color. If you spring for the IMAX and 3D experience, it's even more immersive and crisp, though there isn't much in the way of 3D action. There is one jaw-dropping action scene, a blizzard stampede of horses with wolves in hot pursuit that is genuinely awe-inspiring. It's also a chance to experience some of the last work of late, great composer James Horner, who lends his talents to the score, which utilizes a traditional Chinese music.
The story has its touching moments but dissolves into disjointed melodrama in the back half of the film. The attempted eradication of the wolves is so heartbreaking that the explosions, attacks and illness that befall our characters feel over the top in comparison. There is more than enough heartstring-tugging and drama to go around, so the pile-on is unnecessary.
Still, Feng's performance as the young student evolving and growing up in front of our eyes is a compelling one, as well as his relationship with Little Wolf (though it often seems that he needs some training himself). The message contained herein is a powerful one, stressing the idea that the only way to live is to live together. It's a concept we could still stand to ponder.
'WOLF TOTEM'
2.5 stars out of 4
Rated PG-13 for disturbing images and violence involving animals, and for brief sexuality.
Cast: Feng Shaofeng, Shawn Dou, Yin Zhusheng, Ba Sen Zha Bu
Directed by Jean-Jacques Annaud
Running time: 121 minutes





Read more here: http://www.sanluisobispo.com/2015/09/11/3801495/movie-review-gorgeous-wolf-totem.html#storylink=cpy
'via Blog this'

Applied Speech and Audio Processing

http://www.lintech.org/speechbook/index.html


http://www.dspguide.com/


'via Blog this'

Sunday, September 6, 2015

How to Get a Prototype Made: 4 Steps (with Pictures) - wikiHow

How to Get a Prototype Made: 4 Steps (with Pictures) - wikiHow:





Getting a prototype made for your invention idea is a necessary step before proceeding to spend money on its production. Unexpected complications may arise, but you may not know these problems even exist unless you first construct a prototype. Luckily, you don't have to make a prototype yourself, as there are plenty of prototype companies, machine shops, and other places that can build a prototype in a short amount of time. Learn how to get a prototype made rather quickly by following a few key steps.

Steps

  1. Get a Prototype Made Step 1.jpg
    1
    Complete a conceptual sketch of your invention, and then complete a more detailed drawing. These can be drawings you do yourself with a pencil and paper or you can hire someone to draw your invention based on your detailed description. After you have a drawing that shows your idea in great detail, have a professional computer-aided design (CAD) drawing made. A CAD drawing is what you will want to show to the prototype maker.
  2. Get a Prototype Made Step 2.jpg
    2
    Find a place that will create a prototype based on your specifications and CAD drawing. If your invention is made of metal, a machine shop will be able to make your prototype. If it is made of plastic, it can be machined or rapid-molded or you can seek out a service called rapid prototyping. Rapid prototyping can get your item made in only a few days, but is may not be an exact replica of what you will be selling. Engineering firms can also construct prototypes.
    • Get a prototype made that is constructed of the same materials you intend the final product to be made of. This will be the true test of whether your invention will be functional or not because you will be able to see and touch its actual parts. Obtaining a real, functional prototype is the fastest and sometimes the only way to sell your invention to buyers.
  3. Get a Prototype Made Step 3.jpg
    3
    Have your prototype remade until it is flawless in structure and function. You might get it right on the first try, but most of the time you won't. Chances are, you will need to get more than 1 prototype constructed and make slight changes after you encounter problems.
  4. Get a Prototype Made Step 4.jpg
    4
    Get your working prototype mass-produced, and present your idea to potential buyers. Now that you know everything works and there aren't any problems, you are ready to sell your product.

Wednesday, September 2, 2015

ZT 回国还是留美,先想清楚你是哪类人(深度好文)

source:

http://bbs.wenxuecity.com/backhome/1180699.html



回不回国发展?对于很多人来说,从准备留学到已经读博毕业后,都一致在天平的两端来回掂量。事实上这从来就不是一个简单的答案。曾在美国求学、教学并从事科研工作近20年,后来回国定居的清华大学教授鲁白,就这个问题给出了一个非常高屋建瓴而又富有实操指导意义的分析,希望每一位留学的朋友都能从中获益。



先讲一个小故事。我刚来美国的时候,有一件事情,给我印象深刻,影响深远。加州大学伯克利分校的校长田长霖来纽约,在亚洲协会作了一个演讲,非常精彩。概括起来,他给中国留学生说了两句话,第一句话是,be an American。就是学做一个美国人。这其实是不太容易的。



大多数的中国留学生,在美国吃的是中国饭,看中国报纸,有人还看中国电视,现在是读中文网站。他们的朋友99%是中国人。那你为什么还要来美国?比如在纽约的马路上有很多报亭,有各种各样的杂志,有时尚的,运动的,旅游的,新闻的,等等。拿起一本People杂志,要是你能把它从头到尾读一遍,都能读懂了解,那你就接近美国人了。既然你已经到了这个国家,就要好好学习这个国家的文化,包括他的经济,政治,历史新闻,文化艺术,以及社会的各个方面。



但是,假如你来美国仅仅只是将自己变成一个彻头彻尾的American的话,那你就是一个banana(香蕉),里面是白的,外面还是黄的,很可悲。我就遇到过这样一个人,复旦来的。你跟他讲中文,他回答英文,你再问一句,他还是回你英文。他经常去酒吧,讲起棒球美式足球比美国人还厉害,有一个美国女朋友。这就是一位典型的banana。所以光深入了解美国还不够,还要第二句话, 那就是be a Chinese。任何时候,不要忘了自己的中国文化。我们要对中国本身的文化有深刻的理解。他问你们中间有多少人,读过论语,唐诗?你们以后回国,或者是在美国留下了,最后的价值,是因为你们是中国人而体现出来。



多年以来,我越来越体会田教授这两句话的wisdom。在美国的华裔,一般有三个生活圈子。第一是工作单位的圈子,你所在的那所大学,研究所,公司。你的生活大部分时间是在这里度过的。第二是专业的圈子,比如学术社团,学会等。这对你的事业发展很重要,因为你的同行,老师,学生,竞争对手都在那儿。第三个是社交圈子,朋友圈,俱乐部,公益社团,教会,等等。对中国留学人员来说这个圈子绝大多数是中国人,很多在国内。成功的华人往往能够进入这三个圈子的中心,即有影响力的内环(inner circle)。



怎样进入内环呢?我发现很多华人包括我本人被邀请进入美国一些主流社会的inner circle,不是或不仅仅是因为science做得好,而是因为我是中国人,我想问题的方式跟别人不一样,我对中国的了解比他们深。现在越来越是这样。You bring in different perspectives。所以今天在座的,不管你是选择去还是留,都要记住这句话:be an American, be a Chinese。



第二个要准备的东西叫做learning agility。一般我们看一个人有没有培养前途,或者公司在要promote一个人的时候,首先就是看这个。在专业评估一个人的发展潜能的时候,有一个工具叫做九宫格(9-box)。画一个3x3=9的格子,左下方是1,右上方是9。横坐标是绩效,你的performance,你做的好坏,你发了多少paper啊,做出了什么成绩啊。纵坐标是发展潜能,即potential。公司往往定期做评估,把所有的人分成九块,最好的是box9, 这种人performance也好,potential也好,一定要照顾好,因为他们很容易被别人挖角,跳槽。



相反,另一种人是performance也不好,不求上进,也没有potential,这种人在公司是不能久留的。大家会问,performance可以衡量,potential怎么衡量,怎么衡量一个人以后可以成为一个杰出的科学家,或一个好的领导?衡量一个人潜能,就是用learning agility,即应变力。我们又可以把它分成四个部分,第一个是mental agility。Comfortable with complexity, 就是事情变化的时候,看不太清楚的时候,我不是那么紧张,没有那么焦虑。很淡定。



第二个就是people agility。意思是情商高,善于表达沟通,很会和人打交道。



第三个是change agility。情况变化的时候你要适应,所谓的骤然临之而不慌,无故加之而不怒。最后一个叫做result agility。在困难的情况下找出办法解决问题。



回国心理上要准备的,也许可以听听已经回国的人中的优秀者。在今年求是基金会的颁奖仪式上,我主持过一个讨论会pattern discussion,参加的有施一公,贺福初,邓宏魁,就是今年很红的做stem cell的北大教授。还有王晓东,饶毅,曹雪涛等人。我们讨论两个问题,一个是海归被批评最多的一个题目,就是不懂中国国情。饶毅被批评,施一公也被批评,王晓东,everybody。总有一个说法是,你不懂中国国情。另外一个是科研环境的多样化。现在中国足够大,北大做的事情,清华不一定要这样做。反之亦然,清华做的事情,北大不一定要这样做。应该容忍大家去做各种各样的实验,各种探索。施一公说,你可以不适应中国国情,但你一定要keep your own identity. Otherwise why bring youback? 饶毅说不良的国情坚决不能,也不能容忍去适应。邓宏魁说的比较生动。他说,你看中国应该怎么看,假如你把中国看成一幅画,那这幅画丑的很,这个地方污染,那个地方交通堵塞,又是腐败,又不讲民主。但是你把中国看成一个movie,这个三十年的movie非常精彩,因为她在发展,发展的非常快,而且是朝着好的发展。这句话太精彩了。



再说几句比较哲学化的话,就是回国与否,还要看你怎么看待生活本身。林肯曾经说,In the end it's not the years in your life that count. It's the life in your years.” 生命的意义,不在于你的人生又多少年,而在于你每一年中又多少人生。林肯没有活到五十几岁吧,短短的人生,有多精彩呀。还有一句话是Johns Hopkins大学校长在一次毕业演讲里说的.Ask yourself, not what I will do, but what I will become。就是说,不要问你要做什么事情,而要问你要成为什么样的人。另外一个很有智慧的人,叫Booker Washington。他是一个黑人,也许没有马丁路德金那么有名,但也是一个黑人领袖。他说,Success is to be measured not so much by the position that one has reached in life as by the obstacles which he has overcome.



这句话我可以用一个例子来说明。



我记得有一次去普林斯顿,校长Shirley Tighman被一群中国家长围着问,录取到普林斯顿高考SAT要多少分。她说我们没有严格的分数线,2000分我们可以录取,满分2400分我们可以不录取。“难道没有一个标准吗?”她说,从A到B,不同的人所花的努力是不一样的。假如说你来自一个富足的家庭,你的父亲是教授,母亲是律师,你从小在私立学校上学,这种学生,拿了2400分, 我不觉得有什么了不起。但如果说你是一个黑人单亲妈妈的女儿,每周花20个小时在超市打工,你能够拿到2000分,那就不同了。你要克服多少困难,才能从A到B? 你的成就是很大的,而且你的人生更精彩, 因为你克服了很多 obstacles,你有比别人更丰富的经历。



近来大家讨论很多的是幸福指数。中央电视台主持白岩松,写了一本书叫《你幸福了么》,非常红。我还看过一本书,将今天满意作横坐标,未来满意作纵坐标,把生活分成四个方块。我们的理想是今天过得精彩,未来远景辉煌。这是右上角块。如果今天也不满意,将来也不满意,是左下角块。那是loser,或者是抑郁症患者。还有一部分人是活在当下,在右下角。今朝有酒今朝醉,我才不管明天怎么样。很多吸毒者是这样的。最有趣的左上角,为了将来,牺牲今天的幸福。你看我们很多中国同胞每天都是unhappy,每天都在想,想将来怎么样,要赚钱,要升官,要有成就。



你看中国的小孩子,父母整天逼着他学习,今天学这个,明天学那个。说是为了将来的幸福。还美其名曰“吃得苦中苦,方为人上人”。你整天miserable,将来会happy吗?我认识的这类“好学生”,有很多是长大也不开心的。总是想着他还没有的东西。总是在奋斗。多么不幸啊!我们科学家里面也有很大一部分是这种人。刚发表一篇好文章,马上想着下一篇。Always think about next grant, next paper。他真的不知道如何欣赏生活,享受生活。打个比方,这种人就像不太会游泳的人,在深水里,就拼命地游啊游,好不容易抬起头吸了一口气,又埋头拼命地游。一年一年过去了,你到底游到了那儿呢?



鲁迅的小说“过客”中,赶路者被告知,前面是坟墓!有一句名言,叫做“wherever you are,be there”,就是无论你在哪儿,好好地享受那儿的风景吧。追求的过程给你带来的快乐,往往比成功多。人生是过客,对生活中的美,去深深地体验吧。精彩today,精彩tomorrow。



什么样的人适合回国



大概有两类人,是最需要也最应该回国的。



一类是entrepreneur,创业者。为什么呢?一是中国发展快。跟着一个发展快的国家走,你的事业也比较容易发展的快。就拿生物医药行业来说,十年前李葛创业耀明康德,今天发展到如此辉煌,他在美国是不会有如此成就的。二是中国各级政府现在对创业的支持也多。美国是世界上对创业最好的国家,现在创业的门槛也很高了。VC的钱特别难拿。第三也是最重要的,中国现在机会多。与美国比中国还很落后,这就带来了机会。但是不是所有人都适合创业的。事实上,适合创业的只是很少数。哈佛很不错,出了Bill Gates, Mark Zuckerberg。可惜在中国从北大清华走出来的成功的创业者不多。不知道你们这批来哈佛MIT留学的中国学人中,有多少是愿意和能够创业的。





创业者,像马云马化腾那样的,有一些基本共性。首先,他们都是敢于冒险的人,所谓的risk-takers。他们对于事业都有极大的热忱,passionate,enthusiastic。他们往往有显著的个性特色,不惧怕有别于他人。勇于创新,善于发扬自己独特的一面。Innovative,differentiation。 还有,他们往往有比较长远的目光,不会只盯着眼前的利益。有vision 有long term plan。还有两条,一是他们比较善于交流沟通,说服他人。good communicational skill。二是他们往往是mission-oriented,善于将一些想法付诸实现。



第二类最适合回国的人是leaders,是像施一公,饶毅,王晓东那样的领袖人物。也有一些年轻人,是future leaders。 他们有雄心,有胆略,有远见,也善于将理想转化成切实可行的行动。他们的作为往往引领潮流,具有典范的作用。



什么样的人不适合回国



如果你认为你属于这种范畴,那么最好还是留下来准备为美国做贡献。





第一种叫做conformist。他们try to please everybody。尽量不出格,将自己放在bell curve的最中间的那种人。中国有一些不好的风气。这种人是别人喝酒,我也学着喝。别人抽烟,我也去敬烟。总之是努力学习现在中国的一切。那还要你回去干嘛?



第二种人叫fast adapter。他们很快就适应了中国的一切,包括一些套话,和一些上不了台面的事。对一些不良习惯和作风,不仅不抵制,反而有过之无不及。我看见过这种人,很可怕。我觉得这种人对中国的发展也许很危险。



第三种人是opportunist,机会主义者,他们想,机会来了,我赶快去捞一把。他们想的是一种quickwin,最后往往失望。



第四种是calculator。他们考虑过多的个人利益得失,总是算来算去,眼睛总是盯着将要失去的东西,最后也许把机会也算掉了。最后一种是risk-averse people。他们太胆小怕事,经不起生活的波浪。回国是创业,生活肯定是起伏多变的。胆子太小的人不适合。



对于正在考虑回国的人的一些忠告



首先,不要太看重眼前的经济利益损失。一般来说,从美国回去,工资收入会打一个大折扣。尤其是对比较资深的教授,回国后的工资可能比美国少很多。但你其他机会比美国多了呀。还有,Dollar对人民币,不可以简单地以汇率来比的。有的东西中国很便宜,比如人工。你打一个的,要一个钟点工,不晓得要比美国便宜多少。当然,有些东西又比美国贵很多,比如房子。大多数海归在国内的相对经济地位,要比同类人在美国的经济地位高很多。事实上,许多回国后的海归,实际的经济收入和生活品质都不比在美国差,甚至还有所提高。





第二,不要与你今天已经有的比。我昨天遇到一位postdoc,说他在麻省有一栋2000平方英尺的房子。我说你千万别想在北京有这样的房子。你在美国一流大学能拿到独立的教授位子吗?你有多大把握在今后几年能竞争到NIH的研究经费?



第三,不要老是聚焦于今天。要想着发展。你现在在美国的情况也许是比在中国的要好。但中国的发展速度是美国的5-8倍。5年后,10年后的情况,你能想象吗?最后,不要以为中国是你的家乡,回国是件容易事。 回国是你人生的一个巨大挑战,比你出国的挑战要大的多。



回国,不管是第一还是第二类,都是创业。这里,我用Facebook创始人Mark Zuckerberg有关创业者成功的六大要素与大家共勉:



1)野心:任何成功人士的基石是野心或是对个人成就的渴望;如果你连想成功的愿望都没有,那怎么能成功呢?



2)远见:个人魅力取决于他的远见,并说服其他人认同你的远见;描绘一幅与大家都有关的动人愿景,对自己对他人都很重要。



3)执行力:保持专注,不断实现;有了好的愿景,还需要切实有效的执行。要有明确的目标,可衡量的结果,时间表。



4)决心:决心、驱动力、韧性或毅力是其展现的最大变量



5)运气:创造你自己的运气;运气也是可以创造的。



6)时机:一路“管理着时钟” 当时机来时,你准备好了吗?



最后,什么时候回国比较合适



有些人读完博士或博士后马上就回去了。这些人往往在国内有一些connection,出国前的单位,领导,对他特别支持;或者是最近有一个机会,有一个什么位子正好出来了。现在国内的很多成功人士,当年就是这样回国的。还有一些是因为家庭原因,学成必须马上回国。





第二类是工作一段时间再回国。这样可以给你一定的时间,来积累经验,并在美国的主流社会建立一定的关系。同时,经常去中国看看谈谈,寻找机会。有些机会是你自己可以创造的。现在的情况与过去相比有很大不同。随着中国科学技术的快速发展,我比较赞成年轻人想回国还是早点回,这样在美国在这个两方面的阈值都比较低一些,个人发展空间大,对中国的贡献也大。



第三类是成功以后回国,我们必须认识到这类人回国的难度,有各种各样的困难,需要下很大的决心。最大是问题是孩子。小孩教育往往是中国家长特别关心的问题。这个时候在美国出生的孩子已经非常美国化了,美国和中国的教育差别极大。上了小学后就很难适应中国的教育。其次是难以克服成功人士的舒适感。自己在美国已经很顺,一切都驾轻就熟。有必要回中国去一切重新开始吗?



另外,也有对中国生活和工作会有心理上的恐惧感,很多事都要从新开始,他会问自己这样值得吗? 我个人所特别respect的人,是勇于告别自己过去的成功,永远追求新生活的人。有些人,看到国内一些学术上专业上还不如自己的人都有了很高的地位或荣誉,会不容易摆正自己的位置,调整自己的心理。正因为有退路,就没有很强的前进动力。我还听有人说,我刚renew了我的NIH基金。等以后有困难再说吧。其实,当你在美国都不够competitive的时候,中国对你的兴趣也不会那么大了。



还有就是在建立关系上有困难。到了一定的年龄以后,人与之间比较难以建立信任。最后,越是资深,相应的机会也会越来越少。而人往往会要求得到比自己能力更高的位子,资源,条件。满足不了就下不了回国的决心。不过就我看来,恰恰是这批人更应该多考虑回国的机会。中国现在更缺乏有国际视野的领军人物。而在国际上有影响的人,对中国的帮助也大。除了舞台大,事业上可能有更好的发展之外,我还想再加一条事实,我所认识的大多数回国的人,都比留在美国的同类人过着更精彩更有趣的生活。