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
CREATE USER van_user1 | |
IDENTIFIED BY pass; | |
CREATE USER van_user2 | |
IDENTIFIED BY word; | |
CREATE ROLE van_role; | |
GRANT van_role TO van_user1, van_user2; | |
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 numpy as np | |
import time | |
from tqdm import tnrange, tqdm | |
from bokeh.plotting import figure, output_notebook, show | |
def solve(a): | |
diag = np.diag(np.fliplr(a)) # n + log(n) | |
min_elem_index = diag.argmin() # n^2 | |
avrg_sum = a[a < 0].mean() # nlog(n) | |
min_elem_row, min_elem_columns = min_elem_index, a.shape[1] - min_elem_index - 1 # 5 |