Distributed and decentralized pi calculation

greg

+52 -2
+1 -1
.gitignore
··· 157 157 # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 158 158 # and can be added to the global gitignore or merged into this file. For a more nuclear 159 159 # option (not recommended) you can uncomment the following to ignore the entire idea folder. 160 - #.idea/ 160 + #.idea/
+1
src/client/client.py
··· 14 14 print("By continuing, you agree to these terms, disclaimers, and acknowledge that there is NO WARRANTY.") 15 15 input("I agree, and would like to continue. (to continue, press enter) ") 16 16 print("Thanks for confirming! I just need one more thing.") 17 + print("Make sure you trust the server! I do not control any of them and am not responsible for anything on external websites and/or servers.") 17 18 server = input("What is the server URL that you'd like to connect to? (ex: https://example.com, http://localhost:5000) ") 18 19 print("Alright! Thanks. Let the calculating begin :D (to exit, run ctrl+c or close terminal)") 19 20 print("-------------------")
+5 -1
src/server/app.py
··· 42 42 if request.method == 'GET': 43 43 return render_template('index.html', pi=piresult, name=name, email=email) 44 44 else: 45 - return "Please use GET to access this page." 45 + return "Please use GET to access this page." 46 + 47 + @app.errorhandler(404) 48 + def page_not_found(error): 49 + return render_template('404.html'), 404
+1
src/server/setup.py
··· 7 7 8 8 You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.""") 9 9 print("By continuing, you agree to these terms, disclaimers, and acknowledge that there is NO WARRANTY.") 10 + print("Security is not guarenteed. I am not responsible for ANY damages or attempts of damages to ANY computer, phone, or device running Pistributed's client or server.") 10 11 input("I agree, and would like to continue. (to continue, press enter)") 11 12 email = input("What email would you like to display for server support? THIS WILL BE MADE PUBLIC" ) 12 13 called = input("What would you like to be called? (ex: Wish) THIS WILL BE MADE PUBLIC ")
+28
src/server/templates/404.html
··· 1 + <!DOCTYPE html> 2 + <html lang="en"> 3 + <head> 4 + <meta charset="UTF-8"> 5 + <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 + <title>404</title> 7 + <style> 8 + * { 9 + font-family: "Roboto", sans-serif; 10 + font-optical-sizing: auto; 11 + color: white; 12 + text-align: center; 13 + font-style: normal; 14 + font-variation-settings: "wdth" 100; 15 + } 16 + body { 17 + background-color: black; 18 + } 19 + </style> 20 + <link rel="preconnect" href="https://fonts.googleapis.com"> 21 + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 22 + <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> 23 + </head> 24 + <body> 25 + <h1>Pistributed - 404</h1> 26 + <p>The page couldn't be found. Sorry!</p> 27 + </body> 28 + </html>
+16
src/server/templates/index.html
··· 4 4 <meta charset="UTF-8"> 5 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 6 <title>Pistributed Home</title> 7 + <style> 8 + * { 9 + font-family: "Roboto", sans-serif; 10 + font-optical-sizing: auto; 11 + color: white; 12 + text-align: center; 13 + font-style: normal; 14 + font-variation-settings: "wdth" 100; 15 + } 16 + body { 17 + background-color: black; 18 + } 19 + </style> 20 + <link rel="preconnect" href="https://fonts.googleapis.com"> 21 + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> 22 + <link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet"> 7 23 </head> 8 24 <body> 9 25 <h1>Pistrubuted 1.0</h1>