Skip to content

Instantly share code, notes, and snippets.

View renanmachad's full-sized avatar
🤗
Working

renan_machado renanmachad

🤗
Working
View GitHub Profile
import re
def traduzir_palavra(palavra):
vogais = "aeiouAEIOU"
# Se a palavra contém apenas vogais, retorna + 'yay'
if all(c in vogais for c in palavra):
return palavra + "yay"
# Encontrar índice da primeira vogal
@renanmachad
renanmachad / gastos_inter.py
Created October 18, 2024 16:44
Script to sum costs provided by Inter Bank
import pandas as pd
import sys
if __name__ == '__main__':
file_path = sys.argv[1]
try:
# Lendo o CSV e tratando problemas comuns de parsing
df = pd.read_csv(file_path, delimiter=';')
@renanmachad
renanmachad / index.js
Created May 5, 2024 05:18
To my noob friend
class Character {
_life = 1;
maxLife = 1;
attack = 0;
defense = 0;
constructor(name) {
this.name = name;
}
@renanmachad
renanmachad / main.py
Last active January 15, 2024 13:51
Replace javax package to jakarta / Quarkus migration 2 to 3
import os
import sys
def replace_jakarta(root_dir):
"""Recursively traverses directories, replaces "javax" with "jakarta" in .java files,
excluding those within directories containing "javax".
"""
for dirpath, dirnames, filenames in os.walk(root_dir):
for filename in filenames:
if filename.endswith(".java") and "javax" not in dirpath:
@renanmachad
renanmachad / work-with-multiple-github-accounts.md
Created September 10, 2022 05:38 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@renanmachad
renanmachad / work-with-multiple-github-accounts.md
Created September 10, 2022 05:38 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent