Blog Archive

Friday, December 2, 2016

如果我离开,我就无法抱你;如果我留下,我就无法抚养你

https://www.quora.com/Is-China-very-poor

If I go away, I cannot embrace you. If I don't, I cannot raise you









Thursday, December 1, 2016

Linux Commando: Using sed to extract lines in a text file

Using sed to extract lines in a text file
If you write bash scripts a lot, you are bound to run into a situation where you want to extract some lines from a file. Yesterday, I needed to extract the first line of a file, say named somefile.txt.
$ cat somefile.txt
Line 1
Line 2
Line 3
Line 4


This specific task can be easily done with this:
$ head -1 somefile.txt
Line 1


For a more complicated task, like extract the second to third lines of a file. head is inadequate.

So, let's try extracting lines using sed: the stream editor.

My first attempt uses the p sed command (for print):
$ sed 1p somefile.txt
Line 1
Line 1
Line 2
Line 3
Line 4


Note that it prints the whole file, with the first line printed twice. Why? The default output behavior is to print every line of the input file stream. The explicit 1p command just tells it to print the first line .... again.

To fix it, you need to suppress the default output (using -n), making explicit prints the only way to print to default output.
$ sed -n 1p somefile.txt
Line 1


Alternatively, you can tell sed to delete all but the first line.

$ sed '1!d' somefile.txt
Line 1


'1!d' means if a line is not(!) the first line, delete.

Note that the single quotes are necessary. Otherwise, the !d will bring back the last command you executed that starts with the letter d.


To extract a range of lines, say lines 2 to 4, you can execute either of the following:
$ sed -n 2,4p somefile.txt
$ sed '2,4!d' somefile.txt
Note that the comma specifies a range (from the line before the comma to the line after). What if the lines you want to extract are not in sequence, say lines 1 to 2, and line 4?
$ sed -n -e 1,2p -e 4p somefile.txt
Line 1
Line 2
Line 4
If you know some different ways to extract lines in a file, please share with us by filling out a comment. P.S. Related articles from this blog:
Use sed or perl to extract every nth line in a text file.
Use awk to extract lines.
Extract columns and fields from text files.
Useful sed tricks to customize configuration files.

Sunday, October 30, 2016

Nuance Acquires Agnitio




Nuance Communications has acquired long-time Voice Biometrics specialist Agnitio, making the Spanish company’s personnel, intellectual property and global customer base part of the Security Group of the Nuance Enterprise Division. The move marks another milestone in the metamorphosis of voice  from a discrete biometric factor for caller verification into a flexible component in a family of technologies that support fraud prevention and simple, secure, conversational commerce.
For Agnitio, it represents the second shoe to drop after it sold its line of embedded voice authentication technologies to Cirrus Logic in September 2015. At that time the company focused on refining its server-based solutions with special attention to government segments that grow out of forensic applications as well as fraud prevention. Its core technologies will complement Nuance Enterprise’s offerings that integrate voice-based authentication with its branded virtual assistant, Nina, on IVRs, Web sites and mobile applications.
Nuance expects to see immediate benefits from ‘acquihiring’ Agnitio’s R&D and product development personnel, as well as sales resources that have strengths in Spanish-speaking countries. Broadening the combined presence in government markets and citizens’ services will also be a benefit.
During its tenure as an independent company, Agnitio focused primarily on establishing OEM relationships and indirect sales. It has been integrated into fraud detection and prevention products from the likes of Verint and Pindrop Security. It is in these domains that Nuance will find immediate expansion of its technology footprint.

Wednesday, October 26, 2016

Why Netflix Never Implemented The Algorithm That Won The Netflix $1 Million Challenge | Techdirt

Why Netflix Never Implemented The Algorithm That Won The Netflix $1 Million Challenge | Techdirt:

from the times-change dept

