Skip to content

Instantly share code, notes, and snippets.

View huogerac's full-sized avatar
:octocat:

Roger Camargo huogerac

:octocat:
View GitHub Profile
Sete Atitudes para Hackear a Indústria de Software
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
@huogerac
huogerac / page1.html
Last active August 29, 2015 14:16
Two options for using Magnific-Popup JS (Django Template)
<!DOCTYPE html>
<html lang="en">
<head>
<link href="{% static 'bootstrap/dist/css/bootstrap.min.css' %}" rel="stylesheet">
<link href="{% static 'magnific-popup/dist/magnific-popup.css' %}" rel="stylesheet" media="screen">
<!-- pode ir para o final -->
<script src="{% static 'jquery/dist/jquery.min.js' %}"></script>
<script src="{% static 'bootstrap/dist/js/bootstrap.min.js' %}"></script>
>>> from suds.client import Client
>>> import base64
>>> url = 'http://ws.zap.com.br/EnvArqSenha.asmx?wsdl'
>>> client = Client(url)
>>> print client
Suds ( https://fedorahosted.org/suds/ ) version: 0.4 GA build: R699-20100913
Service ( EnvArqSenha ) tns="http://zap.com.br/webservices/"
"""
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]
>>>
#!/usr/bin/env python
from __future__ import unicode_literals
import os
import codecs
import argparse
import inspect
import sys
import re
import csv
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 \
@huogerac
huogerac / CHANNEL UP
Last active January 26, 2017 20:44
SAMSUNG LCD remote control
CHANNEL UP
--- press 1st time
------> EVENT
Object
code:false
ir-1:true
raw:Array[135]
[0 … 99]
0:"4080"
@huogerac
huogerac / speechtotext.js
Created June 3, 2017 06:00
NodeJS accessing google api - real time
// 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';
@huogerac
huogerac / tarefa_01_cenarios_teste
Created September 26, 2017 00:34
Teste Elevador
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.
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)