Saravanan666/pypi-org huggingface dataset:
Package: ream
ream-pythonA parser/dumper for REAM files written in Pythom.Seeream-langto learn more about the specs for REAM.Installationream-python is available onpypifor Python version 3.7 and newer and can be installed with pip:pipinstallreamdependencelark-parser: A modern parsing library for Python, implementing Earley & LALR(1). Future versions will drop the dependence.LicenceThis project is licensed under MIT license.Testupdate
Package: reamber
Reamber (Py):blue_book: Wiki&Getting Startedpip install reamberVSRG Toolbox for data extraction, manipulation & analysis.FeaturesGame Support: osu!mania, StepMania, BMS and partially O2Jam files.Algorithms: Map IO, Conversion, Map Image Generation, Pattern ExtractionData Architecture: Pandas DataFrame IntegrationThis is built on pandasDataFrame, thus, if you need more control, you can
retrieve the underlyingDataFramevia the.dfproperty on many reamber classes.StatusThis is in alpha, names and references will change without notice.
We highly recommended to fix version in requirements.For Developers, By DevelopersA growing amount of osu!mania players are interested in programming.
The best way to learn is to relate it to something that you're familiar with.That's why I'm making a library that allows you to tamper with your favorite
games, and learn on the way.Migrating to >v0.1.1 ReleasesMigrating to>0.1.1means spending time updatinga lotof names.Major changes in0.1.1include many differences in naming.
Only update it if you don't plan mind spending time refactoring.
Package: reaper
A simple module that turns DeprecationWarning into errors when your
library version or requirements changeIt is notoriously difficult to keep track of deprecated function and
clean dead code regularly release after release. In particular, when
marking a function as deprecated, it is common to forgot mentioning the
timeline of deprecation.This forces you to actually pass a simple specification of when the
deprecation should happen, and dead code be removed.Use caseDeprecate component of your own library.Let’s say the current version of reaper have bad API, I intend to remove
for 0.5, but want to keep around for the time being. I can use the
following:fromreaperimportdeprecate@deprecate("reaper",">=0.5.0")defthrow_warnings(predicate,category,version,message):"""
    This is too hard to use !
    """passThis will show aDeprecationWarningto user calling the function in
