Subscribe to an RSS feed for this tag
Entries tagged with python
-
Title: As-You-Type Slug Uniqueness Validation
Tags: JQuery django python
Series: Django, jQuery & AjaxThis final entry in the Django, jQuery & Ajax series takes a look at implementing as-you-type validation for slug uniqueness. It's a bit briefer than the first three, but leaves the tutorial's Notes app with a bit of Ajax charm.
-
Title: Intricate Static Websites With Django Templates
Tags: django pythonOver the weekend I needed to create a slightly complex static website, and decided to make a go at using Django templates to build it. I was not disappointed.
-
Title: Sparklines.js Port to Python
Tags: Sparklines.js pythonHere is an incomplete and imperfect port of Sparklines.js to Python, extracted from an incomplete project that has lost much of its momentum.
-
Title: Extracting Data From Google Analytics Reports
Tags: pythonToday I'm releasing a Python library I put together a few months back, which supports extracting data from exported Google Analytics reports into simple Python data structures (dictionaries, lists, and datetimes). Using it you can easily run custom analysis of your GA data without any hassle.
-
Title: Epic PyObjC, Part 5: Resources and Farewell
Tags: Cocoa OS X PyObjC python
Series: An Epic Introduction to PyObjCThis brief final segment of the Epic PyObjC tutorial series looks at a few statistics from the series, and also I recommend a few resources for moving forward.
-
Title: Epic PyObjc, Part 4: Drag & Drop, Multiple Nibs
Tags: Cocoa OS X PyObjC python
Series: An Epic Introduction to PyObjCIn this fourth segment of the Epic PyObjC tutorial we take a look at implementing drag and drop in two different ways, as well as using multiple nibs in one application. This is the final segment of Epic PyObjC that focuses on this project; the fifth one will be a collection of resources about continuing with Cocoa and PyObjC.
-
Title: Epic PyObjC, Part 3: Browsing, Caching, Indicating
Tags: Cocoa OS X PyObjC python
Series: An Epic Introduction to PyObjCIn this third segment of the Epic Introduction to PyObjC and Cocoa we spend some time in the standard application development workflow of iterating new idea from concept into feature. First, we have double clicking an entry open its page on FreeBase.com, then add disk based caching of results, and we end by adding an indicator to reassure users that the app hasn't frozen while retrieving data from Metaweb.
-
Title: Epic PyObjC, Part 2: Adding a Library & Bindings
Tags: Cocoa PyObjC python
Series: An Epic Introduction to PyObjCThis is the second segment of the Epic Introduction to PyObjC tutorial series. This time we're looking at integrating the simple metaweb.py library into our project, as well as using Cocoa Bindings and an NSArrayController to make setting up an NSTableView as easy as possible.
-
Title: An Epic Introduction to PyObjC and Cocoa
Tags: Cocoa PyObjC python
Series: An Epic Introduction to PyObjCPyObjC is one of the most helpful projects I have ever used, but a number of individuals have been having trouble getting started with PyObjC on Leopard because the documentation is in a bit of a disarray. In particular, there didn't seem to be a comprehensive tutorial that could introduce a newcomer to all the important aspects of PyobjC, and that was completely up to date. Here is my attempt to fill that void. With a vengeance.
-
Title: An Introduction to Compassionate Screen Scraping
Tags: python screen scrapingOne of the most common quickie projects on the web is to screenscrape a website and play around with its data. These projects are a lot of fun, and can allow for inventive mashups, but often the screepscraping scripts cause unnecessary load on the site's servers due to inconsiderate technique. This is an introduction to the art of compassionate screenscraping.
-
Title: A Syntax Coloring Template Filter for Django
Tags: django pythonI spent a bit of time this evening writing a template filter for Django that accepts a string of code (and optionally the name of the Pygments lexer to use for highlighting) and returns the code nicely syntax colored. A simple but slightly helpful addition to your templating arsenal.
-
Title: Python Content Scraper for OneManga.com
Tags: python screen scrapingI spent a while today writing a fairly kind content scraper for OneManga.com, which shows how to use Python's httplib2 and BeautifulSoup to scrape data with a flexible api and minimal http connections.
-
Title: BossArray for list-like Yahoo search results
Tags: BOSS pythonI recently put together BossArray, which is a simple wrapper around the Yahoo BOSS search results (relying on the Yahoo BOSS Mashup Framework for the heavy lifting). It provides a dirt simple interface mimicking a normal Python list for most interaction.
-
Title: Stripping Reddit From HackerNews With BOSS Mashup
Tags: BOSS pythonThis tutorial looks at using the Yahoo BOSS Mashup Framework (a simple Python library) to retrieve the RSS feeds for HackerNews and Reddit Programming and strip the union of those results from HackerNews, returning HackerNews to an earlier era.
-
Title: Search Recipes for Yahoo's BOSS in Python
Tags: BOSS pythonThis entry is a bit of a cookbook for using Yahoo's Python library for accessing the BOSS Mashup Framework. It has full examples for searching the web, images, news , for paginating results, and for limiting searches to specific domains.
-
Title: JSON, Object Oriented Views, and Starting a Real App
Tags: django python
Series: Wielding DjangoThe third installment of Ken Arnold's series, *Wielding Django*. After examining some Django basics for the first two entries, Ken starts looking at more advanced techniques in this entry, some of which can really transform how you'll look at Django views in the future. He also lays the foundation for the application he'll be using to demonstrate more Django techniques and practices as his series continues.
-
Title: Minimalism
Tags: django python
Series: Wielding DjangoThe first part of a series written by <a href="/author/ken-arnold">Kenneth Arnold</a>. The series, Wielding Django, looks at stripping the complexity away from Django so that it is easy--perhaps even PHP-like--to use it for small projects.
-
Title: Deployment Scripts With BeautifulSoup
Tags: ptd python
Series: Implementing Processed Tower DefenseRecently I have been doing a lot of website deployment and various repetitive but slightly complex html hackery in order to flesh out simple templates with content stolen from other pages of html. Although it could have been a bit frustrating, with the help of BeautifulSoup it has been a fun ride.
-
Title: Using Optional Parameters in Django Urls
Tags: django pythonA simple but helpful trick for using optional parameters in Django views to allow one view to serve multiple urls with varying parameters.
-
Title: Cleanly Extending Python Markdown with Syntax Highlighting
Tags: markdown pythonA look at extending the Python Markdown library. It happens to be an extremely well written library, so extending it is a bit more fun than it ought to be. Take a look.
-
Title: Accolades for Pygments 0.9
Tags: pythonPygments 0.9 adds lexers for Common Lisp along with a handful of other languages. I am an unabashed fan.
-
Title: Using PyFacebook without the Facebook middleware
Tags: Facebook PyFacebook django pythonI've been working on a Facebook application with a couple of friends recently. We decided to use <a href="http://www.djangoproject.com>Django</a> and the <a href="http://code.google.com/p/pyfacebook/">PyFacebook</a> library, but there was a brief period of intense confusion on my part about how to use the PyFacebook library without the included middleware. I worked through it, though, and this article has some advice on how you can do the same.
-
Title: Adding Social Bookmarking To a Django App
Tags: django python
Series: Django Blog SeriesAdding support for submitting your Django content to social bookmarking and news sites is a nice addition to any website. Here are my instructions for doing so, based on my experience of adding social support to this blog.
-
Title: Syntax Highlighting with MarkDown, and a pinch of Automagick for Django
Tags: django python
Series: Django Blog SeriesIt can be a bit awkward to implement MarkDown and Code Syntax highlighting together in your Django applications. But making them play nicely together doesn't have to be a hassle. Beyond that, its about time to teach your Django blog to automagickly create MarkDown references for you. If only it would stop begging at the dinner table...
-
Title: Extracting Models From Django Datadump
Tags: django pythonLast week I made a sweep of breaking changes (hopefully the last one for a long time) in my blogging software, and it would have required heroic efforts to coerce my old data into my new models. Instead I wrote a quick script that goes through dumped data and builds a folder hierarchy with each model in its own file. This makes changes easy enough to transfer your data by hand, but also makes it easier to write more detailed conversion scripts that only have to deal with one model at a time.
-
Title: How to Migrate Data Across Model Changes
Tags: django pythonIf you've built a large program in Django (or, ya know, anything that uses a database), you know about migrating data. Specifically, you know that you hate migrating data, and that you'd rather use a badly thought out model and waste hours with a bad design decision than simply fixing the tables and the existing data. Well, say goodbye to your data migration angst, 'cause baby, its going away.
-
Title: Writing Custom Contexts for Django
Tags: django pythonWriting custom contexts for Django is a powerful way to extend generic templates, or to simply avoid writing repetitive code when you need the same content to be available to a number of templates. They are also fantastically simple to use