Skip to content

Instantly share code, notes, and snippets.

View JoaoGFarias's full-sized avatar
🏠
Working from home

João Farias JoaoGFarias

🏠
Working from home
View GitHub Profile
@JoaoGFarias
JoaoGFarias / Getting Started With Subversion.markdown
Created June 3, 2012 21:17 — forked from embs/Getting Started With Subversion.markdown
Primeiros passos com o controlador de versão Apache Subversion

Getting Started With Subversion

O que é Subversion (SVN)?

Resposta curta: um controlador de versão.

Resposta longa: não é incomum haver projetos em que mais de um programador desenvolve código simultaneamente. Uma solução para a sincronização do desenvolvimento é a criação de um repositório de código remoto (armazenado em alguma máquina na Internet) para onde cada programador fará o upload do seu código e de onde cada programador poderá fazer o download da versão mais recente do projeto (isto é, baixar modificações realizadas por outros programadores). O, então, Apache SVN

@JoaoGFarias
JoaoGFarias / openRedu_mac-os_run.sh
Last active December 5, 2015 18:32
Shell script for setting up a OSX envirioment to development of OpenRedu
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
@JoaoGFarias
JoaoGFarias / Client.rb
Last active December 18, 2015 21:00
Example of Test-Driven testing in Ruby
admin1 = User.getUserInfo("admin1")
puts admin1["email"] # -> Prints admin1@email.com
user1 = User.getUserInfo("user_1")
puts user1["email"] # -> Prints user1@email.com
wrongPasswordForUser1 = user1["password"] + "Sufix to break password"
@JoaoGFarias
JoaoGFarias / interface.html
Created August 15, 2014 12:56
Tizen and Google Maps
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="Tizen basic template generated by Tizen Web IDE"/>
<title>Tizen Web IDE - Tizen - Tizen basic Application</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
@JoaoGFarias
JoaoGFarias / select_works.py
Created July 16, 2017 18:48
ScriptLattes Analysis
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
import csv
import re
import string
import yaml
def save_new_authors(authors, file_title='new_authors_list.txt'):
authors.sort()
with open(file_title, mode='w+') as file_handler:
@JoaoGFarias
JoaoGFarias / postman_workshop_CESAR_2017.json
Created July 21, 2017 18:34
Postman Workshop - CESAR 2017
{
"variables": [],
"info": {
"name": "Postman Workshop",
"_postman_id": "340162d5-d5cb-adf5-5920-405c041a2280",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@JoaoGFarias
JoaoGFarias / crawler.py
Last active July 29, 2017 20:46
Filmow comments crawler
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
import csv
import json
# Execution:
# Run: pip install selenium
# Fill in the following 4 variables with the necessary data
0xE5162B3018Ad172804dF6cEF299cF158eF82f61A
2017-10-10 03:19:09 [scrapy.core.engine] INFO: Closing spider (closespider_pagecount)
2017-10-10 03:19:09 [scrapy.core.engine] DEBUG: Crawled (200) <GET https://www.brandsmartusa.com/samsung/215588/galaxy+j7+prime+smartphone.htm> (referer: None) ['cached']
<extractor.BrandsMartUSAExtractor.BrandsMartUSAExtractor object at 0x10f559ac8>
name: Galaxy J7 Prime 5.5", 8MP Rear/5MP Front Camera, Octa Core Processor, 16GB Memory, 3GB RAM, 3300 mAh Battery, Android 6.0.1 Marshmallow Smartphone - Gold
model:
price: $149.00
brand: Samsung
OS: Android 6.0 "Marshmallow"
color: Gold
network: MetroPCS
* Para cada extrator
* Para cada página do site do extrator em questão
* Alimentar o extrator com a página, registrando a tupla (classe_da_página, extraiu?)
* Após todas as páginas, calcular precisão, recall e acurácia
* Printar métricas de cada extrator