My solutions to Project Euler problems.
There are tests associated with the solutions in each language's tests
subfolder.
Python:
$ cd python
- Create a python virtual environment of your choice (direnv, virtualenv, etc.). Code is compatible with Python 2 and Python 3.
$ pip install -r requirements.txt
- To run code:
$ python [filename.py]
- To run tests:
$ nosetests
JavaScript:
$ cd js
- Requires node to be installed
- Running tests requires npm to be installed
- Once installed, run
$ npm install
to installpackage.json
- Once installed, run
- To run code:
$ node [filename.js]
- To run tests:
$ ./node_modules/mocha/bin/mocha tests
PHP:
$ cd php
- Requires PHP56
- Tests require composer; download into
php
directory- Once installed, run
$ php composer.phar install
to installcomposer.lock
- Once installed, run
- To run code:
$ php src/[filename.php]
- To run tests:
$ ./vendor/bin/phpunit