Skip to content

Instantly share code, notes, and snippets.

@mx-psi
mx-psi / ArcadeMachine.java
Created April 21, 2019 18:30
Estadísticas para GVGAI
public static double runGamesPablo(String game_file, String[] level_files, int level_times, String agentName, String[] actionFiles) {
VGDLFactory.GetInstance().init(); // This always first thing to do.
VGDLRegistry.GetInstance().init();
boolean recordActions = false;
if (actionFiles != null) {
recordActions = true;
assert actionFiles.length >= level_files.length
* level_times : "runGames (actionFiles.length<level_files.length*level_times): "
+ "you must supply an action file for each game instance to be played, or null.";
@mx-psi
mx-psi / weeks.py
Created June 26, 2018 21:19
Script I wrote to convert the log of coDual to a Jekyll collection
#! /usr/bin/python3
# Author: Pablo Baeyens
# Usage: ./weeks.py
from datetime import date, timedelta
import platform
import locale
from ruamel.yaml import YAML
yaml = YAML()
@mx-psi
mx-psi / init.el
Last active December 30, 2018 22:44
Mi configuración de emacs (disponible en https://github.com/mx-psi/dotfiles)
;;;;;
;; Disponible en https://github.com/mx-psi/dotfiles
;;;;;;
@mx-psi
mx-psi / keybase.md
Created February 24, 2018 22:33
File for Keybase.io

Keybase proof

I hereby claim:

  • I am mx-psi on github.
  • I am mx_psi (https://keybase.io/mx_psi) on keybase.
  • I have a public key whose fingerprint is 7D7D 7A08 B932 B11B CFB2 B506 FB42 769C 4226 C69A

To claim this, I am signing this object:

@mx-psi
mx-psi / faScrap.py
Last active May 3, 2020 18:26
Crea un fichero csv compatible con Letterboxd a partir de los datos de un perfil de FilmAffinity
# VERSIÓN ACTUAL EN:
##
# https://github.com/mx-psi/fa-scrapper
##
@mx-psi
mx-psi / velocimetro.ino
Last active February 22, 2023 03:14
Primera versión del código del velocímetro
#include <LiquidCrystal.h>
#include <math.h>
#include <SD.h>
#define REFRESCO_SD 2 //Frecuencia de guardado
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
float radio = 329.93; // radio de la rueda en mm
volatile float tiempopaso, tiempovuelta;//tiempo (hasta la activación del sensor y de una vuelta)
volatile float velocidad, velocidadm; //velocidades (instantánea y media)
volatile float distancia; //distancia recorrida desde que empieza a circular
@mx-psi
mx-psi / plotting.py
Created December 29, 2013 13:34
Plotting of sorting algorithms with bars. Using matplotlib.pyplot.bar ( http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.bar )
def snapshot():
""" Plots the current data. """
global step
# Saves the previous state into plot[step].png.
pyplot.savefig("{}plot{:04d}.png".format(folder,step))
step += 1
# Puts current state into the Axes object
pyplot.clf()
pyplot.axis("off")
pyplot.bar(range(len(sorting.data)), sorting.data,color ='#2a2a2a', linewidth = 0, align='center')