Skip to main content

Posts

Showing posts from October 14, 2012

美国是一个平等公正的社会?别TMD扯淡了。

发信人: Saob (Saob), 信区: WaterWorld 标  题: 美国是一个平等公正的社会?别TMD扯淡了。 发信站: BBS 未名空间站 (Sat Oct 20 00:01:13 2012, 美东) 在我当研究生的时候,我们系里有一位教授是个明白人。一次我问他:“为什么我跟你 说话时,总感觉是像学生在请教教授什么问题,而不能感觉是在非常平等地谈话聊天呢 ?”白人思索了片刻,说:“你是从社会主义国家来的,你不知道资本主义国家里是有 着严格的等级(hierarchy)的。比如,教授就不会跟秘书们一起去吃饭,更不会与清 洁工人平起平坐地聊天。” 我们这儿附近有一个有钱人的高尔夫球场,名义上谁都可以来,但是你要首先交纳一年 五万美元的会员费,这可是一般老百姓交纳不起的。这五万美元还是近十年前的价,现 在弄不好就得是十万美元的会员费了。你说这个会员费作用是什么,真的维护高尔夫球 场要一个人一年5万快? 作用显而易见,用来过滤掉穷人。 美国人民很有自知之明:大家都知道自己是属于哪一个社会阶层的。不属于同一阶层的 人一般来说并不在一起瞎搀和:不会做邻居,不会在一起娱乐、参加同一个俱乐部,子 女要进不同的学校学习。就是属于社会下层的穷老百姓,并不憎恨有钱的人,对于自己 居于社会的底层似乎并无多少怨言,羡慕、崇敬之心当然是有的。 你想一想,美国住在connecticut/new hampshire/vermont的白人精英家庭,会允许自 己子女去参军,去学工程,去做公立学校的一名普通老师,去和一个非白人,非自己阶 级的儿女结婚吗?记得一个奥迪汽车广告,说一白人孩子在家里受教育,家教说:“ you'll go to one of these 3 schools: Harvard, Yale, Princeton.", "you'll get one of these 3 jobs: walls street, law, doctor", "you'll drive one of these 3 cars: BMW, Mercedes, Lexus", etc. 你想想,美国人自己标榜的什么“ individuality","d...

Google SOAP Search API is no longer available.

Monday, August 31, 2009 A well earned retirement for the SOAP Search API There’s a time for everything in life: a time for playing, learning & growing up; a time for maturing, working & performing, and a time for retiring, relaxing & handing the reigns over to the next generation. This is true for products too, and this is why, six months ago, we announced our Labs program for Google Code. This program provides clear distinction between graduate developer products where you’ll find mature products with transparent deprecation policies which you can count on for the long run, and labs developer products where you can explore our newest products and get started with them early. As we also said in that announcement, the time has come for the SOAP Search API to retire – the new generation is around, has graduated, and has largely taken over already as a better and more versatile solution for the vast majority of use cases. In the spirit of our depreca...

中国富人想移民到哪里?

随 着富裕的中国人日渐希望投资海外,外国企业也加大努力吸引潜在的中国投资者,其中发起“求爱”攻势最为猛烈的当属国外房地产开发商。 Associated Press 2012年10月8日,塞浦路斯阿依纳帕度假区附近,游客欣赏夕阳时的剪影。 近日的某个周六,来自20多个国家的约140个房地产开发商在北京举行的一个展会上展示了他们的楼盘。为了吸引潜在买家的目光,这些开发商分发了非 常精美的小册子,并用那些突出所售楼盘且配色夸张的照片装饰他们的展位。某些开发商甚至请来戴着兔子耳朵的年轻女销售员招揽客户。 但对很多参加展会的中国买家来说,最吸引他们的莫过于外国居留权所带来的诱惑。这也使得来自塞浦路斯的30位参展商成为整场展会最显眼的一个群体。 为 什么选择塞浦路斯?虽然温和的气候、丰富的历史和地处地中海东部这一不错的地理位置可能令这一面积不大的岛国成为一个具有吸引力的居住地,但该国真正吸引 人的地方在于其为移民设置的门槛低到令人难以置信的程度:任何人只要花30万欧元(约合300万人民币)在该国购买一套房产就可以自动有资格享有欧盟永久 居留权。   参加展会的邵刚(音)说,和美国、加拿大等国相比,塞浦路斯的移民门槛相对较低,这一点非常吸引我们。邵刚说他在中国一家贸易企业工作,说话时他正在浏览塞浦路斯一位开发商发放的小册子。 此次展会吸引大批参展人群的还包括来自新加坡和澳大利亚的开发商。这两个国家均提供具有吸引力的投资移民项目。 傲丰置业集团(Affluent Investment Group)董事总经理Tony Du也在展会现场帮助一家澳大利亚开发商回答中国买家与移民有关的问题。他说,和我谈话的100个人中,有60%想要移民,只有40%是单纯想在海外置业的。 Lingling Wei

