GithubHelp home page GithubHelp logo

florimondmanca / cs-ir Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 0.0 941 KB

Implementation of an Information Retrieval System (IRS)

Python 25.22% Jupyter Notebook 74.78%
information-retrieval school-project search search-engine

cs-ir's Introduction

NOTICE

Now unused. See florimondmanca/www.


Personal

Build Status Angular DigitalOcean

This is the repository for the frontend application powering my personal blog.

For the backend API, see personal-api.

Install

Install Angular CLI:

$ npm install -g @angular/cli

Install the dependencies:

$ npm install

Quickstart

Create an environment file called .env (it will be excluded from version control) at the project root, containing the following variables:

  • API_KEY: a valid API key created via the backend admin site.
  • BACKEND_URL: the URL to the backend root (without trailing slash).

For example:

# .env
API_KEY=myapikey
BACKEND_URL=http://localhost:8000

Generate your development environment file:

$ npm run config -- --env=dev

Start the development server, which will run on http://localhost:4200/:

$ ng serve -c dev

Using server-side rendering

Server side rendering is implemented using Angular Universal.

Server-side rendering allows to send fully-rendered HTML pages to clients, instead of sending them a blank page and letting Angular fill it in the browser. This reduces the "first meaningful paint" time, helps with referencing and allows integration with social media.

To use the server-rendered app, you must first create a build of the app:

$ npm run build:dev

Note: in production, use npm run build instead to create a production-optimized build.

Then start the server-rendered app (an Express server):

$ npm run serve:ssr

Scripts

See package.json for the available NPM scripts.

CI/CD

TravisCI is configured on this repo and generates a production build on every push to a branch.

cs-ir's People

Contributors

aldebout avatar florimondmanca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cs-ir's Issues

CS276 index build fails

En lancant indexes buils CS276, tout se passe bien jusqu'à

Flushed: tmp/1924
Finished consuming cache
Merging blocks…
Cleaning up blocks…
Traceback (most recent call last):
  File "/home/aldebout/.pyenv/versions/3.7.1/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/aldebout/.pyenv/versions/3.7.1/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/aldebout/Desktop/git_repos/cs-ir/indexes.py", line 300, in <module>
    indexes()
  File "/home/aldebout/.local/share/virtualenvs/cs-ir-PfdC3zh5/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/aldebout/.local/share/virtualenvs/cs-ir-PfdC3zh5/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/aldebout/.local/share/virtualenvs/cs-ir-PfdC3zh5/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/aldebout/.local/share/virtualenvs/cs-ir-PfdC3zh5/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/aldebout/.local/share/virtualenvs/cs-ir-PfdC3zh5/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/aldebout/Desktop/git_repos/cs-ir/indexes.py", line 295, in build
    build_index(collection, block_size=block_size, no_cache=True)
  File "/home/aldebout/Desktop/git_repos/cs-ir/indexes.py", line 165, in build_index
    return Index.build(collection, block_size=block_size)
  File "/home/aldebout/Desktop/git_repos/cs-ir/indexes.py", line 83, in build
    result = sorter.merge()
  File "/home/aldebout/Desktop/git_repos/cs-ir/indexes.py", line 250, in merge
    with multi_open(block_paths) as files:
  File "/home/aldebout/.pyenv/versions/3.7.1/lib/python3.7/contextlib.py", line 112, in __enter__
    return next(self.gen)
  File "/home/aldebout/Desktop/git_repos/cs-ir/utils.py", line 29, in multi_open
    yield [stack.enter_context(open(path)) for path in paths]
  File "/home/aldebout/Desktop/git_repos/cs-ir/utils.py", line 29, in <listcomp>
    yield [stack.enter_context(open(path)) for path in paths]
OSError: [Errno 24] Too many open files: 'tmp/151'

Il faudrait regarder du côté de la stack, voir s'il y a un paramètre de limite par défaut à changer. Sinon il faut rajouter du chunking :/

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.