Code Monkey home page Code Monkey logo

aku.ren's Introduction

Aku.Ren

My personal website, available at aku.ren

Installing

After cloning this repo, run these commands to install the venv

python -m venv venv
. venv/bin/activate
pip install -r requirements.txt

You should probably also run the CV submodule to populate the publications and CV pages

cd CV
make pdf
make html
make clean
cd ..

And create the pdf directories

mkdir static/pdfs
mkdir static/pdfs/{papers,slides}

Configuring the server

For an apache2 server on debian, mod_wsgi is required.

The VirtualHost must be setup to use a WSGI Daemon, and that daemon must use the previously created venv, and point to ./app.wsgi

Then, edit ./app.wsgi and change the path and secret key.

Initialize the database

flask shell
from app import *
db.drop_all()
db.create_all()

Update the database structure

Use this when the database structure was changed

flask db migrate -m "<Migration message>"

And this to apply the changes

flask db upgrade

Add an element to the database

flask shell
from app import *
cookie = Algo(name="ccgarden", short_title="Cookie Clicker Garden", title="Maximal number of unmarked cells with at least 3 marked neighboring cells in the n X n kings' graph", content='''{{ code('cookie.py') }}

<p>
Time complexity: \(O(m 2^{3n})\)<br />
There is a solution in \(O(nm 2^{2n+3})\)
The resulting sequences for \(N\\times N\) grids and \(N\\times(N+1)\) grids can be found at ??? and ???
</p>''')
db.session.add(cookie)
db.session.commit()

Running the server for development

flask run

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.