background preloader

Python

Python Wiki Python Wiki Python is a great object-oriented, interpreted, and interactive programming language. It is often compared (favorably of course ) to Lisp, Tcl, Perl, Ruby, C#, Visual Basic, Visual Fox Pro, Scheme or Java... and it's much more fun. Python combines remarkable power with very clear syntax. Getting Started Events, Courses, Conferences, Community Python Conferences - information about the Python conference scene Python Events - covers conferences, training courses and more Local User Groups - find a Python group near you Participating in the Community - where people using and producing Python get together Python Software Using this Wiki Feel free to add more useful stuff (see HelpContents and HelpOnEditing to learn how), but do us a favour and do tests in the WikiSandBox if you're not accustomed to Wiki technologies. See WikiGuidelines for details of the policies and rules governing this Wiki. See SiteImprovements for a discussion of improvements to this Wiki and other related sites.
Last week, we announced Free Dojo Support to help Dojo developers with their ongoing development efforts and improve the way they were using Dojo. Our First Question Our first question comes from Dojo user Abdullah H. Al-Shaikh who asked: I Have Been Working On Dojo For Quite Some Time Now… But I Can’t Put My Finger On The Proper Way To Start And Then Build A Stable Large Scale Dojo Project. Our Answer: It Depends First things first, we must clearly emphasize a key point in web development: There is no singular, “right” way to build a web application. Thankfully, the Dojo Toolkit, gives you many options to optimize for the specific requirements of your application. Base Assumptions First, to limit the complexity of our answer, we’ll assume that you are: Building an application from JavaScript and Dojo source without any particular server-side framework in mind. The SitePen Approach to building web apps is pragmatic and we use the following guidelines and best practices. Why this structure? What Is The Best Way To Start A Dojo Project? What Is The Best Way To Start A Dojo Project?
Description A Django external database backend for MS SQL Server that uses ODBC by employing the pyodbc library, supports SQL Server 2000 and 2005. Pyodbc seems to be a mature, viable way to access SQL Server from Python in multiple platforms and is actively maintained. Important If you are following Django trunk development and have revision 10026 or newer, the minimal development revision of django-pyodbc trunk you need to use is r157. Also, the DATABASE_ODBC_DRIVER, DATABASE_ODBC_DSN and DATABASE_ODBC_EXTRA_PARAMS settings were migrated to the DATABASE_OPTIONS dictionary setting in this revision. This is a backward-incompatible change for setups that were using at least one of these three settings. SVN trunk development follows closely Django development, so it needs a recent checkout of Django SVN trunk. See our News page. Features Works on Windows and Linux (using FreeTDS) Native Unicode support. Installation Install pyodbc. Configuration See Settings. Testing environments Tested on: Thanks django-pyodbc - MS SQL Server Django DB backend using pyodbc django-pyodbc - MS SQL Server Django DB backend using pyodbc
Floating-point representation Floating-point representation by Carl Burch, Hendrix College, September 2011 Floating-point representation by Carl Burch is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.Based on a work at www.toves.org/books/float/. Contents Representing numbers as integers in a fixed number of bits has some notable limitations. It can't handle numbers that have a fraction, like 3.14, and it isn't suitable for very large numbers that don't fit into 32 bits, like 6.02 × 1023. 1. One possibility for handling numbers with fractional parts is to add bits after the decimal point: The first bit after the decimal point is the halves place, the next bit the quarters place, the next bit the eighths place, and so on. Suppose that we want to represent 1.625(10). So the binary representation of 1.625 would be 1.101(2). The idea of fixed-point representation is to split the bits of the representation between the places to the left of the decimal point and places to the right of the decimal point. 2. 2.1. 2.2.
Python Django Software Development

Python

