<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Ubershmekel&#039;s Uberpython Pythonlog</title>
	<atom:link href="http://uberpython.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://uberpython.wordpress.com</link>
	<description>Python, music, sports, gaming and philosophy.</description>
	<lastBuildDate>Mon, 23 Jan 2012 17:48:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='uberpython.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Ubershmekel&#039;s Uberpython Pythonlog</title>
		<link>http://uberpython.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://uberpython.wordpress.com/osd.xml" title="Ubershmekel&#039;s Uberpython Pythonlog" />
	<atom:link rel='hub' href='http://uberpython.wordpress.com/?pushpress=hub'/>
		<item>
		<title>The Google App Engine Glass Ceiling</title>
		<link>http://uberpython.wordpress.com/2012/01/06/gae-glass-ceiling/</link>
		<comments>http://uberpython.wordpress.com/2012/01/06/gae-glass-ceiling/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 13:27:31 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[glass ceiling]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[quota limits]]></category>
		<category><![CDATA[quota usage]]></category>
		<category><![CDATA[web apps]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/?p=547</guid>
		<description><![CDATA[With the new billing arrangements, each and every paid GAE app costs at least $2.10 per week which is supposedly $9 per month ($9.125 by my calculation) regardless of quota usage. This cost does cover whatever quotas your app consumes &#8230; <a href="http://uberpython.wordpress.com/2012/01/06/gae-glass-ceiling/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=547&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With the new billing arrangements, <a title="Google app engine is expensive when you first start paying" href="http://code.google.com/appengine/docs/billing.html">each and every paid GAE app costs at least $2.10 per week which is supposedly $9 per month</a> ($9.125 by my calculation) <strong>regardless of quota usage</strong>. This cost does cover whatever quotas your app consumes and the regular free quotas are still &#8220;free&#8221;.</p>
<p>Now I have a GAE app that sends 70-80 emails per day where the free limit is 100. I&#8217;d gladly switch over to the paid side of GAE just to be sure that if it ever passes the 100 mark I don&#8217;t have any failed email requests but the price of that is 9$ per month. <strong>GAE is extremely expensive for apps that just barely brush the end of their free quotas</strong>. In order to actually use the $9 per month minimum I&#8217;d have to send out 3000 emails per day (at $0.0001 per email).</p>
<p>I don&#8217;t know if the <a title="Free email recipients has an extremely low cap" href="http://code.google.com/appengine/docs/quotas.html#Mail">free quota on email recipients is really low</a> or if sending out an email is extremely cheap. Either way, <strong>GAE expects me to scale from 100 to 3000 while paying the price of 3000</strong>. Who knows if I&#8217;ll ever even reach that mark?</p>
<p>If google keeps with this plan, I&#8217;m probably never going to start another GAE app that has a chance to grow. Every time I have a chance of hitting the quota limits I have 2 choices:</p>
<ul>
<li>Pay google and be screwed over for an indefinite amount of time until I reach the next landmark.</li>
<li>Migrate to a cheaper shared hosting option until I reach the next landmark.</li>
</ul>
<p>Thanks, but no thanks. That&#8217;s the <strong>GAE glass ceiling.</strong></p>
<h2>Appendix</h2>
<ul>
<li>Other than this problem I do like GAE. It&#8217;s a shame I have to leave it.</li>
<li>I&#8217;ve made about 11 small python GAE apps. Only 2 of which ever reached the aforementioned glass ceiling.</li>
<li>This issue shouldn&#8217;t bother you if your app is already big enough to cost more than $9.</li>
<li>Maybe google can&#8217;t bill less than $9 per month? I doubt it, android apps can cost $0.99.</li>
<li>A proposed solution: Google takes $9 of credit at a time from your google wallet and eats quotas out of that. When the $9 run out, it bills another 9. Sounds reasonable and &#8220;don&#8217;t be evil&#8221; to me. Another thing that could be nice would be to allow multiple paid apps to feed from the same budget.</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/547/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/547/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/547/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=547&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2012/01/06/gae-glass-ceiling/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>
	</item>
		<item>
		<title>Precision, recall, sensitivity and specificity</title>
		<link>http://uberpython.wordpress.com/2012/01/01/precision-recall-sensitivity-and-specificity/</link>
		<comments>http://uberpython.wordpress.com/2012/01/01/precision-recall-sensitivity-and-specificity/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 20:00:16 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[philosophy]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[medicine]]></category>
		<category><![CDATA[Precision]]></category>
		<category><![CDATA[recall]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[sensitivity]]></category>
		<category><![CDATA[specificity]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/?p=539</guid>
		<description><![CDATA[Nowadays I work for a medical device company where in a medical test the big indicators of success are specificity and sensitivity. Every medical test strives to reach 100% in both criteria. Imagine my surprise today when I found out &#8230; <a href="http://uberpython.wordpress.com/2012/01/01/precision-recall-sensitivity-and-specificity/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=539&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Nowadays I work for a medical device company where in a medical test the big indicators of success are <strong>specificity</strong> and <strong>sensitivity</strong>. Every medical test strives to reach 100% in both criteria. Imagine my surprise today when I found out that other fields use different metrics for the exact same problem. To analyze this I present to you the <strong>confusion matrix</strong>:</p>
<div class="wp-caption alignnone" style="width: 701px"><img title="Confusion Matrix" src="http://i.imgur.com/hftkt.png" alt="Confusion Matrix" width="691" height="345" /><p class="wp-caption-text">Confusion Matrix</p></div>
<p>E.g. we have a pregnancy test that classifies people as pregnant (positive) or not pregnant (negative).</p>
<ul>
<li>True positive &#8211; a person we told is pregnant that really was.</li>
<li>True negative &#8211; a person we told is <span style="text-decoration:underline;"><strong>not</strong></span> pregnant, and really wasn&#8217;t.</li>
<li>False negative &#8211; a person we told is <span style="text-decoration:underline;"><strong>not</strong></span> pregnant, though they really were. Ooops.</li>
<li>False positive &#8211; a person we told is pregnant, though they weren&#8217;t. Oh snap.</li>
</ul>
<p>And now some equations&#8230;</p>
<h2><strong>Sensitivity</strong> and <strong>specificity</strong> are statistical measures of the performance of a <a title="Binary classification" href="http://en.wikipedia.org/wiki/Binary_classification">binary classification</a> <a title="Classification rule" href="http://en.wikipedia.org/wiki/Classification_rule">test</a>:</h2>
<p><img class="alignnone" title="Sensitivity" src="http://upload.wikimedia.org/wikipedia/en/math/3/b/b/3bba74d53b3134b2064c0f8f0c1c74a4.png" alt="Sensitivity" width="562" height="47" /></p>
<p><img class="alignnone" title="Specificity" src="http://upload.wikimedia.org/wikipedia/en/math/c/0/f/c0fa877e24585aee854d852f11f4e1e5.png" alt="Specificity" width="560" height="47" /></p>
<div class="wp-caption alignnone" style="width: 703px"><img title="sensitivity and specificity" src="http://i.imgur.com/0ofsf.png" alt="sensitivity and specificity" width="693" height="325" /><p class="wp-caption-text">Sensitivity in yellow, specificity in red</p></div>
<h2></h2>
<p>&nbsp;</p>
<h2>In <a title="Pattern recognition" href="http://en.wikipedia.org/wiki/Pattern_recognition">pattern recognition</a> and <a title="Information retrieval" href="http://en.wikipedia.org/wiki/Information_retrieval">information retrieval</a>:</h2>
<p><img class="alignnone" title="Precision" src="http://upload.wikimedia.org/wikipedia/en/math/5/3/1/531de241d25a02032bafe4fbceccf584.png" alt="Precision" width="514" height="47" /></p>
<p><img class="alignnone" title="Recall" src="http://upload.wikimedia.org/wikipedia/en/math/3/c/b/3cb5a8e4492f4b12fa87059b6ee18a80.png" alt="Recall" width="485" height="47" /></p>
<p>Let&#8217;s translate:</p>
<ul>
<li>Relevant documents are the positives</li>
<li>Retrieved documents are the classified as positives</li>
<li>Relevant and retrieved are the true positives.</li>
</ul>
<div></div>
<div class="wp-caption alignnone" style="width: 715px"><img title="Precision, recall" src="http://i.imgur.com/cJDJU.png" alt="Precision, recall" width="705" height="361" /><p class="wp-caption-text">Precision in red, recall in yellow</p></div>
<h2></h2>
<h2>Standardized equations</h2>
<ul>
<li>sensitivity = recall = tp / t = tp / (tp + fn)</li>
<li>specificity = tn / n = tn / (tn + fp)</li>
<li>precision = tp / p = tp / (tp + fp)</li>
</ul>
<h2>Equations explained</h2>
<ul>
<li>Sensitivity/recall &#8211; how good a test is at detecting the positives. A test can cheat and maximize this by always returning &#8220;positive&#8221;.</li>
<li>Specificity &#8211; how good a test is at avoiding false alarms. A test can cheat and maximize this by always returning &#8220;negative&#8221;.</li>
<li>Precision - how many of the positively classified were relevant. A test can cheat and maximize this by only returning positive on one result it&#8217;s most confident in.</li>
<li>The cheating is resolved by looking at both relevant metrics instead of just one. E.g. the cheating 100% sensitivity that always says &#8220;positive&#8221; has 0% specificity.</li>
</ul>
<div>
<h2>More ways to cheat</h2>
<p>A Specificity buff &#8211; let&#8217;s continue with our pregnancy test where our experiments resulted in the following confusion matrix:</p>
<table>
<tbody>
<tr>
<td>8</td>
<td>2</td>
</tr>
<tr>
<td>10</td>
<td>80</td>
</tr>
</tbody>
</table>
<p>Our specificity is only 88% and we need 97% for our FDA approval. We can tell our patients to run the test twice and only double positives count (eg two red lines) so we suddenly have 98.7% specificity. Magic. This would only be kosher if the test results are proven as independent. Most tests are probably not as such (eg blood parasite tests that are triggered by antibodies may repeatedly give false positives from the same patient).</p>
<p>A  less ethical (though IANAL) approach would be to add 300 men to our pregnancy test experiment. Of course, part of our test is to ask &#8220;are you male?&#8221; and mark these patients as &#8220;not pregnant&#8221;. Thus we get a lot of easy true negatives and this is the resulting confusion matrix:</p>
<table>
<tbody>
<tr>
<td>8</td>
<td>2</td>
</tr>
<tr>
<td>10</td>
<td>380</td>
</tr>
</tbody>
</table>
<p>Voila! 97.4% specificity with a single test. Have fun trying to get that FDA approval though, I doubt they&#8217;ll overlook the 300 red herrings.</p>
</div>
<h2>What does it mean, who won?</h2>
<p>Finally the punchline:</p>
<ul>
<li>A <strong>search engine</strong> only cares about the results it shows you. Are they relevant (tp) or are they spam (fp)? Did it miss any relevant results (fn)? The ocean of ignored (tn) results shouldn&#8217;t affect how good or bad a search algorithm is. That&#8217;s why <strong>true negatives can be ignored</strong>.</li>
<li>A <strong>doctor</strong> can tell a patient if they&#8217;re pregnant or not or if they have cancer. Each decision may have grave consequences and thus true negatives are crucial. That&#8217;s why <strong>all the cells in the confusion matrix must be taken into account</strong>.</li>
</ul>
<h2></h2>
<h2>References</h2>
<p><a href="http://en.wikipedia.org/wiki/Confusion_matrix">http://en.wikipedia.org/wiki/Confusion_matrix</a></p>
<p><a href="http://en.wikipedia.org/wiki/Sensitivity_and_specificity">http://en.wikipedia.org/wiki/Sensitivity_and_specificity</a></p>
<p><a href="http://en.wikipedia.org/wiki/Precision_and_recall">http://en.wikipedia.org/wiki/Precision_and_recall</a></p>
<p><a href="http://en.wikipedia.org/wiki/Accuracy_and_precision">http://en.wikipedia.org/wiki/Accuracy_and_precision</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/539/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/539/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/539/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=539&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2012/01/01/precision-recall-sensitivity-and-specificity/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>

		<media:content url="http://i.imgur.com/hftkt.png" medium="image">
			<media:title type="html">Confusion Matrix</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/en/math/3/b/b/3bba74d53b3134b2064c0f8f0c1c74a4.png" medium="image">
			<media:title type="html">Sensitivity</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/en/math/c/0/f/c0fa877e24585aee854d852f11f4e1e5.png" medium="image">
			<media:title type="html">Specificity</media:title>
		</media:content>

		<media:content url="http://i.imgur.com/0ofsf.png" medium="image">
			<media:title type="html">sensitivity and specificity</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/en/math/5/3/1/531de241d25a02032bafe4fbceccf584.png" medium="image">
			<media:title type="html">Precision</media:title>
		</media:content>

		<media:content url="http://upload.wikimedia.org/wikipedia/en/math/3/c/b/3cb5a8e4492f4b12fa87059b6ee18a80.png" medium="image">
			<media:title type="html">Recall</media:title>
		</media:content>

		<media:content url="http://i.imgur.com/cJDJU.png" medium="image">
			<media:title type="html">Precision, recall</media:title>
		</media:content>
	</item>
		<item>
		<title>Python 3 Wall of Shame Updates</title>
		<link>http://uberpython.wordpress.com/2011/12/25/python-3-wall-of-shame-updates/</link>
		<comments>http://uberpython.wordpress.com/2011/12/25/python-3-wall-of-shame-updates/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 20:08:25 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[py3k]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[python3wos]]></category>
		<category><![CDATA[wall of shame]]></category>
		<category><![CDATA[wos]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/?p=528</guid>
		<description><![CDATA[Earlier in December I was approached by Chris McDonough with a reddit pm asking if I could or would implement some kind of behavior regarding a  &#8221;Python 2 only&#8221; classifier on the wall of shame. After some aggressive googling I found &#8230; <a href="http://uberpython.wordpress.com/2011/12/25/python-3-wall-of-shame-updates/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=528&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Earlier in December I was approached by Chris McDonough with a reddit pm asking if I could or would implement some kind of behavior regarding a  &#8221;Python 2 only&#8221; classifier on <a title="Python 3 WOS" href="http://python3wos.appspot.com">the wall of shame</a>. After some aggressive googling I found the <a href="http://mail.python.org/pipermail/catalog-sig/2011-December/004077.html">original discussion in catalog-sig</a>. The idea was to add a classifier that signified &#8221;the authors have no current intention to port this code to Python 3&#8243;. By declaring such an intent, Chris explained, a python package should be erased from the wall of shame. Not that I completely understood this intuition but still I tried to somehow apply myself to the effort of improving the WOS. So here&#8217;s what&#8217;s new:</p>
<ul>
<li>Packages with the &#8221;Programming Language :: Python :: 2 :: Only&#8221; trove classifier will have a lock next to their package with a mouse over explaining their intent.</li>
<li>Packages that have an equivalent py3k package are now not erased from the wall but rather show a link to the equivalent package. This rightfully boosts the compatibles count by 4. Note that packages that would doubly boost the count are still erased (eg Jinja is erased because Jinja2 is in the top 200).</li>
<li>Packages that are python 3 compatible but lack the trove classifier won&#8217;t stay red if brought to my attention. I&#8217;ve always stated the WOS can only be as good as pypi, not better. Hoping that in time PyPI would become more accurate, this move saddens me a bit. To keep a bit of the spirit the artificially green packages have a red triangle signifying the maintainer&#8217;s lack of trove classifiers (again with a relevant mouse over).</li>
<li>The WOS is now written for python 2.7 and migrated to the HRD, woohoo!</li>
</ul>
<p>Please  do contact me if there are any more inaccuracies or mistakes. I&#8217;m reachable at ubershmekel at gmail and by comments on this blog.</p>
<p>Ps, we&#8217;re at 57/200, so maybe by this time next year we can have that Python 3 Wall of Superpowers party! Amen to that&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/528/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/528/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/528/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=528&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/12/25/python-3-wall-of-shame-updates/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>
	</item>
		<item>
		<title>Google App Engine costs the same as any shared hosting</title>
		<link>http://uberpython.wordpress.com/2011/12/24/google-app-engine-costs-the-same-as-any-shared-hosting/</link>
		<comments>http://uberpython.wordpress.com/2011/12/24/google-app-engine-costs-the-same-as-any-shared-hosting/#comments</comments>
		<pubDate>Sat, 24 Dec 2011 18:05:26 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[GAE]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[hosting]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/2011/12/24/google-app-engine-costs-the-same-as-any-shared-hosting/</guid>
		<description><![CDATA[There are many good and bad things about GAE but this issue with the new pricing is just strange in my eyes: Every paid app must pay google at least $9 each month regardless of usage. The main awesome thing &#8230; <a href="http://uberpython.wordpress.com/2011/12/24/google-app-engine-costs-the-same-as-any-shared-hosting/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=527&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are many good and <a href="http://blog.ugorji.net/2011/09/google-app-engine-new-pricing-sucks.html">b</a>a<a href="http://blog.ugorji.net/2011/09/objective-gripes-with-new-google-app.html">d</a> <a href="http://3.14.by/en/read/why-google-appengine-sucks">th</a>in<a href="https://www.google.com/search?q=google+app+engine+sucks">gs</a> about GAE but this issue with the new pricing is just strange in my eyes:</p>
<p><strong>Every paid app must pay google at least $9 each month regardless of usage.</strong></p>
<p>The main awesome thing about GAE has always been the pay-as-you-need pricing model. This concept is completely shattered now for a certain scale of apps. The <a title="Python 3 Wall Of Shame" href="http://python3wos.appspot.com">Python 3 Wall of Shame</a> needed a few extra DB writes to finish the day nicely which would have cost roughly 10 cents a day. But now google will be rounding that up to 30 cents a day.</p>
<p>Apps that grow to use $1 worth of quotas a month are much better off heading to some form of shared <a href="http://www.webfaction.com/services/hosting">hosting for $5.50</a> a month until they hit that $9 a month necessity. That&#8217;s the case with the Python3WOS and another one of my apps. I can&#8217;t move the wall of shame as I don&#8217;t have the time to do the porting (locked in ಠ_ಠ), but that other app is simple enough. So google will never find out if it could have been an app that&#8217;s actually worth $9 monthly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/527/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/527/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/527/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=527&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/12/24/google-app-engine-costs-the-same-as-any-shared-hosting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>
	</item>
		<item>
		<title>Youtube going to fullscreen skips bug</title>
		<link>http://uberpython.wordpress.com/2011/12/15/youtube-going-to-fullscreen-skips-bug/</link>
		<comments>http://uberpython.wordpress.com/2011/12/15/youtube-going-to-fullscreen-skips-bug/#comments</comments>
		<pubDate>Thu, 15 Dec 2011 14:07:14 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[video]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/?p=319</guid>
		<description><![CDATA[Whenever I switch between fullscreen and back in this video http://www.youtube.com/watch?v=lOTPCaItx3w for example &#8211; youtube skips 2 seconds forward in time. Even while paused. I found two relevant issues: http://www.google.com/support/forum/p/youtube/thread?tid=2960543d59021a08&#38;hl=en http://www.google.com/support/forum/p/youtube/thread?tid=134f7450b6d08d3c&#38;hl=en The first one suggests to disable flash&#8217;s hardware acceleration which does &#8230; <a href="http://uberpython.wordpress.com/2011/12/15/youtube-going-to-fullscreen-skips-bug/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=319&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Whenever I switch between fullscreen and back in this video <a href="http://www.youtube.com/watch?v=lOTPCaItx3w">http://www.youtube.com/watch?v=lOTPCaItx3w</a> for example &#8211; youtube skips 2 seconds forward in time. Even while paused.</p>
<p>I found two relevant issues:</p>
<p><a href="http://www.google.com/support/forum/p/youtube/thread?tid=2960543d59021a08&amp;hl=en">http://www.google.com/support/forum/p/youtube/thread?tid=2960543d59021a08&amp;hl=en</a></p>
<p><a href="http://www.google.com/support/forum/p/youtube/thread?tid=134f7450b6d08d3c&amp;hl=en">http://www.google.com/support/forum/p/youtube/thread?tid=134f7450b6d08d3c&amp;hl=en</a></p>
<p>The first one suggests to disable flash&#8217;s hardware acceleration which does work (right click the video and then click settings).</p>
<p>But why should we do that?</p>
<p>Also did I mention I dislike losing all the video I buffered in 360p when youtube auto-switches to 480p with fullscreen? I had to manually disable that too.</p>
<p>¯\_(ಠ_ಠ)_/¯</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/319/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/319/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/319/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=319&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/12/15/youtube-going-to-fullscreen-skips-bug/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>
	</item>
		<item>
		<title>Android API Bugs &#8211; AudioRecord</title>
		<link>http://uberpython.wordpress.com/2011/12/10/android-api-bugs-audiorecord/</link>
		<comments>http://uberpython.wordpress.com/2011/12/10/android-api-bugs-audiorecord/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 19:52:33 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[audio]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/?p=233</guid>
		<description><![CDATA[When asking android to record from the mic to a buffer you have to do something like: mRecorder = new AudioRecord(AudioSource.MIC, RATE, CHANNEL_MODE, ENCODING, BUFFER_SIZE); if (mRecorder.getState() != AudioRecord.STATE_INITIALIZED) {     // fail and bail } mRecorder.startRecording(); bytesRead = &#8230; <a href="http://uberpython.wordpress.com/2011/12/10/android-api-bugs-audiorecord/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=233&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When asking android to record from the mic to a buffer you have to do something like:</p>
<pre>mRecorder = new AudioRecord(AudioSource.MIC, RATE, CHANNEL_MODE,
 ENCODING, BUFFER_SIZE);
if (mRecorder.getState() != AudioRecord.STATE_INITIALIZED) {
    // fail and bail
}
mRecorder.startRecording();
bytesRead = mRecorder.read(audioBuffer, offsetInBuffer, readSize);
mRecorder.stop();
mRecorder.release();</pre>
<p>Now the bug that drove me mad was that read() returned zero when I left the application (using the home button) and immediately returned to it. Luckily I was toying around with BUFFER_SIZE when I noticed</p>
<pre>mRecorder.getState()</pre>
<p>failed when BUFFER_SIZE was set to 0&#215;100, I guessed it was too small and indeed one must call getMinBufferSize() to find out <a title="AudioRecord instantiation documentation" href="http://developer.android.com/reference/android/media/AudioRecord.html#AudioRecord(int, int, int, int, int)">the limits of AudioRecord instantiation as documented</a>.</p>
<p>Don&#8217;t use getMinBufferSize() + 1 btw as that throws an IllegalArgumentException at AudioRecorder construction:</p>
<pre>12-10 21:49:33.359: E/AndroidRuntime(28950): java.lang.IllegalArgumentException: Invalid audio buffer size.</pre>
<p>Using something like <strong>getMinBufferSize() + 100</strong> does work at first but when you use the home-button to leave and return it <strong>causes the read() returning zero bug from time to time</strong>. Not always, but from time to time. Also make sure you release() the recorder because forgetting that will also allow you to construct the recorder but reads will fail.</p>
<p>I can&#8217;t begin to describe how frustrating finding that bug was.</p>
<p>Now audio programmers should know they&#8217;re supposed to read a size that&#8217;s a divisor of the buffer size, yes. This doesn&#8217;t excuse the API from behaving itself and throwing relevant exceptions and errors that are debuggable and documented. This was SdkLevel 8 btw. Things like this make you feel as though these are the guys that wrote the api:</p>
<div></div>
<p><img class="alignnone" title="Running and firing anywhere" src="http://i.imgur.com/E0iVN.gif" alt="" width="405" height="228" /></p>
<p>Eventually the working code will be pushed to the <a title="Android Tuner" href="http://code.google.com/p/androidtuner/source/browse/">android tuner google code project</a> for your enjoyment.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/233/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/233/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/233/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=233&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/12/10/android-api-bugs-audiorecord/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>

		<media:content url="http://i.imgur.com/E0iVN.gif" medium="image">
			<media:title type="html">Running and firing anywhere</media:title>
		</media:content>
	</item>
		<item>
		<title>Duplicating Streams of Audio with Python</title>
		<link>http://uberpython.wordpress.com/2011/12/07/duplicating-streams-of-audio-with-python/</link>
		<comments>http://uberpython.wordpress.com/2011/12/07/duplicating-streams-of-audio-with-python/#comments</comments>
		<pubDate>Wed, 07 Dec 2011 11:08:55 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[pyaudio]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/2011/12/07/duplicating-streams-of-audio-with-python/</guid>
		<description><![CDATA[This morning I made a python script that uses pyaudio to read from one audio device and pipe to the next, I call it replicate.py. This is a really old problem for me, ever since I first had 4.1 speakers &#8230; <a href="http://uberpython.wordpress.com/2011/12/07/duplicating-streams-of-audio-with-python/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=230&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This morning I made a <a title="Duplicate or replicate audio streams using pyaudio" href="http://codepad.org/vgEZbU3y">python script that uses pyaudio to read from one audio device and pipe to the next, I call it replicate.py</a>.</p>
<p>This is a really old problem for me, ever since I first had 4.1 speakers and winamp only played on the front 2. Nowadays I just want VLC to play on both the TV and the computer speakers without switching between audio output modules in the preferences or fiddling with the default audio output in Windows 7.</p>
<p><a title="PyAudio" href="http://people.csail.mit.edu/hubert/pyaudio/">PyAudio</a> was really nice and easy to use, I just wish asynch io was added so I could lower the latency a bit as I&#8217;m getting 240 ms right now which is very far from perfect.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/230/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/230/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/230/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=230&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/12/07/duplicating-streams-of-audio-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>
	</item>
		<item>
		<title>Pendulums, WebGL and three.js</title>
		<link>http://uberpython.wordpress.com/2011/12/02/pendulums-webgl-and-three-js/</link>
		<comments>http://uberpython.wordpress.com/2011/12/02/pendulums-webgl-and-three-js/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 18:53:46 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[pendulum]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[three.js]]></category>
		<category><![CDATA[webgl]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/?p=182</guid>
		<description><![CDATA[Here&#8217;s the waves pendulum three.js simulation I made.  So I wanted to simulate a magical pendulum with waves to prove my point that the shapes are the result of a dead simple arithmetic progression. I was almost correct. After testing, I saw that &#8230; <a href="http://uberpython.wordpress.com/2011/12/02/pendulums-webgl-and-three-js/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=182&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the <a title="Waves Pendulum Simulation" href="http://toplessproductions.com/pendulum">waves pendulum three.js simulation</a> I made.</p>
<div> So I wanted to simulate a <a title="Real Waves Pendulum" href="http://www.youtube.com/watch?v=yVkdfJ9PkRQ">magical pendulum with waves</a> to prove my point that the shapes are the result of a dead simple arithmetic progression. I was almost correct.</div>
<p>After testing, I saw that when the frequency is an arithmetic progression we get the awesome patterns. The problem is that achieving such a feat by modifying the length of the strings alone is a bit harder. Here&#8217;s omega, or the angular frequency from <a title="hyperphysics - pendulum physics equations" href="http://hyperphysics.phy-astr.gsu.edu/hbase/pend.html">hyperphysics</a>:</p>
<p><img style="background:#FFF;" src="http://hyperphysics.phy-astr.gsu.edu/hbase/imgmec/pend5.gif" alt="w = sqrt(g/L)" /></p>
<p>So all I had to do was choose omegas, increment them and from that calculate the string lengths. I got mixed up and solved the problem in a much more <a title="python code which generates string lengths for wave pendulums" href="http://codepad.org/HiS4wJAL">complicated way</a>.</p>
<p>Anyhow, by faking it (choosing my omegas with bogus L&#8217;s) I get a prettier result. Headache averted. I&#8217;m not sure these swing angles are simple pendulums anyway.</p>
<p>WebGL and three.js are indeed awesome. It does have its gotchas but I was just so impressed with <a title="Ellie Goulding Lights WebGL Video" href="http://lights.elliegoulding.com/">http://lights.elliegoulding.com/</a> and other things in the three.js gallery. It&#8217;s amazing how simple and accessible opengl is now that it&#8217;s in the browser. The &#8220;hello world&#8221; of about 20 lines for a rotating cube was good though I think it should include the <a title="Javascript WebGL detector class" href="https://github.com/mrdoob/three.js/blob/master/examples/js/Detector.js">WebGL detection </a>in it.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=182&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/12/02/pendulums-webgl-and-three-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>

		<media:content url="http://hyperphysics.phy-astr.gsu.edu/hbase/imgmec/pend5.gif" medium="image">
			<media:title type="html">w = sqrt(g/L)</media:title>
		</media:content>
	</item>
		<item>
		<title>Android api quirk number 5</title>
		<link>http://uberpython.wordpress.com/2011/11/19/android-api-quirk-number-5/</link>
		<comments>http://uberpython.wordpress.com/2011/11/19/android-api-quirk-number-5/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 02:52:04 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[drawRect]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/2011/11/19/android-api-quirk-number-5/</guid>
		<description><![CDATA[Wow this is silly. public void drawRect(float left, float top, float right, float bottom, Paint paint) Usually it doesn&#8217;t matter if top is higher than bottom. Either way a rectangle is drawn. UNLESS, top is outside of the screen. Then &#8230; <a href="http://uberpython.wordpress.com/2011/11/19/android-api-quirk-number-5/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=181&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Wow this is silly.</p>
<p>public void drawRect(float left, float top, float right, float bottom, Paint paint)</p>
<p>Usually it doesn&#8217;t matter if top is higher than bottom. Either way a rectangle is drawn.</p>
<p>UNLESS, top is outside of the screen. Then no rectangle is drawn at all.</p>
<p>So you can have rectangles that are partially visible, but only if their top is greater than their bottom.</p>
<p>ZOMG that was a hard bug to figure out&#8230;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/181/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/181/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/181/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=181&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/11/19/android-api-quirk-number-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>
	</item>
		<item>
		<title>Python 2/3 and unicode file paths</title>
		<link>http://uberpython.wordpress.com/2011/10/21/python-23-and-unicode-file-paths/</link>
		<comments>http://uberpython.wordpress.com/2011/10/21/python-23-and-unicode-file-paths/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 10:23:09 +0000</pubDate>
		<dc:creator>ubershmekel</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[unicode]]></category>

		<guid isPermaLink="false">http://uberpython.wordpress.com/2011/10/21/python-23-and-unicode-file-paths/</guid>
		<description><![CDATA[This bug popped up in a script of mine: For Python 2: &#62;&#62;&#62; os.path.abspath('.') 'C:\\Users\\yuv\\Desktop\\YuvDesktop\\??????' &#62;&#62;&#62; os.path.abspath(u'.') u'C:\\Users\\yuv\\Desktop\\YuvDesktop\\\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5' For Python 3: &#62;&#62;&#62; os.path.abspath('.') 'C:\\Users\\yuv\\Desktop\\YuvDesktop\\\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5' &#62;&#62;&#62; os.path.abspath(b'.') b'C:\\Users\\yuv\\Desktop\\YuvDesktop\\??????' That odd set of question marks is a completely useless and invalid path &#8230; <a href="http://uberpython.wordpress.com/2011/10/21/python-23-and-unicode-file-paths/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=180&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This bug popped up in a script of <a href="http://pypi.python.org/pypi/import_file">mine</a>:</p>
<p>For Python 2:</p>
<pre>&gt;&gt;&gt; os.path.abspath('.')
'C:\\Users\\yuv\\Desktop\\YuvDesktop\\??????'
&gt;&gt;&gt; os.path.abspath(u'.')
u'C:\\Users\\yuv\\Desktop\\YuvDesktop\\\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5'</pre>
<p>For Python 3:</p>
<pre>
&gt;&gt;&gt; os.path.abspath('.')
'C:\\Users\\yuv\\Desktop\\YuvDesktop\\\u05d0\u05d1\u05d2\u05d3\u05d4\u05d5'
&gt;&gt;&gt; os.path.abspath(b'.')
b'C:\\Users\\yuv\\Desktop\\YuvDesktop\\??????'</pre>
<p>That odd set of question marks is a completely useless and invalid path in case you were wondering. The windows cmd prompt sometimes has question marks that aren&#8217;t garbage, but I assure you, these are useless and wrong question marks.</p>
<p>The solution is to always use unicode strings with path functions. A bit of a pain. Am I the only one who thinks this is failing silently? I&#8217;ll file it in the bug tracker and we&#8217;ll see.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/uberpython.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/uberpython.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/uberpython.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/uberpython.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/uberpython.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/uberpython.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/uberpython.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/uberpython.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/uberpython.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/uberpython.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/uberpython.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/uberpython.wordpress.com/180/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/uberpython.wordpress.com/180/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/uberpython.wordpress.com/180/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=uberpython.wordpress.com&amp;blog=4565747&amp;post=180&amp;subd=uberpython&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://uberpython.wordpress.com/2011/10/21/python-23-and-unicode-file-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/48aae91146c6aa266ff2c9b3d1ab5d8b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">ubershmekel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
