Saravanan666/pypi-org huggingface dataset:
Package: raindrop.py
A python/flask application that will play ambient music based on your current weather. The project does not come with music, as the user will set the ambient music tracks themselves. Music files need to be in .mp3 format. Instructions on adding music can be found below. The application starts off with no weather conditions or music in the system, and gradually grows as its run and played with by the user.When a new weather condition is encountered when the app is running, it will automatically appear on the website and you can drag a file to it. If an audio file has been set previously, you can do this to change the audio as well.To programmatically add additional weather types, find the name onhttps://developer.yahoo.com/weather/#codesand add it to the conditions list in index.html, then run the application and drag the mp3 onto the new button on the site.
Package: raindrops
raindropsraindropsis a command-line utility for developing and building serverless applications in Google Cloud Platform's
Cloud Functions in Python.InstallationThe easiest way to installraindropsis using pip from your virtual environment.From PyPI:pip install raindropsOr directly from GitHub:pip install git+https://github.com/coelhosilva/raindrops.gitQuickstartInitializing an HTTP Cloud Function from boilerplate code:raindrops --init httpRoadmapraindropsis currently in alpha development status. Features to be added:gcloud wrapper for deploying a Cloud Function.
Package: rainfall
QuickstartTo start off, rainfall is a micro web framework around asyncio (ex tulip), similiar to the cyclone or tornado. Since it is asyncio based, rainfall is fully asyncronous.The performance tests have shown that rainfall is not slower then twisted+cyclone and sometimes even faster (benchmark results will be posted later or you can test it by yourself).InstallationAs simple as:pip install rainfallNotesometimes pip for python 3 is called pip3, but you may have it with other nameHello worldLet’s create a simple hello world app in example.py file like this:import asyncio
from rainfall.web import Application, HTTPHandler


class HelloHandler(HTTPHandler):
    @asyncio.coroutine
    def handle(self, request):
        return 'Hello!'


app = Application(
    {
        r'^/$': HelloHandler(),
    },
)

if __name__ == '__main__':
    app.run()Now you can run it by:python3 example.pyAnd go tohttp://127.0.0.1:8888in browser, you should see “Hello!”DocsFor documentation go tohttp://rainfall.readthedocs.org/More examples herehttps://github.com/mind1master/rainfall/blob/master/rainfall/tests/app.pyCreditsAuthor: Anton Kasyanov (https://github.com/mind1master/)Contributors: mksh (https://github.com/mksh)
