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
| /** | |
| * Creates a "logging" schema with an "history" table where are stored records in JSON format | |
| * | |
| * Requires PostgreSQL >= 9.3 since data is stored in JSON format | |
| * | |
| * Credits: http://www.cybertec.at/2013/12/tracking-changes-in-postgresql/ | |
| */ | |
| /* Create a schema dedicated to logs */ | |
| CREATE SCHEMA logging; |
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 Tkinter | |
| class GraphException(Exception): | |
| def __init__(self, string): | |
| Exception.__init__(self, string) | |
| class Graph(Tkinter.Canvas): | |
| def __init__(self, master, **options): | |
| Tkinter.Canvas.__init__(self, master, **options) | |
| if 'width' in options and 'height' in options: |
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
| """ | |
| Allow the simple creation of kivy UIs for arbitrary python object. The UI | |
| will automatically update as the underlying python model changes, provided any | |
| function on the UI side that changes the underlying data model use the | |
| "update" decorator. | |
| """ | |
| import kivy | |
| kivy.require('1.7.0') |
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
| __all__ = [] | |
| def export(value): | |
| __all__.append(value.__name__) | |
| return value | |
| import sys | |
| module = sys.modules[__name__] | |
| class Context(object): |
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
| # | |
| # Python Template Markup Language | |
| # Simple Python DSL for HTML and (a little) CSS templating. | |
| # | |
| # Example: | |
| # | |
| # from ptml import * | |
| # | |
| # with html5 as out: | |
| # with head: |