Skip to content

Instantly share code, notes, and snippets.

from flask import Flask, request, jsonify
import sqlite3
import PyPDF2
app = Flask(__name__)
# Função para conectar ao banco de dados SQLite
def connect_db():
return sqlite3.connect('documents.db')
@teddiur
teddiur / jsx
Last active March 16, 2021 23:55
Exemplo de uma simples aplicação de busca de filmes com redux
// /src/index.js
import { Provider } from 'react-redux';
import { store } from './store';
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
@teddiur
teddiur / gist:9af6d26ef341b249b8ec7c0bbb564ec2
Last active March 16, 2021 23:48
Exemplo de uma simples aplicação de busca de filmes com props drilling
// /src/pages/Home.js
import { useState } from 'react';
import * as C from '../components';
export const Home = () => {
const [movie, setMovie = useState();
return (
<main>
def search_matches():
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".hm-MainHeaderLogoWide_Bet365LogoImage"))).click()
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, "wn-PreMatchItem ")))
sports = driver.find_elements_by_class_name("wn-PreMatchItem ")
find_item('futebol', sports).click() #go to soccer page
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, "hm-HeaderMenuItem ")))
live = driver.find_elements_by_class_name("hm-MainHeaderCentreWide_Link")
find_item('ao-vivo', live).click() #go to live games
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.CLASS_NAME, "ovm-Competition")))