python mysite/manage.py inspectdb > mysite/myapp/models.pyYou can then clean up the result as explained in chpt 18 of the Djangobook: http://www.djangobook.com/en/2.0/chapter18.html
Recursive algorithms can be slow because they end up solving the same little problems over and over again. To speed them up, you can use a technique called "memoization." Memoization allows algorithms go much more quickly by remembering solutions to problems they have already solved. I’m the recursive algorithm. This blog is my memoization.
Showing posts with label awesomeness. Show all posts
Showing posts with label awesomeness. Show all posts
Friday, November 28, 2014
cool tool in django: inspectdb
Say you have a legacy database and you want to put django on top of it. One line will construct python models for the database structure:
Labels:
awesomeness,
databases,
django,
legacy code,
python
Friday, November 7, 2014
Celebrating awesomeness: python request library and Uniprot
Uniprot makes is super easy to get protein sequences from a url.
The python request library by the awesome Kenneth Reitz makes it super easy to get the contents of a url.
Here's a screenshot from iPython:
The python request library by the awesome Kenneth Reitz makes it super easy to get the contents of a url.
Here's a screenshot from iPython:
Subscribe to:
Posts (Atom)