Calendars:Networked Media Calendar/Networked Media Calendar/15-03-2011 -Event 1: Difference between revisions

From XPUB & Lens-Based wiki
Line 29: Line 29:
  sudo pip install pygit
  sudo pip install pygit


[http://pzwart3.wdka.hro.nl/~mmurtaugh/goodiff_git.zip]
[http://pzwart3.wdka.hro.nl/~mmurtaugh/goodiff_git.zip dataset(zipped git repository)]


<source lang="python">
<source lang="python">

Revision as of 19:31, 15 March 2011

11-18 | Nicolas Maleve (Michael and Aymeric)- Thematic Project

Crucially, systemic ambiguity is as much about the production as it is about the deciphering of signs.

Becoming able to read the shifting balance and distribution of forces in fluctuating patterns of uncertain signs is one thing.

Being able to produce such signs, to turn them to your advantage, is another.

— Andrew Goffey / Matthew Fuller

walk.py

sudo apt-get install git-core
sudo apt-get install python-setuptools python-pip
sudo pip install pygit

dataset(zipped git repository)

from git.repository import Repository

r = Repository("./dataset")
path = "google/video.google.com/support/bin/answer.py?answer=31704"
path = path.split("/")

def treewalk(tree, path):
    if not path:
        return tree
    if path[0] in tree:
        child = tree[path[0]]
        return treewalk(child, path[1:])

import codecs

seen = {}
count = 0
noname = None
for r in r.rev_list():
    b = treewalk(r.tree, path)
    if b and b.name not in seen:
        seen[b.name] = True
        print r.shortname
        count += 1
        fpath  = "out/%06d.html" % count
        print "\t", b, fpath
        o = codecs.open(fpath, "w", "utf-8")
        o.write(b.contents)
        o.close()