Skip to content

Instantly share code, notes, and snippets.

@azimut
azimut / do.py
Last active August 29, 2015 14:05
kata - python data analysis
import sys
import pandas as pd
import matplotlib.pylab as plt
pd.options.display.mpl_style = 'default'
mpl_stylesheet = {'interactive':False}
plt.rcParams.update(mpl_stylesheet)
df = pd.read_csv( 'gold.csv')
@azimut
azimut / README.md
Last active August 29, 2015 14:05
last fm exporter modified to get track,album and artist info

lastfm-export

Modified version of the original last-export script to also obtain album, artist and track info. Just run it and wait. It might take a while (hours) to complete. If we rush, we might get blocked from the API.

Usage

# lastfm-export.py -u <LASTFM_USERNAME>

What to do next?

@azimut
azimut / README.md
Last active October 30, 2020 22:18
Create an animated heat map .gif from your lastfm scrobbler history

Lastfm Heat Map gif

Imgur

Description

Use as input file the output of lastfm-export.py. If you don't want to download one you could use mine here.

heatmaps.py generate the heat maps images on the current directory.

#!/usr/bin/python
# A simple script to convert an LDIF file to DOT format for drawing graphs.
# Copyright 2009 Marcin Owsiany <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@azimut
azimut / duino.ino
Created November 17, 2015 23:32
duino code
#define LED1 8
#define LED2 9
#define LED3 10
#define LED4 11
#define LED5 12
#define PIN1 3
int leoboton;
<?php
// Copyright © Oyabun1 2013
// version 1.7.2
// license http://opensource.org/licenses/GPL-2.0 GNU General Public License v2
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
// Try to check if the file is in the right place - board root
@azimut
azimut / prom.md
Last active April 8, 2016 15:31
slides

Mysql monitoring with Prometheus


Agenda

  1. Prometheus
  2. Grafana
  3. Percona use case

Prometheus

@azimut
azimut / -
Created April 10, 2016 02:26
This file has been truncated, but you can view the full file.
solid Default
facet normal -1.000000e+00 0.000000e+00 0.000000e+00
outer loop
vertex -5.300000e+01 4.360500e+01 1.870300e+01
vertex -5.300000e+01 4.360500e+01 0.000000e+00
vertex -5.300000e+01 -2.435700e+01 1.870300e+01
endloop
endfacet
facet normal -1.000000e+00 0.000000e+00 0.000000e+00
outer loop
@azimut
azimut / downloadartist.sh
Last active October 19, 2021 18:13
List bandcamp album links
#!/bin/bash
set -x
set -e
LIST_ALBUMS=~/projects/115de58a90ce375a8dc951f2de675fb2/listalbums.py
export ALBUM_LINK="$1"
export FOLDER="$2"
@azimut
azimut / gettransport.py
Last active July 8, 2016 05:04
Obtener el estado del subte
#!/usr/bin/env python2
# TODO: return a json to obtain all states on one request
import argparse
from BeautifulSoup import BeautifulSoup
import urllib2
import random
from datetime import datetime
STATUS_OK = '#AAAAAA'