Saravanan666/pypi-org huggingface dataset:
Package: zensols.amrspring
A Spring AMR service and clientA client and server that generates AMR graphs from natural language sentences.
This repository has a Docker that compiles the [AMR SPRING parser] using the
original settings of the authors.The Docker image was created because this parser has a very particular set of
Python dependencies that do not compile under some platforms.  Specificallytokenizers==0.7.0fails to compile from source on apipinstall because of
a Rust (version) compiler misconfiguration.TheDocker imageprovides a very simple service written in [Flask]
that uses the SPRING model for inferencing and returns the parsed AMRs.Features:Parse natural language sentence (batched) into AMRs.Results cached in memory or an SQLite database.Both a command line and Pythonic object oriented client API.InstallingFirst install the client:pip3installzensols.amrspringServerThere is a script to build a local server, but there is also a docker image.To build a local server:Clone this repo:git clone https://github.com/plandes/amrspringWorking directory:cd amrspringBuild out the server:src/bin/build-server.sh <python installation directory>Start it( cd server ; ./serverctl start )Test it( cd server ; ./serverctl test-server )Stop it( cd server ; ./serverctl top )DockerTo build the Docker image:Download the model(s) from the [AMR SPRING parser] repository.Build the image:cd docker ; make buildCheck for errors.Start the image:make upTest using a method fromusage.Of course, the server code can be run without docker by cloning the [AMR SPRING
parser] repository and adding theserver code.  See theDockerfilefor more information on how to do that.UsageThe package can be used from the command line or directly via a Python API.You can use a combination UNIX tools toPOSTdirectly to it:wget-q-O---post-data='{"sents": ["Obama was the 44th president."]}'\--header='Content-Type:application/json'\'http://localhost:8080/parse'|jq-r'.amrs."0"."graph"'# ::snt Obama was the 44th president.(z0/person:ord(z1/ordinal-entity:value44):ARG0-of(z2/have-org-role-91:ARG2(z3/president)):domain(z4/person:name(z5/name:op1"Obama")))It also offers a command line:$amrspring--levelwarnparse'Obama was the president.'sent:Obamawasthepresident.
graph:# ::snt Obama was the president.(z0/person:ARG0-of(z1/have-org-role-91:ARG2(z2/president)):domain(z3/person:name(z4/name:op1"Obama")))The Python API is very straight forward as well:>>>fromzensols.amrspringimportAmrPrediction,ApplicationFactory>>>client=ApplicationFactory.get_client()>>>pred=tuple(client.parse(['Obama was the president.']))[0]2024-02-1919:41:03,659parsed1sentencesin3ms>>>print(pred.graph)# ::snt Obama was the president.(z0/person:ARG0-of(z1/have-org-role-91:ARG2(z2/president)):domain(z3/person:name(z4/name:op1"Obama")))DocumentationSee thefull documentation.
TheAPI referenceis also
available.ChangelogAn extensive changelog is availablehere.CommunityPlease star this repository and let me know how and where you use this API.
Contributions as pull requests, feedback and any input is welcome.LicenseMIT LicenseCopyright (c) 2024 Paul Landes[AMR SPRING parser]: git clonehttps://github.com/SapienzaNLP/spring
Package: zensols.cnndmdb
CNN/DailyMail Dataset as SQLiteCreates a SQLite database if the CNN and DailyMail summarization dataset.DocumentationSee thefull documentation.
TheAPI referenceis also
available.ObtainingThe easiest way to install the command line program is via thepipinstaller:pip3installzensols.cnndmdbBinaries are also available onpypi.UsageFirst create the SQLite database file:cnndmdb loadand check to make sure
the filedata/cnn.sqlite3was created.  This takes a while since the entire
corpus is first downloaded and then inserted into the SQLite file.Command LineThe SQLite database keys can be given:cnndmdbkeysThen the command line can also be used to print articles:cnndmdbshow-torg3b07f5102c69e3e609d73b2ccb0dc5549d4fbaf6The-t orgtells it to use the original corpus keys.  This option also allows
for selected SQLiterowidkeys or a Kth smallest article.APIThe corpus objects are accessible as mapped Python objects.  For example:corpus:Corpus=ApplicationFactory.get_corpus()art:Article=next(iter(corpus.stash.values()))print(art.text)Data SourceThe data is sourced from aTensorflow dataset, which in turn uses theAbigail See GitHubrepository.@article{DBLP:journals/corr/SeeLM17,author={Abigail See andPeter J. Liu andChristopher D. Manning},title={Get To The Point: Summarization with Pointer-Generator Networks},journal={CoRR},volume={abs/1704.04368},year={2017},url={http://arxiv.org/abs/1704.04368},archivePrefix={arXiv},eprint={1704.04368},timestamp={Mon, 13 Aug 2018 16:46:08 +0200},biburl={https://dblp.org/rec/bib/journals/corr/SeeLM17},bibsource={dblp computer science bibliography, https://dblp.org}}@inproceedings{hermann2015teaching,title={Teaching machines to read and comprehend},author={Hermann, Karl Moritz and Kocisky, Tomas and Grefenstette, Edward and Espeholt, Lasse and Kay, Will and Suleyman, Mustafa and Blunsom, Phil},booktitle={Advances in neural information processing systems},pages={1693--1701},year={2015}}ChangelogAn extensive changelog is availablehere.LicenseMIT LicenseCopyright (c) 2023 Paul Landes
Package: zensols.dbpg
A PostgreSQL implementation of the dbutil libraryAPostgreSQLimplementation of thedbutillibrary.DocumentationSee thefull documentation.
TheAPI referenceis also
available.ObtainingThe easist way to install the command line program is via thepipinstaller:pip3installzensols.dbutilpgBinaries are also available onpypi.On macOS, usemake macosdep.ChangelogAn extensive changelog is availablehere.CommunityPlease star this repository and let me know how and where you use this API.
Contributions as pull requests, feedback and any input is welcome.LicenseMIT LicenseCopyright (c) 2020 - 2023 Paul Landes
Package: zensols.dltools
General deep learning toolsGeneral deep learing utility library.  It contains a utilities I used in my own
research that have some intersection with:Convolution layer dimensionality calculationPyTorchconvolution factoryUnrelated (to deep learning) plotting utilities.ObtainingThe easist way to install the command line program is via thepipinstaller:pip3installzensols.dltoolsBinaries are also available onpypi.ChangelogAn extensive changelog is availablehere.LicenseCopyright (c) 2019 Paul LandesPermission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: zensols.dsprov
Provenience of discharge summaries Pythonic accessThis library provides integrated MIMIC-III with discharge summary provenance of
data annotations and Pythonic classes.DocumentationSee thefull documentation.
TheAPI referenceis also
available.ObtainingThe easiest way to install the command line program is via thepipinstaller:pip3install--use-deprecated=legacy-resolverzensols.dsprovBinaries are also available onpypi.UsageThe package includes a command line interface, which is probably most useful by
dumping selected admission annotations.Command line# help$dsprov-h# get two admission IDs (hadm_id)$dsprovids-l2# print out two admissions$dsprovshow-l2# print out admissions 139676$dsprovshow-d139676# output the JSON of two admissions with indent 4$dsprovshow-i4-fjson-d$(dsprovids-l2|awk'{print $1}'|paste-s-d,-)APIThe package can be used directly in your research to provide Python object
oriented access to the annotations:>>>fromzensols.nlpimportFeatureDocument>>>fromzensols.dsprovimportApplicationFactory,AdmissionMatch>>>stash=ApplicationFactory.get_stash()>>>am:AdmissionMatch=next(iter(stash.values()))>>>doc:FeatureDocument=am.note_matches[0].discharge_summary.note.doc>>>print(f'hadm:{am.hadm_id}')>>>print(f'sentences:{len(doc.sents)}')>>>print(f'tokens:{doc.token_len}')>>>print(f'entities:{doc.entities}')hadm:120334sentences:46tokens:1039entities:(<Admission>,<Date>,<Discharge>,<Date>,<DateofBirth>,<Sex>,...)ChangelogAn extensive changelog is availablehere.LicenseMIT LicenseCopyright (c) 2023 Paul Landes
Package: zensols.hostcon
Simple program to connect to servers from a list.This is a simple program to load servers from a file, list them, then allow you to login, SSH mount, etc.Features provided by a terse command line syntax:Login using a terminal instance on the command line via SSH.Invoke an xterm on a configured host.Mount and unmount aSSH Fusedirectory.Invoke aEmacssession via SSH.Print environment in abashexportformat for scripting.Output a bourne shell script that does what the script would do for a
particular environment (per-noption).Other commands are easily configurable incli.py.ObtainingThe easist way to install the command line program is via thepipinstaller:pipinstallzensols.hostconBinaries are also available onpypi.UsageFirst, create a configuration file.  Examples used by the test cases are
givenhere.  Below is a simple example that declares an SSH
hostjoveon the (default) port 22 withSSH Fusemount options convenient for
a MacOS client.[default]host_name=jovessh_port=22ssh_switches=-X -Ymount_options=reconnect,sshfs_sync,no_readahead,sync_read,cache=no,noreadahead,noubc,noappledouble,noapplexattrSave this example to~/.hostconrcor anywhere else specified in environment
variableHOSTCONRC.  Now we can get include this as environment:$hostconenvexportDOMAIN=NoneexportHOST_NAME=joveexportSSH_PORT=22exportUSER_NAME=someuserStart an XTerm on the host:$hostcon
invokingssh-X-Y-f-p22someuser@jove/usr/bin/xtermSee thetest casesfor more examples of how to
configure andaliashost information.HelpThe usage is given with-h:$hostcon-hUsage:hostcon<list|...>[options]Options:--version             show program's version number and exit-h,--help            show this help message and exit-s,--short           short output for list-wNUMBER,--whine=NUMBERaddverbositytologging-nHOST_NAME,--hostname=HOST_NAMEthehosttoconnectto-d,--dryrun          dry run to not actually connect, but act like itChangelogAn extensive changelog is availablehere.LicenseCopyright © 2018 Paul LandesApache License version 2.0Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Package: zensols.medcat
Medicaloncept Annotation ToolMedCAT can be used to extract information from Electronic Health Records (EHRs) and link it to biomedical ontologies like SNOMED-CT and UMLS. Paper onarXiv.Official DocshereDiscussion ForumdiscourseNewsNew Downloader [15. March 2022]: You can nowdownloadthe latest SNOMED-CT and UMLS model packs via UMLS user authentication.New Feature and Tutorial [7. December 2021]:Exploring Electronic Health Records with MedCAT and Neo4jNew Minor Release [20. October 2021]Introducing model packs, new faster multiprocessing for large datasets (100M+ documents) and improved MetaCAT.New Release [1. August 2021]: Upgraded MedCAT to use spaCy v3, new scispaCy models have to be downloaded - all old CDBs (compatble with MedCAT v1) will work without any changes.New Feature and Tutorial [8. July 2021]:Integrating 🤗 Transformers with MedCAT for biomedical NER+LGeneral [1. April 2021]: MedCAT is upgraded to v1, unforunately this introduces breaking changes with older models (MedCAT v0.4),
as well as potential problems with all code that used the MedCAT package. MedCAT v0.4 is available on the legacy
branch and will still be supported until 1. July 2021
(with respect to potential bug fixes), after it will still be available but not updated anymore.Paper:What’s in a Summary? Laying the Groundwork for Advances in Hospital-Course Summarization(more...)DemoA demo application is available atMedCAT. This was trained on MIMIC-III and all of SNOMED-CT.TutorialsA guide on how to use MedCAT is available atMedCAT Tutorials. Read more about MedCAT onTowards Data Science.Available ModelsAvailable modelshereAcknowledgementsEntity extraction was trained onMedMentionsIn total it has ~ 35K entites from UMLSThe vocabulary was compiled fromWiktionaryIn total ~ 800K unique wordsPowered ByA big thank you goes tospaCyandHugging Face- who made life a million times easier.Citation@ARTICLE{Kraljevic2021-ln,
  title="Multi-domain clinical natural language processing with {MedCAT}: The Medical Concept Annotation Toolkit",
  author="Kraljevic, Zeljko and Searle, Thomas and Shek, Anthony and Roguski, Lukasz and Noor, Kawsar and Bean, Daniel and Mascio, Aurelie and Zhu, Leilei and Folarin, Amos A and Roberts, Angus and Bendayan, Rebecca and Richardson, Mark P and Stewart, Robert and Shah, Anoop D and Wong, Wai Keong and Ibrahim, Zina and Teo, James T and Dobson, Richard J B",
  journal="Artif. Intell. Med.",
  volume=117,
  pages="102083",
  month=jul,
  year=2021,
  issn="0933-3657",
  doi="10.1016/j.artmed.2021.102083"
}
Package: zensols.pybuild
Inspect and iterate on git tags and invoke setup utilsInspect and iterate on git tags.  This manages tags in a git repository and
invokes setup utils.  This is used in thezen build setupas well.DocumentationSee thefull documentation.ObtainingThe easist way to install the command line program is via thepipinstaller:pipinstallzensols.pybuildBinaries are also available onpypi.UsageSee thezotsite setup.pyfile for an example of how to use it as in setup
tools.ChangelogAn extensive changelog is availablehere.LicenseMIT LicenseCopyright (c) 2018 - 2020 Paul Landes
Package: zensols.rend
Invoke native applications to view filesInvoke native applications to view and render data from files.Features:UsesDashto render Excel, CSV and TSV files.Render PDF and HTML in the default web browser.Features on macOS:Default web browser used for HTML,Preview.appused for PDF files.Resize the window and a per display basis.Go to a specified page inPreview.app.Multiple file rendering in browser tabs.The features on macOS areneeded for other operating systems.UsageCreate aconfiguration filewith the dimensions of each of the screens you
work with and where you wantPreview.appto be displayed.  You can validate
these configurations by having the application echo them back at you:$rendconfigCommand LineInvoke the application to show the file and display it:$rendexample.pdfSee theconfiguration fileexample.From PythonThe package is designed to be easy invoke from Python as well (note the
parenthesis needed to make the instance):fromzensols.rendimportApplicationFactoryif(__name__=='__main__'):app=ApplicationFactory().get_instance()app('test-resources/sample.pdf')PandasDataFrames can be rendered using the browser API (note the lack of
parenthesis as it is called as a class method):fromzensols.rendimportBrowserManager,ApplicationFactoryimportpandasaspdif(__name__=='__main__'):mng:BrowserManager=ApplicationFactory.get_browser_manager()url='https://raw.githubusercontent.com/scpike/us-state-county-zip/master/geo-data.csv'df=pd.read_csv(url)mng.show(df)ObtainingThe easiest way to install the command line program is via thepipinstaller:pip3installzensols.rendBinaries are also available onpypi.DocumentationSee thefull documentation.
TheAPI referenceis also
available.ContributingCurrently the more advanced features are only available on macOS.  However, the
API is written to easily add other operating systems as plugins.  If you would
like to write one for other operating systems, please contact and/or submit a
pull request.ChangelogAn extensive changelog is availablehere.CommunityPlease star this repository and let me know how and where you use this API.
Contributions as pull requests, feedback and any input is welcome.LicenseMIT LicenseCopyright (c) 2022 - 2023 Paul Landes
Package: zensols.showfile
Invoke native applications to view filesInvoke native applications to view files.  On macOS, the default web browser
and Preview.app are used to view HTML and PDF files respectively.  On all other
operating systems the default web browser is used to view files.UsageCreate aconfiguration filewith the dimensions of each of the screens you
work with and where you want Preview.app to be displayed.  You can validate
these configurations by having the application echo them back at you:$showfileconfigCommand LineInvoke the application to show the file and display it:$showfileshowexample.pdfSee theconfiguration fileexample.From PythonThe package is designed to be easy invoke from Python as well:fromzensols.showfileimportApplicationFactoryapp=ApplicationFactory().get_instance()app('test-resources/showfile.conf')ObtainingThe easiest way to install the command line program is via thepipinstaller:pip3installzensols.showfileBinaries are also available onpypi.DocumentationSee thefull documentation.
TheAPI referenceis also
available.ChangelogAn extensive changelog is availablehere.LicenseMIT LicenseCopyright (c) 2022 Paul Landes
Package: zensvi
ZenSVIThis package handles downloading, cleaning, analyzing street view imageryInstallation$pipinstallzensviUsageTODOContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.Licensezensviwas created by koito19960406. It is licensed under the terms of the MIT license.Creditszensviwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: zentropi
Zentropi Agent Framework: Script Your WorldFree software: BSD 3-Clause LicenseInstallationpip install zentropiYou can also install the in-development version with:pip install https://github.com/zentropi/python-zentropi/archive/master.zipDocumentationhttps://zentropi.readthedocs.io/DevelopmentTo run the all tests run:toxNote, to combine the coverage data from all the tox environments run:Windowsset PYTEST_ADDOPTS=--cov-append
toxOtherPYTEST_ADDOPTS=--cov-append toxChangelog2020.0.1 (2020-03-06)First release on PyPI.
Package: zentuxlog-client
UtilisationDans un script, une classe, un module, ...fromzentuxlog_client.clientimportClientAPIKEY="hkhfds56dfsdfjhdjk"APISECRET="KAP0dika43iH7"USERNAME="John"PASSWORD="Mypassauth={'client_id':APIKEY,'client_secret':APISECRET,'username':USERNAME,'password':PASSWORD}c=Client(auth=auth)c.send(data="information à logguer",method="POST",path="logs/")Dans une exception personnaliséefromzentuxlog_client.clientimportClientAPIKEY="hkhfds56dfsdfjhdjk"APISECRET="KAP0dika43iH7"USERNAME="John"PASSWORD="Mypass"auth={'client_id':APIKEY,'client_secret':APISECRET,'username':USERNAME,'password':PASSWORD}c=Client(auth=auth)classMyCustomError(Exception):"""Erreur générique."""def__init__(self,msg=''):self.msg=msgifmsg:c.send(msg,method="POST",path="logs/")def__str__(self):returnself.msg
Package: zen-util
Zen UtilitiesHelpful utility functions/decorators.@handle_pluralThis decorator is designed to be added to functions, automatically expands pased dicts/lists into the function it wraps.This function does not return values for most operations, it is designed to be used within a class where the wrapped function sets class attributes.NoDupFlatListEssentially a dumb set, but is a list so is orderedpretty_printA function designed to print complex data structures in a nice mannerreplace_file_lineReplaces a line in a filedef replace_file_line(file_path, old_line, new_line):update_initUsed by@add_thread, appends the passed function to the init of a class.walk_dictTakes two dicts as args, walks the first dict using the structure of the second dict.
Iffail_safeis set, returns none when keys can't be found.check_dictThis decorator can be added to a function to check for the presence or lack of a dict item.By default, it will print an error message, but will use self.logger if it exists in the class whose method is decorated.
This logger will be created automatically if the clsss is wrapped with @loggify.The first arg (key) is required. Thevalidate_dictarg is initially unset, and allows the dict which is being checked to be changed.Ifkeyis a dict, the structure will be used to walk thevalidate_dict.The decorator will read args[0] at runtime, and if this is a dict, it will use that ifvalidate_dictis not set.
Functionally, this readsselfand allows this decorator to be used to check for dict items within a class with a__dict__value_argDefines the value to compare found keys against.containsIs a boolean that enables checking for thevalue_argas the name of a key invalidate_dict.unsetIs a boolean used to make validation pass if thekeyis not found.raise_exceptionCauses a ValueError to be rasied instead of printing an error message.log_level(10) Defines the log level to send the message to.return_val(False) Defines the default return value to use when validation fails.return_argReturn this argument (by number) when validation fails.messageSet the vailidation failure message.Additional arguments exist to set a value to compare found keys against
Package: zepben.auth
Zepben Auth LibraryThis library provides Authentication mechanisms for Zepben SDKs used with Energy Workbench and other Zepben services.Typically this library will be used by the SDKs to plug into connection mechanisms. It is unlikely that end users will
need to use this library directly.Usagefromzepben.auth.clientimportcreate_token_fetcherauthenticator=create_token_fetcher("https://localhost/auth")authenticator.token_request_data.update({{"grant_type":"password","username":"<username>","password":"<password>","scope":"offline_access openid profile email","client_id":"<client_id>"}})authenticator.refresh_request_data.update({"grant_type":"refresh_token","scope":"offline_access openid profile email","client_id":"<client_id>"})token=authenticator.fetch_token()
Package: zepben.cimbend
Zepben Evolve Python SDKThe Python Evolve SDK contains everything necessary to communicate with aZepben EWB Server. See thearchitecturedocumentation for more details.ote this project is still a work in progress and unstable, and breaking changes may occur prior to 1.0.0.RequirementsPython 3.7 or laterpycryptodome, which requires a C/C++ compiler to be installed.
On Linux, python headers (typicallypython-dev) is also necessary to build pycryptodome.On Windows systems:Download and runBuild Tools for Visual Studio 2019When in the installer, select and install:C++ build toolsWindows 10 SDKThe latest version of MSVC v142 x64/x86 build tools.After this you should be able topip install zepben.cimbendwithout issues.Installationpip install zepben.cimbendBuildingpython setup.py bdist_wheelDevelopingThis library depends on protobuf and gRPC for messaging. To set up for developing against this library, clone it first:git clone https://github.com/zepben/evolve-sdk-python.gitInstall as an editable install. It's recommended to install in aPython virtualenvcd evolve-sdk-python
pip install -e .[test]Run the tests:python -m pytest