Python Timer Class - Context Manager for Timing Code Blocks
CODE:from timeit import default_timerclass Timer(object): def __init__(self, verbose=False): self.verbose = verbose  ...
Heroku+Mongo+Node.js在开发中遇到的一个问题
A couple facts about three cool technologies图片1.jpgImage via Wikipedianode.js is a powerful way of writing backend code in JavaScript; why JavaScript? Because you have the kind of problem t...
Amazing Algorithms with NoSQL: A MongoDB Example Part 2
In part 1 of this article, I described the use of MongoDB to solve a specific Chemoinformatics problem, namely the computation of molecular similarities. Depending on the target Tanimoto coefficie...
Python算法-How to sort a dictionary by value
The other day I was asked if there was a way to sort a dictionary by value. If you use Python regularly, then you know that the dictionary data structure is by definition an unsorted mapping type....
Django Switching Databases on Per-View Level
Django has a "multiple databases" feature that lets you read/write data from more than just the default database. I'm going to show you how to switch databases on a per-view level, rather than per...
A Data Migration for Every Django Project
How to use a South data migration to avoid accidentally sending emails from example.com.ProblemConsider the following snippet from Django's docs [1] for sending a confirmation email:CODE:from ...
NoSQLUnit 0.3.0发布
IntroductionUnit testing is a method by which the smallest testable part of an application is validated. Unit tests must follow the FIRST Rules; these are Fast, Isolated, Repeatable, Self-Valida...
Deploying a Django Application to dotCloud
As I mentioned in a recent blog post, in the 11 months since I wrote my first post on dotCloud, I now work there. Besides me working there, there has been a lot of other changes at dotCloud, and I...
pyflakes: The Passive Checker of Python Programs
There are several code analysis tools for Python. The most well known is pylint. Then there’s pychecker and now we’re moving on to pyflakes. The pyflakes project is a part of something known as ...
用dotNet访问MongoDB
Not the usual choice for .NET development but NoSql document databases are becoming more common in the development world.Getting MongoDb running on Windows1. To get ...
Python的SIGPIPE信号
Have you ever seen a socket.error: [Errno 32] Broken pipe message when running a Python Web server and wondered what that means?The rule is that when a process tries to write to a socket that ha...
PHP发布新版本,解决安全问题5.4.4和5.3.14发布
PHP开发团队今天连发了两个版本:PHP 5.4.4和PHP 5.3.14。 PHP 5.4.4和PHP 5.3.14两个版本主要修复了两个重要的安全问题: 1. DES算法Crypt实现中的一个漏洞2. phar扩展中的一个堆溢出问题此外,这两个版...
谷歌AngularJS发布1.0版
AngularJS是Google开发的一种模板技术,谷歌最近正式发布了AngularJS 1.0。 谷歌称,AngularJS可以让你扩展HTML的语法,以便清晰、简洁地表示应用程序中的组件,并允许将标准的HTML作为你的模板语言。AngularJ...
Amazing Algorithms with NoSQL: A MongoDB Example
In one of my previous blog posts, I debated the superficial idea that you should own billions of data records before you are eligible to use NoSQL/Big Data technologies. In this article, I try t...
Apache HBase on Amazon EMR
This week Amazon has released HBase on Amazon Elastic Map Reduce (EMR). As Jeff Barr explains:AWS has already given you a lot of storage and processing options to choose from, and today we are a...
High-Resolution Mandelbrot in Obfuscated Python
Here’s a followup to last month’s post about Penrose Tiling in Obfuscated Python.The Mandelbrot set is a traditional favorite among authors of obfuscated code. You can find obfuscated code in ...
用PHP开发桌面应用程序
PHP可以开发桌面程序,不要怀疑这一点,请听我一一道来。Most of us are familiar with PHP Web Applications. But PHP standalone application is something new. Now we can make standalone applications w...
Why MongoDB? It's the developers, stupid
Open ... and Shut Increasingly the third standard within enterprises for databases, MongoDB, has been claiming a lot of victories lately. In relative terms, it has become the second-hottest skill ...
一种轻量级的NoSQL数据库PouchDB
PouchDB is a tiny JavaScript. library that lets you to store and query data for web applications that need to work offline, and synchronize with an online database when your app goes online. Pouch...
分析Python代码的好工具PyLint
Python code analysis can be a heavy subject, but it can be very helpful in making your programs better. There are several Python code analyzers that you can use to check your code and see if they ...