{"id":20495277,"url":"https://github.com/axelfahy/bff","last_synced_at":"2025-04-13T17:43:33.067Z","repository":{"id":62560054,"uuid":"168692022","full_name":"axelfahy/bff","owner":"axelfahy","description":"Best Fancy Functions, your Best Friend Forever!","archived":false,"fork":false,"pushed_at":"2020-11-12T15:14:28.000Z","size":6130,"stargazers_count":3,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T08:45:09.836Z","etag":null,"topics":["fancy","python3"],"latest_commit_sha":null,"homepage":"https://bff.readthedocs.io","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axelfahy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-01T12:08:03.000Z","updated_at":"2022-08-30T08:04:00.000Z","dependencies_parsed_at":"2022-11-03T14:00:22.975Z","dependency_job_id":null,"html_url":"https://github.com/axelfahy/bff","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelfahy%2Fbff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelfahy%2Fbff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelfahy%2Fbff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelfahy%2Fbff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axelfahy","download_url":"https://codeload.github.com/axelfahy/bff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248288089,"owners_count":21078848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fancy","python3"],"created_at":"2024-11-15T17:45:18.949Z","updated_at":"2025-04-13T17:43:33.040Z","avatar_url":"https://github.com/axelfahy.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Installation](#installation) |\n[Documentation](https://bff.readthedocs.io/en/latest/)\n\n# bff\n\u003e Best Fancy Functions, your Best Friend Forever\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://pypi.org/project/bff/\"\u003e\n        \u003cimg src=\"https://img.shields.io/pypi/v/bff.svg\" alt=\"Latest Release\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://travis-ci.com/axelfahy/bff\"\u003e\n        \u003cimg src=\"https://api.travis-ci.com/axelfahy/bff.svg?branch=master\" alt=\"Build Status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://coveralls.io/github/axelfahy/bff?branch=master\"\u003e\n        \u003cimg src=\"https://coveralls.io/repos/github/axelfahy/bff/badge.svg?branch=master\" alt=\"Coverage Status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/bff/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/python-3.7-blue.svg\" alt=\"Python37\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nThis package contains some utility functions from plots to data manipulations and could become your new bff.\n\n## Installation\n\n```sh\npip install bff\n```\n\n## Documentation\n\nAvailable [here](https://bff.readthedocs.io/en/latest/).\n\n## Development setup\n\n```sh\ngit clone https://github.com/axelfahy/bff.git\ncd bff\npython -m venv venv-dev\nsource venv-dev/bin/activate\npip install -r requirements_dev.txt\npip install -e .\n```\n\n## Tests\n\n```sh\nmake all\n```\n\nTo test plots, images with baseline should be placed in `tests/baseline` and can be generated using `make build-baseline`.\n\nAs of *v0.2*, plots are not yet tested in the travis build.\n\n## Release History\n\n* 0.2.8\n    * ADD: Function ``plot_roc_curve`` to plot a roc curve.\n    * ADD: Function ``plot_kmeans`` to plot K-Means results.\n    * ADD: Function ``get_n_colors`` to get N colors from a color map.\n    * ADD: Function ``dates_split`` to split a period of time into multiple sub-period of time.\n    * ADD: Option ``threshold`` in ``plot_pie`` to write only the labels having more than the threshold.\n    * ADD: Option ``twinx`` to plot the metric on the same axis as the loss in the ``plot_history`` function.\n    * CHANGE: Function ``plot_history`` is now superposed and works without validation.\n    * CHANGE: Rename function ``plot_tsne`` to ``plot_cluster``.\n    * FIX: Correction of format for annotation and color bar in ``plot_confusion_matrix``.\n* 0.2.7\n    * ADD: Function ``plot_pie`` to plot counter as a pie chart.\n    * ADD: Function ``plot_confusion_matrix`` to calculate and plot a confusion matrix.\n    * ADD: Function ``plot_tsne`` to plot t-SNE results.\n* 0.2.6\n    * CHANGE: Use of ``Optional`` keyword from ``typing`` for optional arguments.\n    * ADD: Function ``plot_pca_explained_variance_ratio`` to plot the explained variance of PCA.\n    * ADD: Function ``pipe_multiprocessing_pd`` to apply a function on a DataFrame using multiple processes.\n    * ADD: Function ``_check_sklearn_support`` to check if ``scikit-learn`` is installed instead of having it in the dependencies of the project.\n* 0.2.5\n    * ADD: Function ``log_df`` to print function results during method chaining.\n    * ADD: Function ``avg_dicts`` to make the average of multiple similar dictionaries.\n    * ADD: Function ``size_2_square`` to calculate the square needed for the given size (e.g. in subplots).\n    * ADD: Option ``with_identity`` to plot an identity line in the ``plot_true_vs_pred`` function.\n    * ADD: Option ``with_determination`` to plot the coefficient of determination in the ``plot_true_vs_pred`` function.\n    * CHANGE: Default value of option ``details`` in ``mem_usage_pd`` function is now ``True``.\n* 0.2.4\n    * ADD: Function ``set_thousands_separator`` to add a thousand separator and set the number of decimals on x and/or y ticks.\n    * ADD: Option to define x-axis in ``plot_predictions`` function.\n    * FIX: Cast columns to string in ``normalization_pd`` function.\n    * FIX: Add possibility to define custom label in ``plot_series`` function using the kwargs instead of an argument.\n* 0.2.3\n    * ADD: Function ``normalization_pd`` to normalize a DataFrame.\n    * ADD: Function ``plot_correlation`` to plot the correlation of variables in a DataFrame.\n* 0.2.2\n    * FIX: Function ``value_2_list`` renamed to ``kwargs_2_list``.\n    * ADD: Function ``value_2_list`` to cast a single value.\n* 0.2.1\n    * ADD: Function ``plot_counter`` to plot counter as bar plot.\n* 0.2.0\n    * ADD: Separation of plots in submodule ``plot``. This breaks the previous API.\n    * ADD: Tests for the plot module using ``pytest-mlp``.\n    * ADD: Images from plot in the documentation and notebook with examples.\n    * FIX: Correction of resampling in the ``plot_series`` function.\n* 0.1.9\n    * ADD: Option ``loc`` in ``plot_series`` function.\n    * ADD: Function ``cast_to_category_pd`` to cast columns to category ``dtype`` automatically.\n* 0.1.8\n    * ADD: Option ``with_missing_datetimes`` in ``plot_series`` function.\n    * ADD: Mypy for type verification.\n    * FIX: Tests when raising exceptions in ``sliding_window`` function.\n* 0.1.7\n    * ADD: ``FancyConfig`` to handle configuration files.\n* 0.1.6\n    * FIX: Correction of dependencies for doc.\n* 0.1.5\n    * ADD: Documentation of project on Read the Docs.\n* 0.1.4\n    * ADD: Function ``mem_usage_pd`` to calculate the memory usage of a pandas object.\n    * ADD: Function ``idict`` to invert the key / values of a dictionary.\n    * ADD: Add Makefile for testing code and style.\n    * ADD: Add python-versioneer to handle version of package.\n* 0.1.3\n    * ADD: Travis, flake8, coveralls and PyUp configurations.\n    * ADD: Function ``get_peaks`` to get the peaks of a time series.\n    * ADD: Function ``plot_series`` to plot a time series.\n    * CHANGE: Restructuration of repo.\n* 0.1.2\n    * ADD: Function ``plot_predictions`` function to plot the actual values and the predictions of a model.\n    * CHANGE: Add axes in plot functions.\n* 0.1.1\n    * ADD: Readme with instructions.\n    * CHANGE: Improvement of `plot_history` function.\n    * FIX: Fix the imports in the test.\n* 0.1.0\n    * Initial release.\n\n## Meta\n\nAxel Fahy – axel@fahy.net\n\nDistributed under the MIT license. See ``LICENSE`` for more information.\n\n[https://github.com/axelfahy](https://github.com/axelfahy)\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/yourname/yourproject/fork\u003e)\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n## Version number\n\nThe version of the package is link to the tag pushed.\n\nTo set a new version:\n\n```sh\ngit tag v0.1.4\ngit push --tags\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxelfahy%2Fbff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxelfahy%2Fbff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxelfahy%2Fbff/lists"}