davehansen’s posterous

Wii Softmod update

Followed guide tonight on:
http://www.yafaze.com/forums/viewtopic.php?f=46&t=1178&p=9923#p9923
 
Last step performed was installing CIOSrev14

Loading mentions Retweet
Filed under  //   wii softmod  

Comments [0]

http://web.media.mit.edu/~jorkin/aibooks.html

from http://web.media.mit.edu/~jorkin/aibooks.html:

GAME AI
AI Game Programming Wisdom - Edited by Steve Rabin
AI Game Programming Wisdom 2 - Edited by Steve Rabin
AI Game Programming Wisdom 3 - Edited by Steve Rabin
AI Game Programming Wisdom 4 - Edited by Steve Rabin
Programming Game AI by Example - Mat Buckland
AI Techniques for Game Programming - Mat Buckland
Artificial Intelligence For Computer Games: An Introduction - John Funge
AI for Computer Games and Animation: A Cognitive Modeling Approach - John Funge
AI Game Development: Synthetic Creatures with Learning and Reactive Behaviors - Alex J. Champandard
AI Game Engine Programming - Brian Schwab
Artificial Intelligence for Games - Ian Millington
Behavioral Mathematics for Game AI - Dave Mark
AI for Game Developers - David M. Bourg
Game Programming Gems - Edited by Mark DeLoura
Game Programming Gems 2 - Edited by Mark DeLoura
Game Programming Gems 3 - Edited by Dante Treglia
Game Programming Gems 4 - Edited by Andrew Kirmse
Game Programming Gems 5 - Edited by Kim Pallister
Game Programming Gems 6 - Edited by Mike Dickheiser
Game Programming Gems 7 - Edited by Scott Jacobs
 
 ACADEMIC AI TEXTBOOKS
Artificial Intelligence: A Modern Approach - Stuart Russell and Peter Norvig
Artificial Intelligence: A New Synthesis - Nils J. Nilsson
Artificial Intelligence - Patrick H. Winston
 
 MACHINE LEARNING & DATA MINING
Machine Learning - Thomas Mitchell
Data Mining: Practical Machine Learning Tools and Techniques - Ian H. Witten and Eibe Frank
Pattern Classification - Richard O. Duda, Peter E. Hart, and David G. Stork
 
 COMPILER DESIGN
Compilers: Principles, Techniques, and Tools - Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman
lex & yacc - Doug Brown and Tony Mason
 
 NATURAL LANGUAGE PROCESSING AND GENERATION
Foundations of Statistical Natural Language Processing - Christopher D. Manning and Hinrich Schutze
Speech and Language Processing - Daniel Jurafsky and James H. Martin
Generating Natural Language Under Pragmatic Constraints - Eduard H. Hovy
Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology - Dan Gusfield
 
 MODELS OF THE MIND AND EMOTION
Society of Mind - Marvin Minsky
The Emotion Machine: Commonsense Thinking, Artificial Intelligence, and the Future of the Human Mind - Marvin Minsky
Designing Sociable Robots - Cynthia Breazeal
Commonsense Reasoning - Erik T. Mueller
 
 PLANNING
Automated Planning: Theory & Practice - Malik Ghallab, Dana Nau, and Paolo Traverso
 
 RELATED TEXTBOOKS
Data Structures Using C and C++ - Yedidyah Langsam, Moshe J. Augenstein, and Aaron M. Tenenbaum
Introduction to Probability - Dimitri P. Bertsekas and John N. Tsitsiklis
Introduction to Algorithms - Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein
The Algorithm Design Manual - Steven S. Skiena
Introductory Linear Algebra: An Applied First Course - Bernard Kolman
All the Mathematics You Missed: But Need to Know for Graduate School - Thomas A. Garrity
Computer Vision - Linda G. Shapiro and George C. Stockman
 
 RELATED READING
