-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Improve README.md #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Windyskys
wants to merge
1
commit into
rougier:master
Choose a base branch
from
Windyskys:improve-readme
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Improve README.md #246
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,94 @@ | ||
| ## 100 numpy exercises | ||
| # 100 NumPy Exercises | ||
|
|
||
| [](http://mybinder.org:/repo/rougier/numpy-100/notebooks/100%20Numpy%20exercises.ipynb) | ||
| [](https://zenodo.org/badge/latestdoi/10173/rougier/numpy-100) | ||
|
|
||
| This is a collection of numpy exercises from numpy mailing list, stack overflow, and numpy documentation. I've also created some problems myself to reach the 100 limit. The goal of this collection is to offer a quick reference for both old and new users but also to provide a set of exercises for those who teach. For extended exercises, make sure to read [From Python to NumPy](http://www.labri.fr/perso/nrougier/from-python-to-numpy/). | ||
| ## Table of Contents | ||
|
|
||
| → [Test them on Binder](http://mybinder.org:/repo/rougier/numpy-100/notebooks/100_Numpy_exercises.ipynb) | ||
| → [Read them on GitHub](100_Numpy_exercises.md) | ||
| - [About this repository](#about-this-repository) | ||
| - [How to Use](#how-to-use) | ||
| - [Using Binder (online)](#using-binder-online) | ||
| - [Using a local installation](#using-a-local-installation) | ||
| - [How to Contribute](#how-to-contribute) | ||
| - [Credits](#credits) | ||
| - [License](#license) | ||
|
|
||
| Note: markdown and ipython notebook are created programmatically from the source data in `source/exercises.ktx`. | ||
| To modify the content of these files, please change the text in the source and run the `generators.py` module with a python | ||
| interpreter with the libraries under `requirements.txt` installed. | ||
| ## About this repository | ||
|
|
||
| The keyed text format (`ktx`) is a minimal human readable key-values to store text (markdown or others) indexed by keys. | ||
| This repository offers a collection of 100 NumPy exercises. They are gathered from the NumPy mailing list, Stack Overflow, and the NumPy documentation. Some have also been created by the original author to reach the 100-exercise limit. | ||
|
|
||
| This work is licensed under the MIT license. | ||
| [](https://zenodo.org/badge/latestdoi/10173/rougier/numpy-100) | ||
| The goal of this collection is to provide a quick reference for both new and experienced users and to offer a set of exercises for those who teach. For more extensive exercises, please read [From Python to NumPy](http://www.labri.fr/perso/nrougier/from-python-to-numpy/). | ||
|
|
||
| The exercises are available in several formats: | ||
|
|
||
| - [Jupyter Notebook](100_Numpy_exercises.ipynb) | ||
| - [Markdown file](100_Numpy_exercises.md) | ||
| - [Markdown file with hints](100_Numpy_exercises_with_hints.md) | ||
| - [Markdown file with solutions](100_Numpy_exercises_with_solutions.md) | ||
| - [Markdown file with hints and solutions](100_Numpy_exercises_with_hints_with_solutions.md) | ||
|
|
||
| ## How to Use | ||
|
|
||
| You can run the exercises in your browser using Binder, or you can run them on your local machine. | ||
|
|
||
| ### Using Binder (online) | ||
|
|
||
| Click the "Launch Binder" button below to open the Jupyter Notebook with the exercises in your browser: | ||
|
|
||
| [](http://mybinder.org:/repo/rougier/numpy-100/notebooks/100%20Numpy%20exercises.ipynb) | ||
|
|
||
| ### Using a local installation | ||
|
|
||
| To run the exercises on your local machine, you need to have Python and the following libraries installed: | ||
|
|
||
| - NumPy | ||
| - Pandas | ||
| - Jupyter | ||
| - Jupyter Themes | ||
| - MdUtils | ||
|
|
||
| You can install them using pip: | ||
|
|
||
| ```bash | ||
| pip install -r requirements.txt | ||
| ``` | ||
|
|
||
| Once the dependencies are installed, you can open the Jupyter Notebook: | ||
|
|
||
| ```bash | ||
| jupyter notebook 100_Numpy_exercises.ipynb | ||
| ``` | ||
|
|
||
| ## How to Contribute | ||
|
|
||
| Contributions are welcome! If you find an error or have a better way to solve an exercise, feel free to open an issue or a pull request. | ||
|
|
||
| The exercises, hints, and solutions are stored in the `source/exercises100.ktx` file. This file uses a simple key-value format, where each entry is identified by a key starting with `<`. For example: | ||
|
|
||
| ``` | ||
| <q1 | ||
| Import the numpy package under the name `np` (★☆☆) | ||
|
|
||
| <h1 | ||
| hint: import … as | ||
|
|
||
| <a1 | ||
| import numpy as np | ||
| ``` | ||
|
|
||
| To modify the exercises, you need to: | ||
|
|
||
| 1. Edit the `source/exercises100.ktx` file. | ||
| 2. Run the `generators.py` script to update the Jupyter notebooks and markdown files: | ||
|
|
||
| ```bash | ||
| python generators.py | ||
| ``` | ||
|
|
||
| ## Credits | ||
|
|
||
| These exercises were collected by [Nicolas P. Rougier](https://www.labri.fr/perso/nrougier/). The original repository can be found at [rougier/numpy-100](https://github.com/rougier/numpy-100). | ||
|
|
||
| ## License | ||
|
|
||
| This work is licensed under the MIT license. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can use something like "originally collected by.... Since then a lot of people (list of names, including yours) have contributed by fixing errors, improving the repository, proposing alternate or better solutions, etc.