This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"@fields":{ | |
"relativeCreated":344.9680805206299, | |
"process":12223, | |
"args":[ | |
], | |
"module":"log_handler", | |
"funcName":"set_up_logging", | |
"message":"backdrop.read.api logging started", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'sqlite3' | |
def setupDB(db, csv_file) | |
db.execute("drop table if exists stories") | |
db.execute("create table stories(id, labels, iterationend, created, accepted, size, requester, owner, type)") | |
CSV.foreach(File.path(csv_file), :headers => true) do |col| | |
db.execute("insert into stories(id, labels, iterationend, created, accepted, size, requester, owner, type) " + | |
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", | |
[col['Id'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from contextlib import contextmanager | |
from django.conf import settings | |
from django.db import connection | |
@contextmanager | |
def no_queries_allowed(): | |
"""This is a helper method that makes it easier during development, by | |
throwing an exception when any queries are made within its block. Using |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl --silent -i http://ojp.nationalrail.co.uk/ | grep 'Powered-By' | |
X-Powered-By: An infinite number of monkeys |