Giter Site home page Giter Site logo

magic-kitchen's Introduction

CodeCheF

What is CodeCheF?

CodeCheF is an online programming game for young children. The last letter F is capitalized to avoid conflict with CodeChef Programming Platform, and to show our great respect to CCF (China Computer Federation).

How to run it?

Run locally

First install Python 2 and Django.

$ pip install django

Then run with run.sh, which can be used for any scenario, including debugging, testing and production.

$ sh run.sh

Alternatively, you can run the server manually.

$ python manage.py migrate  # run Django migration
$ python manage.py shell < create_super_admin.py # create super admin
$ python manage.py shell < init_default_level_and_solution.py # initialize default level and solution
$ python manage.py runserver 0.0.0.0:8000  # run Django server, listening at 0.0.0.0, port 8000

To setup levels, one can access /test.html to feed the default levels into SQL. If any corruption occurs, remove db.sqlite3, migrate, and access /test.html again. Then change config.useFakeLevel to false in order to use these level. (This may be fixed in near future)

Run with Docker

There are some scripts to run and debug CodeCheF with Docker.

$ sh docker-run.sh  # run CodeCheF with Docker

Note that the server is running in background, so you should use the docker kill command to shutdown it.

Or if you want to build a Docker image manually and test it.

$ sh docker-build.sh  # build a Docker image from current directory
$ sh docker-test.sh  # test the image using build.sh
$ sh docker-debug.sh  # start a bash terminal in the image

Have fun coding and hacking!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.