Skip to content

Instantly share code, notes, and snippets.

View rvzzz's full-sized avatar

José Ricardo Valério rvzzz

  • Pale Blue Dot
View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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
@rvzzz
rvzzz / virtualenv-python.md
Last active April 10, 2025 00:14 — forked from WillianTomaz/virtualenv-python.md
Preparando Ambiente com virtualenv (Python)

Preparando Ambiente de Trabalho com virtualenv (Python)

Instalação do virtualenv

sudo pip install virtualenv

Criando novo ambiente de trabalho

# Criando novo ambiente 'venv' (Executar na pasta raiz do seu projeto Python)
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)
@rvzzz
rvzzz / circle_progression.py
Last active October 20, 2018 01:48
Circle Progression in Music Theory
#!/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" ],
@rvzzz
rvzzz / random_chords.py
Last active March 8, 2018 03:53
script that generates random chords for you to practice... An efficient alternative for dice rolling...
#!/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)'
@rvzzz
rvzzz / django-project-made-right.py
Last active October 14, 2018 00:16
django project creation automatized (virtualenv, django installation and startproject)
#!/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: ")
@rvzzz
rvzzz / django-environments-configuration.sh
Last active July 1, 2016 21:32
Terminal Commands for Django Virtual Environments Configuration
##########################################################################
# Ubuntu:
##########################################################################
# create virtual env
virtualenv <NAME-OF-DESIRABLE-ENV-DIRECTORY>
or
python3 -m venv --without-pip <NAME-OF-DESIRABLE-ENV-DIRECTORY>
# activate virtual env
@rvzzz
rvzzz / Default (OSX).sublime-keymap
Last active July 21, 2021 14:00
sublime text 2 keybinding to be able to move to the begin/end of line just like in sublime text 3
[
// 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 } }