You probably recall all the excitement that went around when a group finally won the big Netflix $1 million prize in 2009, improving Netflix's recommendation algorithm by 10%. But what you might not know, is that Netflix never implemented that solution itself. Netflix recently put up a blog post discussing some of the details of its recommendation system, which (as an aside) explains why the winning entry never was used. First, they note that they did make use of an earlier bit of code that came out of the contest:
A year into the competition, the Korbell team won the first Progress Prize with an 8.43% improvement. They reported more than 2000 hours of work in order to come up with the final combination of 107 algorithms that gave them this prize. And, they gave us the source code. We looked at the two underlying algorithms with the best performance in the ensemble: Matrix Factorization (which the community generally called SVD, Singular Value Decomposition) and Restricted Boltzmann Machines (RBM). SVD by itself provided a 0.8914 RMSE (root mean squared error), while RBM alone provided a competitive but slightly worse 0.8990 RMSE. A linear blend of these two reduced the error to 0.88. To put these algorithms to use, we had to work to overcome some limitations, for instance that they were built to handle 100 million ratings, instead of the more than 5 billion that we have, and that they were not built to adapt as members added more ratings. But once we overcame those challenges, we put the two algorithms into production, where they are still used as part of our recommendation engine.
Neat. But the winning prize? Eh... just not worth it:
We evaluated some of the new methods offline but the additional accuracy gains that we measured did not seem to justify the engineering effort needed to bring them into a production environment.
It wasn't just that the improvement was marginal, but that Netflix's business had shifted and the way customers used its product, and the kinds of recommendations the company had done, had shifted too. Suddenly, the prize winning solution just wasn't that useful -- in part because many people were streaming videos rather than renting DVDs -- and it turns out that the recommendation for streaming videos is different than for rental viewing a few days later.
One of the reasons our focus in the recommendation algorithms has changed is because Netflix as a whole has changed dramatically in the last few years. Netflix launched an instant streaming service in 2007, one year after the Netflix Prize began. Streaming has not only changed the way our members interact with the service, but also the type of data available to use in our algorithms. For DVDs our goal is to help people fill their queue with titles to receive in the mail over the coming days and weeks; selection is distant in time from viewing, people select carefully because exchanging a DVD for another takes more than a day, and we get no feedback during viewing. For streaming members are looking for something great to watch right now; they can sample a few videos before settling on one, they can consume several in one session, and we can observe viewing statistics such as whether a video was watched fully or only partially.
The viewing data obviously makes a huge difference, but I also find it interesting that there's a clear distinction in the kinds of recommendations people that work if people are going to "watch now" vs. "watch in the future." I think this is an issue that Netflix probably has faced on the DVD side for years: when people rent a movie that won't arrive for a few days, they're making a bet on what they want at some future point. And, people tend to have a more... optimistic viewpoint of their future selves. That is, they may be willing to rent, say, an "artsy" movie that won't show up for a few days, feeling that they'll be in the mood to watch it a few days (weeks?) in the future, knowing they're not in the mood immediately. But when the choice is immediate, they deal with their present selves, and that choice can be quite different. It would be great if Netflix revealed a bit more about those differences, but it is already interesting to see that the shift from delayed gratification to instant gratification clearly makes a difference in the kinds of recommendations that work for people.


'via Blog this'

Friday, October 14, 2016

sox cannot play files with a-law encoding

sox cannot play files with a-law encoding - Stack Overflow:



Question:

sox cannot play files with a-law encoding



I am in linux mint 14 and trying to play a .sph file using sox with play foo.sph and got the following error: play FAIL formats: can't open input file 'foo.sph': sph: unsupported coding 'alaw'



Doesn't sox support alaw encoding? What can I do to play this file? Note that it can successfully play ulaw. Thanks!



Solution:

