Python Data & personal daily summary _20151220

Source: Internet
Author: User
Tags clear screen integer division print print python script sublime text

Have time to re-typesetting later.

The back is getting messy. Do not have time to sort out the trouble to open the link to try it.

This is what I have prepared for my classmates, but also the resources I have collected since the introduction to Python for the first language to learn programming students.

The following important, you can see first. Look down again. Or browse through you need it again.

-

Programming Getting Started Guide v1.4

http://zhuanlan.zhihu.com/xiao-jing-mo/19959253

????????????

For programmers who are beginners

:

__ Update About

0 Programmer's contact with Python's knowledge discussion

https://www.zhihu.com/question/34907211

----------Split Line----------

1-2 & 1-3 recommended to see at the same time

1-2

Video: (although there are advertising components, but the speaker is good, the teacher is very enthusiastic, people out of work, I can understand, hope to like programming attitude to be put, we just come to learn. )

Depending on the release time.

Http://www.tudou.com/home/_119593172/item

For the 0 basic students, you can see, can understand the next Python things.

1-3

Blog: Vamei Blogger's python quick tutorial together with comments can be seen, and when you see the standard library, it will indeed be like he said---need to have a variety of background knowledge (mathematics, network).

-

Http://www.cnblogs.com/vamei/archive/2012/09/13/2682778.html

1-4

A variety of excellent resources including Vamei blog recommendations

-

Http://www.ziqiangxuetang.com/learn_share/python-learn-resource.html

1-5

Wheat Academy

Videos, from introductory to basic to in-depth.

(If it is really basic, learning to have an effect, then continue to see, after all, the resource system is quite broad.) )

(If you do not understand, you can first look at 1-2 and 1-3, the last to look at the wheat video or read "Python core programming" to lay a solid foundation. )

-

http://www.maiziedu.com/course/python/

(app offers download)

----------Split Line----------

0-s

Development environment Construction:

Sublime Text 3 Debug/C + + program (sublimetext) under Windows

---

Address: HTTP://PAN.BAIDU.COM/S/1DDBCJMH

Password: phty

-

Original

Address

http://blog.csdn.net/fayecy/article/details/42113339

Another article

Http://tieba.baidu.com/f?kz=2826036031&mo_device=1&ssid=0&from=2001a&uid=0&[email protected ],[email Protected]_1003,[email protected]_2_4.4_1_9.8&bd_page_type=1&baiduid= Eccc178d6acb6a3ecd47f013427f3c63&tj=www_normal_3_0_10_title

Https://yutuo.net/archives/42ee250814befef5.html

2-2

Sublime Text full Guide by Lucida

-

Http://www.cnblogs.com/figure9/p/sublime-text-complete-guide.html

Description: Sublime does not support input () raw_input () functions by default

The solution can be Baidu but I am here to provide the Chinese version of sublime with Baidu method can not handle this problem, uninstall the original sublime installed, and then operate, but not recommended, not necessary.

The second one is saved, right-click on the py file with the IDE open, and then the Python shell runs.

The third (for Py2) is to add a line raw_input () at the end of the written code, and save the direct double-click to open before the program exits you will see all the debug results.

Also recommended Pycharm editor first download the original, if not adapt to English, direct Baidu "Pycharm Chinese package", manual processing under the good. Not private 707350867.

----------Split Line----------

3-1

In addition to the novice need to fill the foundation, write those small code on the computer time-consuming, so

Qython

-Download 1.0.8 (build 12)

Note that the latest version does not have GBK encoding, so download the penultimate one.

Http://www.pgyer.com/qpython

Initial use may be made larger by the file IO.

Specific use can be private, here are a few simple to say.

1, how to enter the interface like the tutorial in the beginning?

A: Enter import OS in "terminal", carriage return, Os.system ("sh"), enter, then enter Linux system command line. The command line entered at this time is the root directory, can not write the directory, for the root of the engine oil can not debug the written py file.

2. Resolving file path issues

The Linux engine oil will certainly think of CDs, but each time the input is too cumbersome.

You can save the script one at a time and then run it to enter the system command line and enter both the writable and writable working directory.

The code is as follows

Import OS

Os.chdir (absolute path)

Os.system ("sh")

Description

Absolute path is a string

This is what I have written.

From OS import Chdir,system

ChDir ("/storage/emulated/0/com.hipipal.qpyplus/")

System ("sh")

3,file.open () working directory

