We are a small, intelligent App development studio. We love "Building Amazing Apps", solving problems and cultivating strong relationships with our clients.
Generating pseudo random text with Markov chains using Python
By : Shabda Raaj
First the definition from Wolfram
A Markov chain is collection of random variables {X_t} (where the index t runs through 0, 1, ...) having the property that, given the present, the future is conditionally independent of the past.
Wikipedia is a little clearer
...Markov chain is a stochastic process with markov property ... [Which means] state changes are probabilistic, and future state depend on current state only.
Markov chains have various uses, but now let's see how it can be used to generate gibberish, which might look legit.
The algorithm is,
- Have a text which will serve as the corpus from ...
Finding keywords using Python
By : lakshman
Update: keywords2.txt is Pride and Prejudice from Project Gutenberg. Attached for convenience.
Finding keywords in a given snippet of text has many uses. From classifying web pages to fighting spam mails, keyword recognition is the first step in many algorithms.
We here show the naive Bayesian filter to find keywords, which was popularised by Paul Graham to discover spam mails.
Steps to find keywords.
- Have a large corpus of text against which we will compare.
- Find the relative frequency of words in corpus. Eg if your corpus is "the green way is very green way green". Relative frequency is ...
Constraint programming in Python
By : Shabda Raaj
Imagine this, you want to solve a problem, the algorithm for which you do not know. You just know the problem.
From wikipedia,
Constraints differ from the common primitives of imperative programming languages in that they do not specify a step or sequence of steps to execute, but rather the properties of a solution to be found.
Assume that there exists an alternate world where you only need to specify the problem, the computer will find out an algorithm to find it, even better if could you write it in Python.
Stop assuming it hapens every day, and this is ...
more info..- Common testing scenarios for Django app.
- Logging in Django
- Serving static files in Django
- Two Scoops of Django: Review
- Introduction to Python Workshop on February 15th, 2013
- Easy client side form validations for Django: Django Parsley
- MoreApps - Android Library Project: Open Sourced
- Tutorial: Building a Chrome app
- Password Generator App: Open Sourced
- Todo List App: Open Sourced
- April 2013
- March 2013
- February 2013
- January 2013
- November 2012
- October 2012
- September 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- October 2011
- September 2011
- July 2011
- June 2011
- April 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- June 2010
- April 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- November 2008
- October 2008
- June 2008
- May 2008
- April 2008
Fun with none
By : rohit
(If you are in a hurry, here is the fun part.;) A few days ago, I was working with a nullable field, which wasn't behaving as I expected. So I started a shell, and see how nulls compare.
Funny, not as I expected. (Why is None < 10 True. I thought it would be either False or None or cause an Error?) So python is obviously broken, next steps, see the same thing in some other ... more info..