Here is the relevant SoX source code (from sox-14.4.2/src/sphere.c, starting at line 79):
(the source code can be downloaded from: https://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2.tar.gz/download)
if (!strcasecmp(fldsval, "ulaw") || !strcasecmp(fldsval, "mu-law"))
  encoding = SOX_ENCODING_ULAW;
else if (!strcasecmp(fldsval, "pcm"))
  encoding = SOX_ENCODING_SIGN2;
else {
  lsx_fail_errno(ft, SOX_EFMT, "sph: unsupported coding `%s'", fldsval);
  /* ... */
}
As you can see, the format handler only knows about µ-law and PCM encodings, nothing else. As you say, SoX does have decoding routines for A-law; therefore, it would suffice to add these lines:
else if (!strcasecmp(fldsval, "alaw"))
  encoding = SOX_ENCODING_ALAW;
Obviously, this is only going to help you if you can compile SoX yourself from source with this addition.

A probably simpler way is to use the libsndfile driver, which is supposed to support A-law encoding in Sphere files: play -t sndfile foo.sph


Reference:

http://stackoverflow.com/questions/18169817/sox-cannot-play-files-with-a-law-encoding

'via Blog this'

Saturday, October 8, 2016

国内关于湾区马公,马母收入的传闻 - Chats&&华人闲话 - Chinese In North America(北美华人e网) 北美华人e网|海外华人网上家园 - Powered by Huaren.us

国内关于湾区马公,马母收入的传闻 - Chats&&华人闲话 - Chinese In North America(北美华人e网) 北美华人e网|海外华人网上家园 - Powered by Huaren.us:



http://forums.huaren.us/showtopic.aspx?topicid=2074519



国内关于湾区马公,马母收入的传闻


相信很多人都有同学/亲戚/朋友在美国湾区的互联网公司做码农,而这些人的薪资水平总是众说纷纭,令人眼花缭乱,比如为什么看到新闻上说,谷歌的软件工程师年薪才十二三万美元, Glassdoor上的平均数也是如此,但是另一方面,网上却经常有人提到google的码农年入几十万美元呢? 此外,一种流传很广的说法是,湾区的贫困线是三十万美元,这又是怎么回事?还有,水木上经常有人问自己应该去湾区发展还是留在国内,收入总是排在第一位的考虑因素。海外学人版也出现过湾区的码农上来哭穷,罗列了一番各项开支,最后说每月剩不了几个钱。这一切,不但让身在国内的朋友们难以摸到头绪,就连美国非湾区的华人也经常探不清虚实。本帖的目的,就是要就湾区码农的收入问题给出一个清晰的答案 (我强调清晰,是因为看到很多类似问题的讨论中,经常有人引入了过多的信息而不作结论,把人越搞越糊涂),尤其是大家最关心的实质:湾区码农的收入跟国内比算什么档次? 
  
首先,湾区互联网公司的码农,收入到底是十几万,还是几十万? 
科技新闻里经常提到google的码农年薪十二三万,还有glassdoor的平均统计数也是这个数字,这说的是平均税前底薪。但是码农的收入并不只有底薪,网上华人交流收入信息的时候,基本上都是说的一年的税前总收入,这其中包括了三大部分:底薪,奖金,股票。其中奖金有每年的奖金,也有入职时一次性或分期发放的入职奖金。股票包括入职时给的分四年发放的部分,也有每年看绩效新发放的部分(从绩效评定当年开始分若干年发放)。总的来说,大部分硕士和博士出身的湾区互联网公司码农,在工作第四年时,税前年收入达到20万至35万,是比较普遍的水平(这里不包括为数不多的大牛,对于这种人,湾区大公司总是舍得砸钱的)。在过完前四年后,大部分人年收入会有一个下降,这是因为入职时给的大批股票已经发完,而每年根据绩效增发的股票又没有入职时那么多。当然,股票给收入带来了一定的不确定性。比如Facebook, 2013年的时候股价曾经是20多,那个时候给的入职新人发的股票部分当时价值十五六万美元,分四年发放。但到了今年(2016),facebook的股价已经到了120,甚至还没有停止上涨的迹象,如果当时入职的员工一直没有卖他手里的股票,那么到现在已经价值八九十万美元,平均到四年里,仅这部分就带来每年20多万的年收入。当然,这只是一个比较例外的情况。普通的正常情况,就是我刚才说的,20万到35万美元之间。 
  
其次,湾区的贫困线30万美元是骇人听闻吗? 
首先,这个贫困线指的是税前家庭总收入,而不是个人收入。其次,要了解这个贫困线的产生环境是在湾区的码农之中。如果你把这个贫困线放到湾区所有人口中来看,显然是不合理的,因为湾区还是有不少低收入人群的。但如果你考虑到华人码农的收入,夫妻两口子年总收入达到30万美元可以说不费吹灰之力,工作两年之后两个人光底薪加起来就30万了,更别说还有股票和奖金。所以,我认为,简单说湾区的贫困线30万美元是不合实际的,但说湾区年收入30万美元的华人码农家庭是处在一个较低收入水平线上,是没什么太大的问题的。 
  
最后,湾区码农的收入怎么换算成国内的水平? 
因为美国和国内的个人收入税制度非常不同,要回答这个问题,我认为还是比较税后收入更合理些。以下我分四种情况计算湾区码农的税后收入。请注意,我在计算时都没有考虑401k,也就是自己给自己存的退休金。(我认为考虑401k除了让情况变的复杂,没有太大影响,毕竟这部分钱的税现在不交以后还是要交。有些人经常自己存了很多401k然后发帖子哭穷说每个月不剩钱。这种论调简直无聊至极,毕竟是你自己选择了要存那么多钱进401k,而且那还是你自己的钱,结果说自己没钱花了你这不是耍流氓吗?)另外,对于公司发的股票和奖金,美国都是把它们和你的底薪加在一起收税,税率并无特别。 
  (1)单身,税前收入20万美元(包括奖金,股票,下同) 
     联邦税49606, 州税16077, 社保税7049, 医保税2900, 医保 + SDI 4000 
     剩120368 
     湾区大多数地方消费税在9.25%-10%之间,按9.5%算(以下同), 也就是说湾区人的1万美元去买东西只能当10000/(1+9.5%)=9132块来花 
     所以税后收入等效于109925美元 
  (2)单身,税前收入30万美元 
      联邦税82606,州税25744,社保税7049, 医保税5250,医保 + SDI 4000 
      剩175351, 175351 x 1/(1+9.5%) = 160130 
      此情况下税后收入约等效于160130美元 
  (3)夫妻,税前收入30万美元 
      联邦税74529,州税22853,社保税14098(假设两人都工作),医保税5250, 医保 + SDI 5000  
      剩178270, 178270 x 1/(1+9.5%) = 162796美元 
      此情况下税后收入约等效于162796美元 
  (4)夫妻,税前收入40万美元 
      联邦税107529,州税32153,社保税14098(假设两人都工作),医保税7600, 医保 + SDI 5000 
      剩233620, 233620 x 1/(1+9.5%)= 213341美元 
      此情况下税后收入约等效于213341美元 
  
但是以上收入要拿来和北京码农税后收入比较还有一个问题,就是住房消费有很大差别。差别主要体现在: 
一: 租房的情况下,湾区成本比较高,一室的公寓,现在月租均价在2600美元左右,两室的公寓,月租均价在3300美元左右,因此单身码农即使和别人合租公寓,每月的房租支出包括水电车位不会少于1700美元,而在北京,即使两室精装公寓月租也就是在1000到1500美元,这样两个人合租每人只需付月租500到750美元还包水电。 
二: 买房的情况下,湾区码农需要每年支付地产税,注意是每年!这是国内买房没有的一项大支出。湾区各地的地产税大概在房价的1.15% - 1.25%之间,这里取1.2%,房价按照目前的情况,华人购置的房产均价也差不多有1百万美元,这样每年的地产税就要交付12000美元。 
根据以上两点,我们再假设单身码农租住公寓,夫妻自购住房(这其实也符合大部分湾区码农的实际情况),对以上四种情况作休正: 
  
(1)单身税前收入20万美元,税后有效收入扣除全年房租支出20400美元,余89525美元 
(2)单身税前收入30万美元,税后有效收入扣除全年房租支出20400美元,余139730美元 
(3)夫妻税前收入30万美元,税后有效收入扣除全年地产税支出12000美元,余150796美元 
(4)夫妻税前收入40万美元,税后有效收入扣除全年地产税支出12000美元,余201341美元 
  
以上数据大家就可以拿来和自己的收入做比较了,当然你应该用自己扣除四险一金的税后收入(包括公司发的奖金和股票),而如果你是在租房,也应该扣除全年的租房支出(如果你是自购房,那就不用扣除房贷了,因为湾区的数字我也没有扣除房贷)后再和(1)(2)这两种情况进行比较。此外,国内的朋友们应将住房公积金也加到自己的收入中去。 
以上之所以只就住房支出而不是其他消费支出对收入做修正,是因为该项支出基本上人人都有而且占比例大,除此之外的其他项支出影响就不是那么大了。但我将湾区有关孩子的一些消费罗列如下,有兴趣的人可自行参考或据此进一步修正上述数据: 
月嫂 26天 4000美元 
保姆 每周工作5天 每月2500美元 
托儿所(Daycare)每月1200-2100美元 
幼儿园(Preschool)每月1000-1300美元 
  



'via Blog this'

Sunday, October 2, 2016

How to restart / resubmit the SGE job in Eqw status

[Rocks-Discuss] job in error state will not restart:



   1146 0.55500 SomeTask user        Eqw  10/02/2016 19:24:09                                    1 2,17

qmod -cj jobnumber

For example,

qmod -cj 1146.2

qmod -cj 1146.17


If you want to resubmit a job in 'r' status, you can use:

qmod -rj jobnumber





Reference:

1) Usage and qmod (type qmod in terminal will display the following)

qmod
SGE 8.1.8
usage: qmod [options]
   [-c job_wc_queue_list]  clear error state
   [-cj job_list]          clear job error state
   [-cq wc_queue_list]     clear queue error state
   [-d wc_queue_list]      disable
   [-e wc_queue_list]      enable
   [-f]                    force action
   [-help]                 print this help
   [-r job_wc_queue_list]  reschedule jobs (running in queue)
   [-rj job_list]          reschedule jobs
   [-rq wc_queue_list]     reschedule all jobs in a queue
   [-s job_wc_queue_list]  suspend
   [-sj job_list]          suspend jobs
   [-sq wc_queue_list]     suspend queues
   [-us job_wc_queue_list] unsuspend
   [-usj job_list]         unsuspend jobs
   [-usq wc_queue_list]    unsuspend queues

job_wc_queue_list          {job_tasks|wc_queue}[{','|' '}{job_tasks|wc_queue}[{','|' '}...]]
job_list                   {job_tasks}[{','|' '}job_tasks[{','|' '}...]]
job_tasks                  {{job_id'.'task_id_range}|job_name|pattern}[' -t 'task_id_range]
task_id_range              task_id['-'task_id[':'step]]
wc_cqueue                  wildcard expression matching a cluster queue
wc_host                    wildcard expression matching a host
wc_hostgroup               wildcard expression matching a hostgroup
wc_qinstance               wc_cqueue@wc_host
wc_qdomain                 wc_cqueue@wc_hostgroup
wc_queue                   wc_cqueue|wc_qdomain|wc_qinstance
wc_queue_list              wc_queue[','wc_queue[','...]]


