Saravanan666/pypi-org huggingface dataset:
Package: ratarmountcore
Random Access Read-Only Tar Mount (Ratarmount) LibraryThis is the library used as backend by ratarmount (CLI).
For a full description including motivation and performance comparisons, seeratarmount.Table of ContentsInstallationUsageInstallationPIP Package InstallationIn many cases a simple pip install should work:pipinstallratarmountcore[full]If there is trouble with one of the compression dependencies, first try installing it without dependencies:pipinstallratarmountcoreAnd if that works, only install those dependencies you need, e.g.:pipinstallratarmountcore[bzip2,gzip]You can install the latest development version with:python3-mpipinstall--user--force-reinstall'git+https://github.com/mxmlnkn/ratarmount.git@develop#egginfo=ratarmountcore&subdirectory=core'DependenciesPython 3.6+ and preferably pip 19.0+ are required.
These should be preinstalled on most systems.Ratarmountcore has as few required dependencies as necessary in order to cause the least troubles on all possible systems.
This means that only uncompressed TAR and ZIP support will work by default.
All optional dependencies are offered as extras.ExtrasRatarmountcore offers these extras (optional dependencies):full, bzip2, gzip, rar, xz, zip, zstdFull includes all dependencies of the other extras.
Thezipextra is currently only a placeholder because the built-inzipfilemodule is being used.In order to install one of these extract, append them in brackets:python3-mpipinstall--userratarmount[bzip2]If you are installing on a system for which there exists no manylinux wheel, then you'll have to install dependencies required to build from source:sudoaptinstallpython3python3-pipfusebuild-essentialsoftware-properties-commonzlib1g-devlibzstd-devliblzma-devUsageThis library offers an interface which is sufficient to work with FUSE.
ThisMountSourceinterface has methods for listing paths and getting file metadata and contents.The ratarmountcore library offers multiple implementations ofMountSourcefor different archive formats:SQLiteIndexedTar:
This is the oldest and most powerful implementation.
It supports fast access to files inside (compressed) TARs.RarMountSource: An implementation for RARs using rarfile.ZipMountSource: An implementation for ZIPs using zipfile.FolderMountSource: An implementation taking an existing folder as input.There also are these functional implementations ofMountSource:UnionMountSource: Takes multiple MountSource implementations and shows a merged view of their file hierarchy.FileVersionLayer:
Takes a MountSource as input, decodes the requested paths, also accepting<file>.version/<number>paths,
and calls the methods of theMountSourcewith the given file version.AutoMountLayer:
Takes oneMountSource, goes over all its files and mounts archives recursively in a similar manner toUnionMountSource.The factory functionopenopens one of the archiveMountSourceimplementations according to the file type.Exampleimportratarmountcoreasrmcarchive=rmc.open("foo.tar",recursive=True)print(archive.listDir("/"))info=archive.getFileInfo("/bar")print("Contents of /bar:")witharchive.open(info)asfile:print(file.read())
Package: ratatoskr
Ratatoskr is a library written in Python to make the development of AWS Lambdas easier and more secure.
It supports implementing “singleshot” operations that can be reached from an AWS Lambda function and
validating the input parameters to avoid unnecessary boilerplate for argument checking.Home-page:http://github.com/ngergo/ratatoskrAuthor: Gergo Nagy
Author-email:contact@gergonagy.comLicense: MIT
Download-URL:http://github.com/ngergo/ratatoskr/tarball/v0.1.9Description: UNKNOWN
Keywords: aws lambda development ratatoskr microservice amazon
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Provides-Extra: dev
Package: ratatouille
RatatouilleInstallationThe best way to installratatouilleis from pypi:pipinstallratatouilleAlternatively, you can install frommasteras follows:pipinstallgit+https://github.com/Ezibenroc/ratatouille.gitExample of usageCollect data in file/tmp/data.csvwith a 3 seconds interval (press Ctr-C to stop).ratatouillecollect-t3all/tmp/data.csvCollect only the temperature and frequency:ratatouillecollect-t3cpu_freqtemperature/tmp/data.csvPlot the data stored in file/tmp/data.csv.ratatouilleplot/tmp/data.csvFor this last command, you need to install extra dependencies:pipinstallpandasplotnineCollected dataWhen collecting data you can either collect all data (with thealltarget argument) or a subset of the data:cpu_freqcollects the frequency (inHertz) of eachlogicalCPU core listed in/sys/devices/system/cpu/.cpu_loadcollects the percentage load of the CPUs.cpu_powercomputes the average power consumption (inWatts) of each package listed in/sys/devices/virtual/powercap/intel-rapl/between two intervals. Additional values for thecore,uncoreanddramare also collected if available.cpu_statscollects the total number of context switches, interrupts and soft_interrupts since boot.fan_speedcollects the rotation speed of fans.memory_usagecollects the current memory available (in bytes) and its percentage over the total memory.networkcollects the total number of bytes sent and received on each network interface.temperaturecollects the temperature (in Celsius or Farenheit degrees, depending on your configuration) of eachphysicalCPU core and other thermal sensors.Notice thatcpu_load,cpu_stats,fan_speed,memory_usage,networkandtemperaturerely onpsutilto collect data.
Package: ratcatcher
RATCatcherratcatcherRatcatcher is a tool designed for monitoring and collecting suspicious socket connections, intended for use during the dyanmic analysis of malware. Optionally, it can also capture any packets exchanged during monitoring and output them to a PCAP file, for more a in-depth analysis in Wireshark.omniserverWIP. Omniserver is a script for replicating various types of backdoor traffic. Currently it just listens and beacons, possible updates in the future.Basic UsageRatcatcherusage: ratcatcher [-h] [-f SECONDS] [-b CYCLES] [--capture FILENAME]
                  [{inet,inet4,inet6,tcp,tcp4,tcp6,udp,udp4,udp6,unix,all}]
                  
