This file contains 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 | |
""" | |
Uma matrix é formada por vetores | |
Ex: | |
m = [[1, 1234, 567, 890, 10], | |
[1, 1234, 567, 890, 10], | |
[1, 1234, 567, 890, 10]] | |
Ou, seja: | |
matrix 3x5 == 3 linha, 5 coluna |
This file contains 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
0 0 0 0 0 | |
0 0 0 0 0 | |
0 0 0 0 0 | |
0 0 0 0 0 | |
0 0 0 0 0 |
This file contains 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 | |
def diagonal_principal(m): | |
ac = 0 | |
m1 = [] | |
while ac <= len(m) - 1: | |
vet = m[ac] | |
vet[ac] += 1 | |
ac += 1 |
This file contains 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
5.1 3.5 1.4 0.2 Iris-setosa | |
4.9 3.0 1.4 0.2 Iris-setosa | |
4.7 3.2 1.3 0.2 Iris-setosa | |
4.6 3.1 1.5 0.2 Iris-setosa | |
5.0 3.6 1.4 0.2 Iris-setosa | |
5.4 3.9 1.7 0.4 Iris-setosa | |
4.6 3.4 1.4 0.3 Iris-setosa | |
5.0 3.4 1.5 0.2 Iris-setosa | |
4.4 2.9 1.4 0.2 Iris-setosa | |
4.9 3.1 1.5 0.1 Iris-setosa |
This file contains 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
[0.4, 1.0, 1.0, 0.7, 0.875, 0.7] | |
[0.1, 0.16666666666666666, 0.16666666666666666, 1.0, 0.125, 0.1] | |
[1.0, 0.8333333333333334, 0.8333333333333334, 0.6, 0.875, 1.0] | |
[0.5, 0.16666666666666666, 0.3333333333333333, 0.4, 0.25, 0.1] | |
[0.5, 0.5, 0.3333333333333333, 0.5, 1.0, 0.1] | |
[0.3, 0.16666666666666666, 0.16666666666666666, 0.8, 0.625, 0.8] | |
[0.3, 0.5, 0.6666666666666666, 0.4, 0.5, 0.7] |
This file contains 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
for instance in self.session.query(SessionLogModel) \ | |
.filter(or_(SessionLogModel.session_uid.isnot(None) == get_id, | |
SessionLogModel.id.isnot(None) == int(get_id))): | |
self.resp = json.dumps(instance.to_json(), default=default) |
This file contains 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
2018-06-06T16:15:20.723444+00:00 app[web.1]: During handling of the above exception, another exception occurred: | |
2018-06-06T16:15:20.723446+00:00 app[web.1]: | |
2018-06-06T16:15:20.723447+00:00 app[web.1]: Traceback (most recent call last): | |
2018-06-06T16:15:20.723448+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app | |
2018-06-06T16:15:20.723449+00:00 app[web.1]: response = self.full_dispatch_request() | |
2018-06-06T16:15:20.723453+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request | |
2018-06-06T16:15:20.723454+00:00 app[web.1]: rv = self.handle_user_exception(e) | |
2018-06-06T16:15:20.723455+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception | |
2018-06-06T16:15:20.723456+00:00 app[web.1]: reraise(exc_type, exc_value, tb) | |
2018-06-06T16:15:20.723457+00:00 app[web.1]: File "/app/.heroku/python/lib/python3.6/site-packages/flask/ |
This file contains 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
CHROMEDRIVER_PATH = "/app/.chromedriver/bin/chromedriver" | |
chrome_bin = os.environ.get('GOOGLE_CHROME_BIN', "chromedriver") | |
options = webdriver.ChromeOptions() | |
options.binary_location = chrome_bin | |
options.add_argument("--disable-gpu") | |
options.add_argument("--no-sandbox") | |
options.add_argument('headless') | |
options.add_argument('window-size=1200x600') | |
driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=options) |
This file contains 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 os | |
from selenium import webdriver | |
CHROMEDRIVER_PATH = "/app/.chromedriver/bin/chromedriver" # Heroku instance path | |
GOOGLE_CHROME_BIN_DEV = "/usr/bin/google-chrome" | |
CHROMEDRIVER_PATH_DEV = "/home/fcschmidt/.chromedriver/bin/chromedriver" | |
class GoogleChromeSelenium: |
This file contains 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 binascii | |
binascii.hexlify(os.urandom(24)) |
OlderNewer