As above, Qpy is initialized every time, so there is local file operation in the code, the working directory should be modified before debugging.

1

We are the Python 2.7.* version

Should be

print "Hello" instead of print ("Hello") 2.7 without parentheses 3

2

$python hello.py

$ just to show that the operating system is Linux or Mac you want to use this first to solve the 1, working directory problem. 2, then enter the system command line (note here, the command line there are two forms of a $ start you can not delete $, is behind him to write commands, the implementation is some Linux command. The other is the >>> start, you can also delete, this is the command line of Python, to execute the Python statement. )

Working directory problem, you can write in the "editor" (Run button to the left there is a "Save as" button, save as **.py, then run, so that there will be a later action)

Import OS

Print OS.GETCWD () #获取当前qpy的工作目录 (the path where the **.py is when Python **.py)

Os.chdir ("* * *") # Use the ES file browser to find the folder I can't give absolutely because the built-in storage of the drive letter name may not be the same 0 or other.  As an example: "/storage/emulated/0/..." It has ...

#os. System ("sh") needs to enter $ mode to delete the #

The above is just to solve the doubts and practice argv, later will find that we do not use the Os.system ("sh") I mean the pure sh may not be used but the system () will still be used he is to invoke the Systems command. such as "CD/", "mv./**.py" "CP" and so on ...

4-1 later words

Learning is a short-term breakthrough, long-term accumulation of the process.

Breakthrough to focus, long to adhere to.

The problem with our beginner programming is that we don't know what we're doing at first, so we just have to imitate the program language rules rarely when written to a certain time will find the same place

Print print ()

Raw_input ()

Pop ()

Insert ()

We don't know how it works, but we can think of it as a tool to implement one of our little functions.

Slowly get some of their own small ideas can be realized and then slowly there will be "programming ideas" this kind of thing. Know how to use Python to solve the things we usually want to solve and to write independently.

Write yourself, debug yourself wrong

Mistakes can not be read

A function you want to use doesn't know how to speak the language.

This can also be asked

Ask questions in the group later

To have a specific need to first think about the most important key to come out to ask General to ask no one will return to you but also some people think you are a beginner to answer the very detailed.

You ask questions, others are completely voluntary, others answer you, is someone else's kindness, others do not answer you, there is nothing wrong with the family. So, courtesy, patience, autonomy, persistence.

Finally, the basic study is really deep learning. It was a long process.

----------The following is a personal summary and collected to feel useful all kinds, very messy, can not see-----------

--

0 Programmer's contact with Python's knowledge discussion

https://www.zhihu.com/question/34907211

Paste Information Network disk link: Http://pan.baidu.com/s/1pJpIGlX Password: i1uh

Wheat Academy website Full set of video links: After registration for free watch http://www.maiziedu.com/course/python/?yy=qq0406

Artificial intelligence

http://python.jobbole.com/82007/

Flask

web.py

Bottle

Environment configuration

Http://www.askwj.com/thread-11-1-1.html

Multithreading

-->http://segmentfault.com/a/1190000000414339#articleheader3

Linux Disk Management

-

Http://www.cnblogs.com/mchina/p/linux-centos-logical-volume-manager-lvm.html

A set of Linux free video tutorials:

-Http://pan.baidu.com/s/1dDHAlGX

Programming Getting Started Guide v1.4

http://zhuanlan.zhihu.com/xiao-jing-mo/19959253

http://www.checkio.org/

Project Exercises

Python character encoding issues

Http://www.2cto.com/kf/201407/317866.html

Another article (with advertising)

Https://github.com/pythonpeixun/article/blob/master/python_bianma.md

http://drops.wooyun.org/papers/4751 Pyhook's article

Articles of the http://blog.csdn.net/column/details/why-bug.html reptile

__ Update About

An article on the learning direction of reptiles.

-->HTTP://WWW.IFORJ.COM/QUESTION/8

Recommended Tornado tutorial, http://old.sebug.net/paper/books/tornado/I used to webpy,flask, feel these in the structure are similar, webpy easier to use some, But as Facebook's recommended framework, I'm personally more inclined to use tornado

Recommend a good technical article to everyone, http://www.programcreek.com/2013/12/raw-type-set-vs-unbounded-wildcard-set/

By-Magic Valley

Chinese web

http://www.pythondoc.com/

Search Sites

http://www.aolsearch.com/

Pointer issues

The name of the local variable of the procedure and the global variable repeat the state of the variables in the current system on the heap, then write the value of the local variable, and then restore the system state from the heap before returning to the global

You can imagine a global environment in which the module is an environment in the global environment, and the variable names between the modules may be duplicated, so they are masked against each other.

Quoted from @autoria-Shenyang

The number and character of the same content only a memory address, even if the function in return return, as long as the same content that the memory address is the same, but the tuple, the list of the same content has a different memory address,

Pexcept about Command line interaction

Http://www.cnblogs.com/CheeseZH/archive/2012/11/05/2755107.html

http://oos.moxiecode.com/blog/index.php/experiments/javascript-webgl/

http://oos.moxiecode.com/js_webgl/ping_pong/

http://skyfen.iteye.com/blog/1009382

http://www.zhihu.com/question/19998865[pictures]

Http://www.cnblogs.com/holbrook/archive/2012/02/25/2357337.html

About the use of custom modules (packages)

Build a Mymoudle folder path a random

Build a mymoudle.pth (text document) write path A (do not add quotation marks)

Put the mymoudle.pth into

Python installation directory./lib/python2.7/site-packages/mymoudle.pth

Lib is the focus

Cell phone

/storage/emulated/0/com.hipipal.qpyplus/lib/python2.7/site-packages/mymoudle.pth

Module package (name)

__init__.py

my.py

http://blog.csdn.net/MyPC2010/article/details/8561572

Clear screen under the shell

http://www.zhihu.com/question/19942435

Know about Lambda

Liu Tengda, Linux C + + programmer

Users, Puer, users and other people agree

Look at the explanation of the high-order function in the construction and interpretation of computer program, you will be enlightened.

This basic knowledge, you should find a way to understand a thorough, do not have to ask on the network once, that will only add a lot of misunderstanding.

I'm not saying the bad things that other people are explaining, I mean, if you go to the textbook, the examples and languages that professors use, and other relevant explanations, will make you understand what's most essential.

Edited on 2014-08-27

Coding issues

From __future__ import unicode_literals

http://blog.csdn.net/qian_f/article/details/9631257

__ Update About

An article on the learning direction of reptiles.

-->HTTP://WWW.IFORJ.COM/QUESTION/8

Chinese web

http://www.pythondoc.com/

Search Sites

http://www.aolsearch.com/

Google Mirror

http://www.guge.org/

Http://v.youku.com/v_show/id_XNTIzNzE2NzQ4.html?x

Various language console

-http://codepad.org/

The basic introduction of the regular

-

Http://www.runoob.com/python/python-reg-expressions.html

___20150920. 20:30

Http://qpython.org/pyconchina2015/index.html?from=timeline&isappinstalled=0

Sp

http://python.usyiyi.cn/

↑ Standard Library Chinese web

Python Crawler Summary

-

Http://blog.sina.cn/dpool/blog/s/blog_98cf2a6f01015h79.html?vt=4

URLLIB2 Introduction-

Http://zhuoqiang.me/python-urllib2-usage.html

-

Google search

https://g.wen.lu/

-Modify Host

Https://github.com/racaljk/hosts

Https://github.com/vokins/simpleu both of them can be,

refers to the environment.

Learn maths well

Matrix theory or something.

Data is not taken from the database?

It's a good trouble to use a list before C.

Python Programmer Learning Roadmap:

-

--Data structures and algorithms--Linux environment--Software engineering--web development--git version control--communication skills and more.

C is good, I suggest it is a big sophomore to learn data structure algorithms and operating systems, junior can go to study reptiles and the like

For self-study, find the official standard library as needed.

-"The Wheat Academy Python Small White Primer 100 Q"-

"August 31, 2015 No. 04 question"

Q; What is the difference between "//" and "/" in Python

A Typically, the "/" arithmetic operator is calculated based on the data on either side of the participating operation, such as:

6/3 = 2; 6,3 are integers, then the result is an integer 2;

6.0/3.0 = 2.0; 6.0,3.0 is a floating-point number, then the result is also floating point 2.0, more precisely, as long as "/" on both sides of a count is a floating point, then the result is a floating point.

This was also stated before in the Python2.2 version, but Python's designers did not consider this to be a straightforward feature of Python, and thus added an arithmetic operator "//" to represent integer division in Python2.2 and later versions. Returns a maximum integer that is not greater than the result, while "/" is purely a representation of floating-point division, but, in order to compromise, all 2. x version, also for backwards compatibility, if you want to use "//", you must add a statement:

From __future__ Import Division

When you see this, "/" means floating-point division, which returns floating-point results; "//" represents integer division.

However, when the Python3.0 is released, there is no such compromise, "/" must indicate floating-point division, return floating-point results; "//" denotes integer division.

Wheat College Full-time update of IT courses in the entire network: http://www.maiziedu.com/

--"Wheat Academy, it online learning good work"--

-->

-"The Wheat Academy Python Small White Primer 100 Q"-

"September 02, 2015 No. 06 question"

The use of the Q:python operator * * and *

A: * * Two multiplication sign is the exponentiation, such as 2**4, the result is 2 4 times, the result is 16

A multiplication sign *, if the operand is two digits, which is the two numbers multiplied, such as 2*4, the result is 8

* If a string, list, tuple is multiplied by an integer n, returns a homogeneous object with all its elements repeating n times, such as "str" to return the string "Strstrstr"

If the * in front of the parameter in the function definition is represented by placing multiple parameters on the call into a tuple, * * means that the keyword argument when the function is called is placed in a dictionary

For example, define the following function

def func (*args):p rint (args)

Parameter args is a tuple (all-in-one) when calling a function with Func

http://www.maiziedu.com/course/python/

Project Combat

Project A: Write a function that can judge the number of ends

Requirements:

1. Receive the number entered by the user from the keyboard (note: The user may enter other characters other than the number)

2, the user input of the number passed to determine the number of functions to judge and return the final result output to the screen display

Note: If a number is exactly equal to the sum of its factors (except for an approximate number of itself), this number is called the "Finish".

such as 6=1+2+3

Item B: Calculation of profit for the month based on monthly bonuses

Requirements:

The bonuses awarded by the Enterprise are based on the profit percentage. Profit (I) less than or equal to $100,000, the bonus can be raised by 10%, the profit is higher than $100,000, less than $200,000, less than 100,000 of the portion of the 10% commission, higher than the portion of 100,000 yuan, Cocoa Commission 7.5%, 200,000 to 400,000, higher than 200,000 yuan of the portion, can commission 5% ; Between 400,000 and 600,000 is higher than the portion of 400,000 yuan, can commission 3%, 600,000 to 1 million, higher than 600,000 yuan portion, can commission 1.5%, higher than 1 million yuan, the portion of more than 1 million yuan by 1% Commission, from the keyboard input month profit I, the total bonus should be issued?

http://m.sohu.com/n/420677445/

Tools

Argv

From sys import ARGV

Script name space parameter a space parameter two ... = argv

Python script name space parameter one space parameter two

My Learning methods and learning process

Next to the learning process, I first contacted Python from second day. It was the S60 V3 series of smartphones that supported Python extensions and was deeply attracted by the extended software. For example, the picture editor, once participated in the Forum p chart activity I use it. Not to elaborate, many friends may have not contacted. That's the first time I've been interested in Python, and I'm going to learn that there are already py2.5, and there are Ides. Helpless at that time will not use the network to find resources, and there is no communication platform, a primer on the "Raw_input ()" was not understood at the time. Since then, the time jumped to the started playing against summer vacation, inadvertently found Qpython, mainly or so many years in the attempt to Baidu "Android Python" finally is interested in driving me to the present, of course, also have the perseverance.

Learning methods:

Junior High School will not talk about, talk about the real introduction, although always looking for information, but always do not know how to write, so try to browse Baidu Bar, looking for communication platform, but for self-scholars, I think the most important thing is to own the thinking, their own search, Google, all kinds of domestic technical forum, see, more absorption, Never encounter problems on the exchange platform to ask, ask no wrong, the focus is people willing to answer, like once I. There is not always watch the video, look at the data, have the problem to do, how much to do how much, the basic data structure, algorithm, basic grammar is to be practiced for a week (for beginners), even if you do not know what you are doing, but you can follow the tutorial, after all, the foundation is not, write what? That's what I've been telling myself. Because I can not resist the urge to ask questions. Finally, is to believe in themselves, believe that they can learn, believe that they can do, believe that they can do well. Continuous learning, continuous excavation, continuous improvement.

For example, once I was in a group, they will also hair problems to do, but I think for a long time did not want to come out, asked the group of owners, and everyone, the group said I now the foundation can not do, but I still comb the whole process, a function module a function to achieve, the final can achieve the basic requirements, is still stuck in

But the coding style is not good.

Learning is the practice, while learning to do is my greatest experience.

Be good at using mind map to divide the whole project into multiple function modules. Easy to manage. As for object programming, I have not been too thorough at present, will use a function to complete the entire program, I think the object programming better understand.

Basically temporarily said these, the language logic is not good, everybody tries to see, I will slowly improve, hope everybody contains.

Thank you.

Coding style

What I'm discovering now is that we have a function name and a variable name.

Put forward a few others suggested my

Function name: Def helloyou (): Def Fisrtsecondthird () The first word in lowercase, with the first letter of each word capitalized

Variable name My_moudle First_second_third each word separated by _

Because someone is different, so I mention, but this is just a habit problem, it all depends on their own aesthetic, good-looking, easy to read.

There are people who have criticized me not to use pinyin name.

Introductory material I'll do everything I can to screen you when you collect the information.

Two project activity sharing experience

The event of the award summary, the first to send the award process has not issued a notice, resulting in no careful follow group News people impatient, first to receive the prize, the other group of owners should have an award-winning list, otherwise someone will not send the wrong prize. Well, it's all my fault.

In fact, the code is published so that everyone can see the anonymous announcement, so that the learning effect is better

Hello everyone, my name is Banjarmasin, and now I am working in the sales of software in Beijing. Learning Python One is personal interest in the future want to learn network security, two is to become a know-how sales staff. Learning experience, code written is not very good, I think more practice, while writing while thinking, I look at the problem like the root of the bottom, to understand so far, never vague. Finally thanks to the Wheat Academy to provide this platform for everyone to learn, there is no understanding of the place, ask the big God in the group will be patient to reply, at present just finished the wheat College html+css Basic Primer Tutorial, now Learning Wheat College MySQL Basic tutorial, there is learning MySQL can communicate together, I will also continue to participate in the next Python project. Everyone encourage refueling.

Hello everyone, I ask Fang to come to Jean. Currently engaged in warehouse management work. Learning Python is just your personal interest. Start learning When you build your group ... Learn some basic tutorials ... Level is not high. Feel to learn the words or often practiced hand ... The idea to achieve is really a process ... Thanks to this platform, I also have the opportunity to learn and exchange with my little friends. And the little North old wet encouragement ... (In fact, small North is an old wet) ...

Books

Hello everyone, I am at present Shanghai study, chemistry related major, learned a month python, think of later can go to software development employment. I usually take a look at NetEase video, see the online tutorial Liao Xuefeng, and then self-made according to other people's reptile program to change their own, learned something. Other, later people said to solid foundation, to do Python100 problem, now I look at the basics of the knowledge of the basic aspects of the later plan to see the standard library. Finally, Python is just a tool, not too focused on tools, thinking and thinking, and theoretical accumulation is the cornerstone of deep learning.

Plutella

The university is the computer profession, has learned some technology, thought that the most important thing to learn programming is to write more to think, usually more records accumulate it, for example to write some blog or notes, there is self-control, after all, learning technology is a need to calm down the process of the heart.

Look at open source things, like GitHub and other sites, can broaden their horizons

Now in the wheat in the Python Enterprise Direct class, here will have a well-planned curriculum outline and detailed schedule, there is a teacher on-line guidance, learn to compare the system and can overcome self-control in the process of self-restraint is not strong shortcomings, each part has a small project, make will also have a sense of accomplishment, In short, it may be more directional and effective than self-study. Of course, interest is also very important in the enterprise direct class, there is a class, we learn together or a sense of belonging, there is an atmosphere in the direct class, each part has a small project to make a teacher will have a rating, there are class rankings, but also some sense of accomplishment of course self-study is also good, everyone learning habits, the same.

Image Library

Like the virtues of mathematic and maple.

Symbolic operations, SymPy, plotting, matplotlib, image processing, PiL and OPENCV.

Try not to add the data to the back. Use temporary variables

HTTP://PYTHON.JOBBOLE.COM/29281/25 English python ebook anyone want it?

http://python.jobbole.com/29281/[pictures] This is the link, but a bunch of English ebooks, I can not see

http://handsmart.blog.163.com/blog/static/13831785120141126345845/

Lamp

Science:

Input ()

Asks the user user to enter a Python object number string list dictionary or the variable name in front of it if it is a real object so if it is a string, add "" and return the object itself.

Raw_input ()

You can enter the string type that you entered.

So 1 and "1" are different.

Last Updated on

---2015.11.06_0:39

Python Data & personal daily summary _20151220

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.