Skip to content

Instantly share code, notes, and snippets.

Breno brenorb

  • BBrito
  • Brasília, Brazil
Block or report user

Report or block brenorb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
brenorb /
Created May 30, 2020
Making a graph of optimal portfolio
import pandas as pd, numpy as np
import yfinance as yf
import datetime as dt
import re
import matplotlib.pyplot as plt
import seaborn as sns
plt.rcParams['figure.figsize'] = [10,6]
plt.rcParams["font.weight"] = "bold"
plt.rcParams["axes.labelweight"] = "bold"
brenorb /
Last active Jul 12, 2019 — forked from roachhd/
😛📑 EMOJI cheatsheet

Emoji Cheatsheet


:bowtie: - :bowtie: 😄 - :smile: 😆 - :laughing: 😊 - :blush:

brenorb /
Created Jun 13, 2019
Simple way to keep track of results printed but not returned
# from
from contextlib import redirect_stdout
from io import StringIO
def simulate_game(verbose=False):
out_buffer = StringIO()
with redirect_stdout(out_buffer):
out_str = out_buffer.getvalue()
if verbose:
brenorb /
Last active Jun 4, 2020 — forked from yanofsky/
A Python 3.+ script to download all of a user's tweets into a csv.
#!/usr/bin/env python
# encoding: utf-8
import tweepy #
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
brenorb / nubank_parser.ipynb
Last active May 24, 2019
Nubank expenses CSV maker
View nubank_parser.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
brenorb / bricx.txt
Created May 7, 2019
PID controller for Lego bot
View bricx.txt
/* Line Follower
Based on a PID controller, using the NXT 1.0 light sensor
NXC firmware 1.28
last modified 03/03/2010 Breno version*/
/* Proportional gain, straight forward reaction of the controller
Larger values typically mean faster response since the larger the error,
the larger the proportional term compensation.
An excessively large proportional gain will lead to process instability and oscillation.*/
brenorb / poker.test.js
Created May 4, 2019
Javascript/Node.js TDD with jest.
View poker.test.js
import { checkFiveCards, checkCard, checkHand, higherCard } from './poker';
// Should use 'export function' for functions in './poker' file
describe('Checar 5 cartas', () => {
test('checa mão com cinco cartas', () => {
expect(checkFiveCards('2H 3D 5S 9C KD')).toEqual(true);
test('checa mão com 4 cartas', () => {
expect(checkFiveCards('2H 3D 5S 9C')).toEqual(false);
import twittter_main
# Execute Pytest in the cmd to assert the test.
def test_post_sem_usuario_sem_msg():
assert'->') == 'Comando invalido!'
def test_post_sem_msg():
assert"Alice ->") == "Post sem mensagem!"
brenorb / DateSync.bat
Created Jan 8, 2019
Syncs computer date and time. Must execute as admin.
View DateSync.bat
net start w32time
w32tm /resync /force
net stop w32time
brenorb /
Created Jan 8, 2019
Shell script to update code in a double click.
#Updates codes
#Author: Breno Brito
#Updated in 13/04/2018
export dir=$PWD
echo Updating website
cd $dir/website
You can’t perform that action at this time.