# Library
# Abstractions-- list of books, lendbook, addbook, removebook
# Student
# - order book
# - return book| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Simple HTML Example</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| margin: 40px; |
| ### Keybase proof | |
| I hereby claim: | |
| * I am mysticbliss on github. | |
| * I am saqie (https://keybase.io/saqie) on keybase. | |
| * I have a public key ASDQHOYpCBJsOvBkw6SYayonsx2ejyCJKml1BCeCPKV5Pwo | |
| To claim this, I am signing this object: |
| ambari-server stop | |
| ambari-agent stop | |
| pkill -9 java | |
| ################################# | |
| # Remove Packages | |
| ################################ | |
| yum -y remove ambari-\* | |
| yum -y remove hcatalog\* | |
| yum -y remove hive\* |
Yield result one by one!
Generators are used to create iterators, but with a different approach. Generators are simple functions which return an iterable set of items, one at a time, in a special way.
When an iteration over a set of item starts using the for statement, the generator is run. Once the generator's function code reaches a "yield" statement, the generator yields its execution back to the for loop, returning a new value from the set. The generator function can generate as many values (possibly infinite) as it wants, yielding each one in its turn.
def fib():Python allows you to open files in one of the three modes.
They are:
read-only mode, write-only mode, read-write mode, and append mode by specifying the flags r, w, rw, a respectively.
A text file can be opened in any one of the above said modes by specifying the option t along with
r, w, rw, and a, so that the preceding modes become rt, wt, rwt, and at.
A binary file can be opened in any one of the above said modes by specifying the option b along with r, w, rw, and a so that the preceding modes become rb, wb, rwb, ab.
A quick guide on getting ready for tech interviews.
Before diving into code, most interviewers like to chitchat about your background. They're looking for:
- Metacognition about coding. Do you think about how to code well?
- Ownership/leadership. Do you see your work through to completion? Do you fix things that aren't quite right, even if you don't have to?
- Communication. Nerd out about stuff. Show you're proud of what you've done, you're amped about what they're doing, and you have opinions about languages and workflows.
- STAR (Situation, Task, Action, Result). It’s good to have a project in your back pocket that you can talk about in a direct and concise way.
| http://programmers.stackexchange.com/questions/21917/python-interview-questions | |
| https://github.com/sigmavirus24/python-interview-questions | |
| https://gist.github.com/xiangzhuyuan/7454001522d275021b2d | |
| https://github.com/ContinuumIO/interview-questions | |
| https://github.com/Flowerowl/python_articles | |
| http://marselester.com/preparation-to-python-interview.html | |
| https://github.com/zachwill/cracking-the-coding-interview | |
| http://www.bogotobogo.com/python/python_interview_questions.php | |
| https://www.quora.com/What-are-good-Python-interview-questions | |
| https://www.reddit.com/r/Python/comments/1knw7z/python_interview_questions |