Package: rainflow
Rainflowrainflowis a Python implementation of the ASTM E1049-85 rainflow cycle counting
algorythm for fatigue analysis.Installationrainflowis availableon PyPI:pip install rainflowandon conda-forge:conda install rainflow --channel conda-forgeUsageSee release notes inCHANGELOG.md.Let's generate a sample time series.
Here we simply generate a list of floats butrainflowworks
with any sequence of numbers, including numpy arrays and pandas Series.frommathimportsin,costime=[4.0*i/200foriinrange(200+1)]signal=[0.2+0.5*sin(t)+0.2*cos(10*t)+0.2*sin(4*t)fortintime]Functioncount_cyclesreturns a sorted list of ranges and the corresponding
number of cycles:importrainflowrainflow.count_cycles(signal)# Output[(0.04258965150708488,0.5),(0.10973439445727551,1.0),(0.11294628078612906,0.5),(0.2057106991158965,1.0),(0.21467990941625242,1.0),(0.4388985979776988,1.0),(0.48305748051348263,0.5),(0.5286423866535466,0.5),(0.7809330293159786,0.5),(1.4343610172143002,0.5)]Cycle ranges can be binned or rounded to a specified number of digits
using optional argumentsbinsize,nbinsorndigits:rainflow.count_cycles(signal,binsize=0.5)# Output[(0.5,5.5),(1.0,1.0),(1.5,0.5)]rainflow.count_cycles(signal,ndigits=1)# Output[(0.0,0.5),(0.1,1.5),(0.2,2.0),(0.4,1.0),(0.5,1.0),(0.8,0.5),(1.4,0.5)]Full information about each cycle, including mean value, can be obtained
using theextract_cyclesfunction:forrng,mean,count,i_start,i_endinrainflow.extract_cycles(signal):print(rng,mean,count,i_start,i_end)# Output0.042589651507084880.42129482575354250.5030.112946280786129060.386116511114020340.5313...0.43889859797769880.182681375098495861.01421581.43436101721430020.34781098528972050.594200Running testspip install .[dev]
pytest
Package: rainiee-data
rainiee_datarainiee_data provides users with basic financial data. Users can obtain the full range of quantitative financial data provided by rainiee_data in their own locally built environment.easy to use as most of the data returned are json.Installationpip install rainiee_data==3.0.2Upgradepip install -U rainiee_dataLoginfrom rainiee_data.data_pro import *
auth('ID','Password')Quick StartSupported APIfrom rainiee_data.data_pro import *
    auth('ID','Password')

    1: cn_index_eod(index_code, start_index, end_index)
        e.g. cn_index_eod('399300.SZ', 7660, 7665)

    2: cn_index_composition(index_code)
        e.g. cn_index_composition(index_code='399300.SZ')

    3: cn_index_composition_weight(index_code)
        e.g. cn_index_composition_weight(index_code='000001.SH')

    4: cn_index_basic(market)
        e.g. cn_index_basic(market='SZSE')

    5: cn_symbol_list(category)
        e.g. cn_symbol_list(category='shzhuban')

    6: cn_stock_eod(symbol, start_index, end_index, adj='qfq', frequency='D')
        e.g. cn_stock_eod(symbol ='002679.sz',start_index=7686,end_index=7689,adj='qfq',frequency='D')

    7: cn_stock_realtime(symbol)
        e.g. cn_stock_realtime(symbol='300647.sz')

    8: get_trade_index(date)
        e.g. get_trade_index(date='20220601')

    9: get_trade_date(index)
        e.g. get_trade_date(7662)
    
    10: cn_features_eod(symbol, start_index, end_index)
        e.g. cn_features_eod(symbol='600602.ss', start_index=7600, end_index=7603)

    11: cn_targets_eod(symbol, start_index, end_index)
        e.g. cn_targets_eod(symbol='000001.sz', start_index=7600, end_index=7603)

    12: get_top_returns(index_code,index,top=10)
        e.g. get_top_returns(index_code ='399300.SZ',index=7665)
Package: rainiee-data-test
rainiee_dataeasy to use as most of the data returned are jsonInstallationpip install rainiee_data_test==2.2.0
from rainiee_data_test.data_client import DataClient
client = DataClient(username,password)Upgradepip install rainiee_data_test --upgradeQuick Startcn_index1: cn_index_basic
        rainiee_client.cn_index_basic('SSE')  #//SSE = 上交所指数 SZSE = 深交所指数
    2: cn_index_composition
        rainiee_client.cn_index_composition('000001.SH')
    3: cn_index_composition_weight
        rainiee_client.cn_index_composition_weight('000001.SH')
    4: cn_index_eod
        rainiee_client.cn_index_eod('399654.SZ',564,600)cn_stock1: cn_stock_eod
        -- 获取未复权数据，日k线
        rainiee_client.cn_stock_eod('300647.sz',2581,2581)
        -- 获取前复权数据，日k线
        rainiee_client.cn_stock_eod('300647.sz',2581,2681,'qfq')
        -- 获取未复权数据，5分钟行情
        rainiee_client.cn_stock_eod('300647.sz',2581,2681,None,5)

    2: cn_stock_realtime
        rainiee_client.cn_stock_realtime('300647.sz')
    3: cn_symbol_list
        rainiee_client.cn_symbol_list('chuangyeban')cn_stockstats1: cn_stockstats_list
          rainiee_client.cn_stockstats_list('300647.sz',2581,2581)
    2: cn_stockstats_sort
          rainiee_client.cn_stockstats_sort('daily_return_ma5',2581,2581)
    3: cn_stockstats_top_turnover_rate
          rainiee_client.cn_stockstats_top_turnover_rate(20,2581)
    4: cn_stockstats_is_enter_market
          rainiee_client.cn_stockstats_is_enter_market(2581,1.03,13)
    5: cn_stockstats_latest_returns
          rainiee_client.cn_stockstats_latest_returns('300647.sz',20)
    6: cn_stockstats_eod_portf_return   
          portf = [{'percentage':1.0,'symbol':'300547.sz'},{'percentage':0.5,'symbol':'300647.sz'}]
          rainiee_client.cn_stockstats_eod_portf_return(portf,2581))index1：get_trade_index
           start_index = client.get_trade_index('20200731')
   2：get_trade_date
           start_index = client.get_trade_date(2571)
