git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
cd ~/.emacs.d
bin/doom installOptional
This is a sample on how to stream the results of a large QuerySet into a CSV file using Django StreamingHttpResponse class.
CSVStream class in your project, for example a writers.py file:import csv
from django.http import StreamingHttpResponse| -- Create the table | |
| CREATE TABLE IF NOT EXISTS `StateBoundaries` ( | |
| `State` varchar(10) DEFAULT NULL, | |
| `Name` varchar(255) DEFAULT NULL, | |
| `MinLat` varchar(50) DEFAULT NULL, | |
| `MaxLat` varchar(50) DEFAULT NULL, | |
| `MinLon` varchar(50) DEFAULT NULL, | |
| `MaxLon` varchar(50) DEFAULT NULL | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
| #!/usr/bin/python | |
| words = ['SEM', | |
| 'MVP', | |
| 'pop', | |
| 'DRM', | |
| 'ROI', | |
| 'DNA', | |
| 'SEO', | |
| 'flat', |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)Single-line comments are started with //. Multi-line comments are started with /* and ended with */.
C# uses braces ({ and }) instead of indentation to organize code into blocks.
If a block is a single line, the braces can be omitted. For example,