Creation: Life and How to Make It - Steve Grand
Edison's Eve: A Magical History of the Quest for Mechanical Life - Gaby Wood
Scripts, Plans, Goals, and Understanding: An Inquiry Into Human Knowledge Structures - Roger Schank and Robert Abelson
Intention, Plans, and Practical Reason - Michael E. Bratman
The Intentional Stance - Daniel C. Dennett
Using Language - Herbert H. Clark
The Language Instinct: How the Mind Creates Language - Steven Pinker
Understanding Comics: The Invisible Art - Scott McCloud
The Illusion of Life: Disney Animation - Ollie Johnston and Frank Thomas

Loading mentions Retweet

Comments [0]

bash for loop

Loop over a shell command like a for loop. Useful for testing.

#!/bin/bash
for i in {1..10}; do echo "Welcome $i times"; pwd; done

Loading mentions Retweet

Comments [0]

journalInfo.php

Given an ISSN ('journalInfo.php?issn=xxxx-xxxx'), grab the journal title, issn, and all links from the Core Periodicals list.

<?php

function trimProxyLeader($url) {
if (preg_match('/\?url=/', $url)) {
$split_url = preg_split('/\?url=/', $url);
return $split_url[1];
}
else {
return $url;
}
}

#header('Content-type: application/xml');
$issn = $_REQUEST['issn'];
if ($issn) {
$url = 'http://xr8br6br2s.search.serialssolutions.com/?V=1.0&N=100&L=XR8BR6BR2S&S=I_M&C='.$issn;
$html = @DOMDocument::loadHTMLFile($url); // fetch the remote HTML file and parse it (@ suppresses warnings).
$xml = simplexml_import_dom($html); // convert the DOM object to a SimpleXML object.
$journalInfo = array(
"title",
"issn",
"links" => array()
);
foreach ($xml->xpath('//div') as $node){ // run an XPath query and iterate through the array of results
if ($node['class'] == 'SS_Holding') {
//grab the title and issn
foreach($node->xpath('//span') as $x) {
if ($x['class'] == 'SS_JournalTitle') {
$journalInfo['title'] = $x->children();
}
if ($x['class'] == 'SS_JournalISSN') {
$journalInfo['issn'] = preg_replace("/[()]/", "", $x);
}
}
//grab the links
foreach($node->xpath('//a') as $x) {
if ($x['class'] == 'SS_JournalHyperLink') {
$link_split = split('=', $x['href']);
$link = trimProxyLeader(urldecode($link_split[4]));
array_push($journalInfo['links'], $link);
}
}
}
}
print($journalInfo['title'].';');
print($journalInfo['issn'].';');
foreach ($journalInfo['links'] as $link) {
print $link.'|';
}
}

?>

Loading mentions Retweet

Comments [0]

scraping and parsing with BeautifulSoup

import urllib2
import sys
from BeautifulSoup import BeautifulSoup

try:
url = sys.argv[1]
except IndexError:
print 'No URL to scrape. Please supply a target URL.'
sys.exit()

page = urllib2.urlopen(url)
soup = BeautifulSoup(page)

image = soup.find({'img' : True}, attrs={'alt' : 'Cover'})

print image['src']

Loading mentions Retweet

Comments [0]

restarting sshd

sudo /etc/init.d/ssh restart

Loading mentions Retweet

Comments [0]

The Django Book

http://www.djangobook.com/en/2.0/

Loading mentions Retweet

Comments [0]

First python script

My first functional Python script. Grabs the 'src' attribute of a specific image on a specific page, using xpath.

#!/usr/bin/python -u

from lxml import etree

parser = etree.HTMLParser()
html   = etree.parse('http://orgsci.journal.informs.org/', parser)

img = html.xpath('//a[(((count(preceding-sibling::*) + 1) = 3) and parent::*)]//img/@src')

for x in img:
print(x)

 

 

 

Loading mentions Retweet
Filed under  //   code   python  

Comments [0]

python packages

feedparser: for parsing RSS feeds INSTALLED

lxml: for parsing HTML and XML INSTALLED
  • needed libxml2-dev and libxslt-dev installed using apt-get

urllib & urllib2: replaces curl, for sending HTTP requests INSTALLED [default]

Loading mentions Retweet
Filed under  //   modules   python  

Comments [0]