Saravanan666/pypi-org huggingface dataset:
Package: rogeriopradoj-paretochart
@RogerioPradoJ paretochart - rogeriopradoj-paretochart - Fork from @tintrinhPareto chartfor python 3 (similar toMatlab, but much more flexible) - Fork from @tintrinh.FeaturesData labelsfor the chart x-axis.Fully customizablewith uniqueargandkwarginputs:Bar chart: follows the inputs of thematplotlib.pyplot.barfunction (usebar_args=(...)andbar_kw={...}).Cumulative line: follows the inputs of thematplotlib.pyplot.plotfunction (useline_args=(...)andline_kw={...}).Limit line: follows the inputs of thematplotlib.axes.Axes.axhlinefunction (uselimit_kw={...}).Put the chart onarbitrary axes.ExamplesFirst, a simple import::fromparetochart.paretochartimportparetoNow, let's create the numeric data (no pre-sorting necessary)::data=[21,2,10,4,16]We can even assign x-axis labels (in the same order as the data)::labels=['tom','betty','alyson','john','bob']For this example, we'll create 4 plots that show the customization
capabilities::importmatplotlib.pyplotasplt# create a grid of subplotsfig,axes=plt.subplots(2,2)The first plot will be the simplest usage, with just the data::pareto(data,axes=axes[0,0])plt.title('Basic chart without labels',fontsize=10)In the second plot, we'll add labels, put a cumulative limit at 0.75 (or 75%)
and turn the cumulative line green::pareto(data,labels,axes=axes[0,1],limit=0.75,line_args=('g',))plt.title('Data with labels, green cum. line, limit=0.75',fontsize=10)In the third plot, we'll remove the cumulative line and limit line, make the
bars green and resize them to a width of 0.5::pareto(data,labels,cumplot=False,axes=axes[1,0],data_kw={'width':0.5,'color':'g'})plt.title('Data without cum. line, green bar width=0.5',fontsize=10)In the fourth plot, let's put the cumulative limit at 95% and make that line
yellow::pareto(data,labels,limit=0.95,axes=axes[1,1],limit_kw={'color':'y'})plt.title('Data trimmed at 95%, yellow limit line',fontsize=10)And last, but not least, let's show the image::fig.canvas.set_window_title('Pareto Plot Test Figure')plt.show()This should result in the following image (click hereif the image doesn't
show up):InstallationSince this is really a single python file, you can simply go to the
GitHub_ page, simply downloadparetochart.pyand put it in
a directory that python can find it.Alternatively, the file can be installed using::pipinstall--upgraderogeriopradoj-paretochartIf you are using Python2, you can use original @tintrinh's project::pipinstall--upgradeparetochartDevelopment and Publishing New VersionsUsing knowledge fromhttps://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56.define next version number (try to followsemver 2make the changes in codebaseupdatesetup.py:versiondownload_urlupdateREADME.md:pareto_plot_test_figure urlcommit, tag, and push to git central repocreate a source distribution, and validate it:python setup.py sdisttwine check dist/*upload the source to PyPi:twine upload dist/*
Package: rogii-solo
Rogii SoloRogii Solo is a Python SDK designed to make data scientists' work with Solo easier.RequirementsPython 3.10InstallationInstall the package usingpip install rogii-solocommand.Generate access credentials on thelanding pageand copy the initialization string.Initialize the client by pasting the initialization string in the constructor.Set the project you wish to work with by name or UUID.Examplefromrogii_soloimportSoloClientsolo_client=SoloClient(client_id='my-client-id',client_secret='my-client-secret')project=solo_client.set_project_by_name('My project')wells=project.wellswells_data=wells.to_dict()# List of dictswells_df=wells.to_df()# DataFrameUsagePlease check the SDK documentation in ourKnowledge Base.
Package: rogoto-core
# Rogoto LibraryRogoto Library to control a BrickPI as a Logo Turtle built out of Lego Technics.This library will create parse commands and then tell the Lego Technics what to do.It allows people to draw items by doing the following:```pendownforward 10right 90forward 10right 90forward 10right 90forward 10penup```The above should put the pendown, draw a square and then lift the pen.
Package: rogue-gym
rogue-gym python APIPython interface ofRogue-Gymcompatible withOpen AI Gymenvironments.API documentsCOMING SOONExample>>>fromrogue_gym.envsimportRogueEnv
>>>CONFIG={...'width':32,'height':16,
...'dungeon':{...'style':'rogue',
...'room_num_x':2,'room_num_y':2...}...}>>>env=RogueEnv(max_steps=100,config_dict=CONFIG)>>>rewards=0>>>state=env.reset()>>>foriinrange(10):...# move right...state,reward,done,_=env.step('l')...rewards+=reward
...>>>env---.@|..|Level:1Gold:0Hp:12(12)Str:16(16)Arm:0Exp:1/0
Package: rogue-scholar-api
Rogue Scholar APIThe backend server for theRogue Scholarscience blog archive. The Rogue Scholar API is a PythonQuartapplication that provides a RESTful API for the Rogue Scholar service.InstallationRequires Python 3.8 or higher (Python 3.11 recommended). UsesPoetryfor dependency management. Depends on credentials for the Rogue Scholar Postgres database (hosted by Supabase) and Rogue Scholar search index (hosted by Typesense):# required environment variables
SUPABASE_URL
SUPABASE_ANON_KEY
TYPESENSE_HOST
TYPESENSE_API_KEYThe API uses Poetry for dependency management. To install Poetry, see thePoetry documentation. Then install the dependencies and run the server:poetry install
poetry run quart --app rogue_scholar_api runThe API will then be available athttp://localhost:5000.DevelopmentWe use pytest for testing:poetry run pytestFollow along viaGithub Issues. Please open an issue if you encounter a bug or have a feature request.Note on Patches/Pull RequestsFork the projectWrite tests for your new feature or a test that reproduces a bugImplement your feature or make a bug fixDo not mess with Rakefile, version or historyCommit, push and make a pull request. Bonus points for topical branches.DocumentationDocumentation (work in progress) for using Rogue Scholar is available at theRogue Scholar Documentationwebsite.The Rogue Scholar API documentation is served by default at/openapi.jsonaccording to the OpenAPI standard, or at/docsfor a SwaggerUI interface, or at/redocsfor a redoc interface.MetaPlease note that this project is released with aContributor Code of Conduct. By participating in this project you agree to abide by its terms.License:MIT
Package: roguewave
Sofar Ocean API Python ClientPython toolbox to interact with Sofar Ocean Spotter API.RequirementsPython3pysofarnumpynetCDF4wheel (If developing/Contributing)Pytest (If developing/Contributing)Setuptools (If developing/Contributing)InstallationMake sure that you have the requirements listed abovepip install roguewaveto your desired python environmentTest withpython3 -c 'import roguewave'. If this runs successfully, chances are everything worked.To interact with the api's you need to add the access tokens into an environmental file.
Specifically create a file calledsofar_api.envin your user directory containingWF_API_TOKEN=_wavefleet_token_SPECTRAL_API_TOKEN=_spectral_api_token_ExamplesRetrieve Spectrum from observational Spotter APIfromroguewave.spotterapiimportget_spectrumfromdatetimeimportdatetime,timezoneimportmatplotlib.pyplotasplt# The Spotter we want the data fromspotter_id='SPOT-0740'# Start time to grabstart_date=datetime(2021,1,1,0,0,0,tzinfo=timezone.utc)# End timeend_date=datetime(2021,1,6,0,0,0,tzinfo=timezone.utc)# You will need a valid access token setup for the pysofar library for this to# work. We refer to the pysofar documentation how to set that up.# Get the spectraspectra=get_spectrum(spotter_id,start_date,end_date)# We now have spectra from the spotter we can interact withforkeyinspectra:forspectruminspectra[key]:string=f'The waveheight at{spectrum.timestamp}was{spectrum.hm0()}meter'print(string)# or do a simple plotplt.plot(spectra[spotter_id][0].frequency,spectra[spotter_id][0].variance_density,'k')plt.xlabel('Frequency (hz)')plt.ylabel('Variance Density (m$^2$/s)')plt.yscale('log')plt.title(f'spectrum for{spotter_id}at time{spectra[spotter_id][0].timestamp}')plt.grid()plt.show()Retrieve Spectrum from model Spectral APIfromroguewave.modeldata.sofarspectralapiimportSofarSpectralAPI,load_sofar_spectral_fileimportmatplotlib.pyplotasplt# Create an api Objectapi=SofarSpectralAPI()# Get all the points accessible for this particular user. This returns a list# dictionaries containing latitudes and longitudespoints=api.points()# Lets get the first point. This will download the netcdf containing the spectral# forcast into the given directory.file=api.download_spectral_file(**points[0],directory='./')# Lets load the point. This will open the Netcdf file and return a Spectrum2D# object. This object supports all the methods of the Spectrum1D object (hm0,# tm02, etc.)data=load_sofar_spectral_file(file)# Lets plot itplt.pcolormesh(data[0].frequency,data[0].direction,data[0].variance_density)plt.show()
Package: rohberg.elasticsearchblocks
Provides behavior “ElasticSearchBlocks” adding fieldblocks_plaintextfor indexing block text with ElasticSearch.BLOCK_TYPES = [“slate”, “columnsBlock”]InstallationInstall rohberg.elasticsearchblocks as Plone backend add-on.Contribute / SupportIssue Tracker:https://github.com/rohberg/rohberg.elasticsearchblocks/issuesSource Code:https://github.com/rohberg/rohberg.elasticsearchblocksDocumentation:https://docs.plone.org/foo/barLicenseThe project is licensed under the GPLv2.ContributorsKatja Süss, Rohberg, @ksuessChangelog1.0a1 (2023-03-03)Initial release.
[ksuess]
Package: rohmu
Rohmu is a Python library for building backup tools for databases providing functionality for
compression, encryption, and transferring data between the database and an object storage. Rohmu
supports main public clouds such as GCP, AWS, and Azure for backup storage. Rohmu is used in various
backup tools such asPGHoardfor PostgreSQL,MyHoardfor MySQL, andAstacusfor M3, ClickHouse,
and other databases.FeaturesSupported object storages: Azure, GCP, S3, Swift (OpenStack), local file storage, and SFTP.Supported compression algorithms:Snappy,zstd, andlzma.RequirementsRohmu requires Python >= 3.8. For Python library dependencies, refer tosetup.cfg.Usage exampleAdd usage example hereFor real-world usage, seehow Rohmu is used in PGHoard.DevelopmentTODOLicenseRohmu is licensed under the Apache license, version 2.0. Full license text is available in theLICENSEfile.Please note that the project explicitly does not require a CLA (Contributor License Agreement) from
its contributors.TrademarksPostgreSQL, MySQL, M3 and ClickHouse are trademarks and property of their respective owners. All
product and service names used in this website are for identification purposes only and do not imply
endorsement.CreditsRohmu was created by and is maintained byAiven.Rohmu was originally a part ofPGHoardbut was later extracted to its own GitHub project.The Rohmu logo was created by@evche-aiven.ContactBug reports and patches are very welcome; please post them as GitHub issues and pull requests atrohmu_repo. To report any possible vulnerabilities or other serious issues, please see oursecuritypolicy.CopyrightCopyright (C) 2023 Aiven Ltd and contributors to the Rohmu project.
Package: rohr
rohrBuild easy data processing pipelines in python.Example:importrohrclassCapitalizeNode(rohr.Node):defrun(self,data:str)->str:returndata.capitalize()classSpaceNode(rohr.Node):defrun(self,data:str)->str:returnf'{data}'pipeline=rohr.Pipeline()pipeline.add(CapitalizeNode()).add(SpaceNode())name='paul'result=pipeline.run(name)# result is `  Paul  `print(result)
Package: rohrleitung
Rohrleitung===========Rohrleitung (ger.): _pipeline_Didn't like the shell-like approach the other pipelining packages took, where youwould concatenate specially written generators with the UNIX pipe `|`. While that'sgreat for the CLI and short shell scripts, I wanted a more programmable way.Worth mentioning is surely [genpipeline](https://github.com/fkarb/genpipeline) thatimplements coroutine-based pipelines as presented by [David Beazley's Coroutinesintro](http://www.dabeaz.com/coroutines/). But this means you have to do everythingin coroutines, I built Rohrleitung so I could just use classic generator-basedfilters. Look into both and decide which way is cleaner for your environment.ISC licenced, see the LICENCE file.Examples:---------from functools import partial# pip install toolzfrom toolz.curried import interposefrom rohrleitung import Pipeline, Ldef three_n_plus_one(n):if n % 2:return 3 * n + 1else:return n / 2@Ldef collatz_length(n, l=0):if int(n) < 1:raise ValueError('Nope')if n == 1:return lelse:# L changes call signatures of decorated function, so in recursive ones# you have to adapt.return collatz_length.__wrapped__(three_n_plus_one(n), l + 1)# building pipelines in a programmatic way, without immediately executing them# standard list manipulation can change pipeline on the flypipeline = [partial(filter, lambda x: x % 2),  # Standard python's filter functionlambda y: (2 * x for x in y),      # Like using L, but manuallyL(lambda x: x ** 3),               # Using L helper functioncollatz_length,]pipeline.append(interpose('a'))print(list(Pipeline(pipeline, range(10))))a = Pipeline([L(lambda x: 2 * x), L(lambda x: x + 1), L(lambda x: x ** 2)])for i, k in enumerate(a(range(3))):print("(2x+1)^2, x={}: {}".format(i, k))# With toolz' curried filter function we don't need partialfrom toolz.curried import filternewpipeline = [collatz_length,filter(lambda x: not(x % 2)),L(lambda x: bin(x)),L(lambda x: x.count('1'))]p1 = Pipeline(newpipeline)for i in p1(range(1, 10)):print(i)# Reuse same pipelinefor i in p1(range(1, 3)):print(i)# Or modify it, then use againp1.pipeline.insert(2, L(lambda x: x + 1))for i in p1(range(1, 10)):print(i)p2 = Pipeline(pipeline)p3 = 2 * (p2 + [L(lambda x: int(str(x), 16))]) + p1# Alternativly 2 * p2 | p1 if you prefer shell syntaxfor i in p3(range(1, 10)):print(i)# Slicing and cutting pipelines on the flyfor i in p1[1:4:2](range(10)):print(i)
Package: rohrpost
rohrpostis a simple WebSocket protocol that works well withDjangousingChannels. It will interface with every service implementing theASGIspecification (which, at the moment, is primarilyChannelswithDaphne).The client implementation isrohrpost-js.Capabilitiesrohrpostspecifies a very simple protocol with messages looking like this:{"id":123,"type":"ping","data":"something",}This message will be handled by the ping handler (which rohrpost provides out
of the box). You can add custom handlers using a method decorator. Please seeour documentationfor details on the protocol and handler implementation.rohrpostalso provides a mixin forDjangomodels to push notifications on
changes (create, update, delete).InstallationFrom the command line:pip install rohrpostOr add this line to yourrequirements.txt:rohrpost==3.*DevelopmentFor development you’ll need to have the test environment installed. This is
rather large sincerohrpostworks mainly in conjunction withChannels,Daphne,Djangoand so on.pip install -r requirements/dev.txtRun tests and style checks in this directory:python -m pytest
python -m isort .
python -m black rohrpost tests
python -m flake8
python -m pytest --pylint --pylint-rcfile=$(pwd)/pyproject.toml --pylint-jobs=0
Package: rohub
Table of contentsTable of contentsDescriptionInstallationFirst stepsBasic usageClient authenticationDocumentationTeamLicenseDescriptionRohub is a high-level, user-friendly Python API for working with Research Objects.ROHub can support different stakeholders, with the primary focus on scientists, researchers, students and enthusiasts, enabling them to manage and preserve their research work, to share it and make it available for publishing, to collaborate and to discover new knowledge. However, other user groups can be benefited by ROHub like the Industry that can leverage the platform to externalize their research to a community of researches worldwide in multiple scientific domains, e.g., launching campaings for research on specific topics, and the follow and monitor the progress. Similarly, investors can keep up to date and track scientific advances to fund and get involved in future breakthroughs. As another example, publishers can also leverage ROHub to advertise their journals with researchers, have access to a pool of potential reviewers, and implement more interactive, review processes.InstallationThe source code is currently hosted at ourrepository.Package is distributed throughPython Package Index (PyPI). To install the package simply type:pip install rohubFirst stepsThe library provides a high-level abstraction with ROHub servicehttps://reliance.rohub.org/using ROHub APIhttps://api.rohub.org/api/.
An account with a password in the ROHub service is required to use the library. To sign up please visithttps://login.rohub.org/. You can use your credentials to log in through the library, as presented in the example below.Basic usageimport rohub

rohub.login(username=your_username, password=your_password)

ro = rohub.ros_create(title="my_title", research_areas=["Biology"])Client authenticationBy default, the library is using a public client to authenticate users. Developers invested in the project or services may need to use other clients. They can provide client details by placing a .env file in the project's root folder. This will overwrite the default, public client.DocumentationFull library documentation can be foundhereTeamRohub API library was built with an effort of the Data Analytics and Semantics Department in Poznan Supercomputing and Networking Center.Bogusz Janiakis the main creator and maintainer. People who contributed to the project:Raul Palma.LicenseThe ROhub Library has an MIT License, as found in theLICENSEfile.
Package: roi
ROI - Return on Investment is an all inclusive package for maketing analytics. The first release focuses on cohort analysis.
The plan is to slowly include more analysis, as the package grows.Installation:You can installROIusingpip install roiUsage:Example: Cohort Analysisimportpandasaspdimportmatplotlib.pyplotaspltfromroiimportcohortanalysis# Read datasetdata=pd.read_csv('/content/data.csv',encoding='latin',parse_dates=['OrderDate'])#Pass the dataframe to an instance of cohort analysis class and also pass name of the column with UserId and ActivityDate.analysis=cohort_analysis(input_df=data,ActivityDate='OrderDate',CustomerID='UserId')## Generate retention heatmapanalysis.plot_retention()
Package: roid
Roid 🤖A fast, stateless http slash commands framework for scale. Built by the Crunchy bot team.🚀 InstallationYou can install roid in it's default configuration via:pip install roidYou  can install with the optional speedups e.g. orjson with:pip install roid[speedups]📚 Getting StartedYou can get started with the following options, most of the public API is type hinted
and a lot of the framework depends around this so you should be able to stand on your
own two feet reasonable quickly.Examplesare the best / only place to start.✨ Basic Exampleimportosimportuvicornimportroidapplication_id=os.getenv("APPLICATION_ID")public_key=os.getenv("PUBLIC_KEY")token=os.getenv("BOT_TOKEN")app=roid.SlashCommands(application_id,public_key,token)# We can create async commands@app.command("echo","Echo a message.",guild_id=675647130647658527)asyncdefecho(message:str):returnResponse(content=message,flags=ResponseFlags.EPHEMERAL)# Or sync commands which are ran in another thread.# While this is not advised for everything, we do provide threadsafe interfaces# to the state management system.@app.command("echo-sync","Echo a message with threading.",guild_id=675647130647658527)defecho_sync(message:str):returnResponse(content=message,flags=ResponseFlags.EPHEMERAL)if__name__=="__main__":app.register_commands_on_start()uvicorn.run("app:app",port=8000)❤️ Developer NotePlease note that this library is largely designed around what we need the framework to do
rather than strictly as a general API framework.You may notice rather opinionated things e.g. how we work command groups. Which are
a trait of that. These things are generally subject to change with Discord but right
now we thing the standard command groups look rather poor.This framework is not for everyone, if you need the gateway or general REST api calls
this is probably not the framework for you.
(Although if you would like to add some more of the slash commands REST api then feel free to PR.)This is also why there generally arent any forms of online docs for this, i'll get
around to it, eventually.
Package: roi-device
roi-iot-device阿里云 IoT 设备接入封装python >=3.5Updatev1.0.7Fix Auto Deployv1.0.6DeviceInfo 文件名由型号生成Dir目录结构要求root dir
   - config         # 运行时，配置文件存放目录
   - things         # 物模型定义实现
   - main.py        # 主函数
   - thing.json     # 物模型文件，由平台定义后导出，不可自行编辑Config新建目录，目录可为空Things物模型定义与实现XXXThing继承 iot_thing/IoThing 类，并进行实现class PhoneThing(IoThing):
   xxxXXXProperties继承 iot_thing/IoThingProperties 类，并进行实现class Phone(IoThingProperties):

    def __init__(self):
       # 与平台属性定定义一致
       self.number = "" # 序列号
       self.disk = "" # 存储XXXEvent继承 iot_thing/IoThingEvent 类，并进行实现class PhoneEvent(IoThingEvent):

    def __init__(self):
       # 与平台 事件定义一致
       self.event_name = "event_high_temperture" # 事件名称
       self.temperture = "36.0℃" # 存储XXXService继承 iot_thing/IoThingService 类，并进行实现class PhoneService(IoThingService):

    def __init__(self):
       # 与平台 服务定义一致
       self.identifier = "event_high_temperture" # 事件名称
       self.temperture = "36.0℃" # 存储Main.py主项目入口，启动项目设备秘钥表明设备身份的信息，由下面信息进行加密组成秘钥 : 自行定义 key ；内容 : 平台新建产品，对应相关产品信息生成 : IoTools/aes_encode 函数生成{
        "product_key": "复制",
        "product_secret": "复制",
        "endpoint": "",
}平台定义新建产品及其设备产品 : 新建时，定义物模型，并导出 物模型文件。产品 : 设置设备动态注册。产品 : 物模型中的属性、服务、事件定义与 thing 保持一致；设备 : 新建时，记录设备名称，下面要有；secret_info : 内容，设备秘钥加密内容；设备信息初始化设备信息，及其参数，初始化需要参数device_name : 设备名称，平台定义，新建设备定义的设备名称device_key  : 秘钥，设备秘钥生成的 key;secret_info : 内容，设备秘钥加密内容；# IoTDevice 定义
device_info = IoTDeviceInfo(is_debug=True)
device_info.init_info(device_name, product_key, secret_info)设备物模型thing 已经定义后，初始化即可# IoTDevice 定义
device_thing = PhoneThing()设备连接设备动态注册和连接云端device_info  : 设备信息对象device_thing : 设备物模型对象# 设备连接
device = IoTDevice(device_info, device_thing)
device.connect()
# 阻断运行
while True:
    # print(device.is_conn)
    time.sleep(1000)Thing.json由平台定义后，设备管理/产品/产品详情/功能定义/物模型 TSL , 自行导出其他日志# 入参 is_debug = True
device_info = IoTDeviceInfo(is_debug=True)开发模式 : is_debug = True# 日志示例
2021-01-31 02:10:24,417 - DEBUG: ali device connect...
Device: 设备连接中..
2021-01-31 02:10:24,418 - DEBUG: connect_async
2021-01-31 02:10:24,418 - DEBUG: LoopThread thread enter
2021-01-31 02:10:24,418 - DEBUG: enter
2021-01-31 02:10:24,419 - INFO: start connect
2021-01-31 02:10:24,419 - DEBUG: current working directory:/Users/yuan/SmartAHC/roi-iot-device生产模式：is_debug = False# 日志示例
Device: 设备连接中..
Device: 设备连接成功
Device: 设备运行中Example见  sample.py注意事项搞清楚设备如何定义，请先在定义产品及其设备，再进行开发；要监控哪些数据（属性）要上报哪些信息（事件）要下发哪些信息，达到反向控制 (服务)
Package: roidynamics
roidynamicsSmall Python package providing tools to analyze the dynamics of intensity in time-lapse microscopy images split into regions of specific geometries.InstallationYou can install this package directly using:pip install roidynamicsNote: If you encounter errors when trying to use the ND2 format because of errors related to unusual ROIs (non-square), you can try to install an alternative version with:pip install git+https://github.com/guiwitz/nd2reader.git@master#egg=nd2reader -UAuthorsThis package has been created by Guillaume Witz, Data Science Lab, University of Bern in collaboration with Jakobus van Unen, Pertz lab, Institute of Cell Biology, University of Bern.