WSDL file

WSDL stands for "Web Services Description Language". Although designed to be flexible enough to describe many types of web services, it is most often used to describe SOAP web services. A WSDL file is just that: a file. More specifically, it's an XML file. It usually lives on the same server you use to access the SOAP web services it describes, although there's nothing special about it. Later in this chapter, we'll download the WSDL file for the Google API and use it locally. That doesn't mean we're calling Google locally; the WSDL file still describes the remote functions sitting on Google's server. A WSDL file contains a description of everything involved in calling a SOAP web service: • The service URL and namespace • The type of web service (probably function calls using SOAP, although as I mentioned, WSDL is flexible enough to describe a wide variety of web services) • The list of available functions • The arguments for each function • The data...

Installing the SOAP Libraries

search the names at ubuntu. 1. Installing PyXML The first library you need is PyXML, an advanced set of XML libraries that provide more functionality than the built−in XML libraries 2. Installing fpconst The second library you need is fpconst, a set of constants and functions for working with IEEE754 double−precision special values. This provides support for the special values Not−a−Number (NaN), Positive Infinity (Inf), and Negative Infinity (−Inf), which are part of the SOAP datatype specification. 3. Installing SOAPpy The third and final requirement is the SOAP library itself: SOAPpy.

最近的流水帐

发信人: jym2307 (罪魁), 信区: JobHunting 标  题: 最近的流水帐 发信站: BBS 未名空间站 (Sat Oct 13 02:00:47 2012, 美东) 基于种种原因,决定再次找马,前后磨磨叽叽两个月。因为目前的公司,待遇在行业内 属于中上,所以找马的范围也比较小 g onsite问了restful概念,没答好。一个load balance的算法题没答好。 p 居然又找我去onsite,看来前一次不算太差。6轮,前半段还不错,后半段莫名其妙觉 得java的我适合做 techOps/devOps,结果自然不match y 难度的确一般,开始给的待遇还不错,要给ceo review,不知道要等多久。两周后竟然 说觉得给高了,愣是拉下来两万多。还好当初没把马寄托在他身上 l 店面轻松搞定,居然送审committee的时候觉得我跳槽频繁,竟然连onsite都不给 f 骚扰若干recruiter后竟然给了店面机会,可惜代码略显臃肿,挂 j 公司以白人为主,看起来牛人很多,听说待遇比预期的高,不过技术上确实不很match ,挂 s 看来还是跟S开头的公司有缘,这已经是第四个了。难度跟Y差不多,两个部门都搞定, 最后offer一个比另一个高,果断签卖身契。昨天和今天搞定辞职,下周一入职 总结,兼回答最近一些同学们关心的问题 1)如果想骚扰flg的recruiter,那是一定有办法的,到linkedin上搜,很多人都把 email以某种形式贴出来的,只要用心,一定能骚扰的成 2)有些老印的确报团严重,而且任人唯亲得有点明目张胆。发现不对劲的话,如果身 份没有问题,赶紧找马吧,海阔还是很天空的 3)基于#2点,看来有时候要考虑往manager方向走,即使你依然还想继续一边写代码 4)这两年行业转型严重,为将来职业发展考虑,最好能提前往新行业方向靠近。cloud /social/mobile 5)一般而言,如果简历上有几家知名的公司(大型中型均可),相对来说比较容易先 被recruiter看中,容易拿到店面机会。所以有机会还是去知名公司贴贴金,虽然做的 东西不一定很核心 6)之前几个月帮了不下30个人refer到s,没一个成的。看来s的不确...

找工心得 非CS, 非EE心理素质分享

