<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>prezzey.net * Bogi Takács &#187; python</title>
	<atom:link href="http://www.prezzey.net/tag/python/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.prezzey.net</link>
	<description></description>
	<lastBuildDate>Fri, 13 Aug 2010 02:55:36 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to make a printable zooming presentation under Linux</title>
		<link>http://www.prezzey.net/2009/how-to-make-a-printable-zooming-presentation/</link>
		<comments>http://www.prezzey.net/2009/how-to-make-a-printable-zooming-presentation/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 23:05:32 +0000</pubDate>
		<dc:creator>prezzey</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[comp]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[presenting]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://gemeskut.net/prezzey/?p=116</guid>
		<description><![CDATA[I had to make a presentation and I wondered if I should try using a zooming presentation editor &#8211; I usually don&#8217;t use them because most of the time I don&#8217;t need flashy visuals, and they can be quite distracting if your content doesn&#8217;t lend itself to a spatial metaphor. But this time was different.
However, [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I had to make a presentation and I wondered if I should try using a zooming presentation editor &#8211; I usually don&#8217;t use them because most of the time I don&#8217;t need flashy visuals, and they can be quite distracting if your content doesn&#8217;t lend itself to a spatial metaphor. But this time was different.</p>
<p style="text-align: justify;">However, I was faced with an obstacle. None of the major zooming presentation editors like <a href="http://prezi.com/">Prezi</a> (no relation to me despite the name! Though I worked together with one of their founders on a research project, Hungary is a small place&#8230;) or <a href="http://ahead.com">Ahead</a> offer easy printing. Maybe there&#8217;s one which does, but I was in a hurry and didn&#8217;t find anything. Also, my laptop only has Linux, so Windows and (especially) Mac solutions like Keynote were also out.</p>
<p style="text-align: justify;">I came up with a solution that worked quite well for my purposes, though it probably wouldn&#8217;t work for you if you expect full Prezi-like functionality like the rotating virtual camera, etc., and it only offers three levels of zoom, so I don&#8217;t claim it&#8217;s perfect. But since several people have been asking about it, here is the howto beyond the cut! Note that it assumes that you can make a regular presentation, and you have some computer proficiency. (If you have specific questions, comment away and I&#8217;ll do my best to answer!)<strong><span id="more-116"></span><br />
</strong></p>
<p style="text-align: justify;"><strong>1. Make a slide background that is easily tiled</strong></p>
<p style="text-align: justify;">Since I needed to talk about four areas of interest in my presentation, I drew a petal-like shape and flipped it horizontally and vertically until I ended up with a &#8220;flower&#8221; composed of four separate slides fitting together. I filled the background with a uniform color.</p>
<p style="text-align: justify;"><strong>2. Create your slides with <a href="http://www.openoffice.org/product/impress.html">OpenOffice Impress</a></strong></p>
<p style="text-align: justify;">Alternately, you can use any editor which outputs a PDF file with slides on separate pages. (<a href="http://latex-beamer.sourceforge.net/">LaTeX Beamer</a>, etc.) Maybe you can even use Powerpoint &#8211; I confess have no idea whether Powerpoint can export to PDF (if you buy me a copy I can check, but it would be quite pointless to buy me a copy just for that, since I prefer Impress).</p>
<p style="text-align: justify;"><strong>3. Download and set up <a href="http://impressive.sourceforge.net/">Impress!ve</a> (includes editing the source)<a href="http://impressive.sourceforge.net/"><br />
</a></strong></p>
<p style="text-align: justify;">Impress!ve (formerly known as KeyJnote) is a  ~150kb Python script created by Martin J. Fiedler, we will be using this script to create the presentation. Its website explains how to download it and get it to run. I had some minor trouble with it &#8211; I ran into a bug where files exported from OpenOffice (but not from LaTeX) would crash it upon drawing the slide titles, I solved it simply by removing the reference to slide titles from the source code. Since the error message told me exactly which line was the culprit, it took just a few seconds to fix it. (If anyone is interested, I can try to replicate the bug, but it&#8217;s not too relevant here and strangely it only occurred on my laptop and nowhere else. I just mention it here for historical accuracy <img src='http://www.prezzey.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<p style="text-align: justify;">Now you will need to edit the source code (impressive.py). Don&#8217;t run away! It will not hurt!</p>
<p style="text-align: justify;">&#8230;Seriously. You just need a text editor, any text editor will do, because the settings you will have to change are right at the top of the file. Open impressive.py. Right under the title and license information, there are a bunch of variables prefaced by this comment: <em># You may change the following lines to modify the default settings</em></p>
<p style="text-align: justify;">Let <em>OverviewBorder = 0</em> and <em>OverviewLogoBorder = 0</em>. (Maybe it is possible to change these settings using a command line parameter, but I didn&#8217;t find it in the documentation and just changing the Python script seemed easier.) Save, quit.</p>
<p style="text-align: justify;"><strong>4. Configure your presentation</strong></p>
<p style="text-align: justify;">Configuration is very straightforward, but first you need to understand how the two zoom levels are set up. What we just did above means that the Impress!ve overview page (which is a feature that the script offers, it shows thumbnail images of each slide) does not have black borders any longer. So you can make a reasonably seamless image out of four (or more!) slides which fit together (which you made in sections 1-2 above). In my case I had four &#8220;petals&#8221; of a strange flowerlike thing for the four areas I intended to cover in my presentation. (If I end up having a lot of time at some unspecified point in the future, I might make a video and upload it to Youtube to make this explanation clearer.)</p>
<p style="text-align: justify;">Of course there are slides you don&#8217;t want to see on the top-level zoom result, breaking your carefully crafted layout! You probably have a title slide, a bunch of extra slides and whatnot. To solve this, launch Impress!ve, go through your stack of slides, and use the &#8220;o&#8221; button on your keyboard to toggle &#8220;visible on overview&#8221;. In my case, each petal had several slides explaining the topic, and only the first slide of each topic was set to display on the overview. When you&#8217;re finished, press &#8220;s&#8221; to save your configuration! It will be loaded automatically when you start the presentation (unless you moved it to another directory).</p>
<p style="text-align: justify;">So by now you should have the top-level zoom set up. You can trigger it with the Tab key during your presentation. Your medium-level zoom is the default, it just displays one slide on the screen.</p>
<p style="text-align: justify;">What to do about the bottom-level zoom? This is also very straightforward. Impress!ve offers a zooming tool by pressing the &#8220;z&#8221; key. It zooms to where the cursor is positioned on the slide that is currently displayed. Also, if you press Tab while zoomed in, you will be moved to the top level in two steps, automatically and very smoothly. A further charming feature is triggered with Enter, &#8220;this is left as an exercise to the reader&#8221; <img src='http://www.prezzey.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align: justify;">Make sure you don&#8217;t make the text overly small (resist the temptation of the zoom!), because after all, the whole purpose of this is to have slides which can be easily printed!</p>
<p style="text-align: justify;"><strong>5. Print out the PDF</strong></p>
<p style="text-align: justify;">See, that was easy!</p>
<p style="text-align: center;">***</p>
<p style="text-align: justify;">To be honest, when I first tried this, I thought I would mix up Tab, Z, Enter and all that during my live presentation and it would go horribly wrong. But I did not do more test runs than with my usual plain vanilla OpenOffice presentations, and everything went without hitches.</p>
<p style="text-align: center;">***</p>
<p style="text-align: justify;">Ein großes Dankeschön to Martin J. Fiedler who made Impress!ve. Keep up the great work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prezzey.net/2009/how-to-make-a-printable-zooming-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introductory science post</title>
		<link>http://www.prezzey.net/2009/introductory-science-post/</link>
		<comments>http://www.prezzey.net/2009/introductory-science-post/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 20:33:05 +0000</pubDate>
		<dc:creator>prezzey</dc:creator>
				<category><![CDATA[sci]]></category>
		<category><![CDATA[eyetracking]]></category>
		<category><![CDATA[mákony]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://gemeskut.net/prezzey/?p=30</guid>
		<description><![CDATA[I have two scientific projects I&#8217;m involved in at present, I&#8217;m going to describe them briefly just for you to get the idea what the other posts in this category will be about, etc. Click to read more!

I&#8217;m a doctoral student in Clinical Neuroscience at the Medical University of Vienna and my thesis is about [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I have two scientific projects I&#8217;m involved in at present, I&#8217;m going to describe them briefly just for you to get the idea what the other posts in this category will be about, etc. Click to read more!</p>
<p style="text-align: justify;"><span id="more-30"></span></p>
<p style="text-align: justify;">I&#8217;m a doctoral student in Clinical Neuroscience at the Medical University of Vienna and my thesis is about the computational modelling of visual attention in autism spectrum disorders (and hopefully eventual clinical applications, e.g., for diagnosis, etc.). The focus is on the modelling aspect &#8211; my advisor, Georg Dorffner, is a mathematician &#8211; but I wanted to gather some empirical data, and hence I have recently started looking into low-cost eye tracking. The reasoning was that since most of the thesis would be about the model ling work anyway, it might not make sense to buy a top-of-the-line eye tracker just to gather a bit of data. Also, I like building things, so why not?</p>
<p style="text-align: justify;">Unfortunately many of the claims are quite exaggerated when it comes to algorithm performance. Building an eye tracker (even a two-camera head-mounted setup with IR) is quite easy &#8211; much easier than most of the online tutorials would make you think -, but there are serious problems with software stability, reliability, or just accuracy in general. (Stability would be easier to fix&#8230;)</p>
<p style="text-align: justify;">I still think it is possible to gather data on the cheap, but you have to be tricky about it. One of the main reasons I set up this new website, and do so using a blog format, is that I want to rant about various aspects of building a cheap eye tracker ;]  I&#8217;m on the 5th PhD conference of the MUV today, I have a poster about building an eye tracker and choosing algorithms etc., but there are <em>so many</em> things that don&#8217;t fit on a poster, and generally the internet is a good place for, well duh, online tutorials. And I&#8217;m also interested in the exchange of ideas, etc., the comments section is there for a reason! (Yes, I&#8217;m looking at you!)</p>
<p style="text-align: justify;">I&#8217;m also a masters student in Theoretical Linguistics at Eötvös Loránd University in Budapest. I started this degree when I realized I was running out of available courses my psychology masters and I wanted to study something else while I was at it. (It was a scary snap decision. I wanted to do something else related to cognitive science because psychology just didn&#8217;t seem substantial enough by itself. At the time I was working part-time in a lab and I saw this from up close.) I&#8217;m now ABD and have been so for a year &#8211; I haven&#8217;t even been in Budapest since January! -, so I should really really finish my thesis and defend it ASAP, and then publish. I&#8217;ve already put a lot of effort into it so I don&#8217;t want to abandon it altogether, even though I&#8217;m now a doctoral student somewhere else.</p>
<p style="text-align: justify;">It is about a Construction Grammar model of Hungarian (not all of Hungarian, obviously&#8230;. but I aimed for a reasonably broad coverage) which has already been tested on psycholinguistic data for my psychology thesis and it worked fine. Now for my other thesis I&#8217;m making software which will allow everyone to use my model and build on it (add constructions, etc.). It will have a GUI (I&#8217;ve already made that part) and the only prerequisite for using it will be the ability to use XML. XML is easy! I&#8217;ve also written a lot of documentation&#8230; quite an amount of the thesis is essentially documentation so far.</p>
<p style="text-align: justify;">Basically you have a set of constructions in an XML file, and the software parses Hungarian sentences using these constructions and provides a Construction Grammar (-ish) representation. I&#8217;m saying &#8220;-ish&#8221; because no one really agrees on what Construction Grammar really is and how it should work in practice. The parser and construction matching algorithm is written in Python and I&#8217;m not a great programmer so this has taken up most of the time so far. But Python is useful and versatile, so any experience I gain with it is worthwhile I&#8217;d say. Besides, the video game I&#8217;m developing in my spare time also uses Python (and pygame and renpy) so the experience I gain in one should transfer to the other&#8230; in an ideal situation&#8230; well I don&#8217;t need to parse XML with Python for a video game!</p>
<p style="text-align: justify;">Anyway, the &#8220;meat&#8221; of it is in the construction declaration framework and the Python code that makes use of it, and the actual set of constructions. So far a lot of work went into defining the constructions the way I want them to be.</p>
<p style="text-align: justify;">I really want to finish my thesis this summer and defend it this winter. If I post here, that will hopefully help me with that, because then I will have this urge of &#8220;must-post-something&#8221; and if I haven&#8217;t made any advances I could post about, well, too bad. And there are very few linguists reading my personal blog which, when it is not about my thesis projects, is all about my little emo life. (Dear readers, you will be spared all that, this website is for my public projects. If you want to read about my daily aggravations, you will have to find a way to read my friends-only blog somewhere else, it&#8217;s not public and for good reason! My personal life just isn&#8217;t that interesting.) So anyway this seems a good place for myself to urge myself on, and hopefully get other people interested in the process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prezzey.net/2009/introductory-science-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
