Skip to content

Instantly share code, notes, and snippets.

View Vichoko's full-sized avatar
🌲
Coding

Vicente Oyanedel Muñoz Vichoko

🌲
Coding
View GitHub Profile
@Vichoko
Vichoko / auth0_action.js
Last active October 11, 2023 19:30
add default roles to auth0 user during signup / first login
const fetch = require('node-fetch')
const AUTH0_CLIENT_ID = "something";
const AUTH0_DOMAIN = "https://domain.com";
const AUTH0_AUDIENCE = "https://domain.us.auth0.com/api/v2/";
const MANAGEMENT_API_DOMAIN = "domain.us.auth0.com";
const ROLE_ID = "rol_something";
@Vichoko
Vichoko / deploy_django.yaml
Created May 25, 2023 16:52
Poetry & Venv Cache
on:
push:
branches:
- main
# only cancel the previous workflow if it is still in progress
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
@Vichoko
Vichoko / gist:4cb28e52f6dc6801e60002be377c738c
Last active October 14, 2020 05:14
SLURM batch example of python + conda + gpu usage.
#!/bin/bash
#SBATCH --job-name=jobname # Nombre del trabajo
#SBATCH --output=/home/user/logs/%j.log # Nombre del output (%j se reemplaza por el ID del trabajo)
#SBATCH --error=/home/user/logs/%j.err # Output de errores (opcional)
#SBATCH --ntasks=1 # Correr 2 tareas
#SBATCH --cpus-per-task=2 # Numero de cores por tarea
#SBATCH --mem-per-cpu=0 # Memoria por proceso
#SBATCH --mail-type=END,FAIL # Enviar eventos al mail (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=email@asd.com # El mail del usuario
#SBATCH --nodelist=node_name
@Vichoko
Vichoko / main.py
Created November 20, 2019 00:47 — forked from hiromu/main.py
Speaker Identification using GMM on MFCC
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import glob
import librosa
import numpy as np
import os
import sklearn.mixture
import sys
@Vichoko
Vichoko / swagger-yaml-to-html.py
Created January 10, 2018 18:37 — forked from oseiskar/swagger-yaml-to-html.py
Converts Swagger YAML to a static HTML document (needs: pip install PyYAML)
#!/usr/bin/python
"""
Usage:
python swagger-yaml-to-html.py < /path/to/api.yaml > doc.html
"""
import yaml, json, sys
TEMPLATE = """