Skip to content

Instantly share code, notes, and snippets.

View gfhuertac's full-sized avatar

Gonzalo Huerta-Canepa gfhuertac

  • Microsoft
  • Viña del Mar, Chile
  • X @gohucan
View GitHub Profile
@gfhuertac
gfhuertac / openalpr_camera.py
Last active November 3, 2018 22:53 — forked from jkjung-avt/openalpr_camera.py
Real-time license plate recognition with 'openalpr' using a video file as input. Please check out my "Building and Testing 'openalpr' on Jetson TX2" post for more information: https://jkjung-avt.github.io/openalpr-on-tx2/
# test_camera.py
#
# Open an RTSP stream and feed image frames to 'openalpr'
# for real-time license plate recognition.
import numpy as np
import cv2
from openalpr import Alpr
import numpy
#Escribe verifica(matriz) acá
tablero = numpy.zeros([6,7], dtype=int)
turno = 1
while(verifica(tablero) == 0):
if tablero.all():
print("No hay ganadores")
exit()
@gfhuertac
gfhuertac / hashtags.csv
Created November 29, 2018 19:18
hashtags for the chilean presidential election
We can't make this file beautiful and searchable because it's too large.
tweet_id,hashtag
942025474628308992,GuillierPresidente
942095888389992448,ChileElige
942095888389992448,ArribaLosCorazones
942095888389992448,TiemposMejores
942031768835764224,Elecciones2017
942031768835764224,EleccionesChile
942031768835764224,StarWars
942031768835764224,StarWarsTheLastJedi
941351464068354048,TiemposMejores
@gfhuertac
gfhuertac / mentions.csv
Created November 29, 2018 19:19
Mentions for the chilean election
We can't make this file beautiful and searchable because it's too large.
tweet_id,screen_name
941680706241036293,sebastianpinera
941680706241036293,realpatchadams
942095888389992448,sebastianpinera
942128729458962440,guillier
942137275428868096,sebastianpinera
941680706241036293,sebastianpinera
941680706241036293,realpatchadams
941377225680654336,sebastianpinera
941377225680654336,mbachelet.
@gfhuertac
gfhuertac / retweets.csv
Created November 29, 2018 19:20
Retweets for the chilean election
We can't make this file beautiful and searchable because it's too large.
id,original_id,type
942136976303673346,942025474628308992,Retweet
942136977427714048,941680706241036293,Retweet
942137000576147456,942095888389992448,Retweet
942137004644544512,942129425340157952,Retweet
942137026954125320,942052226368974849,Retweet
942137039465734146,,Retweet
942137042091245568,942031768835764224,Retweet
942137065801703429,,Retweet
942137089298137088,941488629268013056,Retweet
@gfhuertac
gfhuertac / ui.py
Last active December 4, 2018 14:50
UI demo
from tkinter import Tk, Label, Button, StringVar
class AlprGui:
def __init__(self, master):
self.master = master
master.title("Última placa patente reconocida")
self.label_index = 0
self.label_text = StringVar()
self.label_text.set("")
[
{
"constant": false,
"inputs": [
{
"name": "targetMember",
"type": "address"
},
{
"name": "memberName",
# -*- coding: utf-8 -*-
# paso 0. Importar módulos
import requests
import matplotlib.pyplot as plt
import numpy as np
# ejercicio 1. Convertir las instrucciones a una función llamada muestra_imagen
def guarda_imagen(imagen, indice):
plt.imsave('imagen_' + str(indice) + '.png', imagen)
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 11 columns, instead of 3 in line 8.
customer_id,company_name,contact_name,contact_title,address,city,region,postal_code,country,phone,fax
ALFKI,Alfreds Futterkiste,Maria Anders,Sales Representative,Obere Str. 57,Berlin,,12209,Germany,030-0074321,030-0076545
ANATR,Ana Trujillo Emparedados y helados,Ana Trujillo,Owner,Avda. de la Constitución 2222,México D.F.,,05021,Mexico,(5) 555-4729,(5) 555-3745
ANTON,Antonio Moreno Taquería,Antonio Moreno,Owner,Mataderos 2312,México D.F.,,05023,Mexico,(5) 555-3932,
AROUT,Around the Horn,Thomas Hardy,Sales Representative,120 Hanover Sq.,London,,WA1 1DP,UK,(171) 555-7788,(171) 555-6750
BERGS,Berglunds snabbköp,Christina Berglund,Order Administrator,Berguvsvägen 8,Luleå,,S-958 22,Sweden,0921-12 34 65,0921-12 34 67
BLAUS,Blauer See Delikatessen,Hanna Moos,Sales Representative,Forsterstr. 57,Mannheim,,68306,Germany,0621-08460,0621-08924
BLONP,Blondesddsl père et fils,Frédérique Citeaux,Marketing Manager,"24, place Kléber",Strasbourg,,67000,France,88.60.15.31,88.60.15.32
BOLID,Bólido Comidas preparadas,Martín Som
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
employee_id,last_name,first_name,title,title_of_courtesy,birth_date,hire_date,address,city,region,postal_code,country,home_phone,extension,photo,notes,reports_to,photo_path
1,Davolio,Nancy,Sales Representative,Ms.,1948-12-08,1992-05-01,507 - 20th Ave. E.\nApt. 2A,Seattle,WA,98122,USA,(206) 555-9857,5467,\x,Education includes a BA in psychology from Colorado State University in 1970. She also completed The Art of the Cold Call. Nancy is a member of Toastmasters International.,2,http://accweb/emmployees/davolio.bmp
2,Fuller,Andrew,"Vice President, Sales",Dr.,1952-02-19,1992-08-14,908 W. Capital Way,Tacoma,WA,98401,USA,(206) 555-9482,3457,\x,"Andrew received his BTS commercial in 1974 and a Ph.D. in international marketing from the University of Dallas in 1981. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager in January 1992 and to vice president of sales in March 1993. Andrew is a member of the Sales Management Roundtable, t