2)
https://lists.sdsc.edu/pipermail/npaci-rocks-discussion/2006-December/022877.html


关于Audacity语音标注软件的使用

[关于Audacity语音标注软件的使用]
Part 1: How to manually label an audio file

1)下载Audacity 软件并安装:    http://www.audacityteam.org/download 
2)打开软件:导入语音demo.wav(可以在左边框选用"Waveform" 或"Spectrogrm"展示语音)
3)依次点击:  Tracks --> Add New --> Label Track
4)在语音区域,按住鼠标左键拖选择一个区域,然后同时按下ctrl + B
在Label Track 区域会出现一个“填空题”,把你的标签(speech)添在上面,
5)重复4)直到听到语音结束
6)依次点击  Tracks --> Edit Labels -- > Export   存为:demo.txt

Part 2: how to prepare and import label file for audio with Audacity

Step 1: ensure your label file is in correct format:

segment_startTime_inSecond    segment_endTime_inSecond    label
Must use TAB not space as separator. 

For example:
Audacity_label.txt
29.473812    49.066307    text1
57.213861    96.885166    text2
Note:   column1 and column2 indicates starting and ending time in second, respectively
save the label file as txt

Step 2: Import:
File->Import->Label

For more, please refer [1]

Reference:
[1] http://manual.audacityteam.org/o/man/label_tracks.html






Tuesday, September 27, 2016

Monday, September 26, 2016

unix - Transpose a file in bash - Stack Overflow

http://stackoverflow.com/questions/1729824/transpose-a-file-in-bash



python -c "import sys; print('\n'.join(' '.join(c) for c in zip(*(l.split() for l in sys.stdin.readlines() if l.strip()))))" < input > output





A Python solution:
python -c "import sys; print('\n'.join(' '.join(c) for c in zip(*(l.split() for l in sys.stdin.readlines() if l.strip()))))" < input > output
The above is based on the following:
import sys

