Valkertown Services and OpenID

November 25th, 2008

Well I have been fidling a lot with openid and valkertown’s services and now most of them are openid enabled as consumers.

Here’s the list:

  • Blog comments are now openid enabled
  • Finisht my fork of finisht I have added my fork, #hashtags support and openid consumer support
  • Gclap, Gclap is my attempt to start a GLUG here in Colombia that is not student oriented and most industry oriented, yet I have to find time to push/promote it.

I have to see if I can setup valkertown’s xmpp server as an openid consumer so using speeqe rooms will become even easier

Well, please give them a try and if you’re in Colombia and like my idea of the GLUG drop me a word.

, , , , ,

R.I.P Grandmother

November 23rd, 2008

Today around 6:00 AM GMT-5 my grandmother Ana Celia Vega passed away while sleeping. Incredibly while I didn’t meet with her a lot I remember that we were being quite attached to her and having a lot of fun while visiting her house.

Testing Laconica Tools

November 23rd, 2008

Well this post is just to test the laconica tools plugin for wordpress. This message should end up on my identi.ca feed announcing a new post made.

Goodbye Slackware

November 22nd, 2008
Slackware Powered

Well, after having spent all my time with GNU/Linux using my favorite distro, which is almost 8 years, I finally moved away from Slackware. Not that I have any problem with it, it’s just I found a distro that I like even more.

My new distro of choice is now Archlinux, which happens to be a quite updated distribution contrary to slackware, I have yet to see the stability and all that, but after a week of using it I have found I can spend less time fiddling with source installs and still don’t being bothered by excesive system automation. As far as binary builds Arch respects the source and will not alter the stuff that’s installed also I have seen very few patches applied to the source.

My favorite part of Archlinux are the PKGBUILDS which are smart enough to create packages from source code coming from git/svn/mercurial/darcs/etc… checkouts and handle the packaging and still gives me full control of the build process and patching. This is pretty important for me since I happen to run most of my day to day software from version control checkouts with custom patches and compilation and this is the first non-slackware distro that I can do that without fighting at all with the distribution.

While installing Archlinux I found that my old lvm schema that used root as vg and one lv was a big mistake since it interfered with kinit,udev and some scripts during the boot process. On slackware I didn’t had any trouble since I had modified my boot to handle that, yet on arch kinit simply will not work if that schema persisted, so I had to change my vg and lv names (not a big deal but I wasted so much time figuring out)

So far being very happy with it, no more compiling a lot of packages I didn’t like and can keep kernel compilations to the minimum since Archlinux software list is really up to date. This really helps when you use new software or happend to be dealing with really recent hardware.

Archlinux Powered

Finally I really doubt I ditch Slackware at all, since I have a load of projects that still runs over the slackware platform and ideas but with time I will update them all to arch, including my microwulf cluster that I have on the CIF’s basement.

EOP

, , , ,

Simple Identi.ca to Jaiku Bridge

November 10th, 2008

Well since I barely use my jaiku account, even when it has xmpp support. Probably is that I’m not really interested on the conversations there and no one uses jaiku channels. It would be a lot better if it used something like “track” the one you find in identispy for identi.ca, twitterspy for twitter and Jance for Pownce.

Anyway I decided that I wouldn’t bother setting yet another account on some random service to update identi.ca,twitter and jaiku at the same time so I decided to write something myself.

After very little effort I came out with this, it’s pretty basic and with ZERO error checking but it does what I want.