positional arguments:
  {inet,inet4,inet6,tcp,tcp4,tcp6,udp,udp4,udp6,unix,all}
                        Type of traffic to monitor (Default: all)
                        
options:
  -h, --help            show this help message and exit
  -f SECONDS, --frequency SECONDS
                        Frequency, in seconds, to check for active connections (Default: 1.0)
  -b CYCLES, --baseline CYCLES
                        Collect a baseline of traffic, to help filter out normal processes (Total time =
                        frequency*CYCLES)
  --capture FILENAME    Capture packets during monitoring and output to PCAP file
  
Examples:
    ratcatcher (Monitor all traffic types)
    ratcatcher --baseline 10 -f .5 --capture mypackets
    ratcatcher inet6Omniserverusage: omniserver [-h] [-b IPADDR] [-f SECONDS] [-t SECONDS] [-d] [-u] [--msg MSG] [port]

positional arguments:
  port                  Port to listen on/connect to (Default: RHP for listen/beacon, 53 for DNS)
  
options:
  -h, --help            show this help message and exit
  -b IPADDR, --beacon IPADDR
                        Beacon to remote IP
  -f SECONDS, --frequency SECONDS
                        Frequency, in seconds, to beacon remote IP
  -t SECONDS, --timeout SECONDS
                        Timeout duration, in seconds, for beacon sockets
  -d, --dns             Send DNS requests
  -u, --udp             Use UDP protocol (Default: TCP)
  --msg MSG             Message to send upon successful connection
  
Examples:
    omniserver (Listen on TCP random high port)
    omniserver -b 10.10.10.1 -f 30 -u 7896
    omniserver --msg 'TCP Server Test Message'InstallationInstall from PyPIpip install ratcatcherKnown Issues & TODORatcatcher is completely unaware of outgoing UDP packets. However they're still caught in the PCAPAdd DNS tunneling to omniserver