for c in zip(*(l.split() for l in sys.stdin.readlines() if l.strip())):
    print(' '.join(c))
This code does assume that every line has the same number of columns (no padding is performed).
'via Blog this'

Perl one-liners - bl.ocks.org

Perl one-liners - bl.ocks.org: "Perl one-liners"



Insert line numbers in a file:

perl -i -ne 'printf "%04d %s", $., $_'

'via Blog this'

Tuesday, August 23, 2016

华人在海外: 绿卡基础知识:AP和EAD对F/H 身份的影响

华人在海外: 绿卡基础知识:AP和EAD对F/H 身份的影响: "使用 AP/EAD 对学生签证 F 的影响

对于 F (还有B, J, TN 等)的非移民身份,一旦提交了 I-485,那就真是进了移民监。此话怎讲?不能轻易出境了。
一旦出了境,如果不是身揣 AP,那十是八九是不太可能依原签证类型回来了。紧跟着的,是 I-485 也就废了。
不想这样的,请一定要先申请 AP,并且是在 AP 批下来之后而且确确实实握在手中了再动身。象自己先溜出去,请人把 AP 寄出国用的招儿,最好还是不用。

好了,你老老实实揣着 AP 出境了,又回来了。请注意,你的身份就发生了质的变化"



'via Blog this'

申请回美证 (AP)-申请绿卡-杨仁家律师事务所

申请回美证 (AP)-申请绿卡-杨仁家律师事务所:



'via Blog this'

Sunday, August 21, 2016

泪目!里约哪一幕让你动容 女排孙杨的眼泪啊(图)

泪目!里约哪一幕让你动容 女排孙杨的眼泪啊(图) | www.wenxuecity.com:





惠若琪哭成泪人

奥林匹克是什么?就如“一千个人眼中就有一千个哈姆雷特”一样,答案一定五花八门。不过可以肯定的是,通过奥运会这个四年一届将全球注意力吸引于一地的综合性运动会,绝对不仅仅只是竞技那么简单,它是一种精神,是一种情感的运动。正因如此,眼泪便成为了情感宣泄、体现精神的一种手段,一个方式。在里约的16天我们每天都能见到眼泪,有喜悦的、有痛苦的、有不舍的、有感动的……。

“我不知道以后还有没有时间再为这支队伍付出,我没时间了。。。。。”当傅海峰和张楠夺下羽毛球男双冠军后,平日里爱耍宝逗乐的“宝哥”面对镜头一度哽咽落泪,32岁的傅海峰在那一刻将集体荣誉感推到极致。若提及集体,在里约将这种精神诠释最好的非中国女排莫属,随着惠若琪的一记探头球得分,中国女排时隔12年后再次站到了奥运会的最高颁奖台,这是怎样的一支队伍?八年前,多少人在骂主教练郎平;一年前,又有多少人在恨队长惠若琪。做过心脏手术、缺席世界杯、左肩打着七颗钢钉的惠若琪终于在这一刻找到了情感爆发点,痛哭到失声的一幕,又会让多少人感慨万千。

同惠若琪一样,一直饱受外界质疑的还有谌龙,这位被骂是团体虫单项龙的前世界第一,在击败现世界第一的李宗伟后,立即趴在地上像孩子一般的痛哭,那一刻的心情只有他自己最懂。实际上,三次杀入奥运会决赛,但都与冠军缘铿一面的李宗伟在颁奖台上还是不禁偷偷抹泪,33岁的马来西亚老将已无需用金牌证明自己的伟大,可是他却背负着3116万人希望他为国家夺下奥运历史首金的寄托。“我知道不止我一个人失落,现在全马来西亚国民都感到失望,我必须向他们道歉,希望你们未来还能继续支持羽毛球队。”




谌龙痛哭

几乎可以肯定李宗伟个人的奥运冠军梦将无法实现,从这一点来看丁宁是幸福的,四年前在伦敦因为裁判做出不利于自己的判罚,丁宁委屈落泪;四年后丁宁终于在奥运赛场夺冠成就大满贯梦想,这一次她流下的是幸福和喜悦的泪水。从伦敦到里约,泪水见证成长。可是在里约,吕斌遭遇了比丁宁在伦敦时更黑暗的判罚,在占尽优势情况下他却被裁判判负,不解与失望让这位铁骨铮铮的拳手跪倒在地,亲吻他所热爱的拳台时,眼泪已经忍不住的流了下来,“裁判偷走了我的梦想!我还会继续努力,然后用自己的实力来决定比赛的胜负。”