I used feedparser and simplejson python modules.

  1. #!/usr/bin/env python
  2.  
  3. import simplejson
  4. import urllib
  5. import feedparser
  6. import time
  7. import re
  8.  
  9. identica_rss="http://identi.ca/IDENTICA_USER/rss"
  10. user = ‘JAIKU_USER’
  11. api_key =‘JAIKU_KEY’
  12.  
  13. class JaikuInterface:
  14.     method = ‘POST’
  15.     api_url = ‘http://api.jaiku.com/json’
  16.     def __init__(self,user,key):
  17.         self.user=user
  18.         self.api_key=key
  19.     def post(self,message):
  20.         body_dict = (
  21.             (‘user’,self.user),
  22.             (‘personal_key’,self.api_key),
  23.             (‘method’,‘presence.send’),
  24.             (‘message’,message)
  25.             )
  26.         body = urllib.urlencode(body_dict)
  27.         try:
  28.             f=urllib.urlopen(self.api_url,body)
  29.             ret = simplejson.loads(f.read())
  30.             f.close()
  31.             if ret[’status’]==u‘ok’:
  32.                 return True
  33.             else:
  34.                 return False
  35.         except:
  36.             return False
  37.  
  38.  
  39.  
  40. jaiku = JaikuInterface(user,key)
  41. last_date = time.mktime(time.gmtime())
  42. oldest = last_date
  43. time_fmt= "%Y-%m-%dT%H:%M:%S+00:00"
  44. striper = re.compile("^deepspawn: ")
  45. stripuser = lambda(x): striper.sub("",x)
  46. while True:
  47.     try:
  48.         identifeed=feedparser.parse(identica_rss)
  49.         for entry in identifeed.entries:
  50.             entry_date = time.strptime(entry.updated,time_fmt)
  51.             entry_date = time.mktime(entry_date)
  52.             if entry_date > last_date:
  53.                 oldest = max(entry_date,oldest)
  54.                 post = stripuser(entry.title)
  55.                 jaiku.post(post)
  56.         last_date=oldest
  57.     except:
  58.         pass
  59.     time.sleep(5*60)
  60.  

Well just replace IDENTICA_USER, JAIKU_USER and JAIKU_KEY with your values and that’s all.

It will poll every 5 minutes the rss and update jaiku with the new dents.

Well that’s all, it’s a small hack I hope someone find this interesting.

, ,

Concurso mejores trabajos de grado

October 31st, 2008

Hoy mi compañero Diego recibio este divertido correo desde la Dirección Nacional de Programas de Pregrado

Diego: Cuando la Universidad Nacional decidio abrir el abanico de modalidades para el Trabajo de Grado y quitar las menciones de Meritoria y laureada, no penso en lo que se venia luego: como incentivar y premiar a todas las variaciones de Trabajo de Grado. Como no es lo mismo hacer una pasantia y presentar un reporte a estar todo el semestre frente a un microscopio observando algo superespecial para el desarrollo de la humanidad, pues no se esta actuando con equidad pues el reporte de la pasantia no encaja en el formalismo del concurso mejores trabajos de Grado, asi le hayan puesto de nota 5 y haya tenido un desempeño sobresaliente… La UN debe pensar como premia a los excelentes en cada modalidad pero aun no lo ha hecho. El concurso premio hasta los trabajos de 2007. Falta 2008 pero ahora el enfasis esta en la reforma academica para implementar el acuerdo 033 en el primer semestre de 2009. Asi que solo hasta el 2009 se pensara en como hacer la seleccion y en ese tiempo se premiarian 2008 y 2009 y se haria difusion a lo que se concrete. Por ahora no. Feliz tarde,

Yo empezaré la discución sobre este tema, pero mi opinión personal extendida la dejo como un comentario.

,

Speeqe on Valkertown

October 5th, 2008
Speeqe is a tremendous idea to bring multi user chat(MUC) into the simplest possible web service you can think, if you want to invite your friends they all just have to follow an url you send and start chatting, things can be more complicated but it’s not required to start participating. Well now I have installed speeqe on my own server quite successfully, it wasn’t an easy task, yet it wasn’t that difficult.

If you want to try it check it here: Valkertown’s rooms you will need a Valkertown’s jabber account to test it, but I will solve this problem asap.

Here’s a list of some of the stuff I had to work around:

  • There’s still a lot of hardcoded strings in the js,css,templates with the speeqe url
  • The templates, js,css doesn’t prepend the djangos settings for MEDIA_ROOT, I wish I solved this nicely but all I did is set them
    manually.
  • Everything on my test server is server using an https connection that includes the http-bind. I figured how to solve this and it was not a big deal.
  • I had to do some minor modifications to the django/python client so it connects using https and to the ejabberd’s bosh module.

Here’s some of the stuff I disabled.

  • The demo stuff
  • The register stuff(I simply didn’t understand it) I tought it created a new xmpp account but it looks like it doesn’t, just an speeqe account, correct me if I’m wrong.
  • Virtual host, I’m not planning to do subdomain rooms.
  • Message search, I don’t like much this feature, I would like more a room search.
  • The static urls serve in the urls, I would activate it using some kind of flag, it’s just not good to see it there, I think it may lead to problems.

Here’s some of the stuff I modified:

  • I replaced virtual host to normal chat rooms urls, I would like and plan to setup shorter urls for local rooms without using dns
  • Templates to match my own domain where it made sense.

At last:

  • I’m missing the autologin feature, I’m guessing on how to deal with this but I want to keep the modifications I do to the code at a minimum.

