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
| #!/usr/bin/env python3 | |
| from abc import ABC, abstractmethod | |
| class AbstractEdgeBuilder(ABC): | |
| @abstractmethod | |
| def build_edge(self): | |
| pass |
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
| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
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 TABLE customer ( | |
| customer_id serial PRIMARY KEY, | |
| first_name VARCHAR ( 50 ) NOT NULL, | |
| last_name VARCHAR ( 50 ) NOT NULL, | |
| address VARCHAR ( 50 ) NOT NULL | |
| ) | |
| INSERT INTO customer (first_name, last_name, address) values ('John', 'B', 'x Avenue'); | |
| INSERT INTO customer (first_name, last_name, address) values ('John', 'B', 'x Avenue'); | |
| INSERT INTO customer (first_name, last_name, address) values ('Maria', 'Pena', 'Cal St.'); |
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 matplotlib.pyplot as plt | |
| import matplotlib.image as mpimg | |
| img = mpimg.imread("D:\\Projetos\\Cinza\\teste.jpg") | |
| gray = 0.299 * img[:, :, 0] + 0.587 * img[:, :,1] + 0.114 * img[:, :,2] | |
| gray = gray.astype(np.uint8) # garantindo valores inteiros | |
| limit = 127 |
OlderNewer