Git Product home page Git Product logo

pokr.kr's Introduction

Pokr - Politics in Korea

Pull requests are always welcome.

Installation

  1. Install dependencies

    • Ubuntu

        $ sudo apt-get install nodejs postgresql-9.3 npm python-psycopg2 node-less
        $ sudo npm install -g uglify-js
        $ sudo pip install -r requirements.txt
        $ sudo pip install git+https://github.com/teampopong/popong-nlp.git
        $ sudo make install
      
    • Mac OS X

        $ brew install node postgresql
        $ npm install less uglify-js -g
        $ pip install -r requirements.txt
        $ pip install psycopg2
        $ make install
      
  2. Create & modify configuration files

     $ make init
     $ createuser postgres
    
    • Set password for user "postgres" in PostgreSQL

        ALTER USER "postgres" WITH PASSWORD 'new_password';
      
    • Modify alembic.ini

      • ID_HERE: postgres id (ex: postgres)
      • PASSWD_HERE: postgres pw
      • HOST_HERE: postgres host (ex: localhost)
  3. Create & init DB (You should first obtain a pokrdb.dump from here)

     $ sudo -u postgres psql -h localhost -U postgres -c 'CREATE DATABASE pokrdb;'
     $ sudo -u postgres psql -d pokrdb -f pokrdb.dump
     $ ./shell.py db init
     $ alembic stamp head
    

Run Server

$ ./run.py [-d] [-l LOCALE] [--port PORT]

Update Data

  1. Bills

     $ ./shell.py bill update "some/where/*.json" # from files
     $ ./shell.py bill update --source redis  # from Redis queue
     $ ./shell.py bill update --source db  # existing bills of the current session
    
  2. Bill Keywords

     $ ./shell.py bill_keyword update "some/where/*.txt"
    
  3. Candidacies

     $ ./shell.py candidacy update "some/where/*.json"
    
  4. People

     $ ./shell.py person update "some/where/*.json"
    

    when the json is in this form.

License

Apache v2.0

pokr.kr's People

Contributors

achimnol avatar cornchz avatar dongx3 avatar e9t avatar geonu avatar jooddang avatar leegeng avatar minsukkahng avatar netj avatar popong-dev avatar stray-leone avatar

Watchers

 avatar  avatar

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.