发信人: mumulis (默默), 信区: JobHunting 标  题: 找工心得 非CS, 非EE心理素质分享 发信站: BBS 未名空间站 (Thu Oct 18 23:41:32 2012, 美东) 来写一下找工心得. 这阵子常上来膜拜,也蒙受很多经验恩泽,想献曝一点整理攢人品, 希望对大家有所帮助. 我读的不是CS或EE,比较冷门,小硕,完全不牛!! 面了几家不错的 大公司,不管最后结果如何, HM评价都很好,从了不错的公司. 通则应该还行. 来这边的 目的多半是学习心理素质的建设,也想分享给大家这部分. 1. resume尽量写一页就好 如果真的太牛,不得不写超过一页,最精彩的请放第一页. 不然就写两种版本,refer的高 兴怎么写怎么写,经理熟技术会理解逻辑. 但Recruiter选,尽量还是让他们好懂为原则. 2. 找工作最好海投,海排面试,让自己越忙越好 这样比较不会在面跟面等待的中间太焦虑,可以一直保持高张的心情准备面试,保持淡定 . 一间面完赶紧准备下一间,这样不会有太多时间忧虑. 心理素质在找工过程中实在很 重要. 通常apply跟对方phone screen时间,会隔个一到两个礼拜,快则两天内通知,两周 也不是不可能. 所以,一次海投可以让你两个礼拜每天都做好准备. 尽量不要先投一两 个,然后隔一个月再投一个,面跟面时间拉太长,会让人开始焦虑,就算多烂的firm去try 都一样. 3. Thank you note 基本上建议大家写. 除非你牛到不行或是公司也牛到不行,凭实力,那爱写不写无所谓. 为啥这样说呢? 因为有些小公司,或大公司但不是那么红的部门,有时候他们自己也不太 有自信,假设你不写他们说不定会觉得你不够看得起他们,会觉得留不住你. 另外,大家都是面好多round,假设有重复在几个round面到一样的人, (HM之类的),不写 就从头开始不写,写了最好要写到尾,前面不写后面写也无所谓, 最好是不要前面几 round写后面就发懒不写,这样也会让人误会你on site完兴致没了不积极之类的. 当然大多数写不写都无所谓,但注意这些东西,可以让你面试完心理好过一点,不会去后 悔早知道写啊之类的一些胡思乱想. however, 如果on-site完...

5 important features of HTTP

There are five important features of HTTP which you should support. 1. User−Agent The User−Agent is simply a way for a client to tell a server who it is when it requests a web page, a syndicated feed, or any sort of web service over HTTP. When the client requests a resource, it should always announce who it is, as specifically as possible. This allows the server−side administrator to get in touch with the client−side developer if anything is going fantastically wrong. 2. Redirects Sometimes resources move around. Web sites get reorganized, pages move to new addresses. Even web services can reorganize. A syndicated feed at http://example.com/index.xml might be moved to http://example.com/xml/atom.xml. Or an entire domain might move, as an organization expands and reorganizes; for instance, http://www.example.com/index.xml might be redirected to http://server−farm−1.example.com/index.xml. Every time you request any kind of resource from an HTTP server, the server includ...

HTTP Web Services

HTTP web services are programmatic ways of sending and receiving data from remote servers using the operations of HTTP directly. If you want to get data from the server, use a straight HTTP GET; if you want to send new data to the server, use HTTP POST. (Some more advanced HTTP web service APIs also define ways of modifying existing data and deleting data, using HTTP PUT and HTTP DELETE.) In other words, the "verbs" built into the HTTP protocol (GET, POST, PUT, and DELETE) map directly to application−level operations for receiving, sending, modifying, and deleting data. The main advantage of this approach is simplicity, and its simplicity has proven popular with a lot of different sites. Data −− usually XML data −− can be built and stored statically, or generated dynamically by a server−side script, and all major languages include an HTTP library for downloading it. Debugging is also easier, because you can load up the web service in any web browser and see the raw data. Mod...

openAnything

def openAnything(source):     # try open with urllib (http, ftp, file URL)     import urllib     try:         return urllib.urlopen(source)     except (IOError, OSError):         pass     # try open with native open     try:         return open(source)     except (IOError, OSError):         pass     # treat source as string     import StringIO     return StringIO.StringIO(str(source)) Now you can use this openAnything function in conjunction with minidom.parse to make a function that takes a source that refers to an XML document somehow (either as a URL, or a local filename, or a hard−coded XML document in a string) and parses it.   def _load(self, source):     sock = toolbox.op...

Introducing StringIO

>>> contents = " 0 1 " >>> import StringIO >>> ssock = StringIO.StringIO(contents) >>> ssock.read() " 0 1 " >>> ssock.read() '' >>> ssock.seek(0) >>> ssock.read(15) ' >>> ssock.read(15) "d='bit'>0 >>> ssock.read() '>1 ' >>> ssock.close()

Unicode

Unicode is a system to represent characters from all the world's different languages. When Python parses an XML document, all data is stored in memory as unicode. You'll get to all that in a minute, but first, some background. Historical note. Before unicode, there were separate character encoding systems for each language, each using the same numbers (0−255) to represent that language's characters. Some languages (like Russian) have multiple conflicting standards about how to represent the same characters; other languages (like Japanese) have so many characters that they require multiple−byte character sets. Exchanging documents between systems was difficult because there was no way for a computer to tell for certain which character encoding scheme the document author had used; the computer only saw numbers, and the numbers could mean different things. Then think about trying to store these documents in the same place (like in the same database table); you woul...