Package: rainiee-decision-engine
rainiee_decision_engineeasy to use as most of the data returned are jsonInstallationpip install rainiee_decision_engine==2.1.0
from rainiee_decision_engine.decision_engine_client import DecisionEngineClient
rainiee_client = DecisionEngineClient(username,password)Upgradepip install rainiee_decision_engine==2.0.0 --upgradeQuick Startalgorithm1: algorithm_solve_vanilla_mvo
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_vanilla_mvo(symbol_list,2350,2360)
    2: algorithm_solve_maximize_sharpe
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_maximize_sharpe(symbol_list,2350,2360)
    3: algorithm_solve_vanilla_mvo_realtime
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_vanilla_mvo_realtime(symbol_list,2350,2360)
    4: monitoring_baseline
          portf = [{'percentage': 1.0, 'symbol': '300547.sz'}, {'percentage': 0.5, 'symbol': '300647.sz'}]
          hold_index = 2530
          hold_period = 5
          rainiee_client.monitoring_baseline(portf,hold_index,hold_period)
    5: cn_stockstats_returns_matrix
          symbol_list =['300370.sz','300102.sz','300345.sz','300341.sz','300806.sz','300249.sz','300727.sz','300373.sz','300808.sz',
          '300474.sz','300805.sz','300803.sz']
          rainiee_client.cn_stockstats_returns_matrix(symbol_list,2581,2581)

    6: trade_execute_order
          rainiee_client.trade_execute_order('300647.sz',2500,'buy',15)
Package: rainiee-decision-engine-test
rainiee_decision_engineeasy to use as most of the data returned are jsonInstallationpip install rainiee_decision_engine_test==2.2.0
from rainiee_decision_engine_test.decision_engine_client import DecisionEngineClient
rainiee_client = DecisionEngineClient(username,password)Upgradepip install rainiee_decision_engine_test --upgradeQuick Startalgorithm1: algorithm_solve_vanilla_mvo
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_vanilla_mvo(symbol_list,2350,2360)
    2: algorithm_solve_maximize_sharpe
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_maximize_sharpe(symbol_list,2350,2360)
    3: algorithm_solve_vanilla_mvo_realtime
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_vanilla_mvo_realtime(symbol_list,2350,2360)
    4: monitoring_baseline
          portf = [{'percentage': 1.0, 'symbol': '300547.sz'}, {'percentage': 0.5, 'symbol': '300647.sz'}]
          hold_index = 2530
          hold_period = 5
          rainiee_client.monitoring_baseline(portf,hold_index,hold_period)
    5: cn_stockstats_returns_matrix
          symbol_list =['300370.sz','300102.sz','300345.sz','300341.sz','300806.sz','300249.sz','300727.sz','300373.sz','300808.sz',
          '300474.sz','300805.sz','300803.sz']
          rainiee_client.cn_stockstats_returns_matrix(symbol_list,2581,2581)

    6: trade_execute_order
          rainiee_client.trade_execute_order('300647.sz',2500,'buy',15)
