Saravanan666/pypi-org huggingface dataset:
Package: bmi-python
Python wrapper for BMI modelsThis is ctypes wrapper for BMI models.TheBMIdescribes a low level interface for numerical models.OriginThis module is based on code from:CSMDS:https://csdms.colorado.edu/svn/bmi/trunk/python/bmi/BMI.pyOpenEarth:http://svn.oss.deltares.nl/repos/openearthtools/trunk/python/OpenEarthTools3Di:https://github.com/nens/python-subgridModelsSeveral models implement theBMIinterface.Subgrid:https://github.com/nens/python-subgridSwan:https://github.com/SiggyF/chenopisXBeach:http://svn.oss.deltares.nl/repos/xbeachDFlow-FM:https://repos.deltares.nl/repos/ds/trunk/additional/unstruc/python/dflowfmPrerequisitesWe need a compiled BMI library (dll, so, dylib). There are a couple of common
locations where we look for it.:.
~/local/lib
~/.local/lib
/opt/modelname/lib
/usr/local/lib
/usr/libA convention on linux is to install the library into/opt/modelname/.
If you are using one of the models above, the modelname will be  3di, dflowfm, xbeach or swanIn case you have an alternative location, you can set theLD_LIBRARY_PATH, (DYLD_LIBRARY_PATHin OSX,PATHin windows)
environment variable, for example for 3Di:$ export LD_LIBRARY_PATH=/home/user/svn/3di/trunk/subgridf90/src/.libs(On windows the command issetinstead ofexport).SetupThe virtualenv way (assumes virtualenvwrapper and virtualenv are installed):mkvirtualenv main
workon main
# get the version from pypi
pip install bmi-python
# or if you want to add your source directory to the path
pip install -e .Combination Windows and Anaconda:- Download + Install Anaconda
- Download and install the :faulthandler: package, from http://www.lfd.uci.edu/~gohlke/pythonlibs/#faulthandler
- Download and install the :NetCDF4: package, from http://www.lfd.uci.edu/~gohlke/pythonlibs/#netcdf4
- Open an (Anaconda) Python-terminal (Press :[Ctrl]:+:[Alt]+:A:).
- pip.bat install -e ``<path to your bmi-python GIT working copy>``UsageThere are two ways to use the wrapper. A handy way is as a context
manager, so with awithstatement:with BMIWrapper(engine="model", configfile='/full/path/model.ini') as model:
    # model is the actual library.
    model.something()The second way is by callingstartandstopyourself and
