Skip to content

Instantly share code, notes, and snippets.

View fdavidcl's full-sized avatar

David Charte fdavidcl

View GitHub Profile
@fdavidcl
fdavidcl / docker-compose.yml
Created September 22, 2019 11:06
Docker Compose config for self hosting stuff
#-------------------------------------------------------------
# David's master Dockerfile for self-hosted services in a
# Raspberry Pi 4
#
# Contents:
# 8001: pihole HTTP
# 8002: pihole HTTPS
# 8011: gitea HTTPS
# 2211: gitea SSH
# 8021: nextcloud HTTPS
@fdavidcl
fdavidcl / clean-docker.sh
Created March 22, 2019 09:14
Clean Docker containers and images
# WARNING: This will remove all your Docker containers and images
# Run only the second line to remove images unused by any running or stopped container
docker rm (docker container ls -a --format "{{.Names}}")
docker rmi (docker image ls --format "{{.ID}}")
@fdavidcl
fdavidcl / ruta_downloads.R
Created November 28, 2018 11:15
Get a cumulative plot of Ruta downloads from the RStudio CRAN mirror
library(cranlogs)
library(purrr)
dat <- cran_downloads(from = "2018-05-08", packages = "ruta")
cumulative <- map_dbl(1:length(dat$count), ~ sum(dat$count[1:.]))
plot(cumulative ~ date, data = dat, type = "l")
@fdavidcl
fdavidcl / example_convolutional.R
Created November 26, 2018 17:44
Convolutional autoencoder with Ruta/Simple autoencoder comparison
library(ruta)
library(purrr)
library(keras)
plot_square <- function(square, ...) {
image(t(square)[,28:1], xaxt = "n", yaxt = "n", col = gray((255:0)/255), ...)
}
plot_sample <- function(digits_test, digits_dec, sample) {
sample_size <- length(sample)
@fdavidcl
fdavidcl / utiml.Rcheck
Last active February 4, 2018 16:14
R CMD check on downstream dependencies of mldr
* using log directory ‘/media/datos/Documents/research/software/utiml.Rcheck’
* using R version 3.4.3 (2017-11-30)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘utiml/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘utiml’ version ‘0.1.3’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
@fdavidcl
fdavidcl / wdbc.rmd
Created November 22, 2017 23:18
An experiment on autoencoding Wisconsin Breast Cancer Diagnosis dataset
---
title: "WDBC"
author: "David Charte"
date: "22 de noviembre de 2017"
output:
html_document: default
---
```{r setup, include=FALSE, echo = F, results = "hide", message=FALSE}
knitr::opts_chunk$set(echo = FALSE)
@fdavidcl
fdavidcl / test_urls.sh
Created November 7, 2017 11:22
Test all links in a web page up to 2 levels of depth
wget --spider -r -nd -nv -l 2 -o cometa.log https://cometa.ml/datasets/
#!/usr/bin/env Rscript
library(mldr.datasets)
name <- commandArgs(trailingOnly = T)
mld <- readRDS(paste0(name, "-rand-1x10-1-tst.rds"))
new_header <- mldr.datasets:::export.meka.header(mld)
system(paste0('sed -i "" "1s/.*/', new_header, '/" ', name, '-*.arff'))
### ###
## ##
# Antergos Repository Mirrorlist #
## ##
### ###
### ###
## ##
# Automated Mirror Selection #
@fdavidcl
fdavidcl / keybase.md
Created July 8, 2016 18:54
keybase.md

Keybase proof

I hereby claim:

  • I am fdavidcl on github.
  • I am fdavidcl (https://keybase.io/fdavidcl) on keybase.
  • I have a public key whose fingerprint is 5FCC 02AE 2FDF DDEB 1A5C 712C 5C78 A511 FAA8 D75D

To claim this, I am signing this object: