Skip to content

Commit 845965b

Browse files
Initial commit
0 parents  commit 845965b

17 files changed

+601
-0
lines changed

.gitignore

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/python
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=python
3+
4+
### Python ###
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
10+
# C extensions
11+
*.so
12+
13+
# Distribution / packaging
14+
.Python
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
pip-wheel-metadata/
28+
share/python-wheels/
29+
*.egg-info/
30+
.installed.cfg
31+
*.egg
32+
MANIFEST
33+
34+
# PyInstaller
35+
# Usually these files are written by a python script from a template
36+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
37+
*.manifest
38+
*.spec
39+
40+
# Installer logs
41+
pip-log.txt
42+
pip-delete-this-directory.txt
43+
44+
# Unit test / coverage reports
45+
htmlcov/
46+
.tox/
47+
.nox/
48+
.coverage
49+
.coverage.*
50+
.cache
51+
nosetests.xml
52+
coverage.xml
53+
*.cover
54+
*.py,cover
55+
.hypothesis/
56+
.pytest_cache/
57+
pytestdebug.log
58+
59+
# Translations
60+
*.mo
61+
*.pot
62+
63+
# Django stuff:
64+
*.log
65+
local_settings.py
66+
db.sqlite3
67+
db.sqlite3-journal
68+
69+
# Flask stuff:
70+
instance/
71+
.webassets-cache
72+
73+
# Scrapy stuff:
74+
.scrapy
75+
76+
# Sphinx documentation
77+
docs/_build/
78+
doc/_build/
79+
80+
# PyBuilder
81+
target/
82+
83+
# Jupyter Notebook
84+
.ipynb_checkpoints
85+
86+
# IPython
87+
profile_default/
88+
ipython_config.py
89+
90+
# pyenv
91+
.python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
101+
__pypackages__/
102+
103+
# Celery stuff
104+
celerybeat-schedule
105+
celerybeat.pid
106+
107+
# SageMath parsed files
108+
*.sage.py
109+
110+
# Environments
111+
.env
112+
.venv
113+
env/
114+
venv/
115+
ENV/
116+
env.bak/
117+
venv.bak/
118+
pythonenv*
119+
120+
# Spyder project settings
121+
.spyderproject
122+
.spyproject
123+
124+
# Rope project settings
125+
.ropeproject
126+
127+
# mkdocs documentation
128+
/site
129+
130+
# mypy
131+
.mypy_cache/
132+
.dmypy.json
133+
dmypy.json
134+
135+
# Pyre type checker
136+
.pyre/
137+
138+
# pytype static type analyzer
139+
.pytype/
140+
141+
# profiling data
142+
.prof
143+
144+
# End of https://www.toptal.com/developers/gitignore/api/python

challenges/challenge_anagrams.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def is_anagram(first_string, second_string):
2+
"""Faça o código aqui."""
3+
raise NotImplementedError
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
def encrypt_message(message: str, key: int):
2+
3+
if not isinstance(key, int):
4+
raise TypeError("tipo inválido para key")
5+
6+
if not isinstance(message, str):
7+
raise TypeError("tipo inválido para message")
8+
9+
if key not in range(1, len(message)):
10+
return "".join(reversed(message))
11+
12+
part_one = reversed(message[:key])
13+
part_two = reversed(message[key:])
14+
15+
if not key % 2:
16+
part_two, part_one = part_one, part_two
17+
18+
return "".join(part_one) + "_" + "".join(part_two)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def find_duplicate(nums):
2+
"""Faça o código aqui."""
3+
raise NotImplementedError
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def is_palindrome_iterative(word):
2+
"""Faça o código aqui."""
3+
raise NotImplementedError
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def is_palindrome_recursive(word, low_index, high_index):
2+
"""Faça o código aqui."""
3+
raise NotImplementedError
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
def study_schedule(permanence_period, target_time):
2+
"""Faça o código aqui."""
3+
raise NotImplementedError

dev-requirements.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
-r requirements.txt
2+
3+
wheel==0.38.4
4+
pytest==7.1.2
5+
pytest-json==0.4.0
6+
flake8==5.0.4
7+
black==22.6.0
8+
pytest-cov==3.0.0
9+
big-O==0.10.2
10+
matplotlib==3.6.3
11+
git+https://github.com/betrybe/pytest-dependency

pyproject.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[tool.pytest.ini_options]
2+
minversion = "6.0"
3+
addopts = "-vv -s --continue-on-collection-errors"
4+
testpaths = ["tests",]
5+
accept_xfail = true
6+
7+
[tool.black]
8+
line-length = 79
9+
include = '\.pyi?$'
10+
exclude = '''
11+
/(
12+
\.git
13+
| \.hg
14+
| \.mypy_cache
15+
| \.tox
16+
| \.venv
17+
| _build
18+
| buck-out
19+
| build
20+
| dist
21+
)/
22+
'''

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-e .

0 commit comments

Comments
 (0)