{"id":28264246,"url":"https://github.com/taurusolson/fntools","last_synced_at":"2025-07-02T10:32:19.956Z","repository":{"id":20244438,"uuid":"23516863","full_name":"TaurusOlson/fntools","owner":"TaurusOlson","description":"Functional programming tools for data processing","archived":false,"fork":false,"pushed_at":"2016-03-04T20:18:55.000Z","size":664,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-18T08:49:36.487Z","etag":null,"topics":["data","functional-programming"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/TaurusOlson.png","metadata":{"files":{"readme":"README.rst","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":"2014-08-31T15:44:30.000Z","updated_at":"2018-09-20T08:25:03.000Z","dependencies_parsed_at":"2022-07-10T08:47:21.960Z","dependency_job_id":null,"html_url":"https://github.com/TaurusOlson/fntools","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/TaurusOlson/fntools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TaurusOlson%2Ffntools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TaurusOlson%2Ffntools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TaurusOlson%2Ffntools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TaurusOlson%2Ffntools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TaurusOlson","download_url":"https://codeload.github.com/TaurusOlson/fntools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TaurusOlson%2Ffntools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263120881,"owners_count":23416898,"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":["data","functional-programming"],"created_at":"2025-05-20T09:10:19.110Z","updated_at":"2025-07-02T10:32:19.937Z","avatar_url":"https://github.com/TaurusOlson.png","language":"Python","readme":"fntools\n=======\n\n\n.. image:: https://readthedocs.org/projects/fntools/badge/?version=master\n\n:target: https://readthedocs.org/projects/fntools/?badge=master\n:alt: Documentation Status\n\n**fntools** provides functional programming tools for data processing. This\nmodule is a set of functions that I needed in my work and found useful.\n\n\nInstallation\n------------\n\n::\n\n    pip install fntools\n\n\nExamples\n--------\n\n* Split a list of elements with factors with `split`::\n\n    songs = ('Black', 'Even Flow', 'Amongst the waves', 'Sirens')\n    albums = ('Ten', 'Ten', 'Backspacer', 'Lightning Bolt')\n    print split(songs, albums)\n    {'Lightning Bolt': ['Sirens'], 'Ten': ['Black', 'Even Flow'], 'Backspacer': ['Amongst the waves']}\n\n\n* Determine whether any element of a list is included in another list with `any_in`::\n\n    print any_in(['Oceans', 'Big Wave'], ['Once', 'Alive', 'Oceans', 'Release'])\n    True\n\n    print any_in(['Better Man'], ['Man of the Hour', 'Thumbing my way'])\n    False\n\n\n* Apply many functions on the data with `dispatch`::\n\n    # Suppose we want to know the mean, the standard deviation and the median of\n    # a distribution (here we use the standard normal distribution)\n\n    import numpy as np\n    np.random.seed(10)\n    x = np.random.randn(10000)\n\n    print dispatch(x, (np.mean, np.std, np.median))\n    [0.0051020560019149385, 0.98966401277169491, 0.013111308495186252]\n\n\nMany more useful functions are available. For more details, go to the\ndocumentation_.\n\n\nInspirations\n------------\n\n* The excellent toolz_ by `Matthew Rocklin`_\n* `A pratical introduction to functional programming`_ by `Mary Rose Cook`_\n* A bit of `R`_ (multimap, use, use_with)\n\n\n.. _documentation: http://fntools.readthedocs.org/en/latest\n.. _toolz: https://github.com/mrocklin/toolz\n.. _`A pratical introduction to functional programming`: http://maryrosecook.com/blog/post/a-practical-introduction-to-functional-programming\n.. _`Matthew Rocklin`: https://github.com/mrocklin\n.. _`Mary Rose Cook`: https://github.com/maryrosecook\n.. _R: http://www.r-project.org\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaurusolson%2Ffntools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaurusolson%2Ffntools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaurusolson%2Ffntools/lists"}