Skip to content
Permalink
Browse files
Base layout for LEAP project created
  • Loading branch information
digehode committed Sep 6, 2020
1 parent 3a682e4 commit a45507abc411079d85d907083b050699387bbfba
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
@@ -102,3 +102,4 @@ venv.bak/

# mypy
.mypy_cache/
*~
@@ -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:
@@ -0,0 +1 @@
pytest
@@ -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")
@@ -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

0 comments on commit a45507a

Please sign in to comment.