Todo desarrollador tiene herramientas particulares que le ayudan en su trabajo del día a día. En esta entrega te mostraremos un compendio de herramientas muy útiles al momento de programar con Python. BeeWare es una iniciativa que busca recopilar un conjunto de herramientas que faciliten la vida a los desarrolladores de Python. A diferencia de un IDE (entorno de desarrollo integrado) cada herramienta es independiente y se puede usar por separado. La filosofía del proyecto es la misma de UNIX: pequeñas herramientas que hagan tareas simples pero que en conjunto puedan lograr cosas mucho más complejas. Herramientas Entre las herramientas que proporciona BeeWare tenemos: Cricket: una herramienta gráfica para la ejecución de pruebas unitariasBugjar: una interfaz gráfica e interactiva para depurar código. Librerias BeeWare también dispone de librerías, entre ellas están: Beeware es Open Source y está disponible en Github, así que los curiosos o aquellos con ganas de colaborar son bienvenidos. BeeWare: Una colección de herramientas para Python BeeWare: Una colección de herramientas para Python
Libros que deberías leer si quieres aprender Python Anteriormente les hemos contado sobre recursos en línea para aprender a programar e incluso hemos destacado algunos muy buenos específicamente para aprender Python. Pues en esta entrega nos vamos por lo retro y te presentaremos 5 libros con los que puedes estudiar el lenguaje de programación Python. Learn Python the Hard Way Learn Python the Hard Way (o Aprende Python por el camino difícil, en español) es un libro que, a pesar del título, está orientado a principiantes con poco o ningún conocimiento sobre programación. Si bien no promete convertirte en un hacker de Python de la noche a la mañana, es una excelente herramienta para formarte unas bases sólidas y apuntarte en la dirección correcta para que continúes aprendiendo. A Byte of Python A Byte of Python es un libro muy similar a Learn Python The Hard Way, pero te ofrece una introducción más detallada de cómo obtener tu configuración ideal de Python y cómo lograr las cosas de forma rápida y sin sufrimiento. Think Python Learning Python Libros que deberías leer si quieres aprender Python
No se aprende a programar con un curso de 20 horas, ni mucho menos jugando, pero sí hay recursos que ayudan a entender la lógica de la programación, o que nos permiten conocer las bases de algún lenguaje específico. En la lista de hoy os mostramos algunos de estos recursos, juegos que han sido creados para ayudar a grandes y pequeños a entrar en un mundo extremadamente complejo, el de la programación. Los grandes programadores tienen muchos años de experiencia a sus espaldas, miles y miles de horas delante de funciones, procedimientos, clases y demás “palabrotas” del sector, pero todos ellos empezaron por algún lugar, en esta lista mostramos algunos de dichos lugares: – Check Io: Para aprender Python y Javascript en un entorno realmente moderno y agradable. Tenemos que construir una base espacial y conquistar otras a medida que programamos. – codingame.com: Nos ayuda a aprender a programar en más de 25 lenguajes diferentes. Como veis, opciones no faltan, así que ya no hay excusa. 10 juegos que ayudan a aprender a programar 10 juegos que ayudan a aprender a programar
blogs-python

Python Re Match, Search Examples
How can I make a chain of function decorators in Python?
Improve Your Python: Decorators Explained Improve Your Python: Decorators Explained I've previously written about "yield" and generators. In that article, I mention it's a topic that novices find confusing. The purpose and creation of decorators is another such topic (using them, however, is rather easy). In this post, you'll learn what decorators are, how they're created, and why they're so useful. A Brief Aside... Passing Functions Before we get started, recall that everything in Python is an object that can be treated like a value (e.g. functions, classes, modules). def is_even(value): """Return True if *value* is even.""" return (value % 2) == 0 def count_occurrences(target_list, predicate): """Return the number of times applying the callable *predicate* to a list element returns True.""" return sum([1 for e in target_list if predicate(e)]) my_predicate = is_evenmy_list = [2, 4, 6, 7, 9, 11]result = count_occurrences(my_list, my_predicate)print(result) The magic is in the lines my_predicate = is_even. Hopefully, this is all old hat to you. Returning Functions Raw Power
Python & VIM Resources