, , ,

DS1M12 usb osciloscope in linux and python

October 1st, 2008
Well, today in the afternoon I was given a task, make the Usb Instruments DS1M12 usb osciloscope in linux, it was quite a surprise
to find out it had some kind of support for Linux and I started my work with their sources.

I found it requires two downloads one from USB Instruments itself and another from a thirdparty driver

Well, those two comes with some .so files you need to link your programs so you need to make sure
they have proper names like libDS1M12.so, libftd2xx.so and they can be found in the LD_LIBRARY_PATH or something like that, this is important.

After you get this solved it’s pretty straightforward with the USB Instruments package comes a good example you can use to understand their library, this took a bit of time since we(called some one to help me pinpoint some problems) could get it working and seeing the data flow quite fast, yet, it took us some time to discover that the sample code enabled the testmode and instead of real sampling, after that we could see the two channels sampling also the signal generator send out the example signals.

After this we agreed that it would be good to have a python interface to this osciloscope and I started working with swig to generare a proper wrapper around the USB Instruments library, around an hour ago I finished what we could call the first release of the interface and I’m being able to plot some data using matlplot lib. It took me a bit to figure how to manage to wrap some of the functions yet in the end swig and numpy solved all my issues.

I’m not really sure If I can release everything at the moment, I think I’ll have to ask USB Instruments since I use one of their headers to build the swig wrapper and it requires some minor modifications to make it work nicely so I would have to publish the modified header. If i get permission or any idea how I should publish the repository, it will be here at valkertown Mercurial Repositories

For now you have to beleive me that now the use of this osciloscope it’s reduced to something like this

  1.  
  2. """
  3.   Author: Carlos Andres Perilla
  4.   Centro Internacional de Física, Bogotá-Colombia.
  5.  
  6.   This program is free software: you can redistribute it and/or
  7.   modify it under the terms of the GNU Affero General Public License
  8.   as published by the Free Software Foundation, either version 3 of
  9.   the License, or (at your option) any later version.
  10.  
  11.   This program is distributed in the hope that it will be useful, but
  12.   WITHOUT ANY WARRANTY; without even the implied warranty of
  13.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  14.   Affero General Public License for more details.
  15.  
  16.   You should have received a copy of the GNU Affero General Public
  17.   License along with this program.  If not, see
  18.   <http://www.gnu.org/licenses/>.
  19.  
  20. """
  21.  
  22. from Osciloscope import UsbOsciloscope
  23. from pylab import *
  24. import time
  25.  
  26. o = UsbOsciloscope()
  27. # Load the firmare into the osciloscope FPGA, this the RFB that comes in the USBI pack.
  28. o.program()
  29. # Enables both channels for sampling
  30. o.set_channels()
  31.  
  32. while True:
  33.     # Start signal, it gets some other params like
  34.     # triggering configuration, port conf and a lot of other things
  35.     o.start_scan()
  36.     status = -1
  37.     while status != 0:
  38.         # Do the actual reading of a single frame
  39.         retval = o.get_data()
  40.         status = retval[0]
  41.         if status != 0:
  42.             # Since the buffers can be large and the according
  43.             # to the sampling rate we may need to wait a bit
  44.             time.sleep(0.01)
  45.         else:
  46.             # If we got the data successfully we can now plot what we got using
  47.             # matplot lib.
  48.             values = retval[5].dwNumValuesReturned
  49.             x_axis = arange(0,values,1)
  50.             plot(x_axis ,retval[2][0:values],‘r–’,x_axis,retval[3][0:values],‘bs’)
  51.             show()
  52.  

, , , , , , ,

Testing an identi.ca badge, some new badges

September 11th, 2008
Well, here is it, I will keep an eye on it before I add it some where in the page, anyway I’m far more
active on identi.ca than on pownce or jaiku, also I support more the ideas that identi.ca represents.

Also I changed the badges at the right of the blog for some flash based ones, one for Pownce
one for Jaiku, they good look good.

We’ll see with time how it evolves.

, , , ,

Art is Cheap!

August 20th, 2008

I have just fell in love with this image I found at ImgFave, which is a laconi.ca based place. Check Identi.ca to see the original place.

Cheap Art Manifesto

From the signature it looks it was written the year I was born, it just make me feel more in love with the message.

Feel free to copy and share it with everyone you know since this is the way it was passed to me and after a quick google it looks like it’s the overall intention of this message.

Enjoy! Seriously !