Package: katalytic
katalyticDon't use in production yet.I will likely tweak the function names and the default behaviour a few more times.We'll take care of the boilerplate, so you canfocus on your problems.Installationpipinstallkatalytic# Include plugins with 3rd-party dependenciespipinstallkatalytic[all]Plugins with 3rd-party dependencies:katalytic-imagesFeaturesdataChecks for the structure or properties of data structuresConvert between different data representationsSort or apply map recursively on nested data structuresPositive and negative front detectionTODO: Link to tocs>>>detect_fronts_positive('00101101')[2,4,7]>>>swap_keys_and_values({'a':1,'b':2,'c':3}){1:'a',2:'b',3:'c'}>>>as_list_of_dicts([['b','a'],[1,2],[3,4]])[{'b':1,'a':2},{'b':3,'a':4}]>>>flatten_recursive([1,[2,[3,4],5],6])[1,2,3,4,5,6]filesAtomic operationsLoad and save files with a uniform interfaceCopy, move, and delete files without searching the docs for the right functionThe functions return the same type as the input (Pathorstr)TODO: Link to tocs>>>get_files('/home/user/*bash*',prefix=True)['/home/user/.bash_history','/home/user/.bash_logout','/home/user/.bashrc']>>>get_files('/home/user/*bash*',prefix=False)['.bash_history','.bash_logout','.bashrc']>>>get_unique_path('{}.csv')'/tmp/tmp3s0_ltan/1.csv'mathsCalculate the L1 and L2 distance between two vectorsClip a value to a minimum or maximumConvert bounding boxes between different formatsCalculate the IoU (Intersection Over Union) between bounding boxesTODO: Link to tocs>>>clip(123,0,10)10>>>clip(-1,0,10)0>>>convert_bbox([100,100,300,400],'xyXY','xy_wh')((100,100),(200,300))>>>box_1=[100,100,300,400]>>>box_2=[50,150,250,100]>>>intersect_bboxes(box_1,'xyXY',box_2,'xywh')(100,150,300,250)>>>calc_IoU(box_1,'xyXY',box_2,'xywh')0.3076923076923077metaprogrammingAccess the functions at any depth of the call stackTODO: Link to tocs>>>deffoo():...caller=reference_caller_function()...print(f'{caller.__name__}() called foo()')...>>>defbar():...foo()...>>>bar()bar()calledfoo()Roadmapdecoratorsregexesinteractive exploration tools/utilitiesmathsgeometrydata processingimagestexttabularstructured (e.g. list of dicts <-> dict of lists)Similar projectsboltonsBoltons is a set of over 230 BSD-licensed, pure-Python utilities in the same spirit as — and yet conspicuously missing from — the standard librarymore-itertoolsPython's itertools library is a gem - you can compose elegant solutions for a variety of problems with the functions it provides. In more-itertools we collect additional building blocks, recipes, and routines for working with Python iterables.dateutilThe dateutil module provides powerful extensions to the standard datetime module, available in Python.toolzA functional standard library for Python.ContributingWe appreciate any form of contribution, including but not limited to:Code contributions: Enhance our repository with your code and tests.Feature suggestions: Your ideas can shape the future development of our package.Architectural improvements: Help us optimize our system's design and API.Bug fixes: Improve user experience by reporting or resolving issues.Documentation: Help us maintain clear and up-to-date instructions for users.