Saravanan666/pypi-org huggingface dataset:
Package: usgs-libcomcat
Table of ContentsTable of ContentsIntroductionInstallationUninstalling and UpdatingMotivationDocumentationGetting HelpCitationIntroductionlibcomcat is a project designed to provide a Python equivalent to the ANSS ComCat searchAPI.  This includes a Python library
that provides various classes and functions wrapping around the ComCat API, and a number of command
line programs that use those:findidFind the ID of an event closest to input parameters (time, latitude, longitude). Also can provide the authoritative ID if an event id is provided.getcsvGenerate csv or Excel files with basic earthquake information.geteventhistGenerate csv or Excel files with a history of product submission for an event.getmagsDownload all available magnitudes from all sources.getpagerDownload information that represents the PAGER exposure and loss results.getphasesGenerate csv or Excel files with phase information.getproductDownload ComCat product contents (shakemap grids, origin quakeml, etc.)Installationlibcomcatis now installable via pip:pip install usgs-libcomcatUninstalling and UpdatingTo uninstall:pip uninstall usgs-libcomcatTo update:pip install --upgrade usgs-libcomcatMotivationlibcomcat is a python wrapper for the Comprehensive Catalog (ComCat), which has aweb page interfaceandAPI. ComCat contains information inEventswhich containProducts. Products containContentsin the form of files, maps, etc.The ComCat interface is very user friendly, but does not support automation. The API supports automation, but limits the number of events that can be returned to 20,000. libcomcat uses the API in a way that allows for:Searches returning more than 20,000 eventsourceAutomation of product file downloadsExtraction of information in product content filesDocumentationDocumentation can be found in the docs folder:API DocumentationCommand Line Interface DocumentationExample Jupyter notebooks show how the API can be used to get and manipulate information from ComCat:Note: The ShakeMap/DYFI Station Pairs Notebook requires a geodetic distance calculation function, which can be installed via:pip install geopyClasses NotebookDataframes NotebookDetailed Event NotebookEvent History NotebookMagnitude Comparison NotebookPhase and Magnitude NotebookSearch NotebookGet ShakeMap/DYFI Station Pairs NotebookGetting HelpAny questions about libcomcat can be directed to the primary author:Mike Hearnemhearne@usgs.govCitationIf you wish to cite this work in your own publication, you may use this DOI:https://doi.org/10.5066/P91WN1UQ
Package: usgslidar
The USGS recently released high resolution elevation data as a lidar point cloud calledUSGS 3DEPin apublic dataset on Amazon. This dataset is essential to build models of water flow and predict plant health and maize harvest.The purpose of this package (usgslidar) is to produce an easy to use, reliable and well designed python module that domain experts and data scientists can use to fetch, visualise, and transform publicly available satellite and LIDAR data. In particular, it interfaces with USGS 3DEP and fetches data available in the s3 instance.Table of contentSetupUsageGetting started (tutorial)Example notebookSetupTo build our pipeline we actually usePDALunder the hood. Since PDAL doesnt build properly with pip in the current version, you need to use conda to manage your dependencies.InstallAnacondaIn a conda environment install PDAL and python-pdalcondainstall-cconda-forgepdalpython-pdalInstall usgslidarpipinstallusgslidarUsageGetting startedExample notebookdemo ipynbChange Log===============
0.0.17
fixes logs directory and import error when running get_data script
0.0.180.0.190.0.200.0.210.0.220.0.23
Fixes FileNotFoundError: [Errno 2] No such file or directory: 'get_data.json'
json PDAL pipeline wasnt getting packaged properly this version fixes that0.0.24
Fixes log dir not being found if it has been created once
0.0.25
Fixes json path not being found within package
fixes logger and module error on get_data module
Package: usgs-m2m-api
USGS Python APIAn object oriented wrapper around the USGS Earth Explorer JSON API (v1.5.x). The primary objective of this API is to provide a convenient method of requesting and downloading scenes from EE datasets, including robust metadata where available.API Documentationhttps://cast.git-pages.uark.edu/transmap-hub/usgs/usgs/PrerequisitesMust have an Earth Explorer account:https://earthexplorer.usgs.govThe EE account must have M2M accesss, requested here:https://ers.cr.usgs.gov/profile/access(you will need to wait for approval)Installation and SetupThree methods for using your username and passwordUsing a.envfileEE_USER="user_name"
EE_PASS="user_pass"Set your environment variables manually$exportEE_USER="user_name"$exportEE_PASS="user_pass"During each execution you will be prompted for your user:pass if one of the above two options are not setHard code within script (not recommended) - see belowInstallation (development)$pipenvinstall$pipenvrunpython./example.pyBasic API structureTo query a specific item, like adatasetor ascene, you need to construct aQueryobject from that namespace (dataset.Query,scene.Query) and pass that to theApiwith either afetchorfetchone. This will return aModelorList[Model]of that type (dataset.Model,scene.Model)Initialize the APIfromusgs_apiimportApiapi=Api.login()### If you want to directly type your user:password you can useapi=Api(username="user_name",password="password")Query a dataset by namedataset=api.dataset(datasetName="corona2")Start a scene cursor with a list of scenesscene_cursor=dataset.scenes()Collect only available scenes to queue for downloaddownloadable=scene_cursor.downloadableIterate the cursor to collect more scenesdownloadable+=scene_cursor.next().downloadableEnqueue the scenes for download from the Apiapi.download(scenes)Start the download and automate the extractionapi.start_download(extract=True)
Package: usgs-mbe
ADCP-Moving-Bed-ExtractionPulls extraction files from ADCP files for the USGS. Can be run on a given folder with subdirectories. For all the subdirectories - the script will scan through all files looking for two conditions:File extension is xmlQRev(case sensitive) is present in the file name.An error log will be generated to the folder. There may be some bad field data / assumptions taken, and the script will do its best to inform you of those decisions.Installationpip install usgs_mbeUsageusgs_mbe --test-folder=/path/to/folderor - more simply -usgs_mbeIf you're calling from Python (I.e., through Anaconda / PyCharm / etc.), you can doimport usgs_mbe
usgs_mbe.parse_folder(r"path/to/folder")OutputA csv file in each subfolder with the following columns:MovingBedSpeed
MovingBedSpeedUnit
TestTimestamp
MovingBedTestResults
StationName
siteid
MovingBedTestQuality
Duplicates -- If multiple values were found - this indicates that the first was taken.
gage_height_va -- USGS value for the closest height to the TestTimestamp.
Package: usgs-product-finder
usgs-product-finder-pypiSimple utility to find USGS Landsat products by AOI provided as WKT or shapely object.Installationpip3installusgs-product-finderUsagefromusgs_product_finderimportUsgsProductFinder# Initialize finderusgs_product_finder=UsgsProductFinder()# You can also specify a path where to download the products and# maximum age of the files in days# usgs_product_finder = UsgsProductFinder(#                       path_for_usgs_data="/home/user/usgs-product-finder",#                       max_age_of_usgs_data=7)# define aoi in wktaoi_wkt="""MULTIPOLYGON (((-175 -12,-179.99999 -12,-179.99999 -20,-175 -20,-175 -12)), ((175 -12,179.99999-12,179.99999 -20,175 -20,175 -12))) """# find productspandas_obj=(usgs_product_finder.find_products_via_wkt(aoi_wkt,8,minimal_output=False))list_of_dicts=(usgs_product_finder.find_products_via_wkt(aoi_wkt,8,minimal_output=True))
Package: usgs-riverdata
What is it?usgs-riverdatais a Python package that exposes to the United State Geological Survey (USGS) waterdata api to python. TheUSGS Waterdatasystem contains hydrologic data for United States rivers and tributaries.UsageImport usingimportusgs_riverdataThe core functionality of this library is the Gage class.Initializing an object of this class requires asite code. Each USGS data source has unique location code used to retrive data. The default data length is 7 days, this is configurable using an ISO-8601 Duration format, as specifedhere. Additional parameters are optional and specifiedhere.DependenciesThere are no outside dependencies. If Pandas is available, it will return data in a pandas.Dataframe.
Package: usgs-shakecast
Windows | Linux | Code Coverage | Code Quality |————- | ————- | ————- | ————- |[![Build status](https://ci.appveyor.com/api/projects/status/dk0ef1u4gttbkowp/branch/master?svg=true)](https://ci.appveyor.com/project/dslosky-usgs/shakecast-ygu6b/branch/master) | [![Build Status](https://travis-ci.org/usgs/shakecast.svg?branch=master)](https://travis-ci.org/usgs/shakecast) | [![codecov](https://codecov.io/gh/usgs/shakecast/branch/master/graph/badge.svg)](https://codecov.io/gh/usgs/shakecast) | [![Codacy Badge](https://api.codacy.com/project/badge/Grade/7ab6934c7a2c40fca83e982afd0d2624)](https://www.codacy.com/app/dslosky/shakecast_2?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=usgs/shakecast&amp;utm_campaign=Badge_Grade) |# ShakeCast V4
ShakeCast, short for ShakeMap Broadcast, is a fully automated, open-source system for delivering specific ShakeMap products to critical users and for triggering established post-earthquake response protocols.Checkout our [user and developer documentation](http://usgs.github.io/shakecast/).
Package: ushlex
Inspired by ordereddict,
this is a packaging of an improved shlex module for Python 2 that handles
Unicode properly.Shlex is “A lexical analyzer class for simple shell-like syntaxes.”If you’ve found your way here,
you probably already know that the standard shlex doesn’t handle Unicode prior
to Python 3
(seebug 1170for details).
Since Python 2.7.3 however,
it accepts unicode objects.
Sadly, it still does not handle non-ascii chars:>>>importsys,shlex>>>sys.version'2.7.5+ ...'>>>shlex.split(u'Hello world')['Hello','world']>>>shlex.split(u'café')Traceback(mostrecentcalllast):File"<input>",line1,in<module>File"/usr/lib/python2.7/shlex.py",line275,insplitlex=shlex(s,posix=posix)File"/usr/lib/python2.7/shlex.py",line25,in__init__instream=StringIO(instream)UnicodeEncodeError:'ascii'codeccan't encode character u'\xe9' inposition3:ordinalnotinrange(128)This moduledoeshandle unicode objects and byte strings under Python 2.x:>>>importushlexasshlex>>>shlex.split(u'café')[u'caf\xe9']>>>shlex.split(u'echo "☺ ☕ ♫"')[u'echo',u'\u263a\u2615\u266b']>>>fromushleximportsplitasshplit>>>shplit('echo "hello there"')['echo','hello there']I found these release notes inside:# Module and documentation by Eric S. Raymond, 21 Dec 1998
# Input stacking and error message cleanup added by ESR, March 2000
# push_source() and pop_source() made explicit by ESR, January 2001.
# Posix compliance, split(), string arguments, and
# iterator interface by Gustavo Niemeyer, April 2003.
# Modified to support Unicode by Colin Walters, Dec 2007BugsPackaging-only bugs may be submitted to bitbucket.Do notenter bugs for ushlex itself,
as the packager is not the author.
Package: ushmm
ushmm: A Python Library for Oral Testimonies at the USHMMThis README provides an overview of theushmmPython library, developed for parsing and processing oral testimonies from theUnited States Holocaust Memorial Museum. Theushmmlibrary is designed to facilitate the conversion of PDFs into structured data, which can then be used for various research and educational purposes.IntroductionTheushmmlibrary streamlines the process of handling the collection of oral testimonies available at the USHMM. These testimonies, which come in PDF format, are processed into raw text and subsequently structured data. The library wraps around Tesseract (for OCR) and Poppler (for parsing PDFs). It also converts the testimonies into structured HTML.InstallationYou can install theushmmlibrary directly using pip:pipinstallushmmAdditional DependenciesFor macOS users:Create a new Conda environment.Install Tesseract and Poppler using Homebrew or Conda-Forge:condainstall-cconda-forgetesseractpopplerEnsure you uninstall and then reinstallpdf2imagevia conda-forge if necessary:pipuninstallpdf2image
condainstall-cconda-forgepdf2imageUsageTheushmmlibrary includes functions that facilitate the conversion of PDF testimonies into images, and then to text, while cleaning and removing unwanted elements such as footers:fromushmmimportpdf_to_images,images_to_text,clean_texts,remove_footers,process_testimony_texts# Convert PDF to imagesimages=pdf_to_images("path/to/pdf","path/to/images",save=True)# Remove footers using Open-CVcropped_images=remove_footers("path/to/images","path/to/cropped_images",save=True)# Perform OCR on the imagestexts=images_to_text("path/to/cropped_images","path/to/text",save=True)# Clean the OCR outputcleaned_texts=clean_texts("path/to/text","path/to/cleaned_text",save=True)# Process the cleaned text into structured datahtml_result=process_testimony_texts("path/to/cleaned_text","output_file.html",save=True)FeaturesPDF Conversion: Converts PDF documents into a sequence of images.Image Cropping: Identifies and removes footers from images using Open-CV.OCR Processing: Applies Tesseract OCR to convert images into text.Data Cleaning: Cleans the OCR output to prepare it for structured data conversion.Structured Data: Parses raw text files and converts them into structured HTML documents.Data AccessibilityMaking the data accessible is a crucial aspect of theushmmlibrary. With the provided functions, users can not only process the testimonies but also make them available for public access and research.ContributingContributions to theushmmlibrary are welcome. Please refer to thecontribution guidelinesfor more information.LicenseTheushmmlibrary is provided under the MIT License. See theLICENSEfile for more details.AcknowledgmentsThis library was made possible by the collaborative efforts at the United States Holocaust Memorial Museum and contributions from the open-source community.
Package: ushuffle
A Cython wrapper around uShuffle - a useful tool for shuffling biological sequences while preserving the k-let countsThis is just a bundle of files downloaded fromushuffleand wrapped in Cython for easy installation and use.Installationgitclonehttps://github.com/guma44/ushuffle.gitcdushufflepythonsetup.pyinstall[--user]orpipinstall[--user]ushuffleUsageThe library exposes a shuffling function shuffle and a Shuffler object used to
make shuffling many times.Python 2:fromushuffleimportshuffle,Shufflerseq="ababcdcdabdcabvababab"shuffler=Shuffler(seq,2)foriinrange(10):seqres=shuffler.shuffle()print("results:",seqres)printshuffle(seq,2)Python 3:fromushuffleimportshuffle,Shufflerseq=b"ababcdcdabdcabvababab"shuffler=Shuffler(seq,2)foriinrange(10):seqres=shuffler.shuffle()print("results:",seqres)print(shuffle(seq,2))The library exposes also the function to set the random seed calledset_seed.
This sets the seed globally once and subsequent call to this function will not
change the seed anymore.ReferencesIf you use this tool please refer to the original paper and authors:
Minghui Jiang, James Anderson, Joel Gillespie, and Martin Mayne.uShuffle: a useful tool for shuffling biological sequences while preserving the k-let counts.BMC Bioinformatics, 9:#192, 2008.
Package: usig-normalizador-amba-P32
El procedimiento de normalización de direcciones tiene por objetivo unificar la escritura de direcciones con respecto a un callejero de referencia.
A su vez ofrece herramientas para consultar de manera transparente la existencia de cruces de calle, calles pertenecientes a
partidos, calle con altura con y sin partido determinado. ‘Normalizador de Direcciones AMBA’ es una componente python para normalizar direcciones del AMBA (conurbano y CABA).Partidos disponiblesServicio de callejeros:http://servicios.usig.buenosaires.gov.ar/callejero-ambaCABAAlmirante BrownAvellanedaBerazateguiBerissoCañuelasEnsenadaEscobarEsteban EcheverríaEzeizaFlorencio VarelaGeneral RodríguezGeneral San MartínHurlinghamItuzaingóJosé C. PazLa MatanzaLanúsLa PlataLomas de ZamoraMalvinas ArgentinasMarcos PazMerloMorenoMorónPilarPresidente PerónQuilmesSan FernandoSan IsidroSan MiguelSan VicenteTigreTres de FebreroVicente LópezInstalaciónPyPi$pipinstall-ihttps://test.pypi.org/simple/usig-normalizador-amba-P32Git$gitclonehttps://github.com/santiagocastellano/normalizador-amba-Python3.git$cdnormalizador-amba$pythonsetup.pyinstallEasy Install$gitclonehttps://github.com/santiagocastellano/normalizador-amba-Python3.git$cdnormalizador-amba$makeprepare-package$easy_installdist/usig-normalizador-amba-x.x.x.tar.gzGeneración del paquete de instalación$makeprepare-packageTestingEn el root del proyecto ejecutar:$makerun-testEjemplosfromusig_normalizador_ambaimportNormalizadorAMBAnd=NormalizadorAMBA()res=nd.normalizar('callao y corrientes')forrinres:printrPara instanciar el normalizador para algún/os partido/s en particular:fromusig_normalizador_ambaimportNormalizadorAMBAnd=NormalizadorAMBA(include_list=['caba'])# lista de codigos de partidores=nd.normalizar(u'San Martín 153')forrinres:printrPara excluir del normalizador algún partido en particular:fromusig_normalizador_ambaimportNormalizadorAMBAnd=NormalizadorAMBA(exclude_list=['caba'])# lista de codigos de partidores=nd.normalizar(u'San Martín 153')forrinres:printrPara buscar una dirección en un texto:fromusig_normalizador_ambaimportNormalizadorAMBAnd=NormalizadorAMBA()# lista de codigos de partidores=nd.buscarDireccion(u'Ubicado en Monseñor Alejandro Schell 166, a metros de la estación de Lomas de Zamora.')printres[0][0]['direcciones'][0]
Package: usim
μSim offers a lightweight and expressive user interface,
built on top of a powerful and robust simulation framework.
Using theasync/awaitcapabilities of Python3,
μSim allows you to both quickly and reliably build even complex simulations.>>>fromusimimportdelay,run>>>>>>asyncdefmetronome(period:float,sound:str):...asyncfornowindelay(period):...print(sound,'@',now)...>>>run(metronome(period=1,sound='tick'),metronome(period=2,sound='TOCK'),till=5)tick@1TOCK@2tick@2tick@3TOCK@4tick@4tick@5Check outthe μSim documentationfor more information on creating simulations with μSim.μSim DevelopmentIf you are reading this, you are looking atthe μSim repository.
Here you can find the current development version,
submit issue tickets, or propose pull requests.In order to try the most recent development version,
check out and install themasterbranch.
This branch is guaranteed to contain only working changes.If you want to report issues or propose changes, please take a look at thecontribution guidelines.
Package: usim800
usim800usim800 is a Python driver module for SIM800 GSM/GPRS . Its has easy-to-use api to access GPRS and to send sms .Supportraspberry piTested on python 3 with orange pi zero and linux machine using (usb to ttl) .FeaturesSend Get and post requests(supports HTTP/1.1).requests API  similar to pythonsRequestsmodule.Send SMSInstallation> pip install usim800Quick start :Import>>> from usim800 import sim800
>>> import json
>>> gsm = sim800(baudrate=9600,path="/dev/ttyUSB3")set APN>>> gsm.requests.APN = "www"get and post request>>> gsm.requests.get(url="http://my-json-server.typicode.com/typicode/demo/posts")
>>> r = gsm.requests
>>> r.status_code
'200'
>>> r.content
b'[  {    "id": 1,    "title": "Post 1"  },  {    "id": 2,    "title": "Post 2"  },  {    "id": 3,    "title": "Post 3"  }]'
>>> r.json()
[[{'id': 1, 'title': 'Post 1'}, {'id': 2, 'title': 'Post 2'}, {'id': 3, 'title': 'Post 3'}]]
>>> r.IP
'10.110.188.15'
>>> data = {"name":"somthing...."}
>>> gsm.requests.post(url="http://ptsv2.com/t/usim800/post",data=json.dumps(data))
'201'
>>> r.status_code
'201'
>>> r.content
b'Thank you for this dump. I hope you have a lovely day!'

>>> r.IP
'10.182.199.208'SMS>>> gsm.sms.send("8850813167","hi from usim800")
TrueFuture Plan and  improvementsbetter error handlingread sms
Package: usim800forutf8
usim800         this project belongs to BhagyarshGithub Link :https://github.com/Bhagyarsh/usim800usim800 is a Python driver module for SIM800 GSM/GPRS . Its has easy-to-use api to access GPRS and to send sms .Supportraspberry piTested on python 3 with orange pi zero and linux machine using (usb to ttl) .FeaturesSend Get and post requests(supports HTTP/1.1).requests API  similar to pythonsRequestsmodule.Send SMSInstallation> pip install usim800Quick start :Import>>> from usim800 import sim800
>>> import json
>>> gsm = sim800(baudrate=9600,path="/dev/ttyUSB3")set APN>>> gsm.requests.APN = "www"get and post request>>> gsm.requests.get(url="http://my-json-server.typicode.com/typicode/demo/posts")
>>> r = gsm.requests
>>> r.status_code
'200'
>>> r.content
b'[  {    "id": 1,    "title": "Post 1"  },  {    "id": 2,    "title": "Post 2"  },  {    "id": 3,    "title": "Post 3"  }]'
>>> r.json()
[[{'id': 1, 'title': 'Post 1'}, {'id': 2, 'title': 'Post 2'}, {'id': 3, 'title': 'Post 3'}]]
>>> r.IP
'10.110.188.15'
>>> data = {"name":"somthing...."}
>>> gsm.requests.post(url="http://ptsv2.com/t/usim800/post",data=json.dumps(data))
'201'
>>> r.status_code
'201'
>>> r.content
b'Thank you for this dump. I hope you have a lovely day!'

>>> r.IP
'10.182.199.208'SMS>>> gsm.sms.send("8850813167","hi from usim800")
TrueFuture Plan and  improvementsbetter error handlingread sms
Package: usim800-hamilkar
usim800-hamilkar - ahoj!usim800 is a Python driver module for SIM800 GSM/GPRS . Its has easy-to-use api to access GPRS and to send sms .Supportraspberry piTested on python 3 with orange pi zero and linux machine using (usb to ttl) .FeaturesSend Get and post requests(supports HTTP/1.1).requests API  similar to pythonsRequestsmodule.Send SMSInstallation> pip install usim800Quick start :Import>>> from usim800 import sim800
>>> import json
>>> gsm = sim800(baudrate=9600,path="/dev/ttyUSB3")set APN>>> gsm.requests.APN = "www"get and post request>>> gsm.requests.get(url="http://my-json-server.typicode.com/typicode/demo/posts")
>>> r = gsm.requests
>>> r.status_code
'200'
>>> r.content
b'[  {    "id": 1,    "title": "Post 1"  },  {    "id": 2,    "title": "Post 2"  },  {    "id": 3,    "title": "Post 3"  }]'
>>> r.json()
[[{'id': 1, 'title': 'Post 1'}, {'id': 2, 'title': 'Post 2'}, {'id': 3, 'title': 'Post 3'}]]
>>> r.IP
'10.110.188.15'
>>> data = {"name":"somthing...."}
>>> gsm.requests.post(url="http://ptsv2.com/t/usim800/post",data=json.dumps(data))
'201'
>>> r.status_code
'201'
>>> r.content
b'Thank you for this dump. I hope you have a lovely day!'

>>> r.IP
'10.182.199.208'SMS>>> gsm.sms.send("8850813167","hi from usim800")
TrueFuture Plan and  improvementsbetter error handlingread sms
Package: usinelib
usinelibUsageimport usinelib

users = [
    {
        "username": "test",
        "friendlyname": "Test Testsson",
        "number": "46123123123"
    }
]


def main():
    usine_menu = usinelib.UsineMenu()
    debug = True
    weekly_menu, weekly_veg_menu, classic_menu = usine_menu.get_menus()
    if debug:
        for day in weekly_menu:
            print(day['dish'])
        for classic in classic_menu:
            print(classic['dish'])
        for veg in weekly_veg_menu:
            print(veg['dish'])
    usineMenu.notify_users(users, debug)


if __name__ == '__main__':
    main()