Packages are modules, too

>>> from xml.dom import minidom >>> minidom >>> minidom.Element >>> from xml.dom.minidom import Element >>> Element >>> minidom.Element >>> from xml import dom >>> dom >>> import xml >>> xml Here you're importing a module (minidom) from a nested package (xml.dom). The result is that minidom is imported into your namespace, and in order to reference classes within the minidom module (like Element), you need to preface them with the module name. Here you are importing a class (Element) from a module (minidom) from a nested package (xml.dom). The result is that Element is imported directly into your namespace. Note that this does not interfere with the previous import; the Element class can now be referenced in two ways (but it's all still the same class). Here you are importing the dom package (a nested package of xml) as a module in and of itself. Any level of a package can be treated as a...

ME找工总结

发信人: bigcompfan (大公司控), 信区: JobHunting 标  题: 【发ME找工总结】 发信站: BBS 未名空间站 (Wed Oct 10 22:35:36 2012, 美东) 早先承诺过要发总结回馈本版,今天兑现,第一希望自己的一点经验教训(主要是教训 )能帮到后来人,第二真诚地希望抛砖引玉,ME的牛人很多,我在这里混了几个月就认 识了不少,不过他们太低调,不肯现身。CS的同学们就别往下看了,里面的数字会让你 们见笑的。文中暴露了很多信息,熟人们看到了就请一笑而过吧。如果你也在申请文中 列出的公司且有疑问,可以发信给我。 个人背景 ME三无PHD,无经验无实习无身份。能力不高不低,学校不上不下,研究做得不好不坏, 我觉得我代表了ME的大多数。除了我老板和几个论文委员会委员以外,都觉得我找教职 完全没戏, 找工业界的研究职位也没指望,所以瞄准了去当民工。自我感觉优势在于跨 学科,知识面比较宽,GPA高,英语在中国人里还算可以(自我感觉在前1/3),不怯场。劣 势在于每个方面只是浅尝辄止,如果深入得问,可能马上被问倒 1. 简历很重要 简历改了很久,改过好几个版本,从最开始的空空一页纸改到现在满满两页半。期间对 我帮助最大的是一个组里以前毕业的从未谋面的人,他给我提了很多建议,把简历改成 了最终的模样。他给我要求就是做过的项目要写得详细,多用数字表明你的成绩和贡献 ,很难想象一两句话的简单描述会引起别人对你的兴趣。对ME来说,长简历可能会使一 部分对你失去兴趣,但短简历会让大部分人对你失去兴趣。真的对你的经历感兴趣的人 是会有耐心读完的,对你没兴趣的HR,你写得再简单扼要也照样被丢进回收站。当然排序 很重要,找工业界工作,论文神马的就放最后吧,毕业学校,技能,项目经历放最前面。 改完之后收到的面试就逐渐多了起来 2. 推荐很重要 回过头看几个月的找工过程,觉得最重要的是要认识人。这一点只要历数一下经历就很 明显,没refer的情况下拿到电面的机会都很难,onsite也会严格许多。因为家庭原因和 个人喜好,我把工作地点限定在加州,西雅图,休斯顿或者新英格兰(排名分先后)。这 个风险很大,因为我们组以前去得最多的两个公司(均是Dow30大公司)都因为位置原因 被排除在外...

python学习笔记之module && package

python的module import 只能导入模块,不能导入模块中的对象(类、函数、变量等)。如一个模块A(A.py)中有个函数getName,另一个模块不能通过import A.getName将getName导入到本模块,只能用import A。如果想只导入特定的类、函数、变量则用from A import getName即可。 import一个module时,会执行该module的所有方法,并且将该module添加到importing module的命名空间中。 A module's body executes immediately the first time the module is imported in a given run of a program... An import statement creates a new namespace containing all the attributes of the module.  如: fibo.py # Fibonacci numbers module def fib(n): # write Fibonacci series up to n a, b = 0, 1 while b < n: print b, a, b = b, a+b def fib2(n): # return Fibonacci series up to n result = [] a, b = 0, 1 while b < n: result.append(b) a, b = b, a+b return result print "EOF" In [1]: import fibo EOF In [2]: import fibo In [3]: fibo. fibo.__builtins__ fibo.__doc__ fibo.__hash__ fibo.__package__ fibo.__setattr__ fibo.fib ...