Saravanan666/pypi-org huggingface dataset:
Package: ourgroceries
Unofficial asyncio python wrapper for the Our Groceries API. This library requiresPython >=3.5.InstallationpipinstallourgroceriesUsageimport asyncio
from ourgroceries import OurGroceries

username = ''
password = ''

og = OurGroceries(username, password)

loop = asyncio.get_event_loop()
loop.run_until_complete(og.login())

my_lists = loop.run_until_complete(og.get_my_lists())
print(my_lists)

my_todo_list = loop.run_until_complete(og.get_list_items(list_id=''))
print(my_todo_list)Methodsdef login()Logs into our groceriesdef get_my_lists()Gets all of your listsdef get_category_items()Gets all of your category itemsdef get_list_items(list_id)Gets the items for a listdef create_list(name, list_type='SHOPPING')Creates a new list. list_type can be 'RECIPES' or 'SHOPPING'def create_category(name)Create a new categorydef toggle_item_crossed_off(list_id, item_id, cross_off=False)Toggle a list item's crossed off property based oncross_offdef add_item_to_list(list_id, value, category="uncategorized", auto_category=False, note=None)Adds a new item to a given list/category. Useauto_categoryinstead ofcategoryto let
Our Groceries apply the default category for this item.async def add_items_to_list(self, list_id, items)Adds several items to a given list. Useitemsto pass a sequence of items, each being just a value, or a tuple
(value, category, note).def remove_item_from_list(list_id, item_id)Removes an item from a given listdef get_master_list()Gets the master listdef get_category_list()Gets the category listdef delete_list(list_id)Deletes a listdef delete_all_crossed_off_from_list(list_id)Deletes all crossed off items from a listdef add_item_to_master_list(value, category_id)Adds an item to the master listdef change_item_on_list(list_id, item_id, category_id, value)Changes an item on a listExceptionsthrowsInvalidLoginExceptionif can't login.Developmentprerequisitespython3 -m pip install --user --upgrade setuptools wheel
python3 -m pip install --user --upgrade twine

increment version in `setup.py`
delete build folder

python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
Package: our_groceries_client
Our Groceries Client====================This package provides an interface to the grocery list application 'Our Groceries'.Features include:* Adding items to a list* Querying if items are on a listFuture development will include:* Removing items / crossing off from a list* Deleting crossed off items from a list* Listing items on a list--------------------This package was based on the NodeJS module availableat https://github.com/sethwebster/our-groceries-client. Thanks a ton to sethwebsterfor have this all figured out and providing the source.
Package: ouro
OuroOuroDescriptionName OriginDemoInstallationUsing PIPUsing PoetryFrom SourceUsageUsing the CLI toolBasic UsageEntry PointAvailable OptionsAs a pre-commit hookFeaturesDescriptionOURO (OUROboros) is aPythonpackage that checks your code for circular (cyclic) imports.Currently, ouro only supportsabsolute importsName OriginThe name"ouro"is derived from the term"ouroboros", a symbol from ancient mythology depicting a snake consuming its own tail, representing the concept of infinity and cyclicality. This name was chosen for its apt metaphorical representation of the package's functionality. Just as the ouroboros symbolizes a cycle, the "ouro" package checks for circular imports in Python. The connection to Python, a language named after a type of snake, further reinforces this symbolic link.DemoInstallationYou can install ouro in multiple ways, as follows.Using PIPpipinstallouroUsing PoetrypoetryaddouroFrom SourceClonethis repogitclonehttps://github.com/abdelrahman0w/ouroOr you can download it as a zip fileNaviage to the repo directorycdouroOnce you have a copy of the source, you can install it as follows:UsingmakemakeinstallUsingpippipinstall.Or directly from thesetup.pyfilepythonsetup.pyinstallUsageUsing the CLI toolBasic UsageNavigage to your projectcdpath/to/your/projectRunouroouroEntry Pointouro[-h][-v][--verbose][--no-categorize][-e][-iIGNORE[IGNORE...]][path]Available Options<path>             path to the Python project to be checked (default: current working directory)

