Saravanan666/pypi-org huggingface dataset:
Package: rectvision
rectvisionRectVision is a No code / Low code AI platform that helps users to build end to end computer vision/ NLP projects, from data to production.InstallationRectvision supports an installation of Python 3.6 and above. It is available on Windows, MacOS and Linux Systems.pip (Recommended)To install the currentrectvisionyou'll need at least Python 3.6.1. If you have an older version of Python, you will not be able to userectvision.$pipinstall--upgraderectvisionAlternatively, you may download the wheels fromPyPiGuidevisit: https://docs.rectvision.com/docs/intro
Package: recuests
RecuestsPython bindings for myHTTP clientas its name implies it haverequestslike interface.Struct of ResponseclassResponse:def__init__(self,body:str,status:int,headers:dict):self.body=bodyself.headers=headersself.status=statusdefjson(self)->dict:returnjson.loads(self.body)def__str__(self)->str:returnself.bodydef__repr__(self)->str:returnf"<Response{self.status}>"Methodsdefget(url:str,headers:Optional[Dict[str,str]]=None)->Response:defpost(url:str,headers:Optional[Dict[str,str]]=None,data:str="")->Response:defput(url:str,headers:Optional[Dict[str,str]]=None,data:str="")->Response:defdelete(url:str,headers:Optional[Dict[str,str]]=None)->Response:RequirementsPrecompiled binaries only for linux (yet you can still generate yours with make)Only tested with python 3.11
Package: recurly
RecurlyThis repository houses the official python library for Recurly's V3 API.Note:
If you were looking for the V2 client, see thev2 branch.DocumentationThis library'spython documentationis hosted on ReadTheDocs.
It contains the Getting Started guide as well as the reference documentation.Documentation for the HTTP API and example code can be foundon our Developer Portal.ContributingPlease see ourContributing Guide.
Package: recurring
RecurringThis is a simple library for running a function or callable every N seconds. It's meant for applications that need to schedule small, self-contined callable(s) on a relatively long, potentially changing period . alive-checks, state snapshots, that sort of thing.Use this if:You want to call something periodically over the lifetime of your application.You want to be able to change the time between calls.You want or need to avoid the overhead ofjoining andstarting a thread every time. (up to 1/5 of a second according to my sample-size of one machine under no other load)The stuff you're going to call isn't going to destroy machines if it's killed abruptly at the end of the application's life.This is probably not appropriate for your project if:You're already using or likely will be using a fleshed-out concurrency framework.You have many things you'd like to repeatedly schedule and run.Your callables absolutelymustexecute some cleanup code to avoid disaster on kill.This is not a library intended for top-level program composition.Installation:pip install recurringUsage:import recurring

def stuff():
    # do stuff ...

seconds_between_stuff = 30

job = recurring.job(stuff, seconds_between_stuff)
job.start()

# ...

seconds_between_stuff = 300000000 # this will be *from when rate is set*, not *from the next scheduled call*
job.rate = seconds_between_stuff

# ...

# stop making calls until start() is called again
job.stop()

# some time later ....
job.start()

# stop making calls permanently
job.terminate()
job.start() # raises RuntimeError
job.rate = 3000 # raises RuntimeError
Package: recurse-tree-process
A Functional util for recursive tree processingUsagefromtree_utils.fs_recursionimportRecursionStrategy,ProcessingFunctions,fs_tree_recursion,TreeNodeFunctions,get_children_pathsfromtree_utils.tree_recursionimportProcessingFunctions,RecursionStrategy,TreeNodeFunctionsdefexample_extract_file_paths(root_dir_path:str,options={},mode=RecursionStrategy.ANY):tree_node_functions:TreeNodeFunctions=TreeNodeFunctions()defprocess_file(path:str):logging.debug(f"Processing file:{path}")print(path)# Return the path as the desired content extracted from the nodereturnpathdefprocess_dir(dir_path:str,children_paths:list[str],children_processing_results:list[str]):# The paths we returned in 'process_file' are collected and passed to the 'process_dir' function as the children_processing_resultslogging.debug(f"Processing dir:{dir_path}")returnchildren_processing_resultstree_node_functions.is_leaf=os.path.isfiletree_node_functions.is_node=os.path.isdirtree_node_functions.get_children_ids=get_children_pathstree_node_functions.process_leaf=process_filetree_node_functions.process_node=process_dirreturnfs_tree_recursion(root_dir_path,tree_node_functions,options,mode=mode)example_extract_file_paths('/some/path')
Package: recurse-words
recurse-wordsfind words that have other words in them that when you remove the inner word what's left is still a wordand do other stuff too like evaluate the modular phonetic structure of English likefromrecurse_wordsimportGraph_Recurser,Graphrecurser=Graph_Recurser('phonetic_common')recurser.recurse_all_words(min_include_word=3,min_test_word=2,min_clipped_word=2)Graph(recurser).render_graph('img').save('/some/path.png')docs are here!!!main docs athttps://recurse-words.readthedocs.io/______________________________
 / \                             \.
