Saravanan666/pypi-org huggingface dataset:
Package: wardleymap
WardleyMapWardleyMapis a Python package designed for creating and visualizing Wardley Maps. Wardley Maps provide a visual representation of the strategic landscape and the positioning of components within it, facilitating better decision-making in business strategy and technology development.FeaturesParse and interpret Wardley Map syntax.Visualize maps usingmatplotlibfor easy integration into Python workflows.Export maps to SVG format for embedding in web applications or documents.With a set of utilities to convert Wardley Map text into JSON, TOML, GRAPH and Cypher Text.InstallationInstallwardleymapusing pip:pipinstallwardleymapEnsure you have Python 3.6 or newer installed.Quick StartTo create and visualize a Wardley Map, follow these steps:fromwardleymapimportwardlemap# Define the structure of your Wardley Map using a string.map_definition="""title Business Value Chainanchor Customer [0.95, 0.9]component User Needs [0.8, 0.8]component Website [0.6, 0.6]component Hosting [0.3, 0.4]User Needs -> WebsiteWebsite -> Hosting"""# Process the Wardley Map text and generate a plot of the mapmap,map_plot=wardley(map=map_text)# Convert the map plot into an SVGsvg_map=create_svg_map(map_plot)DocumentationFor detailed usage and API documentation, please refer to thedocsdirectory.ContributingContributions toWardleyMapare welcome! Please read theCONTRIBUTING.mdfile for guidelines on how to contribute to this project.LicenseThis project is licensed under the MIT License - see theLICENSEfile for details.AcknowledgementsSpecial thanks to the open-source community for the invaluable tools and libraries.Inspired by Simon Wardley's work on mapping and strategy.Example UsageBelow is an example of how to use thewardleymappackage to create and visualize a Wardley Map:fromwardleymapimportwardlemap# Define the structure of your Wardley Map using a string.map_definition="""title Business Value Chainanchor Customer [0.95, 0.9]component User Needs [0.8, 0.8]component Website [0.6, 0.6]component Hosting [0.3, 0.4]User Needs -> WebsiteWebsite -> Hosting"""# Process the Wardley Map text and generate a plot of the mapmap,map_plot=wardley(map=map_text)# Convert the map plot into an SVGsvg_map=create_svg_map(map_plot)
Package: wardrobe
wardrobe is a Python project about datastructures to manage contexts. It
currently provides one class: StackedDict.StackedDict is a dictionary-like object with additional methods to
save the current state (commit) and restore it (reset).Example:>>> from wardrobe import StackedDict
>>> clark = StackedDict(top='blue bodysuit', bottom='red underpants',
...                     sex_appeal=True)
>>> clark['bottom']
'red underpants'
>>> clark['friend'] = 'Lois'
>>> dict(clark) == {'top': 'blue bodysuit',
...                 'bottom': 'red underpants',
...                 'friend': 'Lois',
...                 'sex_appeal': True}
True
>>> clark.commit()  # doctest: +ELLIPSIS
<wardrobe.stackeddict.StackedDict object at 0x...>
>>> clark.update({'top': 'shirt', 'bottom': 'jeans', 'head': 'glasses'})
>>> del clark['sex_appeal']
>>> dict(clark) == {'top': 'shirt',
...                 'bottom': 'jeans',
...                 'head': 'glasses',
...                 'friend': 'Lois'}
True
>>> clark.reset()  # doctest: +ELLIPSIS
<wardrobe.stackeddict.StackedDict object at 0x...>
>>> dict(clark) == {'top': 'blue bodysuit',
...                 'bottom': 'red underpants',
...                 'friend': 'Lois',
...                 'sex_appeal': True}
Truewardrobe.StackedDict is useful to create context objects, like Django’s
django.template.context:Context objects.Ressourcesonline documentation:http://wardrobe.readthedocs.orgPyPI page:http://pypi.python.org/pypi/wardrobecode repository:https://github.com/benoitbryon/wardrobebugtracker:https://github.com/benoitbryon/wardrobe/issues
Package: warehouse-client
Python client library for warehouseThis library implements basic functionality for interaction with a warehouse instance.Examples of this includes:Searching with natural and normal query languages for bundles and filesReadout of properties for files and bundlesDownload and upload of filesCreation of bundlesTrashing and restoration of bundles and filesExamplesFor a basic demonstration of the library functionality, an interactive mode is included. Make sure the two files~/.warehouse.apikeyand~/.warehouse.urlare populated with API key and URL to the warehouse instance, respectively, and launch the interative mode:>python-mwarehouse