-h, --help         show this help message and exit
-v, --version      show version number and exit
--verbose          increase output verbosity (print report to console)
--no-categorize    don't categorize cycles (mark all cycles as critical)
-e, --export       export the report to a json file
-i. --ignore       list of files, directories, or glob patterns to ignoreAs a pre-commit hookCheckpre-commitfor instructionsSample usage in.pre-commit-config.yamlfile:Add ouro to repos as follows:-repo:https://github.com/abdelrahman0w/ourorev:v0.2.0hooks:-id:ouroFeaturesCurrent features are checkedCLI tool for checking circular imports in a Python codeGet the context of the import to ignore imports within a function scopeIgnore.gitdir in case of git repoIgnore paths and patterns in.gitignorefileAbility to ignore a file name, directory name, or a glob patternShow imports in context with file name and line numberSupport for absolute importsSupport for relative importsChangelog0.2.0 (2024-02-13)FeaturesEnhance performance by around %600.1.3 (2024-01-31)Fixedadd missing instsll requirements0.1.2 (2024-01-31)Fixedbug fixes0.1.1 (2024-01-29)Fixedpre-commit hookbug in possible origins func0.1.0 (2024-01-27)FeaturesCLI tool for checking circular imports in a python packageCurrently, supportsabsolute importsonlyGets the context of the import to ignore imports within a function scopeIgnores.gitdir in case of git repoIgnores paths in.gitignorefileAbility to ignore a file name, directory name, or a glob pattern
Package: ouroboros
A standalone, pure Python implementation of the Python Standard Library.DocumentationDocumentation for Ouroboros can be found onRead The Docs.CommunityOuroboros is part of theBeeWare suite. You can talk to the community through:@pybeeware on TwitterTheBeeWare Users Mailing list, for questions about how to use the BeeWare suite.TheBeeWare Developers Mailing list, for discussing the development of new features in the BeeWare suite, and ideas for new tools for the suite.ContributingIf you experience problems with Ouroboros,log them on GitHub. If you
want to contribute code, pleasefork the codeandsubmit a pull request.
Package: ouroboros-cli
Automatically update your running Docker containers to the latest available image.The de-facto standard for docker update automationOverviewOuroboros will monitor (all or specified) running docker containers and update them to the (latest or tagged) available image in the remote registry. The updated container uses the same tag and parameters that were used when the container was first created such as volume/bind mounts, docker network connections, environment variables, restart policies, entrypoints, commands, etc.Push your image to your registry and simply wait your defined interval for ouroboros to find the new image and redeploy your container autonomously.Notify you via many platforms courtesy ofAppriseServe metrics for trend monitoring (Currently: Prometheus/Influxdb)Limit your server ssh accessssh -i key server.domainname "docker pull ... && docker run ..."is for scrubsdocker-compose pull && docker-compose up -dis for fancier scrubsGetting StartedMore detailed usage and configuration can be found onthe wiki.DockerOuroboros is deployed via docker image like so:dockerrun-d--nameouroboros\-v/var/run/docker.sock:/var/run/docker.sock\pyouroboros/ouroborosThis is image is compatible for amd64, arm32, and arm64 CPU architecturesor viadocker-compose:Official ExamplePipOuroboros can also be installed viapip:pipinstallouroboros-cliAnd can then be invoked using theouroboroscommand:$ouroboros--interval300--log-leveldebugThis can be useful if you would like to create asystemdservice or similar daemon that doesn't run in a containerExamplesPer-command and scenario examples can be found in thewikiContributingAll contributions are welcome! Contributing guidelines are in the works
Package: ouroboroslib
OuroboroslibA Graph Abstract Data Type Library. Named after the symbol of a serprent eating its own tail.Installationpip3 install ouroboroslibUsagefromouroboroslibimportOuroborosGraphouroboros=OuroborosGraph(directed=True)# Each tuple in the edge list is (starting_node, ending_node, edge_value)ouroboros.overwrite_graph(edge_list=[(1,2,7),(2,3,10)])ouroboros.add_node(4)ouroboros.add_edge(3,4,value=7)ouroboros.delete_node(2)# {(3, 4, 7)} - only 1 edge because node 2 is deletededges=ouroboros.tuple_edges()
Package: oursms-py
oursms py:a oursms Library in pythonInstallation:Get the project useing pippip3installoursms_pyUsage/Examples:First you must import the libfromoursms_pyimport*then you create a client with your api credentialsclient=Client(<USER-ID>,<API-KEY>)Then you can send messages as followsNormal Message:msg=client.send_msg(<MOBILE-NUMBER,<MESSAGE-TEXT>)iftype(msg)==nan:print("cant send")#store message id to check status later if you wantOTP Message:Here you send the otp as an integer and the api takes care of appending it to a message bodymsg=client.send_otp(<MOBILE-NUMBER,<OTP_NUMBER>)iftype(msg)==nan:print("cant send")Message Status:messageStatus=client.msg_status(<MESSAGE-ID>)#This json List typically contains only one element
Package: ouster-mapping
The Ouster SDK Mapping provides mapping functionalities as an extension of the
Ouster Sensor SDKPyPIThe two main functions of the Ouster SDK Mapping:Simultaneous Localization and Mapping (SLAM)Point Cloud Construction using SLAM outputsMore SDK libraries and tools information can be found atGitHuband Ouster SDK
Mapping user documentation is located atMappingSessionSupported PlatformsOuster SDK Mapping is a pure python package which can be installed on all platforms.
However, some of its dependencies may not be supported on your system.SLAM function is available on the following platforms:Linux x86_64 (manylinux2014_x86_64) for python >= 3.7, <=3.11MacOS >= 10.14 on x86_64 platforms (macosx_10_14_x86_64) for python >= 3.7, <=3.11MacOS >= 11.0 on M1 platforms (macosx_11_0_arm64) for python >= 3.8, <=3.11Windows 10 on x86_64 platforms (win_amd64) for python >= 3.7, <=3.11NOT support Linux ARM64 platforms (manylinux2014_aarch64)Point Cloud Construction is available on the following platforms:Linux x86_64 (manylinux2014_x86_64) for python >= 3.7, <=3.11Linux ARM64 (manylinux2014_aarch64) for python >= 3.7, <=3.11Windows 10 on x86_64 platforms (win_amd64) for python >= 3.7, <=3.10Vary on MacOS x86_64 platforms (macosx_10_14_x86_64) and M1 platforms (macosx_11_0_arm64)Later we will support building from source.
Package: ouster-os1
Python client for the Ouster Lidar OS-1Compatible with Firmware Version 1.10.0 and python 3Your milage may vary with other versions, it was tested against a device OS1-16
device running 1.10.0Installingpip install --upgrade ouster-os1Quick startfromos1importOS1fromos1.utilsimportxyz_pointsdefhandler(raw_packet):"""Takes each packet and log it to a file as xyz points"""withopen('points.csv','a')asf:x,y,z=xyz_points(raw_packet)forcoordsinzip(x,y,z):f.write("{}\n".format(','.join(coords)))os1=OS1('10.0.0.3','10.0.0.1',mode='1024x10')# OS1 sensor IP, destination IP, and resolution# Inform the sensor of the destination host and reintialize itos1.start()# Start the loop which will handle and dispatch each packet to the handler# function for processingos1.run_forever(handler)You can run the server as threaded withos1.run_forever(handler, threaded=True)RecipesGenerally speed is a concern since the OS1 is sending 12,608 bytes/packet at a
rate of 1280 packets/sec (in 1024x20 or 2048x10 mode).
So a multiprocessing producer consumer model works well.importjsonfrommultiprocessingimportProcess,Queuefromos1importOS1fromos1.utilsimportbuild_trig_table,xyz_pointsOS1_IP='10.0.0.3'HOST_IP='10.0.0.2'unprocessed_packets=Queue()defhandler(packet):unprocessed_packets.put(packet)defworker(queue,beam_altitude_angles,beam_azimuth_angles):build_trig_table(beam_altitude_angles,beam_azimuth_angles)whileTrue:packet=queue.get()coords=xyz_points(packet)# do work...defspawn_workers(n,worker,*args,**kwargs):processes=[]foriinrange(n):process=Process(target=worker,args=args,kwargs=kwargs)process.start()processes.append(process)returnprocessesos1=OS1(OS1_IP,HOST_IP)beam_intrinsics=json.loads(os1.get_beam_intrinsics())beam_alt_angles=beam_intrinsics['beam_altitude_angles']beam_az_angles=beam_intrinsics['beam_azimuth_angles']workers=spawn_workers(4,worker,unprocessed_packets,beam_alt_angles,beam_az_angles)os1.start()try:os1.run_forever(handler)exceptKeyboardInterrupt:forwinworkers:w.terminate()TCP API CommandsThe TCP API commands can be accessed through an instance of theOS1object.The following methods are supported:get_config_txtget_sensor_infoget_beam_intrinsicsget_imu_intrinsicsget_lidar_intrinsicsget_config_param- Supports querying active and staged parameters. Example:os1.get_config_param('active', 'udp_ip')set_config_param- Supports settings parameters to be staged. Example:os1.set_config_param('udp_ip', '10.0.0.1')reinitialize- Will reinitialize the sensor and apply all staged parameters to be active.
Package: ouster-sdk
The Ouster Sensor SDK provides developers interfaces for interacting with sensor hardware and
recorded sensor data suitable for prototyping, evaluation, and other non-safety-critical
applications in Python and C++. Example and reference code is provided for common operations on
sensor data in both languages. The SDK includes APIs for:Querying and setting sensor configurationRecording and reading data in pcap formatReading and buffering sensor UDP data streams reliablyConversion of raw data to range/signal/near_ir/reflectivity images (destaggering)Efficient projection of range measurements to Cartesian (x, y, z) coordinatesVisualization of multi-beam flash lidar dataAdditionally, in Python, the SDK also provides:Frame-based access to lidar data as numpy datatypesA responsive visualizer utility for pcap and sensorSupported PlatformsPre-built binaries are provided onPyPIfor the following platforms:Most glibc-based Linux distributions on x86_64 and ARM64 platforms (manylinux2010_x86_64,manylinux2014_aarch64)macOS >= 10.15 on x86_64 platforms (macosx_10_15_x86_64)macOS >= 11.0 on Apple M1 for Python >= 3.8 (macosx_11_0_arm64)Windows 10 on x86_64 platforms (win_amd64)Building from source is supported on:Ubuntu 20.04, 22.04, and Debian 11 (x86-64, aarch64)macOS >= 10.15 (x86-64), >= 11.0 (arm64)Windows 10 (x86-64)The Ouster SDK drops languages and platforms as they exit their standard support cycle. Please
follow ourLifecycle Policypage to understand when support for a Python version, C++ compiler,
Operating System, or Sensor FW may dropped from support.
Package: outage
GB Power Outage Monitoringoutageis a Python library for retrieving, parsing, and collating power outage data for the British electricity system.To Do:Add an outage map to the documentation, examplehereMake sure that all of the raw and cleaned JSON data is available from the GitHub pages siteUse CasesWant to check you're having a power cut and ideally get an estimate for when it will be resolvedFind out the average power cut time for an area, as well as how good their estimate for the length is
Package: outages-scaffold
outages-scaffoldThis tool is part of theOutages Project. It asks the user a series of question and then
generates a simple scaffolding for a tracking outages in the Outages Project format.Installpipinstalloutages-scaffoldExecutionoutage-scaffoldAnswer prompts as asked.Alternatively, parameters may be passed in:$ bin/outages-scaffold --help
usage: outages-scaffold [-h] [-n SERVICE_NAME] [-t SERVICE_TYPE]
                        [-u SERVICE_URL] [-j JSON_URL]

