Skip to content

Instantly share code, notes, and snippets.

View chrismedrdz's full-sized avatar
🇲🇽

Christopher Medina chrismedrdz

🇲🇽
  • Syscap
  • Monterrey, NL, MX
  • 01:38 (UTC -06:00)
  • X @ChrisDevlpr
View GitHub Profile
@chrismedrdz
chrismedrdz / liga-mx-pool.html
Created November 25, 2019 05:56
Liga MX Quiniela
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="author" content="Christopher Medina">
<title>Quiniela Liga MX</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<style type="text/css" media="screen">
@chrismedrdz
chrismedrdz / gist:2c807488d339c7bd9935
Created May 22, 2015 18:20
Shape Detection Python+OpenCV
import numpy as np
import cv2
im = cv2.imread('test.png')
imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
ret,thresh = cv2.threshold(imgray,127,255,0)
contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
img = cv2.drawContours(im, contours, -1, (0,255,0), 3)
cv2.imshow('Contours',img)
@chrismedrdz
chrismedrdz / Network.java
Created November 17, 2012 02:40
RedCompleja
import java.util.*;
import java.io.*;
public class Network {
int matriz[][] = {{0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,},{1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},{1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1},{1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},{1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1},{0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@chrismedrdz
chrismedrdz / HiloTemperatura.java
Created November 13, 2012 19:34
Ventilador auto-ajustable en Java
public class HiloTemperatura extends Thread {
public double temperatura;
public int velocidad;
public void run() {
try {
Ventilador hiloVent = new Ventilador();
@chrismedrdz
chrismedrdz / Programas.java
Created November 2, 2012 17:05
Reconocimiento de Voz JAVA
import javax.speech.*;
import javax.speech.recognition.*;
import java.io.FileReader;
import java.util.Locale;
import java.io.*;
public class Programas extends ResultAdapter {
static Recognizer oreja;
String Programa;
@chrismedrdz
chrismedrdz / MainCelular.java
Created September 21, 2012 18:02
Autómatas Celulares java
/*
Automatas Celulares
Practica 2 Lab. Sistemas Adaptativos
*/
import java.util.*;
import javax.swing.*;
public class MainCelular {
public static void main(String[] args){
@chrismedrdz
chrismedrdz / Sistema.java
Created September 7, 2012 04:02
Control de Semaforo
if (CarrilA > 10) { CA = true; }
if (CarrilB > 10) { CB = true; }
if (CarrilC > 5 ) { CC = true; }
if (CarrilD > 5 ) { CD = true; }
/*Ecuación Booleana que evalúa el Congestionamiento en los carriles para dar los permisos a los Semáforos Principales y Secundarios del Cruce*/
@chrismedrdz
chrismedrdz / ListaCarros.java
Created September 7, 2012 03:58
Llenado de Carros
a = ( ( Rand.nextInt(10000) % 16) + 1);
CarrilA = CarrilA + a;
if (CarrilA < 0) { CarrilA = 0; }
b = ( ( Rand.nextInt(10000) % 16) + 1);
CarrilB = CarrilB + b;
if (CarrilB < 0) { CarrilB = 0; }
c = ( ( Rand.nextInt(10000) % 8) + 1);
CarrilC = CarrilC + c;
if (CarrilC < 0) { CarrilC = 0; }
d = ( ( Rand.nextInt(10000) % 8) + 1);
@chrismedrdz
chrismedrdz / Interfaz.java
Created September 7, 2012 03:50
Semaforo-Adapativos
import java.awt.*;
import javax.swing.*;
public class Interfaz extends JPanel {
private String escenario = "Crucero.png";
ImageIcon image_icon1;
private String carrox1="carrox1.png";
ImageIcon image_icon2;