"It was probably faster to read ssh keys from MySQL than their file-system. Apparently Engine Yard is using GFS which, according to what I've read, tend to be slow. When you have 1000+ keys it is probably faster to read it from a MySQL server which doesn't have the GFS bottleneck. But that's a rather special case. It illustrates well how little things can have a dramatic impact when you 'scale'. This kind of optimization might be useless or even harmless in other situations; but their particular problem it was worth it."
- Henry Prêcheur
I usually use a .pyrc file with some readline commands to have tab completion inside python interactive shell. The completion suddenly doesn't work, despite the .pyrc generates no exception or anything. Any thoughts on that?
Do you have the environment variable PYTHONSTARTUP defined? file:///home/henryp/doc/python-docs/using/cmdline.html#envvar-PYTHONSTARTUP
- Henry Prêcheur
My citizenship in the USA, my degree at Berkeley, and my bike.
- Piaw Na
My drum kit, my new 7-string bass viola da gamba, and lots of plane tickets.
- Joel Webber
Paul: What three things have *you* purchased that have brought you the most happiness?
- April Buchheit
All of my books, my Epson Rd1s Rangefinder camera and yet to find the third :)
- Bhowmik Shah
Apple stuff, cars and Springsteen tickets.
- Diego Barros
Macbook/iPhone, ticket to Rilo Kiley (helped set off series of events much greater than the one concert), Xbox360.
- Jandy, ConcertMaven of FF
I brought my mother a pink Gund Bear about 20 years ago. She now suffers from Alzheimer's and loves that nice soft bear..so that would have to be number one....
- Bob DeMarco
Jesus Christ... cost me nothing ... :-)
- Sherif Mansour
My bike, my guitar, and the seeds and supplies for my vegetable garden.
- Alec Proudfoot
I don't remember what brought happiness but I do remember what brought misery: mortgage for a house.
- Dallas Cao
It is impossible to purchase happiness which never stays for long and flies away. If it did stay for long it would not be happiness. Realistically, My first board game, my first PC and my first laptop.
- ashish
My Macbook, Blackberry, and Car (In that order)
- Garin Kilpatrick
Hmmmm, nice question. 'purchased' option creates rethinking. Food at nice places, Nokia E50 (I still crave for a cost effective alternative), home (last year)
- Nitin Nanivadekar
My Garmin Forerunner 405 (best sports gadget ever), my iPod, and my Paella pan. Any of these break or vanish and Im shopping for a new one tomorrow.
- Threepwood
Four front teeth, a bike and a boat. If buying a boat brings you misery....your doing it wrong. We've had some of our best family fun times on that boat. We love you Getaway Bay 2.0!
- suzanne
Friendfeed, i got me for the price of free .........that brought me the most happiness
- Petr Buben
Peacoat, laptop, and concert tickets :D
- Rudolf Olah
Parsers :: "Version 3.1.0 of Beautiful Soup does significantly worse on real-world HTML than version 3.0.7a does." -Leonard Richardson - http://www.crummy.com/softwar...
after upgrading I noticed some odd inconsistencies in output; well, it turns out that the newer version has switched from SGMLParser (in view of Python 3.x) to HTMLParser which is a simpler parser that's much worse at processing malformed HTML. The informative link also discusses future developments, and other offerings.
- Adriano
BeautifulSoup is not the best "real world" HTML parser anymore. Ian Bicking posted an interesting article about that on his blog: http://blog.ianbicking.org/2008.... I like BeautifulSoup nonetheless, just drop a few python files in a directory and it's installed. lxml might be better, but it's also a pain to install compared to BeautifulSoup.
- Henry Prêcheur
"I don't understand with exec "make" the resulting classes pickle and not type: test.py: TypeClass = type('TypeClass', (object,), {'x': 42}) exec 'class ExecClass(object): x = 42' class NormalClass(object): x = 42 It works fine: >>> import test >>> import pickle >>> pickle.dumps(test.TypeClass()) 'ccopy_reg\n_reconstructor\np0\n(ctest\nTypeClass\np1\nc__builtin__\nobject\np2\nNtp3\nRp4\n.' >>> pickle.dumps(test.ExecClass()) 'ccopy_reg\n_reconstructor\np0\n(ctest\nExecClass\np1\nc__builtin__\nobject\np2\nNtp3\nRp4\n.' >>> pickle.dumps(test.NormalClass()) 'ccopy_reg\n_reconstructor\np0\n(ctest\nNormalClass\np1\nc__builtin__\nobject\np2\nNtp3\nRp4\n.' According to your example, you need to put the 'exec' class in __module__ too."
- Henry Prêcheur
Anyway, why was ipaddr imported in the first place if there are problems? I don't know how things get into the standard library, but it would probably make sense to review something 'independently' before doing anything. ipaddr concepts being "under documented" seems obvious when looking at the documentation: http://docs.python.org/dev..., it seems that ipaddr mixes ip address & network in the class IP. Not necessarily a bad choice, but I find it surprising.
- Henry Prêcheur
The 2nd one significantly. Less noise. The 1st one overemphasizes the groupings, and is not a flattering background counterpoint to the colorful headers.
- Garry Tan
I love the new style. I do prefer the all white background of the original though. Minor, I know. But I just prefer the whitespace. Other than that, the new style is great.
- Diego Barros
2nd one, maybe a black background instead of grey. The colors of the current version make it look..."childish"? I dunno....just very hard to describe. The 2nd one seems like it would flow as a new version from the old IMHO.
- Ⓐ ☠ slayerboy ☠ Ⓐ
I'm fine with the first one, as kilbuda said, 2nd one looks washed out. But I seem to be in the minority here. Btw, if we darken the blue in the second pic, will peeps start saying FF looks like FB? =P
- vijay
I prefer the white somewhat, although the clear separation of the current version is good. I think the best solution is customization and themes by the user.
- Louis Gray
Like the white, on the right, but with the bolder colors, borders and fonts in the boxes in the version on the left. So a mix of the two, perhaps.
- Mike Lizun
Some might argue that the theme is already customizable (i.e. me), but determining what the default looks like is probably the goal. My vote is the one on the right, though I don't have this aversion to grey that I see all over my feed.
- coldbrew
The first one seems to be hedging it's bets. I would definitely go for the second.
- Chris Nixon
I like the gray background. Catch me on Monday and I'll likely prefer the white - until the following Thursday, of course. It's CSS; give us a widget on the right with a theme chooser and make the choice sticky.
- James Leard
I like bold colors for headers (and use them on my own pages) and I like the bold colors that FF uses. As for gray backgrounds, I used to use a grayish background on my own pages (see http://web.archive.org/web...), because I think a separate content and page background looks better. However I moved to a more boring white (http://www-cs-students.stanford.edu/~amitp...) because it's less distracting, and I liked that aspect of this user style for FF.
- Amit Patel
To get bold headers in AJ's userstyle: remove the .bar line, and add .bar :link,.bar :visited { color:white ! important; }
- Amit Patel
The second one by far. I don't like the gray background.
- EricaJoy
page design - right side; AJAX code is stunningly better in left (new one)
- A.T.
I like the gray background (silent majority?). But the comment highlighting in AJ's userstyle is quickly becoming a must have for me. I think the taste in background scheme is a lot like if whitewall tires appeal to you or not. http://en.wikipedia.org/wiki...
- Micah Wittman
Or, maybe the left is too strong, the right too weak... There are other type and leading issues, but, those are another thing...
- Glen Group
I have installed the script to get the neat look without the gray BG!
- Krishnamoorthy
2nd. please kill the gray background at minimum. and bring back the source icons. Otherwise the new version of FF is awesome.
- Gabe
The new FF has lost functionality IMO. I used to be able to manually get a service to refresh and now that functionality is gone.
- Jauder Ho
Jauder, the functionality is there, just moved: Go to your services page (http://friendfeed.com/jauderh... ), Click on one of your services listed (e.g. Tumblr), Click "Refresh Tumblr".
- Micah Wittman
Micah, thanks! It's still a pain though since it's now multiple clicks away instead of being right there.
- Jauder Ho
The second. Just installed it tonight, and I'm very pleased with it (don't like the comment highlighting, though, just the cleaner white and blue color palette).
- Jandy, ConcertMaven of FF
I dont like exact grey background, but almost everything else I like better on the left - perhaps I should do a user css to get rid of the background, since opera makes it so easy!
- Joelle Nebbe (iphigenie)
The second one of course. Nice work. I do miss the talk bubbles and the social media service icons that FF removed. And the font is too big.
- Gregg Scott
What's the best way to compare to list that are almost the same except that one has a couple more items and find wich are the itemes that are only in one list and put theme in a new list? (I hope my question is clear enough ^_^)
If the items of the list are hashable, turn the lists into sets (use set()) and make a union should be the fastest way: http://docs.python.org/library... A naive scan of a list to see if an item is in it, item-by-item for another list, will be O(n^2)--not good.
- Chris Lasher
cool, thank you guys, that's exactly what i want :D
- Philippe Mongeau
Weird, i'm having trouble making a set of a list. I tried doeing this: x1 = sets.Set(x). where x is a list and i got this error: x1 = sets.Set(x) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/sets.py", line 429, in __init__ self._update(iterable) File...
more...
- Philippe Mongeau
Two things: 1) just use the builtin set() constructor for sets. (My original link pointed to the deprecated Sets module, but I updated it to point to the new builtin set and frozenset documentation). 2) If you have lists or dictionaries, or anything otherwise unhashable--which appears to be your case--within the list you're trying to make a set (e.g., [[1, 2], {'spam': 'foo'}]), then use frozenset().
- Chris Lasher
"If you have lists or dictionaries within the list you're trying to make a set (e.g., [[1, 2], {'spam': 'foo'}]), then use frozenset()" Oh, that must be it, x was a list containing the y list. Thanks!
- Philippe Mongeau
Considering how much email I got overnight on this, I can safely say that the editor war of the last century as morphed into the DVCS war of today.
- Brett Cannon
I am sure it will turn into a "bike shed" discussion on the python mailing lists (http://www.freebsd.org/cgi....) Everybody has an opinion on it, it would be hard to write a more controversial PEP. Be prepared to hurt people's feelings, to be called names, and to be compared to a German dictator. ;)
- Henry Prêcheur
It already has turned into a bike shed argument in previous threads before the PEP. And I know some people are going to be hurt no matter what I choose since there is no clear winner in this space yet.
- Brett Cannon
Wow Amit! That was quite the story telling! Im quite amazed at all the things you've done! No wonder your soo happy! Well I hope you had your fun and excitement. In the mean while, as winters kicking in right now, we might be expecting some change! A change in weather hopefully to the better, it either has to rain or not! Mother nature is playing games with us :} Sony laptop battery
- Amit Patel
Where the "Sony laptop battery" is the spam link.
- Amit Patel
I disabled comments on my old blog and my new one is just a static html page. I find most blog comments useless; they tend to be "Great post blah blah". Most interesting discussions I have seen where usually on reddit (a loooong time ago :), news.yc, or friendfeed.
- Henry Prêcheur
I've had incredibly useful comments and also lame comments and spam. I wouldn't be willing to give up the useful comments so I leave comments on. For example, there have been some useful comments on my latest post at <http://simblob.blogspot.com/2009...>
- Amit Patel
Interesting post. I didn't understood everything, but it looks pretty cool ;)
- Henry Prêcheur
Makes me wonder if it will be possible to write social media bots that go around posting random links they find from high-profile bloggers and every once in a while, add a plug for some new product or service. This is probably already being done on Twitter, but we'd never know for sure.
- Bill Strathearn
POLL: What is your preferred way to use sqlalchemy? Plain sa mapping, the declarative extension or elixir?
- Peter Hoffmann
plain SA mapping, Even if it is not the "coolest" way of doing things: it is the most flexible way. Also it removes the dependency to elixir or declarative --even if declarative is included in SA, it is still a dependency.
- Henry Prêcheur
I am using werkzeug for a bunch of small http stuffs at work. It very neat, and lightweight. That's a WSGI toolkit with most things you could possibly want.
- Henry Prêcheur
"Well yeah ... Ubuntu 8.10 was announced in programming too. It's fine as long as there are enough people interesting in programming in proggit ;)"
- Henry Prêcheur
"Look at the bottom of the page: Much music.; forex via Internet, forex trading; craps table; life insurance; levitra; buy viagra Surely They're joking ... or is it spam ?"
- Henry Prêcheur
"If you don't want this "stupid feature", don't install the plugin or don't activate it. And this plugin does not have the "magic behavior" of Word's "smart quote". If you copy-paste a piece of code into Vim with UniCycle activated, It won't convert "magically" quotes into curly quotes. Of course you can strew-up things with "smate quotes", but don't blame the feature, blame the guy using it for not understanding what it was meant to do. A good "smart quoter" should be able to tell when to avoid curly quotes. SmartyPants for example excludes text between <pre>, <code>, <kbd> tags."
- Henry Prêcheur
"The compilation time really goes up. I am using OpenBSD (with gcc 3.3) and Ubuntu (which comes with gcc 4.2, I believe) and gcc 3.3 is faster. I have not done any measurements, but gcc 3.3 does really "feel" faster. GCC is notorious for breaking often: it is not surprising since GCC is a huge piece of code and does a lots of things. Also an operating system is not so dependent on the compiler's speed. It rarely do lots of CPU intensive calculation. OpenBSD main goal is not speed. OpenBSD main goal is correctness. For example OpenBSD's disk IO's are probably slower than most Operating system out there. But at least it is solid. It never had problems like ReiserFS or lately ZFS. Every OS's out there make trade-off, and OpenBSD is about being rock-solid."
- Henry Prêcheur
"OpenBSD's developers are quite conservative when it comes to incorporate new software. Perl is very unlikely to be upgraded to a recent version since they would rather get a rock-solid version of Perl than the latest fancy features. But despite this relative "obsolescence", OpenBSD is a great system to use. The documentation is clear and complete. Everything is done to have a simple, correct & yet powerful Unix operating system."
- Henry Prêcheur
"Interesting. I guess this solution is more "portable" since it involves only Django. But the amount of work required to define a new test_runner looks important. I just looked at the create_test_db function and it does not seem to be that simple to do. Thanks for the hint ;-)"
- Henry Prêcheur