Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

A silly entry

To­day's en­try has no pieces of neat python code, no ques­tion­s, no crit­ic of any­thing, no in­ter­est­ing link, no hint of any­thing I wrote/(­would/will)write, no fun­ny piece, no un­fun­ny piece, no noth­ing.

I am tired to­day.

So, have a nice day :-)

The Da Vinci Code is Broken.

I can now post and noone can com­plain about how I had not read the book. Al­thou­gh of cour­se, I ha­ven't. But this is about the mo­vie.

Firs­t, I want to say that I must co­rrect my pre­vious co­m­men­ts, cau­s­ed by rea­ding a sy­nop­sis of the book in Dan Bro­wn's si­te.

I must say (a­s­su­ming the mo­vie fo­llo­ws the book) that it does­n't paint Opus Dei as a clan­des­ti­ne sect at all (not even as spe­cia­lly in­te­res­ted in ob­tai­ning any se­cre­t). On­ly one spe­ci­fic cou­ple of Opus Dei gu­ys are. Whi­ch is fi­ne and dandy for me. Se­cret so­cie­tys can cha­se ea­ch other around the glo­be. Their pro­ble­m.

Of cour­se it al­so means the fo­llo­wing ( agai­n, if the book is like the mo­vie ):

  • The co­­­m­­men­­ts de­­fen­­ding the book's po­r­­trait of Opus Dei as a se­­cret so­­­cie­­ty as appro­­­pia­­te fi­c­­tion are no­n­sen­se, be­­­cau­­se the book does­n't do tha­­t. You we­­re de­­fen­­ding the book of so­­­me­­thing tha­­t's not in the book.

  • The guy that wro­­­te the sy­­no­p­­sis in Dan Bro­­wn's offi­­cial si­­te has not read the book.

Ha­ving said tha­t, on­to mo­re se­rious ma­tter­s...

Ron Ho­ward is in­ca­pa­ble of fil­ming a com­prehen­si­ble ac­tion sce­ne. Do­n't trust me? Wa­tch the Smar­tcar cha­se.

Tom Hank's hair is sca­r­y. It's a weird bi­la­te­ral com­bo­ve­r. I us­ed to do tha­t. I do­n't an­y­mo­re. I am ri­ght about sto­ppin­g. Be­si­des, it's way too dis­trac­tin­g.

http://lateral.blogsite.org/static/calculin.jpg

Pro­fe­s­sor Lan­g­do­n, I pre­su­me?

I en­jo­yed the mo­vie as a pop­corn fli­ck wi­th pre­ten­tion­s, but most of the plot fo­llo­ws no lo­gi­c.

Sau­nié­re tri­ggers an alar­m, in the Lou­v­re, and is then shot in the sto­ma­ch. Then he traip­ses around the mu­seu­m, fin­ds a ma­rker vi­si­ble on­ly on UV li­gh­t, does things to th­ree pain­tings, hi­des a key be­hind a lar­ge, hea­vy pain­tin­g, takes off his clo­the­s, crea­tes an ana­gra­m, wri­tes it on the floor along wi­th so­me num­ber­s, draws a pen­ta­cle on his ches­t, arran­ges hi­mself in a po­si­tion re­mi­nis­cent of the Vi­tru­bian man, and then die­s.

He not on­ly does all that ins­tead of ca­lling an am­bu­lan­ce on his ce­ll, but he does all that be­fo­re mu­seum se­cu­ri­ty ge­ts the­re. In the ga­lle­ry that has the Da Vin­cis.

Not on­ly is it un­like­l­y, but it al­so is stu­pi­d. Had he died ear­lie­r, he coul­d, for ins­tan­ce, ha­ve been found wi­th the key in his han­d, and no clue le­ft for the "good gu­ys".

It's ama­zing the­re is sti­ll any pain­tings in that mu­seu­m, wi­th su­ch se­cu­ri­ty.

And do­n't get me started on the bi­i­i­i­ig se­cre­t. It turns out the Prio­ry of Sion pro­tec­ts a se­cret about Je­sus.

If said se­cret was re­vea­le­d, it would da­ma­ge the ca­tho­lic chur­ch.

Of cour­se... the ca­tho­lic chur­ch al­so kno­ws the na­tu­re (and de­tail­s) of the se­cre­t, whi­ch means the ca­tho­lic hie­rar­chs de­di­ca­te their li­fes to a fai­th they know to be fal­se. Whi­ch makes no sen­se, rea­ll­y.

