This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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 | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 == |