Saravanan666/pypi-org huggingface dataset:
Package: ehrapy
ehrapy overviewFeaturesExploratory and targeted analysis of Electronic Health RecordsQuality control & preprocessingVisualization & ExplorationClustering & trajectory inferenceInstallationYou can installehrapyvia [pip] from [PyPI]:$pipinstallehrapyUsagePlease have a look at the [Usage documentation][usage] and the [tutorials][tutorials].importehrapyasepCitationExploratory electronic health record analysis with ehrapy
Lukas Heumos, Philipp Ehmele, Tim Treis, Julius Upmeier zu Belzen, Altana Namsaraeva, Nastassya Horlava, Vladimir A. Shitov, Xinyue Zhang, Luke Zappia, Rainer Knoll, Niklas J. Lang, Leon Hetzel, Isaac Virshup, Lisa Sikkema, Eljas Roellin, Fabiola Curion, Roland Eils, Herbert B. Schiller, Anne Hilgendorff, Fabian J. Theis
medRxiv 2023.12.11.23299816; doi: https://doi.org/10.1101/2023.12.11.23299816.
Package: ehr-functions
EHR-FunctionsWhat is this?A library containing useful EHR related functions for use within Python data analysis, especially within Jupyter notebooks.When utilizing Jupyter notebooks for processing data and training models I found myself copying the same code between notebooks.  This code consisted of steps to split my data, create a model, compute some metrics, etc.; and thus the notebooks became very long with little focus on the actual analysis.  Therefore, this set of functions were created to allow for a focus on analysis and to abstract away the process of cleaning data and running models.Installationpip install ehr-functionsDocumentationThe documentation can be found at:https://fdabek1.github.io/ehr-functions/Examplefromehr_functions.featuresimportdemographicsimportpandasaspddf=pd.DataFrame({'PatientID':[1,2,3,4],'PatientAge':[21,35,27,24],'PatientGender':['M','F','M','F'],'PatientCategory':['A','B','C','A'],})dems=demographics.get_features(df)print(dems.head())PatientIDPatientAgePatientGenderPatientCategory_APatientCategory_BPatientCategory_C1211100235001032710014240100
Package: ehrml
Electronic Medical Record Machine Learning Utilities for using Models
with health data.Configuration:These utilities are very dependent on a particular configuration format.
In python, it is a list of dicts, where each dict represents
configuration for a particular field. The keys in this dict are as
follows:fieldDescriptionindexThe index to write the value (or
in the case of any one-hot field,
to start writing values) in the
numpy array.missing_flag_indexThe index to write a one to if
the data is missing
(pre-imputation) in the numpy
array. Do not set if no such
missing data flag is desired for
this field.rwb_srcThe value used to represent the
value for all observation lists.
Also, the field name associated
with the “flat” data source,
without any time suffix.api_parentThe key in the layered data which
contains relevant data for this
field.api_time_srcWhich field in the layered data
contains a reference to datetime
for this observation.api_srcRegarding the layered data,
either the direct access field
for each item in the list under
api_parent, or the desired value
of api_by.api_byIf a field in layered data is not
direct access, this is the field
under api_parent which contains
the name matching api_src. Do not
set for direct access values.api_fromIf a field in layered data is not
direct access, this is the field
under api_parent which contains
the value. Do not set for direct
access values.transformationThe name of a transformation or
encoding to be executed on this
field.one_hot_valsAn array of values corresponding
to a one hot encoding for this
field. Different for each
encoding, unused for numerical
transformations.meanFor numeric transformations, the
precomputed mean.stdFor numeric transformations, the
precomputed standard deviation.minFor numeric transformations,
replace any value lower than this
value with this value. Also used
in some transformations.maxFor numeric transformations,
replace any value higher than
this value with this value. Also
used in some transformations.DocumentationThis tool uses a few different input and output structures in order to
facilitate computation and analysis. Descriptions of these formats,
along with descriptions of the methods and their inputs are in the
python docstrings for these methods.NoteAt this point, the utilities here may be very specific to a particular
kind of EHR and model.
Package: ehrzero
Info:Zero-Knowledge Risk OracleAuthor:ZeD@UChicago<zed.uchicago.edu>Description:Estimation of the risk of future diagnoses of
neuropsychiatric disorders (particularly autism) in early childhood,
based on the diagnostic codes recorded during
doctor visits. The prediction pipeline is based on
inferring optimal stochastic generators for diagnostic code sequences,
and detecting subtle deviations that drive up risk of
an eventual neuropsychiatric diagnoses. The out-of-sample
AUC score on the Truven dataset of insurance claims
(close to 3 million children in out-of-sample data) is just over 80%,
for both males and females.Usage:from ehrzero import ehrzero as ehr
risks = ehr.predict_with_confidence(source_filepath,out_filepath,
                                    separator=',',delimitor=' ',
                                    n_first_weeks=[week1,week2,..,weekn])Installationpip3 install ehrzero --user --upgradeEHR data formatDiagnostic data stored in text file, one line per patient as follows: patient id, gender and list of space-separated, comma-delineated diagnosis records, all separated by spaces. Each diagnosis record consists of the week since the start of observation, followed by comma and the ICD-9 code of the diagnosis.Example of a diagnostic record for Lorax, male:Lorax,M 5,277.03 10,611.79 18,057.8 58,157.8 78,057.8 108,057.8 128,057.8 148,057.8