|   |      p l e s               |.
 \_ |        t a k e             |.
    |          n o t e           |.
    |     -------------------    |.
    |                            |.
    |     this software is       |.
    |     developed expressly    |.
    |     for the purpose of     |.
    |     "funzies"              |.
    |                            |.
    |     i make no promises     |.
    |     that it works          |.
    |     or is good             |.
    |                            |.
    |   _________________________|___
    |  /                            /.
    \_/dc__________________________/.installationFrom pypi:pip install recurse-wordsFrom github:git clone https://github.com/sneakers-the-rat/recurse-words
pip install ./recurse-words
# or
poetry install ./recurse-wordsusagePoint the recurser at a file that has a list of words,
for examplethis one,
and let 'er ripfromrecurse_wordsimportRecurserrecurser=Recurser('path/to/some/words.txt')recurser.recurse_all_words()recurser.save('word_trees.pck')# see word trees by a few metrics# max tree depthrecurser.by_depth# total number of leavesrecurser.by_leaves# total number of edgesrecurser.by_densityDraw network graphs!recurser.draw_graph('some_word','/output/directory')Auto-download different corpuses!recurser=Recurser(corpus='english')recurser=Recurser(corpus='phonetic')
Package: recursion-trace
Recursion TraceOverviewrecursion_traceis a Python package that provides a decorator to trace recursive function calls. It generates a visual recursion tree using Graphviz, making it easier to understand and debug recursive algorithms.FeaturesTrace single and mutual recursion.Generate a Graphviz plot to visualize the recursion tree.Capture function arguments, return values, and recursion depth.Render Animation demonstrating construction of recursion-treeInstallationDownload thegraphvizfor the respective system (Windows/Mac/Linux)pipinstallrecursion-traceUsageDecorate the in-usage recursive functions with the decorator@trace_recursionExample: Merge Sort with Animationfromrecursion_traceimporttrace_recursion,show_recursion_tree@trace_recursion# use the decorator to trace the recursion stackdefmerge_sort(arr):iflen(arr)<=1:returnarrmid=len(arr)//2left_half=arr[:mid]right_half=arr[mid:]L=merge_sort(left_half)R=merge_sort(right_half)returnmerge(L,R)defmerge(left,right):result=[]i=j=0whilei<len(left)andj<len(right):ifleft[i]<right[j]:result.append(left[i])i+=1else:result.append(right[j])j+=1result.extend(left[i:])result.extend(right[j:])returnresultif__name__=='__main__':arr=[3,1,4,1,5,9,2,6,5]sorted_arr=merge_sort(arr)show_recursion_tree(make_animation=True)# display recursion tree# setting make_animation=True also renders an animation of recursion-tree constructionOutput:https://github.com/practice404/recursion-trace/assets/74960567/f6fbd987-5b77-42c8-9e3a-25096a8f4466Example: Mutual Recursive Functionsfromrecursion_traceimporttrace_recursion,show_recursion_tree@trace_recursion# use the decorator to trace the recursion stackdefis_even(n):ifn==0:returnTruereturnis_odd(n-1)@trace_recursion# use the decorator to trace the recursion stackdefis_odd(n):ifn==0:returnFalsereturnis_even(n-1)if__name__=='__main__':is_even(4)show_recursion_tree()Output:AuthorSwayam Singh
Package: recursion-tree-plotter
Recursion Tree PlotterA python decorator to generate a visual tree for recursive functions.Installation$pipinstallrecurstion-tree-plotterExampleLet's say you have a recursive function for finding n-th element in Fibonacci sequence.deffib(n):ifn<=1:returnnreturnfib(n-1)+fib(n-2)In order to plot a recursion tree for an execution of above function (say fib(5)), we put@plot_recursion_treedecorator over it.fromrecursion_tree_plotterimportplot_recursion_tree@plot_recursion_treedeffib(n):ifn<=1:returnnreturnfib(n-1)+fib(n-2)And boom!In the tree, node label is constructed as<comma-separated args> [<counter>]wherecounterspecifies the order
of execution.Check outexamplesfolder for more examples!
Package: recursive-decorator
Decorator to apply a given decorator recursively on all function, inside a function/method, recursively.What isrecursive_decorator?recursive_decoratoris a decorator that allows us todecorate/trasform all functions along the stack callat runtime, motivated by the need to add/transform logics, to knownunknown functions, along the stack calls.Notes:Functions/Methods will not be replaced, new instances will be returned.Function/Methods cannot be wrapped more then once with same transformer/decorator.Installing$pipinstallrecursive_decoratorUsageimport recursive_decoratorfromrecursive_decoratorimportrecursive_decoratordefine your decorator to apply recursively on all functions.>>>defdecorator(f):...:defwrapper(*args,**kwargs):...:print(f.__name__)...:returnf(*args,**kwargs)...:returnwrapperNow using your decorator on function without using recursive_decorator will leads to the following output>>>@decorator...:defmain_function():...:sub_function()>>>main_function()main_functionUsing recursive_decorator leads to>>>@recursive_decorator(decorator)...:defmain_function():...:sub_function()>>>main_function()main_functionsub_functionFurthermore, if sub_function has function calls, they will decorated to>>>defsub_function():...:another_function()>>>@recursive_decorator(decorator)...:defmain_function():...:sub_function()>>>main_function()main_functionsub_functionanother_functionand so on…ExamplesStop on ExecptionWe can wrap all functions with try except…>>>importsys>>>importipdb>>>fromrecursive_decoratorimportrecursive_decorator>>>defwrap_function_with_try_except(f):...:deftransformed_func(*args,**kwargs):...:try:...:returnf(*args,**kwargs)...:except:...:ipdb.set_trace(sys._getframe().f_back)...:returntransformed_func>>>defthrows_exception():...:raiseException>>>@recursive_decorator(wrap_function_with_try_except)...:deffunction():...:throws_exception()...:pass>>>function()21throws_exception()--->22pass23If function will throw an error… ipdb session will start.ProfilerWe can set time profiler for all running functions.>>>importtime>>>fromrecursive_decoratorimportrecursive_decorator>>>defduration_transformer(f):...:deftransformed_func(*args,**kwargs):...:start_time=time.time()...:value=f(*args,**kwargs)...:end_time=time.time()...:print("function{}duration is{}minutes"...:.format(f.__name__,end_time-start_time))...:returnvalue...:returntransformed_func>>>defwaiting_function():...:time.sleep(5)>>>@recursive_decorator(duration_transformer)...:deffunction():...:waiting_function()>>>function()functionwaiting_functiondurationis5.00511908531189minutesfunctionfunctiondurationis5.006134510040283minutes
Package: recursive_dict
A dict subclass that can lookup several layers deep.Free software: ISC licenseDocumentation:https://recursive_dict.readthedocs.org.FeaturesTODOHistory0.2.0 (2016-12-29)Add __setitem__ methodCreate a base classRetain a link to original itemAccess original item attributes0.1.0 (2015-01-11)First release on PyPI.
Package: recursive-dictionary-update
Recursively Update a DictionaryFree software: MIT licenseInstallationpip install recursive-dictionary-updateDocumentationhttps://python-recursive-dictionary-update.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog0.1.0 (2017-08-07)First release on PyPI.
Package: recursive-itertools
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.
Description:Keywords: recursive,itertools,iteration
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Requires-Python: >=2.7
Package: recursive-monkey-patch
Recursive monkey patching for Python====================================.. image:: https://travis-ci.org/nthiery/recursive-monkey-patch.svg?branch=master:target: https://travis-ci.org/nthiery/recursive-monkey-patchMotivating use case-------------------Let ``foo`` be a Python package, built on top of another Pythonpackage ``bar``. Sometimes ``foo`` may wish to extend the ``bar``package by adding features (e.g. methods) to existing classes ormodules. Sometimes the whole package is meant as a temporary locationwhere experimental features can mature and be distributed early untilthey get merged into the ``bar`` package.In such cases, it's desirable to write the source code of thosefeatures as closely as if they were in the ``bar`` package.``recursive-monkey-patch`` enables this by providing a tool torecursively monkey patch the ``bar`` package. Let's assume for examplethat we are writing a package ``bar-foo`` that requires the additionof a method ``f`` to the class ``bar.x.y.z.Z``.To achieve this, one writes a module ``foo.x.y.z.Z`` containing adummy ``Z`` class::class Z:def f(self):return "f"And then, upon initializing the package, one runs::import barimport foofrom recursive_monkey_patch import monkey_patchmonkey_patch(foo, bar)which will recursively crawl through ``foo``, and insert methods like``f`` at the corresponding location in ``bar``. If a class or modulein ``foo`` does not exist in ``bar``, then the module is inserted atthe corresponding location in ``bar``Relation with SageMath----------------------This package is primarily meant for writing (experimental) packages ontop of `SageMath <http://sagemath.org>`_, an open source software formathematics that includes a large Python library. However, thedependency upon the ``SageMath`` package is actually light:- Running the doctests requires ``sage``;- When the SageMath package is present, the monkey patching involves afew additional Sage specific hacks.ToDo----- Support for lazy imports- Where is the natural place for running ``monkey_patch` in a package?Related tools-------------- `patchy <https://github.com/adamchainz/patchy>`_: runtime application of source patches at the granularity of functions- `unittest.mock.patch <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch>`_: temporary runtime monkey patching of functions; meant primarily for testing purposes
Package: recursivenodes
recursivenodes: Recursive, parameter-free, explicitly defined interpolation nodes for simplicesThis package includes one module level function,recursive_nodes(), which returns
nodes for polynomial interpolation on the simplex in arbitrary dimensions.The nodes have a few nice properties: they are explicitly constructed and fully
symmetric, and their traces on edges are Lobatto-Gauss-Legendre nodes (or any
other node set you wish to use).  Among explicitly constructed nodes, they
appear to have the best interpolation properties.  You can find more details in
thedocumentation, and even more in thepreprint.@misc{isaac2020recursive,title={Recursive, parameter-free, explicitly defined interpolation nodes for simplices},author={Tobin Isaac},year={2020},eprint={2002.09421},archivePrefix={arXiv},primaryClass={math.NA}}Requirements:Onlynumpyis needed forrecursive_nodes().Thelebesguesubmodules requiresscipy.Testing requirescoverage,pytestandmatplotlib.Building documentation additionally requiressphinx,sphinxcontrib-bibtex, andsphinxcontrib-tikz.
Package: recursive-parse
Replay Parsing for Tournament Replay PacksThis is a script for parsing tournament replay packs. It recursively searches sub-directories for replay files, then parses the replays using theZephyrus Replay Parser.You can inject a function to analyze output data. Analyzed data is aggregated and stored, then exported as JSON.Information from directory names such as group, BoX and player names can be also be parsed and associated with replay data.Installation and UsageThis script is hosted on PyPI and can be installed with pippip install recursive_parseTherecursive_parsefunction is imported by defaultimport recursive_parseRequired ArgumentsThere are 2 required keyword arguments for the function:sub_diranddata_function.sub_dirspecifies the relative path of the replays you want to parse from the location of the scriptdir/
  analysis.py <-- recursive_parse called here
  replays/
    ...

