This file contains 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
# -*- coding: utf-8 -*- | |
precos = { | |
100: (1.20, "Cachorro Quente"), | |
101: (1.30, "Bauru Simples"), | |
102: (1.50, "Bauru com ovo"), | |
103: (1.20, "Hambúrguer"), | |
104: (1.30, "Cheeseburguer"), | |
105: (1.00, "Refrigerante") | |
} |
This file contains 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
/* land.c by m3lt, FLC | |
crashes a win95 box */ | |
#include <stdio.h> | |
#include <netdb.h> | |
#include <arpa/inet.h> | |
#include <netinet/in.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/ip.h> |
This file contains 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
#include <stdio.h> | |
#include <arpa/inet.h> | |
// 192.168.0.133 -- 25 bits | |
int main(){ | |
unsigned int var1, var2, var3; | |
unsigned int address = 0xc0a80085; | |
var1 = ~(0xffffffff >> 25); | |
// var1_>> = 0x7f |
This file contains 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 flask import Flask, request, jsonify | |
from flasgger import Swagger | |
app = Flask(__name__) | |
swagger = Swagger(app) | |
def find_contact(email, contact_list): | |
for item in contact_list: | |
if item['email'] == email: | |
return item |
This file contains 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
m = {} | |
m["Types"]["Entries"] = [ | |
{ | |
"Form": 0, | |
"ParamTypes": [ | |
"i32" | |
] | |
}, | |
{ |
This file contains 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
(module | |
(type (;0;) (func (param i32))) | |
(type (;1;) (func (param i32 i32) (result i32))) | |
(type (;2;) (func)) | |
(type (;3;) (func (result f64))) | |
(import "env" "table" (table (;0;) 2 anyfunc)) | |
(import "env" "memoryBase" (global (;0;) i32)) | |
(import "env" "tableBase" (global (;1;) i32)) | |
(import "env" "abort" (func (;0;) (type 0))) | |
(import "env" "_consoleLog" (func (;1;) (type 0))) |
This file contains 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 selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
driver = webdriver.Firefox() | |
driver.get("http://web.whatsapp.com") | |
qr_code = WebDriverWait(driver, 60).until( |
This file contains 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 io | |
from pdfminer.converter import TextConverter | |
from pdfminer.pdfinterp import PDFPageInterpreter | |
from pdfminer.pdfinterp import PDFResourceManager | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage | |
def extract_text_from_pdf(pdf_path): | |
laparams = LAParams() |
This file contains 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 tabula import read_pdf | |
df = read_pdf('ex4.pdf', spreadsheet=True, multiple_tables=True, pages=[4]) | |
for ind, df_ in enumerate(df): | |
df_.to_csv("file_{}.csv".format(ind)) |
This file contains 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
client_id <- "ABC" | |
install.packages("mongolite") # Instala o mongolite (biblioteca de conn com o mongo) | |
install.packages("tidyverse") # Instala o Tidyverse (biblioteca de filtros e aggs) | |
library(mongolite) | |
library(tidyverse) | |
# Pega cotacoes no MongoDB |