Skip to content

Instantly share code, notes, and snippets.

View welmends's full-sized avatar
🎯
Focusing

Wellington Mendes welmends

🎯
Focusing
  • Indigo Ag
  • Fortaleza, CE
View GitHub Profile
@welmends
welmends / calc_invest.py
Last active August 24, 2022 20:36
Investment simulation on FIIs over years
# Investment simulation on FIIs over years
import math
import matplotlib.pyplot as plt
import locale
locale.setlocale(locale.LC_ALL, '')
# FII
price = 10
dividends = 0.08
@welmends
welmends / .bash_profile
Last active May 18, 2022 20:55
Customised MacOS .bash_profile (activate: chsh -s /bin/bash)
# * Keyboad autocomplete *
set show-all-if-ambiguous on
if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then
. `brew --prefix`/etc/bash_completion.d/git-completion.bash
fi
# * Customizing PS1 - Add Battery Percentage *
# get_battery() {
# acpi | egrep -o '([0-9]+)%'
# }
@welmends
welmends / ws_client.py
Created April 16, 2020 23:35
WebSocket in Python - Example
# WS client example
import asyncio
import websockets
import time
async def receive():
uri = "ws://localhost:9999"
async with websockets.connect(uri) as websocket: