sudo pip install virtualenv# Criando novo ambiente 'venv' (Executar na pasta raiz do seu projeto Python)| tempo;regiao;valor_pvp_ambulatorio;n_o_de_embalagens_ambulatorio;preco_medio_por_embalagem_ambulatorio;valor_pvp_genericos;n_o_de_embalagens_genericos;preco_medio_por_embalagem_genericos | |
| 2011-11;Centro;45819270.919999994;3043900;15.052817411872924;10076826.81;941081;10.707714649429752 | |
| 2012-08;Centro;38389750.099999994;3013811;12.737942127094232;7383826.1;1046704;7.05435930310766 | |
| 2012-08;Lisboa;47224872.830000006;3669952;12.867981060787718;9297883.62;1347319;6.901026126700506 | |
| 2012-12;Algarve;5600200.48;399633;14.013358456383733;1060742.03;139501;7.603831011964072 | |
| 2013-05;Lisboa;60099793.480000004;4752679;12.645456063832631;13518243.610000001;1847753;7.316044736498872 | |
| 2013-10;Centro;42684665.18000001;3414750;12.500084978402521;9495633.100000001;1282408;7.404533580576541 | |
| 2013-11;Alentejo;7475720.420000001;597505;12.511561275637861;1862358.2200000002;247287;7.531161039601759 | |
| 2014-02;Alentejo;7050309.540000001;581779;12.118535629508802;1782267.8499999996;243070;7.332323404780515 | |
| 2014-04;Norte;45840943.970000006;38 |
| import argparse | |
| parser = argparse.ArgumentParser(description='Process some Excel files and insert data into DB') | |
| #--------------------------------------------------------- | |
| # Excell Args | |
| #--------------------------------------------------------- | |
| parser.add_argument('-n', '--sheet_name', type=str, required=False, | |
| help="name of the sheet to extract the data") |
| #!/usr/bin/python3 | |
| from openpyxl import load_workbook | |
| workbook_file = load_workbook(filename="test_file_for_data_entry_automation.xlsx", | |
| data_only=True, | |
| read_only=True) | |
| #!/usr/bin/python3 | |
| from termcolor import colored | |
| from time import sleep as wait_a_few_seconds_between_chords | |
| scales = { | |
| "C" : ["C" , "D" , "E" , "F" , "G" , "A" , "B" ], | |
| "Db": ["Db", "Eb", "F" , "Gb", "Ab", "Bb", "C" ], | |
| "D" : ["D" , "E" , "Gb", "G" , "A" , "B" , "Db"], | |
| "Eb": ["Eb", "F" , "G" , "Ab", "Bb", "C" , "D" ], |
| #!/usr/bin/python3 | |
| from random import choice | |
| from termcolor import colored | |
| from time import sleep as wait_a_few_seconds_between_chords | |
| ######################################################## | |
| # Feel free to comment/uncomment any key and quality | |
| # that you want (or not) to practice... | |
| ######################################################## |
| #!/usr/bin/python3 | |
| from platform import system as platform_name | |
| from os import system | |
| import ctypes | |
| platforms_dictionary = { | |
| "Windows": { | |
| "open" : 'ctypes.windll.WINMM.mciSendStringW(u"set cdaudio door open", None, 0, None)', | |
| "close": 'ctypes.windll.WINMM.mciSendStringW(u"set cdaudio door closed", None, 0, None)' |
| #!/usr/local/bin/python3 | |
| from termcolor import colored | |
| import clipboard | |
| VIRTUALENV_NAME = input("Name for Virtual-Environment: ") | |
| DJANGO_VERSION_TO_INSTALL = input("Django Version: ") | |
| DJANGO_PROJECT_TO_CREATE = input("Project Name: ") |
| ########################################################################## | |
| # Ubuntu: | |
| ########################################################################## | |
| # create virtual env | |
| virtualenv <NAME-OF-DESIRABLE-ENV-DIRECTORY> | |
| or | |
| python3 -m venv --without-pip <NAME-OF-DESIRABLE-ENV-DIRECTORY> | |
| # activate virtual env |
| [ | |
| // go to beginning or end of the line | |
| { "keys": ["super+left"], "command": "move_to", "args": {"to": "bol", "extend": false} }, | |
| { "keys": ["super+right"], "command": "move_to", "args": {"to": "eol", "extend": false} } | |
| // move between empty lines with the alt key | |
| {"keys": ["alt+up"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": false } }, | |
| {"keys": ["alt+down"], "command": "move", "args": {"by": "stops", "empty_line": true, "forward": true } } |