<patient_id,gender> <week,code> <week,code> ...Risk Estimation Example As Python ScriptWith properly formatted  patient diagnostic history, we use  functionpredict_with_confidenceand specify the data filepath  and  the weeks of age at which  we want to estimate risk. Optionally, we  may also specify the separator (separating code and week, see example above) and delimitor (separating two code-week pairs, see example above)  for the diganostic records within file (space and comma are default).The predict_with_confidence function returns the predicted risk of autism for each patient for each requested week.from ehrzero import ehrzero as ehr
source = './src.dat'
outfile = './out.dat'
weeks = [100,200]

risks = ehr.predict_with_confidence(source,outfile,
                                    separator=',',delimitor=' ',
                                    n_first_weeks=weeks)Command Line ExecutionA commandline toolzero.pyis included in the package.It is located in the <installation_directory>/ehrzero/example. Typically, the defaultinstallation_directoryshould be~/.local/lib/python3.6/site-packages/Invoking the tool with examples of diagnostic history
included in the package may be done as follows (adjust for correct python version, and installation_directory):cd ~/.local/lib/python3.6/site-packages/ehrzero/example
python zero.py -data tests/exD1.dx  -n 145 148 150 160 165 170 180

A032532061 145 0.015349 0.883183 18.33
A032532061 148 0.017537 1.009113 98.61
A032532061 150 0.019578 1.126543 98.86
A032532061 160 0.014294 0.822491 19.68
A032532061 165 0.019506 1.122396 98.85
A032532061 170 0.039018 2.245151 99.74
A032532061 180 0.057424 3.304231 99.92
Package: ehsm
python-libehsm is a Python wrapper for the ellipticSecure PKCS11 shared libraryNote that while the wrapper does export some PKCS#11 helper
functions it does so only partially - there are other wrappers
available to interface with PKCS#11.The focus of this wrapper is to export the BIP32/Bitcoin specific functions.InstallationDownload and install the native shared library for your platform here:https://ellipticsecure.com/downloads/pip install python-libehsmExampleSigning a transaction hash with a BIP32 (Bitcoin etc.) derived key stored on
a MIRkey or eHSM device:importehsmmirkey=ehsm.load_ehsm()# Get the available device slotsslots=mirkey.enumerate_slots()iflen(slots)>0:# Use the first available slotslot=slots[0]# Initialize the librarymirkey.init()try:session=mirkey.get_logged_in_rw_session(slot,b"testsu")found=mirkey.bip32_has_root_key(session)iffound:hash=bytes(32)# list of integers representing a bip32 path to the derived key## ie. this is "m/0", "m" would be []indexes=[0]sig=mirkey.bip32_sign_data(session,hash,indexes)finally:mirkey.finalize()else:print"No devices found"Please see the test cases for more usage examples.
Package: eht-dmc
# DMC
A radio interferometric modeling tool developed for the Event Horizon Telescope (EHT).  The framework employed here utilizes PyMC3 for sampling and the eht-imaging library for VLBI data manipulation.NOTE: Currently still in testing mode, so no guarantees that code will work at all yet.### Installation instructions
Clone the repository, move into the main directory, and install usingpip:` git clonehttps://github.com/dpesce/DMC.gitcd DMC pip install . `
Package: ehttp-executor
Eugenia's http executorMethod to call http APIInstallationUse pip:pip install ehttp-executorPlease use Python 3.8 and aboveHow to useCreate the input dictionary, then invoke the method with these parameters:HTTP URLProcess nameInput dictionaryExample:from ehttp_executor.ehttp_caller import call_python_api

