Distributed and decentralized pi calculation

update setup

+15 -4
+3 -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/ 161 + 162 + picalc/
+1 -1
src/server/picalc/pi.txt
··· 1 - 3.1415926535897932384626433832795028841971693993751058209749445924 1 + No clients have connected yet. Become one of the first!
+11 -2
src/server/setup.py
··· 1 + import os.path 1 2 print("Welcome to Pistributed Server Setup.") 2 3 print("Do not run on unsecure or slow servers. Do not run on servers you don't own or have control over*. You may get lots of requests to your server. This depends if lots of people are using your Pistributed server.") 3 4 print("*having control over requires permission if there is a server owner that isn't yourself.") ··· 8 9 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 10 print("By continuing, you agree to these terms, disclaimers, and acknowledge that there is NO WARRANTY.") 10 11 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.") 12 + print("Please run setup.py in the directory the server file is in <3") 11 13 input("I agree, and would like to continue. (to continue, press enter)") 12 - email = input("What email would you like to display for server support? THIS WILL BE MADE PUBLIC" ) 14 + email = input("What email would you like to display for server support? THIS WILL BE MADE PUBLIC ") 13 15 called = input("What would you like to be called? (ex: Wish) THIS WILL BE MADE PUBLIC ") 14 16 print("Thank you! Creating a .env file... Make sure to run server.py when you are ready!") 15 17 with open(".env", "w") as file: 16 - file.write("EMAIL=" + email + "\nNAME=" + called) 18 + file.write("EMAIL=" + email + "\nNAME=" + called) 19 + isExist = os.path.exists("picalc") 20 + if not isExist: 21 + os.makedirs("picalc") 22 + print("Picalc not found, creating") 23 + with open("picalc/pi.txt", "w") as pifile: 24 + pifile.write("No clients have connected yet. Become one of the first!") 25 + print("Created picalc/pi.txt successfully. Do NOT edit this file!")