Skip to content

Instantly share code, notes, and snippets.


Manuel Garrido manugarri

View GitHub Profile
View gist:f5d4efbdba44fadb3a912261f36c7f17
"cells": [
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
"data": {
"text/html": [
manugarri /
Created Nov 9, 2018
widget to display json in jupyter notebook
import uuid
from IPython.display import display_javascript, display_html, display
import json
class RenderJSON(object):
def __init__(self, json_data):
if isinstance(json_data, dict):
self.json_str = json.dumps(json_data)
self.json_str = json
View evaluation.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
manugarri /
Created Oct 24, 2018 — forked from ursuad/
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/ --zookeeper localhost:2181 --list

Describe a topic

bin/ --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/ --zookeeper localhost:2181 --alter --topic mytopic --config

... wait a minute ...

manugarri /
Created Oct 20, 2018 — forked from ranihorev/
PyTorch module for classification or regression of categorical+continuous+text inputs. This module is based on library
from fastai.text import *
from fastai.structured import proc_df
import pandas as pd
import numpy as np
class MixedInputModelWithText(nn.Module):
def __init__(self, emb_szs, n_cont, emb_drop, out_sz, szs, drops,
y_range=None, use_bn=False, is_reg=True, is_multi=False, n_text=0):
for i, (c, s) in enumerate(emb_szs): assert c > 1, f"cardinality must be >=2, got emb_szs[{i}]: ({c},{s})"
manugarri / cookie_read_test.go
Created Apr 19, 2018 — forked from jonnyreeves/cookie_read_test.go
Testing Cookie Writes in Golang
View cookie_read_test.go
View gist:bce47dcc6fbcdc441b916987be22e826
diccionario_columnas = {
"belongs_to_collection": "franquicia",
"budget": "presupuesto",
"genres": "genero",
"homepage": "pagina_web",
"original_language": "lenguaje",
"popularity": "popularidad",
"poster_path": "poster",
"production_companies": "productores",
"production_countries": "pais",
manugarri / config
Created Dec 19, 2017 — forked from gerardorf/config
bastion ssh configuration. Add this config on ~/.ssh/config
View config
Host * !
User admin
IdentityFile ~/.ssh/gerardorf-private-key
ProxyCommand ssh -W %h:%p
User admin
IdentityFile ~/.ssh/gerardorf-private-key
ForwardAgent yes
manugarri /
Created Mar 20, 2017
Herramienta para descargarse de forma rapida los datos del boletin del registro mercantil, borme.
#! /usr/bin/env python
Herramienta para descargarse datos historicos del Boletin Oficial del Registro Mercantil.
Para usar:
- INICIO_FECHA es la fecha de inicio que se desea procesar, en formato %Y-%m-%d
- FIN_FECHA es la fecha final que se desea procesar, en formato %Y-%m-%d
- REGIONES son una lista de regiones separadas por coma que se desean, por ejemplo MURCIA,MADRID,BARCELONA
View Intro a Jupyter notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.