Superheroes?
December 30, 2006 at 01:10 PM | categories: python, oldblog | View CommentsYour results:
You are Hulk
|
You are a wanderer with amazing strength. |
Exogenous Connectors as an emergent property?
December 29, 2006 at 12:47 AM | categories: python, oldblog | View CommentsThis would take a URL from the console, turn it into an HTTP request, add a header which happens to be an Authorization header, also add a cache control header, and then pass this onto the HTTP Client. That makes a request, and then passes it on to the next component to be parsed and then put through a pretty printer. It's still transformational, but rather than requiring you to write new components for everything you can write simple transformations. The next step is to figure out how to invert this - how to make it such that Sequential components can be the primary component framework. (this would allow Kamaelia components to be used as a library in "normal" code). (Consider for example taking an RSS feed from a site that publishes links to .torrent files, extracting the ones you like, auto dumping the results to disk for local playback when you get home... )Pipeline(
ConsoleReader(eol=""),
SequentialTransformer(
HTTPRequest,
AddHeader(AuthorizationHeader("Username", "password"))
AddHeader(CacheControlHeader("no-cache"))
),
SimpleHTTPClient(),
SequentialTransformer(feedparser.parse,
pprint.pformat),
ConsoleEchoer(),
).run()
I've just checked in an initial pass at a SequentialTransformer into Kamaelia.Util.SequentialTransformer.SequentialTransformer. Thinking about it though, I've perhaps written too much code - the Sequential Transformer is just a specialised version of the PureTransformer...
So how did we get to that stage? Well, locally for testing, I've created an authenticated RSS feed that looks like this:
Pipeline(
ConsoleReader(eol=""),
PureTransformer(AuthenticatedRequestStream("Username", "password")),
SimpleHTTPClient(),
PureTransformer(feedparser.parse),
PureTransformer(pprint.pformat),
ConsoleEchoer(),
).run()
And it just struck me - this could be rewritten as:
However you would then get the ability to do this sort of sequential transform elsewhere. This combined with the ideas that Kamaelia's website engine runs on generated the example at the top. Essentially sequential components operating on a shared expected state, which they update and passback.Pipeline(
ConsoleReader(eol=""),
PureTransformer(AuthenticatedRequestStream("Username", "password")),
SimpleHTTPClient(),
SequentialTransformer(feedparser.parse,
pprint.pformat),
ConsoleEchoer(),
).run()
Basic Authentication - Did you know?
December 28, 2006 at 07:41 PM | categories: python, oldblog | View CommentsHow secure is that?GET /Some/Secure/Thing HTTP/1.0
Authorisation: Basic TWljaGFlbDp1bHRyYXNlY3JldA==
Not very secure at all.~> python
Python 2.4.2 (#1, May 2 2006, 08:13:46)
[GCC 4.1.0 (SUSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import base64
>>> base64.decodestring('TWljaGFlbDp1bHRyYXNlY3JldA==')
'Michael:ultrasecret'
Is this a problem? Do you know where all the transparent proxies might be between your users and your resources? As always, depends on the context :-) I found it interesting though, due to looking at adding authentication support to ryan's webclient code, since I'm looking to capture, process and potentially republish potentially authenticated RSS feeds using Kamaelia. (basic RSS example)
Rudolph The Duck Billed Platypus
December 24, 2006 at 11:39 AM | categories: python, oldblog | View CommentsHad a very shiny beak
And if you ever saw him
You would even say it squeaked
All of the other platypuses
Used to laugh and call him names
They wouldn't let poor Rudolph
Join in any Duck Bill games
Then one soggy Christmas Eve
Santa came to say
"Rudolph with your beak so bright
Won't you paddle my boat tonight?"
Then all the platypuses loved him
And they shouted out with glee
"Rudolph the Duck Bill Platypus -
You look like a Christmas Tree!"
Live Simple?
December 17, 2006 at 11:54 PM | categories: python, oldblog | View CommentsAmplee using Kamaelia Web Server
December 15, 2006 at 11:27 AM | categories: python, oldblog | View Comments- amplee is a Python implementation of the Atom Publishing Protocol (APP), as specified in the current draft 11.
My intention now as a result of seeing this is to look at providing a WSGI interface to using the Kamaelia Web Server. Initially this will be basic integration, but beyond that it would be interesting to expose Kamaelia capabiities to web developers. (Especially given this can run client side) Now I've never used WSGI, but seeing that this works, and seeing that amplee can also use a WSGI based server, this strikes me as an opportunity to say that any help that anyone can give with WSGI integration would be particularly cool.
Kamaelia Cookbook - How to use the webserver in Kamaelia
December 13, 2006 at 08:21 PM | categories: python, oldblog | View CommentsAfter writing that entry, it struck me that it actually makes sense to extend the codebase to simplify the current API, but even so, being able to write a response handler like this:
def EchoHandler(request):
return Pipeline ( Cat(request), ExampleWrapper() )
is really rather sweet :-) (You can put whatever components you like in between this that you like for example, however wacky)
Project Task Pages - Applying Kamaelia to Project Management
December 12, 2006 at 06:28 PM | categories: python, oldblog | View CommentsNot as a tool, not to create software, but as an approach in and of itself. In Kamaelia, components perform tasks, and take inputs from places and produce outcomes. In this case we did the same, except in the case of a task, the inputs are people and outcomes can be lots of different types of things (code, docs, presentations, etc). Similarly we looked at the core of how we document things - like 1 line synopsis (what is it?), examples (what will be possible by doing this task), benefits (why would you use a component), and applied that as well.
The upshot is a collection of Project Task Pages linked from our Projects section of our developer console.
The core is that given 3 things:
- Short one line of what the task is designed to achieve/create.
- A practical, clear result of what will be possible as a result of achieving this task.
- The context in which this task sits. Has this task any history? Is it the result of any previous tasks - either within the project or outside.
- Sponsor (who wanted the task achieved)
- Owner & Developers
The upshot though of this, is this: can it actually make your life easier? Well, it seems it can. I've been able to produce a summary of the past 9 months work in about 10 minutes, and I've been tracking our involvement in a conference in this way, as well as a dozen other things over the past couple of weeks - something that would normally overwhelm me. For some examples of public PTPs a few links:
So far we're finding this approach, and it does increase the transparency of Kamaelia somewhat as well. (Which is nice given the recent website revamp :) )
If any of this comes over as forced, it's just because I'm enthusiastic and want to share something we're finding useful :)
Manchester Geek/Tech/etc Events coming up
November 11, 2006 at 11:23 PM | categories: python, oldblog | View Comments- Nov 14th - Geek Up (similar to london 2.0 AFAICT)
- Nov 18th - ManLUG. I suspect me turning up after all these years might be a bit of a shock for some :)
- Nov 23rd - NW Start Up 2.0 - Starting an internet business? Seasoned entrepreneur? Got the killer idea? Wondering what the 2.0 this and 2.0 that is all about? Looking for investment? Looking to invest? ... Come along to the north-west's first and premier 2.0 networking event for an evening of conversation and potential dealmaking.
- Dec 2nd - DNSCon - DNS9 is the ninth running of the data and network security
council conference. This being the annual meeting of UK security
professionals and interested individuals. The UK’s longest running open
information security conference provides an opportunity to find out
about new threats to information security. Now in Manchester instead of
blackpool.
running concurrently with... - Dec 1st-3rd - Continuity - Continuity is a free security convention open to anyone with a interest in computer security, hacking, phone phreaking, telephony, cryptography, internet security/privacy, urban exploration, social engineering and related subjects.
- Also Manchester 2600 - The Manchester 2600 meet takes place on the first friday of every month. It is aimed at everybody with an interest in computer security, telephony, hacking, phone phreaking, cryptography, internet security/privacy issues and related subjects.
Flying Spaghetti Monster shows his Noodly Appendages in Germany!
November 11, 2006 at 07:57 PM | categories: python, oldblog | View Comments- http://www.youtube.com/watch?v=vL7FcvEydqg&eurl=
« Previous Page -- Next Page »