<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3819517114107339428</id><updated>2011-11-27T15:27:09.791-08:00</updated><title type='text'>Select Star From Where?</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3819517114107339428.post-637489461409119838</id><published>2009-10-19T12:31:00.001-07:00</published><updated>2009-10-19T12:33:39.151-07:00</updated><title type='text'>guide to installing cx_Oracle on Mac OSX</title><content type='html'>Ran into some trouble after I installed python 2.6, and found this helpful blog entry. Kept getting "Symbol not found: ___divdi3" error. Unfortunately, the advice didn't work for me, but it does seem to have worked for a number of people.  The only thing that worked for me was ditching the 2.6 install and reverting back to OSX's default 2.5.1 version.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://codingnaked.wordpress.com/2008/05/07/build-and-install-cx_oracle-on-macos-x-leopard-intel/"&gt;Build and install cx_Oracle on MacOS X Leopard Intel&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3819517114107339428-637489461409119838?l=selectstarfromwhere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/637489461409119838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/10/guide-to-installing-cxoracle-on-mac-osx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/637489461409119838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/637489461409119838'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/10/guide-to-installing-cxoracle-on-mac-osx.html' title='guide to installing cx_Oracle on Mac OSX'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3819517114107339428.post-6120879823645767227</id><published>2009-10-16T13:58:00.000-07:00</published><updated>2009-10-16T13:59:28.156-07:00</updated><title type='text'>python script to list oracle tables and indexes</title><content type='html'>&lt;pre&gt;&lt;br /&gt;import cx_Oracle&lt;br /&gt;orcl = cx_Oracle.connect('username/password@db')&lt;br /&gt;curs = orcl.cursor()&lt;br /&gt;&lt;br /&gt;schema='my_schema'&lt;br /&gt;&lt;br /&gt;curs.execute("""&lt;br /&gt; select table_name from all_tables where owner=:own&lt;br /&gt;  order by 1&lt;br /&gt;  """,own=schema)&lt;br /&gt;&lt;br /&gt;table_names=curs.fetchall()&lt;br /&gt;&lt;br /&gt;tables=[]&lt;br /&gt;&lt;br /&gt;class TableInfo:&lt;br /&gt; def __init__ (self,tname):&lt;br /&gt;  self.name=tname &lt;br /&gt; indexes={}&lt;br /&gt; partitions={}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;for tn in table_names:&lt;br /&gt; t=TableInfo(tn[0])&lt;br /&gt; indexlist={}&lt;br /&gt; curs.execute("""&lt;br /&gt;  select index_name from all_indexes where table_name=:tbl&lt;br /&gt;  """,tbl=t.name)&lt;br /&gt; index_names=curs.fetchall()&lt;br /&gt; &lt;br /&gt; colnames=[]&lt;br /&gt; &lt;br /&gt; for xn in index_names:&lt;br /&gt;  curs.execute("""&lt;br /&gt;  select column_name from all_ind_columns where index_name=:ind&lt;br /&gt;  """,ind=xn[0])&lt;br /&gt;  &lt;br /&gt;  col_names=curs.fetchall()&lt;br /&gt;  &lt;br /&gt;  for cn in col_names:&lt;br /&gt;   colnames.append(cn[0])&lt;br /&gt;   &lt;br /&gt;  indexlist[xn[0]]=cn[0]&lt;br /&gt;&lt;br /&gt; t.indexes=indexlist&lt;br /&gt; tables.append(t)&lt;br /&gt;  &lt;br /&gt;for t in tables:&lt;br /&gt; print t.name,t.indexes&lt;br /&gt;&lt;br /&gt;curs.close()&lt;br /&gt;orcl.close()&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3819517114107339428-6120879823645767227?l=selectstarfromwhere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/6120879823645767227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/10/python-script-to-list-oracle-tables-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/6120879823645767227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/6120879823645767227'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/10/python-script-to-list-oracle-tables-and.html' title='python script to list oracle tables and indexes'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3819517114107339428.post-7269253722717781902</id><published>2009-09-30T13:26:00.001-07:00</published><updated>2009-09-30T13:26:25.437-07:00</updated><title type='text'>some useful (and relatively uncommon) R tips</title><content type='html'>http://www.win-vector.com/blog/2009/09/survive-r/&lt;br class="khtml-block-placeholder"&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3819517114107339428-7269253722717781902?l=selectstarfromwhere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/7269253722717781902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/09/some-useful-and-relatively-uncommon-r.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/7269253722717781902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/7269253722717781902'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/09/some-useful-and-relatively-uncommon-r.html' title='some useful (and relatively uncommon) R tips'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3819517114107339428.post-2228484214104256545</id><published>2009-09-16T16:49:00.001-07:00</published><updated>2009-09-16T17:19:35.211-07:00</updated><title type='text'>pl/sql function to round down to nearest minute interval</title><content type='html'>&lt;pre&gt;create or replace function nearest_min(dt IN DATE, interval_minutes NUMBER)&lt;br /&gt;return DATE&lt;br /&gt;is&lt;br /&gt;newdate DATE;&lt;br /&gt;BEGIN&lt;br /&gt;newdate := trunc(dt,'HH')+(trunc((dt-trunc(dt,'HH'))*24/(interval_minutes/60)))/(60/interval_minutes)/24;&lt;br /&gt;return newdate;&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thanks to http://www.freelists.org/post/oracle-l/Fun-with-SYSDATE-TRUNC-and-rounding,1 for the logic behind the calcuation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3819517114107339428-2228484214104256545?l=selectstarfromwhere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/2228484214104256545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/09/plsql-function-to-round-down-to-nearest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/2228484214104256545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/2228484214104256545'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/09/plsql-function-to-round-down-to-nearest.html' title='pl/sql function to round down to nearest minute interval'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3819517114107339428.post-5709973642991677315</id><published>2009-08-25T12:27:00.001-07:00</published><updated>2009-08-25T12:29:10.688-07:00</updated><title type='text'>Using Imagemagick to create an animated gif from .png files</title><content type='html'>With R, I created a series of charts, each representing a sample snapshot at a given time.  I wanted to animate them, and found a wonderful command-line set of utlities called ImageMagick.  I had to jump through quite a few hoops to install ImageMagick on Mac OS X (will post details if/when I get the time), but I'm glad I did.&lt;br /&gt;&lt;br /&gt;Here's a sample session where I combine the files into an animate gif:&lt;br /&gt;&lt;br /&gt;~/r/tmat&gt;ls&lt;br /&gt;tmat02.png  tmat04.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat06.png  tmat08.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat10.png  tmat12.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat14.png  tmat16.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat18.png  tmat20.png&lt;br /&gt;tmat03.png  tmat05.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat07.png  tmat09.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat11.png  tmat13.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat15.png  tmat17.png&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;tmat19.png&lt;br /&gt;~/r/tmat&gt;convert -delay 20 -loop 0 * page_transition.gif&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3819517114107339428-5709973642991677315?l=selectstarfromwhere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/5709973642991677315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/08/with-r-i-created-series-of-charts-each.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/5709973642991677315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/5709973642991677315'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/08/with-r-i-created-series-of-charts-each.html' title='Using Imagemagick to create an animated gif from .png files'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3819517114107339428.post-5351661823585486550</id><published>2009-07-23T17:06:00.001-07:00</published><updated>2009-07-23T17:08:23.537-07:00</updated><title type='text'>pig on hadoop: count all rows</title><content type='html'>&lt;pre&gt;&lt;br /&gt;pt = LOAD 'data'&lt;br /&gt;B = GROUP pt ALL;             &lt;br /&gt;C = FOREACH B GENERATE COUNT(pt);&lt;br /&gt;DUMP C;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3819517114107339428-5351661823585486550?l=selectstarfromwhere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/5351661823585486550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/07/hadooppig-count-all-rows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/5351661823585486550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/5351661823585486550'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/07/hadooppig-count-all-rows.html' title='pig on hadoop: count all rows'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3819517114107339428.post-1133989562115335736</id><published>2009-07-23T16:39:00.000-07:00</published><updated>2009-07-23T16:55:03.103-07:00</updated><title type='text'>actionscript 3: dynamically add attribute to xml element</title><content type='html'>pf is an XML object, cols is an array of attribute values, and headers is an array of attribute names.&lt;br /&gt;&lt;br /&gt;The @[&lt;span style="font-style:italic;"&gt;variable name&lt;/span&gt;] syntax works the magic.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;for(var cn:int=0;cn&amp;lt;cols.length;cn++){&lt;br /&gt;  var col_name:String = headers[cn];&lt;br /&gt;  pf.ROW[rn-1].@[col_name]=cols[cn];&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3819517114107339428-1133989562115335736?l=selectstarfromwhere.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://selectstarfromwhere.blogspot.com/feeds/1133989562115335736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/07/actionscript-3-dynamically-add.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/1133989562115335736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3819517114107339428/posts/default/1133989562115335736'/><link rel='alternate' type='text/html' href='http://selectstarfromwhere.blogspot.com/2009/07/actionscript-3-dynamically-add.html' title='actionscript 3: dynamically add attribute to xml element'/><author><name>Jay</name><uri>http://www.blogger.com/profile/10308803603473387469</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
