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
/env | |
/default.style | |
/fonts | |
/*.rst.build_temp |
import sqlalchemy as sa | |
import sqlparse | |
metadata = sa.MetaData() | |
tasks = sa.Table( | |
'tasks', metadata, | |
sa.Column('id', sa.Integer, primary_key=True), | |
sa.Column('bot', sa.String(255), nullable=False), | |
sa.Column('task', sa.String(255), nullable=False), |
""" | |
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. |
#!/usr/bin/env python3 | |
import argparse | |
import re | |
import sys | |
import time | |
token_re = re.compile(r"[a-ząčęėįšųūž]+", re.IGNORECASE) | |
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 sys | |
import collections | |
import functools | |
import operator | |
def read(filename): | |
with open(filename, encoding='utf-8') as f: |
: | |
`-- 1 | |
|-- node 1.1 | |
| `-- node 1.1.1 | |
`-- node 1.2 |