Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
test123 committed Jan 2, 2020
0 parents commit 895bca1
Show file tree
Hide file tree
Showing 7 changed files with 253 additions and 0 deletions.
191 changes: 191 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
/.vscode/
*.DS_Store

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

*.iml

local.properties
.gradle
.cxx
/captures
.externalNativeBuild

*.class
*.war
*.ear
hs_err_pid*

## GWT
war/
html/war/gwt_bree/
html/gwt-unitCache/
.apt_generated/
html/war/WEB-INF/deploy/
html/war/WEB-INF/classes/
.gwt/
gwt-unitCache/
www-test/
.gwt-tmp/

## Android Studio and Intellij and Android in general
android/libs/armeabi/
android/libs/armeabi-v7a/
android/libs/x86/
android/gen/
.idea/
*.ipr
*.iws
out/
com_crashlytics_export_strings.xml

## Eclipse
.classpath
.project
.metadata
**/bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
.settings/
.loadpath
.externalToolBuilders/
*.launch

## NetBeans
**/nbproject/private/
nbbuild/
nbdist/
nbactions.xml
nb-configuration.xml

## Gradle

gradle-app.setting

/.vs/
node_modules/
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Install

```pip install -r requirements.txt ```

# Run

```python main.py```

25 changes: 25 additions & 0 deletions front-end/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hello World!</title>
<link rel="stylesheet" href="styles/style.css">
<script type="text/javascript" src="/eel.js"></script>
<script type="text/javascript" src="scripts/main.js"></script>

</head>

<body>

<input type="text" id="num-1" placeholder="Enter number.">
<input type="text" id="num-2" placeholder="Enter number.">
<input type="button" class="submit" value="Add" onclick="operate(eel.add)">
<input type="button" class="submit" value="Subtract" onclick="operate(eel.subtract)">
<span id="output"></span>
</body>

</html>
8 changes: 8 additions & 0 deletions front-end/scripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function operate(operator) {
var num1 = document.querySelector('#num-1').value;
var num2 = document.querySelector('#num-2').value;
resultLambda = operator(num1, num2);
resultLambda(result => {
document.querySelector('#output').innerText = result;
});
}
Empty file added front-end/styles/style.css
Empty file.
16 changes: 16 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import eel

eel.init('front-end')


@eel.expose
def add(num1, num2):
return int(num1) + int(num2)


@eel.expose
def subtract(num1, num2):
return int(num1) - int(num2)


eel.start('index.html', size=(1000, 600))
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
eel
pyqrcode
pyinstaller
pypng
autopep8

0 comments on commit 895bca1

Please sign in to comment.