Readingconfigfrom~/.warehouse.urland~/.warehouse.apikey

Successfullyconnectedtowarehouseonhttps://warehouse.local
Aclientobjectnamed'c'isavailable

Tryrunninghelp(c)formoreinformation

>>>Searching for bundle and listing of propertiesimportwarehouseaswhc=wh.Client("https://warehouse.local",wh.ApikeyAuth(APIKEY))forbundleinc.find_bundles('bundle.version exists',sorting=None,limit=1):print(bundle.get_properties())
Package: warehut
warehutInstallationpipinstallwarehutExampleimporttimeimportdatetimeimportrandomfromwarehutimportWarehutfromwarehutimportProducerfromwarehutimportConsumer,listen# There also exists a `Hybrid` worker,# that can both listen to events and# when responding, can forward to other consumers.# Use this with caution and consideration.fromwarehut.workerimportWorkerclassMyWarehut(Warehut):defhandle_error(self,worker_type:type[Worker],exception:Exception):# Handle exception raised within a worker process# You could launch a window, write the error to a log file, etc.# Stopping all other workersself.stop()# And printing the errorprint(f'\nWorker of type{worker_type.__name__}'f'encountered an error.\n{exception!r}\n')classMyProducer(Producer):asyncdef__aenter__(self):print(f'Preparing environment for{self}')asyncdef__aexit__(self,exc_type,exc_value,trace):print(f'Gracefully closing environment for{self}')asyncdefupdate(self):# Put whatever you want your producer to do, here.# It can read from any source and `forward` data to consumer queues.# This method is run on repeat in-between status checks of the worker.# Forward the current timestamp to 'ping'self.forward('ping',time.time())print('Pinged!')# Sleep a random amount of time to create obvious offsettime.sleep(random.random()*2)# Forward a randomly generated number to 'random'self.forward('random',random.randint(0,100))print('Randomed!')# Sleep again ... same reason.time.sleep(random.random()*2)classMyConsumer(Consumer):asyncdef__aenter__(self):print(f'Preparing environment for{self}')asyncdef__aexit__(self,exc_type,exc_value,trace):print(f'Gracefully closing environment for{self}')# `listen` defines a function to be called with data# that is labeled with the specified event name.@listen('ping')asyncdefon_ping(self,timestamp):"""Print the time at which a ping was sent"""timestamp=datetime.datetime.fromtimestamp(int(timestamp))print(f'Ping at{timestamp.strftime("%Y-%m-%d%H:%M:%S")}')@listen('random')asyncdefon_random(self,number):"""Print generated random numbers"""ifnumber>80:raiseRuntimeError('An error to show off the `Warehut` error handler')print(f'Random number generated:{number}')if__name__=='__main__':withMyWarehut([MyProducer,MyConsumer]):# `Warehut.start` is called upon entering the contextinput('\nPress Enter to exit\n\n')# `Warehut.stop` is called upon exiting the context# They can be called on their own with the same effect## Ex.# warehut = MyWarehut([MyProducer, MyConsumer])# warehut.start()# input('\nPress Enter to exit\n\n')# warehut.stop()
Package: warema-wms-controller
Warema WMS Webcontrol ControllerThis library can connect to a Warema WMS WebControl web server to send control commands.Currently only vertical blinds are supported. Feel free to extend support to other devices.Usage:fromwarema_wmsimportShadeshades=Shade.get_all_shades()shades[0].set_shade_position(25)#0=open; 100=closedshades[1].get_shade_state(True)#Force update and get shade statein case your WebControl server is not underhttp://webcontrol.localyou'll
have to create and pass your own WmsController.fromwarema_wmsimportWmsController,Shadeshades=Shade.get_all_shades(WmsController('http://server_addr'))An undocumented example integration for home assistant can be found here:https://github.com/cornim/ha-warema-integrationChanges to version 0.2.4Improved error handling while updating shades (network timeouts)Changes to version 0.2.3Fixed error log message in set_shade_position methodChanges to version 0.2.2Fixed misnamed variable in error log in set_shade_position methodChanges to version 0.2.1Increased stability by checking if set position cmd was receivedChanges to version 0.2.0Made update procedure more resilientIntroduced parameters to set number of retries and time between commandsSet default time between commands to 0.1sSet default number of retries to 3Changes to version 0.1.4Removed bug on system were 'http://webcontrol.local' does not resolveChanges to version 0.1.2Reduced wait time between sending http commands to wms webcontrol webserver to 0.5 secondsChanges to version 0.1.1Changed package structureImproved documentationChanges to version 0.1.0Improved protocolFixed bug where moving state was always true.
Package: wareroom
wareroomcloud object storage wrapperUsagepipinstallwareroomset cloud storage credentials in config file[obs]access_key_id="xxxx"secret_access_key="xxxx"endpoint="https://obs.cn-north-4.myhuaweicloud.com"bucket="image"replace access_key_id and secret_access_key with your own credentialsfromwareroomimportClientimporttomllibdefread_config(filepath,kind='storage'):"""Read storage config from toml file.:param filepath: path to config file:type filepath: str:param kind: kind of config, default is storage:type kind: str:return: return config keys:rtype: tuple, (str, str, str, str): access_id, secret_key, endpoint, bucket."""withopen(filepath,"rb")asf:config=tomllib.load(f)access_key_id=config["storage"]["access_key_id"]secret_access_key=config["storage"]["secret_access_key"]endpoint=config["storage"]["endpoint"]bucket=config["storage"]["bucket"]returnaccess_key_id,secret_access_key,endpoint,bucketconfig_file="config.toml"# read access key from config fileaccess_key_id,secret_access_key,endpoint,bucket=read_config(config_file)# create clientclient=Client(access_key_id,secret_access_key,endpoint,bucket)# upload filefilename="test.jpg"bucket="image"withopen(filename,"rb")asfile:result,content=client.add(bucket,filename,"image/jpeg",file)# download fileresult,content,buffer=client.get(bucket,filename)# delete fileresult,content=client.delete(bucket,filename)apiread_configread cloud storage credentials from config fileRead obs config from toml file.

