Skip to content

Instantly share code, notes, and snippets.

Avatar

Nicolás Guarín-Zapata nicoguaro

View GitHub Profile
View deaths_gdp.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Cumulative deaths Fall in GDP
0 1.73
5 0.36
7 -13.41
9 -4.41
13 -8.45
14 -13.09
20 -9.23
28 -14.18
34 -7.23
@nicoguaro
nicoguaro / neon_example.png
Last active Sep 4, 2020
Plots with neon-glow in Matplotlib.
@nicoguaro
nicoguaro / Generators.txt
Created Aug 27, 2020
Visualization of polytopes in Python.
View Generators.txt
0 1 2 3 4
0 1 5
0 5 6
0 6 7
0 7 8
0 3 9 10
0 8 11
0 9 11
9 12 13
12 13 14 15
View block_uniform load.py
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Homogenization of a composite with random properties.
This examples runs with the developing version of SolidsPy (2.0).
@author: Nicolás Guarín-Zapata
@date: July 2020
"""
@nicoguaro
nicoguaro / cifrado_corrimiento.py
Created Jun 25, 2020
Cifra un mensaje haciendo un corrimiento hacia la derecha o izquierda.
View cifrado_corrimiento.py
# -*- coding: utf-8 -*-
"""
Cifra una mensaje haciendo un corrimiento del alfabeto.
@author: Nicolás Guarín-Zapata
"""
ALFABETO = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'ñ', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
'x', 'y', 'z']
View environment.yml
name: polyscope
channels:
- conda-forge
- default
dependencies:
- python>=3.6
- numpy
- scipy
- matplotlib>=2.0
- polyscope
@nicoguaro
nicoguaro / cylinder.vtk
Last active Apr 26, 2020
Example of isosurfaces using (indirectly) VTK in Python.
View cylinder.vtk
This file has been truncated, but you can view the full file.
@nicoguaro
nicoguaro / curva_normal.png
Last active Apr 19, 2020
Gráfico de una curva normal con anotaciones.
@nicoguaro
nicoguaro / pendulum.py
Created Apr 5, 2020
Solve a nonlinear pendulum for a trajectory on the separatrix.
View pendulum.py
# -*- coding: utf-8 -*-
"""
Solve a nonlinear pendulum for a trajectory on the separatrix.
@author: Nicolás Guarín-Zapata
@date: April 2020
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import solve_ivp
@nicoguaro
nicoguaro / image_poster.py
Created Jan 9, 2020
Posterization of an image using k-means
View image_poster.py
"""
Posterization of an image using k-means
It can be used to create color palettes from pictures.
@author:Nicolás Guarín-Zapata
@date: January 2020
"""
import numpy as np
from scipy import misc