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
#http://stackoverflow.com/questions/7075828/make-sqlalchemy-use-date-in-filter-using-postgresql | |
from sqlalchemy import Date, cast | |
from datetime import date | |
my_date = (session.query(MyObject) | |
.filter(cast(MyObject.date_time, Date) == date.today()) | |
.all()) | |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
This is an unofficial manual for the couchdb
Python module I wish I had had.
pip install couchdb
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
import json | |
import logging | |
from flask import Flask, g | |
from flask_oidc import OpenIDConnect | |
import requests | |
logging.basicConfig(level=logging.DEBUG) | |
app = Flask(__name__) |
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
#!/bin/sh | |
#source: http://www.linuxfromscratch.org/blfs/view/6.3/multimedia/libmad.html | |
#source 2: http://wiki.linuxfromscratch.org/blfs/wiki/libmad | |
wget http://downloads.sourceforge.net/mad/libmad-0.15.1b.tar.gz | |
tar -xvf libmad-0.15.1b.tar.gz | |
rm libmad-0.15.1b.tar.gz | |
cd libmad-0.15.1b | |
sed -i '/-fforce-mem/d' configure |
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
Assume IIS is installed. My machine already had IIs 8.5. | |
Install Python | |
============== | |
1. Download web installer (Python 3.6.3). | |
2. Run as Administrator. | |
3. Select custom installation for all users. | |
4. Choose install directory such that there are no white spaces in the path. Not sure if it needs to be done. Just being cautious. | |
5. Check the box for "Add Python 3.6 to PATH". |