any version from 0.1.x to 0.4.x, and raise aDeprecationExceptionto
any user using 0.5.0-dev, or above.Future PlansAllow to raise early on Continuous Integration system to catch using
deprecated API early in development process, and still allowing you
to use code locally.Ability to do the same base on time/dateversions which is not a decorator/ context managerability to mark version of dependency supported, and warn/raise when
the minimal dependency list change:ifdeprecate(`tornado`,`<=4.3.1`):#do stuffelse:# do other stuffThe first branch (or actually the predicate) should warn/raise as soon
as something liketornado>=4.4appears in requirements.txt, that
some dead code has been found.
Package: reapermc
ReaperMCA high level framework for the Bolt scripting language.IntroductionReaper is a framework for theBoltscripting language. It features complex yet optimized, high level yet simple to use functions.The goal of this project is to reduce the time developers waste. The aim is to enable developers in creating things faster while focusing on the important bits.For further info about the project, checkhere.InstallationpipinstallreapermcGetting startedThis package is designed to be used within.boltscripts, inside a bolt enabled project. I will never officially support.mcfunctionfiles.To enable Reaper inside your project, you will need to addreapermcto yourrequirelist inside the beet config file.require:-bolt-reapermcModules named<namespace>:mainwill automatically be the entrypoint.To use Reaper's functions, you'll need to import them. (This won't be necessary in the future).# my_project:mainfromreapermc:apiimportsleep,set_time,tagdefbecome_wizard():tellraw@s'You will become a wizard...'withsleep(40):set_time(13000)tag('wizardman')tellraw@s'You are now a wizard!'DocumentationThe documentation for this project can be foundhere.License -MIT
Package: reApiPyTelegram
ApiPyTelegram | apttelegram bots core for python.InstallationInstall my-project with pippipinstallPyTelegramApiUsage/ExamplesimportApiPyTelegramApiPyTelegram.apt()#you token goes hereApiPyTelegram.message.text(12345,"test you")# first arg is chat idGet user chat id hereLicenseMITDocumentationDocumentationContributingContributions are always welcome!Seecontributing.mdfor ways to get started.Please adhere to this project'sPowered by apt..
Package: reapr
reaprExtensible reprWARNING: This repo is in development. It was automatically generated withmkpylib. If you're reading this message, it means that I use this repo for my own purposes right now. It might not do anything at all; the default functionality isprint('TODO').If you really want to try it out, feel free. I recommend reading through thetestsand commit history to see if it does what you need, orask mefor status updates.Stay tuned!Installpip3 install -U reaprOr develop locally:git clone https://github.com/shawwn/reapr ~/reapr
cd ~/reapr
python3 setup.py developUsageimportreaprprint('TODO')LicenseMIT. SeeLICENSEfile.ContactA library byShawn Presser. If you found it useful, please considerjoining my patreon!My Twitter DMs are always open; you shouldsend me one! It's the best way to reach me, and I'm always happy to hear from you.Twitter:@theshawwnPatreon:https://www.patreon.com/shawwnHN:sillysaurusxWebsite:shawwn.com
Package: rear
ReArRemote Archiver: safely collect output files into archives on network filesystemReplacement ofopen()for scenario where multiple processes generate lots of (log) files on a network filesystem. ReAr redirects the writes to Zip files to reduce the stress on the filesystem and to keep things organized. Writing to archive is chunked and staged to avoid single point of failure.# On each worker:asyncwithrear_fs("/path/to/archive_base"):withrear_open("ar.zip/relpath/to/file",'w+b')asf:# open a read-write buffer ...#with rear_pickup("/path/to/temp-file", "ar.zip/relpath/to/file"): # ... or pick up a file created by othersf.write(b"...")# The file is written to a tmp archive on closing.# It will then be moved and eventually stored as `relpath/to/file` in zip file `/path/to/archive_base/ar.zip`.To avoid concurrent write, each worker writes to a temporary Zip file, and they create a new one every 5 minutes. Run a scavenger to collect the files in the temporary archives into the final archives:# On your main process:asyncwithscavengerd("/path/to/archive_base"):...# ... or to do it manuallywhile:;dorear-scavenger-d/path/to/archive_basesleep5mdoneFAQWhat happens if a worker instance crashes?Its current temporary archive will end up missing the central directory list as it is not properly closed. Scavenger will try to recover the files as much as possible (withzip -FF).How does the scavenger works?Multiple processes cannot write to one Zip file at the same time, so each first deposit the files to individual temporary Zip files and record where those files should be saved eventually. When a temporary Zip file is closed (after the process exit or after 5 minutes), Scavenger copies all files to their destination Zip files. Scavenger does not need to watch for incoming files actively since it can organize them any time after they are saved to the temporary Zip files. It is also safe to run multiple Scavenger instances at any time: it will check if it is necessary before performing any action.
Package: rearfloor
RearFloor (Background)RearFloor is a library to make your functions and class methods run in the background asynchronously with just 10 characters.This is a lightweight library that takes <5 minutes to audit. Whether you're a small developer looking for a solution, or a large and soulless corporation, this library will save yousecondsin both server response time and finding an answer on StackOverflow that does the same thing.InstallationUse the package managerpipto install RearFloor.pipinstallrearfloorUsagefromrearfloorimportrearfloor# Here's a boring, synchronous functiondefsynchronousFunction(text_to_print:str):print("Synchronous:",text_to_print)# Now use that function.# The rest of the program waits for it to stop before moving on.synchronousFunction("Lame")# Here's a rad, asynchronous function@rearfloordefasynchronousFunction(text_to_print:str):print("Asynchronous:",text_to_print)# Now use *that* function.# The rest of the program moves on, reducing your wait time on tasks# that aren't going to return or modify a value.asynchronousFunction("Sick")I use this to asynchronously write to the database in a high traffic, low response time Flask application. Now my customers can get a response in <90ms instead of 400-1500ms and the data is still recorded!ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.LicenseMIT
Package: rearrangement-algorithm
Rearrangement AlgorithmPython implementation of a rearrangement algorithm that can be used to
calculate bounds on the value-at-risk (VaR) of dependent risks.The current version includes the following calculations:Upper and lower bounds on the VaR of dependent risks[^embrechts2013]Upper and lower bounds on the survival probability of functions of dependent
risks[^puccetti2012]Upper and lower bounds on the expected value of supermodular functions of
dependent risks[^puccetti2015]Mathematical BackgroundMathematical details and derivations can be found in the
publications[^embrechts2013][^puccetti2012][^puccetti2015].More information and an overview of extensions can be found on the website of
theRearrangement Algorithm
project.ImplementationParts of this implementation are based on theqrmtoolsR package (version
0.0-13) by M. Hofert, K. Hornik, and A. J. McNeil.
Details on the algorithm and the R implementation can be found in the paper"Implementing the Rearrangement Algorithm: An Example from Computational Risk
Management", M. Hofert, In: Risks, vol. 8, no. 2,
2020[^hofert2020].InstallationYou can install the package via pippipinstallrearrangement-algorithmIf you want to install the latest (unstable) version, you can install the
package from sourcegitclonehttps://gitlab.com/klb2/rearrangement-algorithm.gitcdrearrangement-algorithm
gitcheckoutdev
pipinstall.DocumentationYou can find the documentation for this package onRead the
Docs.This also includes some usage examples.License and ReferencingThis program is licensed under the GPLv3 license. If you in any way use this
code for research that results in publications, please cite this package.Parts of this code are based on theqrmtoolsR package (version
0.0-13), which is also released under the GPLv3 license.References[^embrechts2013]: P. Embrechts, G. Puccetti, and L. Rüschendorf, "Model uncertainty and VaR aggregation," J. Bank. Financ., vol. 37, no. 8, pp. 2750-2764, Aug. 2013.doi:10.1016/j.jbankfin.2013.03.014[^puccetti2015]: G. Puccetti and L. Rüschendorf, "Computation of Sharp Bounds on the Expected Value of a Supermodular Function of Risks with Given Marginals," Commun. Stat. - Simul. Comput., vol. 44, no. 3, pp. 705-718, Mar. 2015.doi:10.1080/03610918.2013.791368[^puccetti2012]: G. Puccetti and L. Rüschendorf, "Computation of sharp bounds on the distribution of a function of dependent risks," J. Comput. Appl. Math., vol. 236, no. 7, pp. 1833-1840, Jan. 2012.doi:10.1016/j.cam.2011.10.015[^hofert2020]: M. Hofert, "Implementing the Rearrangement Algorithm: An Example from Computational Risk Management," Risks, vol. 8, no. 2, May 2020.doi:10.3390/risks8020047
Package: reason
ReasonPython lightweight easy-to-use natural language processing toolbox with integrated
machine learning packages.FeaturesTokenization (word, sentence)Tagging (part-of-speech, regex)Lemmatization and word stemming (Porter, regex)Frequency distribution analysisN-gramsClassification (naive bayes, confusion matrix)Clustering (k-means, elbow method, DBSCAN)InstallationInstall latest stable version using pip:pip install --upgrade reasonThe dependencies of the package will also be installed automatically.Quick-StartSeeQuick-Start GuideLicenseMIT -- SeeLICENSEfor details.Report issuesFor reporting issues with the package, please reach out to me directly
atsoltaniradali@gmail.com
Package: reasoner-pydantic
Reasoner-Pydanticℹ️Pydanticmodels for theReasoner APIdata formats.These models are very handy when setting up a Reasoner API withFastAPI.Example usagefromreasoner_pydanticimport(Query,Message,QNode,KnowledgeGraph,Node,Result,NodeBinding,)defadd_result_to_query(query_dict):query=Query.parse_obj(query_dict)message:Message=query.message# get query graph nodeqnode_id=next(iter(message.query_graph.nodes))# add knowledge graph nodeknode=Node.parse_obj({"categories":["biolink:FooBar"]})knode_id="foo:bar"message.knowledge_graph.nodes[knode_id]=knode# add resultresult:Result=Result.parse_obj({"node_bindings":{qnode_id:[{"id":knode_id}]}})message.results.add(result)returnmessage.json()add_result_to_query({"message":{"query_graph":{"nodes":{"n0":{}},"edges":{}},"knowledge_graph":{"nodes":{},"edges":{}},"results":[]}})Validation UsageBecause of performance concerns, as well as how types are implemented in Python, there is no assignment validation enforced on these models.
For example:fromreasoner_pydanticimportKnowledgeGraph# This will not throw an errorkg=KnowledgeGraph(nodes="hi")This is especially important to keep in mind when constructing objects that use containers.
This library uses custom container types: HashableMapping, HashableSequence, HashableSet:fromreasoner_pydanticimportKnowledgeGraph,Node,CURIE# This is not correct and will not throw an error, but will cause problems laterkg=KnowledgeGraph(nodes={})# Instead, if you would like to build models this way, use a typed container constructorkg=KnowledgeGraph(nodes=HashableMapping[CURIE,Node](__root__={}))For this reason, we recommend one of the following options:Useparse_objexclusively for constructing models. This will perform validation for you. This option is best if performance is not important.Use a static type checker to ensure that models are being constructed correctly. Constructing objects this way is more performant, and the static type checker will ensure that it is done correctly. We recommend usingpyrightin your editor.
Package: reasoningchain
ReasoningChain给接口增加本地缓存fromreasoningchain.cache.disk_cacheimportdisk_cache@disk_cache(cache_path=os.path.join(os.environ["HOME"],"some_path/some_name"),expire_time=864000)deffoobar(key:str):"""do something"""pass获取文本向量fromreasoningchain.api.closeaiimportbatch_get_embeddingsembeddings=batch_get_embeddings(["hello","world"],batch_size=16)构建文本向量索引fromreasoningchain.index.doc_indeximportDocIndexdoc_index=DocIndex()doc_index.build(doc_full_text)# 构建索引doc_index.save(index_file_path)# 保存索引到文件doc_index.load(index_file_path)# 从文件加载索引results=doc_index.search(query)# 查询索引自定义langchain Toolsfromreasoningchain.custom_toolsimportcustom_toolfromreasoningchain.custom_toolsimportget_all_tool_namesfromreasoningchain.custom_toolsimportget_all_custom_tool_namesfromreasoningchain.custom_toolsimportload_tools# 增加自定义tool@custom_tool(name="{{Tool Name}}",description="{{Tool Descriptions}}")deftool_func(input_text:str,callback:callable=None)->str:"""do something"""pass# 获取所有自定义的tool namesall_custom_tool_names=get_all_custom_tool_names()# 获取所有tool names（包括自定义的tool 和 langchain中预定义的tool）all_tool_names=get_all_tool_names()# 加载toolstools=load_tools(["BaiduSearchText","GoogleSearchImage","wikipedia"])运行chain代码中调用：importreasoningchainfinal_answer=reasoningchain.run("介绍一下小度",tool_names=["BaiduSearchText"])print(f"Final Answer:{final_answer}")命令行：# 单queryreasoningchain--tools"BaiduSearchText"--query"马斯克是谁?"# 批量处理catqueries.txt|reasoningchain--tools"BaiduSearchText"启动WebUI服务：reasoningchainui--port8502参数配置# 通过环境变量设置参数# 使用BaiduSearchText时需设置os.environ['BAIDU_SEARCH_API']='https://m.baidu.com/...'# 使用openai相关接口时需设置os.environ['OPENAI_API_KEY']='123'# 需要对openai做代理时可设置os.environ['OPENAI_API_BASE']='代理地址'# 使用serpapi时需设置，包括google的搜索APIos.environ['SERPAPI_API_KEY']='SERP API-KEY'# 使用WOLFRAM ALPHA Tool时需设置os.environ['WOLFRAM_ALPHA_APPID']='walfram-alpha appid'# 使用DuLLM时需设置os.environ['DU_LLM_API']='http://...'# 内部自定义LLM的API
Package: re-assert
re-assertshow where your regex match assertion failed!installationpip install re-assertusagere-assertprovides a helper class to make assertions of regexes simpler.re_assert.Matches(pattern: str, *args, **kwargs)construct aMatchesobject.note: under the hood,re-assertuses theregexlibrary for matching,
any*args/**kwargsthatregex.compilesupports will work.  in general,
theregexlibrary is 100% compatible with therelibrary (and will even
accept its flags, etc.)re_assert.Matches.from_pattern(pattern: Pattern[str]) -> Matchesconstruct aMatchesobject from an already-compiled regex.this is useful (for instance) if you're testing an existing compiled regex.>>>importre>>>reg=re.compile('foo')>>>Matches.from_pattern(reg)=='fork'False>>>Matches.from_pattern(reg)=='food'TrueMatches.__eq__(other)(==)the equality operator is overridden for use with assertion frameworks such
as pytest>>>pat=Matches('foo')>>>pat=='bar'False>>>pat=='food'TrueMatches.__repr__()(repr(...))a side-effect of an equality failure changes therepr(...)of aMatchesobject.  this allows for useful pytest assertion messages:>       assert Matches('foo') == 'fork'
E       AssertionError: assert Matches('foo'...ork\n    #    ^ == 'fork'
E         -Matches('foo')\n
E         -    # regex failed to match at:\n
E         -    #\n
E         -    #> fork\n
E         -    #    ^
E         +'fork'Matches.assert_matches(s: str)if you're using some other test framework, this method is useful for producing
a readable traceback>>>Matches('foo').assert_matches('food')>>>Matches('foo').assert_matches('fork')Traceback (most recent call last):File"<stdin>", line1, in<module>File"/home/asottile/workspace/re-assert/re_assert.py", line63, inassert_matchesassertself==s,self._failAssertionError:regex failed to match at:> fork^
Package: reasy
ReasyA crawler for BT7086 and fast and simple m3u8 downloader.Get StartDownload and installPython3,Aria2andFFmpeg, both of them are the key components for Reasy.Install Reasy. Sometimes you may usepip3instead ofpip, and it also works forpython3which will be used later on. When you gotreasy version 0.0.4, it means installation is succeed.pipinstallreasy
reasy-vDownload templates fromGitHub, including two files:config.yaml.exampleandaria2.conf.example.Set environment variable for Reasy.REASY_CONFIG: The path for config of Reasy. Please moveconfig.yaml.exampleto the config folder and rename it toconfig.yaml. To make clear, I presume config path you use is/.reasy/config.yaml.# set env on LinuxexportREASY_CONFIG=/.reasy/config.yamlModify config.yaml to meet your requirements. Here we go:aria2.config: This is for Aria2, a light-weight downloader. You can usearia2.conf.exampleas template.aria2.download_path: The path your videos are saved.session.enabled: A mechanism to prevent from download repeated. Unless you know what it is, you should enable it as default.session.path: The path for session file. You just need to create a empty file bytouch /.reasy/reasy.session.For now, you can run and enjoy it.reasyrun# for more usagereasyrun--helpNot Implement YetGet more data if the number of videos not meet the requirements ofmaximum_download_numdefined in theconfig.yaml(v0.1.0)Multi-threading load m3u8 (v0.1.0)Session management by CLI Tool (v0.1.0)Web UI to control remotely (v1.0.0)
Package: reata
Reata is a simple wrapper for the official MySQL DBAPI for Python
(mysql.connector). The main purpose of the library is to simplify common MySQL
operations and make interfacing with the DBAPI a more python-centric affair.
Reata attempts to minimize the need for writing SQL statements into Python
scripts. Unlike similar libraries, however, Reata is not an ORM and it makes
no attempts to be an ORM. Instead, Reata aims to limit the amount of code
which must be written to interact with the DBAPI while improving
readability. Rather than force the user to write MySQL statements and execute
them via a cursor object, as is typically the case with standard DBAPIs in
Python, Reata abstracts away the underlying connection object and allows
users to execute common MySQL operations via class methods.Reata also makes efforts to help simplify data processing pipelines by
incorporating methods that leverage the Pandas API. Users can load tables
directly into dataframes and use dataframes to update tables.NoteThis distribution has been developed and tested on a standalone Python build
and could–under rare circumstances–exibit unexpected behavior on standard
CPython. Although no differences between the execution of code in the
standalone build and normal CPython have been found during the process of
development, I nevertheless wish to provide fair warning.Installationpython-mpipinstallreataDocumentationUp-to-date documentation can be found here:https://jammin93.github.io/reata/Usageimportmysql.connectorfromreataimportMySQLClient,TableSchemacnx=mysql.connector.connect(...)client=MySQLClient(cnx)LicenseGNU General Public License
Package: reaxfit
ReaxFitParameter-fitting module for lammps-reaxff with differential_evolution of scipy.Requirementslammps (library)numpyscipyInstalluse anacondacondainstall-cconda-forgelammps
condainstallscipynumpy
pip3installreaxfitFor Windows, lammps from conda forge is not available. You can alternatively download the lammps binary with the python library fromlammps.org.[option] install jupyterlab and ase
It will be convenient to use reaxff with jupyterlab and ase.condainstall-cconda-forgejupyterlabaseUseageSeeA sample on colab
Package: reaxpro-workflow-service
# ReaxPro Workflow ServiceA simple [FastAPI-framework](https://fastapi.tiangolo.com/) for running asynchronous tasks through [python-celery](https://pypi.org/project/celery/). This app is targeted to be a high-level API for the workflow-orchestration of the [ReaxPro-platform](https://www.reaxpro.eu/).## Authors[Matthias Büschelberger](mailto:matthias.bueschelberger@iwm.fraunhofer.de) (Fraunhofer Institute for Mechanics of Materials IWM)
[Kiran Kumaraswamy](mailto:kiran.kumaraswamy@iwm.fraunhofer.de) (Fraunhofer Institute for Mechanics of Materials IWM)## DocumentationPlease refer to the [ReadTheDocs-pages](https://reaxpro.pages.fraunhofer.de/docs/) for the overall installation procedure, tutorials and use case documentation.## Python dependenciesFirst of all, you will need to install OSP-core`shell (env)user@computer:~$pip installosp-core`Then, install the wrapper. Simply type:`shell (env)user@computer:~$pip installreaxpro-workflow-service`… or if you are installing from source (cloning of the repository needed before):`shell (env)user@computer:~/reaxpro-workflow-service$pip install . `## LicenseThis project is licensed under the BSD 3-Clause. See the LICENSE file for more information.## DisclaimerCopyright (c) 2014-2023, Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. acting on behalf of its Fraunhofer IWM.Contact: [SimPhoNy](mailto:simphony@iwm.fraunhofer.de)