Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Superalgos/Superalgos in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
Awhiteweb committed May 5, 2023
2 parents c117f3f + 998506b commit 47a7358
Show file tree
Hide file tree
Showing 326 changed files with 7,818 additions and 1,433 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ debug.log
*.db
Projects/Foundations/Icons/Thumbs.db
*.bat
# exception for installer batch
!clone_superalgos.bat
!launch-windows.bat
!create-shortcut-windows.bat
!uninstall-shortcut-windows.bat
*.exe
# exception for installer
!superalgos.exe
node_modules
launch.json
package-lock.json
Expand Down Expand Up @@ -51,4 +55,4 @@ Platform/WebServer/externalScripts/jquery-ui.js
Platform/WebServer/externalScripts/jquery-3.6.0.js

# Temporary translations
*_translated.json
*_translated.json
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"**/node_modules": true,
"**/My-Social-Trading-Data": true,
"**/My-Network-Nodes-Data": true,
// "**/My-Workspaces": true,
"**/My-Workspaces": true,
"**/My-Secrets": true,
"**/My-Data-Storage": true,
"**/My-Log-Files": true,
Expand Down
22 changes: 7 additions & 15 deletions Bitcoin-Factory/DockerBuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
# Use the official tensorflow latest with gpu and jupyter notebook
FROM tensorflow/tensorflow:latest-gpu-jupyter

RUN apt-get update && apt-get install -y python3-pip
RUN pip3 install --upgrade pip
# Set the working directory in the container
WORKDIR /app

RUN pip3 install -U scikit-learn
RUN pip3 install pandas
RUN pip3 install ray[all]
RUN pip3 install torch
RUN pip3 install torchvision
RUN pip3 install tabulate
RUN pip3 install tensorboard
RUN pip3 install tensorflow
RUN pip3 install sklearn
RUN pip3 install gym
# Copy the requirements file to the container
COPY requirements.txt .

# RUN nohup bash -c "ray start --head --port 6379 --num-gpus=1 &" && sleep 8 # will be used for ray cluster
# Install the necessary libraries
RUN pip install --no-cache-dir -r requirements.txt


# RUN pip install notebook
# RUN pip install matplotlib
10 changes: 10 additions & 0 deletions Bitcoin-Factory/DockerBuild/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
scikit-learn==0.24.2
pandas==1.3.4
ray[all]==1.7.0
torch==1.9.0
torchvision==0.10.0
tabulate==0.8.9
tensorboard==2.7.0
tensorflow==2.7.0
tensorflow-probability==0.14.1
gym==0.17.3
4 changes: 2 additions & 2 deletions Bitcoin-Factory/Test-Client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The Test Client and Test Server interact in a p2p way via the Superalgos Network

## App Setup

The current version of Bitcoin Factory is already integrated into Superalgos. You need to load the Bitcoin Factory Demo Plugin workspace, and from there you will run the Test Client task.
The current version of Bitcoin Factory is already integrated into Superalgos. You need to load the Bitcoin Factory Demo Sample Workspace, and from there you will run the Test Client task.

## Setting up your Superalgos Profile and the Task to run

Expand Down Expand Up @@ -244,7 +244,7 @@ IMPORTANT NOTES:
Now you are ready to get things rolling! You will need to open two terminals. One to run the docker container and the other to run the Test-Client Task within the Superalgos Platform.

- First run the Docker Container (See below in the "Instructions for each OS" section).
- Then run the Test Client Task located at the Bitcoin Factory Demo Plugin Workspace.
- Then run the Test Client Task located at the Bitcoin Factory Demo Sample Workspace.

