Skip to content

Instantly share code, notes, and snippets.

View brenorb's full-sized avatar

Breno brenorb

View GitHub Profile
@brenorb
brenorb / privacy_policy_sos.md
Created November 25, 2023 02:32
Privacy Policy for the Spirit of Satoshi GPT

Privacy Policy for the Spirit of Satoshi GPT

Last Updated: 2023-11-24

The Spirit of Satoshi GPT ("Spirit of Satoshi," "we," "us," or "our") is committed to respecting your privacy and ensuring the security of your information. This Privacy Policy outlines how we handle information when you interact with our GPT model.

  1. Information Usage

When you use the Spirit of Satoshi GPT, we may collect and process the text inputs and queries you provide. This information may be temporarily routed through our private servers to enhance the quality of the GPT responses and help identify the best contexts for your queries.

@brenorb
brenorb / tags.py
Created June 3, 2021 20:24
🏷️ Display all unique HMTL Tags from file
# How to use it
# > python -m tag html_file
# {'tag', 'other_tag', ...}
from bs4 import BeautifulSoup
import sys
file = sys.argv[1]
@brenorb
brenorb / optimal_portfolio.py
Created May 30, 2020 16:25
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
sns.set()
plt.rcParams['figure.figsize'] = [10,6]
plt.rcParams["font.weight"] = "bold"
plt.rcParams["axes.labelweight"] = "bold"
@brenorb
brenorb / emoji_cheatsheet.md
Last active June 3, 2021 20:26 — forked from roachhd/README.md
😛:bookmark_tabs: EMOJI cheatsheet

Emoji Cheatsheet

People

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

@brenorb
brenorb / get_print.py
Created June 13, 2019 21:22
Simple way to keep track of results printed but not returned
# from https://www.kaggle.com/kmader/july-24-micro-challenge
from contextlib import redirect_stdout
from io import StringIO
def simulate_game(verbose=False):
out_buffer = StringIO()
with redirect_stdout(out_buffer):
blackjack.simulate_one_game()
out_str = out_buffer.getvalue()
if verbose:
@brenorb
brenorb / tweet_dumper.py
Last active March 11, 2023 18:17 — forked from yanofsky/LICENSE
A Python 3.+ script to download all of a user's tweets into a csv.
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@brenorb
brenorb / nubank_parser.ipynb
Last active May 24, 2019 20:39
Nubank expenses CSV maker
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brenorb
brenorb / bricx.txt
Created May 7, 2019 13:30
PID controller for Lego bot
/* Techbricks.nl Line Follower
Based on a PID controller, using the NXT 1.0 light sensor
NXC firmware 1.28
www.techbricks.nl
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
brenorb / poker.test.js
Created May 4, 2019 22:44
Javascript/Node.js TDD with jest. https://jestjs.io/
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);
@brenorb
brenorb / test_TDD_pytest.py
Last active May 4, 2019 22:46
Python TDD with pytest. https://pytest.org
import twittter_main
# Execute Pytest in the cmd to assert the test.
def test_post_sem_usuario_sem_msg():
assert twittter_main.post('->') == 'Comando invalido!'
def test_post_sem_msg():
assert twittter_main.post("Alice ->") == "Post sem mensagem!"