background preloader

How to Think Like a Computer Scientist — How to Think Like a Computer Scientist: Learning with Python 2nd Edition documentation

How to Think Like a Computer Scientist — How to Think Like a Computer Scientist: Learning with Python 2nd Edition documentation
Navigation How to Think Like a Computer Scientist¶ Learning with Python¶ 2nd Edition (Using Python 2.x) by Jeffrey Elkner, Allen B. Last Updated: 21 April 2012 Copyright NoticeForewordPrefaceContributor ListChapter 1 The way of the programChapter 2 Variables, expressions, and statementsChapter 3 FunctionsChapter 4 ConditionalsChapter 5 Fruitful functionsChapter 6 IterationChapter 7 StringsChapter 8 Case Study: CatchChapter 9 ListsChapter 10 Modules and filesChapter 11 Recursion and exceptionsChapter 12 DictionariesChapter 13 Classes and objectsChapter 14 Classes and functionsChapter 15 Classes and methodsChapter 16 Sets of ObjectsChapter 17 InheritanceChapter 18 Linked ListsChapter 19 StacksChapter 20 QueuesChapter 21 TreesAppendix A DebuggingAppendix B GASPAppendix c Configuring Ubuntu for Python DevelopmentAppendix D Customizing and Contributing to the BookGNU Free Document License Search Page © Copyright 2010, Jeffrey Elkner, Allen B.

5 Ways To Learn Code From Your Own Browser One of the big trends of the past couple years, spurred the growing demand for programmers, is the rise of in-browser programming tutorials. Gone are the days when you’d have to buy a book and configure a development environment before you could get your hands dirty with a little code. Maybe you want to start learning on your work computer and don’t have access to install a programming environment. Or maybe you want to get started right away and don’t want to deal with ordering books or installing software. 1. Eloquent JavaScript is actually a computer science book but it’s available on the web for free. 2. We’ve covered Codecademy and its mission to bring code literacy to the masses several times before. 3. Last week the Khan Academy revamped its computer science section to include a set of in-browser JavaScript tutorials. 4. Code School‘ offers a mix of free and paid in-browser courses, many of which are aimed at more accomplished programmers. 5. Bonus 1: Programr Bonus 2: Try Ruby

python3 How to Think Like a Computer Scientist — How to Think Like a Computer Scientist: Learning with Python 3 Version date: October 2012 by Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers (based on 2nd edition by Jeffrey Elkner, Allen B. Corresponding author: Source repository is at For offline use, download a zip file of the html or a pdf version (the pdf is updated less often) from Search PageCopyright NoticeForewordPrefacePreface-3 This Rhodes Local Edition (RLE) of the bookContributor ListChapter 1 The way of the programChapter 2 Variables, expressions, and statementsChapter 3 Hello, little turtles! Simple math of everything But for people who can read calculus, and sometimes just plain algebra, the drop-dead basic mathematics of a field may not take that long to learn. And it's likely to change your outlook on life more than the math-free popularizations or the highly technical math. Computer science Amdahl's law Relates the speedup of a sub-task to the resulting speedup of the whole. on Wikipedia, long with examples on MathWorld, short without examples Asymptotic notation Used to abstract away units and fixed overhead when analyzing resource usage. Deterministic finite state automata Traditional square one of theoretical computer science, with many practical applications. The pumping lemma for regular languages Illustrates many recurring themes. at Penn Engineering, explanation and examples handout (PDF) with concise statement and examples Cantor's diagonal argument An astonishingly elegant technique for proving certain kinds of theorems. on Wikipedia, definition and a step-through of the proof Halting Problem

PEP 8 -- Style Guide for Python Code Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Cython, Psyco, and such).For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b. This optimization is fragile even in CPython (it only works for some types) and isn't present at all in implementations that don't use refcounting. In performance sensitive parts of the library, the ''.join() form should be used instead. This will ensure that concatenation occurs in linear time across various implementations.Comparisons to singletons like None should always be done with is or is not, never the equality operators.Also, beware of writing if x when you really mean if x is not None -- e.g. when testing whether a variable or argument that defaults to None was set to some other value. The other value might have a type (such as a container) that could be false in a boolean context!

Tutorials | Kaggle ML Data Science This article is a stub. You can help us by expanding it. Tutorials by Kaggle Getting Started With Python For Data Science Our product wiz Chris introduces you to the use of the Python programming language for data science including environment setup and code examples. Getting in Shape for The Sport of Data Science ( A tutorial by our chief scientist, Jeremy Howard, giving a brief overview of a (highly successful) data scientist's toolkit. Getting Started competitions Digit Recognizer The goal in this competition is to take an image of a handwritten single digit, and determine what that digit is. Titanic: Machine Learning from Disaster This competition, in which we ask you to predict who was likely to survive the wreck of the Titanic, provides an ideal starting place for people who may not have a lot of experience in data science and machine learning. Data Analysis in R twotorials: Two minute tutorials for R Learn how to do stuff in R in two minutes or less. 1. 2. 3. 4. 5. 6. Dr.

labs :: 10 Python pitfalls (or however many I'll find ;-) These are not necessarily warts or flaws; rather, they are (side effects of) language features that often trip up newbies, and sometimes experienced programmers. Incomplete understanding of some core Python behavior may cause people to get bitten by these. This document is meant as some sort of guideline to those who are new to Python. 1. OK, this is a cheesy one to start with. Solution: Indent consistently. 2. People coming from statically typed languages like Pascal and C often assume that Python variables and assignment work the same as in their language of choice. a = b = 3 a = 4 print a, b # 4, 3 However, then they run into trouble when using mutable objects. a = [1, 2, 3] b = a a.append(4) print b # b is now [1, 2, 3, 4] as well The idea that mutable and immutable objects are treated differently when doing assignment, is incorrect. Solution: Read this. 3. x += 42; is syntactic sugar for x = x + 42; So, you might think that it's the same in Python. 4. and

Machine Learning Andrew Ng Open-Classroom notes videos Stanford Course Description In this course, you'll learn about some of the most widely used and successful machine learning techniques. You'll have the opportunity to implement these algorithms yourself, and gain practice with them. You will also learn some of practical hands-on tricks and techniques (rarely discussed in textbooks) that help get learning algorithms to work well. This is an "applied" machine learning class, and we emphasize the intuitions and know-how needed to get learning algorithms to work in practice, rather than the mathematical derivations. Familiarity with programming, basic linear algebra (matrices, vectors, matrix-vector multiplication), and basic probability (random variables, basic properties of probability) is assumed.

labs :: Python beginner's mistakes Every Python programmer had to learn the language at one time, and started out as a beginner. Beginners make mistakes. This article highlights a few common mistakes, including some I made myself. Beginner's mistakes are not Python's fault, nor the beginner's. To put it another way, the mistakes in this article are often cases of "the wrong tool for the job", rather than coding errors or sneaky language traps. Mistake 1: trying to do low-level operations Python is sometimes described as a VHLL, a Very High-Level Language. This doesn't mean that it isn't possible to do these things with Python; but it's probably just not the right language for these jobs. Mistake 2: writing "language X" code in Python This is a mistake that is almost unavoidable. Some notorious symptoms of "language X" code, and the languages that may cause them: The point here is not to slam the language that you're used to (although that is always fun ;-). This one requires some clarification. Some advice

Hone your skills with bite-sized E-learning Busy people rarely have time to hone their technical and business skills, yet it's critical to stay ahead of the curve. The solution? Online training. With most E-learning courses, you can proceed at your own pace in your own time (though a few instructor-led classes have fixed schedules). You can review material during a coffee break, or spend time on the laptop while your spouse is engrossed in a television show you can't stand. There are free training options, and some courses will even provide a credential or certificate to hang on your wall, while others provide the curriculum necessary to later pass a certification exam at an accredited testing agency. Whether you learn best by reading, listening or watching video - and you can find out at Learning Styles Online - there's is probably something that will suit your style. Adobe Adobe offers video training on Adobe TV. Microsoft The software giant offers an amazing collection of material, much of it free. Varied content Hewlett-Packard