Skip to content

Instantly share code, notes, and snippets.

@danidee10
danidee10 / .Title
Created January 22, 2018 02:54 — forked from varver/.Title
Using MongoDB in golang with mgo
Using MongoDB in golang with mgo
"""
Generates tests
to check all forms/fields in a template for corresponding error messages.
"""
import re
from os import walk
from os.path import join
@danidee10
danidee10 / odoo-wsgi.py
Created November 16, 2016 10:20
Odoo wsgi file for running odoo10 as a wsgi application
# WSGI Handler sample configuration file.
#
# Change the appropriate settings below, in order to provide the parameters
# that would normally be passed in the command-line.
# (at least conf['addons_path'])
#
# For generic wsgi handlers a global application is defined.
# For uwsgi this should work:
# $ uwsgi_python --http :9090 --pythonpath . --wsgi-file openerp-wsgi.py
#
@danidee10
danidee10 / README.md
Created October 23, 2016 13:22 — forked from quiver/README.md
Who says PostgreSQL can't Pub/Sub like Redis?

Pub/Sub pattern with PostgreSQL's LISTEN/NOTIFY command

This is a simple chat-like program using pub-sub pattern, backed by PostgreSQL's LISTEN/NOTIFY command.

Publish

publish message to foo channel from user nickname.

$ python pub.py foo nickname
PUBLISH to channel #foo
@danidee10
danidee10 / recreate.py
Last active January 15, 2018 22:01
Re create database from part 2 of "How to build an online polling application with flask and ReactJS"
from votr import db, Polls, votr
db.app = votr
db.init_app(votr)
db.create_all()
from votr import Polls
from models import Options, Topics, Polls
topic = Topics(title='Which side is going to win the EPL this season')
arsenal = Options(name='Arsenal')
spurs = Options(name='Spurs')
poll = Polls(topic=topic, option=arsenal)