[PYTHON] Beginners Guide: NonProgrammers Python for Non-Programmers If you've never programmed before, the tutorials on this page are recommended for you; they don't assume that you have previous experience. If you have programming experience, also check out the BeginnersGuide/Programmers page. Books Each of these books can be purchased online and is also available as a completely free website. Automate the Boring Stuff with Python - Practical Programming for Total Beginners by Al Sweigart is "written for office workers, students, administrators, and anyone who uses a computer to learn how to code small, practical programs to automate tasks on their computer." Interactive Courses These sites give you instant feedback on programming problems that you can solve in your browser. CheckiO is a gamified website containing programming tasks that can be solved in either Python 2 or 3. K-12 Oriented (for Children) Build a "Pypet" Learn programming fundamentals in Python while building a tamagotchi style "Pypet" by Tatiana Tylosky. Videos
[PYTHON] Fundamentals: Creating a Pypet Python Programming Fundamentals Introduction About this Guide This guide was created for complete beginners (i.e. with no programming or computer science experience) and will teach you programming fundamentals in a language called Python. Following a project-driven learning philosophy you will learn as you build your own project. There will be GIFs and screenshots throughout this guide to make everything as clear as possible. As you complete this guide you'll be creating a virtual pet we'll call "Pypet" (a "Python-pet"). There are no software or computer requirements for this guide except that you need access to a web browser (which you obviously already have at this point). What is Python? Python is a scripting programming language known for both its simplicity and wide breadth of applications. Many Python programmers (aka “Pythonistas”) love this language because it maintains a certain philosophy of best practices, described in Tim Peter’s famous “Zen of Python”. Setup Creating Your Pypet [PYTHON] Fundamentals: Creating a Pypet
[PYTHON3] Invent with Python
BeginnersGuide New to programming? Python is free and easy to learn if you know where to start! This guide will help you to get started quickly. Chinese Translation New to Python? Read BeginnersGuide/Overview for a short explanation of what Python is. Getting Python Next, install the Python interpreter on your computer. There are also Python interpreter and IDE bundles available which are meant specifically for beginners. There are currently two major versions of Python available: Python 2 and Python 3. See BeginnersGuide/Download for instructions for downloading the correct version of Python. At some stage, you'll want to edit and save your program code. Learning Python Next, read a tutorial and try some simple experiments with your new Python interpreter. If you've never programmed before, see BeginnersGuide/NonProgrammers for a list of suitable tutorials. Most tutorials assume you know how to run a program on your computer. When you are ready to write your first program you will need a text editor. BeginnersGuide
About - Project Euler
GCSE Computing Python Programming Resources
Writing your first Django app, part 1 Let’s learn by example. Throughout this tutorial, we’ll walk you through the creation of a basic poll application. It’ll consist of two parts: A public site that lets people view polls and vote in them.An admin site that lets you add, change, and delete polls. We’ll assume you have Django installed already. $ python -c "import django; print(django.get_version())" If Django is installed, you should see the version of your installation. This tutorial is written for Django 1.9 and Python 3.4 or later. See How to install Django for advice on how to remove older versions of Django and install a newer one. Where to get help: If you’re having trouble going through this tutorial, please post a message to django-users or drop by #django on irc.freenode.net to chat with other Django users who might be able to help. Creating a project¶ If this is your first time using Django, you’ll have to take care of some initial setup. $ django-admin startproject mysite Note Where should this code live? These files are:
Virtual Environments virtualenv is a tool to create isolated Python environments. virtualenv creates a folder which contains all the necessary executables to use the packages that a Python project would need. Basic Usage Create a virtual environment for a project: $ cd my_project_folder $ virtualenv venv virtualenv venv will create a folder in the current directory which will contain the Python executable files, and a copy of the pip library which you can use to install other packages. This creates a copy of Python in whichever directory you ran the command in, placing it in a folder named venv. You can also use a Python interpreter of your choice. $ virtualenv -p /usr/bin/python2.7 venv This will use the Python interpreter in /usr/bin/python2.7 To begin using the virtual environment, it needs to be activated: $ source venv/bin/activate The name of the current virtual environment will now appear on the left of the prompt (e.g. Install packages as usual, for example: Other Notes $ pip freeze > requirements.txt
¿Cómo funciona Internet? | Django Girls Tutorial Este capitulo está inspirado por la charla "How the Internet works" de Jessica McKellar ( Apostamos que utilizas Internet todos los días. Pero, ¿sabes lo que pasa cuando escribes una dirección como en tu navegador y presionas 'Enter'? Lo primero que tienes que entender es que un sitio web es sólo un montón de archivos guardados en un disco duro. Al igual que tus películas, música o fotos. Si no estás familiarizada con la programación, puede ser difícil de captar HTML al principio, pero tus navegadores web (como Chrome, Safari, Firefox, etc.) lo aman. Como cualquier otro archivo, tenemos que guardar los archivos HTML en algún lugar de un disco duro. Ok, quizás te preguntes cómo luce Internet, ¿cierto? ¡Te hemos hecho una imagen! Parece un lío, ¿no? Es fascinante, ¿no? Se parece a esto: Tu carta va hacia la oficina de correo más cercana. Sí, es tan simple como eso. Basta de charlas, ¡pongamos manos a la obra!
The Django admin site One of the most powerful parts of Django is the automatic admin interface. It reads metadata from your models to provide a quick, model-centric interface where trusted users can manage content on your site. The admin’s recommended use is limited to an organization’s internal management tool. It’s not intended for building your entire front end around. The admin has many hooks for customization, but beware of trying to use those hooks exclusively. If you need to provide a more process-centric interface that abstracts away the implementation details of database tables and fields, then it’s probably time to write your own views. In this document we discuss how to activate, use, and customize Django’s admin interface. Overview¶ The admin is enabled in the default project template used by startproject. For reference, here are the requirements: After you’ve taken these steps, you’ll be able to use your Django admin site by visiting the URL you hooked it into (/admin/, by default). Other topics¶
Dominio | Django Girls Tutorial
PYTHON / DJANGO

Online Python Tutor - Learn programming by visualizing code execution
Python programming

For Beginners
BeginnersGuide
Good code in Python

Code Like a Pythonista: Idiomatic Python
Python Module Import: Single-line vs Multi-line
Idiomatic Python: EAFP versus LBYL | Python Engineering at Microsoft
GitHub - ebranca/owasp-pysec: OWASP Python Security Project
OWASP Python Security Project
SandboxedPython
Download Anaconda now! | Continuum
Python « Steve Byrnes's Homepage
Python quant

AWS-Python

EasyInstall - The PEAK Developers' Center
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.
FlyTrapMind/gitsome: A supercharged Git/GitHub command line interface (CLI).
Clues & Hints
python code in ahk script
python code in ahk code
Serios Python

Python for Scientific Computing

Python-django

Python Libs

Langage python