sudo apt-get install mysql-server postgresql sudo apt-get build-dep python-mysqldb python-psycopg2 sudo -u postgres createuser -s sirex
pip install sqlalchemy sqlalchemy-utils mysql-python psycopg2 prettytable humanize
def test_get_top_menu_page(self): | |
def render_wholetree(tree, parent, level=0): | |
yield '%s<ul>' % (' ' * level) | |
for child in tree[parent]: | |
yield '%s<li>%s</li>' % (' ' * (level+1), child) | |
if child in tree: | |
yield from render_wholetree(tree, child, level+1) | |
yield '%s</ul>' % (' ' * level) | |
def render_tree(pages, parent): |
/*.slides.html | |
/reveal.js/ | |
/.ipynb_checkpoints/ | |
/default.style | |
/env | |
/fonts | |
/*.rst.build_temp |
: | |
`-- 1 | |
|-- node 1.1 | |
| `-- node 1.1.1 | |
`-- node 1.2 |
#!/usr/bin/env python3 | |
import sys | |
import collections | |
import functools | |
import operator | |
def read(filename): | |
with open(filename, encoding='utf-8') as f: |
from sqlalchemy_utils import database_exists, create_database, drop_database | |
from sqlalchemy.dialects import postgresql, mysql, sqlite | |
from sqlalchemy import ( | |
create_engine, select, func, and_, Column, Table, MetaData, | |
Integer, BigInteger, SmallInteger, LargeBinary, | |
) | |
BigInt = BigInteger() | |
BigInt = BigInt.with_variant(postgresql.BIGINT(), 'postgresql') | |
BigInt = BigInt.with_variant(mysql.BIGINT(), 'mysql') |
#!/usr/bin/env python3 | |
import argparse | |
import re | |
import sys | |
import time | |
token_re = re.compile(r"[a-ząčęėįšųūž]+", re.IGNORECASE) | |
""" | |
Use snaekfood [1] to generate dot files: | |
$ sfood -i -u -f project/modulex project/moduley | sfood-graph -p > modulex-moduley.dot | |
[1] http://furius.ca/snakefood/ | |
This will generate graph with blue, red and white circles. | |
If there are both blue and red circles it means, that | |
modulex and moduley depends on each another. |