-
Notifications
You must be signed in to change notification settings - Fork 903
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the entire examples folder taken from the development branch of m…
…l5-examples on March 15, 2019
- Loading branch information
Showing
1,035 changed files
with
103,424 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Contributing to ml5.js Examples | ||
|
||
This project is still a work in progress, but we encourage everyone to join, propose ideas and help in the development! | ||
|
||
# Structure and Syntax | ||
|
||
We are trying to keep things as simple as possible. ml5.js aims to make machine learning approachable for a broad audience of artists, creative coders, and students. The library provides access to machine learning algorithms and models in the browser and we try to keeps things simple for everyone. | ||
|
||
Each example in this repository is self-contained. Meaning that it can be used with out external dependencies or files. Just the folder where the example live is necessary. | ||
|
||
The folders are structure based on examples built with other JavaScript frameworks/libraries. This means we aim to have the following structure: | ||
|
||
``` | ||
javascript/ | ||
p5/ | ||
three/ | ||
rita/ | ||
pixi/ | ||
etc.. | ||
``` | ||
|
||
Please refer to [#1](https://github.com/ml5js/ml5-examples/issues/1) (thanks [@dariusk](https://github.com/dariusk)), to see why we settle for this. | ||
|
||
|
||
## Organizing Examples of different features | ||
|
||
If you're interested to make example, you can organize them as heirarchy like so: | ||
|
||
``` | ||
/FeatureName | ||
/Example_1 | ||
/Example_2 | ||
``` | ||
|
||
For example, the `PoseNet` directory contains 3 subdirectories, one for each example. | ||
|
||
``` | ||
/PoseNet | ||
/PoseNet_image | ||
/PoseNet_video | ||
/PoseNet_webcam | ||
``` | ||
|
||
|
||
# Getting Started | ||
|
||
Since all the example are self contained, if you want to contribute by fixing bugs, adding documentation or adding new examples, just start by cloning or [downloading this repository](https://github.com/ml5js/ml5-examples/archive/master.zip): | ||
|
||
```bash | ||
git clone https://github.com/ml5js/ml5-examples.git | ||
cd ml5-examples | ||
``` | ||
|
||
Make some changes, fix bugs and submit a new pull request! | ||
|
||
We encourage everyone to contribute to this project. If you have never contributed to open source before this might be a good place to start! Just open a new issue! | ||
|
||
## Additional Resources | ||
|
||
- [How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github) | ||
- [How to Write an Open Source JavaScript Library](https://egghead.io/courses/how-to-write-an-open-source-javascript-library) | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 ml5 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains 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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# ml5 Examples | ||
|
||
## Description | ||
|
||
This repository contains a collection of examples using [ml5.js](https://github.com/ml5js/ml5-library). The examples are meant to serve as an introduction to the library and machine learning concepts. | ||
|
||
Examples are organized into folders according to their integration with other JavaScript libraries. | ||
|
||
For example, the `/p5js` folder holds examples of using [ml5.js](https://github.com/ml5js/ml5-library) with [p5.js](https://p5js.org/). All examples are self-contained and can be run independently. Libraries are loaded through a Content Delivery Network (CDN) and certain examples (indicated in code comments) download a machine learning model from a "cloud" url. This means that ml5 currently relies on an internet connection in order to retrieve pre-trained models (unless they are served locally). | ||
|
||
Instead of using the CDN links to p5 and ml5, you can [download the p5.js libraries here](https://github.com/processing/p5.js/releases) and [ml5 library here](https://github.com/ml5js/ml5-library/releases). | ||
|
||
## Setup | ||
|
||
### Step 1: or clone this repository: | ||
|
||
Open your terminal and type: | ||
|
||
```sh | ||
# clone the repo or download the zip file | ||
git clone https://github.com/ml5js/ml5-examples.git | ||
``` | ||
|
||
### Step 2: start a local development server | ||
Open your terminal | ||
|
||
```sh | ||
# change directories | ||
cd ml5-examples | ||
|
||
# install the dependencies | ||
npm install | ||
|
||
# run the local web server | ||
npm run develop | ||
|
||
# you should be able to run the examples at: | ||
# localhost:8082 | ||
|
||
``` | ||
|
||
If you don't know how to start a server, check [this guide on how to start a local web server](https://learn.ml5js.org/docs/#/tutorials/local-web-server?id=running-a-local-web-server). | ||
|
||
|
||
## Usage | ||
|
||
Open your terminal | ||
|
||
```sh | ||
# change directories | ||
cd ml5-examples | ||
|
||
# run the local web server | ||
npm run develop | ||
|
||
# you should be able to run the examples at: | ||
# localhost:8082 | ||
|
||
``` | ||
|
||
|
||
## Examples Index | ||
|
||
* [ml5 examples in the p5 web editor](https://editor.p5js.org/ml5/sketches) | ||
* The best way to interact with our examples are using the [p5 web editor](https://editor.p5js.org/ml5/sketches). This is an interactive coding environment. | ||
* Run the examples using the [example index](https://ml5js.github.io/ml5-examples/public) | ||
* We have examples written in plain javascript, p5.js, and more. | ||
|
||
|
||
## Contributing | ||
|
||
See CONTRIBUTING.MD | ||
|
||
## Contributors | ||
|
||
* See: [ml5 contributors](https://github.com/ml5js/ml5-library#contributors) |
Oops, something went wrong.