Args:
    filepath (str): toml config file path.
    kind (str): config kind, only obs now.
Returns:
    (str, str, str, str): access_id, secret_key, endpoint, bucket.Client.addupload file to cloud storageif upload success, return True and url, else return False and reasonArgs:
    bucket (str): OBS bucket name.
    filename (str): filename.
    content_type (str): image MIME type / media type e.g. image/png or text/markdown.
    file (File) :  A SpooledTemporaryFile (a file-like object).
    This is the actual Python file that you can pass directly to other functions
    or libraries that expect a "file-like" object.

Returns:
    (bool, str): (True/False, url/reason)Client.getdownload file from cloud storageif download success, return True, content type, file buffer,
else return False ,reason and ""Args:
    bucket (str): OBS bucket name.
    filename (str): filename.

Returns:
    (bool, str, File): (True/False, reason, file buffer)

    Args:
        bucket (str): OBS bucket name.
        filename (str): filename
    
    Returns:
        (bool, str, str): (True/False, content_type/reason, buffer/"")Client.deletedelete file from cloud storageif delete success, return True and success message, else return False and reasonArgs:
        bucket (str): OBS bucket name.
        filename (str): filename
    Returns:
        (bool, str): (True/False, message/reason)
Package: waretomo
waretomoOverengineered batch processing script for tomography data with Warp and aretomo.NOTE: This was tested with AreTomo 1.3.4, i's recommended to use the same version.Installation and usagepipinstallwaretomowaretomo-hEvery time you run waretomo, a log will be appended to anwaretomo.logfile in the output directory.WalkthroughHere's a short summary of how I recommend using this script:pre-process your dataset in Warp, up toCreate stack for imod. Make sure to deselect bad tilts from the warp interface; they will be skipped in subsequent stepsrunwaretomoindry-runmode (-d), to make sure everything is set up correctly. Pass any other options you'd like (seewaretomo -hfor a complete list and shorthands):waretomo.--mdoc-dir./mdocs-b8-t800-dfollow error messages if any arise (you may have to provide the path to theAreTomoexecutable with--aretomo, for example)once the above command works, it will give you a summary of inputs and of the upcoming pipeline. It's time to try to run it on a single tomogram, using-j(--just).Note that the name to provide to-jis the tomogram name given at the top of the mdoc file (ImageFile = <something>), and not the input file (this is because warp actually uses this value for all subsequent outputs).waretomo.--mdoc-dir./mdocs-b8-t800-jtiltseries_23.mrcthis will run the full pipeline on that tomogram. Keep an eye out for error messages, they might give you tips for solving them.if everything works, you will now have a few outputs to check out:./waretomo_processing/tiltseries_23.mrc: raw aretomo reconstruction../waretomo_processing/denoised/tiltseries_23.mrc: same as above, denoised with topaz for better annotation<mdoc-dir>/mdoc_tilted/tiltseries_23.mrc.mdoc: mdoc file updated with skipped tilt and with adjusted tilt angles from aretomo'sTiltAlignoption (e.g: to align lamellae to the XY plane)./waretomo_processing/tiltseries_23.xf: alignment metadata, used by warp together with above mdocs for reconstruction.check out the reconstructions and make sure everything looks as you want. If anything is wrong, adjust parameters as you see fit. You can also run only parts of the script by using the--start-fromand--stop-atoptions (both are inclusive). Use-fif you want to overwrite existing outputs.once you're happy, remove the-joption to process the full dataset.At this point, you're ready to go back to Warp. Here, you can simplyimport tilt series from IMOD. Don't forget to provide themdoc_tilteddirectory instead of the original mdocs. Setwaretomo_processingas theRoot folder with IMOD processing results, and Warp will find thexffiles located there. Provide the pixel size of the binned aretomo reconstructions (find out with e.g:header waretomo_processing/tiltseries_23.mrc.mrc). You might have to provide the dose per tilt, depending on the origin/correctness of your mdocs.You can now proceed with reconstructing with Warp, use M, and so on, while having matching AreTomo reconstructions with their local patch alignments and subsequent denoising to maximize readability for picking and annotation.
Package: warfit-learn
Warfit-learnA machine learning toolkit for reproducible research in warfarin dose estimation.Readthe paper on arXivfor free or onScience Directwith your institutional access.ContentsFeaturesInstallationUsageCiting this workFeaturesSeamless loading, cleaning, and preprocessing of the IWPC warfarin dataset.Standardised implementations of scoring functions.Percentage patients within 20% of therapeutic dose (PW20)Mean absolute error (MAE)R2coefficientHybrid scoring functionsConfidence intervalsMultithreaded model evaluation using standardised resampling techniques.Monte-carlo cross validationBootstrap resamplingFull interoperability with NumPy, SciPy, Pandas, Scikit-learn, and MLxtend.Supports Python 3.6+ on macOS, Linux, and Windows.Installationpipinstallwarfit-learnUsageFor a detailed tutorial, see theGetting Starteddocument.Seamless loading and preprocessing of IWPC datasetfromwarfit_learnimportdatasets,preprocessingraw_iwpc=datasets.load_iwpc()data=preprocessing.prepare_iwpc(raw_iwpc)Full scikit-learn interoperabilityfromsklearn.linear_modelimportLinearRegressionfromsklearn.svmimportLinearSVRfromwarfit_learn.estimatorsimportEstimatormy_models=[Estimator(LinearRegression(),'LR'),Estimator(LinearSVR(loss='epsilon_insensitive'),'SVR'),]Seamless, multithreaded researchfromwarfit_learn.evaluationimportevaluate_estimatorsresults=evaluate_estimators(my_models,data,parallelism=0.5,resamples=10,)Citing this workIf you use warfit-learn in a scientific publication, please consider citing the following paper:G. Truda and P. Marais, Evaluating warfarin dosing models on multiple datasets with a novel software framework and evolutionary optimisation,Journal of Biomedical Informatics(2020), doi:https://doi.org/10.1016/j.jbi.2020.103634BibTeX entry:@article{Truda2020warfit,
  title = "Evaluating warfarin dosing models on multiple datasets with a novel software framework and evolutionary optimisation",
  journal = "Journal of Biomedical Informatics",
  pages = "103634",
  year = "2020",
  issn = "1532-0464",
  doi = "https://doi.org/10.1016/j.jbi.2020.103634",
  url = "http://www.sciencedirect.com/science/article/pii/S1532046420302628",
  author = "Gianluca Truda and Patrick Marais",
  keywords = "Warfarin, Machine learning, Genetic programming, Python, Supervised learning, Anticoagulant, Pharmacogenetics, Software",
}CopyrightCopyright (C) 2019 Gianluca TrudaThis program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, seehttps://www.gnu.org/licenses/.
Package: warfle-deploy-cli
OverviewWarfle is an easy-to-use command-line interface for deploying smart contracts without any deep configurations.Important NoteIn the current version,Warfle does not supports the public mainnet or testnet deploymentbut in the further versions, We will add this feature.InstallationInstall from the with thesetupfile of the project:>>> git clone https://www.github.com/egesabanci/warfle>>> cd warfle/
>>> pip install .Example UsageLet's say, we have a following smart contract:// Test.solpragma solidity>=5.0.1;contractTest{stringpublicgreet;functionsetGreet(stringmemorytext)publicreturns(bool){greet=text;returntrue;}functiongreet()publicviewreturns(string){returngreet;}}Step 1:Now, We want to deploy that contract withWarfle. Firstly we need to initializeWarfleto the current working folder:>>> warfle initThis command will create a.warfleconfiguration file to the current path..warflefile contains:{
	"rpc": "http://127.0.0.1:7545",
	"public": <YOUR WALLET PUBLIC KEY>
}Step 2 (Optional):If we want to update the configurations, We can simple use thewarfle updatecommand.Example usage:>>> warfle update KEYkeyargument must berpcorpublic. You can not add any other argument to the.warfleconfiguration file.Step 3:Then, We need to compile our smart contract with thewarfle compilecommand. This command will create a newsourcefolder to the current path../sourcewill contains 2 files:ABI of the contract (*.abi)andBytecode of the contract (*.bin). In our case,./sourcewill contains:Test.abiandTest.bin:Example:>>> warfle compile Test.solStep 4:Now, We are ready to deploy our contract with thewarfle deploycommand:>>> warfle deploy <PATH TO ABI> <PATH TO BIN>In our case:>>> warfle deploy source/Test.abi source/Test.binLicenseMIT© Ege Sabanciegesabanci@outlook.com.tr
Package: warframe-metrics
warframe-metricsAnalysis tool for warframe market.📈 Warframe MetricsWarframe market is an excellent tool for all of us traders. However, what about the metrics that all traders require to make intillegent desicions. This library looks
to extend the possible analysis based on the data provided openly by warframe market.Free software: MIT license📚 DocumentationDocumentation is currently a work in progress.📦 InstallingYou can installwarframe-metricsusing pip::$ pip install warframe-metrics📤 CreditAll credit goes tohttps://warframe.market/and their creators for enabling this project and the data used within it.⚙ UsingComing soon...👷 ContributingContributions are welcome. To learn more, see theContributor Guide.📕 LicenseDistributed under the terms of theMITlicense,warframe-metricsis
free and open source software.💥 IssuesIf you encounter any issues or problems, pleasefile an issuealong
with a detailed description.
Package: warframe.py
An asynchronous and typed Python API wrapper forthe Warframestat APIand (later)the warframe.market API.What to expectThis library is in its early states. The goal is to make it the best and most up-to-date Python Warframe API wrapper.Quickstartimportasyncioimportloggingfromwarframe.worldstateimportWorldstateClient,utils# import the models you want to usefromwarframe.worldstate.modelsimportCetusasyncdefmain():# Note that the default logger is pretty much empty (nothing will be logged)# so if you want to make use of the logger, you can use this helper function:utils.setup_logging(handler=logging.StreamHandler(),level=logging.DEBUG,root=True)asyncwithWorldstateClient()asclient:# get current cetus datacetus=awaitclient.get_cetus()# or... get it like this:# queries are just another way to get the data to the corresponding objects.# this is really just personal preference.cetus=awaitclient.query(Cetus)print(cetus)if__name__=="__main__":loop=asyncio.new_event_loop()loop.run_until_complete(main())InstallingTo install the library, use the following command:pipinstallwarframe.pySupported python versions:3.113.103.9
Package: wargaming
Pure pythonic library for accessing Wargaming.net API (https://wargaming.net/developers/).Compatible with a Python>=2.7 and Python >=3.4 versions. PyPy also!InstallationAs simple as usual:$ pip install wargamingDocumentationWargaming.NET API documentation:https://na.wargaming.net/developers/api_reference/Library documentation:http://python-wargaming.rtfd.orgSupported WGAPIWorld of TanksWorld of WarplanesWorld of WarshipsWorld of Tanks BlitzWargaming.NET common APIContributionJust fork, update and send pull request. Do not forget to run tests:$ toxAlso check for a PEP-0008 compliance:$ pep8 –max-line-length=120 wargamingContributorsmonesterLanceMaverick