sub_dir = 'replays'data_functionis a function supplied by the user to analyze output data from parsed replays. Returned data is appended to a list which is exported as JSON after all replays have been parsed.You can access all the information available from parsed replay (players, timeline, stats, metadata) as well as enclosed information in your supplied function viakwargs. This includes default values and any information parsed from directory names.Defaults currently available areignore_unitsandmerge_units.ignore_unitsis a list of temporary unit which are usually not wanted.merge_unitsis a dictionary in the format of<unit name>: <changed name>. It can be used to merge information from different unit modes or to re-name a unit, such asLurkerMP-->Lurker.Optional Argumentsrecursive_parsetakes 2 optional keyword arguments:player_matchandidentifiers. Both are RegEx patterns that parse information from directory names.player_matchis specifically for parsing player names from directories. It takes a list of tuples of RegEx patterns and the type of search to perform.Ex:(<pattern>, <search type>)You can choose betweensearchorsplitfor search type, but the last pattern must be asplitto separate the player names.The default patterns are:standard_player_match = [
    ('\\w+ +[v,V][s,S]\\.? +\\w+', 'search'),
    ('.vs\\.?.', 'split'),
]identifiersis for parsing information from directory names. It contains a list of tuples of RegEx patterns and the chosen name of the pattern. It has no default patterns.Ex:(<pattern name>, <pattern>)The list of tuples can be accessed throughkwargs['identifier']in yourdata_function.ExampleThehsc_analysis.pyfile is an example of usage for replay files from HSC XX.Theparse_datafunction loops through each player's units and buildings that were created during the game and records information about the unit/building and game. It also indentifies and stores groups that players were in.Exporting DataData is exported as JSON to a JSON file by default, but you can use thejson_to_csv.pyfile to create a CSV file from the JSON data.In future there will be an option to define a data schema as an argument forrecursive_parse.
Package: recursive-sgd
recursive-sgdA proof of concept of a recursion doing stochastic gradient descent done in PythonWhy?IDK I just hit me one day that, if I represent a neural network as a sequence of transformations, I could train it recursively.How?The idea is simple: to train some layer of a neural network, a recursive function trains the next layer and returns the gradient of that next layer. This gradient is then used to update the current layer and calculate the gradient w.r.t. the inputs of the current layer, which is then returned to a previous layer.
The gist of it is in thesgd_stepfunction ofrecursive_sgd/sgd.py.Once again, why?The answer is left as an exercise to the readerInstallationOrdinarypip3 install recursive-sgddoes the trick.
Alternatively, one can use:git clone https://github.com/InCogNiTo124/recursive-sgd.git
cd recursive-sgd
python3 setup.py installUsageThere's a CLI available.Trainingpython3 cli.py train [OPTIONS]whereOPTIONScan be the following:-d FILEPATHor--dataset FILEPATH- CSV dataset-i INTor--input-size INT- the number of input features--lr FLOAT- learning rate--loss VALUE- Loss function (CEfor CrossEntropy,MSEfor MeanSquaredError)-e INTor--epochs INT- the number of epochs--batch-size INT- the size of one batch--shuffle- shuffle dataset after every epoch (default)--no-shuffle- never shuffleThe architecture is defined with arguments as well:-l SIZE- a new layer withSIZEneurons-b- add bias-s- add Sigmoid activation-r- add ReLU activation-t- add Tanh activationCheckout the example attrain_commandTestingpython3 cli.py test [OPTIONS]whereOPTIONScan be the following:-m FILEPATHor--model FILEPATH- the path to the saved model-d FILEPATHor--dataset FILEPATH- CSV dataset-i INTor--input-size INT- the number of input features--metrics VALUE- metric with witch you wish to test the model with.Checkout the example attest_commandNotesAfter training, the model will be saved in$PWDasMODEL.sgd. This is hardcoded for now, but will be configurable in the future.There is no-hnor--helpflag. I am parsing the arguments myself without any framework at all and I didn't bother writing helpin the CLIbut here.There are serious limitations in the dataset loading:Only CSV format is allowedThe columnsMUSTbe separated by,character only.The true labels column is implicitly the last oneTechnically it's every remaining column after the number of features defined by-ior--input-sizewhich may introduce subtle bugs of having more than 1 target variables.Only available metric at the moment isaccuracy.One final notehttps://twitter.com/johnwilander/status/1176457013305303040
Package: recviz
recvizSimple and easy visualization for recursive functions in Python.Installing recvizpipinstallrecvizUsagefromrecvizimportrecviz@recvizdeffib(n):# base condition mimicking the first two numbers# in the sequenceifn==0:return0ifn==1:return1# every number is summation of the previous tworeturnfib(n-1)+fib(n-2)fib(3)