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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
import json | |
from pprint import pprint | |
import sys | |
import re | |
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
import numpy as np | |
res = 66 | |
def eq(x): | |
return x[0] + 13 * x[1] / x[2] + x[3] + 12 * x[4] - x[5] - 11 + x[6] * x[7] / x[8] - 10 | |
# Brute force! | |
it = 0 | |
while True: |
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
/** | |
* RVO: Return value optimization and NRVO: Named return value optimization | |
* | |
* Trying to get the last line of this to work... | |
* | |
* Still creates a new object when I assign m14 = fChangeClassRetRef(m14); :( | |
* | |
* I guess this is a problem with the compiler itself. | |
* | |
*/ |
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
from pymongo import MongoClient | |
import logging | |
logger = logging.getLogger(__name__) | |
from config.config import configParser | |
class Database(object): | |
''' | |
Generic class to access MongoDB. | |
NewerOlder