input_data = {
"status": "Loaded",
"statusCode": 404,
"testDate": "16/07/2030",
"abruptEnd": True,
"logs": [
    "Rodrigo logged in",
    "Henry logged in",
    "Rodrigo logged out",
    "Henry logged out"
],
"developers": [
    {
    "name": "Rodrigo",
    "age": 43,
    "logins": [
        {
        "loginInfo": "Login saturday 5AM"
        },
        {
        "loginInfo": "Logout saturday 8AM"
        }
    ]
    },
    {
    "name": "Henry",
    "age": 46,
    "logins": [
        {
        "loginInfo": "Login thursday 9AM"
        },
        {
        "loginInfo": "Logout monday 11AM"
        }
    ]
    }
]
}
json_output = call_python_api("http://localhost:5000/", "PythonBBasic261020211724", input_data)
print (type(json_output))
print (json_output)
Package: ei
eiAutomatically embed IPython into arbitrary stack frames in traceback.Install# PyPIpip3installei# GitHubpip3installgit+https://github.com.djosix/ei.gitUsageBasic usage:defmain():a=123b=0returna/bif__name__=='__main__':importeiei.patch()# overwrites sys.excepthookmain()Unpatch to recoversys.excepthook:ei.unpatch()Context manager:withei.capture():main()# The exception hook is recovered hereLazy patch:importei.patched
Package: eia
EIAThe client exposes a simple interface to the EIA API.Huge thanks to the EIA for providing this API
Seehttps://www.eia.gov/opendata/documentation.phpfor detailed API documentationInstallationpipinstalleiaExamplesGet information on the available "petroleum" datasets.client.dataset_info("petroleum")Get information on operational and power data, including generation.# Series Info includes data series with specific data elements and facetsoperational=client.series_info("electricity/electric-power-operational-data")operational.dataSee examples in theexampledirectory.Note: the client does not manage rate limits. See theEIA API documentationfor more information on rate limits.
Package: eia-client
EIA Open Data API Python Client PackageThis is an unofficial http client in python for theU.S. Energy Information Administration (EIA) Open Data API. It has minimal functionality and is under development. Please use it at your own risk.The API is vast and the quickest way to get an understanding for the endpoints is to use theonline browser.InstallationYou can install the package from pypi. It is recommended to install it in a virtual environment.$pipinstalleia-clientExampleBelow is a quick example showing how to submit a request to the
"total energy monthly" API endpoint for electricity net generation total
endpoint.importeia_clientasecendpoint=ec.endpoint.TotalEnergy(msn="ELETPUS")client=ec.Client()resp=client.get(endpoint.build())df=ec.parse.as_dataframe(resp)print(df.head())df.to_csv("eia_data.csv")You can view an extended version of this example and others inexamples/Quickstart_tminTutorial.ipynb.API KeyGo to theEIA Open Data API siteand create, then downlaod an API key.The package assumes the API Key for EIA is stored in your home directory as~/.eia.config(text) or an environment
variable called EIA_API_KEY.WARNINGDon't spam the API, there is nothing in the code to protect you from going over any rate limits; save the data and request as you need.Feature pipelineEndpoint query functionality to allow the user to discover endpoints.Walking endpoints without breaching rate limits.Backend adapters.Publish sphinx docs.Add more endpoints.Github workflow.
Package: eia-odin-pkg-rioatmadja2018
# EIA #Python Wheels to interact with the EIA APIs### Download Crude Oil / Petrolium Related Data ###PricesCrude reserves and productionRefining and processingImports/exportsMovementsStocksConsumption/sales### Dependencies ###
* Compatible with Python 3.8 or greater### Developer ###Rio Atmadjaratmadja@my365.bellevue.edu### LICENSE ###MIT LicenseCopyright (c) 2020 ratmadjadsPermission 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: eiapy
eiapyPython 3 wrapper for the U.S. Energy Information Administration API.Quick startpipinstalleiapyGet the last 5 measurements of the electricity flow between California and Mexico.>>>fromeiapyimportSeries>>>cal_to_mex=Series('EBA.CISO-CFE.ID.H')>>>cal_to_mex.last(5){'request':{'command':'series','series_id':'EBA.CISO-CFE.ID.H'},'series':[{'data':[['20180401T07Z',-11],['20180401T06Z',-16],['20180401T05Z',-11],['20180401T04Z',-7],['20180401T03Z',-5]],'description':'Timestamps follow the ISO8601 standard ''(https://en.wikipedia.org/wiki/ISO_8601). Hourly ''representations are provided in Universal Time.','end':'20180401T07Z','f':'H','name':'Actual Net Interchange for California Independent System ''Operator (CISO) to Comision Federal de Electricidad ''(CFE), Hourly','series_id':'EBA.CISO-CFE.ID.H','start':'20150701T00Z','units':'megawatthours','updated':'2018-04-02T08:43:16-0400'}]}Further examples can be foundin this gist.To find more details about the API go to the EIA'sOpen Datapage. To find interesting data (and identifiers)browse the data sets.For specific information about thereal-time grid displayplease seethis guide.Gohereto see the
API terms of service andherefor an explanation of copyright and reuse of their data.Setting up your API keyAn API key is needed to access the EIA's data, you can get onehere. eiapy needs this key to be manually set in the operating system environmental variables.Mac & LinuxOpen a terminal and enter the following;exportEIA_KEY=type_your_api_key_hereTo set it permanently follow the instructions on thisstackexchange question.WindowsOpen a Command Prompt and enter the following;setx EIA_KEY"type_your_api_key_within_the_quotes"Notes on API behaviourWhen providing invalid time limits for a series data request an empty data list is returned.For data requests num & start cannot be used together but num & end can.When an invalid series id is passed this is the response.{'request':{'series_id':'eba.ciso-cfe.id.','command':'series','num':'5'},'data':{'error':'invalid series_id. For key registration, documentation, andexamplesseehttps://www.eia.gov/developer/'}}The API expects timestamps in ISO 8601 format (YYYYMMDDTHHZ) with Z meaning UTC,bad timestampswill not raise errors.Changelog0.1.6Changed URLs to https as http is no longer supported by EIA.Added python 3.9 and 3.10 to classifiers, removed 3.5.0.1.5Added Python 3.8 to supported versions.Updated readme with advice about bad timestamps.Disabled broken Relation class.Made handling of no api key more human friendly.0.1.4Fixed broken Searchrepr.Added Python 3.7 to supported versions.Mention real-time grid in readme.0.1.3Simplify construction and use of the Search class.Explain how to set up the API key.Added gist of examples to readme.0.1.2Rename several methods for extra clarity.data -> get_dataget -> get_updates0.1.1Started using requests session functionality to improve performance.Fixed a mistake in the MultiSeries class that stopped it working entirely.Added a version attribute to the package.Overhaul of readme.
Package: eia-py-api
Python bindings for the Energy Information Administration APIRepo OverviewOur repository consists of two major components: a packageeia-pyand a set of
exploratory data analysis notebooks (EDA).The package can be found undereia.  The package handles data scraping and loading.
Theedadirectory holds all tools required to perform exploratory data analysis.  The
relationship between the two is that the scripts and notebooks inedarely on the
package ineia.Plan of Actionwrite methods to scrape data from the API and serializewrite github action to automate thiswrite way to load data to numpy array/pandasDevelopment SetupTo get started working on the repository, please clone the repo:git clone https://github.com/lukewood/eia-pyThen install the repo:cd eia-py
python setup.py developThis will link the package.  To test that your installation works, run the following
in a python interpreted of your choice:import eiaThen, you need to export an environment variable for the API key:export EIA_API_KEY="{your-key}"Commits and Pull RequestsTo make our development process streamlined and minimize conflicts we are doing all
development via pull requests.Please send all code updates via pull request on GitHubThe process to do so is documented here:Please create a branch:git checkout -b mybranchMake a change:echo 'hello_world = "123"' >> eia/test.pyFormat the code:./shell/format.shNext, make a commit:git add .
git commit -m "Made some changes"Push your changes to GitHub:git push origin mybranchFinally, go to the GitHub Repo URL,https://lukewood/eia-py, and create a pull request
from your branch.
Make sure everything looks good, and request a review.  Then we can merge it.
Package: eiBill-hieukien
SmartDoc - OCR and Extract Informations Vietnanese DocumentsOCR&EI VBHC - Số hoá và Rút trích thông tin Văn bản hành chínhOCR&EI CMND - Số hoá và Rút trích thông tin Chứng minh Nhân dânOCR&EI Hoá đơn - Số hoá và Rút trích thông tin Hoá đơn
Package: eichhoernchen
EichhörnchenLightweight curses-based time tracking tool.Table of contentsTable of contentsFeaturesInstallationConfigurationUsageFeaturesstart and stop tasksadd new tasksedit or remove existing taskslist taskssum up run timesshow summaryexport tasks to CSV or JSONAlso,curses-based user interfacestandard library onlyInstallationTo install Eichhörnchen usingpiprun the following command:pipinstalleichhoernchenConfigurationThe default location of the configuration file is~/.config/eichhoernchen.ini. An alternate configuration
file can be specified using the-c, --configargument.Minimal configurationThe configuration file is an INI file and has to contain
at least the following section:[database]dbname=eichhoernchen.dbpath=/home/user/.local/shareThedbnamespecifies the name of the SQLite3 database, andpathits path.AliasesTo define aliases for the commands, add thealiasessection
to define one or more aliases per command:[aliases]list=["ls"]remove=["rm", "rem"]Usageusage:eichhoernchen[-h][-cCONFIG][--version]Lightweightcurses-basedtimetrackingtool.

