Finally, I used Python enough to provide my own recipe.
Sorting a list of dictionary based on a key value.
Job well done!
Finally, I used Python enough to provide my own recipe.
Sorting a list of dictionary based on a key value.
Job well done!
As soon as I get time, I plan to implement Blogger class using GData API and finish implementing Movable Type API.
I am not sure if I got my readers acquainted with the fact that I am getting my first (and probably my only tattoo) on my whole back. Design can be found here.
I already have had 7 sessions with 4 more to go and with every session I have learnt a new trick to reduce the pain of the process. Here are the things I recommend:
BTW, for anybody in Iowa City, I am getting my tattoo done by the excellent artist Scott Warren aka Scotty at Nemesis Studio.
This time I 100% intend to complete the project.
So I came across a problem today where I had to implement a method whose input would be
dict = [{'a':'SomeValue', 'b':'SomeOtherValue'}, {'a':'SomeValue', 'b':'SomeOtherValue'}]
and the output would be
['SomeValue', 'SomeValue']
The code I wrote was:
But the more pythonic way is:
Finally, I managed to stay awake late till 4AM and used the time to consolidate my website.
I have moved from my old wiki-style website to a combined blog and website.
This website is powered by Wordpress and is using a very iElegant theme provided by N.Design Studio.
While working on my office stuff, I came across a situation where I had to use data-structure very similar to C Sturctures.
I initially thought of using a dictionary based approach but as norm I asked my doubts in #python IRC room and did a parallel Google search to find if something similar is out there.
IRC people suggested to use Class and Google threw up this link which demonstrates some good examples.
Today, I used wx.Sizers (which is used for laying out child-windows in a window) for the first time in life.
The concept of sizers is little different from what I am used to from my Win32 days. It took some time but now I think I have understood it 90% (I will never commit the sin of saying that I know something in computers 100%, well that never happens).
In between my study of sizer docs, I asked some doubts in #wxWidgets room at Freenode and this is what Robin Dunn had to say about understanding sizers:
Use SetSizer on the window that is the parent of the controls being managed by the sizer. Use Add with the widgets to the sizer managed by it.
Very helpful.
Ref #1: wxSizer Tutorial
So finally I took the plunge and updated my Wordpress. Followed the steps provided in WP documentation and was able to do the job without any hassle. Except one problem, after upgrading - all my Category information were lost. This post helped me in fixing it.
Removed all the unnecessary plugins that I was using before. Now the site is much more clean and basic minimum options are provided.
My main website uses Mediawiki as the CMS and I have not been able to find a common theme for both. Till I find one, I will just the default themes for both the tools.
Hope thats not too distracting. Maybe someday I will read up docs on editing themes for WP and Mediawiki and implement my own theme.
Few days have passed after the recent spate of terrorist attacks in Bengaluru and Ahmedabad and Indians are back to normal business. Known for our resilient nature, I believe Indians get back to normality more quickly then anybody.
As expected political mud-slinging has again started with Congress and BJP blaming each other for the mess. Articles at Rediff are full of nationalistic and communalistic comments with 90% of the comments favoring carpet bombing Pakistan. I am not sure if that is the correct solution but let us leave the debate for another day. The most surprising factor is that nobody has yet come out with a concrete solution plan on how to fight this growing nuisance.
Now back to the topic of this post, yesterday while having dinner, I had a debate with a friend and it shed some light on the situation. We as Indians - JUST DONT CARE! While discussing various events related to Terrorism, I mentioned the recent LoC crossfire between India and Pakistan and the first reply by the friend was - “You cannot trust the Indian politicians or people as they might have instigated these events just to make a political point. I am sure Indian intelligence also provokes or does illegal things in Pakistan”. Not saying that we should take every position taken by Government with complete trust but as an Indian the least we can do is to believe in our people and army that we what we are doing is correct. More so considering the fact in the complete history of India, we have never been the aggressor for once.
Till the time we as Indian have negative thoughts about everything Indian, we can never succeed or progress as an Indian.
Recent Comments