Skip to content

Instantly share code, notes, and snippets.

View finiteautomata's full-sized avatar

Juan Manuel Pérez finiteautomata

View GitHub Profile
@finiteautomata
finiteautomata / run_mlm_with_mods.py
Created August 5, 2021 15:21
Modified version of `run_mlm.py`
```python
#!/usr/bin/env python
# coding=utf-8
# Copyright 2020 The HuggingFace Team All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@finiteautomata
finiteautomata / run_mlm_big_text_files.py
Created August 3, 2021 12:54
Train MLM with big text files (Workaround)
"""
This is a workaround for `examples/run_mlm.py` for pretraining models
with big text files line-by-line.
For the time being, `datasets` is facing some issues dealing with really
big text files, so we use a custom dataset until this is fixed.
August 3th 2021
Author: Juan Manuel Pérez
@finiteautomata
finiteautomata / pip.md
Last active April 1, 2021 12:33
Uso de pip, venv, y demás

Ambientes virtuales e instalación de paquetes en python

Crear un ambiente virtual con venv

cd dir/de/mi/proyecto
# Crear venv de nombre 'myenv'
python -m venv myenv
# Ahora en ./myenv/ voy a tener las librerías y lo necesario
# Activo el ambiente
@finiteautomata
finiteautomata / COVId-19
Created September 8, 2020 22:06
COVID-19 Exactas
[DC-Anuncios] [FCEyN] Convocatoria para el Centro de Prevención Exactas Covid-19
Inbox
x
Secretaria de Extensión, Cultura Científica y Bienestar <seccb@de.fcen.uba.ar>
Aug 28, 2020, 12:28 PM (11 days ago)
to Todos, alumnos-fcen
La Facultad de Ciencias Exactas y Naturales de la UBA y el Ministerio de Salud de la Provincia de Buenos Aires buscan estudiantes y graduadas/os interesados en colaborar en el Centro de Prevención Exactas Covid-19.
El Centro funciona físicamente en la Facultad respetando los criterios fijados en el Protocolo General de Prevención COVID-19 de la FCEN --> https://bit.ly/2DQ0tT5
@finiteautomata
finiteautomata / seaborn dates distplot.py
Created July 31, 2020 13:59
Seaborn distplot for dates
import datetime
import seaborn as sns
import matplotlib.pyplot as plt
# Generate dates -- change by your actual dates!
dates = [datetime.datetime.fromordinal(int(d)) for d in (43 * np.random.randn(200) + 737555)]
# Go back to ordinal numbers...
ordinal_dates = np.array([d.toordinal() for d in dates])
sns.distplot(ordinal_dates, kde=True)
@finiteautomata
finiteautomata / CMakeLists.txt
Created June 7, 2020 16:14
CMakeLists 2.0 para TP2 - Métodos Numéricos 2020-1c
cmake_minimum_required(VERSION 2.8.12)
project(tp2)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
IF(CMAKE_BUILD_TYPE MATCHES Debug)
message("Debug mode")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -O0")
@finiteautomata
finiteautomata / nota.txt
Created September 24, 2018 21:09
Notas sobre conflicto salarial y en CyT
1. Nota sobre caída en los salarios
https://eleconomista.com.ar/2018-09-sin-reapertura-de-paritarias-2018-cerraria-con-la-mayor-caida-salarial-en-15-anos/
2. Sobre la ciencia, el recorte presupuestario y salarial
http://www.marcha.org.ar/sin-ciencia-no-hay-futuro-con-algunas-formas-de-hacer-ciencia-tampoco/
3. Chequeado sobre presupuesto 2019
@finiteautomata
finiteautomata / clase_08.hs
Last active October 11, 2017 22:51
Clase 08 - Taller Álgebra I
type Set a = [a]
esVacio :: Set a -> Bool
esVacio [] = True
esVacio (x:xs) = False
agregar :: Integer -> Set Integer -> Set Integer
agregar x xs | elem x xs = xs
| otherwise = x:xs
@finiteautomata
finiteautomata / UsbUbuntu.MD
Last active July 13, 2017 15:31
Formatting USB Ubuntu Stick

If Ubuntu doesn't format your USB Drive (possibly an Ubuntu USB stick) with an error saying

This partition cannot be modified because it contains a partition table; >please reinitialize layout of the whole device. (udisks-error-quark, 11)

Do this:

sudo dd if=/dev/zero of=/dev/sdb bs=1M
clc
pkg load signal
fs = 16000
[audio, fs] = wavread("files/Audio.wav");
%%
%%
%%