background preloader

ArtShowOS

Facebook Twitter

Tech Tip: Really Simple HTTP Server with Python. If you need a quick web server running and you don't want to mess with setting up apache or something similar, then Python can help. Python comes with a simple builtin HTTP server. With the help of this little HTTP server you can turn any directory in your system into your web server directory. The only thing you need to have installed is Python. Practically speaking this is very useful to share files inside your local network. Implementing this tiny but hugely useful HTTP server is very simple, its just a single line command. Assume that I would like to share the directory /home/hisam and my IP address is 192.168.1.2 Open up a terminal and type: $ cd /home/somedir $ python -m SimpleHTTPServer That's it!

Serving HTTP on 0.0.0.0 port 8000 ... Now open a browser and type the following address: You can also access it via: If the directory has a file named index.html, that file will be served as the initial file. If you wish to change the port that's used start the program via: Instagram Cofounder: Here's How We Scaled Into A Billion Dollar Company [DECK] #plymbas7. Using JavaScript and forms. Javascript wears many hats. You can use JavaScript to create special effects.

You can use JavaScript to make your HTML pages "smarter" by exploiting its decision-making capabilities. And you can use JavaScript to enhance HTML forms. This last application is of particular importance. Of all the hats JavaScript can wear, its form processing features are among the most sought and used. Nothing strikes more fear in the heart of a Web publisher than these three letters: C-G-I.

With JavaScript at your side, you can process simple forms without invoking the server. Learning JavaScript This article is part of the JavaWorld technical content archive. Creating the form There are few differences between a straight HTML form and a JavaScript-enhanced form. Typical form control objects -- also called "widgets" -- include the following: I won't bother enumerating all the attributes of these controls (widgets), and how to use them in HTML. The typical form looks like this.

Listing 1. testform.html. Clean and pure CSS FORM design. LESS « The Dynamic Stylesheet language. Nom de Strip - Arts & Culture Plymouth. The Semantic Grid System: Page Layout For Tomorrow - Smashing Magazine. Advertisement CSS grid frameworks can make your life easier, but they’re not without their faults. Fortunately for us, modern techniques offer a new approach to constructing page layouts. But before getting to the solution, we must first understand the three seemingly insurmountable flaws currently affecting CSS grids. Problems Problem #1: They’re Not Semantic The biggest complaint I’ve heard from purists since I created The 1KB CSS Grid two years ago is that CSS grid systems don’t allow for a proper separation of mark-up and presentation.

Floated elements must also be cleared, often requiring unnecessary elements to be added to the page. <div class="grid_3"> 220 </div><div class="grid_9"> 700 </div><div class="clear"></div> Problem #2: They’re Not Fluid While CSS grids work well for fixed-width layouts, dealing with fluid percentages is trickier.

But when .grid_3 appears inside of a .grid_6 cell, the percentages must be recalculated. Problem #3: They’re Not Responsive Blame It On The Tools. Flash QRcode reader as3 – kasperkamperman.com : creative media technology. [update] Paul Hinrichsen pointed me to a new implementation of a QRCode Reader (Adobe Native Extension) build by Sbhave. It works BRILLIANTLY and VERY fast. It is built for Flex but there is also a build for Flash CS6 which is easy to set up. A native extension is really fast code (mostly c++, with a Actionscript API). More info in this discussion: Google code project page: QRcode reader implementation that uses the QRCode Reader by Logosware (Libspark project). Code is improved with Adaptive Threshold (by Quasimondo) and other small modifications to improve the QRcode detection. Modifications Implemented Adaptive Threshold by Quasimondo (Mario Klingemann) in the GetQRimage Class.Added the substract blur method that Mario Klingemann explains in his lecture about the process of reading QR codes.

The user interface uses the minimalcomps by Keith Peters (bit-101) and the Hi-Res! Used resources. URL dispatcher. A clean, elegant URL scheme is an important detail in a high-quality Web application. Django lets you design URLs however you want, with no framework limitations. There’s no .php or .cgi required, and certainly none of that 0,2097,1-1-1928,00 nonsense. See Cool URIs don’t change, by World Wide Web creator Tim Berners-Lee, for excellent arguments on why URLs should be clean and usable. Overview To design URLs for an app, you create a Python module informally called a URLconf (URL configuration).

This mapping can be as short or as long as needed. Django also provides a way to translate URLs according to the active language. How Django processes a request When a user requests a page from your Django-powered site, this is the algorithm the system follows to determine which Python code to execute: Django determines the root URLconf module to use. Example Here’s a sample URLconf: Notes: Example requests: A request to /articles/2005/03/ would match the third entry in the list. Named groups Performance. Top 10 Mobile Web Development JavaScript Frameworks. By Jacob Gube Creating web apps and sites for the Mobile Web has its own sets of challenges and techniques. From UIs optimized for fingers instead of mouse cursors to the bandwidth limitations that most portable personal devices have, developing for mobile devices requires a paradigm shift for those of us who’ve traditionally created products aimed at desktops.

To help you rapidly deploy cross-platform mobile apps and websites, there’s a wide range of JavaScript frameworks you can take advantage of. Some common characteristics of JavaScript mobile web development frameworks: Optimized for touchscreen devices: Fingers as input devices instead of mouse cursors provide an extra set of challenges in user interface design.

In this article, you’ll find my top picks of JavaScript mobile web development frameworks you should consider using to build your next mobile web app or website. 1. jQuery Mobile 2. 3. 4. 5. xui.js 6. 7. zepto.js 8. 9. 10. Other JavaScript Libraries for Mobile Web Development. Python-weather-api - A python wrapper around the Yahoo! Weather, Google Weather and NOAA APIs. The module provides a python wrapper around the Yahoo! Weather, Weather.com and NOAA APIs. Authors: Eugene Kaznacheev <qetzal@gmail.com> Joshua Tasker <jtasker@gmail.com> (pywapi - Python Weather API) From source Download the latest pywapi library from: Untar the source distribution and run: $ python setup.py build $ python setup.py install View the trunk at: Check out the latest development version anonymously with: svn checkout python-weather-api-read-only Yahoo!

Use the following function, that fetches weather report from Yahoo location_id: A five digit US zip code or location ID. Units: type of units. Returns: weather_data: a dictionary of weather data that exists in XML feed. Weather.com Use the following function, that fetches weather report from Weather.com More examples Script import pywapiimport string. Python-twitter - A python wrapper around the Twitter API. GitHub is now the "source of truth" but I will always try to update to this project page. A Python wrapper around the Twitter API Author: The Python-Twitter Developers <python-twitter@googlegroups.com> Introduction This library provides a pure Python interface for the Twitter API.

