Skip to content

Instantly share code, notes, and snippets.

View demacdolincoln's full-sized avatar

Lincoln de Macêdo demacdolincoln

  • Brasil
View GitHub Profile
@demacdolincoln
demacdolincoln / notacao_polonesa.py
Created September 16, 2015 21:36
implementação de uma simples calculadora de notação polonesa em python
"""
Funcionamento:
empilha os operadores e calcula os valores
primeira parte:
criacao de funcoes que executem as operacoes e seu acoplamento a um
dicionario que servira de forma similar a um switch
segunda parte:
funcao que implementara a notacao polonesa se valendo de recursividade, das
for i in (cat ~/.config/zellij/config.yaml | rg "\[\d+, \d+, \d+\]")
echo $i | sd " " "" | read -d ":" -l colorname rgb
set c "#"
for j in (echo $rgb | grep -ohP "\d+" )
set c $c(python -c "print(hex($j)[2:])")
end
set_color $c; echo $colorname: $c
end

Roteiro de instalação do ArchLinux

configurando coisas básicas no modo live

loadkeys br-abnt2

#---> se precisar se conectar ao wifi, basicamente:

iwctl

no ~/.config/sway/config:

bindsym $mod+F11 exec fish -c "get_pass_passwd"
bindsym $mod+F12 exec fish -c "get_pass_otp"

a ideia:

  1. wl-copy -o faz com que o conteúdo copiado seja usado apenas 1 vez, e depois que copia o nome de usuário ou email, o -f faz esperar pelo uso do que foi copiado para seguir o resto das instruções, então automaticamente copia o nome de usuário e depois a senha, ambos sendo usados apenas 1 vez.
function fish_prompt
###################################################################
# cuidando das variaveis de ambiente #
###################################################################
set -g VIRTUAL_ENV_DISABLE_PROMPT true # para nao aparecer a notificacao padrao do venv e do virtualenv
set -g __fish_git_prompt_show_informative_status 1
set -g __fish_git_prompt_hide_untrackedfiles 1
@demacdolincoln
demacdolincoln / simple_example_rnn_regression_time_serie.ipynb
Created February 6, 2020 04:01
simple_example_rnn_regression_time_serie.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@demacdolincoln
demacdolincoln / copy-of-tensorboard-fastai.ipynb
Created February 1, 2020 06:00
Copy of tensorboard-fastai.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@demacdolincoln
demacdolincoln / CNN.py
Created January 11, 2019 16:33
simple pytorch cnn
class CNN(nn.Module):
def __init__(self):
super(CNN, self).__init__()
self.conv1 = nn.Sequential(
nn.Conv2d(1, 16, 5, stride=2),
nn.ReLU(),
nn.MaxPool2d(kernel_size=2)
)
self.conv2 = nn.Sequential(
nn.Conv2d(16, 32, 5, stride=2),
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@demacdolincoln
demacdolincoln / word2vec.ipynb
Last active September 23, 2018 20:35
word2vec
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.