Package: ratchet-agent
A daemon to monitor log files and push messages toRatchet.io.Requirementsratchet-agent requires:A unix-like system (tested on Fedora Linux and Mac OS X)Python 2.6+requests 0.13.1+aRatchet.ioaccountInstallationInstall with pip:pip install ratchet-agentThis will install the ratchet-agent files in the root directory of your virtualenv. Or if you’d prefer, clone this git repo:git clonehttps://github.com/ratchetio/ratchet-agent.gitSee Configuration for configuration options and setup.ratchet-agent comes with an example init.d script, chkconfig compatible and tested on Fedora Linux. To install it, symlinkratchet-agent-init.shto/etc/init.d/ratchet-agentand add to chkconfig:ln -s /path/to/ratchet-agent/ratchet-agent-init.sh /etc/init.d/ratchet-agent
chkconfig --add ratchet-agent
chkconfig on ratchet-agent
service ratchet-agent startConfigurationConfiguration options for ratchet-agent itself are inratchet-agent.conf. If you’re using the init script, it has a few of its own configuration variables inside which control how it runs.ratchet-agent.confAt the bare minimum, you will want to change the following variables:params.access_token– your Ratchet.io access tokentargets– white-space-separated list of files or directories (non-recursive) to process.Setting the following variables will improve github integration:params.root– path to your code rootparams.branch– the current branchOther options are documented in the sample config file.ratchet-agent-init.shConfiguration variables should be self-explanatory. If you’re not using a virtualenv, setVIRTUALENV="".ContributingContributions are welcome. The project is hosted on github athttp://github.com/ratchetio/ratchet-agentAdditional HelpIf you have any questions, feedback, etc., drop me a line atbrian@ratchet.io
Package: ratchetapi
scieloapi.py============Thin wrapper around the SciELO Ratchet RESTful API.Use license-----------This project is licensed under FreeBSD 2-clause. See `LICENSE` for more details.History=======0.6---* Added `Client.query` method to query a given endpoint.0.5 (2014-02-10)----------------* Added `tox.ini` to help the porting to Python3.3.* Support for https (without verifiying CA).* Added `Content-Type: application/json` HTTP header to all post requests.* Added a do-nothing logger handler by default.0.4 (2013-08-30)----------------* Params are sorted by key before the GET request is dispatched. This minorchange aims to improve server-side caching capabilities.* Minor changes to the API of the function `httpbroker.get`. It now accepts a `auth` kwargto handle server-side authentication.* Minor changes to `scieloapi.Connector`:* A custom http broker can be passed as `http_broker` kwarg during init.* Http methods are created dinamically during initialization, with user credentials boundinto it. Api_key is no longer maintained by the instance.* `Client.fetch_relations` now accepts the param `only` to specify a subset of relations to fetch.* Now the User-Agent is set to `scieloapi/:version`.* The module `scieloapi.scieloapi` was renamed to `scieloapi.core` to make things clearer.* Added POST method capabilities on endpoints.* Added the exception `exceptions.MethodNotAllowed` to represent 405 status code.0.3 (2013-08-02)----------------* Added more unit tests (Now at 73% of code coverage).* Minor adjusts at `setup.py` installation script.* New exceptions to represent http status codes.* Better documentation at `http://docs.scielo.org/projects/scieloapipy/`.0.2 (2013-07-26)----------------* Slumber dependency was removed. The module `scieloapi.httpbroker` was createdto deal with http requests and responses.* Better test reports now using Nosetests + coverage.* Added method `Client.fetch_relations` to fetch all first-level relations ofa document and replace the value by the full document.
Package: rate
RateA Cli-tool for rating players from a file.
Supported Algorithms:EloGlickoGlicko-2TrueSkillDWZECFUsagerate path/to/file.csv or path/to/file.jsonAnd you will get prompted with interactive options to select:First player key in the fileSecond player key in the fileResult key from the first player perspective in the fileAlgorithm to use[all, elo, "glicko-1", "glicko-2", "trueskill", "dwz", "ecf"]Output Format[csv, json]How a win is defined in the fileExample:1orwinHow a loss is defined in the fileExample:0orlossHow a draw is defined in the fileExample:0.5ordrawExamplematches.csvplayer1player2result1result2dateJohnDoewonLost12-14-2021DoeJohnDrawDraw12-15-2021SamJohnLostwon12-16-2021examples of generated files in /examplesAnswersFirst player key: player1Second player key: player2Result key: result1Algorithm: eloOutput Format: csvHow a win is defined: wonHow a loss is defined: LostHow a draw is defined: DrawInstallation$ pip install rate
$ rateor$ py -m pip install rate
$ py -m rateYou might need to run it withwinptyif you are on Windows.winpty py -m rateContributingIt still needs some work.
Please feel free to open an issue or pull request.
Package: rated-python
Rated Python SDKPython bindings for the Rated APICI/CDPackageMeta👋 IntroductionThe Rated SDK (Software Development Kit) for Python, which allows Python developers to write software that makes use of the Rated dataset. You can find the latest, most up to date, documentation at our docs site.The Rated SDK is maintained and published by Rated Labs.We’ve curated many examples which will help you kickstart your integration but to get a full list of all available endpoints, you are recommended to check out our API Reference and Swagger.🛟 Getting Help / LinksDocumentationAPI ReferenceFeedbackDiscordTwitterWe use GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.Please use these community resources for getting help:Ask a question on our feedback boardIf it turns out that you may have found a bug, please open an issue🚀 Getting startedRequirementsPython>=3.8A valid Rated API key(Get your key)InstallationInstall usingpip:pipinstallrated-pythonUsageExample:how to get a validator effectiveness rating by pubkeyfromratedimportRatedfromrated.ethereumimportMAINNETRATED_KEY="ey..."r=Rated(RATED_KEY)eth=r.ethereum(network=MAINNET)foreffineth.validator.effectiveness("0x123456789...",from_day=873,size=1):print(f"Day:{eff.day}, Eff:{eff.validator_effectiveness}")>>>Day:873,Eff:98.82005899705014Running testsFirst install toxpipinstalltoxOnce tox has been installed you can run all tests:tox🤝 ContributingWe value feedback and contributions from our community. Whether it's a bug report, new feature, correction, or additional documentation, we welcome your issues and pull requests.Please read through thisCONTRIBUTINGdocument before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your contribution.
Package: ratel
RatelSkip list is a data structure that allows fast search within an ordered sequence
of elements and a probabilistic alternative to Balanced Trees.It is also easier
to implement.
This library uses redis skip list to implement SortedSet data types for PythonThis library modified in four ways:This implementation is allowed to repeated scores.The comparison is not just by score but by key data.It's a doubly linked list with the backward being only at "level 1".
This allows to traverse the list from tail to head, useful for zrevrange.This implementation is combined with dict data structure for fast search.Skip Lists are data structure that can be used in place of balanced trees. They
are easier to implement and generally faster. This library uses redis skip lists to
implement SortedSet data types for Python.SortedSet is implemented in Python and C with high performance.Here is a few examples:fromboost_collections.zskiplist.zset_nodeimportZsetNodefromboost_collections.zskiplist.zset_objimportZsetObjzset_obj=ZsetObj()elements=[ZsetNode('a',1),ZsetNode('a',2),ZsetNode('c',2)]# multi elements addedzset_obj.zadd(elements=elements)# multi elements added nxzset_obj.zadd(elements=elements,'nx')# one element addedzset_obj.zadd(elements=ZsetNode('d',1))# zincrbyzset_obj.zincrby(ZsetNode('a',1),'incr')# zcardzset_obj.zcard()# zscorezset_obj.zscore('a')# zrangezset_obj.zrange(0,-1,True)# zrevrangezset_obj.zrevrange(0,1,True)# zrange_by_scorezset_obj.zrange_by_score(1,0,2,0)# zrevrange_by_scorezset_obj.zrevrange_by_score(1,0,2,0)CompatibilityPython 2.7, 3.5+Installationpip install ratelorhttps://github.com/524243642/ratel
cd ratel
python setup.py installTime ComplexityZsetObj OperationsAverage CasezaddO(log N)zincrbyO(log N)zremO(log N)zscoreO(1)zcardO(1)zrangeO(log(N) + M)zrevrangeO(log(N) + M)zfloorO(log N)zlowerO(log N)zrange_by_scoreO(log(N) + M)zrevrange_by_scoreO(log(N) + M)Release0.3.4 2018-12-04 zadd zincrby zrem zscore zcard zrange zrevrange0.4.0 2018-12-23 zfloor zlower0.4.1 2019-01-23 shields.io access0.5.0 2019-04-25 zrange_by_score zrevrange_by_score1.0.0 2020-11-23 stable version released1.0.1 2020-11-24 python 3.7+ supportedLicenseMITContributingWelcome to feedback and improvements.Please submit a pull request!
Package: ratelib
ratelibA simple interface to handle REACLIB format databases of astrophysical
reaction rates.Standard REACLIB database can be downloaded from here:https://reaclib.jinaweb.orgRequirementsPython 3.5+numpyscipyInstallationPackageratelibcan be installed viapip:pip install ratelibYou can also install the most recent version from the git repository with
following commands:git clone https://github.com/kompoth/ratelib
  cd ratelib
  python -m build
  pip install dist/*.whlUsageA simple scriptexample.pyis located in the root of the git repository.
It loads a version of REACLIB, provided as the first argument, and draws
a nuclei chart of weak decay rates at the temperature of 1 GK.This script requiresmatplotlib>=3.4.ClassesLibrary:Collection of reaction rates, database itselfRate:Reaction rate class with properties from REACLIB formatRateFilter:Class for filtering rates in LibraryNucleus:Basic class to unify different nucleus denotions
Package: ratelim
Ratelim is a simple Python library that limits the number of times a function can be called during a time interval. It is particularly useful when using online APIs, which commonly enforce rate limits.FeaturesWorks in Py2 and Py3.Greedy and patient rate limiting.Preserves function signature.Installation$pipinstallratelimUsageSay you want to call a function at most forn_callsduring an_secondstime interval.# 10 times in 5 seconds@ratelim.greedy(10,5)defhello():print("hello")Thegreedyrate limiter calls does not delay any function call until it’s really necessary.In some scenarios, for example when crawling data from an API, you want to maximize the number
of calls you make and you want to avoid sending them in short sequence. To this aim, we can
use thepatientrate limiter. It distributes calls evenly between each other.# 10 times in 5 seconds# Gets called at most every 0.5 seconds@ratelim.patient(10,5)defhello():print("hello")LICENSEMIT.
Package: ratelimit
APIs are a very common way to interact with web services. As the need to
consume data grows, so does the number of API calls necessary to remain up to
date with data sources. However many API providers constrain developers from
making too many API calls. This is know as rate limiting and in a worst case
scenario your application can be banned from making further API calls if it
abuses these limits.This packages introduces a function decorator preventing a function from being
called more often than that allowed by the API provider. This should prevent
API providers from banning your applications by conforming to their rate
limits.InstallationPyPiTo install ratelimit, simply:$pipinstallratelimitGitHubInstalling the latest version from Github:$gitclonehttps://github.com/tomasbasham/ratelimit$cdratelimit$pythonsetup.pyinstallUsageTo use this package simply decorate any function that makes an API call:fromratelimitimportlimitsimportrequestsFIFTEEN_MINUTES=900@limits(calls=15,period=FIFTEEN_MINUTES)defcall_api(url):response=requests.get(url)ifresponse.status_code!=200:raiseException('API response:{}'.format(response.status_code))returnresponseThis function will not be able to make more then 15 API call within a 15 minute
time period.The arguments passed into the decorator describe the number of function
invocation allowed over a specified time period (in seconds). If no time period
is specified then it defaults to 15 minutes (the time window imposed by
Twitter).If a decorated function is called more times than that allowed within the
specified time period then aratelimit.RateLimitExceptionis raised. This
may be used to implement a retry strategy such as anexpoential backofffromratelimitimportlimits,RateLimitExceptionfrombackoffimporton_exception,expoimportrequestsFIFTEEN_MINUTES=900@on_exception(expo,RateLimitException,max_tries=8)@limits(calls=15,period=FIFTEEN_MINUTES)defcall_api(url):response=requests.get(url)ifresponse.status_code!=200:raiseException('API response:{}'.format(response.status_code))returnresponseAlternatively to cause the current thread to sleep until the specified time
period has ellapsed and then retry the function use thesleep_and_retrydecorator. This ensures that every function invocation is successful at the
cost of halting the thread.fromratelimitimportlimits,sleep_and_retryimportrequestsFIFTEEN_MINUTES=900@sleep_and_retry@limits(calls=15,period=FIFTEEN_MINUTES)defcall_api(url):response=requests.get(url)ifresponse.status_code!=200:raiseException('API response:{}'.format(response.status_code))returnresponseContributingFork it (https://github.com/tomasbasham/ratelimit/fork)Create your feature branch (git checkout -b my-new-feature)Commit your changes (git commit -am ‘Add some feature’)Push to the branch (git push origin my-new-feature)Create a new Pull Request
Package: rate-limit
rate-limit安装方式pip install rate-limit使用说明基于redis-cell扩展的限流，使用该包需要安装redis-cell扩展，支持分布式限流。目前只支持异步方法的限流，使用方式如下：from ratelimit.decorators import rate_limit

# 这里的key_name必须要在一个服务中唯一，不然会有冲突
@rate_limit("key_name")
def need_limit_method():
    ...修改配置from ratelimit.base.constants import RedisConfig, LimitConfig

# 这里是redis连接信息
RedisConfig.host = '127.0.0.1'
RedisConfig.port = 6379
RedisConfig.passwors = ''
RedisConfig.db = 0

# 这里是默认的限流配置
LimitConfig.service = 'default'         # 限流器所属服务
LimitConfig.total_quota = 100           # 总令牌桶数量
LimitConfig.quota = 3                   # 单位时间内生成的令牌数
LimitConfig.limit_second = 1            # 单位时间
LimitConfig.once_quota = 1              # 一次请求获取的令牌数
LimitConfig.default_handle = 'discard'  # 被限流时的处理方式，默认丢弃【discard丢弃；queue排队；retry重试】配置写在redis中在redis中可以根据实际情况配置限流信息，格式如下：
    "service": {
        "key_name": {
            "total_quota": 100,          # 令牌桶大小
            "limit_second": 10,          # 生成令牌的单位时间
            "limit_quota": 3,            # 单位时间内生成的令牌数量
            "once_quota": 1,             # 每次请求消费的令牌数量
            "handle": "discard",         # discard丢弃；queue排队；retry重试
            "handle_params": {},         # 处理方式对应的参数
        }
    }
这里的key_name要对应装饰器的key_name

handle_params的配置如下：
1、handle 为 discard 类型的，无需配置
2、handle 为 queue 类型的，配置如下：
    {
        "delay": 3,               # 延时执行时间，单位【秒】
        "limit_delay": 1,         # 执行再次被限制的情况下，延迟执行时间，单位【秒】
        "queue_type": "redis",    # 队列类型：redis【基于redis队列】、local【基于本地内存队列】
    }
3、handle 为 retry 类型的，配置如下：
    {
        "retry_count": 3,    # 重试次数
        "retry_wait": 0,     # 每次重试间隔，默认不等待，单位【秒】
        "current_count": 0,  # 当前已重试几次
    }