(b)logophile › Inferior decorating
11 weeks ago by tikitu
Belatedly: blogged some #Python decorator advice: (Also recently a gripe on list comprehensions: )
Python
from twitter
11 weeks ago by tikitu
(b)logophile › Python list incomprehension
11 weeks ago by tikitu
Belatedly: blogged some #Python decorator advice: (Also recently a gripe on list comprehensions: )
Python
from twitter
11 weeks ago by tikitu
Making Python Objects that act like Javascript Objects - Jiaaro (on life, the universe, and everything)
12 weeks ago by tikitu
Cute #Python trick: Python objects that act like Javascript objects:
Python
from twitter
12 weeks ago by tikitu
“Eppur si muove!”* – Dealing with Timezones in Python | Armin Ronacher's Thoughts and Writings
february 2012 by tikitu
Excellent article on best practises for #Python datetimes (from July last year):
Python
from twitter
february 2012 by tikitu
(b)logophile › Python datetime conversions
october 2011 by tikitu
@idangazit I made this chart of related operations: (Someday may pack them all into a single utility.)
selfpromotion
python
from twitter
october 2011 by tikitu
Pexpect
july 2011 by tikitu
Pexpect:
Pexpect is a pure Python module that makes Python a better tool for controlling and automating other programs… Pexpect is basically a pattern matching system. It runs programs and watches output. When output matches a given pattern Pexpect can respond as if a human were typing responses.
python
utilities
from google
Pexpect is a pure Python module that makes Python a better tool for controlling and automating other programs… Pexpect is basically a pattern matching system. It runs programs and watches output. When output matches a given pattern Pexpect can respond as if a human were typing responses.
july 2011 by tikitu
ScraperWiki
march 2011 by tikitu
ScraperWiki:
ScraperWiki is a platform for writing and scheduling screen scrapers, and for storing the data they generate.
ScraperWiki lets you write your scraper in Python, PHP or Ruby, schedule scrapes and download scraped data in CSV format, as an SQLite3 database or via the API. You can fork existing scrapers too, Github-style.
Let’s say you wanted to grab all the URLs from link posts on the front page of One Thing Well and store them. Here’s how, in Python:
import scraperwiki
import lxml.html
root = scraperwiki.scrape('http://onethingwell.org/')
content = lxml.html.etree.HTML(root)
linkage = content.xpath("/html/body/div/article/h2/a/@href")
for links in linkage:
record = { "link" : links }
scraperwiki.datastore.save(["link"], record)
You can see the results on ScraperWiki.
And here’s another scraper—a bit more complex at 26 lines of code—which grabs the URLs from every link post on OTW by following the ‘Older’ link at the bottom of the page and parsing the next page until it reaches the last one.
I only know the very, very basics of Python, but the above scrapers were really easy to cobble together by following nicking code from the ScraperWiki tutorials and a bit of trial and error.
Have a go, and let me know if you make a cool scraper.
scraper
web
python
ruby
php
from google
ScraperWiki is a platform for writing and scheduling screen scrapers, and for storing the data they generate.
ScraperWiki lets you write your scraper in Python, PHP or Ruby, schedule scrapes and download scraped data in CSV format, as an SQLite3 database or via the API. You can fork existing scrapers too, Github-style.
Let’s say you wanted to grab all the URLs from link posts on the front page of One Thing Well and store them. Here’s how, in Python:
import scraperwiki
import lxml.html
root = scraperwiki.scrape('http://onethingwell.org/')
content = lxml.html.etree.HTML(root)
linkage = content.xpath("/html/body/div/article/h2/a/@href")
for links in linkage:
record = { "link" : links }
scraperwiki.datastore.save(["link"], record)
You can see the results on ScraperWiki.
And here’s another scraper—a bit more complex at 26 lines of code—which grabs the URLs from every link post on OTW by following the ‘Older’ link at the bottom of the page and parsing the next page until it reaches the last one.
I only know the very, very basics of Python, but the above scrapers were really easy to cobble together by following nicking code from the ScraperWiki tutorials and a bit of trial and error.
Have a go, and let me know if you make a cool scraper.
march 2011 by tikitu
Issue 10562: Change 'j' for imaginary unit into an 'i' - Python tracker
december 2010 by tikitu
Hilariously tone-deaf complaint about #python complex number syntax: [via @stevelosh ]
python
from twitter
december 2010 by tikitu
EmacsWiki: Category Extension Language
november 2010 by tikitu
@szopa not so fast! #emacs claims #python and #ruby extensibility: ("sensible" I admit I don't know)
python
ruby
emacs
from twitter
november 2010 by tikitu
Python IAQ: Infrequently Answered Questions
september 2010 by tikitu
Some really nice #Python idioms/tricks: (perhaps a little outdated in a few cases)
Python
from twitter
september 2010 by tikitu
Volity - Developer Information
april 2006 by tikitu
System for developing and distributing multiplayer games. Zarf is involved.
games
perl
python
design
programming
tools
april 2006 by tikitu
GameDev.net - How To Build a Game In A Week From Scratch With No Budget
april 2006 by tikitu
Rapidfire developement postmortem -- mentions a few handy-looking Python tools (the game is called Hackenslash, 40 hrs dev time in 2005)
game
design
python
articles
april 2006 by tikitu
PyChecker: a python source code checking tool
march 2006 by tikitu
Some static checking of Python code (I can't believe mis-spelled assignment statements silently introduce variables!).
programming
tools
python
testing
march 2006 by tikitu
Copy this bookmark: