I hereby claim:
- I am samiralajmovic on github.
- I am samiralajmovic (https://keybase.io/samiralajmovic) on keybase.
- I have a public key whose fingerprint is B987 9EDF 0A0C 5CB0 4E4A 301B F836 A657 B4B8 29BC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// Insertion sort. | |
var i = a.length; | |
var j; | |
while (i--) { | |
j = i; | |
while (j > 0 && a[j - 1] > a[j]) { | |
a[j] = a[j - 1] + (a[j - 1] = a[j]) - a[j]; | |
j += 1; | |
} |
def jsonb_to_sql_view(conn, table_name): | |
"""Create SQL view from a table that contains a jsonb column. | |
@param conn Postgres connection. | |
@param table_name Table name containing the jsonb. | |
""" | |
cur = conn.cursor() |
""" Backup files. | |
""" | |
import os.path | |
import shutil | |
import datetime | |
ROOT_DIR = os.path.abspath(os.path.join(os.sep, 'backup-from-folder')) | |
ERROR_LOG_FILE = os.path.join(os.sep, ROOT_DIR, 'logs', 'errorlog.txt') |
""" Backup database. | |
""" | |
import os | |
import subprocess | |
import datetime | |
# DB Options. | |
HOST = 'localhost' | |
PORT = '5432' |