同样是距离金牌差咫尺之遥,孙杨和易思玲眼泪中却包含着完全不同的意义。当孙杨以极其微弱的劣势未能在400米卫冕后,身高1米98的“大白杨”在赛后抱着记者失声痛哭,这一次的泪不是夺得金牌后的喜极而泣,而是一个蜕变为中国体育领军的大男孩,对自己高度期勉下不必要的自责。孙杨,你无需对谁道歉,因为你已经是最棒的!易思玲的泪则是为战胜自己而流,在她看来克服重重困难战胜自我,这枚铜牌比四年前的金牌份量更重!

李雪芮,没有在全世界面前流泪,她在左膝前十字韧带断裂情况下坚持打完女单半决赛,坚持接受完媒体采访,直到最后当她一瘸一拐的离开体育馆时,她终于无需再忍流下眼泪,很难说清这是伤痛让她落泪,还是比赛结果让她落泪,甚至是对自己未来的不确定而落泪。与之类似的还有德国体操选手托巴,他们都用坚强诠释了奥运会真正的意义在于拼搏的奥运精神,这是每一位参赛运动员最宝贵的品质,它远比奖牌更加神圣!

在里约,我们看到了太多泪水。无论是早被天下人所熟识的网球巨星德约科维奇,还是不被大众所了解的那个在巴西女排被淘汰后披着国旗的巴西小男孩。无论是作客里约的朱启南,还是在家门口出战的内马尔,其实还有很多很多,甚至像秦凯何姿这样,跳脱出竞技层面,升华到浪漫人生的。他们都在奥运会的这个大舞台上倾尽全力,恣意飙泪。当尖端科技、高度商业化、违禁药物甚至政治侵蚀奥林匹克,当套路取代真诚,体育精神被认为是极度缺乏的,但眼泪却是人性最本真的。最后用一句心灵鸡汤作为收尾:强者不是没有眼泪,只是可以含着眼泪继续向前奔跑。

'via Blog this'

Android users touch their smartphones more than 2,500 times a day, research says » TechWorm

Android users touch their smartphones more than 2,500 times a day, research says » TechWorm:



'via Blog this'

Wednesday, August 3, 2016

How To Create a Sudo User on Ubuntu [Quickstart] | DigitalOcean

How To Create a Sudo User on Ubuntu [Quickstart] | DigitalOcean:



The sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. This guide will show you the easiest way to create a new user with sudo access on Ubuntu, without having to modify your server's sudoers file. If you want to configure sudo for an existing user, simply skip to step 3.

Steps to Create a New Sudo User

  1. Log in to your server as the root user.
    • ssh root@server_ip_address
  2. Use the adduser command to add a new user to your system.
    Be sure to replace username with the user that you want to create.
    • adduser username
    • Set and confirm the new user's password at the prompt. A strong password is highly recommended!
      Set password prompts:
      Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
    • Follow the prompts to set the new user's information. It is fine to accept the defaults to leave all of this information blank.
      User information prompts:
      Changing the user information for username Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n]
  3. Use the usermod command to add the user to the sudo group.
    • usermod -aG sudo username
    By default, on Ubuntu, members of the sudo group have sudo privileges.
  4. Test sudo access on new user account
    • Use the su command to switch to the new user account.
      • su - username
    • As the new user, verify that you can use sudo by prepending "sudo" to the command that you want to run with superuser privileges.
      • sudo command_to_run
    • For example, you can list the contents of the /root directory, which is normally only accessible to the root user.
      • sudo ls -la /root
    • The first time you use sudo in a session, you will be prompted for the password of the user account. Enter the password to proceed.
      Output:
      [sudo] password for username:
      If your user is in the proper group and you entered the password correctly, the command that you issued with sudo should run with root privileges.
Here is a link to a more detailed user management tutorial:

Chinese Doc of Kaldi - GitBook

Chinese Doc of Kaldi - GitBook:



'via Blog this'