Twitter ( provides a service that allows people to connect via the web, IM, and SMS. Building From source: Install the dependencies: Download the latest python-twitter library from: Extract the source distribution and run: $ python setup.py build $ python setup.py install Testing With setuptools installed: $ python setup.py test Without setuptools installed: $ python twitter_test.py Getting the code View the trunk at: Documentation Using Todo. Prettier Accessible Forms. It can be time consuming to make web forms both pretty and accessible. In particular, laying out forms where the form label and input are horizontally adjacent, as in the image below, can be a real problem. We used to use tables, which worked well in this scenario—but forms don’t constitute tabular data, so it’s a semantic faux pas Article Continues Below I’ve tried to create a form-styling solution that is both accessible and portable (in the sense that I can move the code from one project to the next).

Floats have often provided a solution to my problem, but given the complexity of some layouts and the numerous float bugs associated with Internet Explorer, it’s not always easy to reuse a float solution. I wanted to create something that anyone could easily reuse on any project: a style sheet that, when applied to a correctly marked up HTML form, would produce the basis of the required layout. Marking up the form#section1 The most important part of a form is the HTML we use to build it. Best CSS Forms. CSS has transformed the way forms used to get designed. CSS helps you make really good and attractive forms. Prior to this (CSS) the forms found on the web were very boring and were not able to attract a lot of visitors. Attractive or user-friendly forms can divert a lot of attention to itself.

Even a simple form designed on CSS look slick and stylish. Using CSS form, you do not need to design the form from scratch. 1- Good Looking Form Without Table This tutorial will explain how to design good form using clean CSS design with only label and input tags to simulate an HTML table structure. 2- Nice & Simple Contact Form Simple CSS Forms is an easily-customizable forms setup that helps you create quick prototypes and final products of web sites. 3- CSS Globe Web Form Styles CSS Globe offers 5 web form styles, ranging from dark-and-slick to fun handwritten to old-fashioned letter envelope and more. 4- Semantic Horizontal Form 5- Veerle’s Blue CSS Form 6- Prettier Accessible Forms 10- Nice Form. What are you working on? Django tips: laying out an application. Continuing the theme of dealing with common questions from the Django mailing lists and IRC channel, today we’ll look at how to organize the various bits of a Django-based project or application.

Projects versus applications This is really more of a separate (though related) question, but understanding the distinction Django draws between a “project” and an “application” is a big part of good code layout. Roughly speaking, this is what the two terms mean: An application tries to provide a single, relatively self-contained set of related functions. An application is allowed to define a set of models (though it doesn’t have to) and to define and register custom template tags and filters (though, again, it doesn’t have to). A project is a collection of applications, installed into the same database, and all using the same settings file. Default project-level file layout When you run django-admin.py startproject, Django will automatically create a new directory containing four files: A Simple Step-by-Step Reportlab Tutorial.

The subtitle for this article could easily be “How To Create PDFs with Python”, but WordPress doesn’t support that. Anyway, the premier PDF library in Python is Reportlab. It is not distributed with that standard library, so you’ll need to download it if you want to run the examples in this tutorial. There will also be at least one example of how to put an image into a PDF, which means you’ll also need the Python Imaging Library (PIL). As I understand it, Reportlab is compatible with Python 2.x, IronPython and Jython.

They are currently working on a port for Python 3.x (or will be soon). Installation Reportlab supports most of the normal Python installation methods. Creating a Simple PDF Reportlab has decent documentation. In Reportlab, the lowest-level component that’s used regularly is the canvas object from the pdfgen package. From reportlab.pdfgen import canvas c = canvas.Canvas("hello.pdf") c.drawString(100,750,"Welcome to Reportlab! ") That was easy! A Little Form, Little Function. (full) easy authentication, using django.contrib.auth (end) 7. Templates are here, ordered as in urls.py provided in the previous post: - accounts/base.html <html><head></head><body> {% block content %} {% endblock %} </body></html> - accounts/login.htnl - accounts/logged_out.html {% extends "accounts/base.html" %} {% block content %} <p>You have been logged out.

</p><a href="{% url django.contrib.auth.views.login %}">Login again</a> {% endblock %} - accounts/password_change_form.html - accounts/password_change_done.html {% extends "accounts/base.html" %} {% block content %} <p> Password successfully changed. . - accounts/password_reset_form.html - accounts/password_reset_done.html {% extends "accounts/base.html" %} {% block content %} An email have been sent to you, with the instructions to follow. {% endblock %} - accounts/password_reset_confirm.html - accounts/password_reset_complete.html {% extends "accounts/base.html" %} {% block content %} Password reset done. . - accounts/password_reset_email.html - accounts/signup_form.html - accounts/signup_done.html 8. Ubernostrum / django-registration / source – Bitbucket. Several form classes are provided with django-registration, covering common cases for gathering account information and implementing common constraints for user registration.

These forms were designed with django-registration's in mind, but may also be useful in other situations. A simple form for registering an account. Has the following fields, all of which are required: username The username to use for the new account. This is represented as a text input which validates that the username is unique, consists entirely of alphanumeric characters and underscores and is at most 30 characters in length. email The email address to use for the new account.

Password1 The password to use for the new account. Password2 The constraints on usernames and email addresses match those enforced by Django's default authentication backend for instances of django.contrib.auth.models.User. A subclass of which adds one additional, required field: tos. User authentication in Django. Django comes with a user authentication system.

It handles user accounts, groups, permissions and cookie-based user sessions. This section of the documentation explains how the default implementation works out of the box, as well as how to extend and customize it to suit your project’s needs. Overview The Django authentication system handles both authentication and authorization. The auth system consists of: UsersPermissions: Binary (yes/no) flags designating whether a user may perform a certain task.Groups: A generic way of applying labels and permissions to more than one user.A configurable password hashing systemForms and view tools for logging in users, or restricting contentA pluggable backend system The authentication system in Django aims to be very generic and doesn’t provide some features commonly found in web authentication systems. Password strength checkingThrottling of login attemptsAuthentication against third-parties (OAuth, for example) Installation Having trouble?

Django Tutorial: A Simple Forum - Part III - Django by Example. Jespern / django-piston / wiki / Home – Bitbucket. PDF Toolkit documentation — reportlab v2.4 documentation. Configuring other mail clients - Gmail Help. Gmail and Django - ltslashgt. Web Design Video and Development Tutorial Library // Think Vitamin Membership. Custom template tags and filters. Outputting PDFs with Django. Filter to generate QR codes. ‪Full Django Tutorial Playlist‬‏ A Detailed Django Tutorial: Blog Basics Part IV. Model instance reference. Sending e-mail. Ethnography. ArtTheoryMap20100905103543-llfocrmsjlrckoy.png (1800×872)

Git Book - Basic Branching and Merging. Django documentation. Serving Static Content With Django. Django Packages : django reusable apps, sites and tools directory. An ultimate HTML5 cheatsheet you must have. Table of Contents. Semantics. Writing your first Django app, part 4. Humans TXT: We Are People, Not Machines. Plymbas7 - Home of the British Art Show 7 in Plymouth. Plymouth City Council - Plymouth Visual Arts Consortium. Plymouth Visual Arts. Include captchas from recaptcha.net.