Skip to content

Instantly share code, notes, and snippets.

View jjsantos01's full-sized avatar
🐍

Juan Santos Ochoa jjsantos01

🐍
View GitHub Profile
@guimondmm
guimondmm / Anaconda PowerShell Prompt in Windows Terminal settings.json
Last active April 6, 2025 05:35
Add an "Anaconda PowerShell Prompt" profile to Windows Terminal. Just paste it in your settings.json file.
{
"colorScheme": "Campbell",
"commandline": "pwsh.exe -ExecutionPolicy ByPass -NoExit -Command \"& '%USERPROFILE%\\anaconda3\\shell\\condabin\\conda-hook.ps1' ; conda activate '%USERPROFILE%\\anaconda3' \"",
"guid": "{e7d34d61-5a57-4f38-8eab-91cb777b0c26}",
"hidden": false,
"icon": "%USERPROFILE%\\anaconda3\\Menu\\anaconda-navigator.ico",
"name": "Anaconda PowerShell Prompt",
"startingDirectory": "%USERPROFILE%"
}
@ThomasG77
ThomasG77 / README.md
Last active April 8, 2024 20:17
Run PyQGIS in Jupyter Notebook
@jtornero
jtornero / gist:4ae64933e99e21d27f5044b4f42e78ec
Last active March 17, 2022 19:08
Vector layer batch creation with PyQGis
# Ejemplo de cómo crear capas en QGIS y dotarlas de simbología basada en reglas
# Las fuentes en las que me he basado para crearlo son principalmente el QGIS Cookbook,
# algún artículo de Anita Grase y otras fuentes como
# https://gis.stackexchange.com/questions/86770/how-to-programmatically-set-a-rule-based-renderer-in-qgis
# Cuando pueda subir un artículo más detallado a la wiki de qgis
# se acompañará de estas fuentes en detalle con enlaces,etc, para referencia y consulta
# En mi caso creo una capa por cada una de estas especies de peces,
que meto en un diccionario junto al color que tendrá la capa
@treuille
treuille / render_svg.py
Last active May 20, 2024 21:42
Workaround: Displaying SVG images in Streamlit
import streamlit as st
import base64
import textwrap
def render_svg(svg):
"""Renders the given svg string."""
b64 = base64.b64encode(svg.encode('utf-8')).decode("utf-8")
html = r'<img src="data:image/svg+xml;base64,%s"/>' % b64
st.write(html, unsafe_allow_html=True)
@ResidentMario
ResidentMario / .block
Last active February 13, 2023 21:01
Sankey webmap
license: mit
@demisjohn
demisjohn / Pickle: Save+Load MPL Figures to file.py
Last active February 11, 2021 15:14
How to use Python's `pickle` to save/load matplotlib Figures to/from a file.
'''
To save python objects of any sort, to a file.
'''
import pickle as pkl
pkl.dump( fig, open('FigureObject.pickle', 'wb') )
pkl.dump( fig, open('FigureObject.pickle', 'wb'), fix_imports=True ) # fix_imports makes it py2x compatible - untested
'''
Load python objects from file
@brenes
brenes / README.md
Last active April 6, 2025 02:38
CSV de paises, con nombre en castellano, ingles, codigo ISO y prefijo telefónico del país