Skip to content

Instantly share code, notes, and snippets.

@LCPallares
LCPallares / .py
Created March 10, 2020 20:22
Probando el gps con mapview en kivy
#-*- coding: utf-8 -*-
from kivy.lang import Builder
from plyer import gps
from kivy.app import App
from kivy.properties import StringProperty, NumericProperty, ObjectProperty, ListProperty
from kivy.clock import Clock, mainthread
import kivy.garden.mapview
from kivy.garden.mapview import MapView, MapMarker
import threading
@LCPallares
LCPallares / Basico.py
Created December 17, 2019 19:18
Ejemplos de raspado web(web scraping) con pagina de ejemplo http://example.webscraping.com
import requests
from bs4 import BeautifulSoup
URL_BASE = 'http://example.webscraping.com'
peticion = requests.get(URL_BASE)
sopa = BeautifulSoup(peticion.content, 'html.parser')
paises = sopa.find_all(class_="span12")[1].find(id="results")
for pais in paises.find_all('a'):
nom = pais.text
@LCPallares
LCPallares / ventana_principal.py
Created June 15, 2018 00:26
Abrir Nueva Ventana en PyQt5 (ventana secundaria)
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ventana_principal.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from ventana_secundaria import Ui_ventana_secundaria