-
Notifications
You must be signed in to change notification settings - Fork 1
Como organizar melhor os projetos ? #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0a90dbf
0c5a689
63af1ab
6f352e2
ab083a4
d89e6d4
336cecd
342be41
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| .clj-kondo/ | ||
| .lsp/ | ||
| .vscode/ | ||
| .vscode/ | ||
| *py_cache__/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Changelog | ||
|
|
||
| Todas as mudanças notáveis neste projeto serão documentadas neste arquivo. | ||
|
|
||
| O formato é baseado em [Keep a Changelog](https://keepachangelog.com/pt-BR/1.0.0/), | ||
| e este projeto adere ao [Semantic Versioning](https://semver.org/lang/pt-BR/). | ||
|
|
||
| ## [Não Lançado] | ||
|
|
||
| ### Adicionado | ||
| - Templates de Issues (Bug Report e Feature Request) | ||
| - Template de Pull Request | ||
| - Guia de Contribuição (CONTRIBUTING.md) | ||
| - Workflow de CI/CD com GitHub Actions | ||
| - Testes unitários para gerador de senhas Python | ||
|
|
||
| ### Melhorado | ||
| - Implementação completa do gerador de senhas em Python | ||
| - Adicionada validação de força de senha | ||
| - Adicionada função para gerar múltiplas senhas | ||
|
|
||
| ## [1.0.0] - 2026-01-04 | ||
|
|
||
| ### Adicionado | ||
| - Coleção inicial de projetos (iniciante, intermediário, avançado) | ||
| - README principal com descrição dos projetos | ||
| - Implementação JavaScript do gerador de senhas | ||
| - Implementação Python do gerador de senhas | ||
|
|
||
| [Não Lançado]: https://github.com/Ryanditko/coding-projects-library/compare/v1.0.0...HEAD | ||
| [1.0.0]: https://github.com/Ryanditko/coding-projects-library/releases/tag/v1.0.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # Guia de Contribuição | ||
|
|
||
| Obrigado por considerar contribuir para a Projects Library! 🎉 | ||
|
|
||
| ## Como Contribuir | ||
|
|
||
| ### 1. Reportar Issues | ||
| - Descreva o problema claramente | ||
| - Inclua passos para reproduzir | ||
| - Mencione o ambiente (OS, versão do Python/Node, etc.) | ||
|
|
||
| ### 2. Sugerir Melhorias | ||
| - Abra uma issue descrevendo a melhoria | ||
| - Explique o benefício da mudança | ||
| - Discuta possíveis implementações | ||
|
|
||
| ### 3. Pull Requests | ||
| - Faça fork do repositório | ||
| - Crie uma branch para sua feature (`git checkout -b feature/MinhaFeature`) | ||
| - Commit suas mudanças (`git commit -m 'Adiciona MinhaFeature'`) | ||
| - Push para a branch (`git push origin feature/MinhaFeature`) | ||
| - Abra um Pull Request | ||
|
|
||
| ### 4. Code Review | ||
| - Revise PRs abertos | ||
| - Forneça feedback construtivo | ||
| - Sugira melhorias no código | ||
| - Teste as mudanças propostas | ||
|
|
||
| ## Padrões de Código | ||
|
|
||
| ### Python | ||
| - Siga PEP 8 | ||
| - Use docstrings | ||
| - Adicione testes quando possível | ||
|
|
||
| ### JavaScript | ||
| - Use ESLint | ||
| - Comente código complexo | ||
| - Mantenha funções pequenas e focadas | ||
|
|
||
| ## Estrutura dos Projetos | ||
|
|
||
| Cada projeto deve ter: | ||
| - README.md com descrição e instruções | ||
| - Código bem documentado | ||
| - Exemplos de uso | ||
|
|
||
| ## Processo de Review | ||
|
|
||
| 1. Todo PR será revisado por pelo menos um maintainer | ||
| 2. Feedback será fornecido em até 48 horas | ||
| 3. Mudanças solicitadas devem ser implementadas | ||
| 4. Após aprovação, o PR será merged | ||
|
|
||
| ## Dúvidas? | ||
|
|
||
| Abra uma issue com a tag `question` ou entre em contato! | ||
|
|
||
| --- | ||
| **Obrigado pela sua contribuição!** |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,37 @@ | ||||||||||
| (ns iniciante.calculadora-simples.script | ||||||||||
| (:require [clojure.string :as str])) | ||||||||||
|
|
||||||||||
| (defn tokenize [expr] | ||||||||||
| (->> expr | ||||||||||
| (str/replace " " "") | ||||||||||
| (re-seq #"\d+(\.\d+)?|[+\-*/]") | ||||||||||
| (map #(if (re-matches #"\d+(\.\d+)?" %) | ||||||||||
| (Double/parseDouble %) | ||||||||||
| (first %))))) | ||||||||||
|
|
||||||||||
| (defn resolve-high-precedence [tokens] | ||||||||||
| (loop [result [] | ||||||||||
| [t & more] tokens] | ||||||||||
| (if (nil? t) | ||||||||||
| result | ||||||||||
| (if (#{\* \/} t) | ||||||||||
| (let [prev (peek result) | ||||||||||
| next (first more) | ||||||||||
| calc (if (= t \*) | ||||||||||
| (* prev next) | ||||||||||
| (/ prev next))] | ||||||||||
|
||||||||||
| (/ prev next))] | |
| (if (zero? next) | |
| (throw (IllegalArgumentException. "Division by zero is not allowed.")) | |
| (/ prev next)))] |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,89 @@ | ||||||||||||||||||||||
| // --- Função para transformar a string em tokens (números e operadores) --- | ||||||||||||||||||||||
| function tokenize(expr) { | ||||||||||||||||||||||
| const tokens = []; | ||||||||||||||||||||||
| let current = ''; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| for (let char of expr) { | ||||||||||||||||||||||
| if (/[0-9.]/.test(char)) { // número ou ponto decimal | ||||||||||||||||||||||
| current += char; | ||||||||||||||||||||||
| } else if (/[+\-*/]/.test(char)) { // operador | ||||||||||||||||||||||
| if (current) tokens.push(parseFloat(current)); | ||||||||||||||||||||||
| tokens.push(char); | ||||||||||||||||||||||
| current = ''; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| if (current) tokens.push(parseFloat(current)); | ||||||||||||||||||||||
| return tokens; | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| // --- Resolve operações de alta precedência: * e / --- | ||||||||||||||||||||||
| function resolveHighPrecedence(tokens) { | ||||||||||||||||||||||
| const result = []; | ||||||||||||||||||||||
| let i = 0; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| while (i < tokens.length) { | ||||||||||||||||||||||
| const token = tokens[i]; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if (token === '*' || token === '/') { | ||||||||||||||||||||||
| const prev = result.pop(); | ||||||||||||||||||||||
| const next = tokens[i + 1]; | ||||||||||||||||||||||
|
||||||||||||||||||||||
| const next = tokens[i + 1]; | |
| const next = tokens[i + 1]; | |
| if (token === '/' && next === 0) { | |
| throw new Error("Divisão por zero"); | |
| } |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'calc' is not descriptive and should be renamed to something more meaningful like 'result' or 'calculatedValue' to improve code readability and maintainability.
| const calc = token === '*' | |
| ? prev * next | |
| : prev / next; | |
| result.push(calc); | |
| const calculatedValue = token === '*' | |
| ? prev * next | |
| : prev / next; | |
| result.push(calculatedValue); |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,88 @@ | ||||||||||
| import re | ||||||||||
|
|
||||||||||
|
Comment on lines
+1
to
+2
|
||||||||||
| import re |
Copilot
AI
Jan 6, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'calc' is not descriptive and should be renamed to something more meaningful like 'result' or 'calculated_value' to improve code readability and maintainability.
| calc = prev * next_value if token == '*' else prev / next_value | |
| result.append(calc) | |
| calculated_value = prev * next_value if token == '*' else prev / next_value | |
| result.append(calculated_value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CHANGELOG references test file additions ("Testes unitários para gerador de senhas Python") that don't exist in this pull request. The workflow file references test_senha.py but this file is not included in the repository, making this changelog entry inaccurate.