Skip to content

Instantly share code, notes, and snippets.

View ahsanulhadi's full-sized avatar

Ahsanul Hadi ahsanulhadi

View GitHub Profile

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@dhrrgn
dhrrgn / debug_stuff.py
Last active January 28, 2024 21:25
A handy SQL debug function for Flask-SQLAlchemy
from . import app
from flask.ext.sqlalchemy import get_debug_queries
if app.debug:
app.after_request(sql_debug)
def sql_debug(response):
queries = list(get_debug_queries())
query_str = ''
@rwilcox
rwilcox / create_fake_csv_files.py
Created June 28, 2010 04:34
Create CSV files with random data in them
#!/usr/bin/env python
# encoding: utf-8
"""
create_cvs_files.py
Create a number of fake CVS files. These files have an arbitrary length (from
5 lines to 600), and each have 6 columns.
Requires python-faker (http://github.com/threadsafelabs/python-faker)