Updates
-
#python metaclasses after long time :) This time it took 5 minutes to get it right and pleasing results.8 hours ago from web | Reply, Retweet, Favorite
-
I just love Google+. #googleplus #fb10 hours ago from web | Reply, Retweet, Favorite
-
@thedealfactory Awesome. Contrates @irohan6 days ago from web | Reply, Retweet, Favorite
-
In the middle of making decisions that is going to affect coming years of my #life. But no time to sit and think. Ridiculously busy #career6 days ago from web | Reply, Retweet, Favorite
-
@thinrhino @55bio +1 to coworking in Pune8 days ago from web | Reply, Retweet, Favorite
-
Looking for #python / #jquery developer to contribute open source project http://t.co/7KXfthAw Please RT #job
-
Dear zero tweet followers, are you real?
-
@thinrhino Nomad for now9 days ago from web | Reply, Retweet, Favorite
-
@irohan shame that #Pune have none. Mumbai, Banglore Chennai have nice spaces. BTW we develop #coworking solution check http://t.co/7KXfthAw9 days ago from web | Reply, Retweet, Favorite
-
@cobot_me Impressive. Although I am not one, but sure that your clients are happy to see how much you care. Cheers.9 days ago from web | Reply, Retweet, Favorite
-
@sukhdugal +19 days ago from web | Reply, Retweet, Favorite
-
Last day at Pune IT Park tomorrow.10 days ago from web | Reply, Retweet, Favorite
-
@jdaviescoates Thanks for RT :)11 days ago from web | Reply, Retweet, Favorite
-
Hi @jdaviescoates , happy to share that cowoop is launching soon. Open source software to manage coworking places. http://t.co/E1Q55Hi112 days ago from web | Reply, Retweet, Favorite
-
13 days ago from web | Reply, Retweet, Favorite
-
@shon_ @davidwalshblog affiliate link I mean2 weeks ago from web | Reply, Retweet, Favorite
-
@davidwalshblog Wondering if you have any namedotcom's affiliate which I can use while I purchase domains :)2 weeks ago from web | Reply, Retweet, Favorite
-
3 weeks ago from web | Reply, Retweet, Favorite
-
3 weeks ago from web | Reply, Retweet, Favorite
Updates
-
Hey @lesly @hub_rocket We are working on demo setup and will be ready in next few days. Will invite you. Thanks for your interest. Cheers.6 days ago from web | Reply, Retweet, Favorite
-
It took four hours of debugging to fix @hubrotterdam 's invoicing but happy with the outcome :)7 days ago from web | Reply, Retweet, Favorite
-
@JoshClemence Thanks. We would send you demo details soon :) Further do share any specific requirements/expectations if you have?8 days ago from web | Reply, Retweet, Favorite
-
@kleverdogcowork Would soon we can send demo setup details. Also love to know if you have any specific requirements/expectations.8 days ago from web | Reply, Retweet, Favorite
-
Really happy with @webfaction #hosting. Another instance ordered. @webfaction set it up for us in just few minutes.11 days ago from web | Reply, Retweet, Favorite
-
It seems we avoided the temptation for long but now giving in. We would be using @TWBootsrap in next release!11 days ago from web | Reply, Retweet, Favorite
-
13 days ago from web | Reply, Retweet, Favorite
-
Data migration is fun.3 weeks ago from web | Reply, Retweet, Favorite
-
Installing gevent on shared hosting server | Desi Penguin’s Blog http://t.co/mlOOS1fb via @ThinkDevGrow
-
So in no time we got our #python app (flask+gevent+postgresql+sphc+compass) running on @webfaction . Load testing ahead.7 weeks ago from web | Reply, Retweet, Favorite
-
@webfaction Thats wonderful. Happy to be webfaction customer.7 weeks ago from web | Reply, Retweet, Favorite
-
Flask App now running on #webfaction. Had to learn control panel terminology. But wasn't very difficult.8 weeks ago from web | Reply, Retweet, Favorite
-
So far good. Very quick setup/activation. Can ssh. Terminal very responsive. #webfaction. Time for more advanced tasks8 weeks ago from web | Reply, Retweet, Favorite
-
Chosen @WebFaction for #Hosting. http://t.co/gqSILDe2 [affiliate link] . Will share the experience soon.2 months ago from web | Reply, Retweet, Favorite
-
Another #release. Version 0.4. Next one would be the final release and will be running on production server :)2 months ago from web | Reply, Retweet, Favorite
-
Nasty browser date difference that was discovered hard way. This helped -> http://t.co/LUgUlgQH2 months ago from web | Reply, Retweet, Favorite
-
@mariusdonea Interested in ajax-booking-calendar but previews are not working for us. Also is it capable of taking booking in hour/minutes?2 months ago from web | Reply, Retweet, Favorite
-
Adding comments to http://t.co/XoBRYl6g does not work. #python3 months ago from web | Reply, Retweet, Favorite
-
Added request approval backend and re-factored roles api. All tests pass :)3 months ago from web | Reply, Retweet, Favorite
-
Just made third alpha #release. Lot of foundation frontend work, more breadth covered. Next releases will be built on work done now.3 months ago from web | Reply, Retweet, Favorite
Profile
Summary
Experience
- Jan 2011 - PresentFounder / No name yetDeveloping operations platform for co-working business.
- Jan 2008 - Aug 2011Consultant / The HubDesign and develop open source solutions for The Hub.
- Mar 2010 - Mar 2010Consultant / ShopSociallyDevelopment of scalable Notification component for their new product.
- Oct 2007 - Jan 2008Sr. Software Engineer / BladeLogic
- Jun 2003 - Oct 2007Tech Lead / Ensim India Pvt. Ltd.Ensim is leading provider for web hosting applications. Ensim Pro for Linux (also know as Linux Webppliance) was the flagship product for shared hosting management.
- 2001 - 2001NOE / Balasai Net Pvt Ltd
Additional Information
Posts
Problem
You want to implement search against user objects stored in redis using Python. Something like querying for all user ids whose username begins with "an".
Solution
Here we have user objects stored in as hashes with "user:obj:" as prefix.
For example
user:obj:3955 {id: 3955, username: 'John', ..}
We need some extra data structures to support our search i.e. (search user objects where username begins with given phrase. So search for jo should match John, Joe and so on. We will use sorted sets of all usernames and will assign every element a score. This score is a float and helps us in finding the matching words.
Some scores for eg.
a -> 0.097
ab -> 0.097098
ac -> 0.097099
bc -> 0.098099
So for above four string if we find strings that has score that is => 0.097 and
Code
Discussion
This to demonstrate simple redis pattern and using it in Python.
See Also
There are already some good writeups on related topics.I do like Ubuntu Netbook Remix’s UI. However with 10.04 it’s just gone so unstable for me.
- After login when system prompts for keyring secret, UNR environment crashes and drops to gnome. I have to relogin if I need UNR env.
- After I removed a few packages it could not just start gnome panel causing a great inconvenience. I guess this is due to Evolution integration with latest Ubuntu. Mail client I like and use is Thunderbird. I cant switch to Evolution.
- Initially after 10.04 release it was damn slow to respond, so had to do some work around to get it to acceptable speed.
Considering all that I decided to switch to Xfce. It just worked like charm. But now I also use (and like :) ) UbuntuOne service for my backup. UbuntuOne is not integrated for XFCE. Also you cant do everything from UbuntuOne’s cli.
u1sdtool -q; killall ubuntuone-login; u1sdtool -c # configuration
u1sdtool --create-folder ~/my_data # add folders you want to be synced
u1sdtool --list-folders
u1sdtool --current-transfers
For more details you might want to check Ubuntu One wiki .
- It works. Make sure while purchasing you inform them that you use Linux
- It’s fast and reliable in Pashan, Pune area
- Below config worked for me on Ubuntu 9.10 AND 10.04
- There are Linux drivers on the CD but I could not get it working on Ubuntu 9.10.
- For activation, I had to use Windows :(
sudo apt-get install usb-modeswitch wvdial
vi /etc/wvdial
[Dialer Defaults]
Phone = #777
Password =
Username =
Baud = 460800
Stupid Mode = 1
New PPPD = 1
Tonline = 0
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
Baud = 460800
Modem = /dev/ttyUSB0
ISDN = 0
Surely one of the most over-hyped film. What was good? Aamir, Music and the first half laughs. Post interval it becomes a predictable, boring, idiot bollywood movie.
Munnabhai s were certainly better. I would say watch it on TV or atleast don’t pay 3 times higher than usual for tickets like we did. 4 and half stars by critic hmmmm..
Pulling your hairs over some i18n bug or you fix it but are not able to explain what. This is little help in getting fair idea about unicode/codecs/encoding/decoding etc.
Quick tips:
a. It does not make sense to have a string without knowing what encoding it uses.
b. Utf-8 is a way of storing string of Unicode code points.
c. Encoding: Transforming a unicode object into a sequence of bytes
d. Decoding: Recreating the unicode object from the sequence of bytes is known as decoding. There are many different methods for how this transformation can be done (these methods are also called encodings).
Now
Must Read 1. http://www.joelonsoftware.com/articles/Unicode.html
Must Read 2. http://stackoverflow.com/questions/447107/whats-the-difference-between-encode-decode-python-2-x
Continue reading 1: http://farmdev.com/talks/unicode/
Continue reading 2: http://diveintopython.org/xml_processing/unicode.html
Continue reading 3:http://stackoverflow.com/questions/440320/unicode-vs-str-decode-for-a-utf8-encoded-byte-string-python-2-x
cat /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyACM0
ISDN = 0
Stupid mode = 1
Phone = #777
Password = internet
Username = internet
Don't understand above. Um ok but I am too lazy to explain.
think that more and more people they have in their list (no matter how they know well each other professionally) and more recommendations they have received (mostly by requesting others) would make their prospects better. Umm oh, I wonder why are they are madly behind this. I receive a quite
a few requests often. Some morning you check your emails and you see that some colleague in your company 2 years ago sends you a mail with subject "can you endorse me?". And the email says something
similar.
Dear ,
I'm sending this to ask you for a brief recommendation of my work that I can include in my LinkedIn profile. If you have any questions, let me know.
Thanks in advance for helping me out.
-
Now this above guy could be someone I don't know that well how well he/she is skilled. But now I can't deny the request so in a day or two I would look at some other recommendations available for my other LinkedIn friends, copy some matter and send what is requested for. He happily accepts and send me a nice Thank you email. I see people who worked completely unrelated departments and has probably no ability to judge other's work, go praising out of good relationships. May be what should happen on Orkut testimonials or somewhere similar.
Does these people who have tens and hundreds of people in network and so many recommendations have no work other than hopping the jobs and sending such requests.
Next time I interview a guy with many endorsements , I would probably more cautious hiring him.
------------ ----------
| | | Guest |
| Host ----+------+----- |
| | | Hub | | |
| |tap0| |tap1 | |
| |-----+-----+-----| |
| eth0 | | |
| | | | |
----+------- ----------
|
(Internet)
Host
* Add a hub
# vde_switch -x -d -tap tap0 -tap tap1
* Assign ip to host's nic
# ifconfig tap0 192.168.1.1
* Setup ip forwarding
Modify /etc/sysctl.conf
net.ipv4.ip_forward=1
* Setup masquerading
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
* Fire qemu
# vdeqemu -m 1024 -localtime /vm//jos_8.04_01/jos_8.04_01.img
Guest
# ifconfig eth0 192.168.1.2
# route add default gw 192.168.1.1
# vi /etc/resolv.com
# ping google.com
While there is a lot already written here my quick howto
$ sudo bash
# apt-get install dnsmasq squid
# echo "listen-address=127.0.0.1" >> /etc/dnsmasq.conf
# echo "no-dhcp-interface=" >> /etc/dnsmasq.conf
# vi /etc/dhcp3/dhclient.conf
# # ^ uncomment line #prepend domain-name-servers 127.0.0.1;
# vi /etc/resolv.conf # Add nameserver 127.0.0.1
# /etc/init.d/dnsmasq restart
# vi /etc/squid/squid.conf
http_port 3128
visible_hostname localhost
acl all src 0.0.0.0/0.0.0.0
cache_effective_user proxy
cache_effective_group proxy
http_access allow all
icp_access allow all
positive_dns_ttl 1 month
negative_dns_ttl 1 minute
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
cache_dir ufs /cache 400 16 256
cache_store_log none
# mkdir /cache # I have this dir on reizerfs partition
# chown proxy.proxy /cache
# /etc/init.d/squid restart
Configure your browser to use 127.0.0.1:8080.
Also read detailed dnsmasq setup article http://ubuntu.wordpress.com/2006/08/02/local-dns-cache-for-faster-browsing/
I usually use Firefox VideoHelper Addon to download youtube videos. To play them on my Philips DVP5986K DVD player from USB drive, I need to convert it to DivX.
mencoder /home/shon/Desktop/file-864260998.flv -ovc lavc -oac mp3lame -ffourcc DX50 -o out.avi
much better than struggling with the graphical tools.
shon@ubuntu:~$ cat test.dot
digraph FlowChart {
node [
fontname = "Bitstream Vera Sans"
fontsize = 8
shape = "record"
]
edge [
fontname = "Bitstream Vera Sans"
fontsize = 8
fontcolor = "Red"
]
// all blocks
greet [label="Hello, techie", shape="oval"]
which_os [label="What OS do you use?" shape="diamond"]
like_me [label="Great, me too!", shape="oval"]
which_browser [label="You must be using firefox", shape="diamond"]
ff [label="Cool", shape="oval"]
bye [label="Bye", shape="oval"]
// relations
greet -> which_os
which_os -> like_me [label="I use Linux"]
which_os -> which_browser [label="I use Windows"]
which_browser -> ff [label="Right"]
which_browser -> bye [label="what firefox?"]
}
shon@ubuntu:~$ dot test.dot -Tpng -o test.png && eog test.png
import zope.interface.verify
class ITest(zope.interface.Interface):
def foo(arg1): pass
def bar(): pass
class Test(object):
zope.interface.implements(ITest)
def foo(self): pass
class Test2(object):
zope.interface.implements(ITest)
def foo(self, arg1): pass
class Test3(object):
zope.interface.implements(ITest)
def foo(self, arg1): pass
def bar(self): pass
for cls in (Test, Test2, Test3):
try:
if zope.interface.verify.verifyClass(ITest, cls):
print "OK: %s correctly implements %s" % (cls.__name__, ITest.__name__)
except Exception, err:
print "Error detected with %s's implementation: %s" % (cls.__name__, err)
Python programming is joy. I was stuck on python 2.3 at my work for long and could not really get chance to explore later versions. Now that I got the opportunity doing re-architecture of the product I started exploring these. I am more than excited looking at deque, groupby, defaultdict and much more ... Also on top of it there exist excellent python softwares like twisted, sqlalchemy, turbogears makes it even more cool.
It's little pity that the language is stll somewhat less recognized than others. Or there are more hyped languages exist.
Anyways Python rocks!
[root@localhost ~]# yum -y install postgresql-python \
postgresql postgresql-server
[root@localhost ~]# /etc/init.d/postgresql start
[root@localhost ~]# /etc/init.d/postgresql status
[root@localhost ~]# su - postgres -c "createuser --createdb \
--adduser shon"
[root@localhost ~]# su - shon # normal user
[shon@localhost ]$ createdb test
[shon@localhost ]$ psql test
test=# \q
Code test_alchemy.py
from elixir import *
metadata.connect("postgres:///test")
class Movie(Entity):
has_field('title', Unicode(30))
has_field('year', Integer)
has_field('description', Unicode)
def __repr__(self): return '' % (self.title, self.year)
metadata.create_all()
def test1():
m1 = Movie(title="Blade Runner", year=1982)
m2 = Movie(title="Life is beautiful", year=1980)
objectstore.flush()
print m1
def test2():
print Movie.select()[0]
test1()
# test2()
Repositories
-
Cowspa helps managing coworking business and has good intentions1 fork/1 watcher/Pushed 7 hours ago
-
Python HTTP Agent Parser7 forks/31 watchers/Pushed 3 days ago
-
sphc1 fork/2 watchers/Pushed 6 weeks ago
-
The Hub | Get Ready1 fork/1 watcher/Pushed 4 months ago
-
s h o n1 fork/1 watcher/Pushed 6 months ago
-
2 forks/6 watchers/Pushed 8 months ago
-
A Python Library for Simple Models and Containers Persisted in Redis1 watcher/Pushed 9 months ago
-
The Redis Cookbook1 watcher/Pushed 14 months ago
Watched Repositories
-
Cowspa helps managing coworking business and has good intentions1 fork/1 watcher/Pushed 7 hours ago
-
Python HTTP Agent Parser7 forks/31 watchers/Pushed 3 days ago
-
sphc1 fork/2 watchers/Pushed 6 weeks ago
-
1 fork/2 watchers/Pushed 4 months ago
-
A Python Library for Simple Models and Containers Persisted in Redis26 forks/127 watchers/Pushed 4 months ago
-
The Hub | Get Ready1 fork/1 watcher/Pushed 4 months ago
-
s h o n1 fork/1 watcher/Pushed 6 months ago
-
Space booking and invoicing systems3 forks/10 watchers/Pushed 7 months ago
-
2 forks/6 watchers/Pushed 8 months ago
-
Redi (Redis-py wrapper) Extension for Flask2 forks/4 watchers/Pushed 9 months ago
-
A Python Library for Simple Models and Containers Persisted in Redis1 watcher/Pushed 9 months ago
-
The Redis Cookbook23 forks/182 watchers/Pushed 13 months ago
-
The Redis Cookbook1 watcher/Pushed 14 months ago
-
Hub Helpers1 fork/3 watchers/Pushed 16 months ago
-
The Hub's social-network for members built on pinax / django / python7 forks/14 watchers/Pushed 17 months ago
-
Syncer helps applications synchronize1 fork/4 watchers/Pushed 22 months ago
-
Convert CSV files from Yodlee (or other sources) into OFX files for import into other financial software.9 forks/29 watchers/Pushed 23 months ago
-
The Hub: Issue reporting1 fork/2 watchers/Pushed 2 years ago