baali's blog

SciPy.in 09 Videos

Videos of keynote by Dr. Travis Oliphant and interviews of various invited guests are now available here. We are yet to get videos of various talks of other participants(processing of videos has delayed things).
There are some problems with videos also, the keynote address and introduction seems to be playing sound only with right speaker. And then in interview videos, the introduction soundtrack for interviews is really sparky. /me says, Alll izzz Well

Gnunify 10

This year we got one workshop on SciPy-Image processing selected for Gnunify. We were waiting for schedule eagerly and when it came out we were totally confused. There were almost 6 parallel tracks. So we reached to Pune at night and after dropping the luggage headed straight to event place to make sure we can get Lab setup properly. There were lots of volunteers running around fixing up things, making sure that "all izz well" for next day.
We had talk scheduled on first day itself that too at 10 AM. All the rest of talks and workshops were staring at 10:30, we were the odd one out, and even that didn't help. It was Friday, a working day so I think many students and professionals might have skipped first day. By 9:50 everything was very relaxed, no hurry no rush, people were turning in slowly and figuring out what sessions they would be attending. But for us it was going to be tough to lure attendees. By 10:10 we had two participants turned up and to make things worse, we had Kushal Das covering basic Python right next door. That talk was to start at 10:30 and students were lined up from half hour before itself. We were thinking of going around advertising the workshop to get more people, or changing workshop to a informal session of hands on, but then suddenly out of no where we got precious interested attendees, decent 20 odd turn up. But still we made the anchor(they introduces speakers to audience) also to participate.
Now the workshop requirement was that participants should have basics understanding of Python, but we got students still griped in evil clutches of TurboC++(Bhagwaan sab ko sadbuddhi de). So we changed the pace and plan of workshop, we covered basics image reading, displaying, numpy arrays, slicing and striding concepts, and then processing image by using filters, dropping information and other fundas. Thankfully we did not notice any one dozing off, they were responding to small exercises, and doing hands on. All in all it went well.
But I think, Gnunify management could have scheduled talks considering kind of audience registrations they had. I think, if this workshop would had been scheduled after introductory workshops and talks we could have got more and better literate participants, hence we could had covered more. Okay would have, could had are always there, lets hope we next time it is better.

Fun and Pain with Django

Phew, yesterday, rather today was a crazy night. I was trying to put up a django application for registrations of various users. Start was good and quickly within two days I got a decent application with captcha and other required fields. I uploaded it, and without much pain I got registration page up yAy.
We always have a local Point Of Contact from college where we are organizing the workshop. Now it will be nice feature if we can allow him/her also to view the registrations. And even better would be, he/she is limited to all the registrations they are in charge of, not of all the registrations. So again django views are simply great and I wrote simple view to limit user to particular list only. Nishanth is also learning django for his PyTasks so I thought it would be good idea to work together for some while to enable this view. He will get idea of how things work and I can get help from his learnings. He came up with this awesome one-liner to read a file, line by line, split it on particular delimiter and then create dictionary out of two fields

dictionary = dict([line.strip().split('|') for line in open('filename')])

Okay so everything working as expected, we tried to run the code locally and it was smooth and impressive(heh some time self-appreciation is good :P).
Now we pushed the code to the server, made sure everything was okay and in place, reloaded the apache and refreshed the page and BOOM gone. The normal registration itself vanished and we were getting error message of django not able to load views.py function from the app. It was bad, and people are still using it for registrations. It was already 1 am, we thought it would be over by 1:05, we will have some snacks and a good night sleep. But this BOOM really scared me. So we sshed into server, tried using django shell, loaded views and it was working fine. Nishanth tried extensive googling to search for some solution and came across a thread which mentioned about some problem with django, wsgi and reloading of views when something is changed. He said lets restart apache which I ignored for a while. We kept on trying making some changes and hoping that this time it will work. We were about to revert back to previous working version of site repo(Yeah hg always helps in such grave situations) when Nishanth said, "lets try restarting apache". We did that and yAy we got the app up again and running. Although it was not fault of django directly, but still I will give it also some credits. Phew by that time it was already 2:30 in night and we were like, dude we should hurry up, H-8 canteen is about to close and we wont get anything to eat if we are late.

