Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -102,3 +102,4 @@ venv.bak/ | ||
|
||
# mypy | ||
.mypy_cache/ | ||
*~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
all: FORCE | ||
@echo "This is an empty Makefile. You can put stuff in here, or just delete it if you don't need it." | ||
|
||
|
||
test: FORCE | ||
echo "If you don't have pytest installed, you will need to install it globally or use 'make venv' if you want a virtualenv created with it in" | ||
py.test -v tests/ | ||
|
||
venv: FORCE | ||
python3 -m venv venv | ||
|
||
prereqs: FORCE | ||
pip install -r requirements.txt | ||
|
||
|
||
FORCE: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#TODO Documentation | ||
def dummyFunc(data): | ||
""" This function is a placeholder """ | ||
import base64 | ||
out="" | ||
for i in data: | ||
v=ord(i) | ||
v=((v&1)<<6) | (v>>1) | ||
out+=chr(v) | ||
return base64.b64encode(str.encode("".join(out))).decode() | ||
|
||
def unDummyFunc(data): | ||
""" This function is a placeholder """ | ||
import base64 | ||
out="" | ||
for i in base64.b64decode(str.encode(data)).decode("utf-8"): | ||
v=ord(i) | ||
v=((v&64)>>6) | ((v<<1)&127) | ||
out+=chr(v) | ||
return "".join(out) | ||
|
||
if __name__=="__main__": | ||
print("Your code goes here") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import pytest | ||
import sys | ||
sys.path.append("./src/") | ||
import leap | ||
|
||
|
||
flag="MzZwcx15NHQzOnxzcnI9cjk=" | ||
|
||
|
||
def test_dummy(): | ||
assert leap.dummyFunc(leap.unDummyFunc(flag))==flag |