Skip to content

Instantly share code, notes, and snippets.

View vitorpbarbosa7's full-sized avatar

Vitor Pereira Barbosa vitorpbarbosa7

View GitHub Profile
#!/bin/bash
# /home/ec2-user/anaconda3/envs/JupyterSystemEnv/bin/pip install -U keytar jupyter-server-proxy
echo == INSTALLING CODE-SERVER ==
curl -fsSL https://code-server.dev/install.sh | sh -s -- --version=4.12.0
#########################################
### INTEGRATE CODE-SERVER WITH JUPYTER
#########################################
echo == UPDATING THE JUPYTER SERVER CONFIG ==
@chrisnolet
chrisnolet / .zshrc
Last active June 17, 2024 23:29
Color-coded git branch for zsh prompt
autoload -Uz compinit && compinit
autoload -Uz add-zsh-hook
autoload -Uz vcs_info
add-zsh-hook precmd vcs_info
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*' formats " %F{cyan}%c%u(%b)%f"
zstyle ':vcs_info:*' actionformats " %F{cyan}%c%u(%b)%f %a"
zstyle ':vcs_info:*' stagedstr "%F{green}"
@gwgundersen
gwgundersen / viz_mvn.py
Created April 26, 2020 16:44
Visualizing a multivariate Gaussian distribution
# Because I always forget how to do this.
#
# Credit: https://scipython.com/blog/visualizing-the-bivariate-gaussian-distribution/
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
from scipy.stats import multivariate_normal
@Kif11
Kif11 / basic_logging.py
Last active January 14, 2023 18:09
Python basic logging boilerplate for console log
import logging
log = logging.getLogger()
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(levelname)s: %(message)s'))
log.addHandler(handler)
log.setLevel(logging.INFO)
log.info('Hello World!')
@manojpandey
manojpandey / rgb2lab.py
Created August 12, 2016 10:34
RGB to CIELab color space conversion
# RGB to Lab conversion
# Step 1: RGB to XYZ
# http://www.easyrgb.com/index.php?X=MATH&H=02#text2
# Step 2: XYZ to Lab
# http://www.easyrgb.com/index.php?X=MATH&H=07#text7
def rgb2lab(inputColor):
@Revokee
Revokee / ep1.py
Last active November 11, 2023 09:16
EP1 - MAC 2166 - 2014
"""Obs.: No comeco do EP, ele diz que a intencao eh voce aprender a usar numeros inteiros. Problema:
O tipo int em Python, por motivos que nao vou me extender, usa a quantidade de bits disponiveis no
processador, portanto, se voce rodar esse EP em um computador de 32 bits, o exemplo 3 do EP ira dar
errado, por causa de Overflow na quantidade de bits. Entretanto, em uma arquitetura 64 bits, voce
nao deve ter nenhum problema. Mas vamos falar a verdade, esses caras do IME ou sao muito sadicos por
nao alertar voces bixos, ou muito burros mesmo. Quem quiser ler os motivos de o Python unificar o
tipo int e long veja nesse link:
http://www.devx.com/opensource/Article/41398
"""