Generate a new repository for the Outages Project

optional arguments:
  -h, --help            show this help message and exit
  -n SERVICE_NAME, --service-name SERVICE_NAME
                        Service name, one word (e.g. AWS)
  -t SERVICE_TYPE, --service-type SERVICE_TYPE
                        Service type, brief (e.g. cloud computing platform)
  -u SERVICE_URL, --service-url SERVICE_URL
                        Service url (e.g. https://aws.amazon.com)
  -j JSON_URL, --json-url JSON_URL
                        JSON url to parse (e.g.
                        https://status.aws.amazon.com/data.json)
Package: out-and-in
out_and_in** out_and_in ** is a backward feature elimination followed with forwared features selection strategy.Basic IdeaThis function will itinerary remove one feature and from features, if the metrics has beed optimized, we will add it to dropped-features.
we will drop dropped-features after that repeat, and calculate a metrics based on remaining features, and add those dropped_fatures
back to the remaining features, if the performance has been increased, we will remove that features from dropped features. and finially,
it will return dropped features.Instalationpip intall out_and_inExampleWe will use the auto_mpg as demo for the selection process of out_and_in
auto_mpg include 80 features and 1460 entries. those features include
numerical features and categorical featuresimportpandasaspdfrommainimportoutinfromsklearn.datasetsimportfetch_openmlfromsklearn.model_selectionimporttrain_test_splitfromsklearn.ensembleimportRandomForestRegressorfromsklearn.metricsimportmean_squared_errorfrommathimportsqrt# Load datasetauto_mpg=fetch_openml(data_id=42165)X=auto_mpg.datay=auto_mpg.targetprint(f"the shape of X:{X.shape()}")# encoded XX_encoded=pd.get_dummies(X,drop_first=True)# fill NA with meanX_encoded=X_encoded.fillna(X_encoded.mean())defmodel_train(X:pd.DataFrame,y:pd.DataFrame):"""This function will train a basic model and return a metric for that model , we take random forest as a example here.:param X: pandas dataframe, it will include all features and the categorical features have been encoded.:param y: pandas datasrame, it will include prediction target:return: metric."""# Split data into training and testing setsX_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.2,random_state=42)# Initialize the Random Forest modelrf_model=RandomForestRegressor(n_estimators=100,random_state=42)# Train the modelrf_model.fit(X_train,y_train)# Make predictionsy_pred=rf_model.predict(X_test)# Evaluate the modelrmse=sqrt(mean_squared_error(y_test,y_pred))returnrmse# select featuresdropped_features=outin(X,y,model_train)print(f"dropped features:{dropped_features}")
Package: outbound
Outbound sends automated email, SMS, phone calls and push notifications based on the actions users take or do not take in your app. The Outbound API has two components:Identify each of your users and their attributes using an identify API call.
Track the actions that each user takes in your app using a track API call.
Because every message is associated with a user (identify call) and a specific trigger action that a user took or should take (track call), Outbound is able to keep track of how each message affects user actions in your app. These calls also allow you to target campaigns and customize each message based on user data.Example: When a user in San Francisco(user attribute) does signup(event) but does not upload a picture(event) within 2 weeks, send them an email about how they’ll benefit from uploading a picture.
Package: outbox-streaming
outbox-streamingReliably send messages to message/task brokers, like Kafka or CeleryRoadmapDone✅ Kafka + SQLAlchemy✅ Kafka + SQLAlchemy + asyncioIn progress⏹ Celery + SQLAlchemy⏹ Celery + SQLAlchemy + asyncioPlanned🆕 Kafka + Django ORM🆕 Celery + Django ORM🆕 Dramatiq + SQLAlchemy🆕 Dramatiq + SQLAlchemy + asyncio🆕 Dramatiq + Django🆕 RabbitMQ + SQLAlchemy🆕 RabbitMQ + SQLAlchemy + asyncio🆕 RabbitMQ + DjagnoExample FastAPI + Kafka + SQLAlchemyfromfastapiimportFastAPIfromoutbox_streaming.kafka.sqlalchemyimportSQLAlchemyKafkaOutboxfromsqlalchemyimportormfromappimportmodels,dbfromapp.configimportconfigfromapp.schemasimportTodoCreateapp=FastAPI()# create instance of SQLAlchemyKafkaOutboxoutbox=SQLAlchemyKafkaOutbox(engine=db.engine,kafka_servers=config.KAFKA_SERVERS,)# Run separate tread that monitor outbox table and publish messages to Kafka. It's not recommended for production,# but it's handy for developmentoutbox.publisher.run_daemon()Session=orm.sessionmaker(bind=db.engine)# create outbox tablesoutbox.storage.create_tables(engine=db.engine)@app.post('/todos')defcreate_todo(create:TodoCreate)->str:withSession()assession:# create new objecttodo=models.Todo(text=create.text)session.add(todo)# create kafka event in outbox tableoutbox.save(session=session,topic='todo_created',value=todo.to_dict(),)# commit changes in databasesession.commit()# publisher will pick up kafka message from outbox table and will send it kafka topicreturn"OK"
Package: outbrain
python-outbrain |build-status|===============Python wrapper for Outbrain Amplify APICopy over yaml file for outbrain credentialscp outbrain.yml.example outbrain.ymlEdit usename and password (note that this is the outbrain username and not the user email)... |build-status| image:: https://travis-ci.org/bpmason1/python-outbrain.svg?branch=master:target: https://travis-ci.org/bpmason1/python-outbrain:alt: Build status
Package: outbreaker
OutbreakerUnofficial API for the WHO Disease Outbreak NewsOverviewThe World Health Organisation has anawesome resource of disease outbreak reportsthat I believe is underutilised. To improve access to this resource, I've developed a small command line package that handles some specific requests.Currently users are able to pull down the five most recent reports, request the full archive for a given year (from 1996 onwards), country or diseases, and download or read specific articles. In the future I plan to extendOutbreaker's capacities to include features such as outbreak alerts.Naturally this package relies on the WHO website's existing layout, if anything breaks please highlight it as an issue on the package'sgithub repo.InstallationVia pippip install outbreakerVia GitHubFind the latest release wheel on thereleases tab.RunningInstallation will add theoutbreakercommand to your PATH.Run TypeslatestReturn the dates, titles, and urls for the five most recent reports.archive <year/country/disease>Return a list of the reports found in the given year, country, or disease.download <report_url>Download a given article url as a .txt file (nb. this has not yet been optimised for all articles).read <report_url>Print out a given article to the terminal.