tag 标签: helpful经管大学堂:名校名师名课

相关帖子

版块 作者 回复/查看 最后发表
悬赏 2币求一篇JAP文章,谢谢 - [!reward_solved!] attachment 求助成功区 kenny240 2014-2-28 2 842 Mengguren15 2019-4-10 19:48:12
《Essentials of Multivariate Data Analysis》 attach_img digest HLM专版 大家开心 2015-6-2 115 11255 胡明敏 2019-3-29 12:51:35
Professional NoSQL attachment nosql论坛 Nicolle 2015-5-17 6 2370 realone9999 2015-8-22 22:40:05
Why Nudge?: The Politics of Libertarian Paternalism(epub格式) attachment 行为经济学与实验经济学 bajjio 2015-7-10 2 2676 江村北鸥 2015-7-12 09:21:49
老师布置作业求大神解答 - [阅读权限 22] R语言论坛 夜神月是神 2015-5-7 1 208 nuomin 2015-5-7 20:10:54
Stochastic Optimal Control, and U.S. Debt Crises 宏观经济学 yuedragon 2014-12-15 0 920 yuedragon 2014-12-15 14:20:49
悬赏 字符串根据关键字拆分成若干变量求助,论坛币诚心求大神帮忙!! - [!reward_solved!] Stata专版 liangsai8888 2014-11-11 11 1928 ywh19860616 2014-11-12 18:55:55
very helpful video of individual income tax 会计与财务管理 hummingbird@la 2014-7-4 1 1352 angelzhang1992 2014-8-30 01:26:21
2014年,旅行中11个精彩的乐趣 休闲灌水 小粟林 2014-6-9 1 1343 zhangibt 2014-6-9 16:24:16
Delete variables width more than 500? SPSS论坛 ReneeBK 2014-6-6 3 2259 ReneeBK 2014-6-6 22:52:17
Delete String Variables with Width More Than 500? SPSS论坛 ReneeBK 2014-5-14 1 1250 ReneeBK 2014-5-14 01:35:16
Financial Accounting 13th edition and ppt attachment 会计与财务管理 opppy 2014-1-10 0 818 opppy 2014-1-10 10:44:04
[求助] Is CFA helpful for applying finance PhD? CFA、CVA、FRM等金融考证论坛 xiaofuren 2007-5-5 7 3124 zcfzcfzcf 2013-11-29 01:18:27
悬赏 What makes a helpful online review? A study of customer reviews on amazon.com - [!reward_solved!] attachment 求助成功区 jyjkshuai 2013-3-5 1 1135 jigesi 2013-3-5 21:31:53
悬赏 What makes a helpful online review? A study of customer reviews on Amazon. com - [!reward_solved!] attachment 求助成功区 jyjkshuai 2013-1-6 1 1808 It's 2013-1-6 22:34:05
Greece Debt crisis 宏观经济学 richardgu26 2012-10-7 1 1206 richardgu26 2012-10-7 09:09:14
一篇ssci外审后被拒,贴意见供参考,顺求momo 学术道德监督 segexuan 2011-11-17 87 15012 gqun 2011-12-17 13:03:14
全年考试时间表,绝对helpful. attachment 经管在职研 展佩 2009-3-16 72 9335 07lchen21 2009-3-21 18:14:00
A helpful website for learning SAS SAS专版 yecm2000 2007-6-7 0 1728 yecm2000 2007-6-7 23:58:00

相关日志

