You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Daniel Beadle 5b50257ec6 Fix inline code syntax 1 year ago
app More database migratiosn 1 year ago
tests More database migratiosn 1 year ago
.gitignore Ignore our new database files 1 year ago Fix inline code syntax 1 year ago More database migratiosn 1 year ago
conf.wsgi Add conf.wsgi for Apache 1 year ago Finish migrating DB to config defined value 1 year ago add testing config 1 year ago 2,988 miles worth of code 1 year ago
game_data Add tavern testing to requirements.txt 1 year ago
game_data_dev Fix config db reference 1 year ago Fix config db reference 1 year ago
requirements.txt Add tavern testing to requirements.txt 1 year ago 2,988 miles worth of code 1 year ago

Hi Fugue! Thanks for taking the time to consider my application. I've had some fun with it and I hope to hear from you soon!

Running the Client

The client is a single Python script, aptly named ‘’. I have set up the server on a virtual machine running at so you can try it quickly. Instructions for running the server (pretty standard for Flask) are also included below.

  1. Install the venerable requests package either in a virtual environment or outside of it (if you like living dangerously)

  2. Activate your virtual environment (if necessary)

  3. Run the client and follow the instructions on the screen.


Q: How can I change what server the client points to?

Modify the variable at the top of called “HOST”.

Q: Can I see the high scores?

Yes! The top ten games that were successfully guessed the fastest appear here.

Q: Can I see the results of all the games?


Q: What's the function called “numberwang”?

Numberwang is a recurring sketch in Series 1 and 2 of That Mitchell and Webb Look. It is a fictional television series in which the two contestants call out seemingly random numbers which are occasionally told to be Numberwang.


Will determining if a number is numberwang help you guess the answer? No. Will it be a useless waste of your guesses? Yes. Will the numberwang() function always return the same answer? Also no.

It's probably best if you watch the sketch for yourself.

Setting up the server

Prerequisites Python3 and Pip (install guide), virtualenv (install guide), and git (another install guide).

  1. Clone the repository

  2. Navigate to the repository's top level (the level with ‘’, ‘requirements.txt’, the folder ‘app’, etc)

  3. Create a virtual environment with python 3 and enter it (guide here)

  4. Install the required python packages from requirements.txt (guide here)

  5. Set the Flask environment variables as follows

Unix / Mac OS:

export FLASK_ENV=development
export FLASK_APP=myapp

Windows CMD:

set FLASK_ENV=development
set FLASK_APP=myapp

Windows PowerShell:

  1. Run it!
flask run

Deploying to Apache

Add this (or something similar) to a virtual host

WSGIDaemonProcess fugue python-home=/home/djbeadle/Daniel-fugue-take-home/venv/ home=/home/djbeadle/Daniel-fugue-take-home
WSGIApplicationGroup %{GLOBAL}
WSGIScriptAlias /fugue /home/djbeadle/Daniel-fugue-take-home/conf.wsgi
<Directory /home/djbeadle/Daniel-fugue-take-home>
    WSGIProcessGroup fugue
    Options FollowSymLinks
    AllowOverride None
    Require all granted

Build and Test

To test the application:

  1. Start the server (or use the server already running at <≥)

  2. Open the project folder in another terminal session, point the tests at your host by editing tests/common.yaml

  3. From the project folder's root directory activate your virtualenv and run the command pytest -v