├── .gitignore
├── CHANGES.txt
├── Containerfile
├── DOKU.md
├── LICENSE
├── MANIFEST.in
├── README.md
├── README.whl
├── TODOS
├── build_rpi.sh
├── build_sdist.sh
├── build_x86.sh
├── dist
├── Pythonic-0.10.tar.gz
├── Pythonic-0.11.tar.gz
├── Pythonic-0.12.tar.gz
├── Pythonic-0.13.tar.gz
├── Pythonic-0.14.tar.gz
├── Pythonic-0.15.tar.gz
├── Pythonic-0.16.tar.gz
├── Pythonic-0.17.tar.gz
├── Pythonic-0.18.tar.gz
├── Pythonic-0.7.tar.gz
├── Pythonic-0.8.tar.gz
├── Pythonic-0.9.tar.gz
├── Pythonic-1.0.tar.gz
├── Pythonic-1.1.tar.gz
├── Pythonic-1.10.tar.gz
├── Pythonic-1.11.tar.gz
├── Pythonic-1.2.tar.gz
├── Pythonic-1.3.tar.gz
├── Pythonic-1.4.1.tar.gz
├── Pythonic-1.4.tar.gz
├── Pythonic-1.5.tar.gz
├── Pythonic-1.6.tar.gz
├── Pythonic-1.7.tar.gz
├── Pythonic-1.8.tar.gz
├── Pythonic-1.9.tar.gz
├── PythonicRPI-1.10.tar.gz
├── PythonicRPI-1.11.tar.gz
├── PythonicRPI-1.6.tar.gz
├── PythonicRPI-1.7.tar.gz
├── PythonicRPI-1.8.tar.gz
└── PythonicRPI-1.9.tar.gz
├── examples
├── generic_pipe_0e7b8360.py
├── logging_and_report
│ ├── current_config.json
│ ├── generic_pipe_0e7b8360.py
│ ├── generic_pipe_13ad992a.py
│ ├── generic_pipe_2f78d74c.py
│ ├── generic_pipe_6ce104a4.py
│ ├── logging_and_report.zip
│ ├── manual_scheduler_0412dbdc.py
│ ├── manual_scheduler_7c840ba9.py
│ ├── report_template.xlsx
│ ├── scheduler_557616c2.py
│ ├── sqlite_196f9a6e.py
│ ├── sqlite_5617d487.py
│ └── telegram_2e4148e2.py
├── rpi_telegram_remote_io
│ ├── current_config.json
│ ├── generic_pipe_0853b094.py
│ ├── manual_scheduler_475ae9ed.py
│ ├── manual_scheduler_5f8125f5.py
│ ├── manual_stop_process_36577a3c.py
│ └── telegram_2ca7cd73.py
└── trading_bot_crossing_ema
│ ├── ccxt_6f9efe59.py
│ ├── ccxt_method_7e1cda6c.py
│ ├── current_config.json
│ ├── generic_pipe_29dfc189.py
│ ├── generic_pipe_3e059017.py
│ ├── jupyter
│ ├── ADAUSD_5m.df
│ └── backtesting.ipynb
│ ├── manual_scheduler_1518ec21.py
│ ├── manual_scheduler_601e243e.py
│ ├── manual_scheduler_6b9c41eb.py
│ ├── scheduler_5ee92295.py
│ └── trading_bot_crossing_ema.zip
├── screenshots
├── oss-rising-star-black.png
├── python_logo.png
├── pythonic_gui.png
├── screenshot-1.png
├── screenshot-2.png
├── screenshot-3.png
├── screenshot-4.png
├── screenshot-5.PNG
├── screenshot-6.PNG
└── screenshot-7.PNG
├── setup.py
├── setup_rpi.cfg
├── setup_rpi.py
├── setup_x86.cfg
├── setup_x86.py
└── src
├── Pythonic
├── .gitignore
├── .vscode
│ └── launch.json
├── Doxyfile
├── PythonicWeb.pro
├── __init__.py
├── baselabel.cpp
├── baselabel.h
├── bucket.py
├── build-PythonicWebDev-Desktop_Qt_5_15_1_GCC_64bit-Debug
│ └── moc_predefs.h
├── build.sh
├── ccxt_test.py
├── configio.py
├── element_types.py
├── elementeditor.cpp
├── elementeditor.h
├── elementmaster.cpp
├── elementmaster.h
├── executables
│ ├── __init__.py
│ ├── ccxt.py
│ ├── ccxt_method.py
│ ├── email.py
│ ├── generic_pipe.py
│ ├── generic_process.py
│ ├── gpio_read.py
│ ├── gpio_write.py
│ ├── manual_scheduler.py
│ ├── process_pipe.py
│ ├── scheduler.py
│ ├── sqlite.py
│ ├── stop_process.py
│ └── telegram.py
├── execution_operator.py
├── filedownloader.h
├── helper.cpp
├── helper.h
├── logfile_hanlder.py
├── main.cpp
├── main.py
├── mainwindow.cpp
├── mainwindow.h
├── mainwindow_test.cpp
├── mainwindow_test.h
├── menubar.cpp
├── menubar.h
├── messagearea.cpp
├── messagearea.h
├── public_html
│ ├── config
│ │ └── Toolbox
│ │ │ ├── 0Basic
│ │ │ ├── 0ManualScheduler.json
│ │ │ ├── 1Scheduler.json
│ │ │ ├── 2ManualStopProcess.json
│ │ │ ├── 3StopProcess.json
│ │ │ ├── 4GenericPipe.json
│ │ │ ├── 5GenericProcess.json
│ │ │ ├── 6ProcessPipe.json
│ │ │ ├── GenericPipe.editor
│ │ │ ├── GenericProcess.editor
│ │ │ ├── ManualScheduler.editor
│ │ │ ├── ManualStopProcess.editor
│ │ │ ├── ProcessPipe.editor
│ │ │ └── Scheduler.editor
│ │ │ ├── 1IO
│ │ │ ├── 0GPIO_Read.json
│ │ │ ├── 1GPIO_Write.json
│ │ │ ├── 2SQLite.json
│ │ │ ├── GPIO_Read.editor
│ │ │ ├── GPIO_Write.editor
│ │ │ └── SQLite.editor
│ │ │ ├── 2Connectivity
│ │ │ ├── 0Telegram.json
│ │ │ ├── 1EMail.json
│ │ │ ├── EMail.editor
│ │ │ └── Telegram.editor
│ │ │ ├── 3Trading
│ │ │ ├── 0CCXT.json
│ │ │ ├── 1CCXT_Method.json
│ │ │ ├── CCXT.editor
│ │ │ └── CCXT_Method.editor
│ │ │ └── ToolboxTemplate.json
│ └── static
│ │ ├── BaseElement.png
│ │ ├── CCXT.png
│ │ ├── CCXT_Method.png
│ │ ├── Email.png
│ │ ├── GPIO_Read.png
│ │ ├── GPIO_Write.png
│ │ ├── GenericPipe.png
│ │ ├── GenericProcess.png
│ │ ├── ManualScheduler.png
│ │ ├── ManualStopProcess.png
│ │ ├── PlayDefault.png
│ │ ├── PlayGreen.png
│ │ ├── PlayYellow.png
│ │ ├── PlugSocket.png
│ │ ├── PlugSocketGreen.png
│ │ ├── PlugSocketOrange.png
│ │ ├── ProcessPipe.png
│ │ ├── PythonicWeb.data
│ │ ├── SQLite.png
│ │ ├── Scheduler.png
│ │ ├── StopProcess.png
│ │ ├── StopYellow.png
│ │ ├── Telegram.png
│ │ ├── del.png
│ │ ├── gpio.png
│ │ ├── horizontal.png
│ │ ├── kill.png
│ │ ├── message.png
│ │ ├── new_file.png
│ │ ├── output.png
│ │ ├── python.ico
│ │ ├── reconnect.png
│ │ ├── save.png
│ │ ├── start_debug.png
│ │ ├── stop_exec.png
│ │ ├── upload_config.png
│ │ ├── upload_executable.png
│ │ └── wall_of_fame.png
├── pythonicweb.js_plugin_import.cpp
├── pythonicwebdev.js_plugin_import.cpp
├── requirements.txt
├── screen.py
├── script.py
├── start.sh
├── stdin_reader.py
├── toolbox.cpp
├── toolbox.h
├── toolmaster.cpp
├── toolmaster.h
├── wall_of_fame.cpp
├── wall_of_fame.h
├── web_daemon.py
├── websocket.h
├── workingarea.cpp
└── workingarea.h
├── PythonicOld
├── __init__.py
├── basictools.py
├── binancetools.py
├── connectivitytools.py
├── debugwindow.py
├── dropbox.py
├── element_iconbar.py
├── elementeditor.py
├── elementmaster.py
├── elements
│ ├── __init__.py
│ ├── __pycache__
│ │ ├── __init__.cpython-37.pyc
│ │ ├── basic_branch.cpython-37.pyc
│ │ ├── basic_operation.cpython-37.pyc
│ │ ├── basic_process.cpython-37.pyc
│ │ ├── basic_return.cpython-37.pyc
│ │ ├── basic_sched.cpython-37.pyc
│ │ ├── basic_stack.cpython-37.pyc
│ │ ├── basic_stack_window.cpython-37.pyc
│ │ ├── basic_ta.cpython-37.pyc
│ │ ├── basicelements.cpython-37.pyc
│ │ ├── binance_ohlc.cpython-37.pyc
│ │ ├── binance_order.cpython-37.pyc
│ │ └── binance_sched.cpython-37.pyc
│ ├── basic_branch.py
│ ├── basic_operation.py
│ ├── basic_operation_func.py
│ ├── basic_process.py
│ ├── basic_process_func.py
│ ├── basic_return.py
│ ├── basic_return_func.py
│ ├── basic_sched.py
│ ├── basic_sched_func.py
│ ├── basic_stack.py
│ ├── basic_stack_func.py
│ ├── basic_stack_window.py
│ ├── basic_ta.py
│ ├── basic_ta_func.py
│ ├── basicelements.py
│ ├── basicelements_func.py
│ ├── binance_ohlc.py
│ ├── binance_ohlc_func.py
│ ├── binance_order.py
│ ├── binance_order_func.py
│ ├── binance_sched.py
│ ├── binance_sched_func.py
│ ├── conn_mail.py
│ ├── conn_mail_func.py
│ ├── conn_rest.py
│ ├── conn_rest_func.py
│ ├── ml_svm.py
│ ├── ml_svm_func.py
│ ├── ml_svm_predict.py
│ └── ml_svm_predict_func.py
├── exceptwindow.py
├── executor.py
├── executor_daemon.py
├── images
│ ├── .directory
│ ├── BaseElement.png
│ ├── BinanceOHLC.png
│ ├── BinanceOrder.png
│ ├── BinanceSched.png
│ ├── ConnMail.png
│ ├── ConnREST.png
│ ├── ExecBranch.png
│ ├── ExecOp.png
│ ├── ExecProcess.png
│ ├── ExecReturn.png
│ ├── ExecSched.png
│ ├── ExecStack.png
│ ├── ExecTA.png
│ ├── MLSVM.png
│ ├── MLSVM_Predict.png
│ ├── PlayDefault.png
│ ├── PlayGreen.png
│ ├── PlayYellow.png
│ ├── PlugSocket.png
│ ├── PlugSocketGreen.png
│ ├── PlugSocketOrange.png
│ ├── StopDefault.png
│ ├── StopYellow.png
│ ├── base_element.svg
│ ├── basic_schedule.svg
│ ├── coins.svg
│ ├── debug.png
│ ├── del.png
│ ├── edit.png
│ ├── elements.svg
│ ├── email.svg
│ ├── horizontal.png
│ ├── horizontal.svg
│ ├── horizontal_blur.png
│ ├── icon.png
│ ├── kill.png
│ ├── line-chart.svg
│ ├── link.svg
│ ├── logo_rechts.png
│ ├── logomark.png
│ ├── logomark.svg
│ ├── logomark_doxygen.png
│ ├── magic_wand.svg
│ ├── message.png
│ ├── new_file.png
│ ├── open_file.png
│ ├── output.png
│ ├── output.svg
│ ├── parking.svg
│ ├── pause.png
│ ├── placeholder.png
│ ├── play.svg
│ ├── plug.png
│ ├── plug2.svg
│ ├── right.png
│ ├── right_bot.png
│ ├── run.png
│ ├── save.png
│ ├── save_as.png
│ ├── screenshot-1.png
│ ├── socket.png
│ ├── start.png
│ ├── start_debug.png
│ ├── start_web.png
│ ├── stop.png
│ ├── stop.svg
│ ├── stop_exec.png
│ ├── stop_process.svg
│ ├── ta.svg
│ ├── tmp.png
│ ├── upload_executable.png
│ ├── upload_networkg.png
│ ├── vertical.png
│ └── vertical.svg
├── info.py
├── main.py
├── main_daemon.py
├── mastertool.py
├── menubar.py
├── mltools.py
├── pipe_multiprocessor.py
├── record_function.py
├── return.py
├── script.py
├── scriptd.py
├── settings.py
├── stack.obj
├── storagebar.py
├── test.pyc
├── test_fp.pyc
├── top_menubar.py
├── translations
│ ├── chinese_cn.qm
│ ├── chinese_cn.qph
│ ├── cn.png
│ ├── de.png
│ ├── en.png
│ ├── english_en.qm
│ ├── english_en.qph
│ ├── es.png
│ ├── german_de.qm
│ ├── german_de.qph
│ ├── spanish_es.qm
│ └── spanish_es.qph
└── workingarea.py
├── RPI
├── code-server.service
├── config.yaml
├── install.sh
└── pythonic.service
├── __pycache__
├── __init__.cpython-37.pyc
└── script.cpython-37.pyc
├── attach.sh
├── code-server
├── .gitignore
├── config.yaml
├── download.sh
└── settings.json
├── commands.txt
├── run.sh
└── supervisor
└── supervisord.conf
/.gitignore:
--------------------------------------------------------------------------------
1 | .pyc
2 | setup.cfg
3 | setup.py
4 |
5 | src/Pythonic/PythonicRPI.egg-info
6 | src/PythonicRPI.egg-info
7 | src/Pythonic.egg-info
8 | src/Pythonic/Pythonic.egg-info
9 | src/Pythonic/.vscode
10 | src/code-server/*.vsix
11 | src/code-server/*.rpm
12 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include README.whl
--------------------------------------------------------------------------------
/README.whl:
--------------------------------------------------------------------------------
1 | # Pythonic
2 |
3 | You can find a detailed description and
4 | source files available at [Github](https://github.com/hANSIc99/Pythonics)
5 |
6 |
--------------------------------------------------------------------------------
/TODOS:
--------------------------------------------------------------------------------
1 | CCXT Method: Try to optimize large if-else areas for parsing config
2 |
3 | Python: Add type hints
4 |
5 | Check if the 'inline'-keyword can be applied to some loops
6 | (page 146 C++ Der Programmierer)
7 |
8 | Telegram: Return error element when chat id is removed?
9 |
10 | Elementeditor:
11 | Add the possibility to pass arbitrary number of keyword arguments or
12 | to build a dictionary from within the editor
13 |
14 | Testing:
15 | Create Unit test for every element
16 | Create test project
--------------------------------------------------------------------------------
/build_rpi.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # BUILD WASM FRONTEND
4 |
5 | #src/Pythonic/build.sh
6 |
7 |
8 | # BUILD PIP PACKAGE RPI
9 | cp setup_rpi.py setup.py
10 | cp setup_rpi.cfg setup.cfg
11 | python3 setup.py sdist
12 |
13 | # DOWNLOAD CODE SERVER EXTENSIONS
14 | #src/code-server/download.sh
15 |
16 | # BUILD CONTAINER IMAGE
17 | #podman build -t pythonicautomation/pythonic:1.7 .
18 |
--------------------------------------------------------------------------------
/build_sdist.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | #export PackageName=Pythonic
4 | #export Dependencies=$(cat <<-END
5 | # PySide2,
6 | # eventlet>=0.27.0,
7 | # debugpy==1.2.1,
8 | # python-telegram-bot==13.4.1,
9 | # ccxt>=1.37.59
10 | #END
11 | #)
12 | cp setup_x86.cfg setup.cfg
13 | cp setup_x86.py setup.py
14 | python3 setup.py sdist
15 |
16 | #export PackageName=PythonicRPI
17 | #export Dependencies=$(cat <<-END
18 | # eventlet>=0.27.0,
19 | # debugpy==1.2.1,
20 | # python-telegram-bot==13.4.1,
21 | # ccxt>=1.37.59
22 | #END
23 | #)
24 | cp setup_rpi.cfg setup.cfg
25 | cp setup_rpi.py setup.py
26 | python3 setup.py sdist
27 |
--------------------------------------------------------------------------------
/build_x86.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # BUILD WASM FRONTEND
4 |
5 | #src/Pythonic/build.sh
6 |
7 | # BUILD PIP PACKAGE x86
8 | cp setup_x86.py setup.py
9 | cp setup_x86.cfg setup.cfg
10 | python3 setup.py sdist
11 |
12 |
13 | # DOWNLOAD CODE SERVER EXTENSIONS
14 | #src/code-server/download.sh
15 |
16 | # BUILD CONTAINER IMAGE
17 | #podman build -t pythonicautomation/pythonic:1.7 .
18 |
--------------------------------------------------------------------------------
/dist/Pythonic-0.10.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.10.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.11.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.11.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.12.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.12.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.13.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.13.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.14.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.14.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.15.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.15.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.16.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.16.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.17.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.17.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.18.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.18.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.7.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.7.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.8.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.8.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-0.9.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-0.9.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.0.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.0.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.1.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.1.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.10.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.10.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.11.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.11.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.2.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.2.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.3.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.3.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.4.1.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.4.1.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.4.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.4.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.5.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.5.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.6.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.6.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.7.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.7.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.8.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.8.tar.gz
--------------------------------------------------------------------------------
/dist/Pythonic-1.9.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/Pythonic-1.9.tar.gz
--------------------------------------------------------------------------------
/dist/PythonicRPI-1.10.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/PythonicRPI-1.10.tar.gz
--------------------------------------------------------------------------------
/dist/PythonicRPI-1.11.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/PythonicRPI-1.11.tar.gz
--------------------------------------------------------------------------------
/dist/PythonicRPI-1.6.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/PythonicRPI-1.6.tar.gz
--------------------------------------------------------------------------------
/dist/PythonicRPI-1.7.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/PythonicRPI-1.7.tar.gz
--------------------------------------------------------------------------------
/dist/PythonicRPI-1.8.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/PythonicRPI-1.8.tar.gz
--------------------------------------------------------------------------------
/dist/PythonicRPI-1.9.tar.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/dist/PythonicRPI-1.9.tar.gz
--------------------------------------------------------------------------------
/examples/generic_pipe_0e7b8360.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | from random import randrange
3 | try:
4 | from element_types import Record, Function, ProcCMD, GuiCMD
5 | except ImportError:
6 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
7 |
8 | class Element(Function):
9 |
10 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
11 | super().__init__(id, config, inputData, return_queue, cmd_queue)
12 |
13 |
14 | def execute(self):
15 |
16 |
17 | #####################################
18 | # #
19 | # REFERENCE IMPLEMENTATION #
20 | # #
21 | #####################################
22 |
23 |
24 | # list all tables
25 | # SELECT name FROM sqlite_master WHERE type='table'
26 |
27 | # create table of not exist
28 | # CREATE TABLE IF NOT EXISTS my_table (timestamp INTEGER PRIMARY KEY NOT NULL, value UNSIGNED BIG INT);
29 |
30 | # insert into table
31 | # INSERT INTO my_table VALUES (?, ?)
32 | #
33 | # epoch in seconds: int(timer.time())
34 | # random int: randrange(999)
35 |
36 | # Read from table several rows
37 | # SELECT * FROM my_table WHERE timestamp BETWEEN {} AND {}'.format( int(time.time())-12000, int(time.time()) )
38 |
39 | # Sumup severals rows
40 | # SELECT SUM(value) FROM mytable WHERE timestamp BETWEEN {} AND {}
41 |
42 | output = 'SELECT SUM(value) FROM my_table WHERE timestamp BETWEEN {} AND {}'.format(int(time.time())-12000, int(time.time()))
43 |
44 |
45 |
46 | #########################################
47 | # #
48 | # The execution exits immediately #
49 | # after providing output data #
50 | # #
51 | #########################################
52 |
53 | recordDone = Record(output, 'Sending value of cnt: {}'.format(output))
54 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/logging_and_report/generic_pipe_0e7b8360.py:
--------------------------------------------------------------------------------
1 | import time, queue, logging, os
2 | from random import randrange
3 | try:
4 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
5 | except ImportError:
6 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
7 |
8 | class Element(Function):
9 |
10 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
11 | super().__init__(id, config, inputData, return_queue, cmd_queue)
12 |
13 |
14 | def execute(self):
15 |
16 | # Raspberry Pi only
17 | #cpu_temp = os.popen("vcgencmd measure_temp").readline().replace("temp=", "").replace("'C\n", "")
18 | #cpu_temp = float(cpu_temp)
19 |
20 | # Generate random temperature
21 | cpu_temp = randrange(450, 500)
22 | cpu_temp = float(cpu_temp/10)
23 |
24 | output = 'INSERT INTO my_table VALUES ({}, {})'.format(int(time.time()), cpu_temp)
25 |
26 | recordDone = Record(output)
27 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/logging_and_report/generic_pipe_13ad992a.py:
--------------------------------------------------------------------------------
1 | import time, queue, datetime
2 | from pathlib import Path
3 | from collections import deque
4 | from openpyxl import workbook
5 | from openpyxl import load_workbook
6 | try:
7 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
8 | except ImportError:
9 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
10 |
11 | class Element(Function):
12 |
13 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
14 | super().__init__(id, config, inputData, return_queue, cmd_queue)
15 |
16 |
17 | def execute(self):
18 |
19 |
20 | #####################################
21 | # #
22 | # REPORT GENERATOR #
23 | # #
24 | #####################################
25 |
26 | path = Path.home() / 'Pythonic' / 'executables' / 'report_template.xlsx'
27 |
28 | try:
29 | wb = load_workbook(path)
30 | except FileNotFoundError as e:
31 | recordDone = Record(PythonicError(e), 'Template not found')
32 | self.return_queue.put(recordDone)
33 | con.close()
34 | return
35 | except Exception as e:
36 | recordDone = Record(PythonicError(e), 'Open log for details')
37 | self.return_queue.put(recordDone)
38 | con.close()
39 | return
40 |
41 | # Workbook https://openpyxl.readthedocs.io/en/stable/api/openpyxl.workbook.workbook.html
42 | # Cell https://openpyxl.readthedocs.io/en/stable/api/openpyxl.cell.cell.html
43 |
44 | sheets = wb.sheetnames
45 | datasheet = wb['Data']
46 |
47 |
48 | # create an iterator over the rows in the datasheet
49 | rows = datasheet.iter_rows(min_row=2, max_row=999, min_col=0, max_col=2)
50 |
51 | # Convert unix time [s] back into a datetime object, returns an iterator
52 | reportdata_dt = map(lambda foo: (datetime.datetime.fromtimestamp(foo[0]), foo[1]), self.inputData)
53 |
54 |
55 |
56 | # iterate till the first iterator is exhausted
57 | for (dt, val), (row_dt, row_val) in zip(reportdata_dt, rows):
58 | row_dt.value = dt
59 | row_val.value = val
60 |
61 | # alternative approach (functional)
62 |
63 | # zip both iterators together
64 | # data_it = zip(reportdata_dt, rows)
65 | # def write_row(data):
66 | # (dt, val), (row_dt, row_val) = data
67 | # row_dt.value = dt
68 | # row_val.value = val
69 |
70 | # maker = map(write_row, data_it)
71 |
72 | # deque(maker, maxlen=0)
73 |
74 | reportDate = datetime.datetime.now().strftime('%d_%b_%Y_%H_%M_%S')
75 | filename = 'report_{}.xlsx'.format(reportDate)
76 | filepath = Path.home() / 'Pythonic' / 'log' / filename
77 | wb.save(filepath)
78 | wb.close()
79 |
80 | recordDone = Record(filepath, 'Report saved under: {}'.format(filename))
81 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/logging_and_report/generic_pipe_2f78d74c.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 | output = None
16 |
17 | # only create a output if a report request was received
18 | # if a PythonicError type is received do nothing
19 |
20 | if self.inputData == '5m':
21 | t0 = int(time.time()) # get current unix time
22 | t1 = t0 - (60 * 5) # calculate unix stamp time 5 minutes ago
23 |
24 | output = 'SELECT * FROM my_table WHERE timestamp BETWEEN {} AND {}'.format(t1, t0)
25 |
26 | recordDone = Record(output)
27 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/logging_and_report/generic_pipe_6ce104a4.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 | output = 'CREATE TABLE IF NOT EXISTS my_table (timestamp INTEGER PRIMARY KEY NOT NULL, value REAL)'
16 | recordDone = Record(output, 'Creating table')
17 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/logging_and_report/logging_and_report.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/examples/logging_and_report/logging_and_report.zip
--------------------------------------------------------------------------------
/examples/logging_and_report/report_template.xlsx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/examples/logging_and_report/report_template.xlsx
--------------------------------------------------------------------------------
/examples/logging_and_report/sqlite_196f9a6e.py:
--------------------------------------------------------------------------------
1 | import time, queue, sqlite3
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 | #####################################
16 | # #
17 | # REFERENCE IMPLEMENTATION #
18 | # #
19 | #####################################
20 |
21 | specificConfig = self.config.get('SpecificConfig')
22 |
23 | if not specificConfig:
24 |
25 | recordDone = Record(None, message='Config missing')
26 | self.return_queue.put(recordDone)
27 | return
28 |
29 | filename = None
30 | output = None
31 |
32 | for attrs in specificConfig:
33 | if attrs['Name'] == 'Filename':
34 | filename = attrs['Data']
35 |
36 | if self.inputData is None:
37 | recordDone = Record(None, message='No input provided')
38 | self.return_queue.put(recordDone)
39 | return
40 |
41 | con = sqlite3.connect(filename)
42 |
43 | if not con:
44 | raise Exception('Can not connect to database')
45 |
46 | cur = con.cursor()
47 |
48 | try:
49 | cur.execute(self.inputData)
50 | except Exception as e:
51 | recordDone = Record(PythonicError(e), 'Query failed')
52 | self.return_queue.put(recordDone)
53 | con.close()
54 | return
55 |
56 | output = cur.fetchall()
57 |
58 | con.commit()
59 | con.close()
60 | recordDone = Record(output, 'Query successful')
61 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/logging_and_report/sqlite_5617d487.py:
--------------------------------------------------------------------------------
1 | import time, queue, sqlite3
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 | #####################################
16 | # #
17 | # REFERENCE IMPLEMENTATION #
18 | # #
19 | #####################################
20 |
21 | specificConfig = self.config.get('SpecificConfig')
22 |
23 | if not specificConfig:
24 |
25 | recordDone = Record(None, message='Config missing')
26 | self.return_queue.put(recordDone)
27 | return
28 |
29 | filename = None
30 | output = None
31 |
32 | for attrs in specificConfig:
33 | if attrs['Name'] == 'Filename':
34 | filename = attrs['Data']
35 |
36 | if self.inputData is None:
37 | recordDone = Record(None, message='No input provided')
38 | self.return_queue.put(recordDone)
39 | return
40 |
41 | con = sqlite3.connect(filename)
42 |
43 | if not con:
44 | raise Exception('Can not connect to database')
45 |
46 | cur = con.cursor()
47 |
48 | try:
49 | cur.execute(self.inputData)
50 | except Exception as e:
51 | recordDone = Record(PythonicError(e), 'Query failed')
52 | self.return_queue.put(recordDone)
53 | con.close()
54 | return
55 |
56 | output = cur.fetchall()
57 |
58 | con.commit()
59 | con.close()
60 | recordDone = Record(output, 'Query successful')
61 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/rpi_telegram_remote_io/generic_pipe_0853b094.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 |
16 | #####################################
17 | # #
18 | # REFERENCE IMPLEMENTATION #
19 | # #
20 | #####################################
21 |
22 |
23 |
24 | output = "Hello"
25 |
26 |
27 |
28 | #########################################
29 | # #
30 | # The execution exits immediately #
31 | # after providing output data #
32 | # #
33 | #########################################
34 |
35 | recordDone = Record(output, 'Sending value of cnt: {}'.format(output))
36 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/rpi_telegram_remote_io/manual_stop_process_36577a3c.py:
--------------------------------------------------------------------------------
1 | import queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 |
16 | #####################################
17 | # #
18 | # REFERENCE IMPLEMENTATION #
19 | # #
20 | #####################################
21 |
22 | recordDone = Record(ProcCMD(None, bStop=True), 'Sending Stop command')
23 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/examples/trading_bot_crossing_ema/ccxt_6f9efe59.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | import ccxt
3 | try:
4 | from element_types import Record, Function, ProcCMD, GuiCMD
5 | except ImportError:
6 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
7 |
8 | class Element(Function):
9 |
10 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
11 | super().__init__(id, config, inputData, return_queue, cmd_queue)
12 |
13 |
14 | def execute(self):
15 |
16 |
17 | #####################################
18 | # #
19 | # REFERENCE IMPLEMENTATION #
20 | # #
21 | #####################################
22 |
23 |
24 | specificConfig = self.config.get('SpecificConfig')
25 |
26 | if not specificConfig:
27 |
28 | recordDone = Record(None, message='Trigger: {:04d}'.format(self.config['Identifier']))
29 | self.return_queue.put(recordDone)
30 | return
31 |
32 |
33 | eId = None
34 | pubKey = None
35 | prvKey = None
36 |
37 |
38 | for attrs in specificConfig:
39 | if attrs['Name'] == 'ExchangeId':
40 | eId = attrs['Data']
41 | if attrs['Name'] == 'PubKey':
42 | pubKey = attrs['Data']
43 | elif attrs['Name'] == 'PrvKey':
44 | prvKey = attrs['Data']
45 |
46 |
47 | exchangeClass = getattr(ccxt, eId)
48 | if pubKey and prvKey:
49 |
50 | exchange = exchangeClass( {
51 | 'apiKey' : pubKey,
52 | 'secret' : prvKey,
53 | 'enableRateLimit' : True
54 | })
55 |
56 | else:
57 | exchange = exchangeClass( {'enableRateLimit' : True})
58 |
59 | method = getattr(exchange, self.inputData['method'])
60 |
61 | kwargs = None
62 | params = None
63 |
64 | if not 'kwargs' in self.inputData:
65 |
66 | data = method()
67 |
68 | elif not 'params' in self.inputData:
69 |
70 | kwargs = self.inputData['kwargs']
71 | data = method(**kwargs)
72 |
73 | else:
74 |
75 | kwargs = self.inputData['kwargs']
76 | params = self.inputData['params']
77 |
78 | if params != '':
79 | data = method(**kwargs, params=params)
80 | else:
81 | data = method(**kwargs)
82 |
83 |
84 | recordDone = Record(data, '{}() successfull'.format(self.inputData['method']))
85 | self.return_queue.put(recordDone)
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/examples/trading_bot_crossing_ema/generic_pipe_3e059017.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | import pandas as pd
3 | from pathlib import Path
4 | try:
5 | from element_types import Record, Function, ProcCMD, GuiCMD
6 | except ImportError:
7 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
8 |
9 | class Element(Function):
10 |
11 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
12 | super().__init__(id, config, inputData, return_queue, cmd_queue)
13 |
14 |
15 | def execute(self):
16 | df_in = pd.DataFrame(self.inputData, columns=['close_time', 'open', 'high', 'low', 'close', 'volume'])
17 | df_in['close_time'] = df_in['close_time'].floordiv(1000) # remove milliseconds from timestamp
18 |
19 | file_path = Path.home() / 'Pythonic' / 'executables' / 'ADAUSD_5m.df'
20 |
21 | try:
22 | # load existing dataframe
23 | df = pd.read_pickle(file_path)
24 | # count existing rows
25 | n_row_cnt = df.shape[0]
26 | # concat latest OHLCV data
27 | df = pd.concat([df,df_in], ignore_index=True).drop_duplicates(['close_time'])
28 | df.reset_index(drop=True, inplace=True)
29 | # calculate number of new rows
30 | n_new_rows = df.shape[0] - n_row_cnt
31 | log_txt = '{}: {} new rows written'.format(file_path, n_new_rows)
32 |
33 | except Exception as e:
34 | log_txt = 'File error - writing new one'
35 | df = df_in
36 |
37 | df.to_pickle(file_path)
38 |
39 | logInfo = Record(None, log_txt)
40 | self.return_queue.put(logInfo)
--------------------------------------------------------------------------------
/examples/trading_bot_crossing_ema/jupyter/ADAUSD_5m.df:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/examples/trading_bot_crossing_ema/jupyter/ADAUSD_5m.df
--------------------------------------------------------------------------------
/examples/trading_bot_crossing_ema/trading_bot_crossing_ema.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/examples/trading_bot_crossing_ema/trading_bot_crossing_ema.zip
--------------------------------------------------------------------------------
/screenshots/oss-rising-star-black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/oss-rising-star-black.png
--------------------------------------------------------------------------------
/screenshots/python_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/python_logo.png
--------------------------------------------------------------------------------
/screenshots/pythonic_gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/pythonic_gui.png
--------------------------------------------------------------------------------
/screenshots/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/screenshot-1.png
--------------------------------------------------------------------------------
/screenshots/screenshot-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/screenshot-2.png
--------------------------------------------------------------------------------
/screenshots/screenshot-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/screenshot-3.png
--------------------------------------------------------------------------------
/screenshots/screenshot-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/screenshot-4.png
--------------------------------------------------------------------------------
/screenshots/screenshot-5.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/screenshot-5.PNG
--------------------------------------------------------------------------------
/screenshots/screenshot-6.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/screenshot-6.PNG
--------------------------------------------------------------------------------
/screenshots/screenshot-7.PNG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/screenshots/screenshot-7.PNG
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import setuptools
2 |
3 | with open('README.whl', 'r') as fh:
4 | long_description = fh.read()
5 |
6 |
7 | setuptools.setup(
8 | version = '1.09',
9 | author = 'Stephan Avenwedde',
10 | author_email = 's.avenwedde@gmail.com',
11 | license = 'GPLv3',
12 | description='Graphical automation tool',
13 | long_description=long_description,
14 | long_description_content_type='text/markdown',
15 | url='https://github.com/hANSIc99/Pythonic',
16 | packages = ['Pythonic', 'Pythonic.executables'],
17 | package_dir = { '' : 'src'},
18 | package_data = { '' :
19 | [
20 | 'public_html/static/ManualScheduler.png',
21 | 'public_html/static/Scheduler.png',
22 | 'public_html/static/ManualStopProcess.png',
23 | 'public_html/static/StopProcess.png',
24 | 'public_html/static/GenericPipe.png',
25 | 'public_html/static/GenericProcess.png',
26 | 'public_html/static/ProcessPipe.png',
27 | 'public_html/static/GPIO_Read.png',
28 | 'public_html/static/GPIO_Write.png',
29 | 'public_html/static/Telegram.png',
30 | 'public_html/static/CCXT.png',
31 | 'public_html/static/CCXT_Method.png',
32 | 'public_html/static/python.ico',
33 | 'public_html/static/qtlogo.svg',
34 | 'public_html/static/qtloader.js',
35 | 'public_html/static/*.js',
36 | 'public_html/static/*.wasm',
37 | 'public_html/static/*.data',
38 | 'public_html/templates/*.html',
39 | 'public_html/config/Toolbox/0Basic/*',
40 | 'public_html/config/Toolbox/1IO/*',
41 | 'public_html/config/Toolbox/2Connectivity/Telegram.editor',
42 | 'public_html/config/Toolbox/2Connectivity/0Telegram.json',
43 | 'public_html/config/Toolbox/3Trading/*'
44 | ]
45 | },
46 | entry_points = {
47 | 'console_scripts' : ['Pythonic = Pythonic.script:run']
48 | },
49 | python_requires = '>=3.7',
50 | classifiers = [
51 | 'Programming Language :: Python :: 3.7',
52 | 'Programming Language :: Python :: 3.8',
53 | 'Programming Language :: Python :: 3.9',
54 | 'Programming Language :: Python :: 3.10',
55 | 'Development Status :: 4 - Beta',
56 | 'Intended Audience :: Manufacturing',
57 | 'Intended Audience :: End Users/Desktop',
58 | 'Intended Audience :: Developers',
59 | 'Intended Audience :: Education',
60 | 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
61 | 'Operating System :: OS Independent',
62 | 'Environment :: Web Environment',
63 | 'Environment :: Console',
64 | 'Natural Language :: English',
65 | 'Topic :: Software Development'
66 | ],
67 | )
68 |
--------------------------------------------------------------------------------
/setup_rpi.cfg:
--------------------------------------------------------------------------------
1 | [metadata]
2 | name = PythonicRPI
3 |
4 | [options]
5 | install_requires =
6 | eventlet>=0.27.0
7 | debugpy==1.3.0
8 | python-telegram-bot==13.4.1
9 | ccxt>=1.37.59
10 | openpyxl>=3.0.9
11 | gpiozero>=1.6.2
--------------------------------------------------------------------------------
/setup_x86.cfg:
--------------------------------------------------------------------------------
1 | [metadata]
2 | name = Pythonic
3 |
4 | [options]
5 | install_requires =
6 | PySide2
7 | eventlet>=0.27.0
8 | debugpy==1.3.0
9 | python-telegram-bot==13.4.1
10 | openpyxl>=3.0.9
11 | ccxt>=1.37.59
--------------------------------------------------------------------------------
/setup_x86.py:
--------------------------------------------------------------------------------
1 | import setuptools
2 |
3 | with open('README.whl', 'r') as fh:
4 | long_description = fh.read()
5 |
6 |
7 | setuptools.setup(
8 | version = '1.11',
9 | author = 'Stephan Avenwedde',
10 | author_email = 's.avenwedde@gmail.com',
11 | license = 'GPLv3',
12 | description='Graphical automation tool',
13 | long_description=long_description,
14 | long_description_content_type='text/markdown',
15 | url='https://github.com/hANSIc99/Pythonic',
16 | packages = ['Pythonic', 'Pythonic.executables'],
17 | package_dir = { '' : 'src'},
18 | package_data = { '' :
19 | [
20 | 'public_html/static/ManualScheduler.png',
21 | 'public_html/static/Scheduler.png',
22 | 'public_html/static/ManualStopProcess.png',
23 | 'public_html/static/StopProcess.png',
24 | 'public_html/static/GenericPipe.png',
25 | 'public_html/static/GenericProcess.png',
26 | 'public_html/static/ProcessPipe.png',
27 | 'public_html/static/Telegram.png',
28 | 'public_html/static/Email.png',
29 | 'public_html/static/CCXT.png',
30 | 'public_html/static/CCXT_Method.png',
31 | 'public_html/static/SQLite.png',
32 | 'public_html/static/python.ico',
33 | 'public_html/static/qtlogo.svg',
34 | 'public_html/static/qtloader.js',
35 | 'public_html/static/*.js',
36 | 'public_html/static/*.wasm',
37 | 'public_html/static/*.data',
38 | 'public_html/templates/*.html',
39 | 'public_html/config/Toolbox/0Basic/*',
40 | 'public_html/config/Toolbox/1IO/2SQLite.json',
41 | 'public_html/config/Toolbox/1IO/SQLite.editor',
42 | 'public_html/config/Toolbox/2Connectivity/Telegram.editor',
43 | 'public_html/config/Toolbox/2Connectivity/0Telegram.json',
44 | 'public_html/config/Toolbox/2Connectivity/EMail.editor',
45 | 'public_html/config/Toolbox/2Connectivity/1EMail.json',
46 | 'public_html/config/Toolbox/3Trading/*'
47 | ]
48 | },
49 | entry_points = {
50 | 'console_scripts' : ['Pythonic = Pythonic.script:run']
51 | },
52 | python_requires = '>=3.7',
53 | classifiers = [
54 | 'Programming Language :: Python :: 3.7',
55 | 'Programming Language :: Python :: 3.8',
56 | 'Programming Language :: Python :: 3.9',
57 | 'Programming Language :: Python :: 3.10',
58 | 'Development Status :: 4 - Beta',
59 | 'Intended Audience :: Manufacturing',
60 | 'Intended Audience :: End Users/Desktop',
61 | 'Intended Audience :: Developers',
62 | 'Intended Audience :: Education',
63 | 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
64 | 'Operating System :: OS Independent',
65 | 'Environment :: Web Environment',
66 | 'Environment :: Console',
67 | 'Natural Language :: English',
68 | 'Topic :: Software Development'
69 | ],
70 | )
71 |
--------------------------------------------------------------------------------
/src/Pythonic/.gitignore:
--------------------------------------------------------------------------------
1 | # This file is used to ignore files which are generated
2 | # ----------------------------------------------------------------------------
3 |
4 | *~
5 | *.autosave
6 | *.a
7 | *.core
8 | *.moc
9 | *.o
10 | *.obj
11 | *.orig
12 | *.rej
13 | *.so
14 | *.so.*
15 | *_pch.h.cpp
16 | *_resource.rc
17 | *.qm
18 | .#*
19 | *.*#
20 | core
21 | !core/
22 | tags
23 | .DS_Store
24 | .directory
25 | *.debug
26 | Makefile*
27 | *.prl
28 | *.app
29 | moc_*.cpp
30 | ui_*.h
31 | qrc_*.cpp
32 | Thumbs.db
33 | *.res
34 | *.rc
35 | /.qmake.cache
36 | /.qmake.stash
37 |
38 | public_html/template/PythonicWeb.html
39 | public_html/static/qtlogo.svg
40 | public_html/static/qtloader.js
41 | public_html/static/PythonicWeb.js
42 | public_html/static/PythonicWeb.wasm
43 | public_html/config/current_config.json
44 |
45 | PythonicWeb.html
46 | PythonicWeb.js
47 | PythonicWeb.wasm
48 | qtlogo.svg
49 | qtloader.js
50 |
51 | # qtcreator generated files
52 | *.pro.user*
53 |
54 | # xemacs temporary files
55 | *.flc
56 |
57 | # Vim temporary files
58 | .*.swp
59 |
60 | # Visual Studio generated files
61 | *.ib_pdb_index
62 | *.idb
63 | *.ilk
64 | *.pdb
65 | *.sln
66 | *.suo
67 | *.vcproj
68 | *vcproj.*.*.user
69 | *.ncb
70 | *.sdf
71 | *.opensdf
72 | *.vcxproj
73 | *vcxproj.*
74 |
75 | # MinGW generated files
76 | *.Debug
77 | *.Release
78 |
79 | # Python byte code
80 | *.pyc
81 |
82 | # Binaries
83 | # --------
84 | *.dll
85 | *.exe
86 |
87 |
--------------------------------------------------------------------------------
/src/Pythonic/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Pythonic",
9 | "type": "python",
10 | "request": "launch",
11 | "program": "main.py",
12 | "console": "integratedTerminal",
13 | "justMyCode": false,
14 | "subProcess": false
15 | },
16 | {
17 | "name": "Pythonic Verbose",
18 | "type": "python",
19 | "request": "launch",
20 | "args": ["-v"],
21 | "program": "main.py",
22 | "console": "integratedTerminal",
23 | "justMyCode": false
24 | },
25 | {
26 | "name": "Debugpy",
27 | "type": "python",
28 | "request": "attach",
29 | "connect" : {
30 | "host" : "localhost",
31 | "port" : 5678
32 | }
33 | },
34 | {
35 | "name": "CCXT Testy",
36 | "type": "python",
37 | "request": "launch",
38 | "program": "ccxt_test.py"
39 | }
40 | ]
41 | }
--------------------------------------------------------------------------------
/src/Pythonic/PythonicWeb.pro:
--------------------------------------------------------------------------------
1 | QT += core gui websockets
2 |
3 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
4 |
5 |
6 | #TARGET="PythonicWeb_1.1"
7 | CONFIG += c++11
8 | CONFIG += wasm
9 |
10 | INCLUDEPATH += "/home/stephan/Dokumente/emsdk/upstream/emscripten/system/include"
11 |
12 | wasm {
13 | DEFINES += WASM
14 |
15 | QMAKE_LFLAGS += --preload-file public_html/static/upload_executable.png
16 | QMAKE_LFLAGS += --preload-file public_html/static/upload_config.png
17 | QMAKE_LFLAGS += --preload-file public_html/static/StopYellow.png
18 | QMAKE_LFLAGS += --preload-file public_html/static/stop_exec.png
19 | QMAKE_LFLAGS += --preload-file public_html/static/start_debug.png
20 | QMAKE_LFLAGS += --preload-file public_html/static/save.png
21 | QMAKE_LFLAGS += --preload-file public_html/static/del.png
22 | QMAKE_LFLAGS += --preload-file public_html/static/reconnect.png
23 | QMAKE_LFLAGS += --preload-file public_html/static/PlugSocketOrange.png
24 | QMAKE_LFLAGS += --preload-file public_html/static/PlugSocketGreen.png
25 | QMAKE_LFLAGS += --preload-file public_html/static/PlugSocket.png
26 | QMAKE_LFLAGS += --preload-file public_html/static/PlayYellow.png
27 | QMAKE_LFLAGS += --preload-file public_html/static/PlayGreen.png
28 | QMAKE_LFLAGS += --preload-file public_html/static/PlayDefault.png
29 | QMAKE_LFLAGS += --preload-file public_html/static/output.png
30 | QMAKE_LFLAGS += --preload-file public_html/static/new_file.png
31 | QMAKE_LFLAGS += --preload-file public_html/static/message.png
32 | QMAKE_LFLAGS += --preload-file public_html/static/kill.png
33 | QMAKE_LFLAGS += --preload-file public_html/static/horizontal.png
34 | QMAKE_LFLAGS += --preload-file public_html/static/wall_of_fame.png
35 | QMAKE_LFLAGS += --preload-file public_html/static/gpio.png
36 | }
37 | # You can make your code fail to compile if it uses deprecated APIs.
38 | # In order to do so, uncomment the following line.
39 | #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
40 |
41 | SOURCES += \
42 | baselabel.cpp \
43 | elementeditor.cpp \
44 | elementmaster.cpp \
45 | helper.cpp \
46 | mainwindow.cpp \
47 | messagearea.cpp \
48 | main.cpp \
49 | menubar.cpp \
50 | toolbox.cpp \
51 | toolmaster.cpp \
52 | wall_of_fame.cpp \
53 | workingarea.cpp
54 |
55 | HEADERS += \
56 | baselabel.h \
57 | elementeditor.h \
58 | elementmaster.h \
59 | filedownloader.h \
60 | helper.h \
61 | mainwindow.h \
62 | messagearea.h \
63 | menubar.h \
64 | toolbox.h \
65 | toolmaster.h \
66 | wall_of_fame.h \
67 | websocket.h \
68 | workingarea.h
69 |
70 | # Default rules for deployment.
71 | qnx: target.path = /tmp/$${TARGET}/bin
72 | else: unix:!android: target.path = /opt/$${TARGET}/bin
73 | !isEmpty(target.path): INSTALLS += target
74 |
--------------------------------------------------------------------------------
/src/Pythonic/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/__init__.py
--------------------------------------------------------------------------------
/src/Pythonic/baselabel.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Pythonic.
3 |
4 | * Pythonic is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 |
9 | * Pythonic is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | * along with Pythonic. If not, see
16 | */
17 |
18 | #include "baselabel.h"
19 |
20 | const QLoggingCategory BaseLabelDaemon::logC{"BaseLabelDaemon"};
21 | const QString BaseLabelDaemon::m_urlSuffix{"http://"};
22 |
23 | const QLoggingCategory BaseLabel::logC{"BaseLabel"};
24 | const QString BaseLabel::m_relPath{"public_html/static/"};
25 |
26 | const QLoggingCategory BaseButton::logC{"BaseButton"};
27 | const QString BaseButton::m_relPath{"public_html/static/"};
28 |
--------------------------------------------------------------------------------
/src/Pythonic/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cd "${0%/*}"
3 |
4 | source ~/emsdk/emsdk_env.sh # Version 1.39.8
5 | ~/Qt/5.15.1/wasm_32/bin/qmake
6 | # Set WASM define
7 | #make DEFINES="-DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DWASM"
8 | make clean
9 | make
10 |
11 | cp *.html public_html/static/
12 | cp *.wasm public_html/static/
13 | cp *.js public_html/static/
14 | cp *.data public_html/static/
15 | cp PythonicWeb.html public_html/templates/
16 |
--------------------------------------------------------------------------------
/src/Pythonic/ccxt_test.py:
--------------------------------------------------------------------------------
1 | import ccxt
2 |
3 | sId = 'binance'
4 |
5 | exchangeClass = getattr(ccxt, sId)
6 |
7 | # https://github.com/ccxt/ccxt/wiki/Manual#overview
8 | # Ein Element mit Schalter für Public/Private
9 | """
10 | exchange = exchangeClass({
11 | 'apiKey' : 'YPUR_API_KEY', # text
12 | 'secret' : 'SECRET_KEY', #text
13 | 'timeout' : 30000, # milliseconds unsigned int
14 | 'enableRateLimit' : True, # checkbox
15 | })
16 | """
17 | exchange = exchangeClass({'enableRateLimit' : True})
18 | exchange = ccxt.binance()
19 |
20 | #tickers = exchange.fetch_tickers() # keine argumente
21 | #if exchange.has['fetchOHLCV']: #https://github.com/ccxt/ccxt/wiki/Manual#ohlcv-candlestick-charts
22 | #def myfunc2(*args, **kwargs): hier mit arbeiten
23 |
24 |
25 | # Public API
26 |
27 | lmarkets = exchange.load_markets()
28 | fmarkets = exchange.fetch_markets()
29 | currencies = exchange.fetch_currencies()
30 | ticker = exchange.fetch_ticker('ETH/BTC')
31 | tickers = exchange.fetch_tickers('ETH/BTC XMR/BTC ADA/BNB')
32 | orderbook = exchange.fetch_order_book('ADA/BNB')
33 |
34 | ohlcv = exchange.fetch_ohlcv('ADA/BNB', timeframe='1m', limit=500)
35 | exchange.fetch_ohlcv()
36 | #since = UTC timestamp in milliseconds
37 |
38 | #status = exchange.fetch_status()
39 |
40 | #trades = exchange.fetch_trades('ADA/BNB')
41 |
42 |
43 | # Private API
44 |
45 | balance = = exchange.fetch_balance()
46 |
47 | order = exchange.create_order('ETH/BTC', 'Market/limit/stoploss/stoplosslimit/', 'buy/sell', 123.455, price)
48 |
49 | fetch_orders = exchange.fetch_orders('ETH/BTC')
50 |
51 | fetch_open_orders = exchange.fetch_open_orders('ETH/BTC')
52 |
53 | fetch_closed_orders = exchange.fetch_closed_orders('ETH/BTC')
54 |
55 | my_trades = exchange.fetch_my_trades('ETH/BTC')
56 |
57 | withdraw = exchange.withdraw('BTC', amount, adress)
58 | exchange.withdraw()
59 |
60 | print('end')
--------------------------------------------------------------------------------
/src/Pythonic/executables/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/executables/__init__.py
--------------------------------------------------------------------------------
/src/Pythonic/executables/ccxt.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | import ccxt
3 | try:
4 | from element_types import Record, Function, ProcCMD, GuiCMD
5 | except ImportError:
6 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
7 |
8 | class Element(Function):
9 |
10 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
11 | super().__init__(id, config, inputData, return_queue, cmd_queue)
12 |
13 |
14 | def execute(self):
15 |
16 |
17 | #####################################
18 | # #
19 | # REFERENCE IMPLEMENTATION #
20 | # #
21 | #####################################
22 |
23 |
24 | specificConfig = self.config.get('SpecificConfig')
25 |
26 | if not specificConfig:
27 |
28 | recordDone = Record(None, message='Trigger: {:04d}'.format(self.config['Identifier']))
29 | self.return_queue.put(recordDone)
30 | return
31 |
32 |
33 | eId = None
34 | pubKey = None
35 | prvKey = None
36 |
37 |
38 | for attrs in specificConfig:
39 | if attrs['Name'] == 'ExchangeId':
40 | eId = attrs['Data']
41 | if attrs['Name'] == 'PubKey':
42 | pubKey = attrs['Data']
43 | elif attrs['Name'] == 'PrvKey':
44 | prvKey = attrs['Data']
45 |
46 |
47 | exchangeClass = getattr(ccxt, eId)
48 | if pubKey and prvKey:
49 |
50 | exchange = exchangeClass( {
51 | 'apiKey' : pubKey,
52 | 'secret' : prvKey,
53 | 'enableRateLimit' : True
54 | })
55 |
56 | else:
57 | exchange = exchangeClass( {'enableRateLimit' : True})
58 |
59 | method = getattr(exchange, self.inputData['method'])
60 |
61 | kwargs = None
62 | params = None
63 |
64 | if not 'kwargs' in self.inputData:
65 |
66 | data = method()
67 |
68 | elif not 'params' in self.inputData:
69 |
70 | kwargs = self.inputData['kwargs']
71 | data = method(**kwargs)
72 |
73 | else:
74 |
75 | kwargs = self.inputData['kwargs']
76 | params = self.inputData['params']
77 |
78 | if params != '':
79 | data = method(**kwargs, params=params)
80 | else:
81 | data = method(**kwargs)
82 |
83 |
84 | recordDone = Record(data, '{}() successfull'.format(self.inputData['method']))
85 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/src/Pythonic/executables/generic_pipe.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 |
16 | #####################################
17 | # #
18 | # REFERENCE IMPLEMENTATION #
19 | # #
20 | #####################################
21 |
22 |
23 |
24 | if self.inputData is None:
25 | output = 0
26 | else:
27 | output = self.inputData + 1
28 |
29 |
30 |
31 | #########################################
32 | # #
33 | # The execution exits immediately #
34 | # after providing output data #
35 | # #
36 | #########################################
37 |
38 | recordDone = Record(output, 'Sending value of cnt: {}'.format(output))
39 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/src/Pythonic/executables/generic_process.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 |
16 | #####################################
17 | # #
18 | # REFERENCE IMPLEMENTATION #
19 | # #
20 | #####################################
21 |
22 |
23 | cmd = None
24 | cnt = 0
25 |
26 | #####################################
27 | # #
28 | # Start of the infinite loop #
29 | # #
30 | #####################################
31 |
32 | # The example executes an infinite loop till it's receives a stop command
33 | while(True):
34 |
35 | # Example code: Do something
36 | cnt+=1
37 |
38 | try:
39 | # Block for 1 second and wait for incoming commands
40 | cmd = self.cmd_queue.get(block=True, timeout=1)
41 | except queue.Empty:
42 | pass
43 |
44 | if isinstance(cmd, ProcCMD) and cmd.bStop:
45 | # Stop command received, exit
46 | return
47 |
48 |
49 |
50 | # Example Code: Send status text to GUI every timeout interval
51 | guitext = GuiCMD('cnt: {}'.format(cnt))
52 | self.return_queue.put(guitext)
53 |
54 |
55 | # Example code: Send data to element output every 5 x timeout
56 | if cnt % 5 == 0:
57 | # Recors(data, message)
58 | recordDone = Record(cnt, 'ID: 0x{:08x} - Sending value of cnt: {}'.format(self.id, cnt))
59 | self.return_queue.put(recordDone)
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/src/Pythonic/executables/gpio_read.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
6 |
7 | from gpiozero import Button
8 |
9 | class Element(Function):
10 |
11 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
12 | super().__init__(id, config, inputData, return_queue, cmd_queue)
13 |
14 |
15 | def execute(self):
16 |
17 | #####################################
18 | # #
19 | # REFERENCE IMPLEMENTATION #
20 | # #
21 | #####################################
22 |
23 | specificConfig = self.config.get('SpecificConfig')
24 |
25 | if not specificConfig:
26 | self.return_queue.put(Record(None, message='Trigger: {:04d}'.format(self.config['Identifier'])))
27 | return
28 |
29 | gpioName = None
30 | mainMode = None
31 | cmd = None
32 |
33 | self.gpio = None
34 | self.initFlag = False
35 |
36 | for attrs in specificConfig:
37 | if attrs['Name'] == 'GPIO':
38 | gpioName = attrs['Data']
39 | if attrs['Name'] == 'MainMode':
40 | mainMode = attrs['Data']
41 |
42 |
43 | self.gpio = Button(gpioName)
44 |
45 | if mainMode == 'Fire when released':
46 |
47 | self.gpio.when_released = self.onReleased
48 |
49 | elif mainMode == 'Fire when pressed':
50 |
51 | self.gpio.when_pressed = self.onPressed
52 |
53 |
54 |
55 | #####################################
56 | # #
57 | # Start of the infinite loop #
58 | # #
59 | #####################################
60 |
61 | while(True):
62 |
63 | # Example code: Do something
64 |
65 | try:
66 | # Block for 1 second and wait for incoming commands
67 | cmd = None
68 | cmd = self.cmd_queue.get(block=True, timeout=1)
69 | except queue.Empty:
70 | pass
71 |
72 | if isinstance(cmd, ProcCMD):
73 | if cmd.bStop:
74 | # Stop command received, exit
75 | self.return_queue.put(Record(None, 'GPIO{} closed'.format(self.gpio.pin.number)))
76 | self.gpio.close()
77 | return
78 |
79 |
80 | def onPressed(self):
81 |
82 | self.return_queue.put(Record(None, 'GPIO{} pressed'.format(self.gpio.pin.number)))
83 |
84 | def onReleased(self):
85 |
86 | self.return_queue.put(Record(None, 'GPIO{} released'.format(self.gpio.pin.number)))
--------------------------------------------------------------------------------
/src/Pythonic/executables/process_pipe.py:
--------------------------------------------------------------------------------
1 | import time, queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 |
16 | #####################################
17 | # #
18 | # REFERENCE IMPLEMENTATION #
19 | # #
20 | #####################################
21 |
22 |
23 | cmd = None
24 | cnt = 0
25 |
26 | #####################################
27 | # #
28 | # Start of the infinite loop #
29 | # #
30 | #####################################
31 |
32 | # The example executes an infinite loop till it's receives a stop command
33 | while(True):
34 |
35 | # Example code: Do something
36 |
37 | try:
38 | # Block for 1 second and wait for incoming commands
39 | cmd = self.cmd_queue.get(block=True, timeout=1)
40 | except queue.Empty:
41 | pass
42 |
43 | if isinstance(cmd, ProcCMD):
44 | if cmd.bStop:
45 | # Stop command received, exit
46 | return
47 | else:
48 | # Example Code: Send number of received data packets to GUI
49 | cnt+=1
50 | guitext = GuiCMD('Data received: {}'.format(cnt))
51 | self.return_queue.put(guitext)
52 | cmd.data += 1
53 |
54 | # Example Code: Increment received data by one and forward it to subsequent elements
55 | recordDone = Record(cmd.data, 'Sending value of cnt: {}'.format(cmd.data))
56 | self.return_queue.put(recordDone)
57 |
58 | cmd = None
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/src/Pythonic/executables/sqlite.py:
--------------------------------------------------------------------------------
1 | import time, queue, sqlite3
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD, PythonicError
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 | #####################################
16 | # #
17 | # REFERENCE IMPLEMENTATION #
18 | # #
19 | #####################################
20 |
21 | specificConfig = self.config.get('SpecificConfig')
22 |
23 | if not specificConfig:
24 |
25 | recordDone = Record(None, message='Config missing')
26 | self.return_queue.put(recordDone)
27 | return
28 |
29 | filename = None
30 | output = None
31 |
32 | for attrs in specificConfig:
33 | if attrs['Name'] == 'Filename':
34 | filename = attrs['Data']
35 |
36 | if self.inputData is None:
37 | recordDone = Record(None, message='No input provided')
38 | self.return_queue.put(recordDone)
39 | return
40 |
41 | con = sqlite3.connect(filename)
42 |
43 | if not con:
44 | raise Exception('Can not connect to database')
45 |
46 | cur = con.cursor()
47 |
48 | try:
49 | cur.execute(self.inputData)
50 | except Exception as e:
51 | recordDone = Record(PythonicError(e), 'Query failed')
52 | self.return_queue.put(recordDone)
53 | con.close()
54 | return
55 |
56 | output = cur.fetchall()
57 |
58 | con.commit()
59 | con.close()
60 | recordDone = Record(output, 'Query successful')
61 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/src/Pythonic/executables/stop_process.py:
--------------------------------------------------------------------------------
1 | import queue
2 | try:
3 | from element_types import Record, Function, ProcCMD, GuiCMD
4 | except ImportError:
5 | from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6 |
7 | class Element(Function):
8 |
9 | def __init__(self, id, config, inputData, return_queue, cmd_queue):
10 | super().__init__(id, config, inputData, return_queue, cmd_queue)
11 |
12 |
13 | def execute(self):
14 |
15 |
16 | #####################################
17 | # #
18 | # REFERENCE IMPLEMENTATION #
19 | # #
20 | #####################################
21 |
22 | recordDone = Record(ProcCMD(None, bStop=True), 'Sending Stop command')
23 | self.return_queue.put(recordDone)
--------------------------------------------------------------------------------
/src/Pythonic/filedownloader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Pythonic.
3 |
4 | * Pythonic is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 |
9 | * Pythonic is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | * along with Pythonic. If not, see
16 | */
17 |
18 | #ifndef FILEDOWNLOADER_H
19 | #define FILEDOWNLOADER_H
20 |
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 |
28 |
29 |
30 |
31 | class FileDownloader : public QObject
32 | {
33 | Q_OBJECT
34 | public:
35 | explicit FileDownloader(QObject *parent = 0)
36 | : QObject(parent)
37 | {
38 | connect(&m_WebCtrl, SIGNAL (finished(QNetworkReply*)),
39 | SLOT (fileDownloaded(QNetworkReply*)));
40 |
41 | m_WebCtrl.get(m_request);
42 | };
43 |
44 |
45 |
46 | QByteArray downloadedData() const{
47 | return m_DownloadedData;
48 | };
49 |
50 | void startRequest(QUrl imageUrl){
51 | QNetworkRequest request(imageUrl);
52 | m_WebCtrl.get(m_request);
53 | qCDebug(logC, "called - %s", imageUrl.toString().toStdString().c_str());
54 | }
55 |
56 | signals:
57 | void downloaded();
58 |
59 | private slots:
60 |
61 | void fileDownloaded(QNetworkReply* pReply){
62 | m_DownloadedData = pReply->readAll();
63 | //emit a signal
64 | pReply->deleteLater();
65 | emit downloaded();
66 | };
67 |
68 |
69 |
70 | private:
71 |
72 | QLoggingCategory logC{"FileDownloader"};
73 |
74 | QNetworkAccessManager m_WebCtrl;
75 | QNetworkRequest m_request;
76 | QByteArray m_DownloadedData;
77 |
78 | };
79 |
80 | #endif // FILEDOWNLOADER_H
81 |
--------------------------------------------------------------------------------
/src/Pythonic/logfile_hanlder.py:
--------------------------------------------------------------------------------
1 | import logging, datetime
2 | from pathlib import Path
3 | from PySide2.QtCore import QObject, QTimer, Signal
4 |
5 |
6 |
7 | class LogFileHandler(QObject):
8 |
9 | update_logdate = Signal(str) # command
10 |
11 | def __init__(self, log_lvl):
12 | super(LogFileHandler, self).__init__()
13 | logging.debug('LogFileHandler::__init__() called')
14 | self.log_lvl = log_lvl
15 | self.log_path = Path.home() / 'Pythonic' / 'log'
16 | self.log_date = datetime.datetime.now()
17 | self.formatter = logging.Formatter(fmt='%(asctime)s - %(levelname)s - %(message)s', datefmt='%H:%M:%S')
18 | self.logger = logging.getLogger()
19 |
20 | # Apply log_lvl
21 | self.logger.setLevel(self.log_lvl)
22 | self.logger.propagate = False
23 | # Remove default Stream Handler
24 | self.logger.removeHandler(self.logger.handlers[0])
25 |
26 | # Create directory structure for logging
27 | self.log_date_str = self.log_date.strftime('%Y_%m_%d')
28 |
29 | file_path = '{}/{}.txt'.format(str(self.log_path), self.log_date_str)
30 |
31 | # Setup logger
32 |
33 | file_handler = logging.FileHandler(file_path)
34 | file_handler.setLevel(self.log_lvl)
35 | file_handler.setFormatter(self.formatter)
36 |
37 | self.logger.addHandler(file_handler)
38 |
39 |
40 | self.timer = QTimer()
41 | self.timer.start(1000)
42 | self.timer.timeout.connect(self.checkLogDate)
43 |
44 | def checkLogDate(self):
45 |
46 | #print("CHECK")
47 |
48 | now = datetime.datetime.now().date()
49 |
50 | if (now != self.log_date.date()):
51 | logging.info('CheckTime::run() - Changing logfile')
52 | self.logger.removeHandler(self.logger.handlers[0])
53 | self.log_date_str = now.strftime('%Y_%m_%d')
54 | file_path = '{}/{}.txt'.format(str(self.log_path), self.log_date_str)
55 | file_handler = logging.FileHandler(file_path)
56 | file_handler.setLevel(self.log_lvl)
57 | file_handler.setFormatter(self.formatter)
58 | self.logger.addHandler(file_handler)
59 | self.log_date = datetime.datetime.now()
60 | self.update_logdate.emit(self.log_date_str)
61 |
--------------------------------------------------------------------------------
/src/Pythonic/main.py:
--------------------------------------------------------------------------------
1 | import eventlet, os, sys, json
2 | import debugpy
3 | from pathlib import Path
4 | from web_daemon import MainWorker
5 | from PySide2.QtCore import QCoreApplication, QTimer
6 |
7 | os.environ['PYTHONWARNINGS'] = 'ignore:semaphore_tracker:UserWarning'
8 |
9 |
10 |
11 | def run():
12 |
13 | # Create home path (if not already existing)
14 |
15 | home_path = Path.home() / 'Pythonic'
16 | home_path.mkdir(exist_ok=True)
17 |
18 | # Create log path (if not already existing)
19 |
20 | logPath = home_path / 'log'
21 | logPath.mkdir(exist_ok=True)
22 |
23 | # Create directory for executables (if not already existing)
24 |
25 | execPath = home_path / 'executables'
26 | execPath.mkdir(exist_ok=True)
27 |
28 | # Create directory for vs code configuration (if not already existing)
29 |
30 | vsCodepath = execPath / '.vscode'
31 | vsCodepath.mkdir(exist_ok=True)
32 |
33 | # Append executables folder to module search path
34 | sys.path.append(str(execPath))
35 |
36 |
37 | """
38 | Create launch.json with current PID in hte libraries installation path
39 | """
40 | libPath = os.path.dirname(__file__)
41 |
42 | Path(os.path.join(libPath, '.vscode/')).mkdir(exist_ok=True)
43 |
44 | launch = { "version": "0.2.0",
45 | "configurations": [
46 | {
47 | "name": "Pythonic: Attach",
48 | "type": "python",
49 | "request": "attach",
50 | "justMyCode": False,
51 | "connect" : {
52 | "host" : "localhost",
53 | "port" : 5678
54 | }
55 | }
56 | ]
57 | }
58 |
59 |
60 |
61 | """
62 | Create launch.json with current PID in the user executables path
63 | """
64 |
65 | with open(vsCodepath / 'launch.json', 'w') as file:
66 | json.dump(launch, file, indent=4)
67 |
68 |
69 |
70 |
71 | app = QCoreApplication(sys.argv)
72 | ex = MainWorker(app)
73 | ex.start(sys.argv)
74 |
75 | app.exec_()
76 |
77 | if __name__ == '__main__':
78 |
79 | run()
80 |
--------------------------------------------------------------------------------
/src/Pythonic/mainwindow_test.h:
--------------------------------------------------------------------------------
1 | #ifndef MAINWINDOW_H
2 | #define MAINWINDOW_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 |
11 |
12 | class MainWindow : public QMainWindow
13 | {
14 | Q_OBJECT
15 |
16 | public:
17 | explicit MainWindow(QWidget *parent = nullptr);
18 |
19 | private slots:
20 | void wsStartTimer();
21 | void openFileBrowser();
22 | void fileOpenComplete(const QString &fileName, const QByteArray &data);
23 | void wsSendMsg();
24 | void wsTimerError(QAbstractSocket::SocketError error);
25 | void wsOnTextMessageReceived(QString message);
26 |
27 | private:
28 |
29 | QPushButton *m_start_timer_btn;
30 | QPushButton *m_upload_file_btn;
31 | QPushButton *m_websocket_connect_button;
32 | QLabel *m_timer_messages_lbl;
33 | QLineEdit *m_input_message_edt;
34 | QWebSocket m_ws_timer;
35 | QWebSocket m_ws_msg;
36 | QWebSocket m_ws_uploadData;
37 |
38 | };
39 | #endif // MAINWINDOW_H
40 |
41 |
--------------------------------------------------------------------------------
/src/Pythonic/menubar.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Pythonic.
3 |
4 | * Pythonic is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 |
9 | * Pythonic is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | * along with Pythonic. If not, see
16 | */
17 |
18 | #include "menubar.h"
19 |
20 |
21 | Q_LOGGING_CATEGORY(log_menubar, "MenuBar")
22 |
23 | constexpr QSize MenuBar::m_btnSize;
24 | constexpr QSize MenuBar::m_logoSize;
25 |
26 | MenuBar::MenuBar(QWidget *parent) : QWidget(parent)
27 | {
28 |
29 | /* Setup Self Layout */
30 | setLayout(&m_iconBarLayout);
31 | m_iconBarLayout.addWidget(&m_reconnectBtn);
32 | m_iconBarLayout.addWidget(&m_uploadConfig);
33 | m_iconBarLayout.addWidget(&m_uploadExecutable);
34 | m_iconBarLayout.addWidget(&m_saveBtn);
35 | m_iconBarLayout.addWidget(&m_startAllBtn);
36 | m_iconBarLayout.addWidget(&m_stopExecBtn);
37 | m_iconBarLayout.addWidget(&m_killProcBtn);
38 | m_iconBarLayout.addWidget(&m_logWindowBtn);
39 | m_iconBarLayout.addWidget(&m_outputBtn);
40 | m_iconBarLayout.addWidget(&m_wallOfFameBtn);
41 |
42 | m_iconBarLayout.addStretch(1);
43 | m_iconBarLayout.addWidget(&m_logoHorizontal);
44 |
45 | qCDebug(log_menubar, "called");
46 | }
47 |
--------------------------------------------------------------------------------
/src/Pythonic/messagearea.h:
--------------------------------------------------------------------------------
1 | #ifndef MESSAGEAREA_H
2 | #define MESSAGEAREA_H
3 |
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 | #include
14 |
15 |
16 |
17 |
18 | class OutputWidget : public QFrame
19 | {
20 | Q_OBJECT
21 | public:
22 | explicit OutputWidget(
23 | const QString &objectName,
24 | const quint32 id,
25 | const QString ×tamp,
26 | const QString &output,
27 | QWidget *parent = nullptr);
28 |
29 |
30 |
31 | private:
32 |
33 | static bool m_styleOption;
34 |
35 | QVBoxLayout m_masterLayout;
36 |
37 | //! Object name and Id
38 | QWidget m_topArea;
39 | QHBoxLayout m_topAreaLAyout;
40 |
41 | QLabel m_objectName;
42 | QLabel m_id;
43 | QLabel m_timestamp;
44 |
45 | QTextEdit m_output;
46 | };
47 |
48 | class MessageWidget : public QFrame
49 | {
50 | Q_OBJECT
51 | public:
52 | explicit MessageWidget( const QString &objName,
53 | const quint32 id,
54 | const QString ×tamp,
55 | const QString &msg,
56 | QWidget *parent = nullptr);
57 |
58 | private:
59 |
60 | static bool m_styleOption;
61 |
62 | //! Object name and Id
63 | QWidget m_topArea;
64 | QHBoxLayout m_topAreaLAyout;
65 |
66 | QVBoxLayout m_layout;
67 |
68 |
69 | QLabel m_timestamp;
70 | QLabel m_id;
71 | QLabel m_objectName;
72 | QLabel m_message;
73 | };
74 |
75 |
76 |
77 |
78 | class MessageArea : public QWidget
79 | {
80 | Q_OBJECT
81 | public:
82 | explicit MessageArea( const QString &title,
83 | const int maxItems,
84 | QWidget *parent = nullptr);
85 |
86 | private slots:
87 |
88 | void clearList();
89 |
90 | public slots:
91 |
92 | void addWidget(QWidget *widget);
93 |
94 | private:
95 |
96 | //! Maximum number of list items
97 | const int m_maxItems;
98 |
99 | //! Enables scrolling
100 | QScrollArea m_scrollArea;
101 | //! contains m_scrollArea
102 | QVBoxLayout m_masterLayout;
103 |
104 | //! Clear button
105 | QPushButton m_clearButton;
106 |
107 | QLabel m_title;
108 | //! This widgets picks up the elements
109 | QWidget m_mainWidget;
110 | //! Layout of #m_mainWidget
111 | QVBoxLayout m_layout;
112 |
113 | QLoggingCategory logC{"MessageArea"};
114 |
115 | };
116 |
117 | #endif // MESSAGEAREA_H
118 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/0ManualScheduler.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : false,
3 | "Plug" : true,
4 | "Typename" : "ManualScheduler",
5 | "Iconname" : "ManualScheduler",
6 | "Filename" : "manual_scheduler_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 3
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/manual_scheduler.py ~/Pythonic/executables/manual_scheduler_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/manual_scheduler_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\manual_scheduler.py %HOMEPATH%\\Pythonic\\executables\\manual_scheduler_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\manual_scheduler_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 | }
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/1Scheduler.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "Scheduler",
5 | "Iconname" : "Scheduler",
6 | "Filename" : "scheduler_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 0,
13 | "Minor" : 1
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/scheduler.py ~/Pythonic/executables/scheduler_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/scheduler_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\scheduler.py %HOMEPATH%\\Pythonic\\executables\\scheduler_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\scheduler_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 | }
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/2ManualStopProcess.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : false,
3 | "Plug" : true,
4 | "Typename" : "ManualStopProcess",
5 | "Iconname" : "ManualStopProcess",
6 | "Filename" : "manual_stop_process_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 3
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/stop_process.py ~/Pythonic/executables/manual_stop_process_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/manual_stop_process_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\stop_process.py %HOMEPATH%\\Pythonic\\executables\\manual_stop_process_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\manual_stop_process_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : false
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/3StopProcess.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "StopProcess",
5 | "Iconname" : "StopProcess",
6 | "Filename" : "stop_process_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 3
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/stop_process.py ~/Pythonic/executables/stop_process_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/stop_process_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\stop_process.py %HOMEPATH%\\Pythonic\\executables\\stop_process_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\stop_process_BASICDATA_Id.py",
21 | "HighlightState" : false,
22 | "AllowStream" : false
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/4GenericPipe.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "GenericPipe",
5 | "Iconname" : "GenericPipe",
6 | "Filename" : "generic_pipe_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 2
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/generic_pipe.py ~/Pythonic/executables/generic_pipe_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/generic_pipe_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\generic_pipe.py %HOMEPATH%\\Pythonic\\executables\\generic_pipe_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\generic_pipe_BASICDATA_Id.py",
21 | "HighlightState" : false,
22 | "AllowStream" : false
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/5GenericProcess.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "GenericProcess",
5 | "Iconname" : "GenericProcess",
6 | "Filename" : "generic_process_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 2
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/generic_process.py ~/Pythonic/executables/generic_process_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/generic_process_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\generic_process.py %HOMEPATH%\\Pythonic\\executables\\generic_process_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\generic_process_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : false
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/6ProcessPipe.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "ProcessPipe",
5 | "Iconname" : "ProcessPipe",
6 | "Filename" : "process_pipe_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 2
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/process_pipe.py ~/Pythonic/executables/process_pipe_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/process_pipe_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\process_pipe.py %HOMEPATH%\\Pythonic\\executables\\process_pipe_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\process_pipe_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/GenericPipe.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "Text",
4 | "Name" : "EditorLink",
5 | "Text" : "Click on
http://127.0.0.1:7000/generic_pipe_BASICDATA_Id.py
to download the file.
Docker
To edit the file, open the editor http://127.0.0.1:8000
Pip
Navigate to ~/Pythonic/executables/generic_pipe_BASICDATA_Id.py"
6 | }
7 | ]
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/GenericProcess.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "Text",
4 | "Name" : "EditorLink",
5 | "Text" : "Click on
http://127.0.0.1:7000/generic_process_BASICDATA_Id.py
to download the file.
Docker
To edit the file, open the editor http://127.0.0.1:8000
Pip
Navigate to ~/Pythonic/executables/generic_process_BASICDATA_Id.py"
6 | }
7 | ]
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/ManualStopProcess.editor:
--------------------------------------------------------------------------------
1 | [
2 | ]
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/0Basic/ProcessPipe.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "Text",
4 | "Name" : "EditorLink",
5 | "Text" : "Click on
http://127.0.0.1:7000/process_pipe_BASICDATA_Id.py
to download the file.
Docker
To edit the file, open the editor http://127.0.0.1:8000
Pip
Navigate to ~/Pythonic/executables/process_pipe_BASICDATA_Id.py"
6 | }
7 | ]
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/1IO/0GPIO_Read.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : false,
3 | "Plug" : true,
4 | "Typename" : "GPIO_Read",
5 | "Iconname" : "GPIO_Read",
6 | "Filename" : "gpio_read_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 6
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/gpio_read.py ~/Pythonic/executables/gpio_read_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/gpio_read_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\gpio_read.py %HOMEPATH%\\Pythonic\\executables\\gpio_read_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\gpio_read_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/1IO/1GPIO_Write.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : false,
4 | "Typename" : "GPIO_Write",
5 | "Iconname" : "GPIO_Write",
6 | "Filename" : "gpio_write_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 6
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/gpio_write.py ~/Pythonic/executables/gpio_write_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/gpio_write_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\gpio_write.py %HOMEPATH%\\Pythonic\\executables\\gpio_write_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\gpio_write_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/1IO/2SQLite.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "SQLite",
5 | "Iconname" : "SQLite",
6 | "Filename" : "sqlite_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 10
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/sqlite.py ~/Pythonic/executables/sqlite_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/sqlite_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\sqlite.py %HOMEPATH%\\Pythonic\\executables\\sqlite_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\sqlite_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/1IO/GPIO_Read.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "LineEdit",
4 | "Name" : "GPIO",
5 | "Title" : "Choose GPIO by name",
6 | "Defaulttext" : "GPIO4"
7 | },
8 | {
9 | "Type" : "ComboBox",
10 | "Name" : "MainMode",
11 | "Title" : "Choose GPIO mode",
12 | "Items" : [ "Fire when released",
13 | "Fire when pressed"
14 | ]
15 | },
16 | {
17 | "Type" : "HelpImage",
18 | "Name" : "RPB4IO",
19 | "Filename" : "gpio.png"
20 | }
21 | ]
22 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/1IO/GPIO_Write.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "LineEdit",
4 | "Name" : "GPIO",
5 | "Title" : "Choose GPIO by name",
6 | "Defaulttext" : "GPIO4"
7 | },
8 | {
9 | "Type" : "ComboBox",
10 | "Name" : "MainMode",
11 | "Title" : "Choose GPIO mode",
12 | "Items" : [ "LED",
13 | "PWMLED"
14 | ]
15 | },
16 | {
17 | "Type" : "ComboBox",
18 | "Name" : "SubModeLED",
19 | "Title" : "Choose LED mode",
20 | "Items" : [
21 | "Toggle on input",
22 | "Control on Input",
23 | "Blink"
24 | ],
25 | "Dependency" : [
26 | {
27 | "Dependence" : "MainMode",
28 | "DependentValue" : [
29 | "LED"
30 | ]
31 | }
32 | ]
33 | },
34 | {
35 | "Type" : "ComboBox",
36 | "Name" : "SubModePWMLED",
37 | "Title" : "Choose PWMLED mode",
38 | "Items" : [
39 | "Control on Input",
40 | "Pulse"
41 | ],
42 | "Dependency" : [
43 | {
44 | "Dependence" : "MainMode",
45 | "DependentValue" : [
46 | "PWMLED"
47 | ]
48 | }
49 | ]
50 | },
51 | {
52 | "Type" : "Text",
53 | "Name" : "PWMHelptext",
54 | "Text" : "1.0 = Max brightness, 0.0 = Min. brightness",
55 | "Dependency" : [
56 | {
57 | "Dependence" : "MainMode",
58 | "DependentValue" : [
59 | "PWMLED"
60 | ]
61 | },
62 | {
63 | "Dependence" : "SubModePWMLED",
64 | "DependentValue" : [
65 | "Control on Input"
66 | ]
67 | }
68 | ]
69 | },
70 | {
71 | "Type" : "HelpImage",
72 | "Name" : "RPB4IO",
73 | "Filename" : "gpio.png"
74 | }
75 | ]
76 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/1IO/SQLite.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "LineEdit2",
4 | "Name" : "Filename",
5 | "Title" : "Filename:",
6 | "Defaulttext" : "my_db.bin"
7 | },
8 | {
9 | "Type" : "Text",
10 | "Name" : "SQLTex",
11 | "Text" : "Input a SQL query string, e.g.:
INSERT INTO MY_TABLE VALUES (value1,value2)"
12 | }
13 | ]
14 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/2Connectivity/0Telegram.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "Telegram",
5 | "Iconname" : "Telegram",
6 | "Filename" : "telegram_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 1,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 3
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/telegram.py ~/Pythonic/executables/telegram_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/telegram_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\telegram.py %HOMEPATH%\\Pythonic\\executables\\telegram_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\telegram_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/2Connectivity/1EMail.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : false,
4 | "Typename" : "EMail",
5 | "Iconname" : "Email",
6 | "Filename" : "email_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 0,
13 | "Minor" : 1
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/email.py ~/Pythonic/executables/email_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/email_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\email.py %HOMEPATH%\\Pythonic\\executables\\email_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\email_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : false
23 | }
24 |
25 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/2Connectivity/EMail.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "LineEdit2",
4 | "Name" : "Sender",
5 | "Title" : "Sender address:",
6 | "Defaulttext" : "user@example.com",
7 | "RegExp" : "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])"
8 | },
9 | {
10 | "Type" : "PwEdit2",
11 | "Name" : "Password",
12 | "Title" : "Password"
13 | },
14 | {
15 | "Type" : "LineEdit2",
16 | "Name" : "URL",
17 | "Title" : "Server URL",
18 | "Defaulttext" : "smtp.gmail.com",
19 | "RegExp" : "^\\w+\\.\\w+\\.[a-zA-z]{1,3}$"
20 | },
21 | {
22 | "Type" : "LineEdit",
23 | "Name" : "Port",
24 | "Title" : "Port",
25 | "Defaulttext" : "465",
26 | "RegExp" : "([1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9])"
27 | },
28 | {
29 | "Type" : "HelpText",
30 | "Name" : "HelpText1",
31 | "Text" : "The E-Mail element expects an dictionary in the following format:
{
'recipient' : 'userA@xyz.com, userB@xyz.com'
'subject' : 'Hello',
'message' : 'world',
'attachment' : [
{'filename' : 'file_A.txt', data : data_A},
{'filename' : 'file_B.bin', data : data_B}
]
}
The key attachment can be omitted of no attachment is to be send.
Separate several recipients by comma."
32 | }
33 | ]
34 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/2Connectivity/Telegram.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "LineEdit",
4 | "Name" : "Token",
5 | "Title" : "Token",
6 | "Defaulttext" : "",
7 | "RegExp" : "[0-9]{9}:[a-zA-Z0-9_-]{35}"
8 | },
9 | {
10 | "Type" : "Text",
11 | "Name" : "Helptext",
12 | "Text" : "Documentation can be found here"
13 | }
14 | ]
15 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/3Trading/0CCXT.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "CCXT",
5 | "Iconname" : "CCXT",
6 | "Filename" : "ccxt_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 5
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/ccxt.py ~/Pythonic/executables/ccxt_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/ccxt_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\ccxt.py %HOMEPATH%\\Pythonic\\executables\\ccxt_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\ccxt_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/3Trading/1CCXT_Method.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : true,
3 | "Plug" : true,
4 | "Typename" : "CCXT_Method",
5 | "Iconname" : "CCXT_Method",
6 | "Filename" : "ccxt_method_BASICDATA_Id",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 1,
13 | "Minor" : 5
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3",
17 | "ConstructorCMD_Unix" : "cp -u executables/ccxt_method.py ~/Pythonic/executables/ccxt_method_BASICDATA_Id.py",
18 | "DestructorCMD_Unix" : "rm ~/Pythonic/executables/ccxt_method_BASICDATA_Id.py",
19 | "ConstructorCMD_Win32" : "copy executables\\ccxt_method.py %HOMEPATH%\\Pythonic\\executables\\ccxt_method_BASICDATA_Id.py",
20 | "DestructorCMD_Win32" : "del %HOMEPATH%\\Pythonic\\executables\\ccxt_method_BASICDATA_Id.py",
21 | "HighlightState" : true,
22 | "AllowStream" : true
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/3Trading/CCXT.editor:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "Type" : "LineEdit",
4 | "Name" : "ExchangeId",
5 | "Title" : "ExchangeId",
6 | "Defaulttext" : "kraken"
7 | },
8 | {
9 | "Type" : "LineEdit2",
10 | "Name" : "PubKey",
11 | "Title" : "Public Key",
12 | "Defaulttext" : ""
13 | },
14 | {
15 | "Type" : "LineEdit2",
16 | "Name" : "PrvKey",
17 | "Title" : "Private Key",
18 | "Defaulttext" : ""
19 | },
20 | {
21 | "Type" : "Text",
22 | "Name" : "Helptext",
23 | "Text" : "Public- and private key are optional. Without them
only public API methods are available."
24 | }
25 | ]
26 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/config/Toolbox/ToolboxTemplate.json:
--------------------------------------------------------------------------------
1 | {
2 | "Socket" : false,
3 | "Plug" : true,
4 | "Typename" : "MyType",
5 | "Iconname" : "my_type",
6 | "Filename" : "scheduler",
7 | "Version" : {
8 | "Major" : 0,
9 | "Minor" : 1
10 | },
11 | "PythonicVersion" : {
12 | "Major" : 0,
13 | "Minor" : 1
14 | },
15 | "Author" : "Stephan Avenwedde",
16 | "License" : "GPLv3"
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/BaseElement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/BaseElement.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/CCXT.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/CCXT.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/CCXT_Method.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/CCXT_Method.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/Email.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/Email.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/GPIO_Read.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/GPIO_Read.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/GPIO_Write.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/GPIO_Write.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/GenericPipe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/GenericPipe.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/GenericProcess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/GenericProcess.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/ManualScheduler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/ManualScheduler.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/ManualStopProcess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/ManualStopProcess.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/PlayDefault.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/PlayDefault.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/PlayGreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/PlayGreen.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/PlayYellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/PlayYellow.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/PlugSocket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/PlugSocket.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/PlugSocketGreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/PlugSocketGreen.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/PlugSocketOrange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/PlugSocketOrange.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/ProcessPipe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/ProcessPipe.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/PythonicWeb.data:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/PythonicWeb.data
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/SQLite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/SQLite.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/Scheduler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/Scheduler.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/StopProcess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/StopProcess.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/StopYellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/StopYellow.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/Telegram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/Telegram.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/del.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/gpio.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/gpio.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/horizontal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/horizontal.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/kill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/kill.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/message.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/new_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/new_file.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/output.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/python.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/python.ico
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/reconnect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/reconnect.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/save.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/start_debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/start_debug.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/stop_exec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/stop_exec.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/upload_config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/upload_config.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/upload_executable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/upload_executable.png
--------------------------------------------------------------------------------
/src/Pythonic/public_html/static/wall_of_fame.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/Pythonic/public_html/static/wall_of_fame.png
--------------------------------------------------------------------------------
/src/Pythonic/pythonicweb.js_plugin_import.cpp:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by qmake. It imports static plugin classes for
2 | // static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS. variables.
3 | #include
4 | Q_IMPORT_PLUGIN(QWasmIntegrationPlugin)
5 | Q_IMPORT_PLUGIN(QGifPlugin)
6 | Q_IMPORT_PLUGIN(QICNSPlugin)
7 | Q_IMPORT_PLUGIN(QICOPlugin)
8 | Q_IMPORT_PLUGIN(QJpegPlugin)
9 | Q_IMPORT_PLUGIN(QTgaPlugin)
10 | Q_IMPORT_PLUGIN(QTiffPlugin)
11 | Q_IMPORT_PLUGIN(QWbmpPlugin)
12 | Q_IMPORT_PLUGIN(QWebpPlugin)
13 |
--------------------------------------------------------------------------------
/src/Pythonic/pythonicwebdev.js_plugin_import.cpp:
--------------------------------------------------------------------------------
1 | // This file is autogenerated by qmake. It imports static plugin classes for
2 | // static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS. variables.
3 | #include
4 | Q_IMPORT_PLUGIN(QWasmIntegrationPlugin)
5 | Q_IMPORT_PLUGIN(QGifPlugin)
6 | Q_IMPORT_PLUGIN(QICNSPlugin)
7 | Q_IMPORT_PLUGIN(QICOPlugin)
8 | Q_IMPORT_PLUGIN(QJpegPlugin)
9 | Q_IMPORT_PLUGIN(QTgaPlugin)
10 | Q_IMPORT_PLUGIN(QTiffPlugin)
11 | Q_IMPORT_PLUGIN(QWbmpPlugin)
12 | Q_IMPORT_PLUGIN(QWebpPlugin)
13 |
--------------------------------------------------------------------------------
/src/Pythonic/requirements.txt:
--------------------------------------------------------------------------------
1 | sudo dnf install nodejs
2 |
3 | sudo dnf install yarnpkg
4 |
5 | https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_atomic_host/7/html/managing_containers/finding_running_and_building_containers_with_podman_skopeo_and_buildah
6 |
7 | podman pull fedora:33
8 |
9 | podman image rm
10 |
11 | podman ps: show running containers
12 | podman run -dt : run container
13 |
14 | podman exec -it CONTAINER_ID /bin/bash
15 |
16 | podman build -t=pythonic .
17 |
18 | host:container
19 | podman run -dt -p 8081:8080/tcp pythonic
20 |
21 |
22 | http://127.0.0.1:8081/?file=/root/.bashrc
23 |
24 |
--------------------------------------------------------------------------------
/src/Pythonic/screen.py:
--------------------------------------------------------------------------------
1 | import os
2 |
3 |
4 | def reset_screen():
5 |
6 | welcome_msg = ' ____ _ _ _ ____ \n'\
7 | '| _ \ _ _| |_| |__ ___ _ __ (_) ___| _ \ __ _ ___ _ __ ___ ___ _ __ \n'\
8 | '| |_) | | | | __| \'_ \ / _ \| \'_ \| |/ __| | | |/ _` |/ _ \ \'_ ` _ \ / _ \| \'_ \ \n'\
9 | '| __/| |_| | |_| | | | (_) | | | | | (__| |_| | (_| | __/ | | | | | (_) | | | |\n'\
10 | '|_| \__, |\__|_| |_|\___/|_| |_|_|\___|____/ \__,_|\___|_| |_| |_|\___/|_| |_|\n'\
11 | ' |___/ \n'
12 |
13 | version = 'v1.11\n'
14 | gitHub = 'Visit https://github.com/hANSIc99/Pythonic\n'
15 | log_info_msg = '<<<<<<<<<<<< Logging directory ~/Pythonic/log/\n'
16 |
17 |
18 |
19 | print('\n')
20 | print(welcome_msg)
21 | print(version)
22 | print(gitHub)
23 | print(log_info_msg)
24 | #print('working directory: {}'.format(os.getcwd()))
25 |
26 |
27 | def reset_screen_dbg():
28 |
29 | input_info_msg = '>>>>>>>>>>>> Enter \'q\' to stop execution'
30 | status_info_msg = '>>>>>>>>>>>> Hold \'p\' to list all background processes handles'
31 | applog_info_msg = '>>>>>>>>>>>> Enter \'l\' to show log messages\n'
32 |
33 | print(input_info_msg)
34 | print(status_info_msg)
35 | print(applog_info_msg)
--------------------------------------------------------------------------------
/src/Pythonic/script.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 |
3 | import os, sys, json
4 | import debugpy
5 | from pathlib import Path
6 | from Pythonic.web_daemon import MainWorker
7 | from PySide2.QtCore import QCoreApplication, QTimer
8 |
9 |
10 | debugpy.configure({"subProcess": True})
11 | debugpy.listen(5678)
12 |
13 |
14 | def run():
15 |
16 |
17 | # Create home path (if not already existing)
18 |
19 | home_path = Path.home() / 'Pythonic'
20 | home_path.mkdir(exist_ok=True)
21 |
22 | # Create log path (if not already existing)
23 |
24 | logPath = home_path / 'log'
25 | logPath.mkdir(exist_ok=True)
26 |
27 | # Create directory for executables (if not already existing)
28 |
29 | execPath = home_path / 'executables'
30 | execPath.mkdir(exist_ok=True)
31 |
32 | # Create directory for vs code configuration (if not already existing)
33 |
34 | vsCodepath = execPath / '.vscode'
35 | vsCodepath.mkdir(exist_ok=True)
36 |
37 | # Append executables folder to module search path
38 | sys.path.append(str(execPath))
39 |
40 |
41 | """
42 | Create launch.json with current PID in hte libraries installation path
43 | """
44 | libPath = os.path.dirname(__file__)
45 |
46 | Path(os.path.join(libPath, '.vscode/')).mkdir(exist_ok=True)
47 |
48 | launch = { "version": "0.2.0",
49 | "configurations": [
50 | {
51 | "name": "Pythonic: Attach",
52 | "type": "python",
53 | "request": "attach",
54 | "justMyCode": False,
55 | "connect" : {
56 | "host" : "localhost",
57 | "port" : 5678
58 | }
59 | }
60 | ]
61 | }
62 |
63 | with open(os.path.join(libPath + '/.vscode/launch.json'), 'w') as file:
64 | json.dump(launch, file, indent=4)
65 |
66 |
67 |
68 | """
69 | Create launch.json with current PID in the user executables path
70 | """
71 |
72 | with open(vsCodepath / 'launch.json', 'w') as file:
73 | json.dump(launch, file, indent=4)
74 |
75 |
76 |
77 | app = QCoreApplication(sys.argv)
78 |
79 | ex = MainWorker(app)
80 | ex.start(sys.argv)
81 |
82 | app.exec_()
83 |
84 | if __name__ == '__main__':
85 |
86 | run()
--------------------------------------------------------------------------------
/src/Pythonic/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | python3.7 -m debugpy --listen localhost:5678 main.py -v
4 |
--------------------------------------------------------------------------------
/src/Pythonic/toolbox.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Pythonic.
3 |
4 | * Pythonic is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 |
9 | * Pythonic is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | * along with Pythonic. If not, see
16 | */
17 |
18 | #ifndef TOOLBOX_H
19 | #define TOOLBOX_H
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | #include "workingarea.h"
26 | #include "toolmaster.h"
27 | // typeName outputs
28 | #define OPERATION_DATA ToolData {"Scheduler", 1}
29 | #define SCHEDULER_TOOLDATA ToolData {"Scheduler", 1}
30 |
31 | #define ASSIGNMENT_FONTSIZE 14
32 |
33 | /* Forward declarations to prevent
34 | * circular includes */
35 | class WorkingArea;
36 |
37 |
38 |
39 |
40 |
41 | class Toolbox : public QWidget
42 | {
43 | Q_OBJECT
44 | public:
45 | explicit Toolbox(QWidget *parent = nullptr);
46 |
47 | //RegElement m_mappedTypes;
48 |
49 | void addAssignment(QString title);
50 |
51 | void addTool(ToolMaster3 *tool);
52 |
53 | void addStretch();
54 |
55 | void clearToolbox();
56 |
57 | public slots:
58 |
59 | void setCurrentWorkingArea(WorkingArea* workingAreaWidget){
60 | qCInfo(logC, "called");
61 | m_workingAreaWidget = workingAreaWidget;
62 | emit updateCurrentWorkingArea(workingAreaWidget);
63 | };
64 |
65 |
66 | signals:
67 | void updateCurrentWorkingArea(WorkingArea* currentWokringArea);
68 |
69 | private:
70 |
71 | QLoggingCategory logC{"Toolbox"};
72 |
73 | //! Enables scrolling
74 | QScrollArea m_scrollArea;
75 | //! contains m_scrollArea
76 | QVBoxLayout m_masterLayout;
77 |
78 |
79 |
80 | //! This widgets picks up the elements
81 | QWidget m_mainWidget;
82 | //! Layout of #m_mainWidget
83 | QVBoxLayout m_layout;
84 |
85 |
86 | WorkingArea *m_workingAreaWidget;
87 | };
88 |
89 | #endif // TOOLBOX_H
90 |
--------------------------------------------------------------------------------
/src/Pythonic/toolmaster.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Pythonic.
3 |
4 | * Pythonic is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 |
9 | * Pythonic is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | * along with Pythonic. If not, see
16 | */
17 |
18 | #ifndef TOOLMASTER_H
19 | #define TOOLMASTER_H
20 |
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include "baselabel.h"
31 | #include "helper.h"
32 | #include "workingarea.h"
33 |
34 | #define TOOL_SIZE QSize(140, 47)
35 | #define CENTER_OFFSET_X 145
36 | #define CENTER_OFFSET_Y 60
37 |
38 | /*! @brief ToolMaster3 - Main purpose: register new elements on workingareas
39 | *
40 | * Detailed description follows here.
41 | * @author Stephan Avenwedde
42 | * @date October 2020
43 | * @copyright [GPLv3](../../../LICENSE)
44 | */
45 |
46 | class ToolMaster3 : public BaseLabelDaemon
47 | {
48 | public:
49 |
50 | explicit ToolMaster3(QJsonObject &toolData, QWidget *parent = nullptr);
51 |
52 | WorkingArea *m_workingAreaWidget;
53 |
54 | QPoint m_dragPosOffset;
55 |
56 | public slots:
57 |
58 | void setCurrentWorkingArea(QWidget* workingAreaWidget);
59 |
60 | protected:
61 |
62 | void mousePressEvent(QMouseEvent *event) override;
63 |
64 | void mouseReleaseEvent(QMouseEvent *event) override;
65 |
66 | void mouseMoveEvent(QMouseEvent *event) override;
67 |
68 | QLabel *m_preview{NULL};
69 | private:
70 |
71 | QJsonObject m_toolData;
72 |
73 | const static QLoggingCategory logC;
74 | };
75 |
76 | #endif // TOOLMASTER_H
77 |
--------------------------------------------------------------------------------
/src/Pythonic/wall_of_fame.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Pythonic.
3 |
4 | * Pythonic is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 |
9 | * Pythonic is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | * along with Pythonic. If not, see
16 | */
17 |
18 |
19 | #include "wall_of_fame.h"
20 |
21 |
22 | WallOfFame::WallOfFame(QWidget *parent) : QDialog(parent)
23 | {
24 | qCDebug(logC, "called");
25 | setMinimumSize(500, 300);
26 |
27 | m_topText.setText("Thanks to all supporters of this project!");
28 |
29 | m_botText.setTextInteractionFlags(Qt::TextBrowserInteraction);
30 | m_botText.setOpenExternalLinks(true);
31 | m_botText.setText("Become a Patron to be immortalized on the Wall of Fame.");
32 |
33 | /* Create list with names */
34 |
35 | /* Add names */
36 |
37 | //m_listOfNames.addItem(QStringLiteral("Paweł Pastuszko"));
38 | m_listOfNames.addItem(QStringLiteral("Your Name"));
39 |
40 | m_okBtn.setText(QStringLiteral("Ok"));
41 |
42 |
43 | connect(&m_okBtn, &QPushButton::clicked,
44 | this, &WallOfFame::close);
45 |
46 | /* Setup layout */
47 |
48 | m_mainLayout.addWidget(&m_topText);
49 | m_mainLayout.addWidget(&m_listOfNames);
50 | m_mainLayout.addWidget(&m_botText);
51 | m_mainLayout.addWidget(&m_okBtn);
52 | //m_mainLayout.addStretch(1);
53 | setLayout(&m_mainLayout);
54 | }
55 |
56 | void WallOfFame::close()
57 | {
58 | QDesktopServices::openUrl(QUrl(QStringLiteral("https://www.patreon.com/pythonicautomation?fan_landing=true")));
59 | accept();
60 | }
61 |
--------------------------------------------------------------------------------
/src/Pythonic/wall_of_fame.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This file is part of Pythonic.
3 |
4 | * Pythonic is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 3 of the License, or
7 | * (at your option) any later version.
8 |
9 | * Pythonic is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 |
14 | * You should have received a copy of the GNU General Public License
15 | * along with Pythonic. If not, see
16 | */
17 |
18 | #ifndef WALL_OF_FAME_H
19 | #define WALL_OF_FAME_H
20 |
21 | #include
22 | #include
23 | #include
24 | #include
25 | #include
26 | #include
27 | #include
28 | #include
29 | #include
30 | #include
31 |
32 | class WallOfFame : public QDialog
33 | {
34 | Q_OBJECT
35 | const QLoggingCategory logC{"WallOfFame"};
36 |
37 | public:
38 | explicit WallOfFame(QWidget *parent = nullptr);
39 |
40 | private slots:
41 |
42 | void close();
43 |
44 | private:
45 |
46 |
47 | QVBoxLayout m_mainLayout;
48 |
49 | QLabel m_topText;
50 | QListWidget m_listOfNames;
51 | QLabel m_botText;
52 | QPushButton m_okBtn;
53 |
54 |
55 | };
56 |
57 | #endif // WALL_OF_FAME_H
58 |
--------------------------------------------------------------------------------
/src/PythonicOld/__init__.py:
--------------------------------------------------------------------------------
1 | name = 'Pythonic'
2 |
3 |
--------------------------------------------------------------------------------
/src/PythonicOld/binancetools.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QFrame, QHBoxLayout
2 | from PyQt5.QtCore import Qt, QMimeData, QDir, pyqtSignal
3 | from PyQt5.QtGui import QDrag, QPixmap, QPainter, QColor
4 | import sys, logging, os, Pythonic
5 | from os.path import join
6 | from Pythonic.workingarea import WorkingArea
7 | from Pythonic.mastertool import MasterTool
8 |
9 |
10 | class BinanceTools(QFrame):
11 |
12 | reg_tool = pyqtSignal(tuple, name='register_tool_binance')
13 |
14 | def __init__(self, parent):
15 | super().__init__(parent)
16 | self.initUI()
17 |
18 | def initUI(self):
19 |
20 | self.setStyleSheet('background-color: silver')
21 | mod_path = os.path.dirname(Pythonic.__file__)
22 |
23 | self.layout_h = QHBoxLayout()
24 |
25 | self.scheduler = MasterTool(self, 'BinanceSched', 1)
26 | self.scheduler.setPixmap(QPixmap(join(mod_path, 'images/BinanceSched.png')).scaled(120, 60))
27 |
28 | self.ohlc = MasterTool(self, 'BinanceOHLC', 1)
29 | self.ohlc.setPixmap(QPixmap(join(mod_path, 'images/BinanceOHLC.png')).scaled(120, 60))
30 |
31 | self.order = MasterTool(self, 'BinanceOrder', 1)
32 | self.order.setPixmap(QPixmap(join(mod_path, 'images/BinanceOrder.png')).scaled(120, 60))
33 |
34 | self.layout_h.addWidget(self.scheduler)
35 | self.layout_h.addWidget(self.ohlc)
36 | self.layout_h.addWidget(self.order)
37 | self.layout_h.addStretch(1)
38 |
39 | self.setLayout(self.layout_h)
40 |
41 | def mousePressEvent(self, event):
42 |
43 | child = self.childAt(event.pos())
44 | if not child:
45 | return
46 |
47 | pixmap = QPixmap(child.pixmap())
48 |
49 | mimeData = QMimeData()
50 | mimeData.setText(child.type)
51 |
52 | drag = QDrag(self)
53 | drag.setPixmap(child.pixmap())
54 | drag.setMimeData(mimeData)
55 | drag.setHotSpot(event.pos() - child.pos())
56 |
57 | tempPixmap = QPixmap(pixmap)
58 | painter = QPainter()
59 | painter.begin(tempPixmap)
60 | painter.fillRect(pixmap.rect(), QColor(127, 127, 127, 127))
61 | painter.end()
62 |
63 | child.setPixmap(tempPixmap)
64 |
65 | if drag.exec_(Qt.CopyAction | Qt.MoveAction, Qt.CopyAction) == Qt.MoveAction:
66 | child.close()
67 | else:
68 | child.show()
69 | child.setPixmap(pixmap)
70 |
71 | def register_tools(self):
72 | logging.debug('BinanceTools::register_tools() called')
73 | self.reg_tool.emit(self.scheduler.toolData())
74 | self.reg_tool.emit(self.ohlc.toolData())
75 | self.reg_tool.emit(self.order.toolData())
76 |
77 |
78 |
--------------------------------------------------------------------------------
/src/PythonicOld/connectivitytools.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QFrame, QHBoxLayout
2 | from PyQt5.QtCore import Qt, QMimeData, QDir, pyqtSignal
3 | from PyQt5.QtGui import QDrag, QPixmap, QPainter,QColor
4 | import sys, logging, os, Pythonic
5 | from os.path import join
6 | from Pythonic.workingarea import WorkingArea
7 | from Pythonic.mastertool import MasterTool
8 |
9 | class ConnectivityTools(QFrame):
10 |
11 | reg_tool = pyqtSignal(tuple, name='register_tool_connectivity')
12 |
13 | def __init__(self, parent):
14 | super().__init__(parent)
15 | self.initUI()
16 |
17 | def initUI(self):
18 |
19 | self.setStyleSheet('background-color: silver')
20 | mod_path = os.path.dirname(Pythonic.__file__)
21 | """
22 | image_folder = QDir('images')
23 |
24 | if not image_folder.exists():
25 | logging.error('Image foulder not found')
26 | sys.exit(1)
27 | """
28 |
29 | self.layout_h = QHBoxLayout()
30 |
31 | self.e_mail = MasterTool(self, 'ConnMail', 1)
32 | self.e_mail.setPixmap(QPixmap(join(mod_path, 'images/ConnMail.png')).scaled(120, 60))
33 |
34 | self.rest = MasterTool(self, 'ConnREST', 1)
35 | self.rest.setPixmap(QPixmap(join(mod_path, 'images/ConnREST.png')).scaled(120, 60))
36 |
37 | self.layout_h.addWidget(self.e_mail)
38 | self.layout_h.addWidget(self.rest)
39 | self.layout_h.addStretch(1)
40 |
41 | self.setLayout(self.layout_h)
42 |
43 | def mousePressEvent(self, event):
44 |
45 | child = self.childAt(event.pos())
46 | if not child:
47 | return
48 |
49 | pixmap = QPixmap(child.pixmap())
50 |
51 | mimeData = QMimeData()
52 | mimeData.setText(child.type)
53 |
54 | drag = QDrag(self)
55 | drag.setPixmap(child.pixmap())
56 | drag.setMimeData(mimeData)
57 | drag.setHotSpot(event.pos() - child.pos())
58 |
59 | tempPixmap = QPixmap(pixmap)
60 | painter = QPainter()
61 | painter.begin(tempPixmap)
62 | painter.fillRect(pixmap.rect(), QColor(127, 127, 127, 127))
63 | painter.end()
64 |
65 | child.setPixmap(tempPixmap)
66 |
67 | if drag.exec_(Qt.CopyAction | Qt.MoveAction, Qt.CopyAction) == Qt.MoveAction:
68 | child.close()
69 | else:
70 | child.show()
71 | child.setPixmap(pixmap)
72 |
73 | def register_tools(self):
74 | logging.debug('ConnectivityTools::register_tools() called')
75 | self.reg_tool.emit(self.e_mail.toolData())
76 | self.reg_tool.emit(self.rest.toolData())
77 |
78 |
79 |
--------------------------------------------------------------------------------
/src/PythonicOld/debugwindow.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QLabel, QWidget, QVBoxLayout, QPushButton, QTextEdit
2 | from PyQt5.QtGui import QFont
3 | from PyQt5.QtCore import Qt, pyqtSignal
4 | from PyQt5.QtCore import QCoreApplication as QC
5 | import logging
6 | from Pythonic.record_function import alphabet
7 | from Pythonic.elementeditor import ElementEditor
8 |
9 |
10 | class DebugWindow(QWidget):
11 |
12 | proceed_execution = pyqtSignal(name='proceed_execution')
13 |
14 | def __init__(self, message, source):
15 |
16 | super().__init__()
17 |
18 | self.setAttribute(Qt.WA_DeleteOnClose, True)
19 | self.source = source
20 | self.message = message
21 |
22 | def raiseWindow(self):
23 |
24 | logging.debug('raiseWindow() called')
25 | self.setMinimumSize(400, 300)
26 | self.setWindowFlags(Qt.Window)
27 | self.setWindowTitle(QC.translate('', 'Debug'))
28 | self.setWindowModality(Qt.WindowModal)
29 |
30 | self.confirm_button = QPushButton()
31 | self.confirm_button.setText(QC.translate('', 'Ok'))
32 | self.confirm_button.clicked.connect(self.close)
33 |
34 | self.headline = QFont("Arial", 10, QFont.Bold)
35 |
36 | self.info_string = QC.translate('', 'Debug info of element:')
37 | self.elementInfo = QLabel()
38 | self.elementInfo.setFont(self.headline)
39 | self.elementInfo.setText(self.info_string + '{} {}'.format(self.source[0],
40 | alphabet[self.source[1]]))
41 |
42 | self.debugMessage = QTextEdit()
43 | self.debugMessage.setReadOnly(True)
44 | self.debugMessage.setText(self.message)
45 |
46 |
47 |
48 | self.debugWindowLayout = QVBoxLayout()
49 | self.debugWindowLayout.addWidget(self.elementInfo)
50 | self.debugWindowLayout.addWidget(self.debugMessage)
51 | self.debugWindowLayout.addStretch(1)
52 | self.debugWindowLayout.addWidget(self.confirm_button)
53 |
54 | self.setLayout(self.debugWindowLayout)
55 |
56 | self.show()
57 |
58 | def closeEvent(self, event):
59 | logging.debug('closeEvent() called DebugWindow')
60 | self.proceed_execution.emit()
61 | self.hide()
62 |
63 |
--------------------------------------------------------------------------------
/src/PythonicOld/elementeditor.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtCore import Qt, pyqtSignal
2 | from PyQt5.QtWidgets import QWidget
3 | import logging
4 |
5 | class ElementEditor(QWidget):
6 |
7 | window_closed = pyqtSignal(name='window_closed')
8 |
9 | def __init__(self, parent):
10 | super().__init__(parent)
11 | self.setMinimumSize(400, 500)
12 | self.setWindowFlags(Qt.Window)
13 | self.setWindowModality(Qt.WindowModal)
14 | self.setAttribute(Qt.WA_DeleteOnClose, True)
15 |
16 | logging.debug('ElementEditor::__init__() called')
17 |
18 | def closeEvent(self, event):
19 | logging.debug('ElementEditor::closeEvent() called')
20 | self.window_closed.emit()
21 | self.hide()
22 |
23 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__init__.py
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/__init__.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/__init__.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_branch.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_branch.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_operation.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_operation.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_process.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_process.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_return.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_return.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_sched.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_sched.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_stack.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_stack.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_stack_window.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_stack_window.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basic_ta.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basic_ta.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/basicelements.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/basicelements.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/binance_ohlc.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/binance_ohlc.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/binance_order.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/binance_order.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/__pycache__/binance_sched.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/elements/__pycache__/binance_sched.cpython-37.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/elements/basic_operation_func.py:
--------------------------------------------------------------------------------
1 | from Pythonic.record_function import Record, Function, PipeRecord
2 | import time
3 |
4 | from PyQt5.QtCore import QObject
5 | from PyQt5.QtCore import pyqtSignal
6 |
7 | class OperationFunction(Function):
8 |
9 |
10 | def __init__(self, config, b_debug, row, column):
11 | super().__init__(config, b_debug, row, column)
12 |
13 | def execute(self, record):
14 |
15 | log_state, code_input, custom_edit_state, cmd = self.config
16 |
17 | proc_dict = {'record' : record, 'callback' : self.callback, 'pos' : self.getPos,
18 | 'input' : None, 'output' : None, 'log_txt' : None}
19 |
20 |
21 | exec_string = 'input = record\r\n'
22 | exec_string += 'output = record\r\n'
23 |
24 | if code_input:
25 | exec_string += code_input
26 |
27 | exec(exec_string, proc_dict)
28 |
29 |
30 | """
31 | n_cnt = 0
32 |
33 | while True:
34 | n_cnt += 1
35 | # switch grid
36 | #ret_data = PipeRecord(self.getPos(), (1, self.row+1, self.column), n_cnt)
37 | my_text = 'Hello log'
38 | ret_data = PipeRecord(self.getPos(), (self.row+1, self.column), n_cnt, True, my_text)
39 | self.callback(ret_data)
40 | time.sleep(2)
41 | """
42 |
43 | output = proc_dict['output']
44 | log_txt = proc_dict['log_txt']
45 | if log_txt:
46 | log_txt = '{{BASIC OPERATION}} {}'.format(proc_dict['log_txt'])
47 | else:
48 | log_txt = '{{BASIC OPERATION}} {}'.format(proc_dict['output'])
49 |
50 | result = Record(self.getPos(), (self.row+1, self.column), output, log=log_state, log_txt=log_txt)
51 |
52 | return result
53 |
54 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/basic_process.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtCore import pyqtSignal
2 | from PyQt5.QtWidgets import QVBoxLayout, QLabel
3 | from PyQt5.QtCore import QCoreApplication as QC
4 | import logging
5 | from Pythonic.elementmaster import ElementMaster
6 | from Pythonic.elementeditor import ElementEditor
7 | from Pythonic.elements.basic_process_func import ProcessFunction
8 |
9 |
10 | class ExecProcess(ElementMaster):
11 |
12 | pixmap_path = 'images/ExecProcess.png'
13 | child_pos = (True, True)
14 | start_branch = pyqtSignal(int, int, name='start_branch')
15 |
16 | query_grid = pyqtSignal(name='query_grid')
17 |
18 | def __init__(self, row, column):
19 | self.row = row
20 | self.column = column
21 | super().__init__(self.row, self.column, self.pixmap_path, True, None)
22 | super().edit_sig.connect(self.edit)
23 | logging.debug('ExecProcess called at row {}, column {}'.format(row, column))
24 | self.addFunction(ProcessFunction)
25 |
26 |
27 | def __setstate__(self, state):
28 | logging.debug('__setstate__() called ExecBranch')
29 | self.row, self.column, self.config = state
30 | super().__init__(self.row, self.column, self.pixmap_path, True, None)
31 | super().edit_sig.connect(self.edit)
32 | self.addFunction(ProcessFunction)
33 |
34 | def __getstate__(self):
35 | logging.debug('__getstate__() called ExecBranch')
36 | return (self.row, self.column, self.config)
37 |
38 |
39 | def edit(self):
40 | logging.debug('edit() called ExecBranch')
41 | self.procEditLayout = QVBoxLayout()
42 |
43 | self.procEdit = ElementEditor(self)
44 | self.procEdit.setWindowTitle(QC.translate('', 'Edit Process Branch'))
45 |
46 | self.help_text = QLabel()
47 | self.help_text.setText(QC.translate('', 'Multiprocessing: Start a new execution path.'))
48 |
49 | self.procEditLayout.addWidget(self.help_text)
50 | self.procEditLayout.addStretch(1)
51 | self.procEdit.setLayout(self.procEditLayout)
52 |
53 |
54 | self.procEdit.show()
55 |
56 | def edit_done(self):
57 | logging.debug('edit_done() called ExecBranch')
58 |
59 | def windowClosed(self, event):
60 | logging.debug('windowClosed() called ExecBranch')
61 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/basic_process_func.py:
--------------------------------------------------------------------------------
1 | from Pythonic.record_function import Record, Function
2 |
3 | class ProcessFunction(Function):
4 |
5 | def __init__(self, config, b_debug, row, column):
6 | super().__init__(config, b_debug, row, column)
7 |
8 | def execute(self, record):
9 | #record = 'Hello from ProcessElement {}'.format((self.row, self.column))
10 | target_0 = (self.row +1, self.column)
11 | target_1 = (self.row, self.column +1)
12 | result = Record(self.getPos(), target_0, record, target_1, record)
13 | return result
14 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/basic_return_func.py:
--------------------------------------------------------------------------------
1 | from Pythonic.record_function import Record, Function, alphabet
2 |
3 | class ReturnFunction(Function):
4 |
5 | def __init__(self, config, b_debug, row, column):
6 | super().__init__(config, b_debug, row, column)
7 |
8 | def execute(self, record):
9 |
10 | grid, wrk_selecctor_index, wrk_pos, log_state = self.config
11 | target_0 = (grid, wrk_pos[0], wrk_pos[1])
12 | log_txt = '{{BASIC RETURN}} Grid {} - Pos {}|{}'.format(
13 | grid+1, wrk_pos[0], alphabet[wrk_pos[1]])
14 | result = Record(self.getPos(), target_0, record, log=log_state, log_txt=log_txt)
15 | return result
16 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/basicelements_func.py:
--------------------------------------------------------------------------------
1 | from Pythonic.record_function import Record, Function
2 |
3 | class ExecRBFunction(Function):
4 |
5 | def __init__(self, config, b_debug, row, column):
6 | super().__init__(config, b_debug, row, column)
7 |
8 | def execute(self, record):
9 | result = Record(self.getPos(), (self.row +1, self.column), record)
10 | return result
11 |
12 | class ExecRFunction(Function):
13 |
14 | def __init__(self, config, b_debug, row, column):
15 | super().__init__(config, b_debug, row, column)
16 |
17 | def execute(self, record):
18 | result = Record(self.getPos(), (self.row, self.column+1), record)
19 | return result
20 |
21 |
22 | class PlaceHolderFunction(Function):
23 |
24 | def __init__(self, config, b_debug, row, column):
25 | super().__init__(config, b_debug, row, column)
26 |
27 | def execute(self, record):
28 | result = Record(self.getPos(), None, record)
29 | return result
30 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/binance_ohlc_func.py:
--------------------------------------------------------------------------------
1 | from pythonic_binance.client import Client
2 | import datetime
3 | import pandas as pd
4 | from Pythonic.record_function import Record, Function
5 |
6 | class BinanceOHLCFUnction(Function):
7 |
8 | def __init(self, config, b_debug, row, column):
9 |
10 | super().__init__(config, b_debug, row, column)
11 | #logging.debug('__init__() called BinanceOHLCFUnction')
12 |
13 | def execute(self, record):
14 |
15 | interval_str, inteval_index, symbol_txt, log_state = self.config
16 |
17 | client = Client('', '')
18 | try:
19 | record = client.get_klines(symbol=symbol_txt, interval=interval_str)
20 | except Exception as e:
21 | log_txt = '{{BINANCE SCHEDULER}} Exception caught: {}'.format(str(e))
22 | result = Record(self.getPos(), None, None, log=log_state, log_txt=log_txt)
23 | return result
24 |
25 | myList = []
26 | item = []
27 |
28 |
29 | try:
30 | for item in record:
31 | n_item = []
32 | int_ts = int(item[0]/1000)
33 | # nur neue timestamps anhängen
34 |
35 | n_item.append(int_ts) # open time
36 | n_item.append(float(item[1])) # open
37 | n_item.append(float(item[2])) # high
38 | n_item.append(float(item[3])) # low
39 | n_item.append(float(item[4])) # close
40 | n_item.append(float(item[5])) # volume
41 | n_item.append(int(item[6]/1000)) # close_time
42 | n_item.append(float(item[7])) # quote_assetv
43 | n_item.append(int(item[8])) # trades
44 | n_item.append(float(item[9])) # taker_b_asset_v
45 | n_item.append(float(item[10])) # taker_b_quote_v
46 | n_item.append(datetime.datetime.fromtimestamp(n_item[0]))
47 | myList.append(n_item)
48 | except:
49 | #logging.error('Data cant be read!')
50 | log_txt = '{{BINANCE SCHEDULER}} Exception caught: {}'.format(str(e))
51 | result = Record(self.getPos(), None, None, log=log_state, log_txt=log_txt)
52 | return result
53 |
54 | new_ohlc = pd.DataFrame(myList, columns=['open_time', 'open', 'high', 'low',
55 | 'close', 'volume', 'close_time', 'quote_assetv', 'trades', 'taker_b_asset_v',
56 | 'taker_b_quote_v', 'datetime'])
57 |
58 | log_txt = '{{BINANCE OHLC QUERY}} Received {} records'.format(len(record))
59 | result = Record(self.getPos(), (self.row +1, self.column), new_ohlc, log=log_state, log_txt=log_txt)
60 |
61 | return result
62 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/binance_sched_func.py:
--------------------------------------------------------------------------------
1 | from pythonic_binance.client import Client
2 | from time import sleep
3 | import datetime
4 | from Pythonic.record_function import Record, Function
5 |
6 |
7 | ohlc_steps = { '1m' : 1, '3m' : 3, '5m' : 5, '15m' : 15, '30m' : 30, '1h' : 60, '2h' : 120, '4h' : 240, '6h' : 360,
8 | '8h' : 480, '12h' : 720, '1d' : 1440, '3d' : 4320, '1w' : 10080, '1M' : 40320 }
9 |
10 | class BinanceScheduler(Function):
11 |
12 | def __init(self, config, b_debug, row, column):
13 |
14 | super().__init__(config, b_debug, row, column)
15 | #logging.debug('__init__() called BinanceScheduler')
16 |
17 | def execute(self, record):
18 |
19 | interval_str, interval_index, offset, log_state = self.config
20 |
21 | if isinstance(record, tuple) and isinstance(record[0], datetime.datetime):
22 |
23 | while record[0] > datetime.datetime.now():
24 | sleep(1)
25 |
26 | record = record[1]
27 | target = (self.row + 1, self.column)
28 | log_txt = '{BINANCE SCHEDULER} >>>EXECUTE<<<'
29 |
30 | result = Record(self.getPos(), target, record, log=log_state, log_txt=log_txt)
31 |
32 | else:
33 |
34 | client = Client('', '')
35 |
36 | try:
37 | binance_time = client.get_server_time()
38 | except Exception as e:
39 | log_txt = '{{BINANCE SCHEDULER}} Exception caught: {}'.format(str(e))
40 | result = Record(self.getPos(), None, None, log=True, log_txt=log_txt)
41 |
42 | binance_time = binance_time['serverTime']
43 | binance_time /= 1000
44 | binance_timestamp = datetime.datetime.fromtimestamp(binance_time)
45 |
46 | offset = datetime.timedelta(seconds=offset)
47 |
48 | ohlc_step = datetime.timedelta(minutes=ohlc_steps[interval_str])
49 |
50 | date = datetime.datetime.now().date()
51 | # 00:00 o'clock for the actual date
52 | sync_time = datetime.datetime(date.year, date.month, date.day)
53 |
54 | # while loop leaves when the next ohlc_step target time is found
55 | while sync_time < binance_timestamp:
56 | sync_time += ohlc_step
57 |
58 |
59 | sync_time += offset
60 | countdown = sync_time - datetime.datetime.now()
61 |
62 | target = self.getPos()
63 | record = (sync_time, record)
64 | hours = countdown.seconds // 3600
65 | minutes = (countdown.seconds // 60) % 60
66 | seconds = countdown.seconds % 60
67 | log_txt = '{{BINANCE SCHEDULER}} Synchronization successful, '\
68 | 'execution starts in {:02}:{:02}:{:02}'.format(hours, minutes, seconds)
69 |
70 | result = Record(self.getPos(), target, record, log=log_state, log_txt=log_txt)
71 |
72 | return result
73 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/conn_mail_func.py:
--------------------------------------------------------------------------------
1 | from Pythonic.record_function import Record, Function
2 | from email.message import EmailMessage
3 | from sys import getsizeof
4 | import smtplib, ssl, pickle
5 |
6 | class ConnMailFunction(Function):
7 |
8 | def __init(self, config, b_debug, row, column):
9 |
10 | super().__init__(config, b_debug, row, column)
11 | #logging.debug('ConnMailFunction::__init__() called')
12 |
13 | def execute(self, record):
14 |
15 | # recipient, sender, password, server_url, server_port, subject
16 | # input_opt_index, input_opt_data, filename, pass_input, message_state, message_txt, log_state
17 |
18 | recipient, sender, password, server_url, server_port, subject, \
19 | input_opt_index, input_opt_data, filename, pass_input, message_state, \
20 | message_txt, log_state = self.config
21 |
22 | if input_opt_index == 1: # Use input as message txt
23 | if message_state: # In case there is already a message, append input
24 | message_txt += '\n\n'
25 | message_txt += str(record)
26 | else:
27 | message_state = True
28 | message_txt = str(record)
29 |
30 |
31 | if isinstance(record, dict): # Dictionary has always priority
32 | if 'subject' in record:
33 | subject = record['subject']
34 | if 'message' in record:
35 | message_state = True
36 | message_txt = record['message']
37 |
38 | rcp_list = recipient.split(' ')
39 |
40 | # Message constructor
41 | msg = EmailMessage()
42 | msg['Subject'] = subject
43 | msg['From'] = sender
44 | msg['To'] = ', '.join(rcp_list)
45 | msg.set_default_type('text/plain')
46 | if message_state:
47 | msg.set_content(message_txt)
48 |
49 | # Attachment
50 |
51 | if input_opt_index == 2: # Attach input object as string
52 | if not filename:
53 | filename = 'filename.txt'
54 | msg.add_attachment(str(record), 'text/plain', filename=filename)
55 |
56 | if input_opt_index == 3: # Attach input object as binary
57 | attachement = pickle.dumps(record)
58 | if not filename:
59 | filename = 'filename.txt'
60 | msg.add_attachment(attachement, maintype='application', subtype='octet-stream',
61 | filename='filename.bin')
62 |
63 | context = ssl.create_default_context()
64 |
65 | with smtplib.SMTP_SSL(server_url, server_port, context=context) as server:
66 | server.login(sender, password)
67 | server.send_message(msg)
68 |
69 | if not pass_input:
70 | record = None
71 |
72 | log_txt = '{{SEND MAIL}} {} bytes send'.format(getsizeof(msg.__str__()))
73 |
74 | result = Record(self.getPos(), (self.row +1, self.column), record, log=log_state, log_txt=log_txt)
75 |
76 | return result
77 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/conn_rest_func.py:
--------------------------------------------------------------------------------
1 | import requests, json
2 | from Pythonic.record_function import Record, Function
3 | from sys import getsizeof
4 |
5 | class ConnRESTFunction(Function):
6 |
7 | def __init(self, config, b_debug, row, column):
8 |
9 | super().__init__(config, b_debug, row, column)
10 | #logging.debug('ConnRESTFunction::__init__() called')
11 |
12 | def execute(self, record):
13 |
14 | # pass_input, url, log_state
15 | pass_input, url, log_state = self.config
16 |
17 | if pass_input:
18 | recv_string = requests.get(str(record))
19 | else:
20 | recv_string = requests.get(url)
21 |
22 | record = json.loads(recv_string.text)
23 |
24 | log_txt = '{{REST (GET)}} {} bytes received'.format(getsizeof(recv_string.text))
25 |
26 | result = Record(self.getPos(), (self.row +1, self.column), record, log=log_state, log_txt=log_txt)
27 |
28 | return result
29 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/ml_svm_func.py:
--------------------------------------------------------------------------------
1 | import pickle, os
2 | from Pythonic.record_function import Record, Function
3 | from sklearn import svm, preprocessing
4 | from sklearn.model_selection import train_test_split
5 |
6 | class MLSVMFunction(Function):
7 |
8 | def __init(self, config, b_debug, row, column):
9 |
10 | super().__init__(config, b_debug, row, column)
11 | #logging.debug('MLSVMFunction::__init__() called')
12 |
13 | def execute(self, record):
14 |
15 | scale_option, scale_mean, scale_std, train_eval, decision_function, \
16 | gamma_mode, gamma_value, filename, rel_path, log_state = self.config
17 |
18 | # expect a tuple (Xdata, Ylabels) as input
19 | X, Y = record
20 |
21 | if scale_option == 1:
22 | # X, axis, with_mean, with_std, copy
23 | X = preprocessing.scale(X, 0, scale_mean, scale_std, False)
24 |
25 | if train_eval == 0: # 90/10
26 | test_share = 0.1
27 | elif train_eval == 1: # 80/20
28 | test_share = 0.2
29 | elif train_eval == 2: # 70/30
30 | test_share = 0.3
31 | elif train_eval == 3: # 60/40
32 | test_share = 0.4
33 | else: # 50/50
34 | test_share = 0.5
35 |
36 | X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=test_share)
37 |
38 | if decision_function == 0: # one vs. one
39 | dec_func_shape = 'ovo'
40 | else: # one vs. rest
41 | dec_func_shape = 'ovr'
42 |
43 | if gamma_mode == 0: # auto
44 | gamma_arg = 'auto'
45 | elif gamma_mode == 1: #scaled
46 | gamma_arg = 'scaled'
47 | else: # manual
48 | gamma_arg = gamma_value
49 |
50 |
51 | clf = svm.SVC(decision_function_shape='ovr', gamma=gamma_arg)
52 | clf.fit(X_train, Y_train)
53 |
54 | Y_predicted = clf.predict(X_test)
55 |
56 | tp = 0
57 | tn = 0
58 | fp = 0
59 | fn = 0
60 |
61 | for idx, Y_pre in enumerate(Y_predicted):
62 | if Y_pre == Y_test[idx]: # true positives or true negatives
63 |
64 | if Y_test[idx] != 0: # true positive
65 | tp += 1
66 | else: #true negative
67 | tn += 1
68 |
69 | else: #false positives or false negatives
70 |
71 | if Y_test[idx] != 0: # false positive
72 | fp += 1
73 | else: # false negative
74 | fn += 1
75 |
76 |
77 | log_txt = '{SVM} Successful trained'
78 |
79 | if filename:
80 | if rel_path:
81 | filename = os.path.join(os.environ['HOME'], filename)
82 |
83 | try:
84 | with open(filename, 'wb') as f:
85 | pickle.dump(clf, f)
86 | except Exception as e:
87 | # not writeable?
88 | log_txt = '{SVM} Successful trained - Error writing model to HDD'
89 |
90 |
91 |
92 | record = {'tp': tp, 'tn':tn, 'fp':fp, 'fn':fn}
93 |
94 | result = Record(self.getPos(), (self.row +1, self.column), record,
95 | log=log_state, log_txt=log_txt)
96 |
97 |
98 | return result
99 |
--------------------------------------------------------------------------------
/src/PythonicOld/elements/ml_svm_predict_func.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 | import pickle, os
3 | from Pythonic.record_function import Record, Function
4 | from sklearn import preprocessing
5 |
6 | class MLSVM_PredictFunction(Function):
7 |
8 | def __init(self, config, b_debug, row, column):
9 |
10 | super().__init__(config, b_debug, row, column)
11 | #logging.debug('MLSVM_PredictFunction::__init__() called')
12 |
13 | def execute(self, record):
14 |
15 | scale_option, scale_mean, scale_std, predict_val, filename, rel_path, log_state = self.config
16 | b_open_succeeded = True
17 |
18 | if filename:
19 | if rel_path:
20 | filename = os.path.join(os.environ['HOME'], filename)
21 |
22 | try:
23 | with open(filename, 'rb') as f:
24 | clf = pickle.load(f)
25 | except Exception as e:
26 | # not writeable?
27 | log_txt = '{SVM Predict} Error opening model'
28 | record = None
29 | b_open_succeeded = False
30 | else:
31 | b_open_succeeded = False
32 | log_txt = '{SVM Predict} No model file specified'
33 |
34 | if b_open_succeeded:
35 | if isinstance(record, (list, tuple, pd.DataFrame)):
36 | # scaling option only here available
37 | if not isinstance(record, pd.DataFrame):
38 | record = pd.DataFrame(record)
39 |
40 | record = preprocessing.scale(record, with_mean=scale_mean, with_std=scale_std)
41 | record = clf.predict(record)
42 | elif record:
43 | # when only one value is passed
44 | predict_val = False
45 | record = pd.DataFrame([record])
46 | record = clf.predict([record])
47 | else:
48 | log_txt = '{SVM Predict} No input specified'
49 |
50 |
51 | if predict_val:
52 | # predict only last value
53 | record = pd.DataFrame([record[-1]])
54 | record = clf.predict(record)
55 |
56 | log_txt = '{{SVM Predict}} Predicted {} value'.format(len(record))
57 |
58 | result = Record(self.getPos(), (self.row +1, self.column), record,
59 | log=log_state, log_txt=log_txt)
60 |
61 | return result
62 |
--------------------------------------------------------------------------------
/src/PythonicOld/exceptwindow.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QLabel, QWidget, QVBoxLayout, QHBoxLayout, QPushButton, QTextEdit
2 | from PyQt5.QtGui import QFont
3 | from PyQt5.QtCore import Qt, pyqtSignal
4 | from PyQt5.QtCore import QCoreApplication as QC
5 | import logging
6 | from Pythonic.elementeditor import ElementEditor
7 | from Pythonic.record_function import alphabet
8 |
9 |
10 | class ExceptWindow(QWidget):
11 |
12 | window_closed = pyqtSignal(object, name='except_window_closed')
13 |
14 | def __init__(self, message, position):
15 |
16 | super().__init__()
17 | self.setMinimumSize(400, 300)
18 | self.setWindowFlags(Qt.Window)
19 | self.setAttribute(Qt.WA_DeleteOnClose, True)
20 | self.message = message
21 | self.position = position
22 | self.initUI()
23 | self.raiseWindow()
24 |
25 | def initUI(self):
26 |
27 | self.confirm_button = QPushButton()
28 |
29 | self.headline = QFont("Arial", 10, QFont.Bold)
30 |
31 | self.elementInfo = QLabel()
32 | self.elementInfo.setFont(self.headline)
33 |
34 | self.exceptionMessage = QTextEdit()
35 | self.exceptionMessage.setReadOnly(True)
36 |
37 | self.setMinimumSize(400, 300)
38 | self.setWindowFlags(Qt.Window)
39 |
40 | self.exceptWindowLayout = QVBoxLayout()
41 | self.exceptWindowLayout.addWidget(self.elementInfo)
42 | self.exceptWindowLayout.addWidget(self.exceptionMessage)
43 | self.exceptWindowLayout.addStretch(1)
44 | self.exceptWindowLayout.addWidget(self.confirm_button)
45 |
46 | self.confirm_button.clicked.connect(self.close)
47 |
48 | self.setLayout(self.exceptWindowLayout)
49 |
50 | def raiseWindow(self):
51 |
52 | logging.debug('raiseWindow() called')
53 |
54 | self.confirm_button.setText(QC.translate('', 'Ok'))
55 | self.info_string = QC.translate('', 'Exception in element: ')
56 | self.elementInfo.setText(self.info_string + '{} {}'.format(self.position[0], alphabet[self.position[1]]))
57 | self.exceptionMessage.setText(self.message)
58 | self.setWindowTitle(QC.translate('', 'Exception found'))
59 | self.show()
60 |
61 | def closeEvent(self, event):
62 | logging.debug('closeEvent() called ExceptWindow')
63 | self.window_closed.emit(self.position)
64 | self.close()
65 |
66 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/.directory:
--------------------------------------------------------------------------------
1 | [Dolphin]
2 | PreviewsShown=true
3 | Timestamp=2018,1,28,15,22,55
4 | Version=4
5 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/BaseElement.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/BaseElement.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/BinanceOHLC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/BinanceOHLC.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/BinanceOrder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/BinanceOrder.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/BinanceSched.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/BinanceSched.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ConnMail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ConnMail.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ConnREST.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ConnREST.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ExecBranch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ExecBranch.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ExecOp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ExecOp.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ExecProcess.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ExecProcess.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ExecReturn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ExecReturn.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ExecSched.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ExecSched.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ExecStack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ExecStack.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/ExecTA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/ExecTA.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/MLSVM.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/MLSVM.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/MLSVM_Predict.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/MLSVM_Predict.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/PlayDefault.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/PlayDefault.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/PlayGreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/PlayGreen.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/PlayYellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/PlayYellow.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/PlugSocket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/PlugSocket.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/PlugSocketGreen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/PlugSocketGreen.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/PlugSocketOrange.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/PlugSocketOrange.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/StopDefault.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/StopDefault.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/StopYellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/StopYellow.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/basic_schedule.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
60 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/debug.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/del.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/del.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/edit.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/email.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
44 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/horizontal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/horizontal.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/horizontal_blur.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/horizontal_blur.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/icon.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/kill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/kill.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/line-chart.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
53 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/link.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
61 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/logo_rechts.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/logo_rechts.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/logomark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/logomark.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/logomark_doxygen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/logomark_doxygen.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/magic_wand.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
48 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/message.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/new_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/new_file.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/open_file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/open_file.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/output.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/output.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/output.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
46 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/parking.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
47 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/pause.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/pause.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/placeholder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/placeholder.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/plug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/plug.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/right.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/right.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/right_bot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/right_bot.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/run.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/save.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/save_as.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/save_as.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/screenshot-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/screenshot-1.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/socket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/socket.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/start.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/start_debug.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/start_debug.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/start_web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/start_web.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/stop.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/stop_exec.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/stop_exec.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/stop_process.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/PythonicOld/images/tmp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/tmp.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/upload_executable.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/upload_executable.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/upload_networkg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/upload_networkg.png
--------------------------------------------------------------------------------
/src/PythonicOld/images/vertical.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/images/vertical.png
--------------------------------------------------------------------------------
/src/PythonicOld/mastertool.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import (QWidget,
2 | QApplication,
3 | QFrame,
4 | QHBoxLayout, QAction,
5 | QVBoxLayout, QSizePolicy, QMenu, QMessageBox,
6 | QGridLayout, QSizeGrip, QTabWidget, QMenuBar,
7 | QLabel, QScrollArea, QGraphicsView, QGraphicsScene)
8 | from PyQt5.QtCore import (Qt, QMimeData, QByteArray, QDataStream, QPoint, QLocale,
9 | QDir, pyqtSignal, pyqtSlot, QRect, QTranslator, QEvent)
10 | from PyQt5.QtGui import (QDrag, QPixmap, QPainter,QColor,
11 | QScreen, QPainter)
12 |
13 | from PyQt5.QtCore import QCoreApplication as QC
14 | import sys, logging
15 | from Pythonic.workingarea import WorkingArea
16 | from Pythonic.menubar import MenuBar
17 | from Pythonic.executor import Executor
18 | from Pythonic.top_menubar import topMenuBar
19 |
20 |
21 | class MasterTool(QLabel):
22 |
23 | def __init__(self, parent, type, outputs):
24 | super().__init__(parent)
25 | self.type = type
26 | self.outputs = outputs
27 |
28 | def toolData(self):
29 | return((self.type, self.outputs))
30 |
31 |
--------------------------------------------------------------------------------
/src/PythonicOld/mltools.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import QFrame, QHBoxLayout
2 | from PyQt5.QtCore import Qt, QMimeData, QDir, pyqtSignal
3 | from PyQt5.QtGui import QDrag, QPixmap, QPainter,QColor
4 | import sys, logging, os, Pythonic
5 | from Pythonic.workingarea import WorkingArea
6 | from Pythonic.mastertool import MasterTool
7 |
8 | class MLTools(QFrame):
9 |
10 | reg_tool = pyqtSignal(tuple, name='register_tool_ml')
11 |
12 | def __init__(self, parent):
13 | super().__init__(parent)
14 | self.initUI()
15 |
16 | def initUI(self):
17 |
18 | self.setStyleSheet('background-color: silver')
19 | mod_path = os.path.dirname(Pythonic.__file__)
20 | """
21 | image_folder = QDir('images')
22 |
23 | if not image_folder.exists():
24 | logging.error('Image foulder not found')
25 | sys.exit(1)
26 | """
27 |
28 | self.layout_h = QHBoxLayout()
29 |
30 | self.svm = MasterTool(self, 'MLSVM', 1)
31 | self.svm.setPixmap(QPixmap(os.path.join(mod_path, 'images/MLSVM.png')).scaled(120, 60))
32 |
33 | self.svm_predict = MasterTool(self, 'MLSVM_Predict', 1)
34 | self.svm_predict.setPixmap(QPixmap(os.path.join(mod_path, 'images/MLSVM_Predict.png')).scaled(120, 60))
35 |
36 |
37 | self.layout_h.addWidget(self.svm)
38 | self.layout_h.addWidget(self.svm_predict)
39 | self.layout_h.addStretch(1)
40 |
41 | self.setLayout(self.layout_h)
42 |
43 | def mousePressEvent(self, event):
44 |
45 | child = self.childAt(event.pos())
46 | if not child:
47 | return
48 |
49 | pixmap = QPixmap(child.pixmap())
50 |
51 | mimeData = QMimeData()
52 | mimeData.setText(child.type)
53 |
54 | drag = QDrag(self)
55 | drag.setPixmap(child.pixmap())
56 | drag.setMimeData(mimeData)
57 | drag.setHotSpot(event.pos() - child.pos())
58 |
59 | tempPixmap = QPixmap(pixmap)
60 | painter = QPainter()
61 | painter.begin(tempPixmap)
62 | painter.fillRect(pixmap.rect(), QColor(127, 127, 127, 127))
63 | painter.end()
64 |
65 | child.setPixmap(tempPixmap)
66 |
67 | if drag.exec_(Qt.CopyAction | Qt.MoveAction, Qt.CopyAction) == Qt.MoveAction:
68 | child.close()
69 | else:
70 | child.show()
71 | child.setPixmap(pixmap)
72 |
73 | def register_tools(self):
74 | logging.debug('MLTools::register_tools() called')
75 | self.reg_tool.emit(self.svm.toolData())
76 | self.reg_tool.emit(self.svm_predict.toolData())
77 |
78 |
79 |
--------------------------------------------------------------------------------
/src/PythonicOld/return.py:
--------------------------------------------------------------------------------
1 | from masteritem import MasterItem
2 | from PyQt5.QtCore import Qt, QCoreApplication, pyqtSignal, QVariant
3 | from PyQt5.QtGui import QPixmap, QPainter, QColor
4 | from PyQt5.QtWidgets import QVBoxLayout, QLabel, QTextEdit, QWidget, QComboBox, QCheckBox
5 | import logging
6 | from time import sleep
7 |
8 |
9 | class ExecBranch(MasterItem):
10 |
11 | pixmap_path = 'images/branch.png'
12 |
13 | def __init__(self, row, column):
14 | self.row = row
15 | self.column = column
16 | super().__init__(self.row, self.column, QPixmap(self.pixmap_path), True)
17 | super().edit_sig.connect(self.edit)
18 | logging.debug('ExecBranch called at row {}, column {}'.format(row, column))
19 |
20 | def __setstate__(self, state):
21 | logging.debug('__setstate__() called ExecBranch')
22 | self.row, self.column = state
23 | super().__init__(self.row, self.column, QPixmap(self.pixmap_path), True)
24 |
25 | def __getstate__(self):
26 | logging.debug('__getstate__() called ExecBranch')
27 | return (self.row, self.column)
28 |
29 |
30 | def edit(self):
31 | logging.debug('edit() called ExecBranch')
32 | self.branchEditLayout = QVBoxLayout()
33 |
34 | self.branchEdit = QWidget(self)
35 | self.branchEdit.setMinimumSize(500, 400)
36 | self.branchEdit.setWindowFlags(Qt.Window)
37 | self.branchEdit.setWindowModality(Qt.WindowModal)
38 | self.branchEdit.setWindowTitle('Edit Branch')
39 |
40 |
41 | self.selectCondition = QComboBox()
42 | self.selectCondition.addItem('Greater than (>) ...', QVariant('>'))
43 | self.selectCondition.addItem('Greater or equal than (>=) ...', QVariant('>='))
44 | self.selectCondition.addItem('Less than (<) ...', QVariant('<'))
45 | self.selectCondition.addItem('Less or equal than (<=) ...', QVariant('<='))
46 | self.selectCondition.addItem('equal to (==) ...', QVariant('=='))
47 | self.selectCondition.addItem('NOT equal to (!=) ...', QVariant('!='))
48 |
49 | self.checkNegate = QCheckBox('Negate query (if NOT ... )')
50 | self.checkNegate.stateChanged.connect(self.negate_changed)
51 | self.if_text_1 = QLabel()
52 | self.if_text_1.setText('if INPUT is ...')
53 |
54 | self.branchEditLayout.addWidget(self.checkNegate)
55 | self.branchEditLayout.addWidget(self.if_text_1)
56 | self.branchEditLayout.addWidget(self.selectCondition)
57 | self.branchEditLayout.addStretch(1)
58 | self.branchEdit.setLayout(self.branchEditLayout)
59 | self.branchEdit.show()
60 |
61 | def negate_changed(self, e):
62 | logging.debug('state changed : {}'.format(e))
63 | if e == 2:
64 | self.if_text_1.setText('if NOT INPUT is ...')
65 | else:
66 | self.if_text_1.setText('if INPUT is ...')
67 |
68 |
69 | def execute(self, data):
70 | logging.info('execute() called at Item {} {}'.format(self.row, self.column))
71 | self.highlightStart()
72 | QCoreApplication.processEvents()
73 | sleep(1)
74 | self.highlightStop()
75 | QCoreApplication.processEvents()
76 |
77 | output = ('output from ExecOp')
78 | target = (self.row, self.column+1)
79 | return (target, output)
80 |
81 |
82 |
--------------------------------------------------------------------------------
/src/PythonicOld/script.py:
--------------------------------------------------------------------------------
1 | #!/usr/local/bin/python3
2 |
3 | import sys, os, Pythonic
4 | from subprocess import Popen
5 |
6 | def run():
7 |
8 | cwd = os.path.dirname(Pythonic.__file__)
9 | path = os.path.join(cwd, 'main.py')
10 |
11 | if os.name == 'nt':
12 | Popen(['python', path])
13 | else:
14 | Popen(['python3', path])
15 |
16 |
--------------------------------------------------------------------------------
/src/PythonicOld/scriptd.py:
--------------------------------------------------------------------------------
1 | #!/usr/local/bin/python3
2 |
3 | import os, sys, Pythonic
4 | from Pythonic.main_daemon import MainWorker
5 | from PyQt5.QtCore import QCoreApplication, QTimer
6 |
7 | def run():
8 |
9 | app = QCoreApplication(sys.argv)
10 |
11 | ex = MainWorker(app)
12 | ex.start(sys.argv)
13 |
14 | app.exec_()
15 |
--------------------------------------------------------------------------------
/src/PythonicOld/settings.py:
--------------------------------------------------------------------------------
1 | from PyQt5.QtWidgets import (QWidget,
2 | QApplication,
3 | QFrame, QPushButton, QTextEdit,
4 | QHBoxLayout, QAction, QMainWindow, QLineEdit,
5 | QVBoxLayout, QSizePolicy, QMenu, QMessageBox,
6 | QGridLayout, QSizeGrip, QTabWidget, QMenuBar,
7 | QLabel, QScrollArea, QGraphicsView, QGraphicsScene)
8 | from PyQt5.QtCore import (Qt, QMimeData, QByteArray, QDataStream, QPoint, QLocale,
9 | QThreadPool, QDir, pyqtSignal, pyqtSlot, QRect, QTranslator, QEvent)
10 | from PyQt5.QtGui import (QDrag, QPixmap, QPainter,QColor,
11 | QScreen, QPainter, QFont, QIntValidator)
12 |
13 | from PyQt5.QtCore import QCoreApplication as QC
14 | import sys, logging
15 | from Pythonic.elementeditor import ElementEditor
16 |
17 | class Settings(QWidget):
18 |
19 | def __init__(self):
20 |
21 | logging.debug('__init__() called SettingsWindow')
22 | super().__init__()
23 |
24 | self.delay = 500
25 |
26 | def show(self):
27 |
28 | logging.debug('edit() called ExecReturn')
29 | self.settingsLayout = QVBoxLayout()
30 | self.delayRow = QWidget()
31 | self.delayRowLayout = QHBoxLayout()
32 |
33 | self.window = ElementEditor(self)
34 | self.window.setWindowTitle(QC.translate('', 'Settings'))
35 |
36 | self.top_text = QLabel()
37 | self.top_text.setText(QC.translate('', 'Debug delay:'))
38 |
39 | self.delay_text = QLabel()
40 | self.delay_text.setText(QC.translate('', 'Milliseconds'))
41 |
42 | self.delayInput = QLineEdit()
43 | self.delayInput.setValidator(QIntValidator(0, 9999))
44 | self.delayInput.setText(str(self.delay))
45 |
46 | self.delayRowLayout.addWidget(self.delayInput)
47 | self.delayRowLayout.addWidget(self.delay_text)
48 | self.delayRowLayout.addStretch(1)
49 |
50 | self.delayRow.setLayout(self.delayRowLayout)
51 |
52 | self.confirm_button = QPushButton(QC.translate('', 'Ok'))
53 |
54 | self.confirm_button.clicked.connect(self.window.closeEvent)
55 | self.window.window_closed.connect(self.edit_done)
56 |
57 | self.settingsLayout.addWidget(self.top_text)
58 | self.settingsLayout.addWidget(self.delayRow)
59 | self.settingsLayout.addStretch(1)
60 | self.settingsLayout.addWidget(self.confirm_button)
61 | self.window.setLayout(self.settingsLayout)
62 | self.window.show()
63 |
64 |
65 | def edit_done(self):
66 | logging.debug('edit_done() called : delay {} MS'.format(self.delayInput.text()))
67 | self.delay = int(self.delayInput.text())
68 |
69 |
--------------------------------------------------------------------------------
/src/PythonicOld/stack.obj:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/stack.obj
--------------------------------------------------------------------------------
/src/PythonicOld/test.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/test.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/test_fp.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/test_fp.pyc
--------------------------------------------------------------------------------
/src/PythonicOld/translations/chinese_cn.qm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/chinese_cn.qm
--------------------------------------------------------------------------------
/src/PythonicOld/translations/cn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/cn.png
--------------------------------------------------------------------------------
/src/PythonicOld/translations/de.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/de.png
--------------------------------------------------------------------------------
/src/PythonicOld/translations/en.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/en.png
--------------------------------------------------------------------------------
/src/PythonicOld/translations/english_en.qm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/english_en.qm
--------------------------------------------------------------------------------
/src/PythonicOld/translations/english_en.qph:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Save as ...
5 | Save as ...
6 |
7 |
8 | Crypto Fox
9 | Crypto Fox
10 |
11 |
12 | Save
13 | Save
14 |
15 |
16 | de
17 | German
18 |
19 |
20 | es
21 | Spanish
22 |
23 |
24 | cn
25 | Chinese
26 |
27 |
28 | en
29 | English
30 |
31 |
32 | Run
33 | Run
34 |
35 |
36 | Start debug
37 | Start debug
38 |
39 |
40 | Do you want to save changes?
41 | Do you want to save changes?
42 |
43 |
44 | Close?
45 | Close?
46 |
47 |
48 | Save workflow
49 | Save workflow
50 |
51 |
52 | New workflow
53 | New workflow
54 |
55 |
56 | Warning: Execution of all tasks will be stopped!
57 | Warning: Execution of all tasks will be stopped!
58 |
59 |
60 | Open workflow
61 | Open workflow
62 |
63 |
64 | File
65 | File
66 |
67 |
68 | Language
69 | Language
70 |
71 |
72 | Info
73 | Info
74 |
75 |
76 |
--------------------------------------------------------------------------------
/src/PythonicOld/translations/es.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/es.png
--------------------------------------------------------------------------------
/src/PythonicOld/translations/german_de.qm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/german_de.qm
--------------------------------------------------------------------------------
/src/PythonicOld/translations/spanish_es.qm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/PythonicOld/translations/spanish_es.qm
--------------------------------------------------------------------------------
/src/RPI/code-server.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Web based IDE
3 |
4 | [Service]
5 | Type=simple
6 | User=pythonic
7 | ExecStart=/usr/bin/code-server /home/pythonic/Pythonic/executables
8 |
9 | [Install]
10 | WantedBy=network-online.target
--------------------------------------------------------------------------------
/src/RPI/config.yaml:
--------------------------------------------------------------------------------
1 | bind-addr: 0.0.0.0:8000
2 | auth: none
3 | cert: false
4 | user-data-dir: /home/pythonic
5 | extensions-dir: /home/pythonic/extensions
6 | disable-update-check: true
7 | disable-telemetry: true
8 |
--------------------------------------------------------------------------------
/src/RPI/pythonic.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Python automation framework
3 |
4 | [Service]
5 | Type=simple
6 | User=pythonic
7 | WorkingDirectory=/home/pythonic/.local/lib/python3.7/site-packages/Pythonic
8 | ExecStart=/usr/bin/python3 -m debugpy --listen 5678 main.py
9 |
10 | [Install]
11 | WantedBy=network-online.target
12 |
--------------------------------------------------------------------------------
/src/__pycache__/__init__.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/__pycache__/__init__.cpython-37.pyc
--------------------------------------------------------------------------------
/src/__pycache__/script.cpython-37.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hANSIc99/Pythonic/6b3608f5d4c42e8fda497473f3e5aeb10c990636/src/__pycache__/script.cpython-37.pyc
--------------------------------------------------------------------------------
/src/attach.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | podman exec -it Pythonic /bin/sh
--------------------------------------------------------------------------------
/src/code-server/.gitignore:
--------------------------------------------------------------------------------
1 | .vsix
2 | .rpm
3 |
--------------------------------------------------------------------------------
/src/code-server/config.yaml:
--------------------------------------------------------------------------------
1 | bind-addr: 0.0.0.0:8000
2 | auth: none
3 | cert: false
4 | user-data-dir: /root
5 | extensions-dir: /root/extension
6 | disable-update-check: true
7 | disable-telemetry: true
8 |
--------------------------------------------------------------------------------
/src/code-server/download.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cd "${0%/*}"
3 |
4 |
5 | if [ -f "code-server-3.8.0-amd64.rpm" ]; then
6 | echo "code-server-3.8.0-amd64.rpm exists."
7 | else
8 | echo "Download code-server-3.8.0-amd64.rpm"
9 | curl -LJ0 https://github.com/cdr/code-server/releases/download/v3.8.0/code-server-3.8.0-amd64.rpm -o code-server-3.8.0-amd64.rpm
10 | fi
11 |
12 |
13 |
14 |
15 |
16 | if [ -f "ms-python-release.vsix" ]; then
17 | echo "ms-python-release.vsix exists."
18 | else
19 | echo "Download ms-python-release.vsix"
20 | curl -LJ0 https://github.com/microsoft/vscode-python/releases/download/2020.10.332292344/ms-python-release.vsix -o ms-python-release.vsix
21 | fi
22 |
23 |
24 |
25 | if [ -f "ms-python.vscode-pylance-2020.12.2.vsix" ]; then
26 | echo "ms-python.vscode-pylance-2020.12.2.vsix exists."
27 | else
28 | echo "Download ms-python.vscode-pylance-2020.12.2.vsix"
29 | curl -LJ0 "https://www.vsixhub.com/go.php?post_id=32420&s=publish&link=https%3A%2F%2Ff.vsixhub.com%2Ffile.php%3Fpost_id%3D32420%26app_id%3D364d2426-116a-433a-a5d8-a5098dc3afbd%26version%3D2020.12.2%26ext_name%3Dvscode-pylance" -o ms-python.vscode-pylance-2020.12.2.vsix
30 | fi
31 |
32 |
33 | #
34 |
35 | #
--------------------------------------------------------------------------------
/src/code-server/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "extensions.autoUpdate" :false,
3 | "extensions.autoCheckUpdates": false
4 | }
--------------------------------------------------------------------------------
/src/run.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | podman run -d --name Pythonic -p 7000:7000 -p 8000:8000 pythonic:1.5
4 |
--------------------------------------------------------------------------------
/src/supervisor/supervisord.conf:
--------------------------------------------------------------------------------
1 | [supervisord]
2 | nodaemon=true
3 | user=root
4 | childlogdir=/var/log/
5 | loglevel=info
6 | logfile=/var/log/supervisord.log
7 | logfile_maxbytes=50MB
8 | logfile_backups=10
9 |
10 |
11 | [unix_http_server]
12 | file = /var/run/supervisor.sock
13 |
14 | [rpcinterface:supervisor]
15 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
16 |
17 |
18 | [program:pythonic]
19 | command=/usr/local/bin/Pythonic
20 | user=root
21 | stderr_logfile_maxbytes=50MB
22 | stderr_logfile_backups=10
23 | stderr_logfile=/var/log/pythonic-stderr.log
24 |
25 |
26 | [program:codeserver]
27 | command=/usr/bin/code-server /root/Pythonic/executables
28 | user=root
29 | stdout_logfile_maxbytes=50MB
30 | stdout_logfile_backups=10
31 | stderr_logfile_maxbytes=50MB
32 | stderr_logfile_backups=10
33 | stdout_logfile=/var/log/code-server-stdout.log
34 | stderr_logfile=/var/log/code-server-stderr.log
--------------------------------------------------------------------------------