using thelibraryattribute to access the Fortran library:wrapper = BMIWrapper(engine="model", configfile='/full/path/model.mdu')
wrapper.start()
wrapper.library.something()
...
wrapper.stop()Note: Without themduargument, no model is loaded and you’re free to
use the library as you want.Convenience scriptsThe python bmi library contains a script that can be used as a command line runner for your model:bmi-runner <engine> <configfile>LinksCreditsFedor BaartGena DonchytsJack HaStef HummelScott PeckhamReinout van ReesSander SmitsChangelog of bmi-python2014-02-07allow relative path for config_filefix exception when unicode is used as variable names0.1 (2014-04-01)Split of code from python-subgrid and openearthtools in general BMI wrapper.
Package: bmi-tester
bmi-testerAboutThebmi-testeris a command-line utility and Python library for testing
Basic Model Interface (BMI) implementations.RequirementsThebmi-testerrequires Python 3. Additional dependencies can be found
in the project'srequirements.txtfile and can be installed using eitherpiporconda.In addition to these requirements, thebmi-testeralso requires thegimli.unitspackage, which is a Python interface to theudunits2C library, which is not available throughpipbut can be installed
usingconda.If you are a developer of thebmi-testeryou will also want to install
additional dependencies for running the project's tests to make sure
that things are working as they should. These dependencies are listed
inrequirements-testing.txtand can all be install with eitherpiporconda.InstallationTo install, first create a new environment in which the project will be
installed. This, although not necessary, will isolate the installation
so that there won't be conflicts with your basePythoninstallation.
This can be done withcondaas,condacreate-nbmi-testerpython=3condaactivatebmi-testerStable ReleaseThebmi-tester, and its dependencies, can most easily be installed
withconda,condainstallbmi-tester-cconda-forgeFrom SourceAfter downloading thebmi-testersource code, run the following from
the project's top-level folder (the one that containspyproject.toml) to
install into the current environment,pipinstall-e.UsageYou can access thebmi-testerfrom the command line with thebmi-testcommand. Use the--helpoption to get a brief description of the
command line arguments,bmi-test--helpThebmi-testcommand takes a single argument, the name of the entry point
of the class that implements the BMI you would like to test. To demonstrate
how this works, we will use theHydrotrendmodel as an example. To install
the Python BMI forHydrotrend, useconda,condainstallpymt_hydrotrend-cconda-forgeOnce installed, the following will test the BMI implementation for theHydrotrendclass,bmi-testpymt_hydrotrend:HydrotrendThe entry point is given as<model>:<class>. That is, in Python you would
import theHydrotrendclass as,>>>frompymt_hydrotrendimportHydrotrendLinksSource code: Thebmi-testersource code repository.Documentation: User
documentation forbmi-testerGet:
Installation instructions
Package: bmiviz
BMI-visualisationbmiviz is a tool that visualize transition and composition ratio of adults' BMI (body mess index) in each country.It scrapes the following CSV file (9.3 MB) to obtain BMI data.https://ncdrisc.org/downloads/bmi/NCD_RisC_Lancet_2017_BMI_age_standardised_country.csvHow to install bmivizInstall bmiviz$ pip install bmivizHow to run bmivizVisualize BMI data$ bmiviz JapanShow available countries$ bmiviz
Package: bmkg
bmkgUnofficial Python wrapper for theBMKG (Meteorology, Climatology, and Geophysical Agency)API.Installation$pipinstallbmkgExamplesFetching the weather of a specific province# import the moduleimportbmkgimportasyncioimportosasyncdefgetweather():# declare the client. the measuring unit used defaults to the metric system (celcius, km/h, etc.)asyncwithbmkg.Client(unit=bmkg.IMPERIAL)asclient:# fetch a weather forecast from a provinceweather=awaitclient.get_forecast(bmkg.Province.JAKARTA)# get the weather forecast across various locationsforforecastinweather.forecasts:# temperature of this forecast across various timeframesfortempinweather.temperature:print(f'temperature at{temp.date!r}is{temp.value!r}')if__name__=='__main__':# see https://stackoverflow.com/questions/45600579/asyncio-event-loop-is-closed-when-getting-loop# for more detailsifos.name=='nt':asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())asyncio.run(getweather())Fetching the latest earthquake# import the moduleimportbmkgimportasyncioimportosasyncdefgetweather():# declare the client. the measuring unit used defaults to the metric system (celcius, km/h, etc.)asyncwithbmkg.Client(unit=bmkg.IMPERIAL)asclient:# fetch the latest earthquakeearthquake=awaitclient.get_latest_earthquake()print(repr(earthquake))if__name__=='__main__':# see https://stackoverflow.com/questions/45600579/asyncio-event-loop-is-closed-when-getting-loop# for more detailsifos.name=='nt':asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())asyncio.run(getweather())Fetching the most recent earthquakes magnitude 5 or higher# import the moduleimportbmkgimportasyncioimportosasyncdefgetweather():# declare the client. the measuring unit used defaults to the metric system (celcius, km/h, etc.)asyncwithbmkg.Client(unit=bmkg.IMPERIAL)asclient:# fetch the most recent earthquakes magnitude 5 or higherearthquakes=awaitclient.get_recent_earthquakes()# iterate through the generatorforearthquakeinearthquakes:print(repr(earthquake))if__name__=='__main__':# see https://stackoverflow.com/questions/45600579/asyncio-event-loop-is-closed-when-getting-loop# for more detailsifos.name=='nt':asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())asyncio.run(getweather())Fetching the most recent earthquakes regardless of their magnitude# import the moduleimportbmkgimportasyncioimportosasyncdefgetweather():# declare the client. the measuring unit used defaults to the metric system (celcius, km/h, etc.)asyncwithbmkg.Client(unit=bmkg.IMPERIAL)asclient:# fetch the most recent earthquakes regardless of their magnitudeearthquakes=awaitclient.get_felt_earthquakes()# iterate through the generatorforearthquakeinearthquakes:print(repr(earthquake))if__name__=='__main__':# see https://stackoverflow.com/questions/45600579/asyncio-event-loop-is-closed-when-getting-loop# for more detailsifos.name=='nt':asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())asyncio.run(getweather())
Package: bmkg-gempa
bmkg-gempaPustaka Python untuk konversi data gempa bumi yang bersumber dariBMKG (Badan Meteorologi, Klimatologi, dan Geofisika)dari XML ke JSON.Instalasipip3installbmkg-gempaContoh ProgramGempa Bumi M 5.0+ TerkinifrombmkgimportGempagempa=Gempa()print(gempa.m_5_terkini())60 Gempa Bumi M 5.0+frombmkgimportGempagempa=Gempa()print(gempa.m_5())20 Gempa Bumi DirasakanfrombmkgimportGempagempa=Gempa()print(gempa.dirasakan())Gempa Bumi Berpotensi Tsunami TerkinifrombmkgimportGempagempa=Gempa()print(gempa.tsunami_terkini())Sumber DataData gempa bumi yang digunakan di pustaka ini diperoleh dariBMKG (Badan Meteorologi, Klimatologi, dan Geofisika).DonasiJika kalian ingin berdonasi, silahkan menghubungi kami melalui jalur berikut ini:Email:moehammadhanif@gmail.comTelegram:t.me/muhammad_hanif
Package: bmkgnasir
Latest Earthquake in IndonesiaHow it worksThis package will retrieve latest earthquake information fromBMKGAuthorNasir NooruddinEmailnasir@nasir.idHow to use this packageinstall command :pip install requests
pip install beautifulsoup4
pip install bmkgnasirInsert following scripts into your main.pyfrom bmkg import extract, show
if __name__ == '__main__':
    result = extract()
    show(result)