optionalarguments:-h,--helpshowthishelpmessageandexit-cCONFIG,--configCONFIGusethisconfigurationfile--versionshowprogram'sversionnumberandexitWhen inside the program use thehelpor?commands to list
available commands orhelp commandto show the command's
help message.Use Control+D to close windows and abort operations. Control+C will
exit the program.
Package: ei-cli
A[ei]WS CLIAWS CLI for humans.InstallationInstall viapypipipinstallei-cliInstall via githubpipinstallgit+https://github.com/ashon/eiConfiguration# set environment variables# comma seperated account idsEI_ACCOUNT_IDS='000000000000,111111111111'# comma seperated region listEI_REGIONS='ap-northeast-1,ap-northeast-2,ca-central-1,eu-west-2'# sts assume role pattern for cross accountEI_ASSUME_ROLE_ARN_PATTERN='arn:aws:iam::{account_id}:role/my-awesome-role'EI_ASSUME_ROLE_SESSION_NAME='AssumeRoleEi'# use aws-vault for resolve aws environment varsAWS_REGION=NoneAWS_ACCESS_KEY_ID=NoneAWS_SECRET_ACCESS_KEY=NoneAWS_SECURITY_TOKEN=NoneAWS_SESSION_EXPIRATION=NoneRunUsing aws-vault for cross account, region resource retrieving.# list vpcs across all regions, and all accounts ($EI_REGIONS, $EI_ACCOUNT_IDS)
$ aws-vault exec {aws-vault-profile} -- ei ec2 vpc list --all-regions --all-accounts

