Skip to content

Commit

Permalink
Adiciona configuração de desenvolvimento
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermedias committed Jun 29, 2024
1 parent 989e8ce commit 979a180
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 0 deletions.
27 changes: 27 additions & 0 deletions codigo/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "Python 3",

"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements.txt",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-toolsai.jupyter",
"mechatroner.rainbow-csv"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
200 changes: 200 additions & 0 deletions codigo/decision-tree.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>id</th>\n",
" <th>intervention</th>\n",
" <th>sex</th>\n",
" <th>age</th>\n",
" <th>educ</th>\n",
" <th>income</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" <td>35</td>\n",
" <td>5</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>59</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>51</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>50</td>\n",
" <td>5</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>58</td>\n",
" <td>5</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>290</th>\n",
" <td>291</td>\n",
" <td>2</td>\n",
" <td>1</td>\n",
" <td>39</td>\n",
" <td>5</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>291</th>\n",
" <td>292</td>\n",
" <td>4</td>\n",
" <td>1</td>\n",
" <td>47</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>292</th>\n",
" <td>293</td>\n",
" <td>2</td>\n",
" <td>2</td>\n",
" <td>52</td>\n",
" <td>4</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>293</th>\n",
" <td>294</td>\n",
" <td>3</td>\n",
" <td>1</td>\n",
" <td>59</td>\n",
" <td>5</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>294</th>\n",
" <td>295</td>\n",
" <td>1</td>\n",
" <td>1</td>\n",
" <td>28</td>\n",
" <td>4</td>\n",
" <td>2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>295 rows × 6 columns</p>\n",
"</div>"
],
"text/plain": [
" id intervention sex age educ income\n",
"0 1 4 2 35 5 3\n",
"1 2 1 1 59 1 1\n",
"2 3 4 1 51 4 3\n",
"3 4 3 1 50 5 2\n",
"4 5 2 2 58 5 2\n",
".. ... ... ... ... ... ...\n",
"290 291 2 1 39 5 3\n",
"291 292 4 1 47 4 2\n",
"292 293 2 2 52 4 3\n",
"293 294 3 1 59 5 2\n",
"294 295 1 1 28 4 2\n",
"\n",
"[295 rows x 6 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"participant_info = pd.read_csv('dados/participant-info.csv')\n",
"participant_info"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
7 changes: 7 additions & 0 deletions codigo/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ipykernel

pandas
numpy
scipy

scikit-learn

0 comments on commit 979a180

Please sign in to comment.