Package: bmkgquake
BMKG Quake PackageThis package provides a simple way to retrieve real-time earthquake data in Indonesia from the official website of the Indonesian Meteorology, Climatology, and Geophysics Agency (BMKG). It utilizes web scraping techniques using thebeautifulsoup4andrequestspackages to fetch earthquake data from the BMKG website. The retrieved data is then returned as a Python dictionary or JSON format, which can be used in web or mobile applications.Key FeaturesReal-time Data Retrieval: Fetches the latest earthquake data from the BMKG website in real-time.Simple Web Scraping: Utilizesbeautifulsoup4andrequestspackages for efficient web scraping of earthquake data.Data Format: Returns earthquake data as a Python dictionary or JSON for easy integration into applications.Wide Python Version Support: Compatible with Python 3.6 or later.InstallationInstall the package using pip:pipinstallbmkgquakeUsageimportbmkgquakeresult=bmkgquake.extract_data()bmkgquake.display_data(result)
Package: bmlt
Basic Machine Learning ToolsSome useful machine learning toolsInstallationInstall this via pip (or your favourite package manager):pip install bmltContributors ✨Thanks goes to these wonderful people (emoji key):Ilya Bushmakin💻🤔📖This project follows theall-contributorsspecification. Contributions of any kind welcome!CreditsThis package was created withCopierand thebrowniebroke/pypackage-templateproject template.
Package: bmm
bmm: Bayesian Map-MatchingMap-matching using particle smoothing methods.Docsandmethodology.Installpip install bmmLoad graph and convert to UTMUTM (Universal Transverse Mercator) is a commonly used projection of spherical longitude-latitude
coordinates into square x-y coordinates.importnumpyasnpimportpandasaspdimportosmnxasoximportjsonimportbmmgraph=ox.graph_from_place('Porto, Portugal')graph=ox.project_graph(graph)Load polyline and convert to UTMdata_path='simulations/porto/test_route.csv'polyline_longlat=json.loads(pd.read_csv(data_path)['POLYLINE'][0])polyline_utm=bmm.long_lat_to_utm(polyline_longlat,graph)or generate fake datafake_route,fake_polyline_utm=bmm.sample_route(graph,timestamps=15,num_obs=25)Offline map-matchingmatched_particles=bmm.offline_map_match(graph,polyline=polyline_utm,n_samps=100,timestamps=15)Online map-matching# Initiate with first observationmatched_particles=bmm.initiate_particles(graph,first_observation=polyline_utm[0],n_samps=100)# Update when new observation comes inmatched_particles=bmm.update_particles(graph,matched_particles,new_observation=polyline_utm[1],time_interval=15)Plotbmm.plot(graph,particles=matched_particles,polyline=polyline_utm)
Package: bmm150
BMM150A pure python API for the bmm150 magnetic sensor.Note : Most code logic comes from one of the following repos :Seed-Studio/Grove_3_Axis_Compass_V2.0_BMM150orBoschSensortec/BMM150-Sensor-API. This is mostly a transpilation and a python packaging of this code.InstallationThe easiest way to install this library is using pip:pipinstallbmm150DocumentationThe documentation is built using sphinx and the readthedocs theme. You can find it on thereadthedocs official website.UsageThe following code initializes the sensor, and prints the magnetic field values for x, y and z.
Then, using theatan2function from themathstandard library, it retrieves the heading of the sensor.importbmm150importmathdevice=bmm150.BMM150()# Bus number will default to 1x,y,z=device.read_mag_data()heading_rads=math.atan2(x,y)heading_degrees=math.degrees(heading_rads)print(f"X :{x:.2f}µT")print(f"Y :{y:.2f}µT")print(f"Z :{z:.2f}µT")print(f"Heading:{heading_degs:.2f}°")DevelopmentThis library uses poetry as a development tool.You can start development by running :poetryinstallTestingYou can test this library using :poetryrunpytestToxYou can test multiple python versions using tox :poetryruntox
Package: bmmltools
bmmltoolsCurrent version 0.2.8Last update 26/10/2022PyPI:https://pypi.org/project/bmmltools/Documentation:https://bmmltools.readthedocs.io/en/latest/Author: Curcuraci L.Contacts:Luca.Curcuraci@mpikg.mpg.deThis is a python library for 3d binary image segmentation developed at Max-Plank-Institute fuer Kolloid-und
Grenzflaechenforschung. This library contains a series of tools which can be useful to segment 3d binary images
based on their structural/texture properties and extract information from the various regions identified,InstallationTo install bmmltools use the Anaconda propt. In the propt, copy the lines below(base) > conda create -n new_env python=3.8
(base) > conda activate new_env
(new_env) > conda install pytables=3.6.1
(new_env) > conda install hdbscan
(new_env) > pip install bmmltoolsPossible import errors:If other packages are installed togheter with bmmltools, the following import error may appear some case:hdbscan related import error: typically this error is related to the "cachedir" variable and happens as soon one
imports theHDBSCAN()class. This is not an error of hdbscan, but it is related to thejoblibpackage, which
has been recently (september 2022) updated to the 1.2.0 version in which the "cachedir" variables has been renamed.
The hdbscan module needs the version 1.10 of joblib to work without problems (maybe the 1.1.1 version is fine to),
therefore if you experience an import error of this kind, check if joblib is present in the correct version. If is
not, uninstall it and install the correct version. This import error should disappear.Result visualization: bmmlboardTo inspect the intermediate results, a series of standard visualization tools has been developed. They are collected
in thebmmlboard, a web-browser based a graphical interface made using streamlit, which can be used to visualize
the intermediate  results of bmmltools. To run the bmmlboard, write in the anaconda prompt(base) > conda activate new_env
(new_env) > python -m bmmltools.run_bmmlboardassuming that bmmltools is installed in the "new_env" environment.Possible streamlit errors:Sometimes streamlit does not work on some computer. This may not be a streamlit related issue, rather an issue related
to the permit to write certain environmental variables on the computer during the installation process. Clearly one
can solve this problem by reinstalling everything with suitable flags, but an simpler and effective solution can be
the following:Download on the computer the content of the folderboard, which can be found in the foldersrc/bmmltoolsof
this repository.Run in the same python environment where the bmmltools has been installed the filehome.pyinside the
downloaded folder with streamlit, namely write in an Anaconda prompt(new_env) > conda activate new_env
(new_env) > cd [PATH TO THE board FOLDER]
(new_env) [PATH TO THE board FOLDER] > streamlit run home.pyExample usageA series of example scripts are available in the 'example folder' of this repository. A detailed explanation of what
they do can be founs in the "Miscellaneous" section of the bmmmltools documentation.
Package: bmnsqlite3
bmnsqlite3SQLite3 Wrapper with VFS support.Table of ContentsRequirementsInstallationDevelopment VersionSQLite Version MapRequirements:Python >= 3.7, < 3.11Installation$python3-mpipinstallbmnsqlite3Development VersionDepending on your installed environment, in the instructions below you will need
to usepythoninstead ofpython3.If you want to use the package in "Debug Mode", set the environment variableBMN_DEBUG=1during package installation. For example:BMN_DEBUG=1 python3 -m pip install .Check out the code from GitHub, or download and extract tarball / ZIP
archive:$gitclonegit://github.com/BitMarketNetwork/bmnslite3.git
$cdbmnslite3Install in editable mode ("develop mode"):$python3-mpipinstall--user-e.[dev]Normal installation (optional):$python3-mpipinstall--user.[dev]Run tests:$python3-mtoxBuild sdist package:$python3-mbuild--sdistBuild wheel package:Windows:$python3-mbuild--wheelUpload to Test PyPI:$python3-mtwineupload--config-file./.pypirc-rtestpypidist/*SQLite Version MapPython versionCPython versionSQLite version3.73.7.03.21.03.83.8.23.28.03.93.9.23.32.33.10v3.10.0a63.34.0
Package: bmondata
bmondataAllows easy access to sensor data residing on aBMON Server.This package provides a wrapper around the the BMON API, version 2.  It allows retrieval
of key data stored in the BMON database, including sensor readings, sensor metadata, building
information, and organization information.  It is not comprehensive as some BMON information is
not available.  It also allows for storage of new sensor readings in a BMON
sensor reading database.Usage examples areshown here.
The docstring for each method gives additional information.Install with pip:pip install --upgrade bmondataThis package is only compatible with BMON Servers running the BMON software version
equal to or greater than:  Mon Jul 29 16:06:14 2019 -0800 (shown on the footer of the
BMON Graphs/Reports page.)
Package: bmonreporter
bmonreporterThis script creates the "Energy Reports" forBMON Building Monitoringapplications.
It is meant to be run periodically; it is currently run once per day at 3 am.
The script is generally
configured to store the final produced reports in an web-accessible AWS S3 bucket, which is
then accessed by the BMON application to allow users to view the reports.
The 'ENERGY_REPORTS_URL' in the BMON settings file points at the URL of the
S3 bucket.Reports are generated by running Jupyter Notebooks that produce the graphs, tables, and text
that make up the report.  Notebooks can be run at the "building" level or the "organziation" level.
A Building notebook is run for every building on a BMON server.  Organization notebooks are
run for each Organization.  The report notebooks are stored in Git repositories along with some
additional configuration information that indicates which BMON sites to run reports against.Here is an example of a Git repositorythat contains suitable Jupyter Notebooks and configuration info.The configuration of thisbmonreporterscript is done with a YAML configuration
file, patterned afterthis sample configuration file.
The main purpose of the configuration file is to identify the Git repositories containing
Jupyter Notebooks to process.  Multiple Git repositories can be processed by one run ofbmonreporter.bmonreporterruns with Python 3.7+ and is installed by:pipinstallbmonreporterThe server wherebmonreporteris installed must have all of the Python
packages used by the Jupyter Notebooks that are processed from the targeted
Git repositories.  Also, reports produced bybmonreporterand the log files
for the script are generally stored in AWS S3 buckets.  So, the server must
have suitable priveleges to write to those buckets.bmonreporteruses the
AWS command line utility to store files into S3 buckets.  This utility is installed
whenbmonreporteris installed, but the utility must be configured according tothis page,
and this configuration process will configure proper credentials for writing to S3 buckets.bmonreporteruses a profile named "bmonreporter", so that profile must be set
up in the AWS config and credentials files.Use ofbmonreporterjust involves running the script with a command line argument
pointing to the configuration file:bmonreporter<pathtoconfigurationfile>for example:bmonreporter/home/joeuser/config.yaml
Package: bmopentracing
Opentracing tracersJaeger tracer instrumentation implementedGitHub url:https://github.com/beyondminds/bmopentracingUsage:importloggingfrombmopentracing.tracers.jaegerimporttraceclassClassToInstrumentWithJaegerTracing:@trace('ClassToInstrumentWithJaegerTracing',logging.DEBUG)def__init__(...):@trace('ClassToInstrumentWithJaegerTracing',logging.DEBUG)defmethod_to_instrument(...):@trace('ClassToInstrumentWithJaegerTracing',logging.DEBUG)defanothor_method_to_instrument(...):Examples of Jaeger logs:INFO:jaeger_tracing:Initializing Jaeger Tracer with UDP reporter
INFO:jaeger_tracing:Using sampler ConstSampler(True)
INFO:jaeger_tracing:opentracing.tracer initialized to <jaeger_client.tracer.Tracer object at 0x7fe3662450a0>[app_name=ClassToInstrumentWithJaegerTracing]
INFO:jaeger_tracing:Reporting span 3ee394c442e9cc86:2fc2724e798b2422:0:1 ClassToInstrumentWithJaegerTracing.__init__
INFO:jaeger_tracing:Reporting span 86f77e62c1acbd39:bb0b4e49db3372c3:2f8ed28eee8f5172:1 ClassToInstrumentWithJaegerTracing.method_to_instrument
INFO:jaeger_tracing:Reporting span 86f77e62c1acbd39:6962c9b371b1889a:2f8ed28eee8f5172:1 ClassToInstrumentWithJaegerTracing.anothor_method_to_instrument
INFO:jaeger_tracing:Reporting span 86f77e62c1acbd39:2f8ed28eee8f5172:0:1 ClassToInstrumentWithJaegerTracing.anothor_method_to_instrumentThe Simplest way to run jaeger web server is:./jaeger-1.21.0-darwin-amd64/jaeger-all-in-one --collector.zipkin.http-port=9411
Package: bmp280
BMP280 Temperature, Pressure, & Altitude SensorSuitable for measuring ambient temperature, barometric pressure, and altitude, the BMP280 is a basic weather sensor.InstallingStable library from PyPi:Just runsudo pip install bmp280Latest/development library from GitHub:git clone https://github.com/pimoroni/bmp280-pythoncd bmp280-pythonsudo ./install.shChangelog0.0.4Add support for forced-mode on demand i2cChange altitude formulaAllow manual temperature compensation for altitudeAllow oversampling settings to be configured on__init__0.0.3Migrate to i2cdevice>=0.0.6 set/get API0.0.2Addedget_altitudemethodCorrected pressure to hPa0.0.1Initial Release
Package: bmp-280
BMP280 Digital Pressure Sensor Driver for Python3BMP280 is a digital pressure sensor manufactured by Bosch Sensortec. With this driver, you can use BMP280 with Python3 over I2C.DependenciesOnly smbus2 other than Python.Installationpip3installbmp-280Usagerun-bmp280orfrombmp_280importBMP280fromtimeimportsleepbmp=BMP280(port=1,mode=BMP280.FORCED_MODE,oversampling_p=BMP280.OVERSAMPLING_P_x16,oversampling_t=BMP280.OVERSAMPLING_T_x1,filter=BMP280.IIR_FILTER_OFF,standby=BMP280.T_STANDBY_1000)pressure=bmp.read_pressure()temp=bmp.read_temperature()print("Pressure (hPa): "+str(pressure))print("Temperature (°C): "+str(temp))ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseMIT