Giter Site home page Giter Site logo

pycht's Introduction

pycht_logo

Street art by clustering.

Pics by @alys.cheshire

โšก๏ธ Quick start

Take a nice picture :

Generate a 4 colors stencil model :

>> from pycht import Pycht

>> Pycht().stencil('cat.jpg', 'stencil_cat.jpg', 4)
Stencil 1 stencil 2 stencil 3 stencil 4

Final result rendering with all stencils :

Cut it, paint it, stare at it, leave it. Enjoy !

๐Ÿ›  Installation

๐Ÿ You need to install Python 3.7 or above.

Installation can be done by using pip. There are wheels available for Linux, MacOS, and Windows.

pip install pycht

You can also install the latest development version as so:

pip install git+https://github.com/tlentali/pycht

# Or, through SSH:
pip install git+ssh://[email protected]/tlentali/pycht.git

๐Ÿฅ„ How ?

Behind this script, you will find algos used for marketing, financial prediction and client targeting. The pics is tranlated into a matrice, each value indicate a pixel color in three dimension. Then, a clustering algorithm is used to reshape the picture by colors. The number of colors desired is a parameter and is chosen directly by the user. As an output you have the picture with the number of color you choose and a picture by color to elaborate each stencils one by one.

๐Ÿ–– Contributing

Feel free to contribute in any way you like, we're always open to new ideas and approaches. If you want to contribute to the code base please check out the CONTRIBUTING.md file. Also take a look at the issue tracker and see if anything takes your fancy.

This project follows the all-contributors specification. Again, contributions of any kind are welcome!

๐Ÿ“œ License

pycht is free and open-source software licensed under the MIT license.

pycht's People

Contributors

suzieboutard avatar tlentali avatar tlentali-betclic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pycht's Issues

MAJ License

Public repositories on GitHub are often used to share open source software.
For your repository to truly be open source, you'll need to license it so that others are free to use, change, and distribute the software.

The License file is obsolete. It has to be updated to year 2023.

pycht/LICENSE

Lines 1 to 5 in 31e3e53

MIT License
Copyright (c) 2022 Thomas Lentali
Permission is hereby granted, free of charge, to any person obtaining a copy

Docstring for `pycht.py`

In order to reach the highest pylint note, I added some doc-string in each beginning of each script.
But I didn't fill it correctly.

pycht/pycht/pycht.py

Lines 1 to 3 in 31e3e53

"""
Project settings
"""

Should be :

`pycht.py` script contains a `pytch` class that call `ImageProcessing` and `Clustering` classes in order to run the whole code at once.

It should serve as a quick reference to all the functions and arguments.

Docstring format :

Replace `requirement.txt` with `pyproject.toml`

Adapt to the new standard using pyproject.toml instead of requirements.txt, setup.py

This would simplify the project packaging and the python environment setup.
The requirements.txt and setup.py can still be used but focusing everything in one file cleans the project structure.

The pyproject.toml should be able to set the python version, the libs version and all information needed to build a python wheel.

Docstring for `clustring.py`

In order to reach the highest pylint note, I added some doc-string in each beginning of each script.
But I didn't fill it correctly.

"""
Project settings
"""

Should be :

To aim of this script is to manage an image.
It can read, reshape, and convert image to float, as well as displaying and writing the picture in a file.  
It also contains a method that can compute a color separation in order to provide the different stencils.

It should serve as a quick reference to all the functions and arguments.

Docstring format :

Docstring for `image_processing.py`

In order to reach the highest pylint note, I added some doc-string in each beginning of each script.
But I didn't fill it correctly.

"""
Project settings
"""

Sould be :

Provide the necessary code to generate a clustering, here a `kmeans` model, that will separate the different stencils by color.

It should serve as a quick reference to all the functions and arguments.

Docstring format :

Create a `SECURITY.md` file

In order to comply with the Github community standards, we should add the following text to a SECURITY.md file in the root of the project :

# `Pycht` Open Source Security Policies and Procedures

This document outlines security procedures and general policies for the `Pycht` Open Source projects as found on [https://github.com/tlentali/pycht](https://github.com/tlentali/pycht).

  * [Reporting a Vulnerability](#reporting-a-vulnerability)
  * [Disclosure Policy](#disclosure-policy)

## Reporting a Vulnerability 

The `Pycht` team and community take all security vulnerabilities
seriously. Thank you for improving the security of our open source 
software. We appreciate your efforts and responsible disclosure and will
make every effort to acknowledge your contributions.

Report security vulnerabilities by emailing the `Pycht` security team at [email protected]

The lead maintainer will acknowledge your email within 24 hours, and will send a more detailed response within 48 hours indicating the next steps in handling your report.   
After the initial reply to your report, the security team will endeavor to keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.

Report security vulnerabilities in third-party modules to the person or team maintaining the module.

## Disclosure Policy

When the security team receives a security bug report, they will assign it to a primary handler.  
This person will coordinate the fix and release process, involving the following steps:

- Confirm the problem and determine the affected versions.
- Audit code to find any potential similar problems.
- Prepare fixes for all releases still under maintenance.  

These fixes will be released as fast as possible to `Pypi`.

Add a Pull Request template

It would be nice to have a Pull Request template to improve the documentation of the change in the project.

By adding a template to .github/PULL_REQUEST_TEMPLATE/pull_request_template.md, it should work.
Fill it with :

## Describe your changes

## Issue ticket number and link

## Checklist before requesting a review
- [ ] I have performed a self-review of my code
- [ ] If it is a core feature, I have added thorough tests.
- [ ] Do we need to implement analytics?
- [ ] Will this be part of a product update? If yes, please write one phrase about this update.

This is not mandatory, but nice to have to enhance community standard on the project.

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.