Skip to content

Instantly share code, notes, and snippets.

View robintux's full-sized avatar

Abraham Zamudio Chauca robintux

  • GMMNS
  • Lima - Peru
View GitHub Profile
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<h3>My Third Heading</h3>
<div id ="names">
<ul>
<li>Liam James</li>
<li>William Jones</li>
@robintux
robintux / MostrarValores.py
Created July 21, 2022 17:47
Funcion para mostrar la altura de las barras en un sns.barplot
def show_values(axs, orient="v", space=.01):
def _single(ax):
if orient == "v":
for p in ax.patches:
_x = p.get_x() + p.get_width() / 2
_y = p.get_y() + p.get_height() + (p.get_height()*0.01)
value = '{:.1f}'.format(p.get_height())
ax.text(_x, _y, value, ha="center")
elif orient == "h":
for p in ax.patches:
@robintux
robintux / visualizar_clasificador.py
Created April 11, 2022 02:24
visualizar_clasificador
def visualizar_clasificador(clasificador, X, y):
#definimos los máximos valores de X e y para la malla
min_x, max_x = X[:, 0].min() - 1.0, X[:, 0].max() + 1.0
min_y, max_y = X[:, 1].min() - 1.0, X[:, 1].max() + 1.0
#definimos el paso de la malla
mesh_step_size = 0.01
#definimos la malla para x e y
x_vals, y_vals = np.mgrid[min_x:max_x:mesh_step_size, min_y:max_y:mesh_step_size]
#corremos el clasificador sobre la malla
resultados = clasificador.predict(np.c_[x_vals.ravel(), y_vals.ravel()])
@robintux
robintux / repasopython.ipynb
Last active November 26, 2021 22:02
RepasoPython.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@robintux
robintux / Data4SeS.py
Created September 26, 2021 00:04
Data para pruebas de SES
data = [
446.6565,
454.4733,
455.663,
423.6322,
456.2713,
440.5881,
425.3325,
485.1494,
@robintux
robintux / get_etf_holdings.py
Last active September 21, 2021 13:51
Funciones para descargar los componentes de un etf usando la web : https://www.barchart.com
# Implementamos un par de funciones que nos permitan obtener la composicion de ETFs
from bs4 import BeautifulSoup
import matplotlib
import matplotlib.pyplot as plt
import re
import requests
import numpy as np
import pandas as pd
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@robintux
robintux / script02.R
Created October 20, 2020 15:30
Charla : "Visualizacion de datos usando R" . Charla preparada para el Centro de Estudiantes de Economía [UNIVERSIDAD NACIONAL DE SAN CRISTÓBAL DE HUAMANGA]
sessionInfo()
library(help= datasets)
#### ggplot2 ####
library(ggplot2)
library(car)
#### cargamos datos ####
data(Salaries)
class(Salaries)
@robintux
robintux / script01.R
Last active October 20, 2020 15:29
Charla : "Visualizacion de datos usando R" . Charla preparada para el Centro de Estudiantes de Economía [UNIVERSIDAD NACIONAL DE SAN CRISTÓBAL DE HUAMANGA]
#### Primeros pasos ####
library(quantmod)
library(help= quantmod)
#### carguemos datos financieros ####
help(getSymbols)
# descarguemos los precios de la empresa IBM
@robintux
robintux / CharlaCTIC_NoSupervisado.ipynb
Created October 16, 2020 03:42
Charla : Aprendizaje no Supervisado (15/10/2020)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.