background preloader

PythonMonk - Interactive Python tutorials

PythonMonk - Interactive Python tutorials

The Nature of Code Free Programming Resources Becoming a Pythonista — Platipy 0.2 documentation This chapter is will provide a very brief review of some important python concepts which will be useful and necessary. The basic concepts will be for those who are unfamiliar with Python, but a good refresher for those who don’t write in Python every day. Intermediate concepts will be great for programmers of all levels to refresh on some Python idioms. The code below will focus on Python 2.5+, since that is the version on most XO laptops. PEP8 and The Zen of Python¶ One of the most important aspects of developing in Python is the Python community. Use 4 spaces per indentation level. The Zen of Python is a list of guiding principles behind the design of Python, and a good list of guiding principles for any project written in python. Control Flow in Python¶ The if statement acts predictably in Python. >>> if <conditional>:... statement... elif <conditional>:... statement... else:... statement >>> for <item> in <sequence>:... statement >>> while <conditional>:... statement Numerics¶ Strings¶ Note

10 Things C++ Developers Learning C# Should Know After taking a lot of time with C# fundamentals, I decided to go down a different road this week and talk about some of the differences in C# that can be troublesome to people who are used to C++ development but are learning C#. My first post on this blog months ago was just a simple piece on how I divorced C++ as my first-love language (here). This is not to say that C++ is not still a valuable language, in fact as far as object-oriented languages go C++ is still king of performance. That said, C++ has a lot of quirks and idiosyncrasies due to its age and backward-compatibility with C that have caused it to take a back seat to C# and Java for business programming where time-to-market and maintainability are more important than having the absolute best performance. C# especially has made huge inroads into the business development market because it offers a lot of the power of C++ without a lot of the danger. 1. This one should be obvious, so I put it right up front. 2. 3. 4. 3: public:

objgraph 1.7.2 Draws Python object reference graphs with graphviz objgraph is a module that lets you visually explore Python object graphs. You'll need graphviz if you want to draw the pretty graphs. I recommend xdot for interactive use. pip install xdot should suffice; objgraph will automatically look for it in your PATH. Moved to GitHub.Python 3.4 support (LP#1270872).New function: is_proper_module.New shortnames argument for typestats, most_common_types, show_most_common_types, show_growth, show_refs, and show_backrefs.count and by_type accept fully-qualified type names now.Fixes issue 4. Bugfix: setup.py sdist was broken on Python 2.7 (UnicodeDecodeError in tarfile).The filename argument for show_refs and show_backrefs now allows arbitrary image formats, not just PNG. Bugfix: non-ASCII characters in object representations would break graph generation on Python 3.x, in some locales (e.g. with LC_ALL=C). Python 3 support, thanks to Stefano Rivera (fixes LP#687601).Removed weird weakref special-casing.

PythonBooks - Learn Python the easy way ! Developing Android Apps completely in Python The goal of this training is to show you how to start developing full Android applications using only Python. Different technologies will be demonstrated, including PySide-based QML GUIs using the Necessitas Qt port and the Py4A/SL4A-based approach, which can be combined with Android’s WebKit and re-use Python web frameworks. While Android already has a good SDK out of the box, being able to use Python instead of Java is a big advantage for some developers - it allows for quicker turnaround times, and reuse of Python libraries. The resulting PySide-based applications run on Android, but also at least on Mac OS X, Windows, Linux and Maemo and MeeGo - basically all platforms on which Qt is available.

Online Python Tutor - Learn programming by visualizing code execution teejeejee: Playing with C++0x -- lambdas C++0x has a workload of new features[2]... Today I'm having a look at lambdas. Lambdas are available in g++-4.5, for now only available in experimental. What are lambdas? Closures are a very powerful tool that are being retrofitted in many languages (for instance Java). Enough for theory, let's have a look at this new beast. How do they look like? [](int i) { return i + 1; }; This is the increment lambda. How to read this? Using a lambda To use it add arguments, for instance: [](int i) { return i + 1; }(0); would compute the value 1. Storing a lambda The type of a lambda is automatically deduced. auto inc = [](int i) { return i + 1; }; std::cout << inc(0) << std::endl; Notice that calling a named lambda is not different from calling a function. auto mult = [](int x, double y) -> double { return x * y; }; Capturing environment You can use lambdas to capture outter environment. void f() { int x = 5; [](int w) { return w + x; }(0); } void f() { int x = 5; [=](int w) { return w + x; }(0); } Yes, mutable.

A Working Introduction to Crypto with PyCrypto A Working Introduction to Crypto with PyCrypto filed under: cryptography, introduction, and python posted on 2011-06-17 Recently at work I have been using the PyCrypto libraries quite a bit. The documentation is pretty good, but there are a few areas that took me a bit to figure out. Some quick terminology: for those unfamiliar, I introduce the following terms: plaintext: the original messageciphertext: the message after cryptographic transformations are applied to obscure the original message.encrypt: producing ciphertext by applying cryptographic transformations to plaintext.decrypt: producing plaintext by applying cryptographic transformations to ciphertext.cipher: a particular set of cryptographic transformations providing means of both encryption and decryption.hash: a set of cryptographic transformations that take a large input and transform it to a unique (typically fixed-size) output. There are two basic types of ciphers: symmetric and public-key ciphers. What is a salt? Encryption

Hackasaurus Look ahead Learn all about Firefox OS » Welcome to Webmaker! That username is taken You must choose a username Invalid username. You must agree to our terms and conditions. X-Ray Goggles Remix and share web pages instantly Activate X-Ray Goggles See how Goggles work by swapping an image Copy this image URL (highlight the text below, right-click, then copy the link) The URL you just copied links to a new image! Share your remix When you're ready to share your remixed page, click the Publish button or press P on your keyboard. Help If you need help, make sure the X-Ray Goggles are activated, then press H on your keyboard. Remix any webpage! You can take X-Ray Goggles with you anywhere on the web: Make sure your web browser's bookmarks bar is enabled. Now visit any website on the internet.

100 Websites You Should Know and Use (updated!) In the spring of 2007, Julius Wiedemann, editor in charge at Taschen GmbH, gave a legendary TED University talk: an ultra-fast-moving ride through the “100 websites you should know and use.” Six years later, it remains one of the most viewed TED blog posts ever. Time for an update? We think so. Below, the 2013 edition of the 100 websites to put on your radar and in your browser. To see the original list, click here. And now, the original list from 2007, created by Julius Wiedemann, editor in charge at Taschen GmbH.

Related: