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
""" | |
Uso de "StringTagger" para el etiquetado (clasificación) de texto. | |
""" | |
from StringTagger.StringClf import Classifier | |
from StringTagger.getPage import getTextPage | |
training_data = { # Datos para entrenar al clasificador | |
"Ciencia":[ | |
'https://es.wikipedia.org/wiki/Ciencia', # Entrenamos al clasificador con paginas de wikipedia. |
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 cv2 | |
img = cv2.imread("face.jpg") | |
grayImg = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) | |
grayImageNegative = 255 - grayImg | |
ImageBlur = cv2.GaussianBlur(grayImageNegative, (21,21), 0) | |
output = cv2.divide(grayImg, 255 - ImageBlur, scale=256.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
#include <iostream> | |
using namespace std; | |
// Definir globalmente el valor de top en -1 ya que la pila está vacía | |
int top = -1; | |
void push(int stack[] , int x , int n) | |
{ | |
if (top == n-1){ | |
cout << "La pila está llena!" ; |
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
# PyChrome | |
# Importamos las librerias necesarias | |
import sys | |
from PyQt5.QtWebEngineWidgets import QWebEngineView | |
from PyQt5.QtWidgets import QWidget, QApplication, QLineEdit, QVBoxLayout, QHBoxLayout, QPushButton, QProgressBar | |
from PyQt5.QtCore import QUrl | |
# Creamos la clase PyChrome |
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 <iostream> | |
using namespace std; | |
int main(){ | |
// Declaramos el número de filas y definimos k=1 | |
int n, k=1; | |
// Pedimos el valor de n | |
cout<<"Ingrese el número de filas: "<<endl; |
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 <iostream> | |
using namespace std; | |
int main(){ | |
int arms, check, sum, rem; | |
sum = 0; | |
cout<<"Ingrese un numero positivo: "<<endl; |
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
# importamos la clase FPDF | |
from fpdf import FPDF | |
# Instanciamos FPDF | |
pdf = FPDF() | |
# Definimos la función | |
""" | |
La función recibe cuatro argumentos: | |
text: texto o contenido del documento. |
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
# Autor: Luis Salcedo | |
# Generador_de_Contraseñas.py | |
# https://www.facebook.com/codigocomentado | |
""" | |
sample () es una función incorporada del módulo aleatorio en Python que devuelve | |
una lista de longitud particular de elementos elegidos de una secuencia, es decir, una lista, tupla, cadena o conjunto. | |
""" | |
# Importamos el método sample de random. |
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
// Luis Salcedo | |
// geeksacademy.site | |
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
int main(void){ | |
// Valores a, b y c ingresados por el usuario. | |
// x1, x1 seran los valores del resultado. |
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
<html> | |
<head> | |
<!--API--> | |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
<script type="text/javascript"> | |
// Cargamos la API de visualización y el paquete "corechart". | |
google.charts.load('current', {'packages':['corechart']}); | |
// Definimos un callback cuando el API de visualización se cargue. |
NewerOlder