And then it turns out that se­ve­ral his­to­rians al­so know the na­tu­re and de­tails of the se­cre­t, and ha­ve pu­blis­hed books about it (ex­cep­t, of cour­se, they ha­ve no evi­den­ce).

LAST WAR­NIN­G, HU­GE SPOI­LER HE­RE

REA­LLY

The­re is, ho­we­ve­r, one de­tail on­ly the Prio­ry is su­ppo­sed to kno­w: the lo­ca­tion of a corp­se that could be us­e­d, via DNA ana­l­y­sis, to show that so­me per­son is a des­cen­dant of so­me spe­ci­fic other "his­to­ri­cal fi­gu­re".

Whi­ch is, of cour­se, ab­so­lu­te non­sen­se.

Su­ppo­se I show you a corp­se and te­ll you "this is the corp­se of Joan of Ar­c". You car­bo­n-14 da­te it, and do the usual fo­ren­sic ana­l­y­sis, and all agrees. It's a wo­man, that died in a fi­re, at su­ch age in so­-an­d-­so yea­r.

Then I show you a DNA ana­l­y­sis that sho­ws she is my grea­t-­grea­t-­grann­y.

Am I the scion of the Or­leans Mai­den?

He­ll no! Be­cau­se to ac­cept tha­t, you would ha­ve to ac­cept that the corp­se is her­s!

You can on­ly rea­so­na­bly do that if the­re is a clear his­to­ri­cal re­cord of the whe­rea­bou­ts of the corp­se un­til no­w, or el­se it's a ra­ther sim­ple for­ge­r­y.

For exam­ple, no­wa­da­ys we us­ed DNA of kno­wn des­cen­den­ts of Co­lum­bus to de­ci­de whi­ch of his two alle­ged bo­dies is the real one. About a kno­wn his­to­ri­cal fi­gu­re, worl­d-­fa­mous in his li­fe. We are just not su­re of whe­re his corp­se is. We ha­ve two of tho­se.

Sin­ce the "wi­tnesses" of the au­then­ti­ci­ty of this corp­se are the ones that are bound to gain from the clai­ms, it's sus­pect at bes­t.

If you go ba­ck a cer­tain num­ber of ge­ne­ra­tion­s, al­most eve­ry corp­se wi­ll be your grann­y.

I am pre­tty su­re that a lar­ge per­cen­ta­ge of mo­dern eu­ro­peans are re­lated to al­most any ran­dom 2000 yea­r-old corp­se.

An­d, in the spe­ci­fic ca­se of the mo­vie (or the book), even if you as­su­me it is the corp­se of who they sa­y, so wha­t? That sho­ws she is the des­cen­dant of a cer­tain wo­man, not of a spe­ci­fic man. Get it? You do­n't pro­ve the big pre­mi­se. On­ly the li­ttle, mea­nin­gle­ss pre­mi­se, that M.­M. (not Ma­ri­l­yn Mon­roe) had a chil­d. Who gi­ves a dam­n?

The se­cret the Chur­ch is tr­ying to keep se­cre­t, the se­cret the Prio­ry is not tr­ying to make pu­blic an­ywa­y... does­n't ma­tte­r. It does­n't cau­se what the chur­ch fear­s, it does­n't cau­se what the Prio­ry ho­pes, it does no­thing.

So, rea­ll­y... mu­ch ado about ve­ry li­ttle. If I we­re the chur­ch, I would let them say whate­ver they wan­t, and no­thing would ha­ppen. Ab­so­lu­te­ly no­thing.

Not to men­tion that the apo­cr­y­phal Leo­nar­dian de­vi­ce, the cr­yp­tex... it's ... I ha­ve no wor­d­s. If you miss­ed it, the idea is that the­re is a pa­p­y­rus in­si­de it, and a vial of vi­ne­ga­r. If you try to open it wi­thout the ke­y, the vi­ne­gar "dis­sol­ves the pa­p­y­rus".

Do you know what pa­p­y­rus is? It's ma­de of the ste­ms of a plan­t, and it looks a lot like pa­pe­r.

It's ce­llu­lo­se. It does­n't dis­sol­ve in vi­ne­ga­r. It's like sa­ying le­ttu­ce dis­sol­ves on vi­ne­ga­r.

You can make a pa­per that dis­sol­ves on vi­ne­ga­r, but pa­p­y­rus is not pa­pe­r.

It may make so­me sen­se if you said the ink us­ed dis­sol­ves on vi­ne­ga­r, but it's not what they sai­d. What they said is stu­pi­d.