分享 Python Interview Question and Answers
Nicolle 2014-8-12 01:26
Python Interview Question and Answers For the last few weeks I have been interviewing several people for Python/Django developers so I thought that it might be helpful to show the questions I am asking together with the answers. The reason is … OK, let me tell you a story first. I remember when one of my university professors introduced to us his professor – the one who thought him. It was a really short visit but I still remember one if the things he said. “Ignorance is not bad, the bad thing is when you do no want to learn.” So back to the reason – if you have at least taken care to prepare for the interview, look for a standard questions and their answers and learn them this is a good start. Answering these question may not get you the job you are applying for but learning them will give you some valuable knowledge about Python. This post will include the questions that are Python specific and I’ll post the Django question separately. How are arguments passed – by reference of by value? The short answer is “neither”, actually it is called “call by object” or “call by sharing”(you can check here for more info). The longer one starts with the fact that this terminology is probably not the best one to describe how Python works. In Python everything is an object and all variables hold references to objects. The values of these references are to the functions. As result you can not change the value of the reference but you can modify the object if it is mutable. Remember numbers, strings and tuples are immutable, list and dicts are mutable. Do you know what list and dict comprehensions are? Can you give an example? List/Dict comprehensions are syntax constructions to ease the creation of a list/dict based on existing iterable. According to the 3rd edition of “Learning Python” list comprehensions are generally faster than normal loops but this is something that may change between releases. Examples:# simple iterationa = # list comprehensiona = # dict comprehensiona = {x: x*2 for x in range(10)}# a == {0: 0, 1: 2, 2: 4, 3: 6, 4: 8, 5: 10, 6: 12, 7: 14, 8: 16, 9: 18} What is PEP 8? PEP 8 is a coding convention(a set of recommendations) how to write your Python code in order to make it more readable and useful for those after you. For more information check PEP 8 . Do you use virtual environments? I personally and most(by my observation) of the Python developers find the virtual environment tool extremely useful. Yeah, probably you can live without it but this will make the work and support of multiple projects that requires different package versions a living hell. Can you sum all of the elements in the list, how about to multuply them and get the result? # the basic ways = 0for x in range(10): s += x# the right ways = sum(range(10))# the basic ways = 1for x in range(1, 10): s = s * x# the other wayfrom operator import mulreduce(mul, range(1, 10)) As for the last example, I know Guido van Rossum is not a fan of reduce, more info here , but still for some simple tasks reduce can come quite handy. Do you know what is the difference between lists and tuples? Can you give me an example for their usage? First list are mutable while tuples are not, and second tuples can be hashed e.g. to be used as keys for dictionaries. As an example of their usage, tuples are used when the order of the elements in the sequence matters e.g. a geographic coordinates, “list” of points in a path or route, or set of actions that should be executed in specific order. Don’t forget that you can use them a dictionary keys. For everything else use lists. Do you know the difference between range and xrange? Range returns a list while xrange returns a generator xrange object which takes the same memory no matter of the range size. In the first case you have all items already generated(this can take a lot of time and memory) while in the second you get the elements one by one e.g. only one element is generated and available per iteration. Simple example of generator usage can be find in the problem 2 of the “homework” for my presentation Functions in Python Tell me a few differences between Python 2.x and 3.x There are many answers here but for me some of the major changes in Python 3.x are: all strings are now Unicode, print is now function not a statement. There is no range, it has been replaced by xrange which is removed. All classes are new style and the division of integers now returns float. What are decorators and what is their usage? According to Bruce Eckel’s Introduction to Python Decorators “Decorators allow you to inject or modify code in functions or classes”. In other words decorators allow you to wrap a function or class method call and execute some code before or after the execution of the original code. And also you can nest them e.g. to use more than one decorator for a specific function. Usage examples include – logging the calls to specific method, checking for permission(s), checking and/or modifying the arguments passed to the method etc. The with statement and its usage. In a few words the with statement allows you to executed code before and/or after a specific set of operations. For example if you open a file for reading and parsing no matter what happens during the parsing you want to be sure that at the end the file is closed. This is normally achieved using the try… finally construction but the with statement simplifies it usin the so called “context management protocol”. To use it with your own objects you just have to define __enter__ and __exit__ methods. Some standard objects like the file object automatically support this protocol. For more information you may check Understanding Python’s “with” statement . Well I hope this will be helpful, if you have any question or suggestion feel free to comment. Update : Due to the lots of comments on Reddit and LinkedIn, I understood that there is some misunderstanding about the post. First, the questions I have published are not the only ones I ask, the interview also includes such related to general programming knowledge and logical thinking. Second the questions above help me get a basic understanding of your Python knowledge but they are not the only think that makes my decision. Not answering some of them does not mean that you won’t get the job, but it may show me on which parts we should to work. 总结了10道题的考试侧重点,供参考: 1.How are arguments passed – by reference of by value? 考的是语法,基本功,虽说python程序员可以不用关心堆栈指针那些头疼的东东,但传引用和传值的区别还是必需清楚的。个人感觉从python中一切都是对象的角度看,第一题问传值还是传引用其实是考官有意看面试者是不是概念清楚,真正希望考生回答的是哪些对象传递到函数中是只读的或者说不可变的。 2.Do you know what list and dict comprehensions are? Can you give an example? 典型的pythonic用法 3.What is PEP 8? 是不是有良好的编码习惯 4.Do you use virtual environments? 是不是有独立配开发环境的能力 5.Can you sum all of the elements in the list, how about to multuply them and get the result? 期待你用pythonic方式解决 6.Do you know what is the difference between lists and tuples? Can you give me an example for their usage? python中两种最基本常用的数据结构 7.Do you know the difference between range and xrange? 期待你清楚generator及其是如何使用内存的,generator用法还是典型的pythonic 8.Tell me a few differences between Python 2.x and 3.x 希望你对新老产品都有所关注 9.What are decorators and what is their usage? 典型的pythonic用法 10.The with statement and its usage. 典型的pythonic语法 参考链接 http://ilian.i-n-i.org/python-interview-question-and-answers/ http://www.**.com/group/topic/38792398/
个人分类: Python|12 次阅读|0 个评论

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-29 01:18