### Docker Container Terminal Output
Once the docker container is running correctly you will see at the first terminal an output similar to this:
Expand Down
2 changes: 1 addition & 1 deletion Dashboards/DashboardsApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.newDashboardsApp = function newDashboardsApp() {

process.on('uncaughtException', function (err) {
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
SA.logger.error("The Superalgos Dashboards Client cannot be started. Reason: the port configured migth be being used by another application, or Superalgos Dashboards Client might be already running.")
SA.logger.error("The Superalgos Dashboards Client cannot be started. Reason: the port configured might be being used by another application, or Superalgos Dashboards Client might be already running.")
return
}
SA.logger.error('Dashboards App -> uncaughtException -> err.message = ' + err.message)
Expand Down
6 changes: 3 additions & 3 deletions Network/NetwokApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ exports.newNetworkApp = function newNetworkApp() {
thisObject.webSocketsInterface.initialize()
SA.logger.info('Network Node Web Sockets Interface ........................................... Listening at port ' + NT.networkApp.p2pNetworkNode.node.networkInterfaces.websocketsNetworkInterface.config.webSocketsPort)
}
/*
TODO this breaks the network if uncommented with a complete p2p node tree setted up
/*
TODO this breaks the network if uncommented with a complete p2p node tree setted up
if (
thisObject.p2pNetworkNode.node.networkInterfaces !== undefined &&
thisObject.p2pNetworkNode.node.networkInterfaces.webrtcNetworkInterface !== undefined
Expand All @@ -132,7 +132,7 @@ TODO this breaks the network if uncommented with a complete p2p node tree setted
thisObject.webSocketsInterface.initialize()
SA.logger.info('Network Node Web Sockets Interface ........................................... Interface Node Id ' + '')
}
*/
*/
if (
thisObject.p2pNetworkNode.node.networkInterfaces !== undefined &&
thisObject.p2pNetworkNode.node.networkInterfaces.httpNetworkInterface !== undefined
Expand Down
12 changes: 6 additions & 6 deletions Platform/Client/Http-Routes/list-workspaces.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ exports.newListWorkspacesRoute = function newListWorkspacesRoute() {

for(let i = 0; i < projects.length; i++) {
let project = projects[i]
readPluginWorkspaces()
readSampleWorkspaces()

function readPluginWorkspaces() {
let pluginName = project
if(global.env.PROJECT_PLUGIN_MAP[project] && global.env.PROJECT_PLUGIN_MAP[project].dir) pluginName = global.env.PROJECT_PLUGIN_MAP[project].dir
let dirPath = global.env.PATH_TO_PLUGINS + '/' + pluginName + '/Workspaces'
function readSampleWorkspaces() {
let sampleName = project
if(global.env.PROJECT_PLUGIN_MAP[project] && global.env.PROJECT_PLUGIN_MAP[project].dir) sampleName = global.env.PROJECT_PLUGIN_MAP[project].dir
let dirPath = global.env.PATH_TO_PLUGINS + '/' + sampleName + '/Workspaces'
try {
fs.readdir(dirPath, onDirRead)

Expand All @@ -34,7 +34,7 @@ exports.newListWorkspacesRoute = function newListWorkspacesRoute() {
//SA.logger.warn('Error reading a directory content. filePath = ' + dirPath)
} else {
for(let i = 0; i < fileList.length; i++) {
let name = 'Plugin \u2192 ' + fileList[i]
let name = 'Sample \u2192 ' + fileList[i]
updatedFileList.push([project, name])
}
}
Expand Down
2 changes: 1 addition & 1 deletion Platform/Client/Http-Routes/save-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports.newSavePluginRoute = function newSavePluginRoute() {
let plugin = JSON.parse(body)
let project = requestPath[2]
let folder = requestPath[3]
let fileName = requestPath[4]
let fileName = decodeURI(requestPath[4])
let pluginName = global.env.PROJECT_PLUGIN_MAP[project].dir || project
let filePath = global.env.PATH_TO_PLUGINS + '/' + pluginName + '/' + folder
let fileContent = JSON.stringify(plugin, undefined, 4)
Expand Down
2 changes: 1 addition & 1 deletion Platform/PlatformApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.newPlatformApp = function newPlatformApp() {

process.on('uncaughtException', function (err) {
if (err.message && err.message.indexOf("EADDRINUSE") > 0) {
SA.logger.info("The Superalgos Platform Client cannot be started. Reason: the port configured migth be being used by another application, or Superalgos Platform Client might be already running.")
SA.logger.info("The Superalgos Platform Client cannot be started. Reason: the port configured might be being used by another application, or Superalgos Platform Client might be already running.")
return
}
SA.logger.error('Platform App -> uncaughtException -> err.message = ' + err.message)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "Plugin P2P-Networks",
"type": "Plugin P2P Networks",
"menuItems": [
{
"action": "Add Missing Plugin P2P Networks",
Expand All @@ -13,6 +13,16 @@
"actionFunction": "payload.executeAction",
"actionProject": "Community-Plugins"
},
{
"action": "Add Specified P2P Network",
"label": "Add Specified P2P Network",
"iconPathOn": "p2p-network",
"iconPathOff": "p2p-network",
"iconProject": "Network",
"actionProject": "Network",
"dontShowAtFullscreen": true,
"actionFunction": "payload.executeAction"
},
{
"action": "Delete UI Object",
"actionProject": "Visual-Scripting",
Expand All @@ -30,6 +40,9 @@
"attachingRules": {
"compatibleTypes": "->Plugin Project->"
},
"editors": {
"list": true
},
"childrenNodesProperties": [
{
"name": "pluginFiles",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
{
"name": "pluginP2PNetworks",
"type": "node",
"childType": "Plugin P2P-Networks",
"childType": "Plugin P2P Networks",
"autoAdd": false
}
],
Expand Down
18 changes: 9 additions & 9 deletions Projects/Education/UI/Spaces/Tutorial-Space/TutorialSpace.js
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ function newEducationTutorialSpace() {
let tutorial = {
status: 'Skipped'
}
UI.projects.foundations.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
UI.projects.education.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
advance(true)
doUpdateTutorialDiv = true
}
Expand All @@ -837,10 +837,10 @@ function newEducationTutorialSpace() {
Reset the Status of Current and Previous Node
so that RESUME goes to the right node.
*/
UI.projects.foundations.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
UI.projects.education.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
previousNode = navigationStack[navigationStack.length - 3]
if (previousNode !== undefined) {
UI.projects.foundations.utilities.tutorial.saveTutorial(previousNode.payload, tutorial)
UI.projects.education.utilities.tutorial.saveTutorial(previousNode.payload, tutorial)
}
previousNode = navigationStack[navigationStack.length - 2]
switch (previousNode.type) {
Expand Down Expand Up @@ -878,7 +878,7 @@ function newEducationTutorialSpace() {
let tutorial = {
status: 'Done'
}
UI.projects.foundations.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
UI.projects.education.utilities.tutorial.saveTutorial(currentNode.payload, tutorial)
advance()
doUpdateTutorialDiv = true
}
Expand Down Expand Up @@ -1051,15 +1051,15 @@ function newEducationTutorialSpace() {
let tutorial = {
status: 'Reset'
}
UI.projects.foundations.utilities.tutorial.saveTutorial(tutorialStep.payload, tutorial)
UI.projects.education.utilities.tutorial.saveTutorial(tutorialStep.payload, tutorial)
}

for (let i = 0; i < node.tutorialTopics.length; i++) {
let tutorialTopic = node.tutorialTopics[i]
let tutorial = {
status: 'Reset'
}
UI.projects.foundations.utilities.tutorial.saveTutorial(tutorialTopic.payload, tutorial)
UI.projects.education.utilities.tutorial.saveTutorial(tutorialTopic.payload, tutorial)
resetNextNode(tutorialTopic)
}
}
Expand Down Expand Up @@ -1129,7 +1129,7 @@ function newEducationTutorialSpace() {
let tutorial = {
status: undefined
}
UI.projects.foundations.utilities.tutorial.loadTutorial(tutorialStep.payload, tutorial)
UI.projects.education.utilities.tutorial.loadTutorial(tutorialStep.payload, tutorial)
currentNode = tutorialStep
currentStatus = 'Playing Step'
navigationStack.push(currentNode)
Expand Down Expand Up @@ -1165,7 +1165,7 @@ function newEducationTutorialSpace() {
let tutorial = {
status: undefined
}
UI.projects.foundations.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
UI.projects.education.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
currentNode = tutorialTopic
currentStatus = 'Playing Topic'
navigationStack.push(currentNode)
Expand Down Expand Up @@ -1204,7 +1204,7 @@ function newEducationTutorialSpace() {
let tutorial = {
status: undefined
}
UI.projects.foundations.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
UI.projects.education.utilities.tutorial.loadTutorial(tutorialTopic.payload, tutorial)
currentNode = tutorialTopic
currentStatus = 'Playing Topic'
navigationStack.push(currentNode)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function newFoundationsUtilitiesTutorial() {
function newEducationUtilitiesTutorial() {
let thisObject = {
saveTutorial: saveTutorial,
loadTutorial: loadTutorial
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@
{
"style": "Chapter",
"text": "XIX->Foundations->Topic->Volume Tools Data Mine->"
},
{
"style": "Chapter",
"text": "XX->Foundations->Topic->Aggregated Data Mine->"
}
]
}
Loading

0 comments on commit 47a7358

Please sign in to comment.