TCE FOSS work culture: way to go

We attended a Faculty Development Program(FDP) held at Thiagarajar College of Engineering. It covered various FOSS topics for one of the elective subjects. During our stay we met the HOD of Computer Science Department Dr.S.Mercy Shalinie. She is a great teacher, she told us (Puneeth and me) about their various activities related to campus wide network management, website development and computing related infrastructure, which were very apt for creating active student community.

She asked her students to show us the features of tcenet and other initiatives for student participation and development. First of all, they declined to take services from their hardware (servers, routers etc.) providers, so that students can setup things on their own and get a chance to work on live projects. Faculty members also play a very minimal role in these activities. Students are given the freedom to try, test and fix. Then they told us about their hierarchy and work-flow. Their website, intranet, and mailing lists, are all managed by students (passed-out and present). They have an svn repository for all these projects. A few fourth year students have the commit rights and some alumni who were involved previously have commit rights from outside the campus. They have a trac based system for project management, and active mailing lists for discussions related to all these projects. Students from second year are encouraged to participate, initially they are required to submit patches for fixing bugs, and then just like all other open source projects they also have to prove themselves to get commit rights (AMAZING).

Not only that, they also provide an svn repository for all the final year students for their Major projects, even for non CS/IT students. For beginners, they had a poster system with sticky notes to paste the tickets and tasks so that they can get hang of version control systems and trac. All students, current and passed out, are provided shell access (feature which I find really essential and handy to try out some things which are not possible cause of work restrictions). Continuation of a previously done major project by new final year students is encouraged, so that code keeps on building and improving, which makes sense to me. Student sitting around in the lab, during the hands-on sessions were all into Python and Emacs whose limitless powers were unknown to me until recently.

To add to this, Shalinie madam was visibly taking pride in the achievements of her students when she was mentioning all this. She never forgot to mention that all this was new even for her and she hung around with her students to learn all of this. For each tech-fest and event, they try to invite passed out students to interact with current students and work together to fix issues, which is really ideal thing to create efficient learning atmosphere.

All this perfectly fits a Chinese proverb used in kurose-ross computer network book which goes like this:
Tell me and I'll forget; show me and I may remember; involve me and I'll understand.

Live Python 9.0x: Behind the Scenes

This all started with training programme for teachers of Amravati University, PR(aka Prabhu) asked, "Can we have a LiveCD kind of setup with all Python goodies packaged together?". The motivation was to have a handy DVD for conducting workshops in better way. Rather then fixing systems with all packages for all participants, lets have this, which can be booted directly. And once they are comfortable, they can install also.
I had already done similar kind of work previously at Sarai. I was very much impressed by working and ease of Ubuntu customization. Documentation available is really well written. Following it, one can roll out one's own Ubuntu release in no time. Though there are GUI tools available, I was more comfortable with this approach. After following basics I wrote a simple script with all commands to make things very fast.

The biggest challenge was to satisfy PR, once I presented him the first "in-house" DVD on Virtual Box, he got really excited. Then started deep hacking of the DVD to fit in various tools and latest release of packages. It was really extensive and feed back and requirements from PR were very frequent. We used to sit together and hack this media for hours.
Some of the beasts we put in this DVD were sage binary(at present 32 bit) 4.1.1, latest Mayavi-3.3.0, entire ets(Enthought Tool Suit), documentations for respective packages and lot more. Complete list is available here.
After this we had really long bike-shedding on how to package this, how to name different versions. And Madhu, PR and Vattam came up with awesome idea of using "zen of python" quotes per release. Then we had punchagan who created this great DVD cover:

But still we were missing something. It needed more hacks. We had all packages but they were all hidden behind scary but awesome linux terminal. Hence we thought of introducing a new menu entry. We created a new /usr/share/desktop-directories/Python.directory file, and added entries to /usr/share/applications/ to come up with:

One more addition was adding videos to DVD itself, so that it is a complete bundle. One wants to get started with Python, there are 8 hours videos bundled inside DVD itself. For that we tweaked /etc/skel/examples.desktop :)

PS: people were asking me to write a blog, and here I ended up with a "ramayan."

Syndicate content