Simple steps to add existing project to Github.
In Terminal, change the current working directory to your local project.
git init
| # best practice: linux | |
| nano ~/.pgpass | |
| *:5432:*:username:password | |
| chmod 0600 ~/.pgpass | |
| # best practice: windows | |
| edit %APPDATA%\postgresql\pgpass.conf | |
| *:5432:*:username:password | |
| # linux |
| # Require PIL (Python Imaging Library) | |
| import traceback, Image | |
| def resize(): | |
| filePath = 'example.jpg' | |
| ratio = 0.5 | |
| image = Image.open(filePath) | |
| width = image.size[0] |
| # 10_basic.py | |
| # 15_make_soup.py | |
| # 20_search.py | |
| # 25_navigation.py | |
| # 30_edit.py | |
| # 40_encoding.py | |
| # 50_parse_only_part.py |
| def create_link(file_name, file_id): | |
| return f'http://localhost:port/{file_name}/{file_id}' | |
| def make_clickable(val): | |
| # target _blank to open new window | |
| return '<a target="_blank" href="{}">{}</a>'.format(val, val) | |
| data['link'] = data.apply(lambda x: create_link(str(x['file_path']), x['file_id']), axis=1) | |
| clickable_table = data.style.format({'link': make_clickable}) |
| 1) see re: increasing shmmax http://stackoverflow.com/a/10629164/1283020 | |
| 2) add to postgresql.conf: | |
| shared_preload_libraries = 'pg_stat_statements' # (change requires restart) | |
| 136 pg_stat_statements.max = 1000 | |
| 137 pg_stat_statements.track = all | |
| 3) restart postgres | |
| 4) check it out in psql |
SELECT *, Specify explicit column names (columnar store)