This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
from argparse import ArgumentParser | |
from wordcloud import WordCloud | |
import matplotlib.pyplot as plt | |
import os | |
import string | |
N_IMAGES = 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env python3 | |
import pandas as pd | |
caracteristicas = ['data/2022-01-caracteristicas.csv', 'data/2022-02-caracteristicas.csv', 'data/2022-03-caracteristicas.csv', 'data/2022-04-caracteristicas.csv', 'data/2022-05-caracteristicas.csv', 'data/2022-06-caracteristicas.csv', 'data/2022-07-caracteristicas.csv', 'data/2022-08-caracteristicas.csv', 'data/2022-09-caracteristicas.csv', 'data/2022-10-caracteristicas.csv', 'data/2022-11-caracteristicas.csv', 'data/2022-12-caracteristicas.csv'] | |
ocupados = ['data/2022-01-ocupados.csv', 'data/2022-02-ocupados.csv', 'data/2022-03-ocupados.csv', 'data/2022-04-ocupados.csv', 'data/2022-05-ocupados.csv', 'data/2022-06-ocupados.csv', 'data/2022-07-ocupados.csv', 'data/2022-08-ocupados.csv', 'data/2022-09-ocupados.csv', 'data/2022-10-ocupados.csv', 'data/2022-11-ocupados.csv', 'data/2022-12-ocupados.csv'] | |
columnas_a_seleccionar = {'Periodo': 'Año', 'P3271': 'Sexo', 'P6040': 'Edad', 'P2057': '¿Se considera campesino?', 'P6080S1': 'Etnia', 'P6070': 'Estado civil', 'P3042': 'N |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(500, 500); | |
frameRate(30); | |
} | |
function draw() { | |
/* | |
"draw" es un ciclo infinito, por defecto de 60fps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Comentario de una línea | |
/* | |
Comentario de varias líneas | |
*/ | |
// Configurar mi aplicación | |
function setup() { | |
// Se crea el lienzo sobre el que trabajaremos | |
createCanvas(500, 500); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as THREE from 'three'; | |
import * as dat from 'lil-gui'; | |
let gui = null; | |
let esfera = null; | |
window.setup = (scene) => { | |
gui = new dat.GUI(); | |
const ax = new THREE.AxesHelper(2); | |
const dlight = new THREE.DirectionalLight(0xffffff, 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as THREE from 'three'; | |
const cubos = []; | |
const N_CUBES = 70; | |
window.setup = (scene) => { | |
const directionalLight = new THREE.DirectionalLight(0xb9d5ff, 0.5); | |
const axesHelper = new THREE.AxesHelper(2); | |
directionalLight.position.x = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as THREE from 'three'; | |
// cargar controles | |
import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Se instala la librería de Python en Debian | |
sudo aptitude install python3-venv | |
# Se crea el ambiente virtual | |
python -m venv openai-env | |
# Se carga el ambiente virtual | |
source openai-env/bin/activate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let t1 = 0.1; // attack time in seconds | |
let l1 = 0.7; // attack level 0.0 to 1.0 | |
let t2 = 0.3; // decay time in seconds | |
let l2 = 0.1; // decay level 0.0 to 1.0 | |
let env; | |
let triOsc; | |
function setup() { | |
let cnv = createCanvas(100, 100); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Transformar gif a mp4 | |
$ ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4 | |
# Extraer parte de un video | |
$ ffmpeg -ss 00:00:10 -i video-in.mp4 -t 00:00:26 -vcodec copy -acodec copy -y video-out.mp4 |
NewerOlder