This file contains hidden or 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
class Monk(object): | |
monk = None | |
def __call__(self): | |
if not self.monk: | |
self.monk = Monk() | |
return self.monk |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdarg.h> | |
/* Functions don't check a 'correctness' of strings | |
* (except NULL checks) because of a structure of | |
* strings in C - I mean '\0' termination - | |
* - it's a question of performance. */ | |
This file contains hidden or 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
''' | |
Created on 23.11.2012 | |
@author: pycz | |
''' | |
import sqlite3 | |
import time | |
def now_timestamp(): |
This file contains hidden or 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
def b(request): | |
template = Template('b.html') | |
test = models.Model() | |
tread = models.Tread(1, models.now_timestamp()) | |
testlist = test.get_all_records_from(tread) | |
#testlist = [models.Record(*[x for x in item]) for item in testlist] | |
context = Context({'lol': testlist}) | |
result = template.render(context) | |
return HttpResponse(result) |