# same as ec2
$ aws-vault exec {aws-vault-profile} -- ei ec2 instance list --all-regions --all-accounts

...DevelopmentThis project controlled byHatch.$pipinstallhatch# install package as editable mode$pipinstall-e.# testing commands$hatchrunlint
$hatchruntest$hatchruntypecheck
Package: eida-embargo-roller
#+TITLE: EIDA embargo roller* DescriptionThis program takes a stationXML file in input and updates channels epochs to reflect the embargo start date specified.1. If the channel epoch ends before embargo, it does not do anything2. If the channel epoch ends after embargo:- if the channel epoch starts before embargo and the restiction policy is closed then the epoch is split at the embargo date.1. The epoch's restriction policy before the embargo is forced to be open2. The other epoch's restiction policy is left closed* Usage#+begin_exampleeida_embargo_roller [-i] [-d YYYY-MM-DD] station.xml-i      transform stationXML file provided in place-d      embargo start date. All channels before this date will get unrestricted policy#+end_example* ExamplesWriting a new XML file  for an embargo starting 2 years from now, on the 1 of january:: eida_embargo_roller Z3.A190A.xml > result.xmlChanging an existing XML file:: eida_embargo_roller -i Z3.A190A.xmlUsing standard input :: wget -qO- "ws.resif.fr/fdsnws/station/1/query?net=Z3&level=channel&sta=A190A" | eida_embargo_roller - > result.xml* InstallationAs a python package:: python -m pip install --user eida_embargo_rollerFrom sources:#+begin_examplegit clonecd eida_embargo_rollerpyhton3 -m venv venvsource venv/bin/activatepip install -r requirements.txtpip install .#+end_example