So, it de­fies rea­son how so many peo­ple can en­joy a book ba­sed on a pre­mi­se in­no­cent of lo­gi­c, about a cons­pi­ra­cy to pro­tect no­thing.

Python-v4l: neat!

Think­ing about Cher­ryTV and ways to turn it in­to a re­al ap­pli­ca­tion, I thought the worse piece of it was the re­liance on v4lctl, and how re­al­ly you just don't know if it works or not, and how you can't fine­tune, and what­ev­er, and run in­to Python-v4l.

It has re­mained ap­par­ent­ly un­touched by two years, but I man­aged to build it with one ed­it and to make it work by switch­ing a line to an al­ter­nate ver­sion (they are both there), and it's nice.

Here's the ex­am­ple TV view­ing ap­pli­ca­tion us­ing it:

#!/usr/bin/env python
# Sample TV viewing application for pyv4l >= 0.3 - by Michael Dove
#<pythondeveloper@optushome.com.au>
# Note: this does the imaging in grab mode. Performance is limited.
# I average 35 fps @ 320x240. Disabling the writes to the tk window yeilds 90+ fps.

import v4l
import Image
import ImageChops
WIDTH = 320
HEIGHT = 240
vid = v4l.video('/dev/video')
cap = vid.getCapabilities()
print "Device Name: %s" % cap[0]
print "Type: %d" % cap[1]
print "Channels: %d" % cap[2]
print "Audios: %d" % cap[3]
print "Maximum Width: %d" % cap[4]
print "Maximum Height: %d" % cap[5]
print "Minimum Width: %d" % cap[6]
print "Minimum Height: %d" % cap[7]
vid.setupImage(WIDTH, HEIGHT, v4l.VIDEO_PALETTE_YUYV)
print vid.getChannel(0) # TV
vid.setChannel(0) # set to TV
vid.setFrequency(216250)

import Tkinter
tk=Tkinter.Tk()
import ImageTk
photo = ImageTk.PhotoImage("RGB",(WIDTH,HEIGHT))
label= Tkinter.Label(tk,text="mini TV",image=photo,width=WIDTH,height=HEIGHT)
label.pack()

vid.preQueueFrames()
nextFrame = 0;
vid.setVolume(5)
vid.mute()

try:
    while 1:
        output = vid.getImage(nextFrame)
        im = Image.fromstring("RGB", (WIDTH, HEIGHT), output)
        # update Tk label
        photo.paste(im)
        tk.update()
        nextFrame = vid.queueFrame()

except Tkinter.TclError:
    print "something"
    pass
vid.mute()

If you have seen the equiv­a­lent C ap­p... well... nice job here!

Great radio show, for free.

It re­al­ly hurts my pro­duc­tiv­i­ty, be­cause I can't un­der­stand a ra­dio show in eng­lish and code at the same time (although I man­age to pre­tend to chew gum and walk), but hey... it's Penn Jil­let­te, and I love the guy.

You can lis­ten to his show for free here: http://pen­n.freefm.­com/

Have fun!

Flickr Banners

If you are one of the three per­sons who ac­tu­al­ly see this blog on its site in­stead of read­ing it through some sort of ag­gre­ga­tor, you may have no­ticed I have a ban­ner.

This is what it looks like:

//ralsina.me/lateral/lateral.jpg//ralsina.me/lateral/opinion.jpg

Nice, ah?

It's not very orig­i­nal (look for "spell with flick­r" to see where I stole the idea), but I wrote a script to do it. So here it is, feel free to steal it too, it's your turn.

You will need this, Im­ageMag­ick, and a Flickr API key.

To use it sim­ply call it like this:

python banner.py something

And you will have a some­thing.jpg with some­thing in it.

#!/usr/bin/env python

import flickr,sys,random
from urllib import urlopen
import os

g=flickr.Group(id="27034531@N00")

urls = []
for l in sys.argv[1]:
  if l=="a":
    l="aa"
  if l=="i":
    l="ii"
  photos = g.getPhotos(tags=[l], per_page=50)
  urls.append(photos[random.randrange(50)].getURL(
              size='Square', urlType='source'))


for i in range(0,len(urls)):
  f=open(str(i)+'.jpg','w')
  data=urlopen(urls[i]).read()
  f.write(data)
  f.close()

os.system ("montage -tile %dx1 -geometry +0+0 %s %s"%(
            len(urls),' '.join([ '%d.jpg'%x for x in range(0,
            len(urls)) ]), sys.argv[1]+'.jpg'))

Contents © 2000-2020 Roberto Alsina