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
#!/bin/bash | |
# This script is based on | |
# https://medium.com/welcome-to-the-django/guia-definitivo-para-organizar-meu-ambiente-python-a16e2479b753 | |
PYTHON2_VERSION='2.7.12' | |
PYTHON3_VERSION='3.5.2' | |
sudo apt-get install -y git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev | |
sudo pip install virtualenvwrapper |
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
_._ | |
_.-`` ''-._ | |
_.-`` O ''-._ | |
.-`` ''-._ | |
( O ) | |
|`-._ _.-'| | |
| `-._ _.-' | | |
`-._ `-._ _.-' _.-' | |
|`-._`-._ `-.__.-' _.-'_.-'| | |
| `-._`-._ _.-'_.-' | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pandas as pd | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from sklearn.linear_model import LinearRegression | |
from sklearn.model_selection import train_test_split | |
from sklearn.metrics import r2_score | |
filmes = pd.read_csv("regressao_linear_alura.csv") | |
amostra = filmes.sample(n=200) |
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
Cenário 1 | |
========== | |
"Elevador é chamado 2 vezes antes da descida" | |
Dado um predio de 10 andares com 1 elevador | |
Quando o elevador é chamado no 5o e em seguida no 9o. | |
Então o elevador deverá iniciar a subida até o 9o, iniciar | |
a descida parando no 5o. e finalmente até o térreo. |
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
// I need to | |
// npm install sox and node-record-lpcm16 | |
// export GOOGLE_APPLICATION_CREDENTIALS=My generate key json file | |
const record = require('node-record-lpcm16'); | |
// Imports the Google Cloud client library | |
const Speech = require('@google-cloud/speech'); | |
const projectId = 'my-project'; |
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
CHANNEL UP | |
--- press 1st time | |
------> EVENT | |
Object | |
code:false | |
ir-1:true | |
raw:Array[135] | |
[0 … 99] | |
0:"4080" |
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
FROM ubuntu:14.04 | |
RUN apt-get update | |
RUN apt-get install -y \ | |
libmysqlclient-dev \ | |
libtiff4-dev \ | |
libjpeg8-dev \ | |
zlib1g-dev \ | |
libfreetype6-dev \ | |
liblcms2-dev \ | |
libwebp-dev \ |
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 python | |
from __future__ import unicode_literals | |
import os | |
import codecs | |
import argparse | |
import inspect | |
import sys | |
import re | |
import csv |
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
""" | |
This is the logic to help you save money | |
>>> cofrinho(2016) | |
[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104] | |
>>> cofrinho(2016, group_by='month') | |
[20, 52, 84, 150, 156, 188, 280, 260, 370, 332, 364, 500] | |
>>> |