dfilimon / jeopy Goto Github PK
View Code? Open in Web Editor NEWA small quiz platform for setting up games on a local network. Written in PyQt + Pyro + Matplotlib.
A small quiz platform for setting up games on a local network. Written in PyQt + Pyro + Matplotlib.
The server crashes on a Debian on 64bits.
Previous versions of Jeopy had a house-cleaning script called AdminLauncher.py that started:
pyro-ns
and then the AdminGui.
Start the Pyro name server and close it when AdminGui terminates.
Tips:
Every item is considered a string unless otherwise specified. When adding an item to the table, need to know which is the score and set its type accordingly.
Fix:
Follow the instructions here:
The name that is given as a login should be hashed somehow to be able to contain special characters.
Look into self.connectDaemon() from line 60 in Server.py and specifically in GameServer.py at line 92 (find it in PlayerServer.py):
self.uri = self.daemon.connect(Game(self), self.name)
Fix:
That /should/ do it.
To avoid manually having to write the
rules.json
file, write a small GUI application to edit a game.
It should at least support:
Tips:
Fix:
Add QMessageBox in login() at Line 26 in LineDialog.py
Some people don't use it because it doesn't run on Windows.
Find out what packages are needed to make Jeopy properly work in Windows. In particular, matplotlib...
Mihai & Florin
2 exerciții fiecare
Code is messy, needs fixup to indentation.
3.0 compatibility.
Find a better solution that works all the time.
Maybe even split this across cases and in a separate file.
Currently it does this [line 28, Server.py]:
self.ip = [ip for ip in socket.gethostbyname_ex(socket.gethostname())[2] if not ip.startswith("127.")][0]
Fix:
Investigate a better solution. Maybe there is a Python package that can help.
Update: Yes, use netifaces,
Plots are currently rendered @ 400 dpi (or more!) causing incredible slowdowns. Perhaps adjusting to a lower value would enable the GUI to remain responsive.
Score is being sorted alphabetically, not by integer.
Server crashes when a client exists the game.
Reproduce steps:
Start server.
Start two clients.
Server chooses a question.
Client number 1 chooses to answer that question. (On the server-side, a popup appears asking if the answer is correct or no).
Client 1 disconnects. (halt, init 0 or looses his LAN connectivity)
Server chooses that the answer is correct.
Effect:
After choosing the answer is correct the server hangs (100% CPU usage) and crashes in less than 1 minute.
If all players fail due to various errors, the GameServer cannot recover from the error.
raise ValueError, "empty range for randrange() (%d,%d, %d)" % (istart, istop, width)
When preparing to advance to the next question, when selecting the random range, the range will be empty and the exception is not caught.
Fix: Do not allow advancing to the next question unless there is at least one person online.
Look into introducing a logger module and printing debug information to it.
Possibly include it in a different class and import it in every other module to have logging support everywhere.
Some nicknames are invalid (example some.thing - the dot). Need name checker before joining game.
And it would be nice to be able to change nickname.
Have user click on all available buttons for question selection. Then have the server select one of them. All of the other ones are lost.
It is currently hard-coded at 100 at line 155 in Gui.py.
100 generates 800x600.
Fix:
Think a bit about what dots per inch means - 300 dpi is used for saveScoresPng() to yield a resolution of 3_800 x 3_600 = 2400 x 1200.
What about 1024x768? (1024/800 = 1.28 => 128 dpi).
Make the formula work for the size of the canvas (the size is in the Gui object itself; check setupGui!)
A lot or restarts of the server need to be done in order for everyone to sync and join. This could be solved if anyone could join/part at any time.
Have it support custom dpi, labels [on/off], filename.
Required for saving scores as PNG at higher resolution + labels.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.