Package: rainiee-engine
rainiee_dataeasy to use as most of the data returned are jsonInstallationpip install rainiee_engine==3.0.0Upgradepip install rainiee_data==2.0.0 --upgradeQuick Startfrom rainiee_engine.data_pro import *
auth('u','p')
get_pred_features(feat_idx=7605,strategy_name='JQ_LOGI_OPO_FM3TP5_CYB'
Package: rainiee-rest-client
rainiee_decision_engineeasy to use as most of the data returned are jsonInstallationpip install rainiee_rest_client==1.0.3
from rainiee_rest_client.rest_client import RestClient
rainiee_client = RestClient(username,password).choice_rainiee_compute().login()Upgradepip install rainiee_rest_client==1.0.3 --upgradeQuick Startalgorithm1: algorithm_solve_vanilla_mvo
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_vanilla_mvo(symbol_list = symbol_list,start_index=7500,end_index = 7530)
    2: algorithm_solve_maximize_sharpe
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_maximize_sharpe(symbol_list = symbol_list,start_index=7500,end_index = 7530)
    3: algorithm_solve_vanilla_mvo_realtime
          symbol_list = ['300370.sz','300102.sz','300345.sz']
          rainiee_client.algorithm_solve_vanilla_mvo_realtime(symbol_list = symbol_list,start_index=7500,end_index = 7530)
    4: monitoring_baseline
          portf = [{'percentage': 1.0, 'symbol': '300547.sz'}, {'percentage': 0.5, 'symbol': '300647.sz'}]
          hold_index = 2530
          hold_period = 5
          rainiee_client.monitoring_baseline(portf,hold_index,hold_period)
    5: cn_stockstats_returns_matrix
          symbol_list =['300370.sz','300102.sz','300345.sz','300341.sz','300806.sz','300249.sz','300727.sz','300373.sz','300808.sz',
          '300474.sz','300805.sz','300803.sz']
          rainiee_client.cn_stockstats_returns_matrix(symbol_list = symbol_list,start_index=7500,end_index = 7530)

    6: trade_execute_order
          rainiee_client.trade_execute_order('300647.sz',2500,'buy',15)
Package: rain-orm
rain-orma tiny orm frameInstallit's easy to install via pippip install rain-ormSimple Exampleassume you have "students" table in "student_management" databasestudentsidnamepasswordclass_idimportrain_ormfromrain_orm.columnimportInt,VarCharrain_orm.connect(host="localhost",port=3306,user="root",password="123456",database="student_management")classStudentModel(rain_orm.Table):__table__="students"__fields__={"id":Int(auto_increment=True,primary_key=True),"name":VarChar(30,unique=True),"password":VarChar(30),"class_id":Int(default=1)}if__name__=="__main__":rain_orm.Table.auto_migrate()stu=StudentModel().where("id=?",1).one()print(stu)resultid: 1
name: cgy
<< StudentModel 1951412882544
	.table = students
	.fields = ['id', 'name', 'password', 'gender', 'origin', 'class_id']
	.instance = {
		id: 1,
		name: cgy,
		password: 123456,
		class_id: 1,
	}
>>Basic Usageit's easy to use rain-ormimport rain_ormconnect to databasedefine model class that inherits class rain_orm.Tabledefine two attribute "__table__" and "__fields__"use rain-orm APIImportimportrain_ormConnectrain_orm.connect(host="you host",port=3306,user="root",password="your password",database="student_management")Define Modeleach data must have a unique "id"fromrain_ormimportTablefromrain_orm.columnimportInt,VarCharclassClassModel(Table):__table__="classes"__fields__={"id":Int(primary_key=True,auto_increment=True),"name":VarChar(30)}classStudentModel(Table):__table__="students"__fields__={"id":Int(primary_key=True,auto_increment=True),"name":VarChar(30,not_null=True),"class_id":Int(foreign_key=ClassModel.id)}Auto Migrate# all subclasses that inherit rain_orm.Tablerain_orm.Table.auto_migrate()# create StudentModelrain_orm.Table.auto_migrate(StudentModel)CRUD ExampleRead# student liststu_lst=StudentModel().all()# student whose id equals 1 with all fieldsstu1=StudentModel().where("id = ?",1).one()# student whose id equals 1 with all fieldsstu2=StudentModel().where("id = 1").one()Createstu=StudentModel(name="name",password="123",class_id=1234)# set studentok=stu.create()print("ok:",ok)print(stu)result:ok: True
<< StudentModel 2449383681440
	.table = students
	.fields = ['id', 'name', 'password', 'class_id']
	.instance = {
		id: 30,
		name: jack,
		password: 123456,
		class_id: 1,
	}
>>Updatethere are 2 ways to update dataStudentModel().where("id = ?",22).one()# get student instance first# 1. set attribute (recommend)stu.name="your name"# 2. call update methodsok=stu.update("name","your name")DeleteStudentModel().where("id = ?",22).one()# get student instance firstok=stu.delete()# call delete method
Package: rain-pack-sdk
Getting Started with Swagger PetstoreIntroductionThis is a sample server Petstore server.  You can find out more about Swagger athttp://swagger.ioor onirc.freenode.net, #swagger.  For this sample, you can use the api keyspecial-keyto test the authorization filters.Find out more about Swagger:http://swagger.ioInstall the PackageThe package is compatible with Python versions3 >=3.7, <= 3.11.
Install the package from PyPi using the following pip command:pipinstallrain-pack-sdk==3.2.12You can also view the package at:https://pypi.python.org/pypi/rain-pack-sdk/3.2.12Initialize the API ClientNote:Documentation for the client can be foundhere.The following parameters are configurable for the API Client:ParameterTypeDescriptionenvironmentEnvironmentThe API environment.Default:Environment.PRODUCTIONhttp_client_instanceHttpClientThe Http Client passed from the sdk user for making requestsoverride_http_client_configurationboolThe value which determines to override properties of the passed Http Client from the sdk userhttp_call_backHttpCallBackThe callback value that is invoked before and after an HTTP call is made to an endpointtimeoutfloatThe value to use for connection timeout.Default: 60max_retriesintThe number of times to retry an endpoint call if it fails.Default: 0backoff_factorfloatA backoff factor to apply between attempts after the second try.Default: 2retry_statusesArray of intThe http statuses on which retry is to be done.Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]retry_methodsArray of stringThe http methods on which retry is to be done.Default: ['GET', 'PUT']passwordstrThe API client can be initialized as follows:fromswaggerpetstore.swaggerpetstore_clientimportSwaggerpetstoreClientfromswaggerpetstore.configurationimportEnvironmentclient=SwaggerpetstoreClient(password='Password')AuthorizationThis API usesCustom Authentication.List of APIsPetStoreUserClasses DocumentationUtility ClassesHttpResponseHttpRequest
Package: rain-python
# Rain Python APIA python API for [Rain](https://github.com/substantic/rain) computation framework.## Documentation[Overview at RtD](https://substantic.github.io/rain/docs/overview.html)[Python API docs](https://substantic.github.io/rain/docs/python_api.html)## InstallationInstall from [PyPI](https://pypi.org/project/rain-python/):`shell pip installrain-python`Or locally (building of Rust or C++ binaries not needed):`shell git clonehttps://github.com/substantic/raincd rain/python python3 setup.py install `To run the python tests, you need to build binaries of the Rust and C++ code first, see our [testing Dockerfile](https://github.com/substantic/rain/blob/master/Dockerfile). You may need to get a recent version of [rust](https://www.rust-lang.org/) from [rustup](https://rustup.rs/).
Package: rainsense
RainSensePython toolbox for the retrieval and processing of precipitation data from laser
disdrometers and microwave links.RainSense is based on a collection of scripts and functions that where used in
the processing of the WUREx14 field experiment and redacted to be more reusable.It is build around the PyHAD package and also uses ScatterPy for certain functions.NB: The current package is still heavily work-in-progress.
Package: rainwave-tools
Tools for maintaining a local library of music forRainwaveInstallpip install rainwave-toolsToolsDealing with mp3 files and id3 tagsapply_genres: apply genres that are assigned usingassign_genresassign_genres: interactively assign genres to directories of mp3 filescdg: manage cooldown groups (genre tags) in mp3 filesnormalize_filenames: automatically rename all files in a directory based on information in id3 tagsrename_artist: change an artist name in mp3 files, keeping multiple artists intactretag: interactively edit title, album, and artist tags on all mp3 files in a directoryrgwipe: remove all replaygain tags from mp3 filesrwtag: view and manipulate id3 tags on mp3 filestit3_tit2: Copy the contents of TIT3 to TIT2titles: interactively update titles on all mp3 files in a directoryDealing with album art filesdelete_art: delete generated album art files for a specific albumDealing with the databasealbum_search: search the database for an album by name substringmissing_art: find albums that do not have album artmove_ratings: move song ratings from one song to another (e.g. when removing duplicate songs)song_search: search the database for a song by title substringurl_check: check the validity of urls in the databaseDealing with OCRocremix.py: Python module for parsing a remix info page on ocremix.org for metadatagetocr: download remixes from ocremix.orgcleanocr: update local files with metadata from ocremix.orgocra2ocr: update local metadata when a song on an OCR album gets an official OCR release
Package: rainydais-cron
Cron Library------ A libary by RainyDais ------How it worksThe cron Library provides a simple and efficient way to automate tasks based on specified time intervals.How to useImport the module to use the cron libraryThis can be done by using:importcronDefine a functionThis can be done using:defyour_function():print("your_text")Thedef your_function():is what you use to make a function, this function will sayyour_text.Example:defHello_Function():print("Hello World")Define a function that will tell you when it runs, this will be told everyxsecondsThis can be done using:deftime_alert_function(seconds):print("I run every{0}seconds!".format(seconds))Create a function to run everyxamount of timesMake a first example function to run every 5 secondscron.addJob(example_function,5)Create a second example function to run every 1 secondcron.addJob(time_alert_function,1,1)Currently theaddJobparameters are;function, timeout/cron delay, args(only 1 supported currently)How to call your Cron jobsYou can use this function:cron.start()Option: passTrueinto the function call to make it non-thread blockingExample:cron.start(True)Default is False or thread blocking.This will start your timer fyunction, that will then execute your cron jobs.To prevent your program from ending whilst usingnon-thread blocking modeYou can use:input("\nHello, this is the end of the file!\n\n")This will also act as a test to provecron.start()isn't blocking the thread
It contains newline characters so it doesn't get put on the same line as
other print messages that will come in from the threaded cron jobs.
Package: raion
About Raion FrameworkRaion is a web application framework with expressive, elegant syntax inspired bylaraveland built withfastapi. We believe development must be an enjoyable and creative experience to be truly fulfilling. Raion takes the pain out of development by easing common tasks used in many web projects, such as:Simple, fast routing engine.Powerful dependency injection container.Multiple back-ends forsessionandcachestorage.Expressive, intuitivedatabase ORM.Database agnosticschema migrations.Robust background job processing.Real-time event broadcasting.Raion is accessible, powerful, and provides tools required for large, robust applications.Learning RaionRaion has the most extensive and thoroughdocumentationand tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.Raion SponsorsWe would like to extend our thanks to the following sponsors for funding Raion development. If you are interested in becoming a sponsor, please visit the RaionPatreon page.ContributingThank you for considering contributing to the Raion framework! The contribution guide can be found in theRaion documentation.Code of ConductIn order to ensure that the Raion community is welcoming to all, please review and abide by theCode of Conduct.Security VulnerabilitiesIf you discover a security vulnerability within Raion, please send an e-mail viasupport@raion.dev. All security vulnerabilities will be promptly addressed.LicenseThe Raion framework is open-sourced software licensed under theMIT license.