Skip to content

Instantly share code, notes, and snippets.

View matog's full-sized avatar

Mato matog

View GitHub Profile
@matog
matog / Dockerfile.md
Last active January 17, 2024 20:22
Dockerfile para Streamlit app

Instalar pipreqs para generar el requirements.txt sólo con los paquetes que importamos en el código:

pip install pipreqs

Ver pipreqs

Probar este Dockerfile:

app/Dockerfile
@matog
matog / conda.md
Last active February 5, 2023 21:13
Instalar conda (miniconda) y jupyter en Ubuntu

Si no podemos acceder a la pagina inicial de jupyter notebook

Jupyter Notebook: Access to the file was denied
jupyter notebook --generate-config

Editar el archivo jupyter_notebook_config.py recién generado::

gedit ~/.jupyter/jupyter_notebook_config.py

Y agregar/descomentar:

@matog
matog / Optical_Flow_in_Shotcut.md
Last active January 11, 2022 15:40
Optical Flow in Shotcut
ffmpeg -i Input.mp4 -filter:v minterpolate=fps=120:mi_mode=mci:mc_mode=aobmc:me_mode=bidir:me=epzs:vsbmc=1 Output.mp4

Fuente: Shotcut Forum

@matog
matog / bluetooth.md
Last active July 8, 2022 19:51
Bluetooth Headphones

Primero probar:

sudo rmmod btusb
sudo modprobe btusb

Fuente: AskUbuntu

Si no funciona, continuar con:

sudo apt-get purge pulseaudio

@matog
matog / pypi.md
Last active April 28, 2022 21:09

Fuente: MakerByter

Crear un paquete de Python

Estructura del directorio CARPETA:

  • MANIFEST.in
  • CHANGELOG.txt
  • README.md
  • setup.py
  • CARPETAnombrepaquete:
@matog
matog / nautilus_tracker_reset.md
Last active September 11, 2021 14:07
Nautilus not working
@matog
matog / sonido_molesto_ubuntu.md
Last active June 10, 2021 20:41
Sonido molesto cuando no hay nada reproduciendose en Ubuntu con Asus

Fuente

sudo nano /etc/modprobe.d/alsa-base.conf

Agregar:

options snd-hda-intel power_save=0 power_save_controller=N

Como subir un proyecto local a github.

desde la web de github

Creamos un nuevo repositorio en https://github.com. Le damos nombre, descripción, seleccionamos si va a ser un proyecto publico o privado si es el caso, y dejamos el check de crear README sin marcar. Le damos a crear repositorio y con esto ya tenemos el repositorio donde alojaremos nuestro proyecto.

desde la terminal del equipo donde esta el proyecto que queremos subir a github

Nos vamos a la carpeta del proyecto y ejecutamos estos comandos.

git init

git add .
@matog
matog / copy_pendrive.md
Created September 17, 2020 14:44
Fix Freezes When Transferring Files Ubuntu

I have found that my Ubuntu Desktop machine will keep pausing/freezing whenever I am transferring a large amount of data to my NFS. Others have experienced this issue when transferring files to a USB stick.

It appears that this has to do with having a very large cache of "dirty files" being held, and when that cache gets too full, your system will "pause" whilst it ensures all that data is actually written to disk. Thus to "fix" this issue, you can reduce your cache size so your system doesn't get overwhelmed to the point where it becomes unusable.

You can implement this immediately with the following

sudo echo $((16*1024*1024)) | sudo tee /proc/sys/vm/dirty_background_bytes
sudo echo $((16*1024*1024)) | sudo tee /proc/sys/vm/dirty_bytes

... however, you would need to run that every time your system reboots. To resolve this issue across reboots, you may wish to add this to your /etc/rc.local file.